PageSourceSearch

https://tnc-sgsm-calculator.netlify.app/js/chunk-vendors.6ec4df9e.js

js tnc-sgsm-calculator.netlify.app collected 2026-10-03 11:30:50 UTC 1,757,227 bytes, 72 lines download raw bytes

vendor: 4,249 bytes, line 1
1(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"014b":function(t,e,n){"use strict";var r=n("e53d"),i=n("07e3"),o=n("8e60"),a=n("63b6"),s=n("9138"),l=n("ebfd").KEY,c=n("294c"),u=n("dbdb"),h=n("45f2"),d=n("62a0"),p=n("5168"),f=n("ccb9"),m=n("6718"),g=n("47ee"),y=n("9003"),_=n("e4ae"),v=n("f772"),b=n("36c3"),x=n("1bc3"),w=n("aebd"),S=n("a159"),T=n("0395"),E=n("bf0b"),C=n("d9f6"),O=n("c3a1"),P=E.f,k=C.f,A=T.f,I=r.Symbol,M=r.JSON,D=M&&M.stringify,B="prototype",z=p("_hidden"),L=p("toPrimitive"),R={}.propertyIsEnumerable,j=u("symbol-registry"),F=u("symbols"),N=u("op-symbols"),$=Object[B],V="function"==typeof I,U=r.QObject,G=!U||!U[B]||!U[B].findChild,H=o&&c(function(){return 7!=S(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P($,e);r&&delete $[e],k(t,e,n),r&&t!==$&&k($,e,r)}:k,q=function(t){var e=F[t]=S(I[B]);return e._k=t,e},W=V&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},Z=function(t,e,n){return t===$&&Z(N,e,n),_(t),e=x(e,!0),_(n),i(F,e)?(n.enumerable?(i(t,z)&&t[z][e]&&(t[z][e]=!1),n=S(n,{enumerable:w(0,!1)})):(i(t,z)||k(t,z,w(1,{})),t[z][e]=!0),H(t,e,n)):k(t,e,n)},X=function(t,e){_(t);var n,r=g(e=b(e)),i=0,o=r.length;while(o>i)Z(t,n=r[i++],e[n]);return t},Y=function(t,e){return void 0===e?S(t):X(S(t),e)},K=function(t){var e=R.call(this,t=x(t,!0));return!(this===$&&i(F,t)&&!i(N,t))&&(!(e||!i(this,t)||!i(F,t)||i(this,z)&&this[z][t])||e)},J=function(t,e){if(t=b(t),e=x(e,!0),t!==$||!i(F,e)||i(N,e)){var n=P(t,e);return!n||!i(F,e)||i(t,z)&&t[z][e]||(n.enumerable=!0),n}},Q=function(t){var e,n=A(b(t)),r=[],o=0;while(n.length>o)i(F,e=n[o++])||e==z||e==l||r.push(e);return r},tt=function(t){var e,n=t===$,r=A(n?N:b(t)),o=[],a=0;while(r.length>a)!i(F,e=r[a++])||n&&!i($,e)||o.push(F[e]);return o};V||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===$&&e.call(N,n),i(this,z)&&i(this[z],t)&&(this[z][t]=!1),H(this,t,w(1,n))};return o&&G&&H($,t,{configurable:!0,set:e}),q(t)},s(I[B],"toString",function(){return this._k}),E.f=J,C.f=Z,n("6abf").f=T.f=Q,n("355d").f=K,n("9aa9").f=tt,o&&!n("b8e3")&&s($,"propertyIsEnumerable",K,!0),f.f=function(t){return q(p(t))}),a(a.G+a.W+a.F*!V,{Symbol:I});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var rt=O(p.store),it=0;rt.length>it;)m(rt[it++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return i(j,t+="")?j[t]:j[t]=I(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in j)if(j[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!V,"Object",{create:Y,defineProperty:Z,defineProperties:X,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),M&&a(a.S+a.F*(!V||c(function(){var t=I();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))})),"JSON",{stringify:function(t){var e,n,r=[t],i=1;while(arguments.length>i)r.push(arguments[i++]);if(n=e=r[1],(v(e)||void 0!==t)&&!W(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,D.apply(M,r)}}),I[B][L]||n("35e8")(I[B],L,I[B].valueOf),h(I,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},"01f9":function(t,e,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),a=n("32e9"),s=n("84f2"),l=n("41a0"),c=n("7f20"),u=n("38fd"),h=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",f="keys",m="values",g=function(){return this};t.exports=function(t,e,n,y,_,v,b){l(n,e,y);var x,w,S,T=function(t){if(!d&&t in P)return P[t];switch(t){case f:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",C=_==m,O=!1,P=t.prototype,k=P[h]||P[p]||_&&P[_],A=k||T(_),I=_?C?T("entries"):A:void 0,M="Array"==e&&P.entries||k;if(M&&(S=u(M.call(new t)),S!==Object.prototype&&S.next&&(c(S,E,!0),r||"function"==typeof S[h]||a(S,h,g))),C&&k&&k.name!==m&&(O=!0,A=function(){return k.call(this)}),r&&!b||!d&&!O&&P[h]||a(P,h,A),s[e]=A,s[E]=g,_)if(x={values:C?A:T(m),keys:v?A:T(f),entries:I}
1,b)for(w in x)w in P||o(P,w,x[w]);else i(i.P+i.F*(d||O),e,x);return x}},"02f4":function(t,e,n){var r=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),l=r(n),c=s.length;return l<0||l>=c?t?"":void 0:(o=s.charCodeAt(l),o<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0395":function(t,e,n){var r=n("36c3"),i=n("6abf").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},"03c6":function(t,e,n){t.exports=n("e9c6")},"044b":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))}
2/*!
3 * Determine if an object is a Buffer
4 *
5 * @author   Feross Aboukhadijeh <https://feross.org>
6 * @license  MIT
7 */
8t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"097d":function(t,e,n){"use strict";var r=n("5ca1"),i=n("8378"),o=n("7726"),a=n("ebd6"),s=n("bcaa");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},"0a06":function(t,e,n){"use strict";var r=n("2444"),i=n("c532"),o=n("f6b4"),a=n("5270");function s(t){this.defaults=t,this.interceptors={request:new o,response:new o}}s.prototype.request=function(t){"string"===typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),t=i.merge(r,{method:"get"},this.defaults,t),t.method=t.method.toLowerCase();var e=[a,void 0],n=Promise.resolve(t);this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});while(e.length)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){s.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}
vendor: 10,366 bytes, line 8
8),i.forEach(["post","put","patch"],function(t){s.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=s},"0a0d":function(t,e,n){t.exports=n("e829")},"0a49":function(t,e,n){var r=n("9b43"),i=n("626a"),o=n("4bf8"),a=n("9def"),s=n("cd1c");t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,h=6==t,d=5==t||h,p=e||s;return function(e,s,f){for(var m,g,y=o(e),_=i(y),v=r(s,f,3),b=a(_.length),x=0,w=n?p(e,b):l?p(e,0):void 0;b>x;x++)if((d||x in _)&&(m=_[x],g=v(m,x,y),t))if(n)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(u)return!1;return h?-1:c||u?u:w}}},"0a90":function(t,e,n){var r=n("63b6"),i=n("10ff");r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},"0b21":function(t,e,n){var r=n("5ca1");r(r.S,"Math",{sign:n("96fb")})},"0b64":function(t,e,n){var r=n("f772"),i=n("9003"),o=n("5168")("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0cd9":function(t,e,n){var r=n("f772"),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},"0d58":function(t,e,n){var r=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return r(t,i)}},"0df6":function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},"0fc9":function(t,e,n){var r=n("3a38"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"10ff":function(t,e,n){var r=n("e53d").parseFloat,i=n("a1ce").trim;t.exports=1/r(n("e692")+"-0")!==-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},1173:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"11e9":function(t,e,n){var r=n("52a7"),i=n("4630"),o=n("6821"),a=n("6a99"),s=n("69a8"),l=n("c69a"),c=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?c:function(t,e){if(t=o(t),e=a(e,!0),l)try{return c(t,e)}catch(n){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),i=n("cb7c"),o=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);var n,a=o(e),s=a.length,l=0;while(s>l)r.f(t,n=a[l++],e[n]);return t}},"15b8":function(t,e,n){t.exports=n("e1b7")},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},1991:function(t,e,n){var r,i,o,a=n("9b43"),s=n("31f4"),l=n("fab2"),c=n("230e"),u=n("7726"),h=u.process,d=u.setImmediate,p=u.clearImmediate,f=u.MessageChannel,m=u.Dispatch,g=0,y={},_="onreadystatechange",v=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},b=function(t){v.call(t.data)};d&&p||(d=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},p=function(t){delete y[t]},"process"==n("2d95")(h)?r=function(t){h.nextTick(a(v,t,1))}:m&&m.now?r=function(t){m.now(a(v,t,1))}:f?(i=new f,o=i.port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(t){u.postMessage(t+"","*")},u.addEventListener("message",b,!1)):r=_ in c("script")?function(t){l.appendChild(c("script"))[_]=function(){l.removeChild(this),v.call(t)}}:function(t){setTimeout(a(v,t,1),0)}),t.exports={set:d,clear:p}},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"1d2b":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)}}},"1ec9":function(t,e,n){var r=n("f772"),i=n("e53d").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"1fa8":function(t,e,n){var r=n("cb7c");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(a){var o=t["return"];throw void 0!==o&&r(o.call(t)),a}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),i=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),a=n("be13"),s=n("2b4c"),l=n("520a"),c=s("species"),u=!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),h=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var d=s(t),p=!o(function(){var e={};return e[d]=function(){return 7},7!=""[t](e)}),f=p?!o(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[d](""),!e}):void 0;if(!p||!f||"replace"===t&&!u||"split"===t&&!h){var m=/./[d],g=n(a,d,""[t],function(t,e,n,r,i){return e.exec===l?p&&!i?{done:!0,value:m.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),y=g[0],_=g[1];r(String.prototype,t,y),i(RegExp.prototype,d,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),i=n("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},"241e":function(t,e,n){var r=n("25eb");t.exports=function(t){return Object(r(t))}},2444:function(t,e,n){"use strict";(function(e){var r=n("c532"),i=n("c8af"),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function s(){var t;return"undefined"!==typeof XMLHttpRequest?t=n("b50d"):"undefined"!==typeof e&&(t=n("b50d")),t}var l={adapter:s(),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(t){l.headers[t]={}}),r.forEach(["post","put","patch"],function(t){l.headers[t]=r.merge(o)}),t.exports=l}).call(this,n("4362"))},"25c9":function(t,e,n){var r=n("5ca1"),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"27ee":function(t,e,n){var r=n("23c6"),i=n("2b4c")("iterator"),o=n("84f2");t.exports=n("8378").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},2877:function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}n.d(e,"a",function(){return r})},"28a5":function(t,e,n){"use strict";var r=n("aae3"),i=n("cb7c"),o=n("ebd6"),a=n("0390"),s=n("9def"),l=n("5f1b"),c=n("520a"),u=n("79e5"),h=Math.min,d=[].push,p="split",f="length",m="lastIndex",g=4294967295,y=!u(function(){RegExp(g,"y")});n("214f")("split",2,function(t,e,n,u){var _;return _="c"=="abbc"[p](/(b)*/)[1]||4!="test"[p](/(?:)/,-1)[f]||2!="ab"[p](/(?:ab)*/)[f]||4!="."[p](/(.?)(.?)/)[f]||"."[p](/()()/)[f]>1||""[p](/.?/)[f]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);var o,a,s,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,p=void 0===e?g:e>>>0,y=new RegExp(t.source,u+"g");while(o=c.call(y,i)){if(a=y[m],a>h&&(l.push(i.slice(h,o.index)),o[f]>1&&o.index<i[f]&&d.apply(l,o.slice(1)),s=o[0][f],h=a,l[f]>=p))break;y[m]===o.index&&y[m]++}return h===i[f]?!s&&y.test("")||l.push(""):l.push(i.slice(h)),l[f]>p?l.slice(0,p):l}:"0"[p](void 0,0)[f]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,i,r):_.call(String(i),n,r)},function(t,e){var r=u(_,t,this,e,_!==n);if(r.done)return r.value;var c=i(t),d=String(this),p=o(c,RegExp),f=c.unicode,m=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(y?"y":"g"),v=new p(y?c:"^(?:"+c.source+")",m),b=void 0===e?g:e>>>0;
8if(0===b)return[];if(0===d.length)return null===l(v,d)?[d]:[];var x=0,w=0,S=[];while(w<d.length){v.lastIndex=y?w:0;var T,E=l(v,y?d:d.slice(w));if(null===E||(T=h(s(v.lastIndex+(y?0:w)),d.length))===x)w=a(d,w,f);else{if(S.push(d.slice(x,w)),S.length===b)return S;for(var C=1;C<=E.length-1;C++)if(S.push(E[C]),S.length===b)return S;w=x=T}}return S.push(d.slice(x)),S}]})},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"2aba":function(t,e,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),l="toString",c=(""+s).split(l);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(l&&(o(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,l,function(){return"function"==typeof this&&this[a]||s.call(this)})},"2aeb":function(t,e,n){var r=n("cb7c"),i=n("1495"),o=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},l="prototype",c=function(){var t,e=n("230e")("iframe"),r=o.length,i="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),c=t.F;while(r--)delete c[l][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[l]=r(t),n=new s,s[l]=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},"2b0e":function(t,e,n){"use strict";n.r(e),function(t){
9/*!
10 * Vue.js v2.6.10
11 * (c) 2014-2019 Evan You
12 * Released under the MIT License.
13 */
14var n=Object.freeze({});function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function l(t){return null!==t&&"object"===typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function h(t){return"[object RegExp]"===c.call(t)}function d(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return i(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function f(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}g("slot,component",!0);var y=g("key,ref,slot,slot-scope,is");function _(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var v=Object.prototype.hasOwnProperty;function b(t,e){return v.call(t,e)}function x(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var w=/-(\w)/g,S=x(function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})}),T=x(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),E=/\B([A-Z])/g,C=x(function(t){return t.replace(E,"-$1").toLowerCase()});function O(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function P(t,e){return t.bind(e)}var k=Function.prototype.bind?P:O;function A(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function I(t,e){for(var n in e)t[n]=e[n];return t}function M(t){for(var e={},n=0;n<t.length;n++)t[n]&&I(e,t[n]);return e}function D(t,e,n){}var B=function(t,e,n){return!1},z=function(t){return t};function L(t,e){if(t===e)return!0;var n=l(t),r=l(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,n){return L(t,e[n])});if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(n){return L(t[n],e[n])})}catch(c){return!1}}function R(t,e){for(var n=0;n<t.length;n++)if(L(t[n],e))return n;return-1}function j(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var F="data-server-rendered",N=["component","directive","filter"],$=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","
14serverPrefetch"],V={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:B,isReservedAttr:B,isUnknownElement:B,getTagNamespace:D,parsePlatformTagName:z,mustUseProp:B,async:!0,_lifecycleHooks:$},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function G(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function H(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var q=new RegExp("[^"+U.source+".$_\\d]");function W(t){if(!q.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}var Z,X="__proto__"in{},Y="undefined"!==typeof window,K="undefined"!==typeof WXEnvironment&&!!WXEnvironment.platform,J=K&&WXEnvironment.platform.toLowerCase(),Q=Y&&window.navigator.userAgent.toLowerCase(),tt=Q&&/msie|trident/.test(Q),et=Q&&Q.indexOf("msie 9.0")>0,nt=Q&&Q.indexOf("edge/")>0,rt=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===J),it=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/)),ot={}.watch,at=!1;if(Y)try{var st={};Object.defineProperty(st,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,st)}catch(Sa){}var lt=function(){return void 0===Z&&(Z=!Y&&!K&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),Z},ct=Y&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ut(t){return"function"===typeof t&&/native code/.test(t.toString())}var ht,dt="undefined"!==typeof Symbol&&ut(Symbol)&&"undefined"!==typeof Reflect&&ut(Reflect.ownKeys);ht="undefined"!==typeof Set&&ut(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var pt=D,ft=0,mt=function(){this.id=ft++,this.subs=[]};mt.prototype.addSub=function(t){this.subs.push(t)},mt.prototype.removeSub=function(t){_(this.subs,t)}
vendor: 4,209 bytes, line 14
14,mt.prototype.depend=function(){mt.target&&mt.target.addDep(this)},mt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e<n;e++)t[e].update()},mt.target=null;var gt=[];function yt(t){gt.push(t),mt.target=t}function _t(){gt.pop(),mt.target=gt[gt.length-1]}var vt=function(t,e,n,r,i,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},bt={child:{configurable:!0}};bt.child.get=function(){return this.componentInstance},Object.defineProperties(vt.prototype,bt);var xt=function(t){void 0===t&&(t="");var e=new vt;return e.text=t,e.isComment=!0,e};function wt(t){return new vt(void 0,void 0,void 0,String(t))}function St(t){var e=new vt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var Tt=Array.prototype,Et=Object.create(Tt),Ct=["push","pop","shift","unshift","splice","sort","reverse"];Ct.forEach(function(t){var e=Tt[t];H(Et,t,function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var i,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2);break}return i&&a.observeArray(i),a.dep.notify(),o})});var Ot=Object.getOwnPropertyNames(Et),Pt=!0;function kt(t){Pt=t}var At=function(t){this.value=t,this.dep=new mt,this.vmCount=0,H(t,"__ob__",this),Array.isArray(t)?(X?It(t,Et):Mt(t,Et,Ot),this.observeArray(t)):this.walk(t)};function It(t,e){t.__proto__=e}function Mt(t,e,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];H(t,o,e[o])}}function Dt(t,e){var n;if(l(t)&&!(t instanceof vt))return b(t,"__ob__")&&t.__ob__ instanceof At?n=t.__ob__:Pt&&!lt()&&(Array.isArray(t)||u(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new At(t)),e&&n&&n.vmCount++,n}function Bt(t,e,n,r,i){var o=new mt,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,l=a&&a.set;s&&!l||2!==arguments.length||(n=t[e]);var c=!i&&Dt(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return mt.target&&(o.depend(),c&&(c.dep.depend(),Array.isArray(e)&&Rt(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!==e&&r!==r||s&&!l||(l?l.call(t,e):n=e,c=!i&&Dt(e),o.notify())}})}}function zt(t,e,n){if(Array.isArray(t)&&d(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(Bt(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function Lt(t,e){if(Array.isArray(t)&&d(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||b(t,e)&&(delete t[e],n&&n.dep.notify())}}function Rt(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&Rt(e)}At.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Bt(t,e[n])},At.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Dt(t[e])};var jt=V.optionMergeStrategies;function Ft(t,e){if(!e)return t;for(var n,r,i,o=dt?Reflect.ownKeys(e):Object.keys(e),a=0;a<o.length;a++)n=o[a],"__ob__"!==n&&(r=t[n],i=e[n],b(t,n)?r!==i&&u(r)&&u(i)&&Ft(r,i):zt(t,n,i));return t}function Nt(t,e,n){return n?function(){var r="function"===typeof e?e.call(n,n):e,i="function"===typeof t?t.call(n,n):t;return r?Ft(r,i):i}:e?t?function(){return Ft("function"===typeof e?e.call(this,this):e,"function"===typeof t?t.call(this,this):t)}:e:t}function $t(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?Vt(n):n}function Vt(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}function Ut(t,e,n,r){var i=Object.create(t||null);return e?I(i,e):i}jt.data=function(t,e,n){return n?Nt(t,e,n):e&&"function"!==typeof e?t:Nt(t,e)},$.forEach(function(t){jt[t]=$t}
vendor: 8,545 bytes, line 14
14),N.forEach(function(t){jt[t+"s"]=Ut}),jt.watch=function(t,e,n,r){if(t===ot&&(t=void 0),e===ot&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};for(var o in I(i,t),e){var a=i[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},jt.props=jt.methods=jt.inject=jt.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return I(i,t),e&&I(i,e),i},jt.provide=Nt;var Gt=function(t,e){return void 0===e?t:e};function Ht(t,e){var n=t.props;if(n){var r,i,o,a={};if(Array.isArray(n)){r=n.length;while(r--)i=n[r],"string"===typeof i&&(o=S(i),a[o]={type:null})}else if(u(n))for(var s in n)i=n[s],o=S(s),a[o]=u(i)?i:{type:i};else 0;t.props=a}}function qt(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(u(n))for(var o in n){var a=n[o];r[o]=u(a)?I({from:o},a):{from:a}}else 0}}function Wt(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"===typeof r&&(e[n]={bind:r,update:r})}}function Zt(t,e,n){if("function"===typeof e&&(e=e.options),Ht(e,n),qt(e,n),Wt(e),!e._base&&(e.extends&&(t=Zt(t,e.extends,n)),e.mixins))for(var r=0,i=e.mixins.length;r<i;r++)t=Zt(t,e.mixins[r],n);var o,a={};for(o in t)s(o);for(o in e)b(t,o)||s(o);function s(r){var i=jt[r]||Gt;a[r]=i(t[r],e[r],n,r)}return a}function Xt(t,e,n,r){if("string"===typeof n){var i=t[e];if(b(i,n))return i[n];var o=S(n);if(b(i,o))return i[o];var a=T(o);if(b(i,a))return i[a];var s=i[n]||i[o]||i[a];return s}}function Yt(t,e,n,r){var i=e[t],o=!b(n,t),a=n[t],s=te(Boolean,i.type);if(s>-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===C(t)){var l=te(String,i.type);(l<0||s<l)&&(a=!0)}if(void 0===a){a=Kt(r,i,t);var c=Pt;kt(!0),Dt(a),kt(c)}return a}function Kt(t,e,n){if(b(e,"default")){var r=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"===typeof r&&"Function"!==Jt(e.type)?r.call(t):r}}function Jt(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Qt(t,e){return Jt(t)===Jt(e)}function te(t,e){if(!Array.isArray(e))return Qt(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(Qt(e[n],t))return n;return-1}function ee(t,e,n){yt();try{if(e){var r=e;while(r=r.$parent){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{var a=!1===i[o].call(r,t,e,n);if(a)return}catch(Sa){re(Sa,r,"errorCaptured hook")}}}re(t,e,n)}finally{_t()}}function ne(t,e,n,r,i){var o;try{o=n?t.apply(e,n):t.call(e),o&&!o._isVue&&p(o)&&!o._handled&&(o.catch(function(t){return ee(t,r,i+" (Promise/async)")}),o._handled=!0)}catch(Sa){ee(Sa,r,i)}return o}function re(t,e,n){if(V.errorHandler)try{return V.errorHandler.call(null,t,e,n)}catch(Sa){Sa!==t&&ie(Sa,null,"config.errorHandler")}ie(t,e,n)}function ie(t,e,n){if(!Y&&!K||"undefined"===typeof console)throw t;console.error(t)}var oe,ae=!1,se=[],le=!1;function ce(){le=!1;var t=se.slice(0);se.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!==typeof Promise&&ut(Promise)){var ue=Promise.resolve();oe=function(){ue.then(ce),rt&&setTimeout(D)},ae=!0}else if(tt||"undefined"===typeof MutationObserver||!ut(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())oe="undefined"!==typeof setImmediate&&ut(setImmediate)?function(){setImmediate(ce)}:function(){setTimeout(ce,0)};else{var he=1,de=new MutationObserver(ce),pe=document.createTextNode(String(he));de.observe(pe,{characterData:!0}),oe=function(){he=(he+1)%2,pe.data=String(he)},ae=!0}function fe(t,e){var n;if(se.push(function(){if(t)try{t.call(e)}catch(Sa){ee(Sa,e,"nextTick")}else n&&n(e)}),le||(le=!0,oe()),!t&&"undefined"!==typeof Promise)return new Promise(function(t){n=t})}var me=new ht;function ge(t){ye(t,me),me.clear()}function ye(t,e){var n,r,i=Array.isArray(t);if(!(!i&&!l(t)||Object.isFrozen(t)||t instanceof vt)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i){n=t.length;while(n--)ye(t[n],e)}else{r=Object.keys(t),n=r.length;while(n--)ye(t[r[n]],e)}}}var _e=x(function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var n="~"===t.charAt(0);t=n?t.slice(1):t;var r="!"===t.charAt(0);return t=r?t.slice(1):t,{name:t,once:n,capture:r,passive:e}});function ve(t,e){function n(){var t=arguments,r=n.fns;if(!Array.isArray(r))return ne(r,null,arguments,e,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)ne(i[o],null,t,e,"v-on handler")}return n.fns=t,n}function be(t,e,n,i,a,s){var l,c,u,h;for(l in t)c=t[l],u=e[l],h=_e(l),r(c)||(r(u)?(r(c.fns)&&(c=t[l]=ve(c,s)),o(h.once)&&(c=t[l]=a(h.name,c,h.capture)),n(h.name,c,h.capture,h.passive,h.params)):c!==u&&(u.fns=c,t[l]=u));for(l in e)r(t[l])&&(h=_e(l),i(h.name,e[l],h.capture))}function xe(t,e,n){var a;t instanceof vt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function l(){n.apply(this,arguments),_(a.fns,l)}r(s)?a=ve([l]):i(s.fns)&&o(s.merged)?(a=s,a.fns.push(l)):a=ve([s,l]),a.merged=!0,t[e]=a}function we(t,e,n){var o=e.options.props;if(!r(o)){var a={},s=t.attrs,l=t.props;if(i(s)||i(l))for(var c in o){var u=C(c);Se(a,l,c,u,!0)||Se(a,s,c,u,!1)}return a}}function Se(t,e,n,r,o){if(i(e)){if(b(e,n))return t[n]=e[n],o||delete e[n],!0;if(b(e,r))return t[n]=e[r],o||delete e[r],!0}return!1}function Te(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function Ee(t){return s(t)?[wt(t)]:Array.isArray(t)?Oe(t):void 0}function Ce(t){return i(t)&&i(t.text)&&a(t.isComment)}function Oe(t,e){var n,a,l,c,u=[];for(n=0;n<t.length;n++)a=t[n],r(a)||"boolean"===typeof a||(l=u.length-1,c=u[l],Array.isArray(a)?a.length>0&&(a=Oe(a,(e||"")+"_"+n),Ce(a[0])&&Ce(c)&&(u[l]=wt(c.text+a[0].text),a.shift()),u.push.apply(u,a)):s(a)?Ce(c)?u[l]=wt(c.text+a):""!==a&&u.push(wt(a)):Ce(a)&&Ce(c)?u[l]=wt(c.text+a.text):(o(t._isVList)&&i(a.tag)&&r(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+n+"__"),u.push(a)));return u}function Pe(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function ke(t){var e=Ae(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach(function(n){Bt(t,n,e[n])}),kt(!0))}function Ae(t,e){if(t){for(var n=Object.create(null),r=dt?Reflect.ownKeys(t):Object.keys(t),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){var a=t[o].from,s=e;while(s){if(s._provided&&b(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s)if("default"in t[o]){var l=t[o].default;n[o]="function"===typeof l?l.call(e):l}else 0}}return n}}function Ie(t,e){if(!t||!t.length)return{};for(var n={},r=0,i=t.length;r<i;r++){var o=t[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,l=n[s]||(n[s]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var c in n)n[c].every(Me)&&delete n[c];return n}function Me(t){return t.isComment&&!t.asyncFactory||" "===t.text}function De(t,e,r){var i,o=Object.keys(e).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var l in i={},t)t[l]&&"$"!==l[0]&&(i[l]=Be(e,l,t[l]))}else i={};for(var c in e)c in i||(i[c]=ze(e,c));return t&&Object.isExtensible(t)&&(t._normalized=i),H(i,"$stable",a),H(i,"$key",s),H(i,"$hasNormal",o),i}function Be(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ee(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ze(t,e){return function(){return t[e]}}function Le(t,e){var n,r,o,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,o=t.length;r<o;r++)n[r]=e(t[r],r);else if("number"===typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(l(t))if(dt&&t[Symbol.iterator]){n=[];var c=t[Symbol.iterator](),u=c.next();while(!u.done)n.push(e(u.value,n.length)),u=c.next()}else for(a=Object.keys(t),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=e(t[s],s,r);return i(n)||(n=[]),n._isVList=!0,n}function Re(t,e,n,r){var i,o=this.$scopedSlots[t];o?(n=n||{},r&&(n=I(I({},r),n)),i=o(n)||e):i=this.$slots[t]||e;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function je(t){return Xt(this.$options,"filters",t,!0)||z}function Fe(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function Ne(t,e,n,r,i){var o=V.keyCodes[e]||n;return i&&r&&!V.keyCodes[e]?Fe(i,r):o?Fe(o,t):r?C(r)!==e:void 0}function $e(t,e,n,r,i){if(n)if(l(n)){var o;Array.isArray(n)&&(n=M(n));
vendor: 6,168 bytes, line 14
14var a=function(a){if("class"===a||"style"===a||y(a))o=t;else{var s=t.attrs&&t.attrs.type;o=r||V.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var l=S(a),c=C(a);if(!(l in o)&&!(c in o)&&(o[a]=n[a],i)){var u=t.on||(t.on={});u["update:"+a]=function(t){n[a]=t}}};for(var s in n)a(s)}else;return t}function Ve(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e?r:(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),Ge(r,"__static__"+t,!1),r)}function Ue(t,e,n){return Ge(t,"__once__"+e+(n?"_"+n:""),!0),t}function Ge(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!==typeof t[r]&&He(t[r],e+"_"+r,n);else He(t,e,n)}function He(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function qe(t,e){if(e)if(u(e)){var n=t.on=t.on?I({},t.on):{};for(var r in e){var i=n[r],o=e[r];n[r]=i?[].concat(i,o):o}}else;return t}function We(t,e,n,r){e=e||{$stable:!n};for(var i=0;i<t.length;i++){var o=t[i];Array.isArray(o)?We(o,e,n):o&&(o.proxy&&(o.fn.proxy=!0),e[o.key]=o.fn)}return r&&(e.$key=r),e}function Ze(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"===typeof r&&r&&(t[e[n]]=e[n+1])}return t}function Xe(t,e){return"string"===typeof t?e+t:t}function Ye(t){t._o=Ue,t._n=m,t._s=f,t._l=Le,t._t=Re,t._q=L,t._i=R,t._m=Ve,t._f=je,t._k=Ne,t._b=$e,t._v=wt,t._e=xt,t._u=We,t._g=qe,t._d=Ze,t._p=Xe}function Ke(t,e,r,i,a){var s,l=this,c=a.options;b(i,"_uid")?(s=Object.create(i),s._original=i):(s=i,i=i._original);var u=o(c._compiled),h=!u;this.data=t,this.props=e,this.children=r,this.parent=i,this.listeners=t.on||n,this.injections=Ae(c.inject,i),this.slots=function(){return l.$slots||De(t.scopedSlots,l.$slots=Ie(r,i)),l.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return De(t.scopedSlots,this.slots())}}),u&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=De(t.scopedSlots,this.$slots)),c._scopeId?this._c=function(t,e,n,r){var o=hn(s,t,e,n,r,h);return o&&!Array.isArray(o)&&(o.fnScopeId=c._scopeId,o.fnContext=i),o}:this._c=function(t,e,n,r){return hn(s,t,e,n,r,h)}}function Je(t,e,r,o,a){var s=t.options,l={},c=s.props;if(i(c))for(var u in c)l[u]=Yt(u,c,e||n);else i(r.attrs)&&tn(l,r.attrs),i(r.props)&&tn(l,r.props);var h=new Ke(r,l,a,o,t),d=s.render.call(null,h._c,h);if(d instanceof vt)return Qe(d,r,h.parent,s,h);if(Array.isArray(d)){for(var p=Ee(d)||[],f=new Array(p.length),m=0;m<p.length;m++)f[m]=Qe(p[m],r,h.parent,s,h);return f}}function Qe(t,e,n,r,i){var o=St(t);return o.fnContext=n,o.fnOptions=r,e.slot&&((o.data||(o.data={})).slot=e.slot),o}function tn(t,e){for(var n in e)t[S(n)]=e[n]}Ye(Ke.prototype);var en={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;en.prepatch(n,n)}else{var r=t.componentInstance=on(t,An);r.$mount(e?t.elm:void 0,e)}},prepatch:function(t,e){var n=e.componentOptions,r=e.componentInstance=t.componentInstance;zn(r,n.propsData,n.listeners,e,n.children)},insert:function(t){var e=t.context,n=t.componentInstance;n._isMounted||(n._isMounted=!0,Fn(n,"mounted")),t.data.keepAlive&&(e._isMounted?Jn(n):Rn(n,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?jn(e,!0):e.$destroy())}},nn=Object.keys(en);function rn(t,e,n,a,s){if(!r(t)){var c=n.$options._base;if(l(t)&&(t=c.extend(t)),"function"===typeof t){var u;if(r(t.cid)&&(u=t,t=xn(u,c),void 0===t))return bn(u,e,n,a,s);e=e||{},xr(t),i(e.model)&&ln(t.options,e);var h=we(e,t,s);if(o(t.options.functional))return Je(t,h,e,n,a);var d=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var p=e.slot;e={},p&&(e.slot=p)}an(e);var f=t.options.name||s,m=new vt("vue-component-"+t.cid+(f?"-"+f:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:h,listeners:d,tag:s,children:a},u);return m}}}function on(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;return i(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new t.componentOptions.Ctor(n)}function an(t){for(var e=t.hook||(t.hook={}),n=0;n<nn.length;n++){var r=nn[n],i=e[r],o=en[r];i===o||i&&i._merged||(e[r]=i?sn(o,i):o)}}function sn(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}function ln(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[n]=e.model.value;var o=e.on||(e.on={}),a=o[r],s=e.model.callback;i(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[r]=[s].concat(a)):o[r]=s}var cn=1,un=2;function hn(t,e,n,r,i,a){return(Array.isArray(n)||s(n))&&(i=r,r=n,n=void 0),o(a)&&(i=un),dn(t,e,n,r,i)}function dn(t,e,n,r,o){if(i(n)&&i(n.__ob__))return xt();if(i(n)&&i(n.is)&&(e=n.is),!e)return xt();var a,s,l;(Array.isArray(r)&&"function"===typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),o===un?r=Ee(r):o===cn&&(r=Te(r)),"string"===typeof e)?(s=t.$vnode&&t.$vnode.ns||V.getTagNamespace(e),a=V.isReservedTag(e)?new vt(V.parsePlatformTagName(e),n,r,void 0,void 0,t):n&&n.pre||!i(l=Xt(t.$options,"components",e))?new vt(e,n,r,void 0,void 0,t):rn(l,n,t,r,e)):a=rn(e,n,t,r);return Array.isArray(a)?a:i(a)?(i(s)&&pn(a,s),i(n)&&fn(n),a):xt()}function pn(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),i(t.children))for(var a=0,s=t.children.length;a<s;a++){var l=t.children[a];i(l.tag)&&(r(l.ns)||o(n)&&"svg"!==l.tag)&&pn(l,e,n)}}function fn(t){l(t.style)&&ge(t.style),l(t.class)&&ge(t.class)}function mn(t){t._vnode=null,t._staticTrees=null;var e=t.$options,r=t.$vnode=e._parentVnode,i=r&&r.context;t.$slots=Ie(e._renderChildren,i),t.$scopedSlots=n,t._c=function(e,n,r,i){return hn(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return hn(t,e,n,r,i,!0)};var o=r&&r.data;Bt(t,"$attrs",o&&o.attrs||n,null,!0),Bt(t,"$listeners",e._parentListeners||n,null,!0)}var gn,yn=null;function _n(t){Ye(t.prototype),t.prototype.$nextTick=function(t){return fe(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,r=n.render,i=n._parentVnode;i&&(e.$scopedSlots=De(i.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=i;try{yn=e,t=r.call(e._renderProxy,e.$createElement)}catch(Sa){ee(Sa,e,"render"),t=e._vnode}finally{yn=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof vt||(t=xt()),t.parent=i,t}}
vendor: 22,390 bytes, line 14
14function vn(t,e){return(t.__esModule||dt&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function bn(t,e,n,r,i){var o=xt();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}function xn(t,e){if(o(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;var n=yn;if(n&&i(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n),o(t.loading)&&i(t.loadingComp))return t.loadingComp;if(n&&!i(t.owners)){var a=t.owners=[n],s=!0,c=null,u=null;n.$on("hook:destroyed",function(){return _(a,n)});var h=function(t){for(var e=0,n=a.length;e<n;e++)a[e].$forceUpdate();t&&(a.length=0,null!==c&&(clearTimeout(c),c=null),null!==u&&(clearTimeout(u),u=null))},d=j(function(n){t.resolved=vn(n,e),s?a.length=0:h(!0)}),f=j(function(e){i(t.errorComp)&&(t.error=!0,h(!0))}),m=t(d,f);return l(m)&&(p(m)?r(t.resolved)&&m.then(d,f):p(m.component)&&(m.component.then(d,f),i(m.error)&&(t.errorComp=vn(m.error,e)),i(m.loading)&&(t.loadingComp=vn(m.loading,e),0===m.delay?t.loading=!0:c=setTimeout(function(){c=null,r(t.resolved)&&r(t.error)&&(t.loading=!0,h(!1))},m.delay||200)),i(m.timeout)&&(u=setTimeout(function(){u=null,r(t.resolved)&&f(null)},m.timeout)))),s=!1,t.loading?t.loadingComp:t.resolved}}function wn(t){return t.isComment&&t.asyncFactory}function Sn(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(i(n)&&(i(n.componentOptions)||wn(n)))return n}}function Tn(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Pn(t,e)}function En(t,e){gn.$on(t,e)}function Cn(t,e){gn.$off(t,e)}function On(t,e){var n=gn;return function r(){var i=e.apply(null,arguments);null!==i&&n.$off(t,r)}}function Pn(t,e,n){gn=t,be(e,n||{},En,Cn,On,t),gn=void 0}function kn(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var i=0,o=t.length;i<o;i++)r.$on(t[i],n);else(r._events[t]||(r._events[t]=[])).push(n),e.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var r=0,i=t.length;r<i;r++)n.$off(t[r],e);return n}var o,a=n._events[t];if(!a)return n;if(!e)return n._events[t]=null,n;var s=a.length;while(s--)if(o=a[s],o===e||o.fn===e){a.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?A(n):n;for(var r=A(arguments,1),i='event handler for "'+t+'"',o=0,a=n.length;o<a;o++)ne(n[o],e,r,e,i)}return e}}var An=null;function In(t){var e=An;return An=t,function(){An=e}}function Mn(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){while(n.$options.abstract&&n.$parent)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function Dn(t){t.prototype._update=function(t,e){var n=this,r=n.$el,i=n._vnode,o=In(n);n._vnode=t,n.$el=i?n.__patch__(i,t):n.__patch__(n.$el,t,e,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Fn(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||_(e.$children,t),t._watcher&&t._watcher.teardown();var n=t._watchers.length;while(n--)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Fn(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}function Bn(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=xt),Fn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new nr(t,r,D,{before:function(){t._isMounted&&!t._isDestroyed&&Fn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,Fn(t,"mounted")),t}function zn(t,e,r,i,o){var a=i.data.scopedSlots,s=t.$scopedSlots,l=!!(a&&!a.$stable||s!==n&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),c=!!(o||t.$options._renderChildren||l);if(t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i),t.$options._renderChildren=o,t.$attrs=i.data.attrs||n,t.$listeners=r||n,e&&t.$options.props){kt(!1);for(var u=t._props,h=t.$options._propKeys||[],d=0;d<h.length;d++){var p=h[d],f=t.$options.props;u[p]=Yt(p,f,e,t)}kt(!0),t.$options.propsData=e}r=r||n;var m=t.$options._parentListeners;t.$options._parentListeners=r,Pn(t,r,m),c&&(t.$slots=Ie(o,i.context),t.$forceUpdate())}function Ln(t){while(t&&(t=t.$parent))if(t._inactive)return!0;return!1}function Rn(t,e){if(e){if(t._directInactive=!1,Ln(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Rn(t.$children[n]);Fn(t,"activated")}}function jn(t,e){if((!e||(t._directInactive=!0,!Ln(t)))&&!t._inactive){t._inactive=!0;for(var n=0;n<t.$children.length;n++)jn(t.$children[n]);Fn(t,"deactivated")}}function Fn(t,e){yt();var n=t.$options[e],r=e+" hook";if(n)for(var i=0,o=n.length;i<o;i++)ne(n[i],t,null,t,r);t._hasHookEvent&&t.$emit("hook:"+e),_t()}var Nn=[],$n=[],Vn={},Un=!1,Gn=!1,Hn=0;function qn(){Hn=Nn.length=$n.length=0,Vn={},Un=Gn=!1}var Wn=0,Zn=Date.now;if(Y&&!tt){var Xn=window.performance;Xn&&"function"===typeof Xn.now&&Zn()>document.createEvent("Event").timeStamp&&(Zn=function(){return Xn.now()})}function Yn(){var t,e;for(Wn=Zn(),Gn=!0,Nn.sort(function(t,e){return t.id-e.id}),Hn=0;Hn<Nn.length;Hn++)t=Nn[Hn],t.before&&t.before(),e=t.id,Vn[e]=null,t.run();var n=$n.slice(),r=Nn.slice();qn(),Qn(n),Kn(r),ct&&V.devtools&&ct.emit("flush")}function Kn(t){var e=t.length;while(e--){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Fn(r,"updated")}}function Jn(t){t._inactive=!1,$n.push(t)}function Qn(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Rn(t[e],!0)}function tr(t){var e=t.id;if(null==Vn[e]){if(Vn[e]=!0,Gn){var n=Nn.length-1;while(n>Hn&&Nn[n].id>t.id)n--;Nn.splice(n+1,0,t)}else Nn.push(t);Un||(Un=!0,fe(Yn))}}var er=0,nr=function(t,e,n,r,i){this.vm=t,i&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ht,this.newDepIds=new ht,this.expression="","function"===typeof e?this.getter=e:(this.getter=W(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var t;yt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Sa){if(!this.user)throw Sa;ee(Sa,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ge(t),_t(),this.cleanupDeps()}return t},nr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},nr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tr(this)},nr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(Sa){ee(Sa,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:D,set:D};function ir(t,e,n){rr.get=function(){return this[e][n]},rr.set=function(t){this[e][n]=t},Object.defineProperty(t,n,rr)}function or(t){t._watchers=[];var e=t.$options;e.props&&ar(t,e.props),e.methods&&fr(t,e.methods),e.data?sr(t):Dt(t._data={},!0),e.computed&&ur(t,e.computed),e.watch&&e.watch!==ot&&mr(t,e.watch)}function ar(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[],o=!t.$parent;o||kt(!1);var a=function(o){i.push(o);var a=Yt(o,e,n,t);Bt(r,o,a),o in t||ir(t,"_props",o)};for(var s in e)a(s);kt(!0)}function sr(t){var e=t.$options.data;e=t._data="function"===typeof e?lr(e,t):e||{},u(e)||(e={});var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);while(i--){var o=n[i];0,r&&b(r,o)||G(o)||ir(t,"_data",o)}Dt(e,!0)}function lr(t,e){yt();try{return t.call(e,e)}catch(Sa){return ee(Sa,e,"data()"),{}}finally{_t()}}var cr={lazy:!0};function ur(t,e){var n=t._computedWatchers=Object.create(null),r=lt();for(var i in e){var o=e[i],a="function"===typeof o?o:o.get;0,r||(n[i]=new nr(t,a||D,D,cr)),i in t||hr(t,i,o)}}function hr(t,e,n){var r=!lt();"function"===typeof n?(rr.get=r?dr(e):pr(n),rr.set=D):(rr.get=n.get?r&&!1!==n.cache?dr(e):pr(n.get):D,rr.set=n.set||D),Object.defineProperty(t,e,rr)}function dr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function pr(t){return function(){return t.call(this,this)}}function fr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?D:k(e[n],t)}function mr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)gr(t,n,r[i]);else gr(t,n,r)}}function gr(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"===typeof n&&(n=t[n]),t.$watch(e,n,r)}function yr(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=zt,t.prototype.$delete=Lt,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return gr(r,t,e,n);n=n||{},n.user=!0;var i=new nr(r,t,e,n);if(n.immediate)try{e.call(r,i.value)}catch(o){ee(o,r,'callback for immediate watcher "'+i.expression+'"')}return function(){i.teardown()}}}var _r=0;function vr(t){t.prototype._init=function(t){var e=this;e._uid=_r++,e._isVue=!0,t&&t._isComponent?br(e,t):e.$options=Zt(xr(e.constructor),t||{},e),e._renderProxy=e,e._self=e,Mn(e),Tn(e),mn(e),Fn(e,"beforeCreate"),ke(e),or(e),Pe(e),Fn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}function br(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}function xr(t){var e=t.options;if(t.super){var n=xr(t.super),r=t.superOptions;if(n!==r){t.superOptions=n;var i=wr(t);i&&I(t.extendOptions,i),e=t.options=Zt(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function wr(t){var e,n=t.options,r=t.sealedOptions;for(var i in n)n[i]!==r[i]&&(e||(e={}),e[i]=n[i]);return e}function Sr(t){this._init(t)}function Tr(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=A(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Er(t){t.mixin=function(t){return this.options=Zt(this.options,t),this}}function Cr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Zt(n.options,t),a["super"]=n,a.options.props&&Or(a),a.options.computed&&Pr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,N.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=I({},a.options),i[r]=a,a}}function Or(t){var e=t.options.props;for(var n in e)ir(t.prototype,"_props",n)}function Pr(t){var e=t.options.computed;for(var n in e)hr(t.prototype,n,e[n])}function kr(t){N.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Ar(t){return t&&(t.Ctor.options.name||t.tag)}function Ir(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!h(t)&&t.test(e)}function Mr(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Ar(a.componentOptions);s&&!e(s)&&Dr(n,o,r,i)}}}function Dr(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,_(n,e)}vr(Sr),yr(Sr),kn(Sr),Dn(Sr),_n(Sr);var Br=[String,RegExp,Array],zr={name:"keep-alive",abstract:!0,props:{include:Br,exclude:Br,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Dr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){Mr(t,function(t){return Ir(e,t)})}),this.$watch("exclude",function(e){Mr(t,function(t){return!Ir(e,t)})})},render:function(){var t=this.$slots.default,e=Sn(t),n=e&&e.componentOptions;if(n){var r=Ar(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!Ir(o,r))||a&&r&&Ir(a,r))return e;var s=this,l=s.cache,c=s.keys,u=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;l[u]?(e.componentInstance=l[u].componentInstance,_(c,u),c.push(u)):(l[u]=e,c.push(u),this.max&&c.length>parseInt(this.max)&&Dr(l,c[0],c,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Lr={KeepAlive:zr};function Rr(t){var e={get:function(){return V}};Object.defineProperty(t,"config",e),t.util={warn:pt,extend:I,mergeOptions:Zt,defineReactive:Bt},t.set=zt,t.delete=Lt,t.nextTick=fe,t.observable=function(t){return Dt(t),t},t.options=Object.create(null),N.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,I(t.options.components,Lr),Tr(t),Er(t),Cr(t),kr(t)}Rr(Sr),Object.defineProperty(Sr.prototype,"$isServer",{get:lt}),Object.defineProperty(Sr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Sr,"FunctionalRenderContext",{value:Ke}),Sr.version="2.6.10";var jr=g("style,class"),Fr=g("input,textarea,option,select,progress"),Nr=function(t,e,n){return"value"===n&&Fr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},$r=g("contenteditable,draggable,spellcheck"),Vr=g("events,caret,typing,plaintext-only"),Ur=function(t,e){return Zr(e)||"false"===e?"false":"contenteditable"===t&&Vr(e)?e:"true"},Gr=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Hr="http://www.w3.org/1999/xlink",qr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Wr=function(t){return qr(t)?t.slice(6,t.length):""},Zr=function(t){return null==t||!1===t};function Xr(t){var e=t.data,n=t,r=t;while(i(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Yr(r.data,e));while(i(n=n.parent))n&&n.data&&(e=Yr(e,n.data));return Kr(e.staticClass,e.class)}function Yr(t,e){return{staticClass:Jr(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Kr(t,e){return i(t)||i(e)?Jr(t,Qr(e)):""}function Jr(t,e){return t?e?t+" "+e:t:e||""}function Qr(t){return Array.isArray(t)?ti(t):l(t)?ei(t):"string"===typeof t?t:""}function ti(t){for(var e,n="",r=0,o=t.length;r<o;r++)i(e=Qr(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}function ei(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}var ni={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},ri=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ii=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),oi=function(t){return ri(t)||ii(t)};function ai(t){return ii(t)?"svg":"math"===t?"math":void 0}var si=Object.create(null);function li(t){if(!Y)return!0;if(oi(t))return!1;if(t=t.toLowerCase(),null!=si[t])return si[t];var e=document.createElement(t);return t.indexOf("-")>-1?si[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:si[t]=/HTMLUnknownElement/.test(e.toString())}var ci=g("text,number,password,search,email,tel,url");function ui(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function hi(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function di(t,e){return document.createElementNS(ni[t],e)}function pi(t){return document.createTextNode(t)}function fi(t){return document.createComment(t)}function mi(t,e,n){t.insertBefore(e,n)}function gi(t,e){t.removeChild(e)}function yi(t,e){t.appendChild(e)}function _i(t){return t.parentNode}function vi(t){return t.nextSibling}function bi(t){return t.tagName}function xi(t,e){t.textContent=e}function wi(t,e){t.setAttribute(e,"")}var Si=Object.freeze({createElement:hi,createElementNS:di,createTextNode:pi,createComment:fi,insertBefore:mi,removeChild:gi,appendChild:yi,parentNode:_i,nextSibling:vi,tagName:bi,setTextContent:xi,setStyleScope:wi}),Ti={create:function(t,e){Ei(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Ei(t,!0),Ei(e))},destroy:function(t){Ei(t,!0)}};function Ei(t,e){var n=t.data.ref;if(i(n)){var r=t.context,o=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?_(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}var Ci=new vt("",{},[]),Oi=["create","activate","update","remove","destroy"];function Pi(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&ki(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function ki(t,e){if("input"!==t.tag)return!0;var n,r=i(n=t.data)&&i(n=n.attrs)&&n.type,o=i(n=e.data)&&i(n=n.attrs)&&n.type;return r===o||ci(r)&&ci(o)}function Ai(t,e,n){var r,o,a={};for(r=e;r<=n;++r)o=t[r].key,i(o)&&(a[o]=r);return a}function Ii(t){var e,n,a={},l=t.modules,c=t.nodeOps;for(e=0;e<Oi.length;++e)for(a[Oi[e]]=[],n=0;n<l.length;++n)i(l[n][Oi[e]])&&a[Oi[e]].push(l[n][Oi[e]]);function u(t){return new vt(c.tagName(t).toLowerCase(),{},[],void 0,t)}function h(t,e){function n(){0===--n.listeners&&d(t)}return n.listeners=e,n}function d(t){var e=c.parentNode(t);i(e)&&c.removeChild(e,t)}function p(t,e,n,r,a,s,l){if(i(t.elm)&&i(s)&&(t=s[l]=St(t)),t.isRootInsert=!a,!f(t,e,n,r)){var u=t.data,h=t.children,d=t.tag;i(d)?(t.elm=t.ns?c.createElementNS(t.ns,d):c.createElement(d,t),w(t),v(t,h,e),i(u)&&x(t,e),_(n,t.elm,r)):o(t.isComment)?(t.elm=c.createComment(t.text),_(n,t.elm,r)):(t.elm=c.createTextNode(t.text),_(n,t.elm,r))}}function f(t,e,n,r){var a=t.data;if(i(a)){var s=i(t.componentInstance)&&a.keepAlive;if(i(a=a.hook)&&i(a=a.init)&&a(t,!1),i(t.componentInstance))return m(t,e),_(n,t.elm,r),o(s)&&y(t,e,n,r),!0}}function m(t,e){i(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,b(t)?(x(t,e),w(t)):(Ei(t),e.push(t))}function y(t,e,n,r){var o,s=t;while(s.componentInstance)if(s=s.componentInstance._vnode,i(o=s.data)&&i(o=o.transition)){for(o=0;o<a.activate.length;++o)a.activate[o](Ci,s);e.push(s);break}_(n,t.elm,r)}function _(t,e,n){i(t)&&(i(n)?c.parentNode(n)===t&&c.insertBefore(t,e,n):c.appendChild(t,e))}function v(t,e,n){if(Array.isArray(e)){0;for(var r=0;r<e.length;++r)p(e[r],n,t.elm,null,!0,e,r)}else s(t.text)&&c.appendChild(t.elm,c.createTextNode(String(t.text)))}function b(t){while(t.componentInstance)t=t.componentInstance._vnode;return i(t.tag)}function x(t,n){for(var r=0;r<a.create.length;++r)a.create[r](Ci,t);e=t.data.hook,i(e)&&(i(e.create)&&e.create(Ci,t),i(e.insert)&&n.push(t))}function w(t){var e;if(i(e=t.fnScopeId))c.setStyleScope(t.elm,e);else{var n=t;while(n)i(e=n.context)&&i(e=e.$options._scopeId)&&c.setStyleScope(t.elm,e),n=n.parent}i(e=An)&&e!==t.context&&e!==t.fnContext&&i(e=e.$options._scopeId)&&c.setStyleScope(t.elm,e)}function S(t,e,n,r,i,o){for(;r<=i;++r)p(n[r],o,t,e,!1,n,r)}function T(t){var e,n,r=t.data;if(i(r))for(i(e=r.hook)&&i(e=e.destroy)&&e(t),e=0;e<a.destroy.length;++e)a.destroy[e](t);if(i(e=t.children))for(n=0;n<t.children.length;++n)T(t.children[n])}function E(t,e,n,r){for(;n<=r;++n){var o=e[n];i(o)&&(i(o.tag)?(C(o),T(o)):d(o.elm))}}function C(t,e){if(i(e)||i(t.data)){var n,r=a.remove.length+1;for(i(e)?e.listeners+=r:e=h(t.elm,r),i(n=t.componentInstance)&&i(n=n._vnode)&&i(n.data)&&C(n,e),n=0;n<a.remove.length;++n)a.remove[n](t,e);i(n=t.data.hook)&&i(n=n.remove)?n(t,e):e()}else d(t.elm)}function O(t,e,n,o,a){var s,l,u,h,d=0,f=0,m=e.length-1,g=e[0],y=e[m],_=n.length-1,v=n[0],b=n[_],x=!a;while(d<=m&&f<=_)r(g)?g=e[++d]:r(y)?y=e[--m]:Pi(g,v)?(k(g,v,o,n,f),g=e[++d],v=n[++f]):Pi(y,b)?(k(y,b,o,n,_),y=e[--m],b=n[--_]):Pi(g,b)?(k(g,b,o,n,_),x&&c.insertBefore(t,g.elm,c.nextSibling(y.elm)),g=e[++d],b=n[--_]):Pi(y,v)?(k(y,v,o,n,f),x&&
vendor: 3,745 bytes, line 14
14c.insertBefore(t,y.elm,g.elm),y=e[--m],v=n[++f]):(r(s)&&(s=Ai(e,d,m)),l=i(v.key)?s[v.key]:P(v,e,d,m),r(l)?p(v,o,t,g.elm,!1,n,f):(u=e[l],Pi(u,v)?(k(u,v,o,n,f),e[l]=void 0,x&&c.insertBefore(t,u.elm,g.elm)):p(v,o,t,g.elm,!1,n,f)),v=n[++f]);d>m?(h=r(n[_+1])?null:n[_+1].elm,S(t,h,n,f,_,o)):f>_&&E(t,e,d,m)}function P(t,e,n,r){for(var o=n;o<r;o++){var a=e[o];if(i(a)&&Pi(t,a))return o}}function k(t,e,n,s,l,u){if(t!==e){i(e.elm)&&i(s)&&(e=s[l]=St(e));var h=e.elm=t.elm;if(o(t.isAsyncPlaceholder))i(e.asyncFactory.resolved)?M(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var d,p=e.data;i(p)&&i(d=p.hook)&&i(d=d.prepatch)&&d(t,e);var f=t.children,m=e.children;if(i(p)&&b(e)){for(d=0;d<a.update.length;++d)a.update[d](t,e);i(d=p.hook)&&i(d=d.update)&&d(t,e)}r(e.text)?i(f)&&i(m)?f!==m&&O(h,f,m,n,u):i(m)?(i(t.text)&&c.setTextContent(h,""),S(h,null,m,0,m.length-1,n)):i(f)?E(h,f,0,f.length-1):i(t.text)&&c.setTextContent(h,""):t.text!==e.text&&c.setTextContent(h,e.text),i(p)&&i(d=p.hook)&&i(d=d.postpatch)&&d(t,e)}}}function A(t,e,n){if(o(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}var I=g("attrs,class,staticClass,staticStyle,key");function M(t,e,n,r){var a,s=e.tag,l=e.data,c=e.children;if(r=r||l&&l.pre,e.elm=t,o(e.isComment)&&i(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(i(l)&&(i(a=l.hook)&&i(a=a.init)&&a(e,!0),i(a=e.componentInstance)))return m(e,n),!0;if(i(s)){if(i(c))if(t.hasChildNodes())if(i(a=l)&&i(a=a.domProps)&&i(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var u=!0,h=t.firstChild,d=0;d<c.length;d++){if(!h||!M(h,c[d],n,r)){u=!1;break}h=h.nextSibling}if(!u||h)return!1}else v(e,c,n);if(i(l)){var p=!1;for(var f in l)if(!I(f)){p=!0,x(e,n);break}!p&&l["class"]&&ge(l["class"])}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,s){if(!r(e)){var l=!1,h=[];if(r(t))l=!0,p(e,h);else{var d=i(t.nodeType);if(!d&&Pi(t,e))k(t,e,h,null,null,s);else{if(d){if(1===t.nodeType&&t.hasAttribute(F)&&(t.removeAttribute(F),n=!0),o(n)&&M(t,e,h))return A(e,h,!0),t;t=u(t)}var f=t.elm,m=c.parentNode(f);if(p(e,h,f._leaveCb?null:m,c.nextSibling(f)),i(e.parent)){var g=e.parent,y=b(e);while(g){for(var _=0;_<a.destroy.length;++_)a.destroy[_](g);if(g.elm=e.elm,y){for(var v=0;v<a.create.length;++v)a.create[v](Ci,g);var x=g.data.hook.insert;if(x.merged)for(var w=1;w<x.fns.length;w++)x.fns[w]()}else Ei(g);g=g.parent}}i(m)?E(m,[t],0,0):i(t.tag)&&T(t)}}return A(e,h,l),e.elm}i(t)&&T(t)}}var Mi={create:Di,update:Di,destroy:function(t){Di(t,Ci)}};function Di(t,e){(t.data.directives||e.data.directives)&&Bi(t,e)}function Bi(t,e){var n,r,i,o=t===Ci,a=e===Ci,s=Li(t.data.directives,t.context),l=Li(e.data.directives,e.context),c=[],u=[];for(n in l)r=s[n],i=l[n],r?(i.oldValue=r.value,i.oldArg=r.arg,ji(i,"update",e,t),i.def&&i.def.componentUpdated&&u.push(i)):(ji(i,"bind",e,t),i.def&&i.def.inserted&&c.push(i));if(c.length){var h=function(){for(var n=0;n<c.length;n++)ji(c[n],"inserted",e,t)};o?xe(e,"insert",h):h()}if(u.length&&xe(e,"postpatch",function(){for(var n=0;n<u.length;n++)ji(u[n],"componentUpdated",e,t)}),!o)for(n in s)l[n]||ji(s[n],"unbind",t,t,a)}var zi=Object.create(null);function Li(t,e){var n,r,i=Object.create(null);if(!t)return i;for(n=0;n<t.length;n++)r=t[n],r.modifiers||(r.modifiers=zi),i[Ri(r)]=r,r.def=Xt(e.$options,"directives",r.name,!0);return i}function Ri(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function ji(t,e,n,r,i){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,r,i)}catch(Sa){ee(Sa,n.context,"directive "+t.name+" "+e+" hook")}}var Fi=[Ti,Mi];function Ni(t,e){var n=e.componentOptions;
vendor: 4,557 bytes, line 14
14if((!i(n)||!1!==n.Ctor.options.inheritAttrs)&&(!r(t.data.attrs)||!r(e.data.attrs))){var o,a,s,l=e.elm,c=t.data.attrs||{},u=e.data.attrs||{};for(o in i(u.__ob__)&&(u=e.data.attrs=I({},u)),u)a=u[o],s=c[o],s!==a&&$i(l,o,a);for(o in(tt||nt)&&u.value!==c.value&&$i(l,"value",u.value),c)r(u[o])&&(qr(o)?l.removeAttributeNS(Hr,Wr(o)):$r(o)||l.removeAttribute(o))}}function $i(t,e,n){t.tagName.indexOf("-")>-1?Vi(t,e,n):Gr(e)?Zr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):$r(e)?t.setAttribute(e,Ur(e,n)):qr(e)?Zr(n)?t.removeAttributeNS(Hr,Wr(e)):t.setAttributeNS(Hr,e,n):Vi(t,e,n)}function Vi(t,e,n){if(Zr(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Ui={create:Ni,update:Ni};function Gi(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Xr(e),l=n._transitionClasses;i(l)&&(s=Jr(s,Qr(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Hi,qi={create:Gi,update:Gi},Wi="__r",Zi="__c";function Xi(t){if(i(t[Wi])){var e=tt?"change":"input";t[e]=[].concat(t[Wi],t[e]||[]),delete t[Wi]}i(t[Zi])&&(t.change=[].concat(t[Zi],t.change||[]),delete t[Zi])}function Yi(t,e,n){var r=Hi;return function i(){var o=e.apply(null,arguments);null!==o&&Qi(t,i,n,r)}}var Ki=ae&&!(it&&Number(it[1])<=53);function Ji(t,e,n,r){if(Ki){var i=Wn,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}Hi.addEventListener(t,e,at?{capture:n,passive:r}:n)}function Qi(t,e,n,r){(r||Hi).removeEventListener(t,e._wrapper||e,n)}function to(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};Hi=e.elm,Xi(n),be(n,i,Ji,Qi,Yi,e.context),Hi=void 0}}var eo,no={create:to,update:to};function ro(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};for(n in i(l.__ob__)&&(l=e.data.domProps=I({},l)),s)n in l||(a[n]="");for(n in l){if(o=l[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=o;var c=r(o)?"":String(o);io(a,c)&&(a.value=c)}else if("innerHTML"===n&&ii(a.tagName)&&r(a.innerHTML)){eo=eo||document.createElement("div"),eo.innerHTML="<svg>"+o+"</svg>";var u=eo.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(u.firstChild)a.appendChild(u.firstChild)}else if(o!==s[n])try{a[n]=o}catch(Sa){}}}}function io(t,e){return!t.composing&&("OPTION"===t.tagName||oo(t,e)||ao(t,e))}function oo(t,e){var n=!0;try{n=document.activeElement!==t}catch(Sa){}return n&&t.value!==e}function ao(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.number)return m(n)!==m(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var so={create:ro,update:ro},lo=x(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e});function co(t){var e=uo(t.style);return t.staticStyle?I(t.staticStyle,e):e}function uo(t){return Array.isArray(t)?M(t):"string"===typeof t?lo(t):t}function ho(t,e){var n,r={};if(e){var i=t;while(i.componentInstance)i=i.componentInstance._vnode,i&&i.data&&(n=co(i.data))&&I(r,n)}(n=co(t.data))&&I(r,n);var o=t;while(o=o.parent)o.data&&(n=co(o.data))&&I(r,n);return r}var po,fo=/^--/,mo=/\s*!important$/,go=function(t,e,n){if(fo.test(e))t.style.setProperty(e,n);else if(mo.test(n))t.style.setProperty(C(e),n.replace(mo,""),"important");else{var r=_o(e);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)t.style[r]=n[i];else t.style[r]=n}},yo=["Webkit","Moz","ms"],_o=x(function(t){if(po=po||document.createElement("div").style,t=S(t),"filter"!==t&&t in po)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<yo.length;n++){var r=yo[n]+e;if(r in po)return r}});function vo(t,e){var n=e.data,o=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(o.staticStyle)&&r(o.style))){var a,s,l=e.elm,c=o.staticStyle,u=o.normalizedStyle||o.style||{},h=c||u,d=uo(e.data.style)||{};e.data.normalizedStyle=i(d.__ob__)?I({},d):d;var p=ho(e,!0);for(s in h)r(p[s])&&go(l,s,"");for(s in p)a=p[s],a!==h[s]&&go(l,s,null==a?"":a)}}var bo={create:vo,update:vo},xo=/\s+/;function wo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>
vendor: 11,534 bytes, lines 14-24
14-1?e.split(xo).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function So(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(xo).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function To(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&I(e,Eo(t.name||"v")),I(e,t),e}return"string"===typeof t?Eo(t):void 0}}var Eo=x(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),Co=Y&&!et,Oo="transition",Po="animation",ko="transition",Ao="transitionend",Io="animation",Mo="animationend";Co&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ko="WebkitTransition",Ao="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Io="WebkitAnimation",Mo="webkitAnimationEnd"));var Do=Y?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Bo(t){Do(function(){Do(t)})}function zo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),wo(t,e))}function Lo(t,e){t._transitionClasses&&_(t._transitionClasses,e),So(t,e)}function Ro(t,e,n){var r=Fo(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Oo?Ao:Mo,l=0,c=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++l>=a&&c()};setTimeout(function(){l<a&&c()},o+1),t.addEventListener(s,u)}var jo=/\b(transform|all)(,|$)/;function Fo(t,e){var n,r=window.getComputedStyle(t),i=(r[ko+"Delay"]||"").split(", "),o=(r[ko+"Duration"]||"").split(", "),a=No(i,o),s=(r[Io+"Delay"]||"").split(", "),l=(r[Io+"Duration"]||"").split(", "),c=No(s,l),u=0,h=0;e===Oo?a>0&&(n=Oo,u=a,h=o.length):e===Po?c>0&&(n=Po,u=c,h=l.length):(u=Math.max(a,c),n=u>0?a>c?Oo:Po:null,h=n?n===Oo?o.length:l.length:0);var d=n===Oo&&jo.test(r[ko+"Property"]);return{type:n,timeout:u,propCount:h,hasTransform:d}}function No(t,e){while(t.length<e.length)t=t.concat(t);return Math.max.apply(null,e.map(function(e,n){return $o(e)+$o(t[n])}))}function $o(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Vo(t,e){var n=t.elm;i(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var o=To(t.data.transition);if(!r(o)&&!i(n._enterCb)&&1===n.nodeType){var a=o.css,s=o.type,c=o.enterClass,u=o.enterToClass,h=o.enterActiveClass,d=o.appearClass,p=o.appearToClass,f=o.appearActiveClass,g=o.beforeEnter,y=o.enter,_=o.afterEnter,v=o.enterCancelled,b=o.beforeAppear,x=o.appear,w=o.afterAppear,S=o.appearCancelled,T=o.duration,E=An,C=An.$vnode;while(C&&C.parent)E=C.context,C=C.parent;var O=!E._isMounted||!t.isRootInsert;if(!O||x||""===x){var P=O&&d?d:c,k=O&&f?f:h,A=O&&p?p:u,I=O&&b||g,M=O&&"function"===typeof x?x:y,D=O&&w||_,B=O&&S||v,z=m(l(T)?T.enter:T);0;var L=!1!==a&&!et,R=Ho(M),F=n._enterCb=j(function(){L&&(Lo(n,A),Lo(n,k)),F.cancelled?(L&&Lo(n,P),B&&B(n)):D&&D(n),n._enterCb=null});t.data.show||xe(t,"insert",function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),M&&M(n,F)}),I&&I(n),L&&(zo(n,P),zo(n,k),Bo(function(){Lo(n,P),F.cancelled||(zo(n,A),R||(Go(z)?setTimeout(F,z):Ro(n,s,F)))})),t.data.show&&(e&&e(),M&&M(n,F)),L||R||F()}}}function Uo(t,e){var n=t.elm;i(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var o=To(t.data.transition);if(r(o)||1!==n.nodeType)return e();if(!i(n._leaveCb)){var a=o.css,s=o.type,c=o.leaveClass,u=o.leaveToClass,h=o.leaveActiveClass,d=o.beforeLeave,p=o.leave,f=o.afterLeave,g=o.leaveCancelled,y=o.delayLeave,_=o.duration,v=!1!==a&&!et,b=Ho(p),x=m(l(_)?_.leave:_);0;var w=n._leaveCb=j(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),v&&(Lo(n,u),Lo(n,h)),w.cancelled?(v&&Lo(n,c),g&&g(n)):(e(),f&&f(n)),n._leaveCb=null});y?y(S):S()}function S(){w.cancelled||(!t.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),d&&d(n),v&&(zo(n,c),zo(n,h),Bo(function(){Lo(n,c),w.cancelled||(zo(n,u),b||(Go(x)?setTimeout(w,x):Ro(n,s,w)))})),p&&p(n,w),v||b||w())}}function Go(t){return"number"===typeof t&&!isNaN(t)}function Ho(t){if(r(t))return!1;var e=t.fns;return i(e)?Ho(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function qo(t,e){!0!==e.data.show&&Vo(e)}var Wo=Y?{create:qo,activate:qo,remove:function(t,e){!0!==t.data.show?Uo(t,e):e()}}:{},Zo=[Ui,qi,no,so,bo,Wo],Xo=Zo.concat(Fi),Yo=Ii({nodeOps:Si,modules:Xo});et&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&ia(t,"input")});var Ko={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?xe(n,"postpatch",function(){Ko.componentUpdated(t,e,n)}):Jo(t,e,n.context),t._vOptions=[].map.call(t.options,ea)):("textarea"===n.tag||ci(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",na),t.addEventListener("compositionend",ra),t.addEventListener("change",ra),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Jo(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,ea);if(i.some(function(t,e){return!L(t,r[e])})){var o=t.multiple?e.value.some(function(t){return ta(t,i)}):e.value!==e.oldValue&&ta(e.value,i);o&&ia(t,"change")}}}};function Jo(t,e,n){Qo(t,e,n),(tt||nt)&&setTimeout(function(){Qo(t,e,n)},0)}function Qo(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,l=t.options.length;s<l;s++)if(a=t.options[s],i)o=R(r,ea(a))>-1,a.selected!==o&&(a.selected=o);else if(L(ea(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function ta(t,e){return e.every(function(e){return!L(e,t)})}function ea(t){return"_value"in t?t._value:t.value}function na(t){t.target.composing=!0}function ra(t){t.target.composing&&(t.target.composing=!1,ia(t.target,"input"))}function ia(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function oa(t){return!t.componentInstance||t.data&&t.data.transition?t:oa(t.componentInstance._vnode)}var aa={bind:function(t,e,n){var r=e.value;n=oa(n);var i=n.data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,Vo(n,function(){t.style.display=o})):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value,i=e.oldValue;if(!r!==!i){n=oa(n);var o=n.data&&n.data.transition;o?(n.data.show=!0,r?Vo(n,function(){t.style.display=t.__vOriginalDisplay}):Uo(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}},sa={model:Ko,show:aa},la={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ca(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ca(Sn(e.children)):t}function ua(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[S(o)]=i[o];return e}function ha(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function da(t){while(t=t.parent)if(t.data.transition)return!0}function pa(t,e){return e.key===t.key&&e.tag===t.tag}var fa=function(t){return t.tag||wn(t)},ma=function(t){return"show"===t.name},ga={name:"transition",props:la,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(fa),n.length)){0;var r=this.mode;0;var i=n[0];if(da(this.$vnode))return i;var o=ca(i);if(!o)return i;if(this._leaving)return ha(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=ua(this),c=this._vnode,u=ca(c);if(o.data.directives&&o.data.directives.some(ma)&&(o.data.show=!0),u&&u.data&&!pa(o,u)&&!wn(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var h=u.data.transition=I({},l);if("out-in"===r)return this._leaving=!0,xe(h,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),ha(t,i);if("in-out"===r){if(wn(o))return c;var d,p=function(){d()};xe(l,"afterEnter",p),xe(l,"enterCancelled",p),xe(h,"delayLeave",function(t){d=t})}}return i}}},ya=I({tag:String,moveClass:String},la);delete ya.mode;var _a={props:ya,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=In(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=ua(this),s=0;s<i.length;s++){var l=i[s];if(l.tag)if(null!=l.key&&0!==String(l.key).indexOf("__vlist"))o.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a;else;}if(r){for(var c=[],u=[],h=0;h<r.length;h++){var d=r[h];d.data.transition=a,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?c.push(d):u.push(d)}this.kept=t(e,null,c),this.removed=u}return t(e,null,o)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(va),t.forEach(ba),t.forEach(xa),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var n=t.elm,r=n.style;zo(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ao,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ao,t),n._moveCb=null,Lo(n,e))})}}))},methods:{hasMove:function(t,e){if(!Co)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){So(n,t)}),wo(n,e),n.style.display="none",this.$el.appendChild(n);var r=Fo(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function va(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function ba(t){t.data.newPos=t.elm.getBoundingClientRect()}function xa(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}var wa={Transition:ga,TransitionGroup:_a};Sr.config.mustUseProp=Nr,Sr.config.isReservedTag=oi,Sr.config.isReservedAttr=jr,Sr.config.getTagNamespace=ai,Sr.config.isUnknownElement=li,I(Sr.options.directives,sa),I(Sr.options.components,wa),Sr.prototype.__patch__=Y?Yo:D,Sr.prototype.$mount=function(t,e){return t=t&&Y?ui(t):void 0,Bn(this,t,e)},Y&&setTimeout(function(){V.devtools&&ct&&ct.emit("init",Sr)},0),e["default"]=Sr}.call(this,n("c8ba"))},"2b4c":function(t,e,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},"2b88":function(t,e,n){"use strict";
15/*! 
16  * portal-vue © Thorsten Lünborg, 2019 
17  * 
18  * Version: 2.1.7
19  * 
20  * LICENCE: MIT 
21  * 
22  * https://github.com/linusborg/portal-vue
23  * 
24 */function r(t){return t&&"object"===typeof t&&"default"in t?t["default"]:t}
vendor: 9,127 bytes, lines 24-32
24Object.defineProperty(e,"__esModule",{value:!0});var i=r(n("2b0e"));function o(t){return o="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},o(t)}function a(t){return s(t)||l(t)||c()}function s(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function l(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var u="undefined"!==typeof window;function h(t){return Array.isArray(t)||"object"===o(t)?Object.freeze(t):t}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.reduce(function(t,n){var r=n.passengers[0],i="function"===typeof r?r(e):n.passengers;return t.concat(i)},[])}function p(t,e){return t.map(function(t,e){return[e,t]}).sort(function(t,n){return e(t[1],n[1])||t[0]-n[0]}).map(function(t){return t[1]})}function f(t,e){return e.reduce(function(e,n){return t.hasOwnProperty(n)&&(e[n]=t[n]),e},{})}var m={},g={},y={},_=i.extend({data:function(){return{transports:m,targets:g,sources:y,trackInstances:u}},methods:{open:function(t){if(u){var e=t.to,n=t.from,r=t.passengers,o=t.order,a=void 0===o?1/0:o;if(e&&n&&r){var s={to:e,from:n,passengers:h(r),order:a},l=Object.keys(this.transports);-1===l.indexOf(e)&&i.set(this.transports,e,[]);var c=this.$_getTransportIndex(s),d=this.transports[e].slice(0);-1===c?d.push(s):d[c]=s,this.transports[e]=p(d,function(t,e){return t.order-e.order})}}},close:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.to,r=t.from;if(n&&(r||!1!==e)&&this.transports[n])if(e)this.transports[n]=[];else{var i=this.$_getTransportIndex(t);if(i>=0){var o=this.transports[n].slice(0);o.splice(i,1),this.transports[n]=o}}},registerTarget:function(t,e,n){u&&(this.trackInstances&&!n&&this.targets[t]&&console.warn("[portal-vue]: Target ".concat(t," already exists")),this.$set(this.targets,t,Object.freeze([e])))},unregisterTarget:function(t){this.$delete(this.targets,t)},registerSource:function(t,e,n){u&&(this.trackInstances&&!n&&this.sources[t]&&console.warn("[portal-vue]: source ".concat(t," already exists")),this.$set(this.sources,t,Object.freeze([e])))},unregisterSource:function(t){this.$delete(this.sources,t)},hasTarget:function(t){return!(!this.targets[t]||!this.targets[t][0])},hasSource:function(t){return!(!this.sources[t]||!this.sources[t][0])},hasContentFor:function(t){return!!this.transports[t]&&!!this.transports[t].length},$_getTransportIndex:function(t){var e=t.to,n=t.from;for(var r in this.transports[e])if(this.transports[e][r].from===n)return+r;return-1}}}),v=new _(m),b=1,x=i.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(b++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var t=this;this.$nextTick(function(){v.registerSource(t.name,t)})},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){v.unregisterSource(this.name),this.clear()},watch:{to:function(t,e){e&&e!==t&&this.clear(e),this.sendUpdate()}},methods:{clear:function(t){var e={from:this.name,to:t||this.to};v.close(e)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(t){return"function"===typeof t?t(this.slotProps):t},sendUpdate:function(){var t=this.normalizeSlots();if(t){var e={from:this.name,to:this.to,passengers:a(t),order:this.order};v.open(e)}else this.clear()}},render:function(t){var e=this.$slots.default||this.$scopedSlots.default||[],n=this.tag;return e&&this.disabled?e.length<=1&&this.slim?this.normalizeOwnChildren(e)[0]:t(n,[this.normalizeOwnChildren(e)]):this.slim?t():t(n,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),w=i.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:v.transports,firstRender:!0}},created:function(){var t=this;this.$nextTick(function(){v.registerTarget(t.name,t)})},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(t,e){v.unregisterTarget(e),v.registerTarget(t,this)}},mounted:function(){var t=this;this.transition&&this.$nextTick(function(){t.firstRender=!1})},beforeDestroy:function(){v.unregisterTarget(this.name)},computed:{ownTransports:function(){var t=this.transports[this.name]||[];return this.multiple?t:0===t.length?[]:[t[t.length-1]]},passengers:function(){return d(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var t=this.slim&&!this.transition;return t&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),t}},render:function(t){var e=this.noWrapper(),n=this.children(),r=this.transition||this.tag;return e?n[0]:this.slim&&!r?t():t(r,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},n)}}),S=0,T=["disabled","name","order","slim","slotProps","tag","to"],E=["multiple","transition"],C=i.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(S++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!==typeof document){var t=document.querySelector(this.mountTo);if(t){var e=this.$props;if(v.targets[e.name])e.bail?console.warn("[portal-vue]: Target ".concat(e.name," is already mounted.\n        Aborting because 'bail: true' is set")):this.portalTarget=v.targets[e.name];else{var n=e.append;if(n){var r="string"===typeof n?n:"DIV",i=document.createElement(r);t.appendChild(i),t=i}var o=f(this.$props,E);o.slim=this.targetSlim,o.tag=this.targetTag,o.slotProps=this.targetSlotProps,o.name=this.to,this.portalTarget=new w({el:t,parent:this.$parent||this,propsData:o})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var t=this.portalTarget;if(this.append){var e=t.$el;e.parentNode.removeChild(e)}t.$destroy()},render:function(t){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),t();if(!this.$scopedSlots.manual){var e=f(this.$props,T);return t(x,{props:e,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var n=this.$scopedSlots.manual({to:this.to});return Array.isArray(n)&&(n=n[0]),n||t()}});function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.portalName||"Portal",x),t.component(e.portalTargetName||"PortalTarget",w),t.component(e.MountingPortalName||"MountingPortal",C)}var P={install:O};e.default=P,e.Portal=x,e.PortalTarget=w,e.MountingPortal=C,e.Wormhole=v},"2d00":function(t,e){t.exports=!1},"2d5c":function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},"2d7d":function(t,e,n){t.exports=n("5037")},"2d83":function(t,e,n){"use strict";var r=n("387f");t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2dd8":function(t,e,n){},"2e67":function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},"2ef0":function(t,e,n){(function(t,r){var i;
25/**
26 * @license
27 * Lodash <https://lodash.com/>
28 * Copyright JS Foundation and other contributors <https://js.foundation/>
29 * Released under MIT license <https://lodash.com/license>
30 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
31 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
32 */(function(){var o,a="4.17.11",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,f=2,m=4,g
32=1,y=2,_=1,v=2,b=4,x=8,w=16,S=32,T=64,E=128,C=256,O=512,P=30,k="...",A=800,I=16,M=1,D=2,B=3,z=1/0,L=9007199254740991,R=1.7976931348623157e308,j=NaN,F=4294967295,N=F-1,$=F>>>1,V=[["ary",E],["bind",_],["bindKey",v],["curry",x],["curryRight",w],["flip",O],["partial",S],["partialRight",T],["rearg",C]],U="[object Arguments]",G="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",W="[object Date]",Z="[object DOMException]",X="[object Error]",Y="[object Function]",K="[object GeneratorFunction]",J="[object Map]",Q="[object Number]",tt="[object Null]",et="[object Object]",nt="[object Promise]",rt="[object Proxy]",it="[object RegExp]",ot="[object Set]",at="[object String]",st="[object Symbol]",lt="[object Undefined]",ct="[object WeakMap]",ut="[object WeakSet]",ht="[object ArrayBuffer]",dt="[object DataView]",pt="[object Float32Array]",ft="[object Float64Array]",mt="[object Int8Array]",gt="[object Int16Array]",yt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",bt="[object Uint16Array]",xt="[object Uint32Array]",wt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,Tt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Et=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,Ot=RegExp(Et.source),Pt=RegExp(Ct.source),kt=/<%-([\s\S]+?)%>/g,At=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dt=/^\w*$/,Bt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/[\\^$.*+?()[\]{}|]/g,Lt=RegExp(zt.source),Rt=/^\s+|\s+$/g,jt=/^\s+/,Ft=/\s+$/,Nt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$t=/\{\n\/\* \[wrapped with (.+)\] \*/,Vt=/,? & /,Ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qt=/\w*$/,Wt=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,Xt=/^\[object .+?Constructor\]$/,Yt=/^0o[0-7]+$/i,Kt=/^(?:0|[1-9]\d*)$/,Jt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 8,610 bytes, line 32
327f]/g,Qt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",ne="\\u0300-\\u036f",re="\\ufe20-\\ufe2f",ie="\\u20d0-\\u20ff",oe=ne+re+ie,ae="\\u2700-\\u27bf",se="a-z\\xdf-\\xf6\\xf8-\\xff",le="\\xac\\xb1\\xd7\\xf7",ce="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ue="\\u2000-\\u206f",he=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",de="A-Z\\xc0-\\xd6\\xd8-\\xde",pe="\\ufe0e\\ufe0f",fe=le+ce+ue+he,me="['’]",ge="["+ee+"]",ye="["+fe+"]",_e="["+oe+"]",ve="\\d+",be="["+ae+"]",xe="["+se+"]",we="[^"+ee+fe+ve+ae+se+de+"]",Se="\\ud83c[\\udffb-\\udfff]",Te="(?:"+_e+"|"+Se+")",Ee="[^"+ee+"]",Ce="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+de+"]",ke="\\u200d",Ae="(?:"+xe+"|"+we+")",Ie="(?:"+Pe+"|"+we+")",Me="(?:"+me+"(?:d|ll|m|re|s|t|ve))?",De="(?:"+me+"(?:D|LL|M|RE|S|T|VE))?",Be=Te+"?",ze="["+pe+"]?",Le="(?:"+ke+"(?:"+[Ee,Ce,Oe].join("|")+")"+ze+Be+")*",Re="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fe=ze+Be+Le,Ne="(?:"+[be,Ce,Oe].join("|")+")"+Fe,$e="(?:"+[Ee+_e+"?",_e,Ce,Oe,ge].join("|")+")",Ve=RegExp(me,"g"),Ue=RegExp(_e,"g"),Ge=RegExp(Se+"(?="+Se+")|"+$e+Fe,"g"),He=RegExp([Pe+"?"+xe+"+"+Me+"(?="+[ye,Pe,"$"].join("|")+")",Ie+"+"+De+"(?="+[ye,Pe+Ae,"$"].join("|")+")",Pe+"?"+Ae+"+"+Me,Pe+"+"+De,je,Re,ve,Ne].join("|"),"g"),qe=RegExp("["+ke+ee+oe+pe+"]"),We=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xe=-1,Ye={};Ye[pt]=Ye[ft]=Ye[mt]=Ye[gt]=Ye[yt]=Ye[_t]=Ye[vt]=Ye[bt]=Ye[xt]=!0,Ye[U]=Ye[G]=Ye[ht]=Ye[q]=Ye[dt]=Ye[W]=Ye[X]=Ye[Y]=Ye[J]=Ye[Q]=Ye[et]=Ye[it]=Ye[ot]=Ye[at]=Ye[ct]=!1;var Ke={};Ke[U]=Ke[G]=Ke[ht]=Ke[dt]=Ke[q]=Ke[W]=Ke[pt]=Ke[ft]=Ke[mt]=Ke[gt]=Ke[yt]=Ke[J]=Ke[Q]=Ke[et]=Ke[it]=Ke[ot]=Ke[at]=Ke[st]=Ke[_t]=Ke[vt]=Ke[bt]=Ke[xt]=!0,Ke[X]=Ke[Y]=Ke[ct]=!1;var Je={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Qe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},en={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof t&&t&&t.Object===Object&&t,an="object"==typeof self&&self&&self.Object===Object&&self,sn=on||an||Function("return this")(),ln=e&&!e.nodeType&&e,cn=ln&&"object"==typeof r&&r&&!r.nodeType&&r,un=cn&&cn.exports===ln,hn=un&&on.process,dn=function(){try{var t=cn&&cn.require&&cn.require("util").types;return t||hn&&hn.binding&&hn.binding("util")}catch(e){}}(),pn=dn&&dn.isArrayBuffer,fn=dn&&dn.isDate,mn=dn&&dn.isMap,gn=dn&&dn.isRegExp,yn=dn&&dn.isSet,_n=dn&&dn.isTypedArray;function vn(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)}function bn(t,e,n,r){var i=-1,o=null==t?0:t.length;while(++i<o){var a=t[i];e(r,a,n(a),t)}return r}function xn(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(!1===e(t[n],n,t))break;return t}function wn(t,e){var n=null==t?0:t.length;while(n--)if(!1===e(t[n],n,t))break;return t}function Sn(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(!e(t[n],n,t))return!1;return!0}function Tn(t,e){var n=-1,r=null==t?0:t.length,i=0,o=[];while(++n<r){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function En(t,e){var n=null==t?0:t.length;return!!n&&Rn(t,e,0)>-1}function Cn(t,e,n){var r=-1,i=null==t?0:t.length;while(++r<i)if(n(e,t[r]))return!0;return!1}function On(t,e){var n=-1,r=null==t?0:t.length,i=Array(r);while(++n<r)i[n]=e(t[n],n,t);return i}function Pn(t,e){var n=-1,r=e.length,i=t.length;while(++n<r)t[i+n]=e[n];return t}function kn(t,e,n,r){var i=-1,o=null==t?0:t.length;r&&o&&(n=t[++i]);while(++i<o)n=e(n,t[i],i,t);return n}function An(t,e,n,r){var i=null==t?0:t.length;r&&i&&(n=t[--i]);while(i--)n=e(n,t[i],i,t);return n}function In(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(e(t[n],n,t))return!0;return!1}var Mn=$n("length");function Dn(t){return t.split("")}function Bn(t){return t.match(Ut)||[]}function zn(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function Ln(t,e,n,r){var i=t.length,o=n+(r?1:-1);while(r?o--:++o<i)if(e(t[o],o,t))return o;return-1}function Rn(t,e,n){return e===e?dr(t,e,n):Ln(t,Fn,n)}function jn(t,e,n,r){var i=n-1,o=t.length;while(++i<o)if(r(t[i],e))return i;return-1}function Fn(t){return t!==t}function Nn(t,e){var n=null==t?0:t.length;return n?Hn(t,e)/n:j}function $n(t){return function(e){return null==e?o:e[t]}}function Vn(t){return function(e){return null==t?o:t[e]}}function Un(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function Gn(t,e){var n=t.length;t.sort(e);while(n--)t[n]=t[n].value;return t}function Hn(t,e){var n,r=-1,i=t.length;while(++r<i){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function qn(t,e){var n=-1,r=Array(t);while(++n<t)r[n]=e(n);return r}function Wn(t,e){return On(e,function(e){return[e,t[e]]})}function Zn(t){return function(e){return t(e)}}function Xn(t,e){return On(e,function(e){return t[e]})}function Yn(t,e){return t.has(e)}function Kn(t,e){var n=-1,r=t.length;while(++n<r&&Rn(e,t[n],0)>-1);return n}function Jn(t,e){var n=t.length;while(n--&&Rn(e,t[n],0)>-1);return n}function Qn(t,e){var n=t.length,r=0;while(n--)t[n]===e&&++r;return r}var tr=Vn(Je),er=Vn(Qe);function nr(t){return"\\"+en[t]}function rr(t,e){return null==t?o:t[e]}function ir(t){return qe.test(t)}function or(t){return We.test(t)}function ar(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function sr(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function lr(t,e){return function(n){return t(e(n))}}function cr(t,e){var n=-1,r=t.length,i=0,o=[];while(++n<r){var a=t[n];a!==e&&a!==d||(t[n]=d,o[i++]=n)}return o}function ur(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function hr(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function dr(t,e,n){var r=n-1,i=t.length;while(++r<i)if(t[r]===e)return r;return-1}function pr(t,e,n){var r=n+1;while(r--)if(t[r]===e)return r;return r}function fr(t){return ir(t)?yr(t):Mn(t)}function mr(t){return ir(t)?_r(t):Dn(t)}var gr=Vn(tn);function yr(t){var e=Ge.lastIndex=0;while(Ge.test(t))++e;return e}function _r(t){return t.match(Ge)||[]}function vr(t){return t.match(He)||[]}var br=function t(e){e=null==e?sn:xr.defaults(sn.Object(),e,xr.pick(sn,Ze));var n=e.Array,r=e.Date,i=e.Error,Ut=e.Function,ee=e.Math,ne=e.Object,re=e.RegExp,ie=e.String,oe=e.TypeError,ae=n.prototype,se=Ut.prototype,le=ne.prototype,ce=e["__c
32ore-js_shared__"],ue=se.toString,he=le.hasOwnProperty,de=0,pe=function(){var t=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),fe=le.toString,me=ue.call(ne),ge=sn._,ye=re("^"+ue.call(he).replace(zt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_e=un?e.Buffer:o,ve=e.Symbol,be=e.Uint8Array,xe=_e?_e.allocUnsafe:o,we=lr(ne.getPrototypeOf,ne),Se=ne.create,Te=le.propertyIsEnumerable,Ee=ae.splice,Ce=ve?ve.isConcatSpreadable:o,Oe=ve?ve.iterator:o,Pe=ve?ve.toStringTag:o,ke=function(){try{var t=Ha(ne,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ae=e.clearTimeout!==sn.clearTimeout&&e.clearTimeout,Ie=r&&r.now!==sn.Date.now&&r.now,Me=e.setTimeout!==sn.setTimeout&&e.setTimeout,De=ee.ceil,Be=ee.floor,ze=ne.getOwnPropertySymbols,Le=_e?_e.isBuffer:o,Re=e.isFinite,je=ae.join,Fe=lr(ne.keys,ne),Ne=ee.max,$e=ee.min,Ge=r.now,He=e.parseInt,qe=ee.random,We=ae.reverse,Je=Ha(e,"DataView"),Qe=Ha(e,"Map"),tn=Ha(e,"Promise"),en=Ha(e,"Set"),on=Ha(e,"WeakMap"),an=Ha(ne,"create"),ln=on&&new on,cn={},hn=As(Je),dn=As(Qe),Mn=As(tn),Dn=As(en),Vn=As(on),dr=ve?ve.prototype:o,yr=dr?dr.valueOf:o,_r=dr?dr.toString:o;function br(t){if(Su(t)&&!au(t)&&!(t instanceof Er)){if(t instanceof Tr)return t;if(he.call(t,"__wrapped__"))return Ms(t)}return new Tr(t)}var wr=function(){function t(){}return function(e){if(!wu(e))return{};if(Se)return Se(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Sr(){}function Tr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Er(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function Cr(){var t=new Er(this.__wrapped__);return t.__actions__=na(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=na(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=na(this.__views__),t}function Or(){if(this.__filtered__){var t=new Er(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Pr(){var t=this.__wrapped__.value(),e=this.__dir__,n=au(t),r=e<0,i=n?t.length:0,o=Ya(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,d=0,p=$e(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return Ro(t,this.__actions__);var f=[];t:while(l--&&d<p){c+=e;var m=-1,g=t[c];while(++m<h){var y=u[m],_=y.iteratee,v=y.type,b=_(g);if(v==D)g=b;else if(!b){if(v==M)continue t;break t}}f[d++]=g}return f}function kr(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Ar(){this.__data__=an?an(null):{},this.size=0}function Ir(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Mr(t){var e=this.__data__;if(an){var n=e[t];return n===u?o:n}return he.call(e,t)?e[t]:o}function Dr(t){var e=this.__data__;return an?e[t]!==o:he.call(e,t)}function Br(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=an&&e===o?u:e,this}function zr(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Lr(){this.__data__=[],this.size=0}function Rr(t){var e=this.__data__,n=li(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ee.call(e,n,1),--this.size,!0}function jr(t){var e=this.__data__,n=li(e,t);return n<0?o:e[n][1]}function Fr(t){return li(this.__data__,t)>-1}function Nr(t,e){var n=this.__data__,r=li(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function $r(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Vr(){this.size=0,this.__data__={hash:new kr,map:new(Qe||zr),string:new kr}}function Ur(t){var e=Ua(this,t)["delete"](t);return this.size-=e?1:0,e}function Gr(t){return Ua(this,t).get(t)}function Hr(t){return Ua(this,t).has(t)}function qr(t,e){var n=Ua(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Wr(t){var e=-1,n=null==t?0:t.length;this.__data__=new $r;while(++e<n)this.add(t[e])}function Zr(t){return this.__data__.set(t,u),this}function Xr(t){return this.__data__.has(t)}function Yr(t){var e=this.__data__=new zr(t);this.size=e.size}function Kr(){this.__data__=new zr,this.size=0}function Jr(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function Qr(t){return this.__data__.get(t)}function ti(t){return this.__data__.has(t)}function ei(t,e){var n=this.__data__;if(n instanceof zr){var r=n.__data__;if(!Qe||r.length<s-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new $r(r)}return n.set(t,e),this.size=n.size,this}function ni(t,e){var n=au(t),r=!n&&ou(t),i=!n&&!r&&hu(t),o=!n&&!r&&!i&&ju(t),a=n||r||i||o,s=a?qn(t.length,ie):[],l=s.length;for(var c in t)!e&&!he.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||is(c,l))||s.push(c);return s}function ri(t){var e=t.length;return e?t[go(0,e-1)]:o}function ii(t,e){return Os(na(t),fi(e,0,t.length))}function oi(t){return Os(na(t))}function ai(t,e,n){(n===o||nu(t[e],n))&&(n!==o||e in t)||di(t,e,n)}function si(t,e,n){var r=t[e];he.call(t,e)&&nu(r,n)&&(n!==o||e in t)||di(t,e,n)}function li(t,e){var n=t.length;while(n--)if(nu(t[n][0],e))return n;return-1}function ci(t,e,n,r){return bi(t,function(t,i,o){e(r,t,n(t),o)}),r}function ui(t,e){return t&&ra(e,bh(e),t)}function hi(t,e){return t&&ra(e,xh(e),t)}function di(t,e,n){"__proto__"==e&&ke?ke(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function pi(t,e){var r=-1,i=e.length,a=n(i),s=null==t;while(++r<i)a[r]=s?o:fh(t,e[r]);return a}function fi(t,e,n){return t===t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function mi(t,e,n,r,i,a){var s,l=e&p,c=e&f,u=e&m;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!wu(t))return t;var h=au(t);if(h){if(s=Qa(t),!l)return na(t,s)}else{var d=Xa(t),g=d==Y||d==K;
vendor: 4,052 bytes, line 32
32if(hu(t))return qo(t,l);if(d==et||d==U||g&&!i){if(s=c||g?{}:ts(t),!l)return c?oa(t,hi(s,t)):ia(t,ui(s,t))}else{if(!Ke[d])return i?t:{};s=es(t,d,l)}}a||(a=new Yr);var y=a.get(t);if(y)return y;if(a.set(t,s),zu(t))return t.forEach(function(r){s.add(mi(r,e,n,r,t,a))}),s;if(Tu(t))return t.forEach(function(r,i){s.set(i,mi(r,e,n,i,t,a))}),s;var _=u?c?ja:Ra:c?xh:bh,v=h?o:_(t);return xn(v||t,function(r,i){v&&(i=r,r=t[i]),si(s,i,mi(r,e,n,i,t,a))}),s}function gi(t){var e=bh(t);return function(n){return yi(n,t,e)}}function yi(t,e,n){var r=n.length;if(null==t)return!r;t=ne(t);while(r--){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function _i(t,e,n){if("function"!=typeof t)throw new oe(c);return Ss(function(){t.apply(o,n)},e)}function vi(t,e,n,r){var i=-1,o=En,a=!0,l=t.length,c=[],u=e.length;if(!l)return c;n&&(e=On(e,Zn(n))),r?(o=Cn,a=!1):e.length>=s&&(o=Yn,a=!1,e=new Wr(e));t:while(++i<l){var h=t[i],d=null==n?h:n(h);if(h=r||0!==h?h:0,a&&d===d){var p=u;while(p--)if(e[p]===d)continue t;c.push(h)}else o(e,d,r)||c.push(h)}return c}br.templateSettings={escape:kt,evaluate:At,interpolate:It,variable:"",imports:{_:br}},br.prototype=Sr.prototype,br.prototype.constructor=br,Tr.prototype=wr(Sr.prototype),Tr.prototype.constructor=Tr,Er.prototype=wr(Sr.prototype),Er.prototype.constructor=Er,kr.prototype.clear=Ar,kr.prototype["delete"]=Ir,kr.prototype.get=Mr,kr.prototype.has=Dr,kr.prototype.set=Br,zr.prototype.clear=Lr,zr.prototype["delete"]=Rr,zr.prototype.get=jr,zr.prototype.has=Fr,zr.prototype.set=Nr,$r.prototype.clear=Vr,$r.prototype["delete"]=Ur,$r.prototype.get=Gr,$r.prototype.has=Hr,$r.prototype.set=qr,Wr.prototype.add=Wr.prototype.push=Zr,Wr.prototype.has=Xr,Yr.prototype.clear=Kr,Yr.prototype["delete"]=Jr,Yr.prototype.get=Qr,Yr.prototype.has=ti,Yr.prototype.set=ei;var bi=la(ki),xi=la(Ai,!0);function wi(t,e){var n=!0;return bi(t,function(t,r,i){return n=!!e(t,r,i),n}),n}function Si(t,e,n){var r=-1,i=t.length;while(++r<i){var a=t[r],s=e(a);if(null!=s&&(l===o?s===s&&!Ru(s):n(s,l)))var l=s,c=a}return c}function Ti(t,e,n,r){var i=t.length;n=qu(n),n<0&&(n=-n>i?0:i+n),r=r===o||r>i?i:qu(r),r<0&&(r+=i),r=n>r?0:Wu(r);while(n<r)t[n++]=e;return t}function Ei(t,e){var n=[];return bi(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Ci(t,e,n,r,i){var o=-1,a=t.length;n||(n=rs),i||(i=[]);while(++o<a){var s=t[o];e>0&&n(s)?e>1?Ci(s,e-1,n,r,i):Pn(i,s):r||(i[i.length]=s)}return i}var Oi=ca(),Pi=ca(!0);function ki(t,e){return t&&Oi(t,e,bh)}function Ai(t,e){return t&&Pi(t,e,bh)}function Ii(t,e){return Tn(e,function(e){return vu(t[e])})}function Mi(t,e){e=Vo(e,t);var n=0,r=e.length;while(null!=t&&n<r)t=t[ks(e[n++])];return n&&n==r?t:o}function Di(t,e,n){var r=e(t);return au(t)?r:Pn(r,n(t))}function Bi(t){return null==t?t===o?lt:tt:Pe&&Pe in ne(t)?qa(t):ys(t)}function zi(t,e){return t>e}function Li(t,e){return null!=t&&he.call(t,e)}function Ri(t,e){return null!=t&&e in ne(t)}function ji(t,e,n){return t>=$e(e,n)&&t<Ne(e,n)}function Fi(t,e,r){var i=r?Cn:En,a=t[0].length,s=t.length,l=s,c=n(s),u=1/0,h=[];while(l--){var d=t[l];l&&e&&(d=On(d,Zn(e))),u=$e(d.length,u),c[l]=!r&&(e||a>=120&&d.length>=120)?new Wr(l&&d):o}d=t[0];var p=-1,f=c[0];t:while(++p<a&&h.length<u){var m=d[p],g=e?e(m):m;if(m=r||0!==m?m:0,!(f?Yn(f,g):i(h,g,r))){l=s;while(--l){var y=c[l];if(!(y?Yn(y,g):i(t[l],g,r)))continue t}f&&f.push(g),h.push(m)}}return h}function Ni(t,e,n,r){return ki(t,function(t,i,o){e(r,n(t),i,o)}),r}function $i(t,e,n){e=Vo(e,t),t=vs(t,e);var r=null==t?t:t[ks(rl(e))];return null==r?o:vn(r,t,n)}function Vi(t){return Su(t)&&Bi(t)==U}function Ui(t){return Su(t)&&Bi(t)==ht}function Gi(t){return Su(t)&&Bi(t)==W}function Hi(t,e,n,r,i){return t===e||(null==t||null==e||!Su(t)&&!Su(e)?t!==t&&e!==e:qi(t,e,n,r,Hi,i))}function qi(t,e,n,r,i,o){var a=au(t),s=au(e),l=a?G:Xa(t),c=s?G:Xa(e);l=l==U?et:l,c=c==U?et:c;var u=l==et,h=c==et,d=l==c;if(d&&hu(t)){if(!hu(e))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new Yr),a||ju(t)?Da(t,e,n,r,i,o):Ba(t,e,l,n,r,i,o);if(!(n&g)){var p=u&&he.call(t,"__wrapped__"),f=h&&he.call(e,"__wrapped__");
vendor: 4,854 bytes, line 32
32if(p||f){var m=p?t.value():t,y=f?e.value():e;return o||(o=new Yr),i(m,y,n,r,o)}}return!!d&&(o||(o=new Yr),za(t,e,n,r,i,o))}function Wi(t){return Su(t)&&Xa(t)==J}function Zi(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;t=ne(t);while(i--){var l=n[i];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}while(++i<a){l=n[i];var c=l[0],u=t[c],h=l[1];if(s&&l[2]){if(u===o&&!(c in t))return!1}else{var d=new Yr;if(r)var p=r(u,h,c,t,e,d);if(!(p===o?Hi(h,u,g|y,r,d):p))return!1}}return!0}function Xi(t){if(!wu(t)||cs(t))return!1;var e=vu(t)?ye:Xt;return e.test(As(t))}function Yi(t){return Su(t)&&Bi(t)==it}function Ki(t){return Su(t)&&Xa(t)==ot}function Ji(t){return Su(t)&&xu(t.length)&&!!Ye[Bi(t)]}function Qi(t){return"function"==typeof t?t:null==t?Pd:"object"==typeof t?au(t)?oo(t[0],t[1]):io(t):$d(t)}function to(t){if(!hs(t))return Fe(t);var e=[];for(var n in ne(t))he.call(t,n)&&"constructor"!=n&&e.push(n);return e}function eo(t){if(!wu(t))return gs(t);var e=hs(t),n=[];for(var r in t)("constructor"!=r||!e&&he.call(t,r))&&n.push(r);return n}function no(t,e){return t<e}function ro(t,e){var r=-1,i=lu(t)?n(t.length):[];return bi(t,function(t,n,o){i[++r]=e(t,n,o)}),i}function io(t){var e=Ga(t);return 1==e.length&&e[0][2]?ps(e[0][0],e[0][1]):function(n){return n===t||Zi(n,t,e)}}function oo(t,e){return as(t)&&ds(e)?ps(ks(t),e):function(n){var r=fh(n,t);return r===o&&r===e?gh(n,t):Hi(e,r,g|y)}}function ao(t,e,n,r,i){t!==e&&Oi(e,function(a,s){if(wu(a))i||(i=new Yr),so(t,e,s,n,ao,r,i);else{var l=r?r(xs(t,s),a,s+"",t,e,i):o;l===o&&(l=a),ai(t,s,l)}},xh)}function so(t,e,n,r,i,a,s){var l=xs(t,n),c=xs(e,n),u=s.get(c);if(u)ai(t,n,u);else{var h=a?a(l,c,n+"",t,e,s):o,d=h===o;if(d){var p=au(c),f=!p&&hu(c),m=!p&&!f&&ju(c);h=c,p||f||m?au(l)?h=l:cu(l)?h=na(l):f?(d=!1,h=qo(c,!0)):m?(d=!1,h=Ko(c,!0)):h=[]:Mu(c)||ou(c)?(h=l,ou(l)?h=Xu(l):wu(l)&&!vu(l)||(h=ts(c))):d=!1}d&&(s.set(c,h),i(h,c,r,a,s),s["delete"](c)),ai(t,n,h)}}function lo(t,e){var n=t.length;if(n)return e+=e<0?n:0,is(e,n)?t[e]:o}function co(t,e,n){var r=-1;e=On(e.length?e:[Pd],Zn(Va()));var i=ro(t,function(t,n,i){var o=On(e,function(e){return e(t)});return{criteria:o,index:++r,value:t}});return Gn(i,function(t,e){return Qo(t,e,n)})}function uo(t,e){return ho(t,e,function(e,n){return gh(t,n)})}function ho(t,e,n){var r=-1,i=e.length,o={};while(++r<i){var a=e[r],s=Mi(t,a);n(s,a)&&wo(o,Vo(a,t),s)}return o}function po(t){return function(e){return Mi(e,t)}}function fo(t,e,n,r){var i=r?jn:Rn,o=-1,a=e.length,s=t;t===e&&(e=na(e)),n&&(s=On(t,Zn(n)));while(++o<a){var l=0,c=e[o],u=n?n(c):c;while((l=i(s,u,l,r))>-1)s!==t&&Ee.call(s,l,1),Ee.call(t,l,1)}return t}function mo(t,e){var n=t?e.length:0,r=n-1;while(n--){var i=e[n];if(n==r||i!==o){var o=i;is(i)?Ee.call(t,i,1):Bo(t,i)}}return t}function go(t,e){return t+Be(qe()*(e-t+1))}function yo(t,e,r,i){var o=-1,a=Ne(De((e-t)/(r||1)),0),s=n(a);while(a--)s[i?a:++o]=t,t+=r;return s}function _o(t,e){var n="";if(!t||e<1||e>L)return n;do{e%2&&(n+=t),e=Be(e/2),e&&(t+=t)}while(e);return n}function vo(t,e){return Ts(_s(t,e,Pd),t+"")}function bo(t){return ri(Fh(t))}function xo(t,e){var n=Fh(t);return Os(n,fi(e,0,n.length))}function wo(t,e,n,r){if(!wu(t))return t;e=Vo(e,t);var i=-1,a=e.length,s=a-1,l=t;while(null!=l&&++i<a){var c=ks(e[i]),u=n;if(i!=s){var h=l[c];u=r?r(h,c,l):o,u===o&&(u=wu(h)?h:is(e[i+1])?[]:{})}si(l,c,u),l=l[c]}return t}var So=ln?function(t,e){return ln.set(t,e),t}:Pd,To=ke?function(t,e){return ke(t,"toString",{configurable:!0,enumerable:!1,value:Td(e),writable:!0})}:Pd;function Eo(t){return Os(Fh(t))}function Co(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;var a=n(o);while(++i<o)a[i]=t[i+e];return a}function Oo(t,e){var n;return bi(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function Po(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=$){while(r<i){var o=r+i>>>1,a=t[o];null!==a&&!Ru(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ko(t,e,Pd,n)}function ko(t,e,n,r){e=n(e);var i=0,a=null==t?0:t.length,s=e!==e,l=null===e,c=Ru(e),u=e===o;while(i<a){var h=Be((i+a)/2),d=n(t[h]),p=d!==o,f=null===d,m=d===d,g=Ru(d);if(s)var y=r||m;else y=u?m&&(r||p):l?m&&p&&(r||!f):c?m&&p&&!f&&(r||!g):!f&&!g&&(r?d<=e:d<e);y?i=h+1:a=h}return $e(a,N)}function Ao(t,e){var n=-1,r=t.length,i=0,o=[];while(++n<r){var a=t[n],s=e?e(a):a;if(!n||!nu(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function Io(t){return"number"==typeof t?t:Ru(t)?j:+t}function Mo(t){if("string"==typeof t)return t;if(au(t))return On(t,Mo)+"";if(Ru(t))return _r?_r.call(t):"";var e=t+"";return"0"==e&&1/t==-z?"-0":e}function Do(t,e,n){var r=-1,i=En,o=t.length,a=!0,l=[],c=l;if(n)a=!1,i=Cn;else if(o>=s){var u=e?null:Oa(t);if(u)return ur(u);a=!1,i=Yn,c=new Wr}else c=e?[]:l;t:while(++r<o){var h=t[r],d=e?e(h):h;if(h=n||0!==h?h:0,a&&d===d){var p=c.length;while(p--)if(c[p]===d)continue t;e&&c.push(d),l.push(h)}
vendor: 4,917 bytes, line 32
32else i(c,d,n)||(c!==l&&c.push(d),l.push(h))}return l}function Bo(t,e){return e=Vo(e,t),t=vs(t,e),null==t||delete t[ks(rl(e))]}function zo(t,e,n,r){return wo(t,e,n(Mi(t,e)),r)}function Lo(t,e,n,r){var i=t.length,o=r?i:-1;while((r?o--:++o<i)&&e(t[o],o,t));return n?Co(t,r?0:o,r?o+1:i):Co(t,r?o+1:0,r?i:o)}function Ro(t,e){var n=t;return n instanceof Er&&(n=n.value()),kn(e,function(t,e){return e.func.apply(e.thisArg,Pn([t],e.args))},n)}function jo(t,e,r){var i=t.length;if(i<2)return i?Do(t[0]):[];var o=-1,a=n(i);while(++o<i){var s=t[o],l=-1;while(++l<i)l!=o&&(a[o]=vi(a[o]||s,t[l],e,r))}return Do(Ci(a,1),e,r)}function Fo(t,e,n){var r=-1,i=t.length,a=e.length,s={};while(++r<i){var l=r<a?e[r]:o;n(s,t[r],l)}return s}function No(t){return cu(t)?t:[]}function $o(t){return"function"==typeof t?t:Pd}function Vo(t,e){return au(t)?t:as(t,e)?[t]:Ps(Ku(t))}var Uo=vo;function Go(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Co(t,e,n)}var Ho=Ae||function(t){return sn.clearTimeout(t)};function qo(t,e){if(e)return t.slice();var n=t.length,r=xe?xe(n):new t.constructor(n);return t.copy(r),r}function Wo(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e}function Zo(t,e){var n=e?Wo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Xo(t){var e=new t.constructor(t.source,qt.exec(t));return e.lastIndex=t.lastIndex,e}function Yo(t){return yr?ne(yr.call(t)):{}}function Ko(t,e){var n=e?Wo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Jo(t,e){if(t!==e){var n=t!==o,r=null===t,i=t===t,a=Ru(t),s=e!==o,l=null===e,c=e===e,u=Ru(e);if(!l&&!u&&!a&&t>e||a&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&t<e||u&&n&&i&&!r&&!a||l&&n&&i||!s&&i||!c)return-1}return 0}function Qo(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;while(++r<a){var l=Jo(i[r],o[r]);if(l){if(r>=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return t.index-e.index}function ta(t,e,r,i){var o=-1,a=t.length,s=r.length,l=-1,c=e.length,u=Ne(a-s,0),h=n(c+u),d=!i;while(++l<c)h[l]=e[l];while(++o<s)(d||o<a)&&(h[r[o]]=t[o]);while(u--)h[l++]=t[o++];return h}function ea(t,e,r,i){var o=-1,a=t.length,s=-1,l=r.length,c=-1,u=e.length,h=Ne(a-l,0),d=n(h+u),p=!i;while(++o<h)d[o]=t[o];var f=o;while(++c<u)d[f+c]=e[c];while(++s<l)(p||o<a)&&(d[f+r[s]]=t[o++]);return d}function na(t,e){var r=-1,i=t.length;e||(e=n(i));while(++r<i)e[r]=t[r];return e}function ra(t,e,n,r){var i=!n;n||(n={});var a=-1,s=e.length;while(++a<s){var l=e[a],c=r?r(n[l],t[l],l,n,t):o;c===o&&(c=t[l]),i?di(n,l,c):si(n,l,c)}return n}function ia(t,e){return ra(t,Wa(t),e)}function oa(t,e){return ra(t,Za(t),e)}function aa(t,e){return function(n,r){var i=au(n)?bn:ci,o=e?e():{};return i(n,t,Va(r,2),o)}}function sa(t){return vo(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;a=t.length>3&&"function"==typeof a?(i--,a):o,s&&os(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ne(e);while(++r<i){var l=n[r];l&&t(e,l,r,a)}return e})}function la(t,e){return function(n,r){if(null==n)return n;if(!lu(n))return t(n,r);var i=n.length,o=e?i:-1,a=ne(n);while(e?o--:++o<i)if(!1===r(a[o],o,a))break;return n}}function ca(t){return function(e,n,r){var i=-1,o=ne(e),a=r(e),s=a.length;while(s--){var l=a[t?s:++i];if(!1===n(o[l],l,o))break}return e}}function ua(t,e,n){var r=e&_,i=pa(t);function o(){var e=this&&this!==sn&&this instanceof o?i:t;return e.apply(r?n:this,arguments)}return o}function ha(t){return function(e){e=Ku(e);var n=ir(e)?mr(e):o,r=n?n[0]:e.charAt(0),i=n?Go(n,1).join(""):e.slice(1);return r[t]()+i}}function da(t){return function(e){return kn(vd(qh(e).replace(Ve,"")),t,"")}}function pa(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=wr(t.prototype),r=t.apply(n,e);return wu(r)?r:n}}function fa(t,e,r){var i=pa(t);function a(){var s=arguments.length,l=n(s),c=s,u=$a(a);while(c--)l[c]=arguments[c];var h=s<3&&l[0]!==u&&l[s-1]!==u?[]:cr(l,u);if(s-=h.length,s<r)return Ea(t,e,ya,a.placeholder,o,l,h,o,o,r-s);var d=this&&this!==sn&&this instanceof a?i:t;return vn(d,this,l)}return a}function ma(t){return function(e,n,r){var i=ne(e);if(!lu(e)){var a=Va(n,3);e=bh(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function ga(t){return La(function(e){var n=e.length,r=n,i=Tr.prototype.thru;t&&e.reverse();while(r--){var a=e[r];if("function"!=typeof a)throw new oe(c);if(i&&!s&&"wrapper"==Na(a))var s=new Tr([],!0)}r=s?r:n;while(++r<n){a=e[r];var l=Na(a),u="wrapper"==l?Fa(a):o;s=u&&ls(u[0])&&u[1]==(E|x|S|C)&&!u[4].length&&1==u[9]?s[Na(u[0])].apply(s,u[3]):1==a.length&&ls(a)?s[l]():s.thru(a)}return function(){var t=arguments,r=t[0];
vendor: 4,769 bytes, line 32
32if(s&&1==t.length&&au(r))return s.plant(r).value();var i=0,o=n?e[i].apply(this,t):r;while(++i<n)o=e[i].call(this,o);return o}})}function ya(t,e,r,i,a,s,l,c,u,h){var d=e&E,p=e&_,f=e&v,m=e&(x|w),g=e&O,y=f?o:pa(t);function b(){var o=arguments.length,_=n(o),v=o;while(v--)_[v]=arguments[v];if(m)var x=$a(b),w=Qn(_,x);if(i&&(_=ta(_,i,a,m)),s&&(_=ea(_,s,l,m)),o-=w,m&&o<h){var S=cr(_,x);return Ea(t,e,ya,b.placeholder,r,_,S,c,u,h-o)}var T=p?r:this,E=f?T[t]:t;return o=_.length,c?_=bs(_,c):g&&o>1&&_.reverse(),d&&u<o&&(_.length=u),this&&this!==sn&&this instanceof b&&(E=y||pa(E)),E.apply(T,_)}return b}function _a(t,e){return function(n,r){return Ni(n,t,e(r),{})}}function va(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Mo(n),r=Mo(r)):(n=Io(n),r=Io(r)),i=t(n,r)}return i}}function ba(t){return La(function(e){return e=On(e,Zn(Va())),vo(function(n){var r=this;return t(e,function(t){return vn(t,r,n)})})})}function xa(t,e){e=e===o?" ":Mo(e);var n=e.length;if(n<2)return n?_o(e,t):e;var r=_o(e,De(t/fr(e)));return ir(e)?Go(mr(r),0,t).join(""):r.slice(0,t)}function wa(t,e,r,i){var o=e&_,a=pa(t);function s(){var e=-1,l=arguments.length,c=-1,u=i.length,h=n(u+l),d=this&&this!==sn&&this instanceof s?a:t;while(++c<u)h[c]=i[c];while(l--)h[c++]=arguments[++e];return vn(d,o?r:this,h)}return s}function Sa(t){return function(e,n,r){return r&&"number"!=typeof r&&os(e,n,r)&&(n=r=o),e=Hu(e),n===o?(n=e,e=0):n=Hu(n),r=r===o?e<n?1:-1:Hu(r),yo(e,n,r,t)}}function Ta(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Zu(e),n=Zu(n)),t(e,n)}}function Ea(t,e,n,r,i,a,s,l,c,u){var h=e&x,d=h?s:o,p=h?o:s,f=h?a:o,m=h?o:a;e|=h?S:T,e&=~(h?T:S),e&b||(e&=~(_|v));var g=[t,e,i,f,d,m,p,l,c,u],y=n.apply(o,g);return ls(t)&&ws(y,g),y.placeholder=r,Es(y,t,e)}function Ca(t){var e=ee[t];return function(t,n){if(t=Zu(t),n=null==n?0:$e(qu(n),292),n){var r=(Ku(t)+"e").split("e"),i=e(r[0]+"e"+(+r[1]+n));return r=(Ku(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(t)}}var Oa=en&&1/ur(new en([,-0]))[1]==z?function(t){return new en(t)}:Ld;function Pa(t){return function(e){var n=Xa(e);return n==J?sr(e):n==ot?hr(e):Wn(e,t(e))}}function ka(t,e,n,r,i,a,s,l){var u=e&v;if(!u&&"function"!=typeof t)throw new oe(c);var h=r?r.length:0;if(h||(e&=~(S|T),r=i=o),s=s===o?s:Ne(qu(s),0),l=l===o?l:qu(l),h-=i?i.length:0,e&T){var d=r,p=i;r=i=o}var f=u?o:Fa(t),m=[t,e,n,r,i,d,p,a,s,l];if(f&&ms(m,f),t=m[0],e=m[1],n=m[2],r=m[3],i=m[4],l=m[9]=m[9]===o?u?0:t.length:Ne(m[9]-h,0),!l&&e&(x|w)&&(e&=~(x|w)),e&&e!=_)g=e==x||e==w?fa(t,e,l):e!=S&&e!=(_|S)||i.length?ya.apply(o,m):wa(t,e,n,r);else var g=ua(t,e,n);var y=f?So:ws;return Es(y(g,m),t,e)}function Aa(t,e,n,r){return t===o||nu(t,le[n])&&!he.call(r,n)?e:t}function Ia(t,e,n,r,i,a){return wu(t)&&wu(e)&&(a.set(e,t),ao(t,e,o,Ia,a),a["delete"](e)),t}function Ma(t){return Mu(t)?o:t}function Da(t,e,n,r,i,a){var s=n&g,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t);if(u&&a.get(e))return u==e;var h=-1,d=!0,p=n&y?new Wr:o;a.set(t,e),a.set(e,t);while(++h<l){var f=t[h],m=e[h];if(r)var _=s?r(m,f,h,e,t,a):r(f,m,h,t,e,a);if(_!==o){if(_)continue;d=!1;break}if(p){if(!In(e,function(t,e){if(!Yn(p,e)&&(f===t||i(f,t,n,r,a)))return p.push(e)})){d=!1;break}}else if(f!==m&&!i(f,m,n,r,a)){d=!1;break}}return a["delete"](t),a["delete"](e),d}function Ba(t,e,n,r,i,o,a){switch(n){case dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ht:return!(t.byteLength!=e.byteLength||!o(new be(t),new be(e)));case q:case W:case Q:return nu(+t,+e);case X:return t.name==e.name&&t.message==e.message;case it:case at:return t==e+"";case J:var s=sr;case ot:var l=r&g;if(s||(s=ur),t.size!=e.size&&!l)return!1;var c=a.get(t);if(c)return c==e;r|=y,a.set(t,e);var u=Da(s(t),s(e),r,i,o,a);return a["delete"](t),u;case st:if(yr)return yr.call(t)==yr.call(e)}return!1}function za(t,e,n,r,i,a){var s=n&g,l=Ra(t),c=l.length,u=Ra(e),h=u.length;if(c!=h&&!s)return!1;var d=c;while(d--){var p=l[d];if(!(s?p in e:he.call(e,p)))return!1}var f=a.get(t);if(f&&a.get(e))return f==e;var m=!0;a.set(t,e),a.set(e,t);var y=s;while(++d<c){p=l[d];var _=t[p],v=e[p];if(r)var b=s?r(v,_,p,e,t,a):r(_,v,p,t,e,a);if(!(b===o?_===v||i(_,v,n,r,a):b)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var x=t.constructor,w=e.constructor;x!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(m=!1)}return a["delete"](t),a["delete"](e),m}function La(t){return Ts(_s(t,o,qs),t+"")}function Ra(t){return Di(t,bh,Wa)}function ja(t){return Di(t,xh,Za)}var Fa=ln?function(t){return ln.get(t)}:Ld;function Na(t){var e=t.name+"",n=cn[e],r=he.call(cn,e)?n.length:0;while(r--){var i=n[r],o=i.func;
vendor: 10,485 bytes, line 32
32if(null==o||o==t)return i.name}return e}function $a(t){var e=he.call(br,"placeholder")?br:t;return e.placeholder}function Va(){var t=br.iteratee||kd;return t=t===kd?Qi:t,arguments.length?t(arguments[0],arguments[1]):t}function Ua(t,e){var n=t.__data__;return ss(e)?n["string"==typeof e?"string":"hash"]:n.map}function Ga(t){var e=bh(t),n=e.length;while(n--){var r=e[n],i=t[r];e[n]=[r,i,ds(i)]}return e}function Ha(t,e){var n=rr(t,e);return Xi(n)?n:o}function qa(t){var e=he.call(t,Pe),n=t[Pe];try{t[Pe]=o;var r=!0}catch(a){}var i=fe.call(t);return r&&(e?t[Pe]=n:delete t[Pe]),i}var Wa=ze?function(t){return null==t?[]:(t=ne(t),Tn(ze(t),function(e){return Te.call(t,e)}))}:Hd,Za=ze?function(t){var e=[];while(t)Pn(e,Wa(t)),t=we(t);return e}:Hd,Xa=Bi;function Ya(t,e,n){var r=-1,i=n.length;while(++r<i){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=$e(e,t+a);break;case"takeRight":t=Ne(t,e-a);break}}return{start:t,end:e}}function Ka(t){var e=t.match($t);return e?e[1].split(Vt):[]}function Ja(t,e,n){e=Vo(e,t);var r=-1,i=e.length,o=!1;while(++r<i){var a=ks(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:(i=null==t?0:t.length,!!i&&xu(i)&&is(a,i)&&(au(t)||ou(t)))}function Qa(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&he.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function ts(t){return"function"!=typeof t.constructor||hs(t)?{}:wr(we(t))}function es(t,e,n){var r=t.constructor;switch(e){case ht:return Wo(t);case q:case W:return new r(+t);case dt:return Zo(t,n);case pt:case ft:case mt:case gt:case yt:case _t:case vt:case bt:case xt:return Ko(t,n);case J:return new r;case Q:case at:return new r(t);case it:return Xo(t);case ot:return new r;case st:return Yo(t)}}function ns(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Nt,"{\n/* [wrapped with "+e+"] */\n")}function rs(t){return au(t)||ou(t)||!!(Ce&&t&&t[Ce])}function is(t,e){var n=typeof t;return e=null==e?L:e,!!e&&("number"==n||"symbol"!=n&&Kt.test(t))&&t>-1&&t%1==0&&t<e}function os(t,e,n){if(!wu(n))return!1;var r=typeof e;return!!("number"==r?lu(n)&&is(e,n.length):"string"==r&&e in n)&&nu(n[e],t)}function as(t,e){if(au(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ru(t))||(Dt.test(t)||!Mt.test(t)||null!=e&&t in ne(e))}function ss(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ls(t){var e=Na(t),n=br[e];if("function"!=typeof n||!(e in Er.prototype))return!1;if(t===n)return!0;var r=Fa(n);return!!r&&t===r[0]}function cs(t){return!!pe&&pe in t}(Je&&Xa(new Je(new ArrayBuffer(1)))!=dt||Qe&&Xa(new Qe)!=J||tn&&Xa(tn.resolve())!=nt||en&&Xa(new en)!=ot||on&&Xa(new on)!=ct)&&(Xa=function(t){var e=Bi(t),n=e==et?t.constructor:o,r=n?As(n):"";if(r)switch(r){case hn:return dt;case dn:return J;case Mn:return nt;case Dn:return ot;case Vn:return ct}return e});var us=ce?vu:qd;function hs(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||le;return t===n}function ds(t){return t===t&&!wu(t)}function ps(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==o||t in ne(n)))}}function fs(t){var e=jc(t,function(t){return n.size===h&&n.clear(),t}),n=e.cache;return e}function ms(t,e){var n=t[1],r=e[1],i=n|r,o=i<(_|v|E),a=r==E&&n==x||r==E&&n==C&&t[7].length<=e[8]||r==(E|C)&&e[7].length<=e[8]&&n==x;if(!o&&!a)return t;r&_&&(t[2]=e[2],i|=n&_?0:b);var s=e[3];if(s){var l=t[3];t[3]=l?ta(l,s,e[4]):s,t[4]=l?cr(t[3],d):e[4]}return s=e[5],s&&(l=t[5],t[5]=l?ea(l,s,e[6]):s,t[6]=l?cr(t[5],d):e[6]),s=e[7],s&&(t[7]=s),r&E&&(t[8]=null==t[8]?e[8]:$e(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function gs(t){var e=[];if(null!=t)for(var n in ne(t))e.push(n);return e}function ys(t){return fe.call(t)}function _s(t,e,r){return e=Ne(e===o?t.length-1:e,0),function(){var i=arguments,o=-1,a=Ne(i.length-e,0),s=n(a);while(++o<a)s[o]=i[e+o];o=-1;var l=n(e+1);while(++o<e)l[o]=i[o];return l[e]=r(s),vn(t,this,l)}}function vs(t,e){return e.length<2?t:Mi(t,Co(e,0,-1))}function bs(t,e){var n=t.length,r=$e(e.length,n),i=na(t);while(r--){var a=e[r];t[r]=is(a,n)?i[a]:o}return t}function xs(t,e){if("__proto__"!=e)return t[e]}var ws=Cs(So),Ss=Me||function(t,e){return sn.setTimeout(t,e)},Ts=Cs(To);function Es(t,e,n){var r=e+"";return Ts(t,ns(r,Is(Ka(r),n)))}function Cs(t){var e=0,n=0;return function(){var r=Ge(),i=I-(r-n);if(n=r,i>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Os(t,e){var n=-1,r=t.length,i=r-1;e=e===o?r:e;while(++n<e){var a=go(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Ps=fs(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Bt,function(t,n,r,i){e.push(r?i.replace(Gt,"$1"):n||t)}),e});function ks(t){if("string"==typeof t||Ru(t))return t;var e=t+"";return"0"==e&&1/t==-z?"-0":e}function As(t){if(null!=t){try{return ue.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Is(t,e){return xn(V,function(n){var r="_."+n[0];e&n[1]&&!En(t,r)&&t.push(r)}),t.sort()}function Ms(t){if(t instanceof Er)return t.clone();var e=new Tr(t.__wrapped__,t.__chain__);return e.__actions__=na(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Ds(t,e,r){e=(r?os(t,e,r):e===o)?1:Ne(qu(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];var a=0,s=0,l=n(De(i/e));while(a<i)l[s++]=Co(t,a,a+=e);return l}function Bs(t){var e=-1,n=null==t?0:t.length,r=0,i=[];while(++e<n){var o=t[e];o&&(i[r++]=o)}return i}function zs(){var t=arguments.length;if(!t)return[];var e=n(t-1),r=arguments[0],i=t;while(i--)e[i-1]=arguments[i];return Pn(au(r)?na(r):[r],Ci(e,1))}var Ls=vo(function(t,e){return cu(t)?vi(t,Ci(e,1,cu,!0)):[]}),Rs=vo(function(t,e){var n=rl(e);return cu(n)&&(n=o),cu(t)?vi(t,Ci(e,1,cu,!0),Va(n,2)):[]}),js=vo(function(t,e){var n=rl(e);return cu(n)&&(n=o),cu(t)?vi(t,Ci(e,1,cu,!0),o,n):[]});function Fs(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===o?1:qu(e),Co(t,e<0?0:e,r)):[]}function Ns(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===o?1:qu(e),e=r-e,Co(t,0,e<0?0:e)):[]}function $s(t,e){return t&&t.length?Lo(t,Va(e,3),!0,!0):[]}function Vs(t,e){return t&&t.length?Lo(t,Va(e,3),!0):[]}function Us(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&os(t,e,n)&&(n=0,r=i),Ti(t,e,n,r)):[]}function Gs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qu(n);return i<0&&(i=Ne(r+i,0)),Ln(t,Va(e,3),i)}function Hs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=qu(n),i=n<0?Ne(r+i,0):$e(i,r-1)),Ln(t,Va(e,3),i,!0)}function qs(t){var e=null==t?0:t.length;return e?Ci(t,1):[]}function Ws(t){var e=null==t?0:t.length;return e?Ci(t,z):[]}function Zs(t,e){var n=null==t?0:t.length;return n?(e=e===o?1:qu(e),Ci(t,e)):[]}function Xs(t){var e=-1,n=null==t?0:t.length,r={};while(++e<n){var i=t[e];r[i[0]]=i[1]}return r}function Ys(t){return t&&t.length?t[0]:o}function Ks(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qu(n);return i<0&&(i=Ne(r+i,0)),Rn(t,e,i)}function Js(t){var e=null==t?0:t.length;return e?Co(t,0,-1):[]}var Qs=vo(function(t){var e=On(t,No);return e.length&&e[0]===t[0]?Fi(e):[]}),tl=vo(function(t){var e=rl(t),n=On(t,No);return e===rl(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Fi(n,Va(e,2)):[]}),el=vo(function(t){var e=rl(t),n=On(t,No);return e="function"==typeof e?e:o,e&&n.pop(),n.length&&n[0]===t[0]?Fi(n,o,e):[]});function nl(t,e){return null==t?"":je.call(t,e)}function rl(t){var e=null==t?0:t.length;return e?t[e-1]:o}function il(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=qu(n),i=i<0?Ne(r+i,0):$e(i,r-1)),e===e?pr(t,e,i):Ln(t,Fn,i,!0)}function ol(t,e){return t&&t.length?lo(t,qu(e)):o}var al=vo(sl);function sl(t,e){return t&&t.length&&e&&e.length?fo(t,e):t}function ll(t,e,n){return t&&t.length&&e&&e.length?fo(t,e,Va(n,2)):t}function cl(t,e,n){return t&&t.length&&e&&e.length?fo(t,e,o,n):t}var ul=La(function(t,e){var n=null==t?0:t.length,r=pi(t,e);return mo(t,On(e,function(t){return is(t,n)?+t:t}).sort(Jo)),r});function hl(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;e=Va(e,3);while(++r<o){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return mo(t,i),n}function dl(t){return null==t?t:We.call(t)}function pl(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&os(t,e,n)?(e=0,n=r):(e=null==e?0:qu(e),n=n===o?r:qu(n)),Co(t,e,n)):[]}function fl(t,e){return Po(t,e)}function ml(t,e,n){return ko(t,e,Va(n,2))}function gl(t,e){var n=null==t?0:t.length;if(n){var r=Po(t,e);if(r<n&&nu(t[r],e))return r}return-1}function yl(t,e){return Po(t,e,!0)}function _l(t,e,n){return ko(t,e,Va(n,2),!0)}function vl(t,e){var n=null==t?0:t.length;if(n){var r=Po(t,e,!0)-1;if(nu(t[r],e))return r}return-1}function bl(t){return t&&t.length?Ao(t):[]}function xl(t,e){return t&&t.length?Ao(t,Va(e,2)):[]}function wl(t){var e=null==t?0:t.length;return e?Co(t,1,e):[]}function Sl(t,e,n){return t&&t.length?(e=n||e===o?1:qu(e),Co(t,0,e<0?0:e)):[]}function Tl(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===o?1:qu(e),e=r-e,Co(t,e<0?0:e,r)):[]}function El(t,e){return t&&t.length?Lo(t,Va(e,3),!1,!0):[]}function Cl(t,e){return t&&t.length?Lo(t,Va(e,3)):[]}var Ol=vo(function(t){return Do(Ci(t,1,cu,!0))}),Pl=vo(function(t){var e=rl(t);return cu(e)&&(e=o),Do(Ci(t,1,cu,!0),Va(e,2))}),kl=vo(function(t){var e=rl(t);return e="function"==typeof e?e:o,Do(Ci(t,1,cu,!0),o,e)});function Al(t){return t&&t.length?Do(t):[]}function Il(t,e){return t&&t.length?Do(t,Va(e,2)):[]}function Ml(t,e){return e="function"==typeof e?e:o,t&&t.length?Do(t,o,e):[]}function Dl(t){if(!t||!t.length)return[];var e=0;return t=Tn(t,function(t){if(cu(t))return e=Ne(t.length,e),!0}),qn(e,function(e){return On(t,$n(e))})}function Bl(t,e){if(!t||!t.length)return[];var n=Dl(t);return null==e?n:On(n,function(t){return vn(e,o,t)})}var zl=vo(function(t,e){return cu(t)?vi(t,e):[]}),Ll=vo(function(t){return jo(Tn(t,cu))}),Rl=vo(function(t){var e=rl(t);return cu(e)&&(e=o),jo(Tn(t,cu),Va(e,2))}),jl=vo(function(t){var e=rl(t);return e="function"==typeof e?e:o,jo(Tn(t,cu),o,e)}),Fl=vo(Dl);function Nl(t,e){return Fo(t||[],e||[],si)}function $l(t,e){return Fo(t||[],e||[],wo)}var Vl=vo(function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,Bl(t,n)});function Ul(t){var e=br(t);return e.__chain__=!0,e}function Gl(t,e){return e(t),t}function Hl(t,e){return e(t)}var ql=La(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,
vendor: 4,148 bytes, line 32
32i=function(e){return pi(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Er&&is(n)?(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:Hl,args:[i],thisArg:o}),new Tr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});function Wl(){return Ul(this)}function Zl(){return new Tr(this.value(),this.__chain__)}function Xl(){this.__values__===o&&(this.__values__=Gu(this.value()));var t=this.__index__>=this.__values__.length,e=t?o:this.__values__[this.__index__++];return{done:t,value:e}}function Yl(){return this}function Kl(t){var e,n=this;while(n instanceof Sr){var r=Ms(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e}function Jl(){var t=this.__wrapped__;if(t instanceof Er){var e=t;return this.__actions__.length&&(e=new Er(this)),e=e.reverse(),e.__actions__.push({func:Hl,args:[dl],thisArg:o}),new Tr(e,this.__chain__)}return this.thru(dl)}function Ql(){return Ro(this.__wrapped__,this.__actions__)}var tc=aa(function(t,e,n){he.call(t,n)?++t[n]:di(t,n,1)});function ec(t,e,n){var r=au(t)?Sn:wi;return n&&os(t,e,n)&&(e=o),r(t,Va(e,3))}function nc(t,e){var n=au(t)?Tn:Ei;return n(t,Va(e,3))}var rc=ma(Gs),ic=ma(Hs);function oc(t,e){return Ci(fc(t,e),1)}function ac(t,e){return Ci(fc(t,e),z)}function sc(t,e,n){return n=n===o?1:qu(n),Ci(fc(t,e),n)}function lc(t,e){var n=au(t)?xn:bi;return n(t,Va(e,3))}function cc(t,e){var n=au(t)?wn:xi;return n(t,Va(e,3))}var uc=aa(function(t,e,n){he.call(t,n)?t[n].push(e):di(t,n,[e])});function hc(t,e,n,r){t=lu(t)?t:Fh(t),n=n&&!r?qu(n):0;var i=t.length;return n<0&&(n=Ne(i+n,0)),Lu(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Rn(t,e,n)>-1}var dc=vo(function(t,e,r){var i=-1,o="function"==typeof e,a=lu(t)?n(t.length):[];return bi(t,function(t){a[++i]=o?vn(e,t,r):$i(t,e,r)}),a}),pc=aa(function(t,e,n){di(t,n,e)});function fc(t,e){var n=au(t)?On:ro;return n(t,Va(e,3))}function mc(t,e,n,r){return null==t?[]:(au(e)||(e=null==e?[]:[e]),n=r?o:n,au(n)||(n=null==n?[]:[n]),co(t,e,n))}var gc=aa(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});function yc(t,e,n){var r=au(t)?kn:Un,i=arguments.length<3;return r(t,Va(e,4),n,i,bi)}function _c(t,e,n){var r=au(t)?An:Un,i=arguments.length<3;return r(t,Va(e,4),n,i,xi)}function vc(t,e){var n=au(t)?Tn:Ei;return n(t,Fc(Va(e,3)))}function bc(t){var e=au(t)?ri:bo;return e(t)}function xc(t,e,n){e=(n?os(t,e,n):e===o)?1:qu(e);var r=au(t)?ii:xo;return r(t,e)}function wc(t){var e=au(t)?oi:Eo;return e(t)}function Sc(t){if(null==t)return 0;if(lu(t))return Lu(t)?fr(t):t.length;var e=Xa(t);return e==J||e==ot?t.size:to(t).length}function Tc(t,e,n){var r=au(t)?In:Oo;return n&&os(t,e,n)&&(e=o),r(t,Va(e,3))}var Ec=vo(function(t,e){if(null==t)return[];var n=e.length;return n>1&&os(t,e[0],e[1])?e=[]:n>2&&os(e[0],e[1],e[2])&&(e=[e[0]]),co(t,Ci(e,1),[])}),Cc=Ie||function(){return sn.Date.now()};function Oc(t,e){if("function"!=typeof e)throw new oe(c);return t=qu(t),function(){if(--t<1)return e.apply(this,arguments)}}function Pc(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,ka(t,E,o,o,o,o,e)}function kc(t,e){var n;if("function"!=typeof e)throw new oe(c);return t=qu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Ac=vo(function(t,e,n){var r=_;if(n.length){var i=cr(n,$a(Ac));r|=S}return ka(t,r,e,n,i)}),Ic=vo(function(t,e,n){var r=_|v;if(n.length){var i=cr(n,$a(Ic));r|=S}return ka(e,r,t,n,i)});function Mc(t,e,n){e=n?o:e;var r=ka(t,x,o,o,o,o,o,e);return r.placeholder=Mc.placeholder,r}function Dc(t,e,n){e=n?o:e;var r=ka(t,w,o,o,o,o,o,e);return r.placeholder=Dc.placeholder,r}function Bc(t,e,n){var r,i,a,s,l,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof t)throw new oe(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n),s}function g(t){return h=t,l=Ss(v,e),d?m(t):s}function y(t){var n=t-u,r=t-h,i=e-n;return p?$e(i,a-r):i}function _(t){var n=t-u,r=t-h;return u===o||n>=e||n<0||p&&r>=a}function v(){var t=Cc();if(_(t))return b(t);l=Ss(v,y(t))}function b(t){return l=o,f&&r?m(t):(r=i=o,s)}function x(){l!==o&&Ho(l),h=0,r=u=i=l=o}function w(){return l===o?s:b(Cc())}function S(){var t=Cc(),n=_(t);if(r=arguments,i=this,u=t,n){if(l===o)return g(u);
vendor: 9,207 bytes, line 32
32if(p)return l=Ss(v,e),m(u)}return l===o&&(l=Ss(v,e)),s}return e=Zu(e)||0,wu(n)&&(d=!!n.leading,p="maxWait"in n,a=p?Ne(Zu(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),S.cancel=x,S.flush=w,S}var zc=vo(function(t,e){return _i(t,1,e)}),Lc=vo(function(t,e,n){return _i(t,Zu(e)||0,n)});function Rc(t){return ka(t,O)}function jc(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new oe(c);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(jc.Cache||$r),n}function Fc(t){if("function"!=typeof t)throw new oe(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Nc(t){return kc(2,t)}jc.Cache=$r;var $c=Uo(function(t,e){e=1==e.length&&au(e[0])?On(e[0],Zn(Va())):On(Ci(e,1),Zn(Va()));var n=e.length;return vo(function(r){var i=-1,o=$e(r.length,n);while(++i<o)r[i]=e[i].call(this,r[i]);return vn(t,this,r)})}),Vc=vo(function(t,e){var n=cr(e,$a(Vc));return ka(t,S,o,e,n)}),Uc=vo(function(t,e){var n=cr(e,$a(Uc));return ka(t,T,o,e,n)}),Gc=La(function(t,e){return ka(t,C,o,o,o,e)});function Hc(t,e){if("function"!=typeof t)throw new oe(c);return e=e===o?e:qu(e),vo(t,e)}function qc(t,e){if("function"!=typeof t)throw new oe(c);return e=null==e?0:Ne(qu(e),0),vo(function(n){var r=n[e],i=Go(n,0,e);return r&&Pn(i,r),vn(t,this,i)})}function Wc(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new oe(c);return wu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Bc(t,e,{leading:r,maxWait:e,trailing:i})}function Zc(t){return Pc(t,1)}function Xc(t,e){return Vc($o(e),t)}function Yc(){if(!arguments.length)return[];var t=arguments[0];return au(t)?t:[t]}function Kc(t){return mi(t,m)}function Jc(t,e){return e="function"==typeof e?e:o,mi(t,m,e)}function Qc(t){return mi(t,p|m)}function tu(t,e){return e="function"==typeof e?e:o,mi(t,p|m,e)}function eu(t,e){return null==e||yi(t,e,bh(e))}function nu(t,e){return t===e||t!==t&&e!==e}var ru=Ta(zi),iu=Ta(function(t,e){return t>=e}),ou=Vi(function(){return arguments}())?Vi:function(t){return Su(t)&&he.call(t,"callee")&&!Te.call(t,"callee")},au=n.isArray,su=pn?Zn(pn):Ui;function lu(t){return null!=t&&xu(t.length)&&!vu(t)}function cu(t){return Su(t)&&lu(t)}function uu(t){return!0===t||!1===t||Su(t)&&Bi(t)==q}var hu=Le||qd,du=fn?Zn(fn):Gi;function pu(t){return Su(t)&&1===t.nodeType&&!Mu(t)}function fu(t){if(null==t)return!0;if(lu(t)&&(au(t)||"string"==typeof t||"function"==typeof t.splice||hu(t)||ju(t)||ou(t)))return!t.length;var e=Xa(t);if(e==J||e==ot)return!t.size;if(hs(t))return!to(t).length;for(var n in t)if(he.call(t,n))return!1;return!0}function mu(t,e){return Hi(t,e)}function gu(t,e,n){n="function"==typeof n?n:o;var r=n?n(t,e):o;return r===o?Hi(t,e,o,n):!!r}function yu(t){if(!Su(t))return!1;var e=Bi(t);return e==X||e==Z||"string"==typeof t.message&&"string"==typeof t.name&&!Mu(t)}function _u(t){return"number"==typeof t&&Re(t)}function vu(t){if(!wu(t))return!1;var e=Bi(t);return e==Y||e==K||e==H||e==rt}function bu(t){return"number"==typeof t&&t==qu(t)}function xu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=L}function wu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Su(t){return null!=t&&"object"==typeof t}var Tu=mn?Zn(mn):Wi;function Eu(t,e){return t===e||Zi(t,e,Ga(e))}function Cu(t,e,n){return n="function"==typeof n?n:o,Zi(t,e,Ga(e),n)}function Ou(t){return Iu(t)&&t!=+t}function Pu(t){if(us(t))throw new i(l);return Xi(t)}function ku(t){return null===t}function Au(t){return null==t}function Iu(t){return"number"==typeof t||Su(t)&&Bi(t)==Q}function Mu(t){if(!Su(t)||Bi(t)!=et)return!1;var e=we(t);if(null===e)return!0;var n=he.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==me}var Du=gn?Zn(gn):Yi;function Bu(t){return bu(t)&&t>=-L&&t<=L}var zu=yn?Zn(yn):Ki;function Lu(t){return"string"==typeof t||!au(t)&&Su(t)&&Bi(t)==at}function Ru(t){return"symbol"==typeof t||Su(t)&&Bi(t)==st}var ju=_n?Zn(_n):Ji;function Fu(t){return t===o}function Nu(t){return Su(t)&&Xa(t)==ct}function $u(t){return Su(t)&&Bi(t)==ut}var Vu=Ta(no),Uu=Ta(function(t,e){return t<=e});function Gu(t){if(!t)return[];if(lu(t))return Lu(t)?mr(t):na(t);if(Oe&&t[Oe])return ar(t[Oe]());var e=Xa(t),n=e==J?sr:e==ot?ur:Fh;return n(t)}function Hu(t){if(!t)return 0===t?t:0;if(t=Zu(t),t===z||t===-z){var e=t<0?-1:1;return e*R}return t===t?t:0}function qu(t){var e=Hu(t),n=e%1;return e===e?n?e-n:e:0}function Wu(t){return t?fi(qu(t),0,F):0}function Zu(t){if("number"==typeof t)return t;if(Ru(t))return j;if(wu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=wu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Rt,"");var n=Zt.test(t);return n||Yt.test(t)?rn(t.slice(2),n?2:8):Wt.test(t)?j:+t}function Xu(t){return ra(t,xh(t))}function Yu(t){return t?fi(qu(t),-L,L):0===t?t:0}function Ku(t){return null==t?"":Mo(t)}var Ju=sa(function(t,e){if(hs(e)||lu(e))ra(e,bh(e),t);else for(var n in e)he.call(e,n)&&si(t,n,e[n])}),Qu=sa(function(t,e){ra(e,xh(e),t)}),th=sa(function(t,e,n,r){ra(e,xh(e),t,r)}),eh=sa(function(t,e,n,r){ra(e,bh(e),t,r)}),nh=La(pi);function rh(t,e){var n=wr(t);return null==e?n:ui(n,e)}var ih=vo(function(t,e){t=ne(t);var n=-1,r=e.length,i=r>2?e[2]:o;i&&os(e[0],e[1],i)&&(r=1);while(++n<r){var a=e[n],s=xh(a),l=-1,c=s.length;while(++l<c){var u=s[l],h=t[u];(h===o||nu(h,le[u])&&!he.call(t,u))&&(t[u]=a[u])}}return t}),oh=vo(function(t){return t.push(o,Ia),vn(Eh,o,t)});function ah(t,e){return zn(t,Va(e,3),ki)}function sh(t,e){return zn(t,Va(e,3),Ai)}function lh(t,e){return null==t?t:Oi(t,Va(e,3),xh)}function ch(t,e){return null==t?t:Pi(t,Va(e,3),xh)}function uh(t,e){return t&&ki(t,Va(e,3))}function hh(t,e){return t&&Ai(t,Va(e,3))}function dh(t){return null==t?[]:Ii(t,bh(t))}function ph(t){return null==t?[]:Ii(t,xh(t))}function fh(t,e,n){var r=null==t?o:Mi(t,e);return r===o?n:r}function mh(t,e){return null!=t&&Ja(t,e,Li)}function gh(t,e){return null!=t&&Ja(t,e,Ri)}var yh=_a(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=fe.call(e)),t[e]=n},Td(Pd)),_h=_a(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=fe.call(e)),he.call(t,e)?t[e].push(n):t[e]=[n]},Va),vh=vo($i);function bh(t){return lu(t)?ni(t):to(t)}function xh(t){return lu(t)?ni(t,!0):eo(t)}function wh(t,e){var n={};return e=Va(e,3),ki(t,function(t,r,i){di(n,e(t,r,i),t)}),n}function Sh(t,e){var n={};return e=Va(e,3),ki(t,function(t,r,i){di(n,r,e(t,r,i))}),n}var Th=sa(function(t,e,n){ao(t,e,n)}),Eh=sa(function(t,e,n,r){ao(t,e,n,r)}),Ch=La(function(t,e){var n={};if(null==t)return n;var r=!1;e=On(e,function(e){return e=Vo(e,t),r||(r=e.length>1),e}),ra(t,ja(t),n),r&&(n=mi(n,p|f|m,Ma));var i=e.length;while(i--)Bo(n,e[i]);return n});function Oh(t,e){return kh(t,Fc(Va(e)))}var Ph=La(function(t,e){return null==t?{}:uo(t,e)});function kh(t,e){if(null==t)return{};var n=On(ja(t),function(t){return[t]});return e=Va(e),ho(t,n,function(t,n){return e(t,n[0])})}function Ah(t,e,n){e=Vo(e,t);var r=-1,i=e.length;i||(i=1,t=o);while(++r<i){var a=null==t?o:t[ks(e[r])];a===o&&(r=i,a=n),t=vu(a)?a.call(t):a}return t}function Ih(t,e,n){return null==t?t:wo(t,e,n)}function Mh(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:wo(t,e,n,r)}var Dh=Pa(bh),Bh=Pa(xh);function zh(t,e,n){var r=au(t),i=r||hu(t)||ju(t);if(e=Va(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:wu(t)&&vu(o)?wr(we(t)):{}}return(i?xn:ki)(t,function(t,r,i){return e(n,t,r,i)}),n}function Lh(t,e){return null==t||Bo(t,e)}function Rh(t,e,n){return null==t?t:zo(t,e,$o(n))}function jh(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zo(t,e,$o(n),r)}function Fh(t){return null==t?[]:Xn(t,bh(t))}function Nh(t){return null==t?[]:Xn(t,xh(t))}function $h(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=Zu(n),n=n===n?n:0),e!==o&&(e=Zu(e),e=e===e?e:0),fi(Zu(t),e,n)}function Vh(t,e,n){return e=Hu(e),n===o?(n=e,e=0):n=Hu(n),t=Zu(t),ji(t,e,n)}function Uh(t,e,n){if(n&&"boolean"!=typeof n&&os(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Hu(t),e===o?(e=t,t=0):e=Hu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=qe();return $e(t+i*(e-t+nn("1e-"+((i+"").length-1))),e)}return go(t,e)}var Gh=da(function(t,e,n){return e=e.toLowerCase(),t+(n?Hh(e):e)});function Hh(t){return _d(Ku(t).toLowerCase())}function qh(t){return t=Ku(t),t&&t.replace(Jt,tr).replace(Ue,"")}function Wh(t,e,n){t=Ku(t),e=Mo(e);var r=t.length;n=n===o?r:fi(qu(n),0,r);var i=n;return n-=e.length,n>=0&&t.slice(n,i)==e}function Zh(t){return t=Ku(t),t&&Pt.test(t)?t.replace(Ct,er):t}function Xh(t){return t=Ku(t),t&&Lt.test(t)?t.replace(zt,"\\$&"):t}var Yh=da(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Kh=da(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Jh=ha("toLowerCase");function Qh(t,e,n){t=Ku(t),e=qu(e);var r=e?fr(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return xa(Be(i),n)+t+xa(De(i),n)}function td(t,e,n){t=Ku(t),e=qu(e);var r=e?fr(t):0;return e&&r<e?t+xa(e-r,n):t}function ed(t,e,n){t=Ku(t),e=qu(e);var r=e?fr(t):0;return e&&r<e?xa(e-r,n)+t:t}
vendor: 6,072 bytes, line 32
32function nd(t,e,n){return n||null==e?e=0:e&&(e=+e),He(Ku(t).replace(jt,""),e||0)}function rd(t,e,n){return e=(n?os(t,e,n):e===o)?1:qu(e),_o(Ku(t),e)}function id(){var t=arguments,e=Ku(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var od=da(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});function ad(t,e,n){return n&&"number"!=typeof n&&os(t,e,n)&&(e=n=o),n=n===o?F:n>>>0,n?(t=Ku(t),t&&("string"==typeof e||null!=e&&!Du(e))&&(e=Mo(e),!e&&ir(t))?Go(mr(t),0,n):t.split(e,n)):[]}var sd=da(function(t,e,n){return t+(n?" ":"")+_d(e)});function ld(t,e,n){return t=Ku(t),n=null==n?0:fi(qu(n),0,t.length),e=Mo(e),t.slice(n,n+e.length)==e}function cd(t,e,n){var r=br.templateSettings;n&&os(t,e,n)&&(e=o),t=Ku(t),e=th({},e,r,Aa);var i,a,s=th({},e.imports,r.imports,Aa),l=bh(s),c=Xn(s,l),u=0,h=e.interpolate||Qt,d="__p += '",p=re((e.escape||Qt).source+"|"+h.source+"|"+(h===It?Ht:Qt).source+"|"+(e.evaluate||Qt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Xe+"]")+"\n";t.replace(p,function(e,n,r,o,s,l){return r||(r=o),d+=t.slice(u,l).replace(te,nr),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+e.length,e}),d+="';\n";var m=e.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(wt,""):d).replace(St,"$1").replace(Tt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=bd(function(){return Ut(l,f+"return "+d).apply(o,c)});if(g.source=d,yu(g))throw g;return g}function ud(t){return Ku(t).toLowerCase()}function hd(t){return Ku(t).toUpperCase()}function dd(t,e,n){if(t=Ku(t),t&&(n||e===o))return t.replace(Rt,"");if(!t||!(e=Mo(e)))return t;var r=mr(t),i=mr(e),a=Kn(r,i),s=Jn(r,i)+1;return Go(r,a,s).join("")}function pd(t,e,n){if(t=Ku(t),t&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Mo(e)))return t;var r=mr(t),i=Jn(r,mr(e))+1;return Go(r,0,i).join("")}function fd(t,e,n){if(t=Ku(t),t&&(n||e===o))return t.replace(jt,"");if(!t||!(e=Mo(e)))return t;var r=mr(t),i=Kn(r,mr(e));return Go(r,i).join("")}function md(t,e){var n=P,r=k;if(wu(e)){var i="separator"in e?e.separator:i;n="length"in e?qu(e.length):n,r="omission"in e?Mo(e.omission):r}t=Ku(t);var a=t.length;if(ir(t)){var s=mr(t);a=s.length}if(n>=a)return t;var l=n-fr(r);if(l<1)return r;var c=s?Go(s,0,l).join(""):t.slice(0,l);if(i===o)return c+r;if(s&&(l+=c.length-l),Du(i)){if(t.slice(l).search(i)){var u,h=c;i.global||(i=re(i.source,Ku(qt.exec(i))+"g")),i.lastIndex=0;while(u=i.exec(h))var d=u.index;c=c.slice(0,d===o?l:d)}}else if(t.indexOf(Mo(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r}function gd(t){return t=Ku(t),t&&Ot.test(t)?t.replace(Et,gr):t}var yd=da(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),_d=ha("toUpperCase");function vd(t,e,n){return t=Ku(t),e=n?o:e,e===o?or(t)?vr(t):Bn(t):t.match(e)||[]}var bd=vo(function(t,e){try{return vn(t,o,e)}catch(n){return yu(n)?n:new i(n)}}),xd=La(function(t,e){return xn(e,function(e){e=ks(e),di(t,e,Ac(t[e],t))}),t});function wd(t){var e=null==t?0:t.length,n=Va();return t=e?On(t,function(t){if("function"!=typeof t[1])throw new oe(c);return[n(t[0]),t[1]]}):[],vo(function(n){var r=-1;while(++r<e){var i=t[r];if(vn(i[0],this,n))return vn(i[1],this,n)}})}function Sd(t){return gi(mi(t,p))}function Td(t){return function(){return t}}function Ed(t,e){return null==t||t!==t?e:t}var Cd=ga(),Od=ga(!0);function Pd(t){return t}function kd(t){return Qi("function"==typeof t?t:mi(t,p))}function Ad(t){return io(mi(t,p))}function Id(t,e){return oo(t,mi(e,p))}var Md=vo(function(t,e){return function(n){return $i(n,t,e)}}),Dd=vo(function(t,e){return function(n){return $i(t,n,e)}});function Bd(t,e,n){var r=bh(e),i=Ii(e,r);null!=n||wu(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ii(e,bh(e)));var o=!(wu(n)&&"chain"in n)||!!n.chain,a=vu(t);return xn(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=na(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pn([this.value()],arguments))})}),t}function zd(){return sn._===this&&(sn._=ge),this}function Ld(){}function Rd(t){return t=qu(t),vo(function(e){return lo(e,t)})}var jd=ba(On),Fd=ba(Sn),Nd=ba(In);function $d(t){return as(t)?$n(ks(t)):po(t)}function Vd(t){return function(e){return null==t?o:Mi(t,e)}}var Ud=Sa(),Gd=Sa(!0);function Hd(){return[]}function qd(){return!1}function Wd(){return{}}function Zd(){return""}function Xd(){return!0}function Yd(t,e){if(t=qu(t),t<1||t>L)return[];var n=F,r=$e(t,F);e=Va(e),t-=F;var i=qn(r,e);while(++n<t)e(n);return i}function Kd(t){return au(t)?On(t,ks):Ru(t)?[t]:na(Ps(Ku(t)))}function Jd(t){var e=++de;return Ku(t)+e}var Qd=va(function(t,e){return t+e},0),tp=Ca("ceil"),ep=va(function(t,e){return t/e},1),np=Ca("floor");function rp(t){return t&&t.length?Si(t,Pd,zi):o}function ip(t,e){return t&&t.length?Si(t,Va(e,2),zi):o}function op(t){return Nn(t,Pd)}function ap(t,e){return Nn(t,Va(e,2))}function sp(t){return t&&t.length?Si(t,Pd,no):o}function lp(t,e){return t&&t.length?Si(t,Va(e,2),no):o}var cp=va(function(t,e){return t*e},1),up=Ca("round"),hp=va(function(t,e){return t-e},0);function dp(t){return t&&t.length?Hn(t,Pd):0}function pp(t,e){return t&&t.length?Hn(t,Va(e,2)):0}return br.after=Oc,br.ary=Pc,br.assign=Ju,br.assignIn=Qu,br.assignInWith=th,br.assignWith=eh,br.at=nh,br.before=kc,br.bind=Ac,br.bindAll=xd,br.bindKey=Ic,br.castArray=Yc,br.chain=Ul,br.chunk=Ds,br.compact=Bs,br.concat=zs,br.cond=wd,br.conforms=Sd,br.constant=Td,br.countBy=tc,br.create=rh,br.curry=Mc,br.curryRight=Dc,br.debounce=Bc,br.defaults=ih,br.defaultsDeep=oh,br.defer=zc,br.delay=Lc,br.difference=Ls,br.differenceBy=Rs,br.differenceWith=js,br.drop=Fs,br.dropRight=Ns,br.dropRightWhile=$s,br.dropWhile=Vs,br.fill=Us,br.filter=nc,br.flatMap=oc,br.flatMapDeep=ac,br.flatMapDepth=sc,br.flatten=qs,br.flatten
vendor: 4,669 bytes, line 32
32Deep=Ws,br.flattenDepth=Zs,br.flip=Rc,br.flow=Cd,br.flowRight=Od,br.fromPairs=Xs,br.functions=dh,br.functionsIn=ph,br.groupBy=uc,br.initial=Js,br.intersection=Qs,br.intersectionBy=tl,br.intersectionWith=el,br.invert=yh,br.invertBy=_h,br.invokeMap=dc,br.iteratee=kd,br.keyBy=pc,br.keys=bh,br.keysIn=xh,br.map=fc,br.mapKeys=wh,br.mapValues=Sh,br.matches=Ad,br.matchesProperty=Id,br.memoize=jc,br.merge=Th,br.mergeWith=Eh,br.method=Md,br.methodOf=Dd,br.mixin=Bd,br.negate=Fc,br.nthArg=Rd,br.omit=Ch,br.omitBy=Oh,br.once=Nc,br.orderBy=mc,br.over=jd,br.overArgs=$c,br.overEvery=Fd,br.overSome=Nd,br.partial=Vc,br.partialRight=Uc,br.partition=gc,br.pick=Ph,br.pickBy=kh,br.property=$d,br.propertyOf=Vd,br.pull=al,br.pullAll=sl,br.pullAllBy=ll,br.pullAllWith=cl,br.pullAt=ul,br.range=Ud,br.rangeRight=Gd,br.rearg=Gc,br.reject=vc,br.remove=hl,br.rest=Hc,br.reverse=dl,br.sampleSize=xc,br.set=Ih,br.setWith=Mh,br.shuffle=wc,br.slice=pl,br.sortBy=Ec,br.sortedUniq=bl,br.sortedUniqBy=xl,br.split=ad,br.spread=qc,br.tail=wl,br.take=Sl,br.takeRight=Tl,br.takeRightWhile=El,br.takeWhile=Cl,br.tap=Gl,br.throttle=Wc,br.thru=Hl,br.toArray=Gu,br.toPairs=Dh,br.toPairsIn=Bh,br.toPath=Kd,br.toPlainObject=Xu,br.transform=zh,br.unary=Zc,br.union=Ol,br.unionBy=Pl,br.unionWith=kl,br.uniq=Al,br.uniqBy=Il,br.uniqWith=Ml,br.unset=Lh,br.unzip=Dl,br.unzipWith=Bl,br.update=Rh,br.updateWith=jh,br.values=Fh,br.valuesIn=Nh,br.without=zl,br.words=vd,br.wrap=Xc,br.xor=Ll,br.xorBy=Rl,br.xorWith=jl,br.zip=Fl,br.zipObject=Nl,br.zipObjectDeep=$l,br.zipWith=Vl,br.entries=Dh,br.entriesIn=Bh,br.extend=Qu,br.extendWith=th,Bd(br,br),br.add=Qd,br.attempt=bd,br.camelCase=Gh,br.capitalize=Hh,br.ceil=tp,br.clamp=$h,br.clone=Kc,br.cloneDeep=Qc,br.cloneDeepWith=tu,br.cloneWith=Jc,br.conformsTo=eu,br.deburr=qh,br.defaultTo=Ed,br.divide=ep,br.endsWith=Wh,br.eq=nu,br.escape=Zh,br.escapeRegExp=Xh,br.every=ec,br.find=rc,br.findIndex=Gs,br.findKey=ah,br.findLast=ic,br.findLastIndex=Hs,br.findLastKey=sh,br.floor=np,br.forEach=lc,br.forEachRight=cc,br.forIn=lh,br.forInRight=ch,br.forOwn=uh,br.forOwnRight=hh,br.get=fh,br.gt=ru,br.gte=iu,br.has=mh,br.hasIn=gh,br.head=Ys,br.identity=Pd,br.includes=hc,br.indexOf=Ks,br.inRange=Vh,br.invoke=vh,br.isArguments=ou,br.isArray=au,br.isArrayBuffer=su,br.isArrayLike=lu,br.isArrayLikeObject=cu,br.isBoolean=uu,br.isBuffer=hu,br.isDate=du,br.isElement=pu,br.isEmpty=fu,br.isEqual=mu,br.isEqualWith=gu,br.isError=yu,br.isFinite=_u,br.isFunction=vu,br.isInteger=bu,br.isLength=xu,br.isMap=Tu,br.isMatch=Eu,br.isMatchWith=Cu,br.isNaN=Ou,br.isNative=Pu,br.isNil=Au,br.isNull=ku,br.isNumber=Iu,br.isObject=wu,br.isObjectLike=Su,br.isPlainObject=Mu,br.isRegExp=Du,br.isSafeInteger=Bu,br.isSet=zu,br.isString=Lu,br.isSymbol=Ru,br.isTypedArray=ju,br.isUndefined=Fu,br.isWeakMap=Nu,br.isWeakSet=$u,br.join=nl,br.kebabCase=Yh,br.last=rl,br.lastIndexOf=il,br.lowerCase=Kh,br.lowerFirst=Jh,br.lt=Vu,br.lte=Uu,br.max=rp,br.maxBy=ip,br.mean=op,br.meanBy=ap,br.min=sp,br.minBy=lp,br.stubArray=Hd,br.stubFalse=qd,br.stubObject=Wd,br.stubString=Zd,br.stubTrue=Xd,br.multiply=cp,br.nth=ol,br.noConflict=zd,br.noop=Ld,br.now=Cc,br.pad=Qh,br.padEnd=td,br.padStart=ed,br.parseInt=nd,br.random=Uh,br.reduce=yc,br.reduceRight=_c,br.repeat=rd,br.replace=id,br.result=Ah,br.round=up,br.runInContext=t,br.sample=bc,br.size=Sc,br.snakeCase=od,br.some=Tc,br.sortedIndex=fl,br.sortedIndexBy=ml,br.sortedIndexOf=gl,br.sortedLastIndex=yl,br.sortedLastIndexBy=_l,br.sortedLastIndexOf=vl,br.startCase=sd,br.startsWith=ld,br.subtract=hp,br.sum=dp,br.sumBy=pp,br.template=cd,br.times=Yd,br.toFinite=Hu,br.toInteger=qu,br.toLength=Wu,br.toLower=ud,br.toNumber=Zu,br.toSafeInteger=Yu,br.toString=Ku,br.toUpper=hd,br.trim=dd,br.trimEnd=pd,br.trimStart=fd,br.truncate=md,br.unescape=gd,br.uniqueId=Jd,br.upperCase=yd,br.upperFirst=_d,br.each=lc,br.eachRight=cc,br.first=Ys,Bd(br,function(){var t={};return ki(br,function(e,n){he.call(br.prototype,n)||(t[n]=e)}),t}(),{chain:!1}),br.VERSION=a,xn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){br[t].placeholder=br}),xn(["drop","take"],function(t,e){Er.prototype[t]=function(n){n=n===o?1:Ne(qu(n),0);var r=this.__filtered__&&!e?new Er(this):this.clone();return r.__filtered__?r.__takeCount__=$e(n,r.__takeCount__):r.__views__.push({size:$e(n,F),type:t+(r.__dir__<0?"Right":"")}),r},Er.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),xn(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==M||n==B;Er.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Va(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),xn(["head","last"],function(t,e){var n="take"+(e?"Right":"");
32Er.prototype[t]=function(){return this[n](1).value()[0]}}),xn(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Er.prototype[t]=function(){return this.__filtered__?new Er(this):this[n](1)}}),Er.prototype.compact=function(){return this.filter(Pd)},Er.prototype.find=function(t){return this.filter(t).head()},Er.prototype.findLast=function(t){return this.reverse().find(t)},Er.prototype.invokeMap=vo(function(t,e){return"function"==typeof t?new Er(this):this.map(function(n){return $i(n,t,e)})}),Er.prototype.reject=function(t){return this.filter(Fc(Va(t)))},Er.prototype.slice=function(t,e){t=qu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Er(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(e=qu(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},Er.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Er.prototype.toArray=function(){return this.take(F)},ki(Er.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=br[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(br.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,l=e instanceof Er,c=s[0],u=l||au(e),h=function(t){var e=i.apply(br,Pn([t],s));return r&&d?e[0]:e};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=a&&!d,m=l&&!p;if(!a&&u){e=m?e:new Er(this);var g=t.apply(e,s);return g.__actions__.push({func:Hl,args:[h],thisArg:o}),new Tr(g,d)}return f&&m?t.apply(this,s):(g=this.thru(h),f?r?g.value()[0]:g.value():g)})}),xn(["pop","push","shift","sort","splice","unshift"],function(t){var e=ae[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);br.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(au(i)?i:[],t)}return this[n](function(n){return e.apply(au(n)?n:[],t)})}}),ki(Er.prototype,function(t,e){var n=br[e];if(n){var r=n.name+"",i=cn[r]||(cn[r]=[]);i.push({name:e,func:n})}}),cn[ya(o,v).name]=[{name:"wrapper",func:o}],Er.prototype.clone=Cr,Er.prototype.reverse=Or,Er.prototype.value=Pr,br.prototype.at=ql,br.prototype.chain=Wl,br.prototype.commit=Zl,br.prototype.next=Xl,br.prototype.plant=Kl,br.prototype.reverse=Jl,br.prototype.toJSON=br.prototype.valueOf=br.prototype.value=Ql,br.prototype.first=br.prototype.head,Oe&&(br.prototype[Oe]=Yl),br},xr=br();sn._=xr,i=function(){return xr}.call(e,n,e,r),i===o||(r.exports=i)}).call(this)}).call(this,n("c8ba"),n("62e4")(t))},"2f21":function(t,e,n){"use strict";var r=n("79e5");t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},"2f37":function(t,e,n){var r=n("63b6");r(r.S,"Date",{now:function(){return(new Date).getTime()}})},"30b5":function(t,e,n){"use strict";var r=n("c532");function i(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,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),i=n("63b6"),o=n("9138"),a=n("35e8"),s=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),h=n("5168")("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",f="keys",m="values",g=function(){return this};t.exports=function(t,e,n,y,_,v,b){l(n,e,y);var x,w,S,T=function(t){if(!d&&t in P)return P[t];switch(t){case f:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",C=_==m,O=!1,P=t.prototype,k=P[h]||P[p]||_&&P[_],A=k||T(_),I=_?C?T("entries"):A:void 0,M="Array"==e&&P.entries||k;if(M&&(S=u(M.call(new t)),S!==Object.prototype&&S.next&&(c(S,E,!0),r||"function"==typeof S[h]||a(S,h,g))),C&&k&&k.name!==m&&(O=!0,A=function(){return k.call(this)}),r&&!b||!d&&!O&&P[h]||a(P,h,A),s[e]=A,s[E]=g,_)if(x={values:C?A:T(m),keys:v?A:T(f),entries:I}
vendor: 1,301 bytes, lines 32-33
32,b)for(w in x)w in P||o(P,w,x[w]);else i(i.P+i.F*(d||O),e,x);return x}},"31f4":function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},"32a6":function(t,e,n){var r=n("241e"),i=n("c3a1");n("ce7e")("keys",function(){return function(t){return i(r(t))}})},"32e9":function(t,e,n){var r=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"33a4":function(t,e,n){var r=n("84f2"),i=n("2b4c")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},"355d":function(t,e){e.f={}.propertyIsEnumerable},"35e8":function(t,e,n){var r=n("d9f6"),i=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"369b":function(t,e,n){var r,i,o;
33/* @license
vendor: 14,634 bytes, lines 34-38
34Papa Parse
35v4.6.3
36https://github.com/mholt/PapaParse
37License: MIT
38*/Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)}(0,function(){"use strict";var t,e,n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{},r=!n.document&&!!n.postMessage,i=r&&/(\?|&)papaworker(=|&|$)/.test(n.location.search),o=!1,a={},s=0,l={parse:function(e,r){var i=(r=r||{}).dynamicTyping||!1;if(S(i)&&(r.dynamicTypingFunction=i,i={}),r.dynamicTyping=i,r.transform=!!S(r.transform)&&r.transform,r.worker&&l.WORKERS_SUPPORTED){var c=function(){if(!l.WORKERS_SUPPORTED)return!1;if(!o&&null===l.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=l.SCRIPT_PATH||t;e+=(-1!==e.indexOf("?")?"&":"?")+"papaworker";var r=new n.Worker(e);return r.onmessage=_,r.id=s++,a[r.id]=r}();return c.userStep=r.step,c.userChunk=r.chunk,c.userComplete=r.complete,c.userError=r.error,r.step=S(r.step),r.chunk=S(r.chunk),r.complete=S(r.complete),r.error=S(r.error),delete r.worker,void c.postMessage({input:e,config:r,workerId:c.id})}var u=null;return l.NODE_STREAM_INPUT,"string"==typeof e?u=r.download?new h(r):new p(r):!0===e.readable&&S(e.read)&&S(e.on)?u=new f(r):(n.File&&e instanceof File||e instanceof Object)&&(u=new d(r)),u.stream(e)},unparse:function(t,e){var n=!1,r=!0,i=",",o="\r\n",a='"',s=!1;!function(){"object"==typeof e&&("string"!=typeof e.delimiter||l.BAD_DELIMITERS.filter(function(t){return-1!==e.delimiter.indexOf(t)}).length||(i=e.delimiter),("boolean"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(s=e.skipEmptyLines),"string"==typeof e.newline&&(o=e.newline),"string"==typeof e.quoteChar&&(a=e.quoteChar),"boolean"==typeof e.header&&(r=e.header))}();var c=new RegExp(g(a),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return h(null,t,s);if("object"==typeof t[0])return h(u(t[0]),t,s)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:u(t.data[0])),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),h(t.fields||[],t.data||[],s);throw"exception: Unable to serialize unrecognized input";function u(t){if("object"!=typeof t)return[];var e=[];for(var n in t)e.push(n);return e}function h(t,e,n){var a="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var s=Array.isArray(t)&&0<t.length,l=!Array.isArray(e[0]);if(s&&r){for(var c=0;c<t.length;c++)0<c&&(a+=i),a+=d(t[c],c);0<e.length&&(a+=o)}for(var u=0;u<e.length;u++){var h=s?t.length:e[u].length,p=!1,f=s?0===Object.keys(e[u]).length:0===e[u].length;if(n&&!s&&(p="greedy"===n?""===e[u].join("").trim():1===e[u].length&&0===e[u][0].length),"greedy"===n&&s){for(var m=[],g=0;g<h;g++){var y=l?t[g]:g;m.push(e[u][y])}p=""===m.join("").trim()}if(!p){for(var _=0;_<h;_++){0<_&&!f&&(a+=i);var v=s&&l?t[_]:_;a+=d(e[u][v],_)}u<e.length-1&&(!n||0<h&&!f)&&(a+=o)}}return a}function d(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);t=t.toString().replace(c,a+a);var r="boolean"==typeof n&&n||Array.isArray(n)&&n[e]||function(t,e){for(var n=0;n<e.length;n++)if(-1<t.indexOf(e[n]))return!0;return!1}(t,l.BAD_DELIMITERS)||-1<t.indexOf(i)||" "===t.charAt(0)||" "===t.charAt(t.length-1);return r?a+t+a:t}}};if(l.RECORD_SEP=String.fromCharCode(30),l.UNIT_SEP=String.fromCharCode(31),l.BYTE_ORDER_MARK="\ufeff",l.BAD_DELIMITERS=["\r","\n",'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!r&&!!n.Worker,l.SCRIPT_PATH=null,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=y,l.ParserHandle=m,l.NetworkStreamer=h,l.FileStreamer=d,l.StringStreamer=p,l.ReadableStreamStreamer=f,n.jQuery){var c=n.jQuery;c.fn.parse=function(t){var e=t.config||{},r=[];return this.each(function(t){if("INPUT"!==c(this).prop("tagName").toUpperCase()||"file"!==c(this).attr("type").toLowerCase()||!n.FileReader||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:c.extend({},e)})}),i(),this;function i(){if(0!==r.length){var e,n,i,a,s=r[0];if(S(t.before)){var u=t.before(s.file,s.inputElem);if("object"==typeof u){if("abort"===u.action)return e="AbortError",n=s.file,i=s.inputElem,a=u.reason,void(S(t.error)&&t.error({name:e},n,i,a));if("skip"===u.action)return void o();"object"==typeof u.config&&(s.instanceConfig=c.extend(s.instanceConfig,u.config))}else if("skip"===u)return void o()}var h=s.instanceConfig.complete;s.instanceConfig.complete=function(t){S(h)&&h(t,s.file,s.inputElem),o()},l.parse(s.file,s.instanceConfig)}else S(t.complete)&&t.complete()}function o(){r.splice(0,1),i()}}}function u(t){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(t){var e=x(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new m(e),(this._handle.streamer=this)._config=e}.call(this,t),this.parseChunk=function(t,e){if(this.isFirstChunk&&S(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(t);void 0!==r&&(t=r)}this.isFirstChunk=!1;var o=this._partialLine+t;this._partialLine="";var a=this._handle.parse(o,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=a.meta.cursor;this._finished||(this._partialLine=o.substring(s-this._baseIndex),this._baseIndex=s),a&&a.data&&(this._rowCount+=a.data.length);var c=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)n.postMessage({results:a,workerId:l.WORKER_ID,finished:c});else if(S(this._config.chunk)&&!e){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return;a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!S(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}},this._sendError=function(t){S(this._config.error)?this._config.error(t):i&&this._config.error&&n.postMessage({workerId:l.WORKER_ID,error:t,finished:!1})}}function h(t){var e;(t=t||{}).chunkSize||(t.chunkSize=l.RemoteChunkSize),u.call(this,t),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),r||(e.onload=w(this._chunkLoaded,this),e.onerror=w(this._chunkError,this)),e.open("GET",this._input,!r),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var n in t)e.setRequestHeader(n,t[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;e.setRequestHeader("Range","bytes="+this._start+"-"+i),e.setRequestHeader("If-None-Match","webkit-no-cache")}try{e.send()}catch(t){this._chunkError(t.message)}r&&0===e.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||400<=e.status?this._chunkError():(this._finished=!this._config.chunkSize||this._start>function(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substr(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){var n=e.statusText||t;this._sendError(new Error(n))}}function d(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=l.LocalChunkSize),u.call(this,t);var r="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,r?((e=new FileReader).onload=w(this._chunkLoaded,this),e.onerror=w(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var i=Math.min(this._start+this._config.chunkSize,this._input.size);t=n.call(t,this._start,i)}var o=e.readAsText(t,this._config.encoding);r||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function p(t){var e;u.call(this,t=t||{}),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t=this._config.chunkSize,n=t?e.substr(0,t):e;return e=t?e.substr(t):"",this._finished=!e,this.parseChunk(n)}}}function f(t){u.call(this,t=t||{});var e=[],n=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):n=!0},this._streamData=w(function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}},this),this._streamError=w(function(t){this._streamCleanUp(),this._sendError(t)},this),this._streamEnd=w(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=w(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(t){var e,n,r,i=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,o=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,a=this,s=0,c=0,u=!1,h=!1,d=[],p={data:[],errors:[],meta:{}};if(S(t.step)){var f=t.step;t.step=function(e){if(p=e,v())_();else{if(_(),0===p.data.length)return;s+=e.data.length,t.preview&&s>t.preview?n.abort():f(p,a)}}}function m(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function _(){if(p&&r&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines)for(var e=0;e<p.data.length;e++)m(p.data[e])&&p.data.splice(e--,1);return v()&&function(){if(p){for(var e=0;v()&&e<p.data.length;e++)for(var n=0;n<p.data[e].length;n++){var r=p.data[e][n];t.trimHeaders&&(r=r.trim()),d.push(r)}p.data.splice(0,1)}}(),function(){if(!p||!t.header&&!t.dynamicTyping&&!t.transform)return p;for(var e=0;e<p.data.length;e++){var n,r=t.header?{}:[];for(n=0;n<p.data[e].length;n++){var i=n,o=p.data[e][n];t.header&&(i=n>=d.length?"__parsed_extra":d[n]),t.transform&&(o=t.transform(o,i)),o=b(i,o),"__parsed_extra"===i?(r[i]=r[i]||[],r[i].push(o)):r[i]=o}p.data[e]=r,t.header&&(n>d.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+d.length+" fields but parsed "+n,c+e):n<d.length&&w("FieldMismatch","TooFewFields","Too few fields: expected "+d.length+" fields but parsed "+n,c+e))}return t.header&&p.meta&&(p.meta.fields=d),c+=p.data.length,p}()}function v(){return t.header&&0===d.length}function b(e,n){return r=e,t.dynamicTypingFunction&&void 0===t.dynamicTyping[r]&&(t.dynamicTyping[r]=t.dynamicTypingFunction(r)),!0===(t.dynamicTyping[r]||t.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(i.test(n)?parseFloat(n):o.test(n)?new Date(n):""===n?null:n):n;var r}function w(t,e,n,r){p.errors.push({type:t,code:e,message:n,row:r})}this.parse=function(i,o,a){var s=t.quoteChar||'"';if(t.newline||(t.newline=function(t,e){t=t.substr(0,1048576);var n=new RegExp(g(e)+"([^]*?)"+g(e),"gm"),r=(t=t.replace(n,"")).split("\r"),i=t.split("\n"),o=1<i.length&&i[0].length<r[0].length;if(1===r.length||o)return"\n";for(var a=0,s=0;s<r.length;s++)"\n"===r[s][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(i,s)),r=!1,t.delimiter)S(t.delimiter)&&(t.delimiter=t.delimiter(i),p.meta.delimiter=t.delimiter);else{var c=function(e,n,r,i){for(var o,a,s,c=[",","\t","|",";",l.RECORD_SEP,l.UNIT_SEP],u=0;u<c.length;u++){var h=c[u],d=0,p=0,f=0;s=void 0;for(var g=new y({comments:i,delimiter:h,newline:n,preview:10}).parse(e),_=0;_<g.data.length;_++)if(r&&m(g.data[_]))f++;else{var v=g.data[_].length;p+=v,void 0!==s?1<v&&(d+=Math.abs(v-s),s=v):s=0}0<g.data.length&&(p/=g.data.length-f),(void 0===a||a<d)&&1.99<p&&(a=d,o=h)}return{successful:!!(t.delimiter=o),bestDelimiter:o}}(i,t.newline,t.skipEmptyLines,t.comments);c.successful?t.delimiter=c.bestDelimiter:(r=!0,t.delimiter=l.DefaultDelimiter),p.meta.delimiter=t.delimiter}var h=x(t);return t.preview&&t.header&&h.preview++,e=i,n=new y(h),p=n.parse(e,o,a),_(),u?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,n.abort(),e=e.substr(n.getCharIndex())},this.resume=function(){u=!1,a.streamer.parseChunk(e,!0)},this.aborted=function(){return h},this.abort=function(){h=!0,n.abort(),p.meta.aborted=!0,S(t.complete)&&t.complete(p),e=""}}function g(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(t){var e,n=(t=t||{}).delimiter,r=t.newline,i=t.comments,o=t.step,a=t.preview,s=t.fastMode,c=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(c=t.escapeChar),("string"!=typeof n||-1<l.BAD_DELIMITERS.indexOf(n))&&(n=","),i===n)throw"Comment character same as delimiter";!0===i?i="#":("string"!=typeof i||-1<l.BAD_DELIMITERS.indexOf(i))&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var u=0,h=!1;this.parse=function(t,l,d){if("string"!=typeof t)throw"Input must be a string";var p=t.length,f=n.length,m=r.length,y=i.length,_=S(o),v=[],b=[],x=[],w=u
38=0;if(!t)return L();if(s||!1!==s&&-1===t.indexOf(e)){for(var T=t.split(r),E=0;E<T.length;E++){if(x=T[E],u+=x.length,E!==T.length-1)u+=r.length;else if(d)return L();if(!i||x.substr(0,y)!==i){if(_){if(v=[],M(x.split(n)),R(),h)return L()}else M(x.split(n));if(a&&a<=E)return v=v.slice(0,a),L(!0)}}return L()}for(var C,O=t.indexOf(n,u),P=t.indexOf(r,u),k=new RegExp(g(c)+g(e),"g");;)if(t[u]!==e)if(i&&0===x.length&&t.substr(u,y)===i){if(-1===P)return L();u=P+m,P=t.indexOf(r,u),O=t.indexOf(n,u)}else if(-1!==O&&(O<P||-1===P))x.push(t.substring(u,O)),u=O+f,O=t.indexOf(n,u);else{if(-1===P)break;if(x.push(t.substring(u,P)),z(P+m),_&&(R(),h))return L();if(a&&v.length>=a)return L(!0)}else for(C=u,u++;;){if(-1===(C=t.indexOf(e,C+1)))return d||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:v.length,index:u}),B();if(C===p-1)return B(t.substring(u,C).replace(k,e));if(e!==c||t[C+1]!==c){if(e===c||0===C||t[C-1]!==c){var A=D(-1===P?O:Math.min(O,P));if(t[C+1+A]===n){x.push(t.substring(u,C).replace(k,e)),u=C+1+A+f,O=t.indexOf(n,u),P=t.indexOf(r,u);break}var I=D(P);if(t.substr(C+1+I,m)===r){if(x.push(t.substring(u,C).replace(k,e)),z(C+1+I+m),O=t.indexOf(n,u),_&&(R(),h))return L();if(a&&v.length>=a)return L(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:v.length,index:u}),C++}}else C++}return B();function M(t){v.push(t),w=u}function D(e){var n=0;if(-1!==e){var r=t.substring(C+1,e);r&&""===r.trim()&&(n=r.length)}return n}function B(e){return d||(void 0===e&&(e=t.substr(u)),x.push(e),u=p,M(x),_&&R()),L()}function z(e){u=e,M(x),x=[],P=t.indexOf(r,u)}function L(t){return{data:v,errors:b,meta:{delimiter:n,linebreak:r,aborted:h,truncated:!!t,cursor:w+(l||0)}}}function R(){o(L()),v=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return u}}function _(t){var e=t.data,n=a[e.workerId],r=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){r=!0,v(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(S(n.userStep)){for(var o=0;o<e.results.data.length&&(n.userStep({data:[e.results.data[o]],errors:e.results.errors,meta:e.results.meta},i),!r);o++);delete e.results}else S(n.userChunk)&&(n.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!r&&v(e.workerId,e.results)}function v(t,e){var n=a[t];S(n.userComplete)&&n.userComplete(e),n.terminate(),delete a[t]}function b(){throw"Not implemented."}function x(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=x(t[n]);return e}function w(t,e){return function(){t.apply(e,arguments)}}function S(t){return"function"==typeof t}return i?n.onmessage=function(t){var e=t.data;if(void 0===l.WORKER_ID&&e&&(l.WORKER_ID=e.workerId),"string"==typeof e.input)n.postMessage({workerId:l.WORKER_ID,results:l.parse(e.input,e.config),finished:!0});else if(n.File&&e.input instanceof File||e.input instanceof Object){var r=l.parse(e.input,e.config);r&&n.postMessage({workerId:l.WORKER_ID,results:r,finished:!0})}}:l.WORKERS_SUPPORTED&&(e=document.getElementsByTagName("script"),t=e.length?e[e.length-1].src:"",document.body?document.addEventListener("DOMContentLoaded",function(){o=!0},!0):o=!0),(h.prototype=Object.create(u.prototype)).constructor=h,(d.prototype=Object.create(u.prototype)).constructor=d,(p.prototype=Object.create(p.prototype)).constructor=p,(f.prototype=Object.create(u.prototype)).constructor=f,l})},"36c3":function(t,e,n){var r=n("335c"),i=n("25eb");t.exports=function(t){return r(i(t))}},3702:function(t,e,n){var r=n("481b"),i=n("5168")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},3846:function(t,e,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"386b":function(t,e,n){var r=n("5ca1"),i=n("79e5"),o=n("be13"),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},"386d":function(t,e,n){"use strict";var r=n("cb7c"),i=n("83a1"),o=n("5f1b");n("214f")("search",1,function(t,e,n,a){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),l=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var u=o(s,l);return i(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]})},"387f":function(t,e,n){"use strict";
38t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},"38fd":function(t,e,n){var r=n("69a8"),i=n("4bf8"),o=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},3934:function(t,e,n){"use strict";var r=n("c532");t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return function(){return!0}}()},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"3be2":function(t,e,n){t.exports=n("8790")},"40c3":function(t,e,n){var r=n("6b4c"),i=n("5168")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),i=n("4630"),o=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},4209:function(t,e){var n=t.exports={};n.onSetup=function(){return this.setActionableState(),{}},n.toDisplayFeatures=function(t,e,n){n(e)}},4362:function(t,e,n){e.nextTick=function(t){setTimeout(t,0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,r="/";e.cwd=function(){return r},e.chdir=function(e){t||(t=n("df7c")),r=t.resolve(e,r)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},4517:function(t,e,n){var r=n("a22a");t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},"454f":function(t,e,n){n("46a7");var r=n("584a").Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"45f2":function(t,e,n){var r=n("d9f6").f,i=n("07e3"),o=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"467f":function(t,e,n){"use strict";var r=n("2d83");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)}},"469f":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("7d7b")},"46a7":function(t,e,n){var r=n("63b6");r(r.S+r.F*!n("8e60"),"Object",{defineProperty:n("d9f6").f})},"47ee":function(t,e,n){var r=n("c3a1"),i=n("9aa9"),o=n("355d");t.exports=function(t){var e=r(t),n=i.f;if(n){var a,s=n(t),l=o.f,c=0;while(s.length>c)l.call(t,a=s[c++])&&e.push(a)}return e}},"481b":function(t,e){t.exports={}},"4a59":function(t,e,n){var r=n("9b43"),i=n("1fa8"),o=n("33a4"),a=n("cb7c"),s=n("9def"),l=n("27ee"),c={},u={};e=t.exports=function(t,e,n,h,d){var p,f,m,g,y=d?function(){return t}:l(t),_=r(n,h,e?2:1),v=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(p=s(t.length);p>v;v++)if(g=e?_(a(f=t[v])[0],f[1]):_(t[v]),g===c||g===u)return g}else for(m=y.call(t);!(f=m.next()).done;)if(g=i(m,_,f.value,e),g===c||g===u)return g};e.BREAK=c,e.RETURN=u},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4c95":function(t,e,n){"use strict";var r=n("e53d"),i=n("584a"),o=n("d9f6"),a=n("8e60"),s=n("5168")("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];
vendor: 5,162 bytes, line 38
38a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(a){}return n}},5037:function(t,e,n){n("c207"),n("1654"),n("6c1c"),n("837d"),n("5cb6"),n("fe1e"),n("7554"),t.exports=n("584a").Map},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5168:function(t,e,n){var r=n("dbdb")("wks"),i=n("62a0"),o=n("e53d").Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},5176:function(t,e,n){t.exports=n("51b6")},"51b6":function(t,e,n){n("a3c3"),t.exports=n("584a").Object.assign},"520a":function(t,e,n){"use strict";var r=n("0bfb"),i=RegExp.prototype.exec,o=String.prototype.replace,a=i,s="lastIndex",l=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[s]||0!==e[s]}(),c=void 0!==/()??/.exec("")[1],u=l||c;u&&(a=function(t){var e,n,a,u,h=this;return c&&(n=new RegExp("^"+h.source+"$(?!\\s)",r.call(h))),l&&(e=h[s]),a=i.call(h,t),l&&a&&(h[s]=h.global?a.index+a[0].length:e),c&&a&&a.length>1&&o.call(a[0],n,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(a[u]=void 0)}),a}),t.exports=a},"522e":function(t,e,n){var r=n("f772"),i=n("ebfd").onFreeze;n("ce7e")("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},5270:function(t,e,n){"use strict";var r=n("c532"),i=n("c401"),o=n("2e67"),a=n("2444"),s=n("d925"),l=n("e683");function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){c(t),t.baseURL&&!s(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]});var e=t.adapter||a.adapter;return e(t).then(function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},"52a7":function(t,e){e.f={}.propertyIsEnumerable},"536b":function(t,e,n){var r=n("5ca1"),i=Math.asinh;function o(t){return isFinite(t=+t)&&0!=t?t<0?-o(-t):Math.log(t+Math.sqrt(t*t+1)):t}r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:o})},"53e2":function(t,e,n){var r=n("07e3"),i=n("241e"),o=n("5559")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"549b":function(t,e,n){"use strict";var r=n("d864"),i=n("63b6"),o=n("241e"),a=n("b0dc"),s=n("3702"),l=n("b447"),c=n("20fd"),u=n("7cd6");i(i.S+i.F*!n("4ee1")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,h,d=o(t),p="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m,y=0,_=u(d);if(g&&(m=r(m,f>2?arguments[2]:void 0,2)),void 0==_||p==Array&&s(_))for(e=l(d.length),n=new p(e);e>y;y++)c(n,y,g?m(d[y],y):d[y]);else for(h=_.call(d),n=new p;!(i=h.next()).done;y++)c(n,y,g?a(h,m,[i.value,y],!0):i.value);return n.length=y,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},"551c":function(t,e,n){"use strict";var r,i,o,a,s=n("2d00"),l=n("7726"),c=n("9b43"),u=n("23c6"),h=n("5ca1"),d=n("d3f4"),p=n("d8e8"),f=n("f605"),m=n("4a59"),g=n("ebd6"),y=n("1991").set,_=n("8079")(),v=n("a5b8"),b=n("9c80"),x=n("a25f"),w=n("bcaa"),S="Promise",T=l.TypeError,E=l.process,C=E&&E.versions,O=C&&C.v8||"",P=l[S],k="process"==u(E),A=function(){},I=i=v.f,M=!!function(){try{var t=P.resolve(1),e=(t.constructor={})[n("2b4c")("species")]=function(t){t(A,A)};return(k||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof e&&0!==O.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(r){}}(),D=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},B=function(t,e){if(!t._n){t._n=!0;var n=t._c;_(function(){var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(i||(2==t._h&&R(t),t._h=1),!0===s?n=r:(u&&u.enter(),n=s(r),u&&(u.exit(),a=!0)),n===e.promise?c(T("Promise-chain cycle")):(o=D(n))?o.call(n,l,c):l(n)):c(r)}catch(h){u&&!a&&u.exit(),c(h)}};while(n.length>o)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&z(t)})}},z=function(t){y.call(l,function(){var e,n,r,i=t._v,o=L(t);if(o&&(e=b(function(){k?E.emit("unhandledRejection",i,t):(n=l.onunhandledrejection)?n({promise:t,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=k||L(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){y.call(l,function(){var e;k?E.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},j=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),B(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;
38try{if(n===t)throw T("Promise can't be resolved itself");(e=D(t))?_(function(){var r={_w:n,_d:!1};try{e.call(t,c(F,r,1),c(j,r,1))}catch(i){j.call(r,i)}}):(n._v=t,n._s=1,B(n,!1))}catch(r){j.call({_w:n,_d:!1},r)}}};M||(P=function(t){f(this,P,S,"_h"),p(t),r.call(this);try{t(c(F,this,1),c(j,this,1))}catch(e){j.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("dcbc")(P.prototype,{then:function(t,e){var n=I(g(this,P));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=k?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&B(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(F,t,1),this.reject=c(j,t,1)},v.f=I=function(t){return t===P||t===a?new o(t):i(t)}),h(h.G+h.W+h.F*!M,{Promise:P}),n("7f20")(P,S),n("7a56")(S),a=n("8378")[S],h(h.S+h.F*!M,S,{reject:function(t){var e=I(this),n=e.reject;return n(t),e.promise}}),h(h.S+h.F*(s||!M),S,{resolve:function(t){return w(s&&this===a?P:this,t)}}),h(h.S+h.F*!(M&&n("5cc5")(function(t){P.all(t)["catch"](A)})),S,{all:function(t){var e=this,n=I(e),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,a=1;m(t,!1,function(t){var s=o++,l=!1;n.push(void 0),a++,e.resolve(t).then(function(t){l||(l=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=I(e),r=n.reject,i=b(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},5537:function(t,e,n){var r=n("8378"),i=n("7726"),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var r=n("dbdb")("keys"),i=n("62a0");t.exports=function(t){return r[t]||(r[t]=i(t))}},"55dd":function(t,e,n){"use strict";var r=n("5ca1"),i=n("d8e8"),o=n("4bf8"),a=n("79e5"),s=[].sort,l=[1,2,3];r(r.P+r.F*(a(function(){l.sort(void 0)})||!a(function(){l.sort(null)})||!n("2f21")(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),i(t))}})},"57b1":function(t,e,n){var r=n("d864"),i=n("335c"),o=n("241e"),a=n("b447"),s=n("bfac");t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,h=6==t,d=5==t||h,p=e||s;return function(e,s,f){for(var m,g,y=o(e),_=i(y),v=r(s,f,3),b=a(_.length),x=0,w=n?p(e,b):l?p(e,0):void 0;b>x;x++)if((d||x in _)&&(m=_[x],g=v(m,x,y),t))if(n)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(u)return!1;return h?-1:c||u?u:w}}},"584a":function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"59ad":function(t,e,n){t.exports=n("7be7")},"5aee":function(t,e,n){"use strict";var r=n("d9f6").f,i=n("a159"),o=n("5c95"),a=n("d864"),s=n("1173"),l=n("a22a"),c=n("30f1"),u=n("50ed"),h=n("4c95"),d=n("8e60"),p=n("ebfd").fastKey,f=n("9f79"),m=d?"_s":"size",g=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var u=t(function(t,r){s(t,u,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=r&&l(r,n,t[c],t)});return o(u.prototype,{clear:function(){for(var t=f(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=f(this,e),r=g(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(t){f(this,e);var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);while(n=n?n.n:this._f){r(n.v,n.k,this);while(n&&n.r)n=n.p}},has:function(t){return!!g(f(this,e),t)}}),d&&r(u.prototype,"size",{get:function(){return f(this,e)[m]}}),u},def:function(t,e,n){var r,i,o=g(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=f(t,e),this._k=n,this._l=void 0},function(){var t=this,e=t._k,n=t._l;while(n&&n.r)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?u(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,u(1))},n?"entries":"values",!n,!0),h(e)}}},"5b4e":function(t,e,n){var r=n("36c3"),i=n("b447"),o=n("0fc9");t.exports=function(t){return function(e,n,a){var s,l=r(e),c=i(l.length),u=o(a,c);if(t&&n!=n){while(c>u)if(s=l[u++],s!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},"5c95":function(t,e,n){var r=n("35e8");t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},"5ca1":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("32e9"),a=n("2aba"),s=n("9b43"),l="prototype",c=function(t,e,n){var u,h,d,p,f=t&c.F,m=t&c.G,g=t&c.S,y=t&c.P,_=t&c.B,v=m?r:g?r[e]||(r[e]={}):(r[e]||{})[l],b=m?i:i[e]||(i[e]={}),x=b[l]||(b[l]={});for(u in m&&(n=e),n)h=!f&&v&&void 0!==v[u],d=(h?v:n)[u],p=_&&h?s(d,r):y&&"function"==typeof d?s(Function.call,d):d,v&&a(v,u,d,t&c.U),b[u]!=d&&o(b,u,p),y&&x[u]!=d&&(x[u]=d)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},"5cb6":function(t,e,n){var r=n("63b6");r(r.P+r.R,"Map",{toJSON:n("f228")("Map")})},"5cc5":function(t,e,n){var r=n("2b4c")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(a){}return n}},"5d58":function(t,e,n){t.exports=n("d8d6")},"5d73":function(t,e,n){t.exports=n("469f")},"5dbc":function(t,e,n){var r=n("d3f4"),i=n("8b97").set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"5f5b":function(t,e,n){"use strict";var r=n("2b0e"),i=r["default"],o=function(){return Array.from.apply(Array,arguments)},a=function(t){return Array.isArray(t)},s=function(t,e){return-1!==t.indexOf(e)},l=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Array.prototype.concat.apply([],e)};function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
38e%2?c(Object(n),!0).forEach(function(e){h(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t){return 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},d(t)}var p=function(){return Object.assign.apply(Object,arguments)},f=function(t,e){return Object.create(t,e)},m=function(t,e){return Object.defineProperties(t,e)},g=function(t,e,n){return Object.defineProperty(t,e,n)},y=function(t){return Object.freeze(t)},_=function(t){return Object.getOwnPropertyNames(t)},v=function(t){return Object.keys(t)},b=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},x=function(t){return Object.prototype.toString.call(t)},w=function(t){return null!==t&&"object"===d(t)},S=function(t){return"[object Object]"===Object.prototype.toString.call(t)},T=function(t){return u({},t)},E=function(t,e){return v(t).filter(function(t){return-1!==e.indexOf(t)}).reduce(function(e,n){return u(u({},e),{},h({},n,t[n]))},{})},C=function(t,e){return v(t).filter(function(t){return-1===e.indexOf(t)}).reduce(function(e,n){return u(u({},e),{},h({},n,t[n]))},{})},O=function(){return{enumerable:!0,configurable:!1,writable:!1}},P=function t(e){var n=v(e);return n.forEach(function(n){var r=e[n];e[n]=r&&(S(r)||a(r))?t(r):r}),y(e)};function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach(function(e){I(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}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 M(t){return L(t)||z(t)||B(t)||D()}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(t,e){if(t){if("string"===typeof t)return R(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(t,e):void 0}}function z(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function L(t){if(Array.isArray(t))return R(t)}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var j=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return a(e)?e.reduce(function(e,n){return[].concat(M(e),[t(n,n)])},[]):S(e)?v(e).reduce(function(n,r){return A(A({},n),{},I({},r,t(e[r],e[r])))},{}):n},F=j,N=function(t){return t},$=N,V=n("938d");function U(t){return U="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},U(t)}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Q(t,e)}function q(t){var e=K();return function(){var n,r=tt(t);if(e){var i=tt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return W(this,n)}}function W(t,e){return!e||"object"!==U(e)&&"function"!==typeof e?Z(t):e}function Z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function X(t){var e="function"===typeof Map?new Map:void 0;return X=function(t){if(null===t||!J(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Y(t,arguments,tt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Q(n,t)},X(t)}function Y(t,e,n){return Y=K()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=Function.bind.apply(t,r),o=new i;return n&&Q(o,n.prototype),o},Y.apply(null,arguments)}function K(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function J(t){return-1!==Function.toString.call(t).indexOf("[native code]")}
38function Q(t,e){return Q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Q(t,e)}function tt(t){return tt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tt(t)}var et=V["i"]?window:{},nt=V["i"]?et.Element:function(t){H(n,t);var e=q(n);function n(){return G(this,n),e.apply(this,arguments)}return n}(X(Object)),rt=V["i"]?et.HTMLElement:function(t){H(n,t);var e=q(n);function n(){return G(this,n),e.apply(this,arguments)}return n}(nt),it=V["i"]?et.SVGElement:function(t){H(n,t);var e=q(n);function n(){return G(this,n),e.apply(this,arguments)}return n}(nt),ot=V["i"]?et.File:function(t){H(n,t);var e=q(n);function n(){return G(this,n),e.apply(this,arguments)}return n}(X(Object));function at(t){return at="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},at(t)}var st=function(t){return at(t)},lt=function(t){return Object.prototype.toString.call(t).slice(8,-1)},ct=function(t){return void 0===t},ut=function(t){return null===t},ht=function(t){return ct(t)||ut(t)},dt=function(t){return"function"===st(t)},pt=function(t){return"boolean"===st(t)},ft=function(t){return"string"===st(t)},mt=function(t){return"number"===st(t)},gt=function(t){return t instanceof Date},yt=function(t){return t instanceof Event},_t=function(t){return t instanceof ot},vt=function(t){return"RegExp"===lt(t)},bt=function(t){return!ht(t)&&dt(t.then)&&dt(t.catch)},xt=/\[(\d+)]/g,wt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(e=a(e)?e.join("."):e,!e||!w(t))return n;if(e in t)return t[e];e=String(e).replace(xt,".$1");var r=e.split(".").filter($);return 0===r.length?n:r.every(function(e){return w(t)&&e in t&&!ht(t=t[e])})?t:ut(t)?null:n},St=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=wt(t,e);return ht(r)?n:r},Tt=St,Et=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Object(V["a"])()||console.warn("[BootstrapVue warn]: ".concat(e?"".concat(e," - "):"").concat(t))},Ct=function(t){return!V["j"]&&(Et("".concat(t,": Can not be called during SSR.")),!0)},Ot=function(t){return!V["g"]&&(Et("".concat(t,": Requires Promise support.")),!0)},Pt=function(t){return!V["d"]&&(Et("".concat(t,": Requires MutationObserver support.")),!0)},kt=P({breakpoints:["xs","sm","md","lg","xl"],formControls:{size:void 0},BAlert:{dismissLabel:"Close",variant:"info"},BAvatar:{variant:"secondary",badgeVariant:"primary"},BBadge:{variant:"secondary"},BButton:{size:void 0,variant:"secondary"},BButtonClose:{content:"&times;",textVariant:void 0,ariaLabel:"Close"},BCalendar:{labelPrevDecade:"Previous decade",labelPrevYear:"Previous year",labelPrevMonth:"Previous month",labelCurrentMonth:"Current month",labelNextMonth:"Next month",labelNextYear:"Next year",labelNextDecade:"Next decade",labelToday:"Today",labelSelected:"Selected date",labelNoDateSelected:"No date selected",labelCalendar:"Calendar",labelNav:"Calendar navigation",labelHelp:"Use cursor keys to navigate calendar dates"},BCardSubTitle:{subTitleTextVariant:"muted"},BCarousel:{labelPrev:"Previous Slide",labelNext:"Next Slide",labelGotoSlide:"Goto Slide",labelIndicators:"Select a slide to display"},BDropdown:{toggleText:"Toggle Dropdown",size:void 0,variant:"secondary",splitVariant:void 0},BFormDatepicker:{labelPrevDecade:void 0,labelPrevYear:void 0,labelPrevMonth:void 0,labelCurrentMonth:void 0,labelNextMonth:void 0,labelNextYear:void 0,labelNextDecade:void 0,labelToday:void 0,labelSelected:void 0,labelNoDateSelected:void 0,labelCalendar:void 0,labelNav:void 0,labelHelp:void 0,labelTodayButton:"Select today",labelResetButton:"Reset",labelCloseButton:"Close"},BFormFile:{browseText:"Browse",placeholder:"No file chosen",dropPlaceholder:"Drop files here"},BFormRating:{variant:null,color:null},BFormTag:{removeLabel:"Remove tag",variant:"secondary"},BFormTags:{addButtonText:"Add",addButtonVariant:"outline-secondary",duplicateTagText:"Duplicate tag(s)",invali
38dTagText:"Invalid tag(s)",placeholder:"Add tag...",tagRemoveLabel:"Remove tag",tagRemovedLabel:"Tag removed",tagVariant:"secondary"},BFormText:{textVariant:"muted"},BFormTimepicker:{labelNoTimeSelected:void 0,labelSelected:void 0,labelHours:void 0,labelMinutes:void 0,labelSeconds:void 0,labelAmpm:void 0,labelAm:void 0,labelPm:void 0,labelDecrement:void 0,labelIncrement:void 0,labelNowButton:"Select now",labelResetButton:"Reset",labelCloseButton:"Close"},BFormSpinbutton:{labelDecrement:"Decrement",labelIncrement:"Increment"},BImg:{blankColor:"transparent"},BImgLazy:{blankColor:"transparent"},BInputGroup:{size:void 0},BJumbotron:{bgVariant:void 0,borderVariant:void 0,textVariant:void 0},BLink:{routerComponentName:void 0},BListGroupItem:{variant:void 0},BModal:{titleTag:"h5",size:"md",headerBgVariant:void 0,headerBorderVariant:void 0,headerTextVariant:void 0,headerCloseVariant:void 0,bodyBgVariant:void 0,bodyTextVariant:void 0,footerBgVariant:void 0,footerBorderVariant:void 0,footerTextVariant:void 0,cancelTitle:"Cancel",cancelVariant:"secondary",okTitle:"OK",okVariant:"primary",headerCloseContent:"&times;",headerCloseLabel:"Close"},BNavbar:{variant:null},BNavbarToggle:{label:"Toggle navigation"},BPagination:{size:void 0},BPaginationNav:{size:void 0},BPopover:{boundary:"scrollParent",boundaryPadding:5,customClass:void 0,delay:50,variant:void 0},BProgress:{variant:void 0},BProgressBar:{variant:void 0},BSpinner:{variant:void 0},BSidebar:{bgVariant:"light",textVariant:"dark",shadow:!1,width:void 0,tag:"div",backdropVariant:"dark"},BTable:{selectedVariant:"active",headVariant:void 0,footVariant:void 0},BTime:{labelNoTimeSelected:"No time selected",labelSelected:"Selected time",labelHours:"Hours",labelMinutes:"Minutes",labelSeconds:"Seconds",labelAmpm:"AM/PM",labelAm:"AM",labelPm:"PM",labelIncrement:void 0,labelDecrement:void 0},BToast:{toaster:"b-toaster-top-right",autoHideDelay:5e3,variant:void 0,toastClass:void 0,headerClass:void 0,bodyClass:void 0},BToaster:{ariaLive:void 0,ariaAtomic:void 0,role:void 0},BTooltip:{boundary:"scrollParent",boundaryPadding:5,customClass:void 0,delay:50,variant:void 0}});function At(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function It(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)}}function Mt(t,e,n){return e&&It(t.prototype,e),n&&It(t,n),t}var Dt="BvConfig",Bt="$bvConfig",zt=function(){function t(){At(this,t),this.$_config={},this.$_cachedBreakpoints=null}return Mt(t,[{key:"getDefaults",value:function(){return this.defaults}},{key:"setConfig",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(S(e)){var n=_(e);n.forEach(function(n){if(b(kt,n)){var r=e[n];if("breakpoints"===n){var i=e.breakpoints;!a(i)||i.length<2||i.some(function(t){return!ft(t)||0===t.length})?Et('"breakpoints" must be an array of at least 2 breakpoint names',Dt):t.$_config.breakpoints=F(i)}else if(S(r)){var o=_(r);o.forEach(function(e){b(kt[n],e)?(t.$_config[n]=t.$_config[n]||{},ct(r[e])||(t.$_config[n][e]=F(r[e]))):Et('Unknown config property "'.concat(n,".").concat(e,'"'),Dt)})}}else Et('Unknown config property "'.concat(n,'"'),Dt)})}}},{key:"resetConfig",value:function(){this.$_config={}}},{key:"getConfig",value:function(){return F(this.$_config)}},{key:"getConfigValue",value:function(t){return F(wt(this.$_config,t,wt(kt,t)))}},{key:"defaults",get:function(){return kt}}],[{key:"Defaults",get:function(){return kt}}]),t}(),Lt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;e.prototype[Bt]=i.prototype[Bt]=e.prototype[Bt]||i.prototype[Bt]||new zt,e.prototype[Bt].setConfig(t)};function Rt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
38e%2?Rt(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Nt=function(){var t=!1,e=["Multiple instances of Vue detected!","You may need to set up an alias for Vue in your bundler config.","See: https://bootstrap-vue.org/docs#using-module-bundlers"].join("\n");return function(n){t||i===n||V["k"]||Et(e),t=!0}}(),$t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.components,n=t.directives,r=t.plugins,i=function t(i){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.installed||(t.installed=!0,Nt(i),Lt(o,i),Ht(i,e),Wt(i,n),Ut(i,r))};return i.installed=!1,i},Vt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return jt(jt({},e),{},{install:$t(t)})},Ut=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)n&&e[n]&&t.use(e[n])},Gt=function(t,e,n){t&&e&&n&&t.component(e,n)},Ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)Gt(t,n,e[n])},qt=function(t,e,n){t&&e&&n&&t.directive(e.replace(/^VB/,"B"),n)},Wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)qt(t,n,e[n])},Zt=function(t){var e=f(null);return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=JSON.stringify(r);return e[o]=e[o]||t.apply(null,r)}},Xt=Zt,Yt="$bvConfig",Kt=i.prototype,Jt=function(t){return Kt[Yt]?Kt[Yt].getConfigValue(t):F(wt(kt,t))},Qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?Jt("".concat(t,".").concat(e)):Jt(t)||{}},te=function(){return Jt("breakpoints")},ee=Xt(function(){return te()}),ne=function(){return F(ee())},re=Xt(function(){var t=ne();return t[0]="",t}),ie=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,n=parseInt(t,10);return isNaN(n)?e:n},oe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,n=parseFloat(t);return isNaN(n)?e:n},ae=function(t,e){return oe(t).toFixed(ie(e,0))},se=/^\s+/,le=/[-/\\^$*+?.()|[\]{}]/g,ce=/-(\w)/g,ue=/\B([A-Z])/g,he=function(t){return t.replace(ue,"-$1").toLowerCase()},de=function(t){return t=he(t).replace(ce,function(t,e){return e?e.toUpperCase():""}),t.charAt(0).toUpperCase()+t.slice(1)},pe=function(t){return t=ft(t)?t.trim():String(t),t.charAt(0).toLowerCase()+t.slice(1)},fe=function(t){return t=ft(t)?t.trim():String(t),t.charAt(0).toUpperCase()+t.slice(1)},me=function(t){return t.replace(le,"\\$&")},ge=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return ht(t)?"":a(t)||S(t)&&t.toString===Object.prototype.toString?JSON.stringify(t,null,e):String(t)},ye=function(t){return ge(t).replace(se,"")},_e=function(t){return ge(t).trim()},ve=function(t){return ge(t).toLowerCase()},be=["button","[href]:not(.disabled)","input","select","textarea","[tabindex]","[contenteditable]"].map(function(t){return"".concat(t,":not(:disabled):not([disabled])")}).join(", "),xe=V["i"]?window:{},we=V["b"]?document:{},Se="undefined"!==typeof Element?Element.prototype:{},Te=Se.matches||Se.msMatchesSelector||Se.webkitMatchesSelector,Ee=Se.closest||function(t){var e=this;do{if(je(e,t))return e;e=e.parentElement||e.parentNode}while(!ut(e)&&e.nodeType===Node.ELEMENT_NODE);return null},Ce=xe.requestAnimationFrame||xe.webkitRequestAnimationFrame||xe.mozRequestAnimationFrame||xe.msRequestAnimationFrame||xe.oRequestAnimationFrame||function(t){return setTimeout(t,16)},Oe=xe.MutationObserver||xe.WebKitMutationObserver||xe.MozMutationObserver||null,Pe=function(t){return t&&t.parentNode&&t.parentNode.removeChild(t)},ke=function(t){return!(!t||t.nodeType!==Node.ELEMENT_NODE)},Ae=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=we.activeElement;return e&&!t.some(function(t){return t===e})?e:null},Ie=function(t,e){return ge(t).toLowerCase()===ge(e).toLowerCase()},Me=function(t){return ke(t)&&t===Ae()},De=function(t){if(!ke(t)||!t.parentNode||!Ne(we.body,t))return!1;if("none"===t.style.display)return!1;var e=Xe(t);return!!(e&&e.height>0&&e.width>0)},Be=function(t){return!ke(t)||t.disabled||Ze(t,"disabled")||Ge(t,"disabled")},ze=function(t){return ke(t)&&t.offsetHeight},Le=function(t,e){return o((ke(e)?e:we).querySelectorAll(t))},Re=function(t,e){return(ke(e)?e:we).querySelector(t)||null},je=function(t,e){return!!ke(t)&&Te.call(t,e)},Fe=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!ke(e))return null;var r=Ee.call(e,t);return n?r:r===e?null:r},Ne=function(t,e){return!(!t||!dt(t.contains))&&t.contains(e)},$e=function(t){return we.getElementById(/^#/.test(t)?t.slice(1):t)||null},Ve=function(t,e){e&&ke(t)&&t.classList&&t.classList.add(e)},Ue=function(t,e){e&&ke(t)&&t.classList&&t.classList.remove(e)},Ge=function(t,e){return!!(e&&ke(t)&&t.classList)&&t.classList.contains(e)},He=function(t,e,n){e&&ke(t)&&t.setAttribute(e,n)},qe=function(t,e){e&&ke(t)&&t.removeAttribute(e)},We=function(t,e){return e&&ke(t)?t.getAttribute(e):null},Ze=function(t,e){return e&&ke(t)?t.hasAttribute(e):null},Xe=function(t){return ke(t)?t.getBoundingClientRect():null},Ye=function(t){return V["i"]&&ke(t)?xe.getComputedStyle(t):{}},Ke=function(){return V["i"]&&xe.getSelection?xe.getSelection():null},Je=function(t){var e={top:0,left:0};if(!ke(t)||0===t.getClientRects().length)return e;var n=Xe(t);if(n){var r=t.ownerDocument.defaultView;e.top=n.top+r.pageYOffset,e.left=n.left+r.pageXOffset}return e}
38,Qe=function(t){var e={top:0,left:0};if(!ke(t))return e;var n={top:0,left:0},r=Ye(t);if("fixed"===r.position)e=Xe(t)||e;else{e=Je(t);var i=t.ownerDocument,o=t.offsetParent||i.documentElement;while(o&&(o===i.body||o===i.documentElement)&&"static"===Ye(o).position)o=o.parentNode;if(o&&o!==t&&o.nodeType===Node.ELEMENT_NODE){n=Je(o);var a=Ye(o);n.top+=oe(a.borderTopWidth,0),n.left+=oe(a.borderLeftWidth,0)}}return{top:e.top-n.top-oe(r.marginTop,0),left:e.left-n.left-oe(r.marginLeft,0)}},tn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return Le(be,t).filter(De).filter(function(t){return t.tabIndex>-1&&!t.disabled})},en=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{t.focus(e)}catch(n){}return Me(t)},nn=function(t){try{t.blur()}catch(e){}return!Me(t)},rn=function(){return(rn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},on={kebab:/-(\w)/g,styleProp:/:(.*)/,styleList:/;(?![^(]*\))/g};function an(t,e){return e?e.toUpperCase():""}function sn(t){for(var e,n={},r=0,i=t.split(on.styleList);r<i.length;r++){var o=i[r].split(on.styleProp),a=o[0],s=o[1];(a=a.trim())&&("string"==typeof s&&(s=s.trim()),n[(e=a,e.replace(on.kebab,an))]=s)}return n}function ln(){for(var t,e,n={},r=arguments.length;r--;)for(var i=0,o=Object.keys(arguments[r]);i<o.length;i++)switch(t=o[i]){case"class":case"style":case"directives":if(Array.isArray(n[t])||(n[t]=[]),"style"===t){var a=void 0;a=Array.isArray(arguments[r].style)?arguments[r].style:[arguments[r].style];for(var s=0;s<a.length;s++){var l=a[s];"string"==typeof l&&(a[s]=sn(l))}arguments[r].style=a}n[t]=n[t].concat(arguments[r][t]);break;case"staticClass":if(!arguments[r][t])break;void 0===n[t]&&(n[t]=""),n[t]&&(n[t]+=" "),n[t]+=arguments[r][t].trim();break;case"on":case"nativeOn":n[t]||(n[t]={});for(var c=0,u=Object.keys(arguments[r][t]||{});c<u.length;c++)e=u[c],n[t][e]?n[t][e]=[].concat(n[t][e],arguments[r][t][e]):n[t][e]=arguments[r][t][e];break;case"attrs":case"props":case"domProps":case"scopedSlots":case"staticStyle":case"hook":case"transition":n[t]||(n[t]={}),n[t]=rn({},arguments[r][t],n[t]);break;case"slot":case"key":case"ref":case"tag":case"show":case"keepAlive":default:n[t]||(n[t]=arguments[r][t])}return n}function cn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function un(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?cn(Object(n),!0).forEach(function(e){hn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function hn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var dn={name:"",enterClass:"",enterActiveClass:"",enterToClass:"show",leaveClass:"show",leaveActiveClass:"",leaveToClass:""},pn=un(un({},dn),{},{enterActiveClass:"fade",leaveActiveClass:"fade"}),fn=i.extend({name:"BVTransition",functional:!0,props:{noFade:{type:Boolean,default:!1},appear:{type:Boolean,default:!1},mode:{type:String},transProps:{type:Object,default:null}},render:function(t,e){var n=e.children,r=e.data,i=e.props,o=i.transProps;return S(o)||(o=i.noFade?dn:pn,i.appear&&(o=un(un({},o),{},{appear:!0,appearClass:o.enterClass,appearActiveClass:o.enterActiveClass,appearToClass:o.enterToClass}))),o=un(un({mode:i.mode},o),{},{css:!0}),t("transition",ln(r,{props:o}),n)}}),mn=fn,gn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=l(t).filter($),t.some(function(t){return e[t]||n[t]})},yn=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=l(t).filter($);for(var o=0;o<t.length&&!e;o++){var a=t[o];e=r[a]||i[a]}return dt(e)?e(n):e},_n={methods:{hasNormalizedSlot:function(t){return gn(t,this.$scopedSlots,this.$slots)},normalizeSlot:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=yn(t,e,this.$scopedSlots,this.$slots);return n?l(n):n}}};function vn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bn="BButtonClose",xn={content:{type:String,default:function(){return Qt(bn,"content")}},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:function(){return Qt(bn,"ariaLabel")}},textVariant:{type:String,default:function(){return Qt(bn,"textVariant")}}},wn=i.extend({name:bn,functional:!0,props:xn,render:function(t,e){var n=e.props,r=e.data,i=e.slots,o=e.scopedSlots,a=i(),s=o||{},l={staticClass:"close",class:vn({},"text-".concat(n.textVariant),n.textVariant),attrs:{type:"button",disabled:n.disabled,"aria-label":n.ariaLabel?String(n.ariaLabel):null},on:{click:function(t){n.disabled&&yt(t)&&(t.stopPropagation(),t.preventDefault())}}};return gn("default",s,a)||(l.domProps={innerHTML:n.content}),t("button",ln(r,l),yn("default",{},s,a))}});function Sn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tn="BAlert",En=function(t){return""===t||pt(t)?0:(t=ie(t,0),t>0?t:0)},Cn=function(t){return""===t||!0===t||!(ie(t,0)<1)&&!!t},On=function(t){return!isNaN(ie(t))},Pn=i.extend({name:Tn,mixins:[_n],model:{prop:"show",event:"input"},props:{variant:{type:String,default:function(){return Qt(Tn,"variant")}},dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:function(){return Qt(Tn,"dismissLabel")}},show:{type:[Boolean,Number,String],default:!1},fade:{type:Boolean,default:!1}},data:function(){return{countDown:0,countDownTimeout:null,localShow:Cn(this.show)}},watch:{show:function(t){this.countDown=En(t),this.localShow=Cn(t)},countDown:function(t){var e=this;this.clearCountDownInterval(),On(this.show)&&(this.$emit("dismiss-count-down",t),this.show!==t&&this.$emit("input",t),t>0?(this.localShow=!0,this.countDownTimeout=setTimeout(function(){e.countDown--},1e3)):this.$nextTick(function(){Ce(function(){e.localShow=!1})}))},localShow:function(t){t||!this.dismissible&&!On(this.show)||this.$emit("dismissed"),On(this.show)||this.show===t||this.$emit("input",t)}},created:function(){this.countDown=En(this.show),this.localShow=Cn(this.show)},mounted:function(){this.countDown=En(this.show),this.localShow=Cn(this.show)},beforeDestroy:function(){this.clearCountDownInterval()},methods:{dismiss:function(){this.clearCountDownInterval(),this.countDown=0,this.localShow=!1},clearCountDownInterval:function(){this.countDownTimeout&&(clearTimeout(this.countDownTimeout),this.countDownTimeout=null)}},render:function(t){var e;if(this.localShow){var n=t();this.dismissible&&(n=t(wn,{attrs:{"aria-label":this.dismissLabel},on:{click:this.dismiss}},[this.normalizeSlot("dismiss")])),e=t("div",{key:this._uid,staticClass:"alert",class:Sn({"alert-dismissible":this.dismissible},"alert-".concat(this.variant),this.variant),attrs:{role:"alert","aria-live":"polite","aria-atomic":!0}},[n,this.normalizeSlot("default")]),e=[e]}return t(mn,{props:{noFade:!this.fade}},e)}}),kn=Vt({components:{BAlert:Pn}}),An=Math.min,In=Math.max,Mn=Math.abs,Dn=Math.ceil,Bn=Math.floor,zn=Math.pow,Ln=Math.round;function Rn(t,e){return Vn(t)||$n(t,e)||Fn(t,e)||jn()}
38function jn(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fn(t,e){if(t){if("string"===typeof t)return Nn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(t,e):void 0}}function Nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $n(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)if(n.push(a.value),e&&n.length===e)break}catch(l){i=!0,o=l}finally{try{r||null==s["return"]||s["return"]()}finally{if(i)throw o}}return n}}function Vn(t){if(Array.isArray(t))return t}var Un="BAspect",Gn="b-aspect",Hn=/^\d+(\.\d*)?[/:]\d+(\.\d*)?$/,qn=/[/:]/,Wn=i.extend({name:Un,mixins:[_n],props:{aspect:{type:[Number,String],default:"1:1"},tag:{type:String,default:"div"}},computed:{padding:function(){var t=this.aspect,e=1;if(Hn.test(t)){var n=t.split(qn).map(function(t){return oe(t)||1}),r=Rn(n,2),i=r[0],o=r[1];e=i/o}else e=oe(t)||1;return"".concat(100/Mn(e),"%")}},render:function(t){var e=t("div",{staticClass:"".concat(Gn,"-sizer flex-grow-1"),style:{paddingBottom:this.padding,height:0}}),n=t("div",{staticClass:"".concat(Gn,"-content flex-grow-1 w-100 mw-100"),style:{marginLeft:"-100%"}},[this.normalizeSlot("default")]);return t(this.tag,{staticClass:"".concat(Gn," d-flex")},[e,n])}}),Zn=Vt({components:{BAspect:Wn}}),Xn=function(t,e){return t+fe(e)},Yn=function(t,e){return pe(e.replace(t,""))},Kn=function(t,e){return e+(t?fe(t):"")},Jn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;if(a(t))return t.map(e);var n={};for(var r in t)b(t,r)&&(n[e(r)]=w(t[r])?T(t[r]):t[r]);return n},Qn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$;return(a(t)?t.slice():v(t)).reduce(function(t,r){return t[n(r)]=e[r],t},{})},tr="a",er=/%2C/g,nr=/[!'()*]/g,rr=/\+/g,ir=/^(\?|#|&)/,or=function(t){return"%"+t.charCodeAt(0).toString(16)},ar=function(t){return encodeURIComponent(ge(t)).replace(nr,or).replace(er,",")},sr=decodeURIComponent,lr=function(t){if(!S(t))return"";var e=v(t).map(function(e){var n=t[e];return ct(n)?"":ut(n)?ar(e):a(n)?n.reduce(function(t,n){return ut(n)?t.push(ar(e)):ct(n)||t.push(ar(e)+"="+ar(n)),t},[]).join("&"):ar(e)+"="+ar(n)}).filter(function(t){return t.length>0}).join("&");return e?"?".concat(e):""},cr=function(t){var e={};return t=ge(t).trim().replace(ir,""),t?(t.split("&").forEach(function(t){var n=t.replace(rr," ").split("="),r=sr(n.shift()),i=n.length>0?sr(n.join("=")):null;ct(e[r])?e[r]=i:a(e[r])?e[r].push(i):e[r]=[e[r],i]}),e):e},ur=function(t){return!(!t.href&&!t.to)},hr=function(t){return!Ie(t,tr)},dr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.to,n=t.disabled,r=t.routerComponentName,i=arguments.length>1?arguments[1]:void 0,o=i.$router;return!o||o&&n||o&&!e?tr:r||(i.$nuxt?"nuxt-link":"router-link")},pr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=t.rel;return"_blank"===e&&ut(n)?"noopener":n||null},fr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.href,n=t.to,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tr,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(hr(r))return null;if(e)return e;if(n){if(ft(n))return n||o;if(S(n)&&(n.path||n.query||n.hash)){var a=ge(n.path),s=lr(n.query),l=ge(n.hash);return l=l&&"#"!==l.charAt(0)?"#".concat(l):l,"".concat(a).concat(s).concat(l)||o}}return i},mr=y({SPACE:32,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,PAGEUP:33,PAGEDOWN:34,HOME:36,END:35,TAB:9,SHIFT:16,CTRL:17,BACKSPACE:8,ALT:18,PAUSE:19,BREAK:19,INSERT:45,INS:45,DELETE:46}),gr=mr;function yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
38e%2?yr(Object(n),!0).forEach(function(e){vr(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function vr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var br=function(t){return{handler:function(e,n){for(var r in n)b(e,r)||this.$delete(this.$data[t],r);for(var i in e)this.$set(this.$data[t],i,e[i])}}},xr=function(t,e){return{data:function(){return vr({},e,{})},watch:vr({},t,br(e)),created:function(){this[e]=_r({},this[t])}}},wr=xr("$attrs","bvAttrs"),Sr=xr("$listeners","bvListeners");function Tr(t){return Pr(t)||Or(t)||Cr(t)||Er()}function Er(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cr(t,e){if(t){if("string"===typeof t)return kr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kr(t,e):void 0}}function Or(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function Pr(t){if(Array.isArray(t))return kr(t)}function kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ar(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ir(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ar(Object(n),!0).forEach(function(e){Mr(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Mr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dr="BLink",Br={to:{type:[String,Object],default:null},append:{type:Boolean,default:!1},replace:{type:Boolean,default:!1},event:{type:[String,Array],default:"click"},activeClass:{type:String},exact:{type:Boolean,default:!1},exactActiveClass:{type:String},routerTag:{type:String,default:"a"}},zr={prefetch:{type:Boolean,default:null},noPrefetch:{type:Boolean,default:!1}},Lr=Ir(Ir(Ir({href:{type:String,default:null},rel:{type:String,default:null},target:{type:String,default:"_self"},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},Br),zr),{},{routerComponentName:{type:String,default:function(){return Qt(Dr,"routerComponentName")}}}),Rr=i.extend({name:"BLink",mixins:[wr,Sr,_n],inheritAttrs:!1,props:Lr,computed:{computedTag:function(){var t=this.to,e=this.disabled,n=this.routerComponentName;return dr({to:t,disabled:e,routerComponentName:n},this)},isRouterLink:function(){return hr(this.computedTag)},computedRel:function(){return pr({target:this.target,rel:this.rel})},computedHref:function(){return fr({to:this.to,href:this.href},this.computedTag)},computedProps:function(){var t=this.prefetch;return this.isRouterLink?Ir(Ir({},Qn(Ir(Ir({},Br),zr),this)),{},{prefetch:pt(t)?t:void 0,tag:this.routerTag}):{}},computedAttrs:function(){var t=this.bvAttrs,e=this.computedHref,n=this.computedRel,r=this.disabled,i=this.target,o=this.routerTag,a=this.isRouterLink;return Ir(Ir(Ir(Ir({},t),e?{href:e}:{}),a&&"a"!==o&&"area"!==o?{}:{rel:n,target:i}),{},{tabindex:r?"-1":ct(t.tabindex)?null:t.tabindex,"aria-disabled":r?"true":null})},computedListeners:function(){return Ir(Ir({},this.bvListeners),{},{click:this.onClick})}},methods:{onClick:function(t){var e=arguments,n=yt(t),r=this.isRouterLink,i=this.bvListeners.click;n&&this.disabled?(t.stopPropagation(),t.stopImmediatePropagation()):(r&&t.currentTarget.__vue__&&t.currentTarget.__vue__.$emit("click",t),l(i).filter(function(t){return dt(t)}
38).forEach(function(t){t.apply(void 0,Tr(e))}),this.$root.$emit("clicked::link",t)),n&&(this.disabled||!r&&"#"===this.computedHref)&&t.preventDefault()},focus:function(){en(this.$el)},blur:function(){nn(this.$el)}},render:function(t){var e=this.active,n=this.disabled;return t(this.computedTag,Mr({class:{active:e,disabled:n},attrs:this.computedAttrs,props:this.computedProps},this.isRouterLink?"nativeOn":"on",this.computedListeners),this.normalizeSlot("default"))}});function jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Fr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jr(Object(n),!0).forEach(function(e){Nr(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Nr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $r="BButton",Vr=C(Lr,["event","routerTag"]);delete Vr.href.default,delete Vr.to.default;var Ur={block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:function(){return Qt($r,"size")}},variant:{type:String,default:function(){return Qt($r,"variant")}},type:{type:String,default:"button"},tag:{type:String,default:"button"},pill:{type:Boolean,default:!1},squared:{type:Boolean,default:!1},pressed:{type:Boolean,default:null}},Gr=Fr(Fr({},Ur),Vr),Hr=function(t){"focusin"===t.type?Ve(t.target,"focus"):"focusout"===t.type&&Ue(t.target,"focus")},qr=function(t){return ur(t)||Ie(t.tag,"a")},Wr=function(t){return pt(t.pressed)},Zr=function(t){return!(qr(t)||t.tag&&!Ie(t.tag,"button"))},Xr=function(t){return!qr(t)&&!Zr(t)},Yr=function(t){var e;return["btn-".concat(t.variant||Qt($r,"variant")),(e={},Nr(e,"btn-".concat(t.size),t.size),Nr(e,"btn-block",t.block),Nr(e,"rounded-pill",t.pill),Nr(e,"rounded-0",t.squared&&!t.pill),Nr(e,"disabled",t.disabled),Nr(e,"active",t.pressed),e)]},Kr=function(t){return qr(t)?Qn(Vr,t):{}},Jr=function(t,e){var n=Zr(t),r=qr(t),i=Wr(t),o=Xr(t),a=r&&"#"===t.href,s=e.attrs&&e.attrs.role?e.attrs.role:null,l=e.attrs?e.attrs.tabindex:null;return(o||a)&&(l="0"),{type:n&&!r?t.type:null,disabled:n?t.disabled:null,role:o||a?"button":s,"aria-disabled":o?String(t.disabled):null,"aria-pressed":i?String(t.pressed):null,autocomplete:i?"off":null,tabindex:t.disabled&&!n?"-1":l}},Qr=i.extend({name:$r,functional:!0,props:Gr,render:function(t,e){var n=e.props,r=e.data,i=e.listeners,o=e.children,a=Wr(n),s=qr(n),c=Xr(n),u=s&&"#"===n.href,h={keydown:function(t){if(!n.disabled&&(c||u)){var e=t.keyCode;if(e===gr.SPACE||e===gr.ENTER&&c){var r=t.currentTarget||t.target;t.preventDefault(),r.click()}}},click:function(t){n.disabled&&yt(t)?(t.stopPropagation(),t.preventDefault()):a&&i&&i["update:pressed"]&&l(i["update:pressed"]).forEach(function(t){dt(t)&&t(!n.pressed)})}};a&&(h.focusin=Hr,h.focusout=Hr);var d={staticClass:"btn",class:Yr(n),props:Kr(n),attrs:Jr(n,r),on:h};return t(s?Rr:n.tag,ln(r,d),o)}});function ti(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ei(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ti(Object(n),!0).forEach(function(e){ni(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ti(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ri={variant:{type:String,default:null},fontScale:{type:[Number,String],default:1},scale:{type:[Number,String],default:1},rotate:{type:[Number,String],default:0},flipH:{type:Boolean,default:!1},flipV:{type:Boolean,default:!1},shiftH:{type:[Number,String],default:0},shiftV:{type:[Number,String],default:0},animation:{type:String,default:null}},ii={viewBox:"0 0 16 16",width:"1em",height:"1em",focusable:"false",role:"img","aria-label":"icon"},oi={width:null,height:null,focusable:null,role:null,"aria-label":null},ai=i.extend({name:"BVIconBase",functional:!0,props:ei({content:{type:String},stacked:{type:Boolean,default:!1}},ri),render:function(t,e){var n,r=e.data,i=e.props,o=e.children,a=In(oe(i.fontScale,1),0)||1,s=In(oe(i.scale,1),0)||1,l=oe(i.rotate,0),c=oe(i.shiftH,0),u=oe(i.shiftV,0),h=i.flipH,d=i.flipV,p=i.animation,f=h||d||1!==s,m=f||l,g=c||u,y=[m?"translate(8 8)":null,f?"scale(".concat((h?-1:1)*s," ").concat((d?-1:1)*s,")"):null,l?"rotate(".concat(l,")"):null,m?"translate(-8 -8)":null].filter($),_=i.stacked,v=!ht(i.content),b=t("g",{attrs:{transform:y.join(" ")||null},domProps:v?{innerHTML:i.content||""}:{}},o);return g&&(b=t("g",{attrs:{transform:"translate(".concat(16*c/16," ").concat(-16*u/16,")")}},[b])),_&&(b=t("g",{},[b])),t("svg",ln({staticClass:"b-icon bi",class:(n={},ni(n,"text-".concat(i.variant),!!i.variant),ni(n,"b-icon-animation-".concat(p),!!p),n),attrs:ii,style:_?{}:{fontSize:1===a?null:"".concat(100*a,"%")}
38},r,_?{attrs:oi}:{},{attrs:{xmlns:_?null:"http://www.w3.org/2000/svg",fill:"currentColor"}}),[b])}});function si(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function li(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?si(Object(n),!0).forEach(function(e){ci(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ci(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ui=function(t,e){var n=he(t),r="BIcon".concat(de(t)),o="bi-".concat(n),a=_e(e||"");return i.extend({name:r,functional:!0,props:li(li({},ri),{},{stacked:{type:Boolean,default:!1}}),render:function(t,e){var r=e.data,i=e.props;return t(ai,ln(r,{staticClass:o,props:li(li({},i),{},{content:a}),attrs:{"aria-label":n.replace(/-/g," ")}}))}})},hi=ui("Blank",""),di=ui("Calendar",'<path fill-rule="evenodd" d="M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1zm1-3a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2z"/><path fill-rule="evenodd" d="M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z"/>'),pi=ui("CalendarFill",'<path fill-rule="evenodd" d="M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z"/><path d="M2 1a2 2 0 0 0-2 2v1h16V3a2 2 0 0 0-2-2H2zm14 4H0v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5z"/>'),fi=ui("ChevronBarLeft",'<path fill-rule="evenodd" d="M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0zM4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5z"/>'),mi=ui("ChevronDoubleLeft",'<path fill-rule="evenodd" d="M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/><path fill-rule="evenodd" d="M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>'),gi=ui("ChevronDown",'<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>'),yi=ui("ChevronLeft",'<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>'),_i=ui("ChevronUp",'<path fill-rule="evenodd" d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"/>'),vi=ui("CircleFill",'<circle cx="8" cy="8" r="8"/>'),bi=ui("Clock",'<path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm8-7A8 8 0 1 1 0 8a8 8 0 0 1 16 0z"/><path fill-rule="evenodd" d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"/>'),xi=ui("ClockFill",'<path fill-rule="evenodd" d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"/>'),wi=ui("Dash",'<path fill-rule="evenodd" d="M3.5 8a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.5-.5z"/>'),Si=ui("PersonFill",'<path fill-rule="evenodd" d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>'),Ti=ui("Plus",'<path fill-rule="evenodd" d="M8 3.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H4a.5.5 0 0 1 0-1h3.5V4a.5.5 0 0 1 .5-.5z"/><path fill-rule="evenodd" d="M7.5 8a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1H8.5V12a.5.5 0 0 1-1 0V8z"/>'),Ei=ui("Star",'<path fill-rule="evenodd" d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.523-3.356c.329-.314.158-.888-.283-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767l-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288l1.847-3.658 1.846 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.564.564 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/>'),Ci=ui("StarFill",'<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.283.95l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>'),Oi=ui("StarHalf",'<path fill-rule="evenodd" d="M5.354 5.119L7.538.792A.516.516 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.537.537 0 0 1 16 6.32a.55.55 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.519.519 0 0 1-.146.05c-.341.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.171-.403.59.59 0 0 1 .084-.302.513.513 0 0 1 .37-.245l4.898-.696zM8 12.027c.08 0 .16.018.232.056l3.686 1.894-.694-3.957a.564.564 0 0 1 .163-.505l2.906-2.77-4.052-.576a.525.525 0 0 1-.393-.288L8.002 2.223 8 2.226v9.8z"/>'),Pi=ui("X",'<path fill-rule="evenodd" d="M11.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708-.708l7-7a.5.5 0 0 1 .708 0z"/><path fill-rule="evenodd" d="M4.146 4.146a.5.5 0 0 0 0 .708l7 7a.5.5 0 0 0 .708-.708l-7-7a.5.5 0 0 0-.708 0z"/>');
39/*!
40 * BootstrapVue Icons, generated from Bootstrap Icons 1.0.0-alpha5
41 *
42 * @link https://icons.getbootstrap.com/
43 * @license MIT
44 * https://github.com/twbs/icons/blob/master/LICENSE.md
45 */function ki(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ai(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?ki(Object(n),!0).forEach(function(e){Ii(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ki(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ii(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mi=/^BIcon/,Di=i.extend({name:"BIcon",functional:!0,props:Ai(Ai({icon:{type:String,default:null}},ri),{},{stacked:{type:Boolean,default:!1}}),render:function(t,e){var n=e.data,r=e.props,i=e.parent,o=de(_e(r.icon||"")).replace(Mi,""),a="BIcon".concat(o),s=((i||{}).$options||{}).components,l=o&&s?s[a]||hi:o?a:hi;return t(l,ln(n,{props:Ai(Ai({},r),{},{icon:null})}))}});function Bi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function zi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bi(Object(n),!0).forEach(function(e){Li(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bi(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Li(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ri="BAvatar",ji="b-avatar",Fi=/^[0-9]*\.?[0-9]+$/,Ni=.4,$i=.7*Ni,Vi={sm:"1.5em",md:"2.5em",lg:"3.5em"},Ui=C(Lr,["active","event","routerTag"]),Gi=zi(zi({src:{type:String},text:{type:String},icon:{type:String},alt:{type:String,default:"avatar"},variant:{type:String,default:function(){return Qt(Ri,"variant")}},size:{type:[Number,String],default:null},square:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},button:{type:Boolean,default:!1},buttonType:{type:String,default:"button"},badge:{type:[Boolean,String],default:!1},badgeVariant:{type:String,default:function(){return Qt(Ri,"badgeVariant")}},badgeTop:{type:Boolean,default:!1},badgeLeft:{type:Boolean,default:!1},badgeOffset:{type:String,default:"0px"}},Ui),{},{ariaLabel:{type:String}}),Hi=function(t){return t=ht(t)||""===t?"md":ft(t)&&Fi.test(t)?oe(t,0):t,mt(t)?"".concat(t,"px"):Vi[t]||t},qi=i.extend({name:Ri,mixins:[_n],inject:{bvAvatarGroup:{default:null}},props:Gi,data:function(){return{localSrc:this.src||null}},computed:{computedSize:function(){return Hi(this.bvAvatarGroup?this.bvAvatarGroup.size:this.size)},computedVariant:function(){var t=this.bvAvatarGroup;return t&&t.variant?t.variant:this.variant},computedRounded:function(){var t=this.bvAvatarGroup,e=!(!t||!t.square)||this.square,n=t&&t.rounded?t.rounded:this.rounded;return e?"0":""===n||(n||"circle")},fontStyle:function(){var t=this.computedSize;return t=t?"calc(".concat(t," * ").concat(Ni,")"):null,t?{fontSize:t}:{}},marginStyle:function(){var t=this.bvAvatarGroup,e=t?t.overlapScale:0,n=this.computedSize,r=n&&e?"calc(".concat(n," * -").concat(e,")"):null;return r?{marginLeft:r,marginRight:r}:{}},badgeStyle:function(){var t=this.computedSize,e=this.badgeTop,n=this.badgeLeft,r=this.badgeOffset,i=r||"0px";return{fontSize:t?"calc(".concat(t," * ").concat($i," )"):null,top:e?i:null,bottom:e?null:i,left:n?i:null,right:n?null:i}}},watch:{src:function(t,e){t!==e&&(this.localSrc=t||null)}},methods:{onImgError:function(t){this.localSrc=null,this.$emit("img-error",t)},onClick:function(t){this.$emit("click",t)}},render:function(t){var e,n=this.computedVariant,r=this.disabled,i=this.computedRounded,o=this.icon,a=this.localSrc,s=this.text,l=this.fontStyle,c=this.marginStyle,u=this.computedSize,h=this.button,d=this.buttonType,p=this.badge,f=this.badgeVariant,m=this.badgeStyle,g=!h&&ur(this),y=h?Qr:g?Rr:"span",_=this.alt,v=this.ariaLabel||null,b=null;this.hasNormalizedSlot("default")?b=t("span",{staticClass:"b-avatar-custom"},[this.normalizeSlot("default")]):a?(b=t("img",{style:n?{}:{width:"100%",height:"100%"},attrs:{src:a,alt:_},on:{error:this.onImgError}}),b=t("span",{staticClass:"b-avatar-img"},[b])):b=o?t(Di,{props:{icon:o},attrs:{"aria-hidden":"true",alt:_}}):s?t("span",{staticClass:"b-avatar-text",style:l},[t("span",s)]):t(Si,{attrs:{"aria-hidden":"true",alt:_}});var x=t(),w=this.hasNormalizedSlot("badge");if(p||""===p||w){var S=!0===p?"":p;x=t("span",{staticClass:"b-avatar-badge",class:Li({},"badge-".concat(f),!!f),style:m},[w?this.normalizeSlot("badge"):S])}var T={staticClass:ji,class:(e={},Li(e,"badge-".concat(n),!h&&n),Li(e,"rounded",!0===i),Li(e,"rounded-".concat(i),i&&!0!==i),Li(e,"disabled",r),e),style:zi({width:u,height:u},c),attrs:{"aria-label":v||null},props:h?{variant:n,disabled:r,type:d}:g?Qn(Ui,this):{},on:h||g?{click:this.onClick}:{}};return t(y,T,[b,x])}}),Wi="BAvatarGroup",Zi=i.extend({name:Wi,mixins:[_n],provide:function(){return{bvAvatarGroup:this}},props:{variant:{type:String,default:null},size:{type:String,default:null},overlap:{type:[Number,String],default:.3},square:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},tag:{type:String,default:"div"}},computed:{computedSize:function(){return Hi(this.size)},overlapScale:function(){return An(In(oe(this.overlap,0),0),1)/2},paddingStyle:function(){var t=this.computedSize;return t=t?"calc(".concat(t," * ").concat(this.overlapScale,")"):null,t?{paddingLeft:t,paddingRight:t}:{}}},render:function(t){var e=t("div",{staticClass:"b-avatar-group-inner",style:this.paddingStyle},[this.normalizeSlot("default")]);return t(this.tag,{staticClass:"b-avatar-group",attrs:{role:"group"}},[e])}}),Xi=Vt({components:{BAvatar:qi,BAvatarGroup:Zi}});function Yi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ki(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Yi(Object(n),!0).forEach(function(e){Ji(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ji(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qi="BBadge",to=C(Lr,["event","routerTag"]);delete to.href.default,delete to.to.default;var eo=Ki({tag:{type:String,default:"span"},variant:{type:String,default:function(){return Qt(Qi,"variant")}},pill:{type:Boolean,default:!1}},to),no=i.extend({name:Qi,functional:!0,props:eo,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=ur(n),a=o?Rr:n.tag,s={staticClass:"badge",class:[n.variant?"badge-".concat(n.variant):"badge-secondary",{"badge-pill":n.pill,active:n.active,disabled:n.disabled}],props:o?Qn(to,n):{}};return t(a,ln(r,s),i)}}),ro=Vt({components:{BBadge:no}}),io=/(<([^>]+)>)/gi,oo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(io,"")},ao=function(t,e){return t?{innerHTML:t}:e?{textContent:e}:{}};function so(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function lo(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?so(Object(n),!0).forEach(function(e){co(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function co(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var uo=lo({text:{type:String,default:null},html:{type:String,default:null},ariaCurrent:{type:String,default:"location"}},C(Lr,["event","routerTag"])),ho=i.extend({name:"BBreadcrumbLink",functional:!0,props:uo,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=n.active,a=o?"span":Rr,s={attrs:{"aria-current":o?n.ariaCurrent:null},props:Qn(uo,n)};return i||(s.domProps=ao(n.html,n.text)),t(a,ln(r,s),i)}}),po=i.extend({name:"BBreadcrumbItem",functional:!0,props:uo,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t("li",ln(r,{staticClass:"breadcrumb-item",class:{active:n.active}}),[t(ho,{props:n},i)])}});function fo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mo(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fo(Object(n),!0).forEach(function(e){go(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function go(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yo={items:{type:Array,default:null}},_o=i.extend({name:"BBreadcrumb",functional:!0,props:yo,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=i;if(a(n.items)){var s=!1;o=n.items.map(function(e,r){w(e)||(e={text:ge(e)});var i=e.active;return i&&(s=!0),i||s||(i=r+1===n.items.length),t(po,{props:mo(mo({},e),{},{active:i})})})}return t("ol",ln(r,{staticClass:"breadcrumb"}),o)}}),vo=Vt({components:{BBreadcrumb:_o,BBreadcrumbItem:po,BBreadcrumbLink:ho}}),bo=Vt({components:{BButton:Qr,BBtn:Qr,BButtonClose:wn,BBtnClose:wn}});function xo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wo="BButtonGroup",So={vertical:{type:Boolean,default:!1},size:{type:String,default:function(){return Qt("BButton","size")}},tag:{type:String,default:"div"},ariaRole:{type:String,default:"group"}},To=i.extend({name:wo,functional:!0,props:So,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{class:xo({"btn-group":!n.vertical,"btn-group-vertical":n.vertical},"btn-group-".concat(n.size),n.size),attrs:{role:n.ariaRole}}),i)}}),Eo=Vt({components:{BButtonGroup:To,BBtnGroup:To}}
45),Co=[".btn:not(.disabled):not([disabled]):not(.dropdown-item)",".form-control:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])",'input[type="checkbox"]:not(.disabled)','input[type="radio"]:not(.disabled)'].join(","),Oo=i.extend({name:"BButtonToolbar",mixins:[_n],props:{justify:{type:Boolean,default:!1},keyNav:{type:Boolean,default:!1}},mounted:function(){this.keyNav&&this.getItems()},methods:{onFocusin:function(t){t.target===this.$el&&(t.preventDefault(),t.stopPropagation(),this.focusFirst(t))},stop:function(t){t.preventDefault(),t.stopPropagation()},onKeydown:function(t){if(this.keyNav){var e=t.keyCode,n=t.shiftKey;e===gr.UP||e===gr.LEFT?(this.stop(t),n?this.focusFirst(t):this.focusPrev(t)):e!==gr.DOWN&&e!==gr.RIGHT||(this.stop(t),n?this.focusLast(t):this.focusNext(t))}},focusFirst:function(){var t=this.getItems();en(t[0])},focusPrev:function(t){var e=this.getItems(),n=e.indexOf(t.target);n>-1&&(e=e.slice(0,n).reverse(),en(e[0]))},focusNext:function(t){var e=this.getItems(),n=e.indexOf(t.target);n>-1&&(e=e.slice(n+1),en(e[0]))},focusLast:function(){var t=this.getItems().reverse();en(t[0])},getItems:function(){var t=Le(Co,this.$el);return t.forEach(function(t){t.tabIndex=-1}),t.filter(function(t){return De(t)})}},render:function(t){return t("div",{staticClass:"btn-toolbar",class:{"justify-content-between":this.justify},attrs:{role:"toolbar",tabindex:this.keyNav?"0":null},on:this.keyNav?{focusin:this.onFocusin,keydown:this.onKeydown}:{}},[this.normalizeSlot("default")])}}),Po=Vt({components:{BButtonToolbar:Oo,BBtnToolbar:Oo}}),ko=function(t,e){if(t.length!==e.length)return!1;for(var n=!0,r=0;n&&r<t.length;r++)n=Ao(t[r],e[r]);return n},Ao=function t(e,n){if(e===n)return!0;var r=gt(e),i=gt(n);if(r||i)return!(!r||!i)&&e.getTime()===n.getTime();if(r=a(e),i=a(n),r||i)return!(!r||!i)&&ko(e,n);if(r=w(e),i=w(n),r||i){if(!r||!i)return!1;var o=v(e).length,s=v(n).length;if(o!==s)return!1;for(var l in e){var c=b(e,l),u=b(n,l);if(c&&!u||!c&&u||!t(e[l],n[l]))return!1}}return String(e)===String(n)},Io=Ao;function Mo(t,e){return Ro(t)||Lo(t,e)||Bo(t,e)||Do()}function Do(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Bo(t,e){if(t){if("string"===typeof t)return zo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zo(t,e):void 0}}function zo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lo(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)if(n.push(a.value),e&&n.length===e)break}catch(l){i=!0,o=l}finally{try{r||null==s["return"]||s["return"]()}finally{if(i)throw o}}return n}}function Ro(t){if(Array.isArray(t))return t}function jo(t,e,n){return jo=Fo()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=Function.bind.apply(t,r),o=new i;return n&&No(o,n.prototype),o},jo.apply(null,arguments)}function Fo(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function No(t,e){return No=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},No(t,e)}var $o=/^\d+-\d\d?-\d\d?(?:\s|T|$)/,Vo=/-|\s|T/,Uo=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return jo(Date,e)},Go=function(t){if(ft(t)&&$o.test(t.trim())){var e=t.split(Vo).map(function(t){return ie(t,1)}),n=Mo(e,3),r=n[0],i=n[1],o=n[2];return Uo(r,i-1,o)}return gt(t)?Uo(t.getFullYear(),t.getMonth(),t.getDate()):null},Ho=function(t){if(t=Go(t),!t)return null;var e=t.getFullYear(),n="0".concat(t.getMonth()+1).slice(-2),r="0".concat(t.getDate()).slice(-2);return"".concat(e,"-").concat(n,"-").concat(r)},qo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gregory";t=l(t).filter($);var n=new Intl.DateTimeFormat(t,{calendar:e});return n.resolvedOptions().locale},Wo=function(t,e){var n=new Intl.DateTimeFormat(t,e);return n.format},Zo=function(t,e){return Ho(t)===Ho(e)},Xo=function(t){return t=Uo(t),t.setDate(1),t},Yo=function(t){return t=Uo(t),t.setMonth(t.getMonth()+1),t.setDate(0),t},Ko=function(t,e){t=Uo(t);var n=t.getMonth();return t.setFullYear(t.getFullYear()+e),t.getMonth()!==n&&t.setDate(0),t},Jo=function(t){t=Uo(t);var e=t.getMonth();return t.setMonth(e-1),t.getMonth()===e&&t.setDate(0),t},Qo=function(t){t=Uo(t);var e=t.getMonth();return t.setMonth(e+1),t.getMonth()===(e+2)%12&&t.setDate(0),t},ta=function(t){return Ko(t,-1)},ea=function(t){return Ko(t,1)},na=function(t){return Ko(t,-10)},ra=function(t){return Ko(t,10)},ia=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t=Go(t),e=Go(e)||t,n=Go(n)||t,t?t<e?e:t>
45n?n:t:null},oa=["ar","az","ckb","fa","he","ks","lrc","mzn","ps","sd","te","ug","ur","yi"].map(function(t){return t.toLowerCase()}),aa=/-u-.+/,sa=function(t){var e=ge(t).toLowerCase().replace(aa,"").split("-"),n=e.slice(0,2).join("-"),r=e[0];return s(oa,n)||s(oa,r)},la={props:{id:{type:String}},data:function(){return{localId_:null}},computed:{safeId:function(){var t=this.id||this.localId_,e=function(e){return t?(e=String(e||"").replace(/\s+/g,"_"),e?t+"_"+e:t):null};return e}},mounted:function(){var t=this;this.$nextTick(function(){t.localId_="__BVID__".concat(t._uid)})}};function ca(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ua(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ca(Object(n),!0).forEach(function(e){ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ca(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ha(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var da="BCalendar",pa=gr.UP,fa=gr.DOWN,ma=gr.LEFT,ga=gr.RIGHT,ya=gr.PAGEUP,_a=gr.PAGEDOWN,va=gr.HOME,ba=gr.END,xa=gr.ENTER,wa=gr.SPACE,Sa="gregory",Ta="numeric",Ea="2-digit",Ca="long",Oa="short",Pa="narrow",ka=i.extend({name:da,mixins:[wr,la,_n],model:{prop:"value",event:"input"},props:{value:{type:[String,Date]},valueAsDate:{type:Boolean,default:!1},initialDate:{type:[String,Date]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{type:[String,Date]},max:{type:[String,Date]},dateDisabledFn:{type:Function},startWeekday:{type:[Number,String],default:0},locale:{type:[String,Array]},direction:{type:String},selectedVariant:{type:String,default:"primary"},todayVariant:{type:String},noHighlightToday:{type:Boolean,default:!1},dateInfoFn:{type:Function},width:{type:String,default:"270px"},block:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},showDecadeNav:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},ariaControls:{type:String},roleDescription:{type:String},labelPrevDecade:{type:String,default:function(){return Qt(da,"labelPrevDecade")}},labelPrevYear:{type:String,default:function(){return Qt(da,"labelPrevYear")}},labelPrevMonth:{type:String,default:function(){return Qt(da,"labelPrevMonth")}},labelCurrentMonth:{type:String,default:function(){return Qt(da,"labelCurrentMonth")}},labelNextMonth:{type:String,default:function(){return Qt(da,"labelNextMonth")}},labelNextYear:{type:String,default:function(){return Qt(da,"labelNextYear")}},labelNextDecade:{type:String,default:function(){return Qt(da,"labelNextDecade")}},labelToday:{type:String,default:function(){return Qt(da,"labelToday")}},labelSelected:{type:String,default:function(){return Qt(da,"labelSelected")}},labelNoDateSelected:{type:String,default:function(){return Qt(da,"labelNoDateSelected")}},labelCalendar:{type:String,default:function(){return Qt(da,"labelCalendar")}},labelNav:{type:String,default:function(){return Qt(da,"labelNav")}},labelHelp:{type:String,default:function(){return Qt(da,"labelHelp")}},dateFormatOptions:{type:Object,default:function(){return{year:Ta,month:Ca,day:Ta,weekday:Ca}}},weekdayHeaderFormat:{type:String,default:Oa,validator:function(t){return s([Ca,Oa,Pa],t)}}},data:function(){var t=Ho(this.value)||"";return{selectedYMD:t,activeYMD:t||Ho(ia(this.initialDate||this.getToday()),this.min,this.max),gridHasFocus:!1,isLive:!1}},computed:{valueId:function(){return this.safeId()},widgetId:function(){return this.safeId("_calendar-wrapper_")},navId:function(){return this.safeId("_calendar-nav_")},gridId:function(){return this.safeId("_calendar-grid_")},gridCaptionId:function(){return this.safeId("_calendar-grid-caption_")},gridHelpId:function(){return this.safeId("_calendar-grid-help_")},activeId:function(){return this.activeYMD?this.safeId("_cell-".concat(this.activeYMD,"_")):null},selectedDate:function(){return Go(this.selectedYMD)},activeDate:function(){return Go(this.activeYMD)},computedMin:function(){return Go(this.min)},computedMax:function(){return Go(this.max)},computedWeekStarts:function(){return In(ie(this.startWeekday,0),0)%7},computedLocale:function(){return qo(l(this.locale).filter($),Sa)},calendarLocale:function(){var t=new Intl.DateTimeFormat(this.computedLocale,{calendar:Sa}),e=t.resolvedOptions().calendar,n=t.resolvedOptions().locale;return e!==Sa&&(n=n.replace(/-u-.+$/i,"").concat("-u-ca-gregory")),n},calendarYear:function(){return this.activeDate.getFullYear()},calendarMonth:function(){return this.activeDate.getMonth()},calendarFirstDay:function(){return Uo(this.calendarYear,this.calendarMonth,1)},calendarDaysInMonth:function(){var t=Uo(this.calendarFirstDay);return t.setMonth(t.getMonth()+1,0),t.getDate()},computedVariant:function(){return"btn-".concat(this.selectedVariant||"primary")},computedTodayVariant:function(){return"btn-outline-".concat(this.todayVariant||this.selectedVariant||"primary")},isRTL:function(){var t=ge(this.direction).toLowerCase();return"rtl"===t||"ltr"!==t&&sa(this.computedLocale)}
45,context:function(){var t=this.selectedYMD,e=Go(t),n=this.activeYMD,r=Go(n);return{selectedYMD:t,selectedDate:e,selectedFormatted:e?this.formatDateString(e):this.labelNoDateSelected,activeYMD:n,activeDate:r,activeFormatted:r?this.formatDateString(r):"",disabled:this.dateDisabled(r),locale:this.computedLocale,calendarLocale:this.calendarLocale,rtl:this.isRTL}},dateOutOfRange:function(){var t=this.computedMin,e=this.computedMax;return function(n){return n=Go(n),t&&n<t||e&&n>e}},dateDisabled:function(){var t=this.dateOutOfRange,e=dt(this.dateDisabledFn)?this.dateDisabledFn:function(){return!1};return function(n){n=Go(n);var r=Ho(n);return!(!t(n)&&!e(r,n))}},formatDateString:function(){return Wo(this.calendarLocale,ua(ua({year:Ta,month:Ea,day:Ea},this.dateFormatOptions),{},{hour:void 0,minute:void 0,second:void 0,calendar:Sa}))},formatYearMonth:function(){return Wo(this.calendarLocale,{year:Ta,month:Ca,calendar:Sa})},formatWeekdayName:function(){return Wo(this.calendarLocale,{weekday:Ca,calendar:Sa})},formatWeekdayNameShort:function(){return Wo(this.calendarLocale,{weekday:this.weekdayHeaderFormat||Oa,calendar:Sa})},formatDay:function(){var t=new Intl.NumberFormat([this.computedLocale],{style:"decimal",minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:0,notation:"standard"});return function(e){return t.format(e.getDate())}},prevDecadeDisabled:function(){var t=this.computedMin;return this.disabled||t&&Yo(na(this.activeDate))<t},prevYearDisabled:function(){var t=this.computedMin;return this.disabled||t&&Yo(ta(this.activeDate))<t},prevMonthDisabled:function(){var t=this.computedMin;return this.disabled||t&&Yo(Jo(this.activeDate))<t},thisMonthDisabled:function(){return this.disabled},nextMonthDisabled:function(){var t=this.computedMax;return this.disabled||t&&Xo(Qo(this.activeDate))>t},nextYearDisabled:function(){var t=this.computedMax;return this.disabled||t&&Xo(ea(this.activeDate))>t},nextDecadeDisabled:function(){var t=this.computedMax;return this.disabled||t&&Xo(ra(this.activeDate))>t},calendar:function(){for(var t=[],e=this.calendarFirstDay,n=e.getFullYear(),r=e.getMonth(),i=this.calendarDaysInMonth,o=e.getDay(),s=(this.computedWeekStarts>o?7:0)-this.computedWeekStarts,l=dt(this.dateInfoFn)?this.dateInfoFn:function(){return{}},c=0-s-o,u=0;u<6&&c<i;u++){t[u]=[];for(var h=0;h<7;h++){c++;var d=Uo(n,r,c),p=d.getMonth(),f=Ho(d),m=this.dateDisabled(d),g=l(f,Go(f));g=ft(g)||a(g)?{class:g}:S(g)?ua({class:""},g):{class:""},t[u].push({ymd:f,day:this.formatDay(d),label:this.formatDateString(d),isThisMonth:p===r,isDisabled:m,info:g})}}return t},calendarHeadings:function(){var t=this;return this.calendar[0].map(function(e){return{text:t.formatWeekdayNameShort(Go(e.ymd)),label:t.formatWeekdayName(Go(e.ymd))}})}},watch:{value:function(t,e){var n=Ho(t)||"",r=Ho(e)||"";Zo(n,r)||(this.activeYMD=n||this.activeYMD,this.selectedYMD=n)},selectedYMD:function(t,e){t!==e&&this.$emit("input",this.valueAsDate?Go(t)||null:t||"")},context:function(t,e){Io(t,e)||this.$emit("context",t)},hidden:function(t){this.activeYMD=this.selectedYMD||Ho(this.value||this.constrainDate(this.initialDate||this.getToday())),this.setLive(!t)}},created:function(){var t=this;this.$nextTick(function(){t.$emit("context",t.context)})},mounted:function(){this.setLive(!0)},activated:function(){this.setLive(!0)},deactivated:function(){this.setLive(!1)},beforeDestroy:function(){this.setLive(!1)},methods:{focus:function(){this.disabled||en(this.$refs.grid)},blur:function(){this.disabled||nn(this.$refs.grid)},setLive:function(t){var e=this;t?this.$nextTick(function(){Ce(function(){e.isLive=!0})}):this.isLive=!1},getToday:function(){return Go(Uo())},constrainDate:function(t){return ia(t,this.computedMin,this.computedMax)},emitSelected:function(t){var e=this;this.$nextTick(function(){e.$emit("selected",Ho(t)||"",Go(t)||null)})},setGridFocusFlag:function(t){this.gridHasFocus=!this.disabled&&"focus"===t.type},onKeydownWrapper:function(t){var e=t.altKey,n=t.ctrlKey,r=t.keyCode;if(s([ya,_a,ba,va,ma,pa,ga,fa],r)){t.preventDefault(),t.stopPropagation();var i=Uo(this.activeDate),o=Uo(this.activeDate),a=i.getDate(),l=this.constrainDate(this.getToday()),c=this.isRTL;r===ya?(i=(e?n?na:ta:Jo)(i),o=Uo(i),o.setDate(1)):r===_a?(i=(e?n?ra:ea:Qo)(i),o=Uo(i),o.setMonth(o.getMonth()+1),o.setDate(0)):r===ma?(i.setDate(a+(c?1:-1)),i=this.constrainDate(i),o=i):r===ga?(i.setDate(a+(c?-1:1)),i=this.constrainDate(i),o=i):r===pa?(i.setDate(a-7),i=this.constrainDate(i),o=i):r===fa?(i.setDate(a+7),i=this.constrainDate(i),o=i):r===va?(i=l,o=i):r===ba&&(i=Go(this.selectedDate)||l,o=i),this.dateOutOfRange(o)||Zo(i,this.activeDate)||(this.activeYMD=Ho(i)),this.focus()}},onKeydownGrid:function(t){var e=t.keyCode,n=this.activeDate;e!==xa&&e!==wa||(t.preventDefault(),t.stopPropagation(),this.disabled||this.readonly||this.dateDisabled(n)||(this.selectedYMD=Ho(n),this.emitSelected(n)),this.focus())},onClickDay:function(t){var e=this.selectedDate,n=this.activeDate,r=Go(t.ymd);this.disabled||t.isDisabled||this.dateDisabled(r)||(this.readonly||
vendor: 6,033 bytes, line 45
45(this.selectedYMD=Ho(Zo(r,e)?e:r),this.emitSelected(r)),this.activeYMD=Ho(Zo(r,n)?n:Uo(r)),this.focus())},gotoPrevDecade:function(){this.activeYMD=Ho(this.constrainDate(na(this.activeDate)))},gotoPrevYear:function(){this.activeYMD=Ho(this.constrainDate(ta(this.activeDate)))},gotoPrevMonth:function(){this.activeYMD=Ho(this.constrainDate(Jo(this.activeDate)))},gotoCurrentMonth:function(){this.activeYMD=Ho(this.constrainDate(this.getToday()))},gotoNextMonth:function(){this.activeYMD=Ho(this.constrainDate(Qo(this.activeDate)))},gotoNextYear:function(){this.activeYMD=Ho(this.constrainDate(ea(this.activeDate)))},gotoNextDecade:function(){this.activeYMD=Ho(this.constrainDate(ra(this.activeDate)))},onHeaderClick:function(){this.disabled||(this.activeYMD=this.selectedYMD||Ho(this.getToday()),this.focus())}},render:function(t){var e=this;if(this.hidden)return t();var n=this.valueId,r=this.widgetId,i=this.navId,o=this.gridId,a=this.gridCaptionId,s=this.gridHelpId,l=this.activeId,c=this.isLive,u=this.isRTL,h=this.activeYMD,d=this.selectedYMD,p=this.safeId,f=!this.showDecadeNav,m=Ho(this.getToday()),g=!this.noHighlightToday,y=t("output",{staticClass:"form-control form-control-sm text-center",class:{"text-muted":this.disabled,readonly:this.readonly||this.disabled},attrs:{id:n,for:o,role:"status",tabindex:this.disabled?null:"-1","data-selected":ge(d),"aria-live":c?"polite":"off","aria-atomic":c?"true":null},on:{click:this.onHeaderClick,focus:this.onHeaderClick}},this.selectedDate?[t("bdi",{staticClass:"sr-only"}," (".concat(ge(this.labelSelected),") ")),t("bdi",this.formatDateString(this.selectedDate))]:this.labelNoDateSelected||" ");y=t("header",{staticClass:"b-calendar-header",class:{"sr-only":this.hideHeader},attrs:{title:this.selectedDate&&this.labelSelectedDate||null}},[y]);var _={isRTL:u},v={shiftV:.5},b=ua(ua({},v),{},{flipH:u}),x=ua(ua({},v),{},{flipH:!u}),w=this.normalizeSlot("nav-prev-decade",_)||t(fi,{props:b}),S=this.normalizeSlot("nav-prev-year",_)||t(mi,{props:b}),T=this.normalizeSlot("nav-prev-month",_)||t(yi,{props:b}),E=this.normalizeSlot("nav-this-month",_)||t(vi,{props:v}),C=this.normalizeSlot("nav-next-month",_)||t(yi,{props:x}),O=this.normalizeSlot("nav-next-year",_)||t(mi,{props:x}),P=this.normalizeSlot("nav-next-decade",_)||t(fi,{props:x}),k=function(e,n,r,i,o){return t("button",{staticClass:"btn btn-sm btn-outline-secondary border-0 flex-fill",class:{disabled:i},attrs:{title:n||null,type:"button","aria-label":n||null,"aria-disabled":i?"true":null,"aria-keyshortcuts":o||null},on:i?{}:{click:r}},[t("div",{attrs:{"aria-hidden":"true"}},[e])])},A=t("div",{staticClass:"b-calendar-nav d-flex",attrs:{id:i,role:"group","aria-hidden":this.disabled?"true":null,"aria-label":this.labelNav||null,"aria-controls":o}},[f?t():k(w,this.labelPrevDecade,this.gotoPrevDecade,this.prevDecadeDisabled,"Ctrl+Alt+PageDown"),k(S,this.labelPrevYear,this.gotoPrevYear,this.prevYearDisabled,"Alt+PageDown"),k(T,this.labelPrevMonth,this.gotoPrevMonth,this.prevMonthDisabled,"PageDown"),k(E,this.labelCurrentMonth,this.gotoCurrentMonth,this.thisMonthDisabled,"Home"),k(C,this.labelNextMonth,this.gotoNextMonth,this.nextMonthDisabled,"PageUp"),k(O,this.labelNextYear,this.gotoNextYear,this.nextYearDisabled,"Alt+PageUp"),f?t():k(P,this.labelNextDecade,this.gotoNextDecade,this.nextDecadeDisabled,"Ctrl+Alt+PageUp")]),I=t("header",{key:"grid-caption",staticClass:"b-calendar-grid-caption text-center font-weight-bold",class:{"text-muted":this.disabled},attrs:{id:a,"aria-live":c?"polite":null,"aria-atomic":c?"true":null}},this.formatYearMonth(this.calendarFirstDay)),M=t("div",{staticClass:"b-calendar-grid-weekdays row no-gutters border-bottom",attrs:{"aria-hidden":"true"}},this.calendarHeadings.map(function(n,r){return t("small",{key:r,staticClass:"col text-truncate",class:{"text-muted":e.disabled},attrs:{title:n.label===n.text?null:n.label,"aria-label":n.label}},n.text)})),D=this.calendar.map(function(n){var r=n.map(function(n,r){var i,o=n.ymd===d,a=n.ymd===h,s=n.ymd===m,l=p("_cell-".concat(n.ymd,"_")),c=t("span",{staticClass:"btn border-0 rounded-circle text-nowrap",class:(i={focus:a&&e.gridHasFocus,disabled:n.isDisabled||e.disabled,active:o},ha(i,e.computedVariant,o),ha(i,e.computedTodayVariant,s&&g&&!o&&n.isThisMonth),ha(i,"btn-outline-light",!(s&&g)&&!o&&!a),ha(i,"btn-light",!(s&&g)&&!o&&a),ha(i,"text-muted",!n.isThisMonth&&!o),ha(i,"text-dark",!(s&&g)&&!o&&!a&&n.isThisMonth),ha(i,"font-weight-bold",(o||n.isThisMonth)&&!n.isDisabled),i),on:{click:function(){return e.onClickDay(n)}}},n.day);return t("div",{key:r,staticClass:"col p-0",class:n.isDisabled?"bg-light":n.info.class||"",attrs:{id:l,role:"button","data-date":n.ymd,"aria-hidden":n.isThisMonth?null:"true","aria-disabled":n.isDisabled||e.disabled?"true":null,"aria-label":[n.label,o?"(".concat(e.labelSelected,")"):null,s?"(".concat(e.labelToday,")"):null].filter($).join(" "),"aria-selected":o?"true":null,"aria-current":o?"date":null}},[c])});return t("div",{key:n[0].ymd,staticClass:"row no-gutters"},r)});D=t("div",{staticClass:"b-calendar-grid-body",style:this.disabled?{pointerEvents:"none"}:{}},D);var B=t("footer",{staticClass:"b-calendar-grid-help border-top small text-muted text-center bg-light",attrs:{id:s}},[t("div",{staticClass:"small"},this.labelHelp)]),z=t("div",{ref:"grid",staticClass:"b-calendar-grid form-control h-auto text-center",attrs:{id:o,role:"application",tabindex:this.disabled?null:"0","data-month":h.slice(0,-3),"aria-roledescription":this.labelCalendar||null,"aria-labelledby":a,"aria-describedby":s,"aria-disabled":this.disabled?"true":null,"aria-activedescendant":l},on:{keydown:this.onKeydownGrid,focus:this.setGridFocusFlag,blur:this.setGridFocusFlag}},[I,M,D,B]),L=this.normalizeSlot("default");L=L?t("footer",{staticClass:"b-calendar-footer"},L):t();var R=t("div",{staticClass:"b-calendar-inner",style:this.block?{}:{width:this.width},attrs:{id:r,dir:u?"rtl":"ltr",lang:this.computedLocale||null,role:"group","aria-disabled":this.disabled?"true":null,"aria-controls":this.ariaControl
45s||null,"aria-roledescription":this.roleDescription||null,"aria-describedby":[this.bvAttrs["aria-describedby"],n,s].filter($).join(" ")},on:{keydown:this.onKeydownWrapper}},[y,A,z,L]);return t("div",{staticClass:"b-calendar",class:{"d-block":this.block}},[R])}}),Aa=Vt({components:{BCalendar:ka}}),Ia={props:{tag:{type:String,default:"div"},bgVariant:{type:String},borderVariant:{type:String},textVariant:{type:String}}},Ma={title:{type:String},titleTag:{type:String,default:"h4"}},Da=i.extend({name:"BCardTitle",functional:!0,props:Ma,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.titleTag,ln(r,{staticClass:"card-title"}),i||ge(n.title))}}),Ba="BCardSubTitle",za={subTitle:{type:String},subTitleTag:{type:String,default:"h6"},subTitleTextVariant:{type:String,default:function(){return Qt(Ba,"subTitleTextVariant")}}},La=i.extend({name:Ba,functional:!0,props:za,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.subTitleTag,ln(r,{staticClass:"card-subtitle",class:[n.subTitleTextVariant?"text-".concat(n.subTitleTextVariant):null]}),i||ge(n.subTitle))}});function Ra(t){return $a(t)||Na(t)||Fa(t)||ja()}function ja(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fa(t,e){if(t){if("string"===typeof t)return Va(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Va(t,e):void 0}}function Na(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function $a(t){if(Array.isArray(t))return Va(t)}function Va(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ua(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ga(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ua(Object(n),!0).forEach(function(e){Ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ua(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ha(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qa=Ga(Ga(Ga(Ga({},Jn(Ia.props,Xn.bind(null,"body"))),{},{bodyClass:{type:[String,Object,Array]}},Ma),za),{},{overlay:{type:Boolean,default:!1}}),Wa=i.extend({name:"BCardBody",functional:!0,props:qa,render:function(t,e){var n,r=e.props,i=e.data,o=e.children,a=t(),s=t(),l=o||[t()];return r.title&&(a=t(Da,{props:Qn(Ma,r)})),r.subTitle&&(s=t(La,{props:Qn(za,r),class:["mb-2"]})),t(r.bodyTag,ln(i,{staticClass:"card-body",class:[(n={"card-img-overlay":r.overlay},Ha(n,"bg-".concat(r.bodyBgVariant),r.bodyBgVariant),Ha(n,"border-".concat(r.bodyBorderVariant),r.bodyBorderVariant),Ha(n,"text-".concat(r.bodyTextVariant),r.bodyTextVariant),n),r.bodyClass||{}]}),[a,s].concat(Ra(l)))}});function Za(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Xa(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Za(Object(n),!0).forEach(function(e){Ya(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Za(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ya(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ka=Xa(Xa({},Jn(Ia.props,Xn.bind(null,"header"))),{},{header:{type:String},headerHtml:{type:String},headerClass:{type:[String,Object,Array]}}),Ja=i.extend({name:"BCardHeader",functional:!0,props:Ka,render:function(t,e){var n,r=e.props,i=e.data,o=e.children,a=r.headerBgVariant,s=r.headerBorderVariant,l=r.headerTextVariant;return t(r.headerTag,ln(i,{staticClass:"card-header",class:[r.headerClass,(n={},Ya(n,"bg-".concat(a),a),Ya(n,"border-".concat(s),s),Ya(n,"text-".concat(l),l),n)],domProps:o?{}:ao(r.headerHtml,r.header)}),o)}});function Qa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Qa(Object(n),!0).forEach(function(e){es(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qa(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function es(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ns=ts(ts({},Jn(Ia.props,Xn.bind(null,"footer"))),{},{footer:{type:String},footerHtml:{type:String},footerClass:{type:[String,Object,Array]}}),rs=i.extend({name:"BCardFooter",functional:!0,props:ns,render:function(t,e){var n,r=e.props,i=e.data,o=e.children,a=r.footerBgVariant,s=r.footerBorderVariant,l=r.footerTextVariant;return t(r.footerTag,ln(i,{staticClass:"card-footer",class:[r.footerClass,(n={},es(n,"bg-".concat(a),a),es(n,"border-".concat(s),s),es(n,"text-".concat(l),l),n)],domProps:o?{}:ao(r.footerHtml,r.footer)}),o)}}),is={src:{type:String,required:!0},alt:{type:String,default:null},top:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},start:{type:Boolean,default:!1},left:{type:Boolean,default:!1},end:{type:Boolean,default:!1},right:{type:Boolean,default:!1},height:{type:[Number,String]},width:{type:[Number,String]}},os=i.extend({name:"BCardImg",functional:!0,props:is,render:function(t,e){var n=e.props,r=e.data,i="card-img";return n.top?i+="-top":n.right||n.end?i+="-right":n.bottom?i+="-bottom":(n.left||n.start)&&(i+="-left"),t("img",ln(r,{class:[i],attrs:{src:n.src||null,alt:n.alt,height:n.height||null,width:n.width||null}}))}});function as(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ss(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?as(Object(n),!0).forEach(function(e){ls(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):as(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ls(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cs=Jn(is,Xn.bind(null,"img"));cs.imgSrc.required=!1;var us=ss(ss(ss(ss(ss(ss({},qa),Ka),ns),cs),Jn(Ia.props)),{},{align:{type:String},noBody:{type:Boolean,default:!1}}),hs=i.extend({name:"BCard",functional:!0,props:us,render:function(t,e){var n,r=e.props,i=e.data,o=e.slots,a=e.scopedSlots,s=r.imgLeft,l=r.imgRight,c=r.imgStart,u=r.imgEnd,h=r.header,d=r.headerHtml,p=r.footer,f=r.footerHtml,m=r.align,g=r.textVariant,y=r.bgVariant,_=r.borderVariant,v=a||{},b=o(),x={},w=t(),S=t();if(r.imgSrc){var T=t(os,{props:Qn(cs,r,Yn.bind(null,"img"))});r.imgBottom?S=T:w=T}var E=t(),C=gn("header",v,b);(C||h||d)&&(E=t(Ja,{props:Qn(Ka,r),domProps:C?{}:ao(d,h)},yn("header",x,v,b)));var O=yn("default",x,v,b);r.noBody||(O=t(Wa,{props:Qn(qa,r)},O));var P=t(),k=gn("footer",v,b);return(k||p||f)&&(P=t(rs,{props:Qn(ns,r),domProps:C?{}:ao(f,p)},yn("footer",x,v,b))),t(r.tag,ln(i,{staticClass:"card",class:(n={"flex-row":s||c,"flex-row-reverse":(l||u)&&!(s||c)},ls(n,"text-".concat(m),m),ls(n,"bg-".concat(y),y),ls(n,"border-".concat(_),_),ls(n,"text-".concat(g),g),n)}),[w,E,O,P,S])}});function ds(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ps(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)}}function fs(t,e,n){return e&&ps(t.prototype,e),n&&ps(t,n),t}var ms="__bv__visibility_observer",gs=/^\d+$/,ys=function(){function t(e,n,r){ds(this,t),this.el=e,this.callback=n.callback,this.margin=n.margin||0,this.once=n.once||!1,this.observer=null,this.visible=void 0,this.doneOnce=!1,this.createObserver(r)}return fs(t,[{key:"createObserver",value:function(t){var e=this;if(this.observer&&this.stop(),!this.doneOnce&&dt(this.callback)){try{this.observer=new IntersectionObserver(this.handler.bind(this),{root:null,rootMargin:this.margin,threshold:0})}catch(n){return this.doneOnce=!0,this.observer=void 0,void this.callback(null)}t.context.$nextTick(function(){Ce(function(){e.observer&&e.observer.observe(e.el)})})}}},{key:"handler",value:function(t){var e=t?t[0]:{},n=Boolean(e.isIntersecting||e.intersectionRatio>0);n!==this.visible&&(this.visible=n,this.callback(n),this.once&&this.visible&&(this.doneOnce=!0,this.stop()))}},{key:"stop",value:function(){this.observer&&this.observer.disconnect(),this.observer=null}}]),t}(),_s=function(t){var e=t[ms];e&&e.stop&&e.stop(),delete t[ms]},vs=function(t,e,n){var r=e.value,i=e.modifiers,o={margin:"0px",once:!1,callback:r};
45v(i).forEach(function(t){gs.test(t)?o.margin="".concat(t,"px"):"once"===t.toLowerCase()&&(o.once=!0)}),_s(t),t[ms]=new ys(t,o,n),t[ms]._prevModifiers=T(i)},bs=function(t,e,n){var r=e.value,i=e.oldValue,o=e.modifiers;o=T(o),!t||r===i&&t[ms]&&Io(o,t[ms]._prevModifiers)||vs(t,{value:r,modifiers:o},n)},xs=function(t){_s(t)},ws={bind:vs,componentUpdated:bs,unbind:xs};function Ss(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ts="BImg",Es='<svg width="%{w}" height="%{h}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 %{w} %{h}" preserveAspectRatio="none"><rect width="100%" height="100%" style="fill:%{f};"></rect></svg>',Cs={src:{type:String},srcset:{type:[String,Array]},sizes:{type:[String,Array]},alt:{type:String,default:null},width:{type:[Number,String]},height:{type:[Number,String]},block:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},fluidGrow:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},thumbnail:{type:Boolean,default:!1},left:{type:Boolean,default:!1},right:{type:Boolean,default:!1},center:{type:Boolean,default:!1},blank:{type:Boolean,default:!1},blankColor:{type:String,default:function(){return Qt(Ts,"blankColor")}}},Os=function(t,e,n){var r=encodeURIComponent(Es.replace("%{w}",ge(t)).replace("%{h}",ge(e)).replace("%{f}",n));return"data:image/svg+xml;charset=UTF-8,".concat(r)},Ps=i.extend({name:Ts,functional:!0,props:Cs,render:function(t,e){var n,r=e.props,i=e.data,o=r.src,a=ie(r.width)||null,s=ie(r.height)||null,c=null,u=r.block,h=l(r.srcset).filter($).join(","),d=l(r.sizes).filter($).join(",");return r.blank&&(!s&&a?s=a:!a&&s&&(a=s),a||s||(a=1,s=1),o=Os(a,s,r.blankColor||"transparent"),h=null,d=null),r.left?c="float-left":r.right?c="float-right":r.center&&(c="mx-auto",u=!0),t("img",ln(i,{attrs:{src:o,alt:r.alt,width:a?ge(a):null,height:s?ge(s):null,srcset:h||null,sizes:d||null},class:(n={"img-thumbnail":r.thumbnail,"img-fluid":r.fluid||r.fluidGrow,"w-100":r.fluidGrow,rounded:""===r.rounded||!0===r.rounded},Ss(n,"rounded-".concat(r.rounded),ft(r.rounded)&&""!==r.rounded),Ss(n,c,c),Ss(n,"d-block",u),n)}))}});function ks(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var As="BImgLazy",Is={src:{type:String,required:!0},srcset:{type:[String,Array]},sizes:{type:[String,Array]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},blankSrc:{type:String,default:null},blankColor:{type:String,default:function(){return Qt(As,"blankColor")}},blankWidth:{type:[Number,String]},blankHeight:{type:[Number,String]},show:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},fluidGrow:{type:Boolean,default:!1},block:{type:Boolean,default:!1},thumbnail:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},left:{type:Boolean,default:!1},right:{type:Boolean,default:!1},center:{type:Boolean,default:!1},offset:{type:[Number,String],default:360}},Ms=i.extend({name:As,directives:{bVisible:ws},props:Is,data:function(){return{isShown:this.show}},computed:{computedSrc:function(){return!this.blankSrc||this.isShown?this.src:this.blankSrc},computedBlank:function(){return!(this.isShown||this.blankSrc)},computedWidth:function(){return this.isShown?this.width:this.blankWidth||this.width},computedHeight:function(){return this.isShown?this.height:this.blankHeight||this.height},computedSrcset:function(){var t=l(this.srcset).filter($).join(",");return!this.blankSrc||this.isShown?t:null},computedSizes:function(){var t=l(this.sizes).filter($).join(",");return!this.blankSrc||this.isShown?t:null}},watch:{show:function(t,e){if(t!==e){var n=!V["c"]||t;this.isShown=n,n!==t&&this.$nextTick(this.updateShowProp)}},isShown:function(t,e){t!==e&&this.updateShowProp()}},mounted:function(){this.isShown=!V["c"]||this.show},methods:{updateShowProp:function(){this.$emit("update:show",this.isShown)},doShow:function(t){!t&&null!==t||this.isShown||(this.isShown=!0)}},render:function(t){var e,n=[];this.isShown||n.push({name:"b-visible",value:this.doShow,modifiers:(e={},ks(e,"".concat(ie(this.offset,0)),!0),ks(e,"once",!0),e)});return t(Ps,{directives:n,props:{src:this.computedSrc,blank:this.computedBlank,width:this.computedWidth,height:this.computedHeight,srcset:this.computedSrcset||null,sizes:this.computedSizes||null,alt:this.alt,blankColor:this.blankColor,fluid:this.fluid,fluidGrow:this.fluidGrow,block:this.block,thumbnail:this.thumbnail,rounded:this.rounded,left:this.left,right:this.right,center:this.center}})}});function Ds(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Bs(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Ds(Object(n),!0).forEach(function(e){zs(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function zs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ls=C(Is,["left","right","center","block","rounded","thumbnail","fluid","fluidGrow"]),Rs=Bs(Bs({},Ls),{},{top:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},start:{type:Boolean,default:!1},left:{type:Boolean,default:!1},end:{type:Boolean,default:!1},right:{type:Boolean,default:!1}}),js=i.extend({name:"BCardImgLazy",functional:!0,props:Rs,render:function(t,e){var n=e.props,r=e.data,i="card-img";n.top?i+="-top":n.right||n.end?i+="-right":n.bottom?i+="-bottom":(n.left||n.start)&&(i+="-left");var o=Bs(Bs({},n),{},{left:!1,right:!1,center:!1});return t(Ms,ln(r,{class:[i],props:o}))}}),Fs={textTag:{type:String,default:"p"}},Ns=i.extend({name:"BCardText",functional:!0,props:Fs,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.textTag,ln(r,{staticClass:"card-text"}),i)}}),$s={tag:{type:String,default:"div"},deck:{type:Boolean,default:!1},columns:{type:Boolean,default:!1}},Vs=i.extend({name:"BCardGroup",functional:!0,props:$s,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{class:n.deck?"card-deck":n.columns?"card-columns":"card-group"}),i)}}),Us=Vt({components:{BCard:hs,BCardHeader:Ja,BCardBody:Wa,BCardTitle:Da,BCardSubTitle:La,BCardFooter:rs,BCardImg:os,BCardImgLazy:js,BCardText:Ns,BCardGroup:Vs}}),Gs=function(){},Hs=Gs;function qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ws(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qs(Object(n),!0).forEach(function(e){Zs(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xs=function(t,e,n){if(t=t?t.$el||t:null,!ke(t))return null;if(Pt("observeDom"))return null;var r=new Oe(function(t){for(var n=!1,r=0;r<t.length&&!n;r++){var i=t[r],o=i.type,a=i.target;"characterData"===o&&a.nodeType===Node.TEXT_NODE?n=!0:"attributes"===o?n=!0:"childList"===o&&(i.addedNodes.length>0||i.removedNodes.length>0)&&(n=!0)}n&&e()});return r.observe(t,Ws({childList:!0,subtree:!0},n)),r},Ys=Xs,Ks={passive:!0},Js={passive:!0,capture:!1},Qs=function(t){return V["e"]?w(t)?t:{capture:!!t||!1}:!!(w(t)?t.capture:t)},tl=function(t,e,n,r){t&&t.addEventListener&&t.addEventListener(e,n,Qs(r))},el=function(t,e,n,r){t&&t.removeEventListener&&t.removeEventListener(e,n,Qs(r))},nl=function(t){for(var e=t?tl:el,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.apply(void 0,r)},rl="BCarousel",il={next:{dirClass:"carousel-item-left",overlayClass:"carousel-item-next"},prev:{dirClass:"carousel-item-right",overlayClass:"carousel-item-prev"}},ol=650,al=500,sl=40,ll={TOUCH:"touch",PEN:"pen"},cl={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend oTransitionEnd",transition:"transitionend"},ul=function(t){for(var e in cl)if(!ct(t.style[e]))return cl[e];return null},hl=i.extend({name:rl,mixins:[la,_n],provide:function(){return{bvCarousel:this}},model:{prop:"value",event:"input"},props:{labelPrev:{type:String,default:function(){return Qt(rl,"labelPrev")}},labelNext:{type:String,default:function(){return Qt(rl,"labelNext")}},labelGotoSlide:{type:String,default:function(){return Qt(rl,"labelGotoSlide")}},labelIndicators:{type:String,default:function(){return Qt(rl,"labelIndicators")}},interval:{type:Number,default:5e3},indicators:{type:Boolean,default:!1},controls:{type:Boolean,default:!1},noAnimation:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},noTouch:{type:Boolean,default:!1},noHoverPause:{type:Boolean,default:!1},imgWidth:{type:[Number,String]},imgHeight:{type:[Number,String]},background:{type:String},value:{type:Number,default:0}},data:function(){return{index:this.value||0,isSliding:!1,transitionEndEvent:null,slides:[],direction:null,isPaused:!(ie(this.interval,0)>0),touchStartX:0,touchDeltaX:0}},computed:{numSlides:function(){return this.slides.length}},watch:{value:function(t,e){t!==e&&this.setSlide(ie(t,0))},interval:function(t,e){t!==e&&(t?(this.pause(!0),this.start(!1)):this.pause(!1))},isPaused:function(t,e){t!==e&&this.$emit(t?"paused":"unpaused")},index:function(t,e){t===e||this.isSliding||this.doSlide(t,e)}},created:function(){this.$_interval=null,this.$_animationTimeout=null,this.$_touchTimeout=null,this.$_observer=null,this.isPaused=!(ie(this.interval,0)>0)},mounted:function(){this.transitionEndEvent=ul(this.$el)||null,this.updateSlides(),this.setObserver(!0)},beforeDestroy:function(){this.clearInterval(),this.clearAnimationTimeout(),this.clearTouchTimeout(),this.setObserver(!1)},methods:{clearInterval:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){clearInterval(this.$_interval),this.$_interval=null}),clearAnimationTimeout:function(){clearTimeout(this.$_animationTimeout),this.$_animationTimeout=null},clearTouchTimeout:function(){clearTimeout(this.$_touchTimeout),this.$_touchTimeout=null},setObserver:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$_observer&&this.$_observer.disconnect(),this.$_observer=null,t&&(this.$_observer=Ys(this.$refs.inner,this.updateSlides.bind(this),{subtree:!1,childList:!0,attributes:!0,attributeFilter:["id"]}))},setSlide:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(V["j"]&&document.visibilityState&&document.hidden)){var r=this.noWrap,i=this.numSlides;t=Bn(t),0!==i&&(this.isSliding?this.$once("sliding-end",function(){return e.setSlide(t,n)}):(this.direction=n,this.index=t>=i?r?i-1:0:t<0?r?0:i-1:t,r&&this.index!==t&&this.index!==this.value&&this.$emit("input",this.index)))}},prev:function(){this.setSlide(this.index-1,"prev")},next:function(){this.setSlide(this.index+1,"next")},pause:function(t){t||(this.isPaused=!0),this.clearInterval()},start:function(t){t||(this.isPaused=!1),this.clearInterval(),this.interval&&this.numSlides>1&&(this.$_interval=setInterval(this.next,In(1e3,this.interval)))},restart:function(){this.$el.contains(Ae())||this.start()},doSlide:function(t,e){var n=this,r=Boolean(this.interval),i=this.calcDirection(this.direction,e,t),o=i.overlayClass,a=i.dirClass,s=this.slides[e],l=this.slides[t];
45if(s&&l){if(this.isSliding=!0,r&&this.pause(!1),this.$emit("sliding-start",t),this.$emit("input",this.index),this.noAnimation)Ve(l,"active"),Ue(s,"active"),this.isSliding=!1,this.$nextTick(function(){return n.$emit("sliding-end",t)});else{Ve(l,o),ze(l),Ve(s,a),Ve(l,a);var c=!1,u=function e(){if(!c){if(c=!0,n.transitionEndEvent){var r=n.transitionEndEvent.split(/\s+/);r.forEach(function(t){return el(l,t,e,Js)})}n.clearAnimationTimeout(),Ue(l,a),Ue(l,o),Ve(l,"active"),Ue(s,"active"),Ue(s,a),Ue(s,o),He(s,"aria-current","false"),He(l,"aria-current","true"),He(s,"aria-hidden","true"),He(l,"aria-hidden","false"),n.isSliding=!1,n.direction=null,n.$nextTick(function(){return n.$emit("sliding-end",t)})}};if(this.transitionEndEvent){var h=this.transitionEndEvent.split(/\s+/);h.forEach(function(t){return tl(l,t,u,Js)})}this.$_animationTimeout=setTimeout(u,ol)}r&&this.start(!1)}},updateSlides:function(){this.pause(!0),this.slides=Le(".carousel-item",this.$refs.inner);var t=this.slides.length,e=In(0,An(Bn(this.index),t-1));this.slides.forEach(function(n,r){var i=r+1;r===e?(Ve(n,"active"),He(n,"aria-current","true")):(Ue(n,"active"),He(n,"aria-current","false")),He(n,"aria-posinset",String(i)),He(n,"aria-setsize",String(t))}),this.setSlide(e),this.start(this.isPaused)},calcDirection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t?il[t]:n>e?il.next:il.prev},handleClick:function(t,e){var n=t.keyCode;"click"!==t.type&&n!==gr.SPACE&&n!==gr.ENTER||(t.preventDefault(),t.stopPropagation(),e())},handleSwipe:function(){var t=Mn(this.touchDeltaX);if(!(t<=sl)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0?this.prev():e<0&&this.next()}},touchStart:function(t){V["f"]&&ll[t.pointerType.toUpperCase()]?this.touchStartX=t.clientX:V["f"]||(this.touchStartX=t.touches[0].clientX)},touchMove:function(t){t.touches&&t.touches.length>1?this.touchDeltaX=0:this.touchDeltaX=t.touches[0].clientX-this.touchStartX},touchEnd:function(t){V["f"]&&ll[t.pointerType.toUpperCase()]&&(this.touchDeltaX=t.clientX-this.touchStartX),this.handleSwipe(),this.pause(!1),this.clearTouchTimeout(),this.$_touchTimeout=setTimeout(this.start,al+In(1e3,this.interval))}},render:function(t){var e=this,n=t("div",{ref:"inner",class:["carousel-inner"],attrs:{id:this.safeId("__BV_inner_"),role:"list"}},[this.normalizeSlot("default")]),r=t();if(this.controls){var i=function(t){e.isSliding?t.preventDefault():e.handleClick(t,e.prev)},o=function(t){e.isSliding?t.preventDefault():e.handleClick(t,e.next)};r=[t("a",{class:["carousel-control-prev"],attrs:{href:"#",role:"button","aria-controls":this.safeId("__BV_inner_"),"aria-disabled":this.isSliding?"true":null},on:{click:i,keydown:i}},[t("span",{class:["carousel-control-prev-icon"],attrs:{"aria-hidden":"true"}}),t("span",{class:["sr-only"]},[this.labelPrev])]),t("a",{class:["carousel-control-next"],attrs:{href:"#",role:"button","aria-controls":this.safeId("__BV_inner_"),"aria-disabled":this.isSliding?"true":null},on:{click:o,keydown:o}},[t("span",{class:["carousel-control-next-icon"],attrs:{"aria-hidden":"true"}}),t("span",{class:["sr-only"]},[this.labelNext])])]}var a=t("ol",{class:["carousel-indicators"],directives:[{name:"show",rawName:"v-show",value:this.indicators,expression:"indicators"}],attrs:{id:this.safeId("__BV_indicators_"),"aria-hidden":this.indicators?"false":"true","aria-label":this.labelIndicators,"aria-owns":this.safeId("__BV_inner_")}},this.slides.map(function(n,r){return t("li",{key:"slide_".concat(r),class:{active:r===e.index},attrs:{role:"button",id:e.safeId("__BV_indicator_".concat(r+1,"_")),tabindex:e.indicators?"0":"-1","aria-current":r===e.index?"true":"false","aria-label":"".concat(e.labelGotoSlide," ").concat(r+1),"aria-describedby":e.slides[r].id||null,"aria-controls":e.safeId("__BV_inner_")},on:{click:function(t){e.handleClick(t,function(){e.setSlide(r)})},keydown:function(t){e.handleClick(t,function(){e.setSlide(r)})}}})})),s={mouseenter:this.noHoverPause?Hs:this.pause,mouseleave:this.noHoverPause?Hs:this.restart,focusin:this.pause,focusout:this.restart,keydown:function(t){if(!/input|textarea/i.test(t.target.tagName)){var n=t.keyCode;n!==gr.LEFT&&n!==gr.RIGHT||(t.preventDefault(),t.stopPropagation(),e[n===gr.LEFT?"prev":"next"]())}}};return!this.noTouch&&V["h"]&&(V["f"]?(s["&pointerdown"]=this.touchStart,s["&pointerup"]=this.touchEnd):(s["&touchstart"]=this.touchStart,s["&touchmove"]=this.touchMove,s["&touchend"]=this.touchEnd)),t("div",{staticClass:"carousel",class:{slide:!this.noAnimation,"carousel-fade":!this.noAnimation&&this.fade,"pointer-event":!this.noTouch&&V["h"]&&V["f"]},style:{background:this.background},attrs:{role:"region",id:this.safeId(),"aria-busy":this.isSliding?"true":"false"},on:s},[n,r,a])}});function dl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function pl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?dl(Object(n),!0).forEach(function(e){fl(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function fl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ml={imgSrc:{type:String},imgAlt:{type:String},imgWidth:{type:[Number,String]},imgHeight:{type:[Number,String]},imgBlank:{type:Boolean,default:!1},imgBlankColor:{type:String,default:"transparent"}},gl=pl(pl({},ml),{},{contentVisibleUp:{type:String},contentTag:{type:String,default:"div"},caption:{type:String},captionHtml:{type:String},captionTag:{type:String,default:"h3"},text:{type:String},textHtml:{type:String},textTag:{type:String,default:"p"},background:{type:String}}),yl=i.extend({name:"BCarouselSlide",mixins:[la,_n],inject:{bvCarousel:{default:function(){return{noTouch:!0}}}},props:gl,computed:{contentClasses:function(){return[this.contentVisibleUp?"d-none":"",this.contentVisibleUp?"d-".concat(this.contentVisibleUp,"-block"):""]},computedWidth:function(){return this.imgWidth||this.bvCarousel.imgWidth||null},computedHeight:function(){return this.imgHeight||this.bvCarousel.imgHeight||null}},render:function(t){var e=this.normalizeSlot("img");if(!e&&(this.imgSrc||this.imgBlank)){var n={};!this.bvCarousel.noTouch&&V["h"]&&(n.dragstart=function(t){t.preventDefault()}),e=t(Ps,{props:pl(pl({},Qn(ml,this.$props,Yn.bind(null,"img"))),{},{width:this.computedWidth,height:this.computedHeight,fluidGrow:!0,block:!0}),on:n})}var r=[!(!this.caption&&!this.captionHtml)&&t(this.captionTag,{domProps:ao(this.captionHtml,this.caption)}),!(!this.text&&!this.textHtml)&&t(this.textTag,{domProps:ao(this.textHtml,this.text)}),this.normalizeSlot("default")||!1],i=t();return r.some(Boolean)&&(i=t(this.contentTag,{staticClass:"carousel-caption",class:this.contentClasses},r.map(function(e){return e||t()}))),t("div",{staticClass:"carousel-item",style:{background:this.background||this.bvCarousel.background||null},attrs:{id:this.safeId(),role:"listitem"}},[e,i])}}),_l=Vt({components:{BCarousel:hl,BCarouselSlide:yl}}),vl=function(t){t.style.height=0,Ce(function(){ze(t),t.style.height="".concat(t.scrollHeight,"px")})},bl=function(t){t.style.height=null},xl=function(t){t.style.height="auto",t.style.display="block",t.style.height="".concat(Xe(t).height,"px"),ze(t),t.style.height=0},wl=function(t){t.style.height=null},Sl={css:!0,enterClass:"",enterActiveClass:"collapsing",enterToClass:"collapse show",leaveClass:"collapse show",leaveActiveClass:"collapsing",leaveToClass:"collapse"},Tl={enter:vl,afterEnter:bl,leave:xl,afterLeave:wl},El=i.extend({name:"BVCollapse",functional:!0,props:{appear:{type:Boolean,default:!1}},render:function(t,e){var n=e.props,r=e.data,i=e.children;return t("transition",ln(r,{props:Sl,on:Tl},{props:n}),i)}}),Cl={methods:{listenOnRoot:function(t,e){var n=this;this.$root.$on(t,e),this.$on("hook:beforeDestroy",function(){n.$root.$off(t,e)})},listenOnRootOnce:function(t,e){var n=this;this.$root.$once(t,e),this.$on("hook:beforeDestroy",function(){n.$root.$off(t,e)})},emitOnRoot:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(e=this.$root).$emit.apply(e,[t].concat(r))}}},Ol=gr.ENTER,Pl=gr.SPACE,kl="collapsed",Al="not-collapsed",Il="__BV_toggle",Ml="".concat(Il,"_HANDLER__"),Dl="".concat(Il,"_CLICK__"),Bl="".concat(Il,"_STATE__"),zl="".concat(Il,"_TARGETS__"),Ll="false",Rl="true",jl="aria-controls",Fl="aria-expanded",Nl="role",$l="tabindex",Vl="bv::toggle::collapse",Ul="bv::collapse::state",Gl="bv::collapse::sync::state",Hl="bv::request::collapse::state",ql=[Ol,Pl],Wl=/^#/,Zl=/^#[A-Za-z]+[\w\-:.]*$/,Xl=/\s+/,Yl=function(t){return!s(["button","a"],t.tagName.toLowerCase())}
45,Kl=function(t,e){var n=t.modifiers,r=t.arg,i=t.value,o=v(n||{});if(i=ft(i)?i.split(Xl):i,Ie(e.tagName,"a")){var a=We(e,"href")||"";Zl.test(a)&&o.push(a.replace(Wl,""))}return l(r,i).forEach(function(t){return ft(t)&&o.push(t)}),o.filter(function(t,e,n){return t&&n.indexOf(t)===e})},Jl=function(t){var e=t[Dl];e&&(el(t,"click",e),el(t,"keydown",e)),t[Dl]=null},Ql=function(t,e){if(Jl(t),e.context){var n=function(n){if(("keydown"!==n.type||s(ql,n.keyCode))&&!Be(t)){var r=t[zl]||[];r.forEach(function(t){e.context.$root.$emit(Vl,t)})}};t[Dl]=n,tl(t,"click",n),Yl(t)&&tl(t,"keydown",n)}},tc=function(t,e){t[Ml]&&e.context&&e.context.$root.$off([Ul,Gl],t[Ml]),t[Ml]=null},ec=function(t,e){if(tc(t,e),e.context){var n=function(e,n){s(t[zl]||[],e)&&(t[Bl]=n,nc(t,n))};t[Ml]=n,e.context.$root.$on([Ul,Gl],n)}},nc=function(t,e){e?(Ue(t,kl),Ve(t,Al),He(t,Fl,Rl)):(Ue(t,Al),Ve(t,kl),He(t,Fl,Ll))},rc=function(t,e){t[e]=null,delete t[e]},ic=function(t,e,n){if(V["j"]&&n.context){Yl(t)&&(Ze(t,Nl)||He(t,Nl,"button"),Ze(t,$l)||He(t,$l,"0")),nc(t,t[Bl]);var r=Kl(e,t);r.length?He(t,jl,r.join(" ")):qe(t,jl),Ql(t,n),Io(r,t[zl])||(t[zl]=r,r.forEach(function(t){n.context.$root.$emit(Hl,t)}))}},oc={bind:function(t,e,n){t[Bl]=!1,t[zl]=[],ec(t,n),ic(t,e,n)},componentUpdated:ic,updated:ic,unbind:function(t,e,n){Jl(t),tc(t,n),rc(t,Ml),rc(t,Dl),rc(t,Bl),rc(t,zl),Ue(t,kl),Ue(t,Al),qe(t,Fl),qe(t,jl),qe(t,Nl)}},ac="bv::collapse::accordion",sc=i.extend({name:"BCollapse",mixins:[la,Cl,_n],model:{prop:"visible",event:"input"},props:{isNav:{type:Boolean,default:!1},accordion:{type:String},visible:{type:Boolean,default:!1},tag:{type:String,default:"div"},appear:{type:Boolean,default:!1}},data:function(){return{show:this.visible,transitioning:!1}},computed:{classObject:function(){return{"navbar-collapse":this.isNav,collapse:!this.transitioning,show:this.show&&!this.transitioning}}},watch:{visible:function(t){t!==this.show&&(this.show=t)},show:function(t,e){t!==e&&this.emitState()}},created:function(){this.show=this.visible},mounted:function(){var t=this;this.show=this.visible,this.listenOnRoot(Vl,this.handleToggleEvt),this.listenOnRoot(ac,this.handleAccordionEvt),this.isNav&&(this.setWindowEvents(!0),this.handleResize()),this.$nextTick(function(){t.emitState()}),this.listenOnRoot(Hl,function(e){e===t.safeId()&&t.$nextTick(t.emitSync)})},updated:function(){this.emitSync()},deactivated:function(){this.isNav&&this.setWindowEvents(!1)},activated:function(){this.isNav&&this.setWindowEvents(!0),this.emitSync()},beforeDestroy:function(){this.show=!1,this.isNav&&V["j"]&&this.setWindowEvents(!1)},methods:{setWindowEvents:function(t){nl(t,window,"resize",this.handleResize,Js),nl(t,window,"orientationchange",this.handleResize,Js)},toggle:function(){this.show=!this.show},onEnter:function(){this.transitioning=!0,this.$emit("show")},onAfterEnter:function(){this.transitioning=!1,this.$emit("shown")},onLeave:function(){this.transitioning=!0,this.$emit("hide")},onAfterLeave:function(){this.transitioning=!1,this.$emit("hidden")},emitState:function(){this.$emit("input",this.show),this.emitOnRoot(Ul,this.safeId(),this.show),this.accordion&&this.show&&this.emitOnRoot(ac,this.safeId(),this.accordion)},emitSync:function(){this.emitOnRoot(Gl,this.safeId(),this.show)},checkDisplayBlock:function(){var t=Ge(this.$el,"show");Ue(this.$el,"show");var e="block"===Ye(this.$el).display;return t&&Ve(this.$el,"show"),e},clickHandler:function(t){var e=t.target;this.isNav&&e&&"block"===Ye(this.$el).display&&(je(e,".nav-link,.dropdown-item")||Fe(".nav-link,.dropdown-item",e))&&(this.checkDisplayBlock()||(this.show=!1))},handleToggleEvt:function(t){t===this.safeId()&&this.toggle()},handleAccordionEvt:function(t,e){this.accordion&&e===this.accordion&&(t===this.safeId()?this.show||this.toggle():this.show&&this.toggle())},handleResize:function(){this.show="block"===Ye(this.$el).display}},render:function(t){var e=this,n={visible:this.show,close:function(){return e.show=!1}},r=t(this.tag,{class:this.classObject,directives:[{name:"show",value:this.show}],attrs:{id:this.safeId()},on:{click:this.clickHandler}},[this.normalizeSlot("default",n)]);return t(El,{props:{appear:this.appear},on:{enter:this.onEnter,afterEnter:this.onAfterEnter,leave:this.onLeave,afterLeave:this.onAfterLeave}},[r])}}),lc=Vt({directives:{VBToggle:oc}}),cc=Vt({components:{BCollapse:sc},plugins:{VBTogglePlugin:lc}}),uc=n("f0bd");function hc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dc(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)}}function pc(t,e,n){return e&&dc(t.prototype,e),n&&dc(t,n),t}var fc=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(hc(this,t),!e)throw new TypeError("Failed to construct '".concat(this.constructor.name,"'. 1 argument required, ").
45concat(arguments.length," given."));p(this,t.Defaults,this.constructor.Defaults,n,{type:e}),m(this,{type:O(),cancelable:O(),nativeEvent:O(),target:O(),relatedTarget:O(),vueTarget:O(),componentId:O()});var r=!1;this.preventDefault=function(){this.cancelable&&(r=!0)},g(this,"defaultPrevented",{enumerable:!0,get:function(){return r}})}return pc(t,null,[{key:"Defaults",get:function(){return{type:"",cancelable:!0,nativeEvent:null,target:null,relatedTarget:null,vueTarget:null,componentId:null}}}]),t}(),mc={data:function(){return{listenForClickOut:!1}},watch:{listenForClickOut:function(t,e){t!==e&&(el(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Js),t&&tl(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Js))}},beforeCreate:function(){this.clickOutElement=null,this.clickOutEventName=null},mounted:function(){this.clickOutElement||(this.clickOutElement=document),this.clickOutEventName||(this.clickOutEventName="click"),this.listenForClickOut&&tl(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Js)},beforeDestroy:function(){el(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Js)},methods:{isClickOut:function(t){return!Ne(this.$el,t.target)},_clickOutHandler:function(t){this.clickOutHandler&&this.isClickOut(t)&&this.clickOutHandler(t)}}},gc={data:function(){return{listenForFocusIn:!1}},watch:{listenForFocusIn:function(t,e){t!==e&&(el(this.focusInElement,"focusin",this._focusInHandler,Js),t&&tl(this.focusInElement,"focusin",this._focusInHandler,Js))}},beforeCreate:function(){this.focusInElement=null},mounted:function(){this.focusInElement||(this.focusInElement=document),this.listenForFocusIn&&tl(this.focusInElement,"focusin",this._focusInHandler,Js)},beforeDestroy:function(){el(this.focusInElement,"focusin",this._focusInHandler,Js)},methods:{_focusInHandler:function(t){this.focusInHandler&&this.focusInHandler(t)}}};function yc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yc(Object(n),!0).forEach(function(e){vc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function vc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bc=function(t){return(t||[]).filter(De)},xc="bv::dropdown::",wc="".concat(xc,"shown"),Sc="".concat(xc,"hidden"),Tc={FORM_CHILD:".dropdown form",ITEM_SELECTOR:[".dropdown-item",".b-dropdown-form"].map(function(t){return"".concat(t,":not(.disabled):not([disabled])")}).join(", ")},Ec={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},Cc={dropup:{type:Boolean,default:!1},dropright:{type:Boolean,default:!1},dropleft:{type:Boolean,default:!1},right:{type:Boolean,default:!1},offset:{type:[Number,String],default:0},noFlip:{type:Boolean,default:!1},popperOpts:{default:function(){}},boundary:{type:[String,rt],default:"scrollParent"}},Oc={mixins:[la,mc,gc],provide:function(){return{bvDropdown:this}},inject:{bvNavbar:{default:null}},props:_c({disabled:{type:Boolean,default:!1}},Cc),data:function(){return{visible:!1,visibleChangePrevented:!1}},computed:{inNavbar:function(){return!ut(this.bvNavbar)},toggler:function(){var t=this.$refs.toggle;return t?t.$el||t:null},directionClass:function(){return this.dropup?"dropup":this.dropright?"dropright":this.dropleft?"dropleft":""}},watch:{visible:function(t,e){if(this.visibleChangePrevented)this.visibleChangePrevented=!1;else if(t!==e){var n=t?"show":"hide",r=new fc(n,{cancelable:!0,vueTarget:this,target:this.$refs.menu,relatedTarget:null,componentId:this.safeId?this.safeId():this.id||null});if(this.emitEvent(r),r.defaultPrevented)return this.visibleChangePrevented=!0,this.visible=e,void this.$off("hidden",this.focusToggler);
45"show"===n?this.showMenu():this.hideMenu()}},disabled:function(t,e){t!==e&&t&&this.visible&&(this.visible=!1)}},created:function(){this.$_popper=null},deactivated:function(){this.visible=!1,this.whileOpenListen(!1),this.destroyPopper()},beforeDestroy:function(){this.visible=!1,this.whileOpenListen(!1),this.destroyPopper()},methods:{emitEvent:function(t){var e=t.type;this.$emit(e,t),this.$root.$emit("".concat(xc).concat(e),t)},showMenu:function(){var t=this;if(!this.disabled){if(!this.inNavbar)if("undefined"===typeof uc["a"])Et("Popper.js not found. Falling back to CSS positioning","BDropdown");else{var e=this.dropup&&this.right||this.split?this.$el:this.$refs.toggle;e=e.$el||e,this.createPopper(e)}this.$root.$emit(wc,this),this.whileOpenListen(!0),this.$nextTick(function(){t.focusMenu(),t.$emit("shown")})}},hideMenu:function(){this.whileOpenListen(!1),this.$root.$emit(Sc,this),this.$emit("hidden"),this.destroyPopper()},createPopper:function(t){this.destroyPopper(),this.$_popper=new uc["a"](t,this.$refs.menu,this.getPopperConfig())},destroyPopper:function(){this.$_popper&&this.$_popper.destroy(),this.$_popper=null},updatePopper:function(){try{this.$_popper.scheduleUpdate()}catch(t){}},getPopperConfig:function(){var t=Ec.BOTTOM;this.dropup?t=this.right?Ec.TOPEND:Ec.TOP:this.dropright?t=Ec.RIGHT:this.dropleft?t=Ec.LEFT:this.right&&(t=Ec.BOTTOMEND);var e={placement:t,modifiers:{offset:{offset:this.offset||0},flip:{enabled:!this.noFlip}}};return this.boundary&&(e.modifiers.preventOverflow={boundariesElement:this.boundary}),_c(_c({},e),this.popperOpts||{})},whileOpenListen:function(t){this.listenForClickOut=t,this.listenForFocusIn=t;var e=t?"$on":"$off";this.$root[e](wc,this.rootCloseListener)},rootCloseListener:function(t){t!==this&&(this.visible=!1)},show:function(){var t=this;this.disabled||Ce(function(){t.visible=!0})},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.disabled||(this.visible=!1,t&&this.$once("hidden",this.focusToggler))},toggle:function(t){t=t||{};var e=t,n=e.type,r=e.keyCode;("click"===n||"keydown"===n&&-1!==[gr.ENTER,gr.SPACE,gr.DOWN].indexOf(r))&&(this.disabled?this.visible=!1:(this.$emit("toggle",t),t.preventDefault(),t.stopPropagation(),this.visible?this.hide(!0):this.show()))},onMousedown:function(t){t.preventDefault()},onKeydown:function(t){var e=t.keyCode;e===gr.ESC?this.onEsc(t):e===gr.DOWN?this.focusNext(t,!1):e===gr.UP&&this.focusNext(t,!0)},onEsc:function(t){this.visible&&(this.visible=!1,t.preventDefault(),t.stopPropagation(),this.$once("hidden",this.focusToggler))},onSplitClick:function(t){this.disabled?this.visible=!1:this.$emit("click",t)},hideHandler:function(t){var e=t.target;!this.visible||Ne(this.$refs.menu,e)||Ne(this.toggler,e)||this.hide()},clickOutHandler:function(t){this.hideHandler(t)},focusInHandler:function(t){this.hideHandler(t)},focusNext:function(t,e){var n=this,r=t.target;!this.visible||t&&Fe(Tc.FORM_CHILD,r)||(t.preventDefault(),t.stopPropagation(),this.$nextTick(function(){var t=n.getItems();if(!(t.length<1)){var i=t.indexOf(r);e&&i>0?i--:!e&&i<t.length-1&&i++,i<0&&(i=0),n.focusItem(i,t)}}))},focusItem:function(t,e){var n=e.find(function(e,n){return n===t});en(n)},getItems:function(){return bc(Le(Tc.ITEM_SELECTOR,this.$refs.menu))},focusMenu:function(){en(this.$refs.menu)},focusToggler:function(){var t=this;this.$nextTick(function(){en(t.toggler)})}}};function Pc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function kc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pc(Object(n),!0).forEach(function(e){Ac(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ac(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ic="BDropdown",Mc={text:{type:String,default:""},html:{type:String},variant:{type:String,default:function(){return Qt(Ic,"variant")}},size:{type:String,default:function(){return Qt(Ic,"size")}},block:{type:Boolean,default:!1},menuClass:{type:[String,Array,Object]},toggleTag:{type:String,default:"button"},toggleText:{type:String,default:function(){return Qt(Ic,"toggleText")}},toggleClass:{type:[String,Array,Object]},noCaret:{type:Boolean,default:!1},split:{type:Boolean,default:!1},splitHref:{type:String},splitTo:{type:[String,Object]},splitVariant:{type:String,default:function(){return Qt(Ic,"splitVariant")}},splitClass:{type:[String,Array,Object]},splitButtonType:{type:String,default:"button",validator:function(t){return s(["button","submit","reset"],t)}},lazy:{type:Boolean,default:!1},role:{type:String,default:"menu"}},Dc=i.extend({name:Ic,mixins:[la,Oc,_n],props:Mc,computed:{dropdownClasse
45s:function(){var t=this.block,e=this.split,n=this.boundary;return[this.directionClass,{show:this.visible,"btn-group":e||!t,"d-flex":t&&e,"position-static":"scrollParent"!==n||!n}]},menuClasses:function(){return[this.menuClass,{"dropdown-menu-right":this.right,show:this.visible}]},toggleClasses:function(){var t=this.split;return[this.toggleClass,{"dropdown-toggle-split":t,"dropdown-toggle-no-caret":this.noCaret&&!t}]}},render:function(t){var e=this.variant,n=this.size,r=this.block,i=this.disabled,o=this.split,a=this.role,s={variant:e,size:n,block:r,disabled:i},l=this.normalizeSlot("button-content"),c=this.hasNormalizedSlot("button-content")?{}:ao(this.html,this.text),u=t();if(o){var h=this.splitTo,d=this.splitHref,p=this.splitButtonType,f=kc(kc({},s),{},{variant:this.splitVariant||this.variant});h?f.to=h:d?f.href=d:p&&(f.type=p),u=t(Qr,{class:this.splitClass,attrs:{id:this.safeId("_BV_button_")},props:f,domProps:c,on:{click:this.onSplitClick},ref:"button"},[l])}var m=t(Qr,{staticClass:"dropdown-toggle",class:this.toggleClasses,attrs:{id:this.safeId("_BV_toggle_"),"aria-haspopup":"true","aria-expanded":this.visible?"true":"false"},props:kc(kc({},s),{},{tag:this.toggleTag,block:r&&!o}),domProps:o?{}:c,on:{mousedown:this.onMousedown,click:this.toggle,keydown:this.toggle},ref:"toggle"},[o?t("span",{class:["sr-only"]},[this.toggleText]):l]),g=t("ul",{staticClass:"dropdown-menu",class:this.menuClasses,attrs:{role:a,tabindex:"-1","aria-labelledby":this.safeId(o?"_BV_button_":"_BV_toggle_")},on:{keydown:this.onKeydown},ref:"menu"},!this.lazy||this.visible?this.normalizeSlot("default",{hide:this.hide}):[t()]);return t("div",{staticClass:"dropdown b-dropdown",class:this.dropdownClasses,attrs:{id:this.safeId()}},[u,m,g])}});function Bc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function zc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bc(Object(n),!0).forEach(function(e){Lc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Lc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rc=C(Lr,["event","routerTag"]),jc=i.extend({name:"BDropdownItem",mixins:[wr,_n],inheritAttrs:!1,inject:{bvDropdown:{default:null}},props:zc(zc({},Rc),{},{linkClass:{type:[String,Array,Object],default:null},variant:{type:String,default:null}}),computed:{computedAttrs:function(){return zc(zc({},this.bvAttrs),{},{role:"menuitem"})}},methods:{closeDropdown:function(){var t=this;Ce(function(){t.bvDropdown&&t.bvDropdown.hide(!0)})},onClick:function(t){this.$emit("click",t),this.closeDropdown()}},render:function(t){return t("li",{attrs:{role:"presentation"}},[t(Rr,{props:this.$props,staticClass:"dropdown-item",class:[this.linkClass,Lc({},"text-".concat(this.variant),this.variant&&!(this.active||this.disabled))],attrs:this.computedAttrs,on:{click:this.onClick},ref:"item"},this.normalizeSlot("default"))])}});function Fc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Nc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fc(Object(n),!0).forEach(function(e){$c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vc={active:{type:Boolean,default:!1},activeClass:{type:String,default:"active"},buttonClass:{type:[String,Array,Object]},disabled:{type:Boolean,default:!1},variant:{type:String}},Uc=i.extend({name:"BDropdownItemButton",mixins:[wr,_n],inheritAttrs:!1,inject:{bvDropdown:{default:null}},props:Vc,computed:{computedAttrs:function(){return Nc(Nc({},this.bvAttrs),{},{role:"menuitem",type:"button",disabled:this.disabled})}},methods:{closeDropdown:function(){this.bvDropdown&&this.bvDropdown.hide(!0)},onClick:function(t){this.$emit("click",t),this.closeDropdown()}},render:function(t){var e;return t("li",{attrs:{role:"presentation"}},[t("button",{staticClass:"dropdown-item",class:[this.buttonClass,(e={},$c(e,this.activeClass,this.active),$c(e,"text-".concat(this.variant),this.variant&&!(this.active||this.disabled)),e)],attrs:this.computedAttrs,on:{click:this.onClick},ref:"button"},this.normalizeSlot("default"))])}});function Gc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Hc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Gc(Object(n),!0).forEach(function(e){qc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function qc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wc={id:{type:String},tag:{type:String,default:"header"},variant:{type:String}},Zc=i.extend({name:"BDropdownHeader",functional:!0,props:Wc,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=r.attrs||{};return r.attrs={},t("li",ln(r,{attrs:{role:"presentation"}}),[t(n.tag,{staticClass:"dropdown-header",class:qc({},"text-".concat(n.variant),n.variant),attrs:Hc(Hc({},o),{},{id:n.id||null,role:"heading"}),ref:"header"},i)])}});function Xc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Yc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xc(Object(n),!0).forEach(function(e){Kc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Kc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jc={tag:{type:String,default:"hr"}},Qc=i.extend({name:"BDropdownDivider",functional:!0,props:Jc,render:function(t,e){var n=e.props,r=e.data,i=r.attrs||{};return r.attrs={},t("li",ln(r,{attrs:{role:"presentation"}}),[t(n.tag,{staticClass:"dropdown-divider",attrs:Yc(Yc({},i),{},{role:"separator","aria-orientation":"horizontal"}),ref:"divider"})])}}),tu={id:{type:String},inline:{type:Boolean,default:!1},novalidate:{type:Boolean,default:!1},validated:{type:Boolean,default:!1}},eu=i.extend({name:"BForm",functional:!0,props:tu,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t("form",ln(r,{class:{"form-inline":n.inline,"was-validated":n.validated},attrs:{id:n.id,novalidate:n.novalidate}}),i)}});function nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ru(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(e){iu(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function iu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ou=i.extend({name:"BDropdownForm",functional:!0,props:ru(ru({},tu),{},{disabled:{type:Boolean,default:!1},formClass:{type:[String,Object,Array]}}),render:function(t,e){var n=e.props,r=e.data,i=e.children,o=r.attrs||{},a=r.on||{};return r.attrs={},r.on={},t("li",ln(r,{attrs:{role:"presentation"}}),[t(eu,{ref:"form",staticClass:"b-dropdown-form",class:[n.formClass,{disabled:n.disabled}],props:n,attrs:ru(ru({},o),{},{disabled:n.disabled,tabindex:n.disabled?null:"-1"}),on:a},i)])}});function au(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var su=i.extend({name:"BDropdownText",functional:!0,props:{tag:{type:String,default:"p"},variant:{type:String}},render:function(t,e){var n=e.props,r=e.data,i=e.children,o=r.attrs||{};return r.attrs={},t("li",ln(r,{attrs:{role:"presentation"}}),[t(n.tag,{staticClass:"b-dropdown-text",class:au({},"text-".concat(n.variant),n.variant),props:n,attrs:o,ref:"text"},i)])}});function lu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function cu(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?lu(Object(n),!0).forEach(function(e){uu(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function uu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hu={id:{type:String},header:{type:String},headerTag:{type:String,default:"header"},headerVariant:{type:String},headerClasses:{type:[String,Array,Object]},ariaDescribedby:{type:String}},du=i.extend({name:"BDropdownGroup",functional:!0,props:hu,render:function(t,e){var n,r=e.props,i=e.data,o=e.slots,a=e.scopedSlots,s=o(),l=a||{},c=i.attrs||{};i.attrs={};var u=null;(gn("header",l,s)||r.header)&&(u=r.id?"_bv_".concat(r.id,"_group_dd_header"):null,n=t(r.headerTag,{staticClass:"dropdown-header",class:[r.headerClasses,uu({},"text-".concat(r.variant),r.variant)],attrs:{id:u,role:"heading"}},yn("header",{},l,s)||r.header));var h=[u,r.ariaDescribedBy].filter($).join(" ").trim();return t("li",ln(i,{attrs:{role:"presentation"}}),[n||t(),t("ul",{staticClass:"list-unstyled",attrs:cu(cu({},c),{},{id:r.id||null,role:"group","aria-describedby":h||null})},yn("default",{},l,s))])}}),pu=Vt({components:{BDropdown:Dc,BDd:Dc,BDropdownItem:jc,BDdItem:jc,BDropdownItemButton:Uc,BDropdownItemBtn:Uc,BDdItemButton:Uc,BDdItemBtn:Uc,BDropdownHeader:Zc,BDdHeader:Zc,BDropdownDivider:Qc,BDdDivider:Qc,BDropdownForm:ou,BDdForm:ou,BDropdownText:su,BDdText:su,BDropdownGroup:du,BDdGroup:du}});function fu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var mu={type:{type:String,default:"iframe",validator:function(t){return s(["iframe","embed","video","object","img","b-img","b-img-lazy"],t)}},tag:{type:String,default:"div"},aspect:{type:String,default:"16by9"}},gu=i.extend({name:"BEmbed",functional:!0,props:mu,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,{ref:r.ref,staticClass:"embed-responsive",class:fu({},"embed-responsive-".concat(n.aspect),n.aspect)},[t(n.type,ln(r,{ref:"",staticClass:"embed-responsive-item"}),i)])}}),yu=Vt({components:{BEmbed:gu}}),_u='Setting prop "options" to an object is deprecated. Use the array format instead.',vu={props:{options:{type:[Array,Object],default:function(){return[]}},valueField:{type:String,default:"value"},textField:{type:String,default:"text"},htmlField:{type:String,default:"html"},disabledField:{type:String,default:"disabled"}},computed:{formOptions:function(){return this.normalizeOptions(this.options)}},methods:{normalizeOption:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(S(t)){var n=Tt(t,this.valueField),r=Tt(t,this.textField);return{value:ct(n)?e||r:n,text:oo(String(ct(r)?e:r)),html:Tt(t,this.htmlField),disabled:Boolean(Tt(t,this.disabledField))}}return{value:e||t,text:oo(String(t)),disabled:!1}},normalizeOptions:function(t){var e=this;return a(t)?t.map(function(t){return e.normalizeOption(t)}):S(t)?(Et(_u,this.$options.name),v(t).map(function(n){return e.normalizeOption(t[n]||{},n)})):[]}}},bu=i.extend({name:"BFormDatalist",mixins:[vu,_n],props:{id:{type:String,required:!0}},render:function(t){var e=this.formOptions.map(function(e,n){var r=e.value,i=e.text,o=e.html,a=e.disabled;return t("option",{attrs:{value:r,disabled:a},domProps:ao(o,i),key:"option_".concat(n)})});return t("datalist",{attrs:{id:this.id}},[e,this.normalizeSlot("default")])}});function xu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wu="BFormText",Su={id:{type:String},tag:{type:String,default:"small"},textVariant:{type:String,default:function(){return Qt(wu,"textVariant")}},inline:{type:Boolean,default:!1}},Tu=i.extend({name:wu,functional:!0,props:Su,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{class:xu({"form-text":!n.inline},"text-".concat(n.textVariant),n.textVariant),attrs:{id:n.id}}),i)}}),Eu={id:{type:String},tag:{type:String,default:"div"},tooltip:{type:Boolean,default:!1},forceShow:{type:Boolean,default:!1},state:{type:Boolean,default:null},ariaLive:{type:String},role:{type:String}},Cu=i.extend({name:"BFormInvalidFeedback",functional:!0,props:Eu,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=!0===n.forceShow||!1===n.state;
45return t(n.tag,ln(r,{class:{"invalid-feedback":!n.tooltip,"invalid-tooltip":n.tooltip,"d-block":o},attrs:{id:n.id||null,role:n.role||null,"aria-live":n.ariaLive||null,"aria-atomic":n.ariaLive?"true":null}}),i)}}),Ou={id:{type:String},tag:{type:String,default:"div"},tooltip:{type:Boolean,default:!1},forceShow:{type:Boolean,default:!1},state:{type:Boolean,default:null},ariaLive:{type:String},role:{type:String}},Pu=i.extend({name:"BFormValidFeedback",functional:!0,props:Ou,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=!0===n.forceShow||!0===n.state;return t(n.tag,ln(r,{class:{"valid-feedback":!n.tooltip,"valid-tooltip":n.tooltip,"d-block":o},attrs:{id:n.id||null,role:n.role||null,"aria-live":n.ariaLive||null,"aria-atomic":n.ariaLive?"true":null}}),i)}}),ku={tag:{type:String,default:"div"}},Au=i.extend({name:"BFormRow",functional:!0,props:ku,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{staticClass:"form-row"}),i)}}),Iu=Vt({components:{BForm:eu,BFormDatalist:bu,BDatalist:bu,BFormText:Tu,BFormInvalidFeedback:Cu,BFormFeedback:Cu,BFormValidFeedback:Pu,BFormRow:Au}}),Mu=function(t,e){for(var n=0;n<t.length;n++)if(Io(t[n],e))return n;return-1},Du=Mu,Bu="input, textarea, select",zu={props:{name:{type:String},id:{type:String},disabled:{type:Boolean},required:{type:Boolean,default:!1},form:{type:String},autofocus:{type:Boolean,default:!1}},mounted:function(){this.handleAutofocus()},activated:function(){this.handleAutofocus()},methods:{handleAutofocus:function(){var t=this;this.$nextTick(function(){Ce(function(){var e=t.$el;t.autofocus&&De(e)&&(je(e,Bu)||(e=Re(Bu,e)),en(e))})})}}};function Lu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ru(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lu(Object(n),!0).forEach(function(e){ju(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ju(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fu={mixins:[wr,_n],inheritAttrs:!1,model:{prop:"checked",event:"input"},props:{value:{},checked:{},inline:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},button:{type:Boolean,default:!1},buttonVariant:{type:String},ariaLabel:{type:String},ariaLabelledby:{type:String}},data:function(){return{localChecked:this.isGroup?this.bvGroup.checked:this.checked,hasFocus:!1}},computed:{computedLocalChecked:{get:function(){return this.isGroup?this.bvGroup.localChecked:this.localChecked},set:function(t){this.isGroup?this.bvGroup.localChecked=t:this.localChecked=t}},isGroup:function(){return Boolean(this.bvGroup)},isBtnMode:function(){return this.isGroup?this.bvGroup.buttons:this.button},isPlain:function(){return!this.isBtnMode&&(this.isGroup?this.bvGroup.plain:this.plain)},isCustom:function(){return!this.isBtnMode&&!this.isPlain},isSwitch:function(){return!(this.isBtnMode||this.isRadio||this.isPlain)&&(this.isGroup?this.bvGroup.switches:this.switch)},isInline:function(){return this.isGroup?this.bvGroup.inline:this.inline},isDisabled:function(){return this.isGroup&&this.bvGroup.disabled||this.disabled},isRequired:function(){return this.getName&&(this.isGroup?this.bvGroup.required:this.required)},getName:function(){return(this.isGroup?this.bvGroup.groupName:this.name)||null},getForm:function(){return(this.isGroup?this.bvGroup.form:this.form)||null},getSize:function(){return(this.isGroup?this.bvGroup.size:this.size)||""},getState:function(){return this.isGroup?this.bvGroup.computedState:this.computedState},getButtonVariant:function(){return this.buttonVariant?this.buttonVariant:this.isGroup&&this.bvGroup.buttonVariant?this.bvGroup.buttonVariant:"secondary"},buttonClasses:function(){var t;return["btn","btn-".concat(this.getButtonVariant),(t={}
45,ju(t,"btn-".concat(this.getSize),this.getSize),ju(t,"disabled",this.isDisabled),ju(t,"active",this.isChecked),ju(t,"focus",this.hasFocus),t)]},computedAttrs:function(){return Ru(Ru({},this.bvAttrs),{},{id:this.safeId(),type:this.isRadio?"radio":"checkbox",name:this.getName,form:this.getForm,disabled:this.isDisabled,required:this.isRequired,autocomplete:"off","aria-required":this.isRequired||null,"aria-label":this.ariaLabel||null,"aria-labelledby":this.ariaLabelledby||null})}},watch:{checked:function(t){this.computedLocalChecked=t}},methods:{handleFocus:function(t){t.target&&("focus"===t.type?this.hasFocus=!0:"blur"===t.type&&(this.hasFocus=!1))},focus:function(){this.isDisabled||en(this.$refs.input)},blur:function(){this.isDisabled||nn(this.$refs.input)}},render:function(t){var e=this.normalizeSlot("default"),n={change:this.handleChange};this.isBtnMode&&(n.focus=n.blur=this.handleFocus);var r=t("input",{ref:"input",key:"input",on:n,class:{"form-check-input":this.isPlain,"custom-control-input":this.isCustom,"is-valid":!0===this.getState&&!this.isBtnMode,"is-invalid":!1===this.getState&&!this.isBtnMode,"position-static":this.isPlain&&!e},directives:[{name:"model",rawName:"v-model",value:this.computedLocalChecked,expression:"computedLocalChecked"}],attrs:this.computedAttrs,domProps:{value:this.value,checked:this.isChecked}});if(this.isBtnMode){var i=t("label",{class:this.buttonClasses},[r,e]);return this.isGroup||(i=t("div",{class:["btn-group-toggle","d-inline-block"]},[i])),i}var o=t();return this.isPlain&&!e||(o=t("label",{class:{"form-check-label":this.isPlain,"custom-control-label":this.isCustom},attrs:{for:this.safeId()}},e)),t("div",{class:ju({"form-check":this.isPlain,"form-check-inline":this.isPlain&&this.isInline,"custom-control":this.isCustom,"custom-control-inline":this.isCustom&&this.isInline,"custom-checkbox":this.isCustom&&this.isCheck&&!this.isSwitch,"custom-switch":this.isSwitch,"custom-radio":this.isCustom&&this.isRadio},"b-custom-control-".concat(this.getSize),Boolean(this.getSize&&!this.isBtnMode))},[r,o])}},Nu={props:{size:{type:String,default:function(){return Qt("formControls","size")}}},computed:{sizeFormClass:function(){return[this.size?"form-control-".concat(this.size):null]},sizeBtnClass:function(){return[this.size?"btn-".concat(this.size):null]}}},$u={props:{state:{type:Boolean,default:null}},computed:{computedState:function(){return pt(this.state)?this.state:null},stateClass:function(){var t=this.computedState;return!0===t?"is-valid":!1===t?"is-invalid":null}}},Vu=i.extend({name:"BFormCheckbox",mixins:[Fu,la,zu,Nu,$u],inject:{bvGroup:{from:"bvCheckGroup",default:!1}},props:{value:{default:!0},uncheckedValue:{default:!1},indeterminate:{type:Boolean,default:!1},switch:{type:Boolean,default:!1},checked:{default:null}},computed:{isChecked:function(){var t=this.computedLocalChecked,e=this.value;return a(t)?Du(t,e)>-1:Io(t,e)},isRadio:function(){return!1},isCheck:function(){return!0}},watch:{computedLocalChecked:function(t){this.$emit("input",t),this.$refs&&this.$refs.input&&this.$emit("update:indeterminate",this.$refs.input.indeterminate)},indeterminate:function(t){this.setIndeterminate(t)}},mounted:function(){this.setIndeterminate(this.indeterminate)},methods:{handleChange:function(t){var e=t.target,n=e.checked,r=e.indeterminate,i=this.computedLocalChecked,o=this.value,s=a(i),l=s?null:this.uncheckedValue;if(s){var c=Du(i,o);n&&c<0?i=i.concat(o):!n&&c>-1&&(i=i.slice(0,c).concat(i.slice(c+1)))}else i=n?o:l;this.computedLocalChecked=i,this.$emit("change",n?o:l),this.isGroup&&this.bvGroup.$emit("change",i),this.$emit("update:indeterminate",r)},setIndeterminate:function(t){a(this.computedLocalChecked)&&(t=!1),this.$refs&&this.$refs.input&&(this.$refs.input.indeterminate=t,this.$emit("update:indeterminate",t))}}}),Uu=i.extend({name:"BFormRadio",mixins:[la,Fu,zu,Nu,$u],inject:{bvGroup:{from:"bvRadioGroup",default:!1}},props:{checked:{default:null}},computed:{isChecked:function(){return Io(this.value,this.computedLocalChecked)},isRadio:function(){return!0},isCheck:function(){return!1}},watch:{computedLocalChecked:function(){this.$emit("input",this.computedLocalChecked)}},methods:{handleChange:function(t){var e=t.target.checked,n=this.value;this.computedLocalChecked=n,this.$emit("change",e?n:null),this.isGroup&&this.bvGroup.$emit("change",e?n:null)}}}),Gu={mixins:[_n],model:{prop:"checked",event:"input"},props:{validated:{type:Boolean,default:!1},ariaInvalid:{type:[Boolean,String],default:!1},stacked:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},buttons:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"}},computed:{inline:function(){return!this.stacked},groupName:function(){return this.name||this.safeId()},groupClasses:function(){return this.buttons?["btn-group-toggle",this.inline?"btn-group":"btn-group-vertical",this.size?"btn-group-".concat(this.size):"",this.validated?"was-validated":""]:[this.validated?"was-validated":""]},computedAriaInvalid:function(){var t=this.ariaInvalid;return!0===t||"true"===t||""===t?"true":!1===this.computedState?"true":null}},watch:{checked:function(t){this.localChecked=t},localChecked:function(t,e){Io(t,e)||this.$emit("input",t)}},render:function(t){var e=this,n=this.formOptions.map(function(n,r){var i="BV_option_".concat(r);return t(e.isRadioGroup?Uu:Vu,{props:{id:e.safeId(i),value:n.value,disabled:n.disabled||!1},key:i},[t("span",{domProps:ao(n.html,n.text)})])});return t("div",{class:[this.groupClasses,"bv-no-focus-ring"],attrs:{id:this.safeId(),role:this.isRadioGroup?"radiogroup":"group",tabindex:"-1","aria-required":this.required?"true":null,"aria-invalid":this.computedAriaInvalid}},[this.normalizeSlot("first"),n,this.normalizeSlot("default")])}},Hu={switches:{type:Boolean,default:!1},checked:{type:Array,default:null}},qu=i.extend({name:"BFormCheckboxGroup",mixins:[la,zu,Gu,vu,Nu,$u],provide:function(){return{bvCheckGroup:this}},props:Hu,data:function(){return{localChecked:this.checked||[]}},computed:{isRadioGroup:function(){return!1}}}),Wu=Vt({components:{BFormCheckbox:Vu,BCheckbox:Vu,BCheck:Vu,BFormCheckboxGroup:qu,BCheckboxGroup:qu,BCheckGroup:qu}}),Zu="__BV_hover_handler__",Xu="mouseenter",Yu="mouseleave",Ku=function(t){var e=function(e){t(e.type===Xu,e)};return e.fn=t,e},Ju=function(t,e,n){nl(t,e,Xu,n,Js),nl(t,e,Yu,n,Js)},Qu=function(t,e){var n=e.value,r=void 0===n?null:n;if(V["j"]){var i=t[Zu],o=dt(i),a=!(o&&i.fn===r);
45o&&a&&(Ju(!1,t,i),delete t[Zu]),dt(r)&&a&&(t[Zu]=Ku(r),Ju(!0,t,t[Zu]))}},th={bind:Qu,componentUpdated:Qu,unbind:function(t){Qu(t,{value:null})}};function eh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nh=Cc,rh=i.extend({name:"BVFormBtnLabelControl",directives:{BHover:th},mixins:[la,_n,Oc],props:{value:{type:String,default:""},formattedValue:{type:String},placeholder:{type:String},labelSelected:{type:String},state:{type:Boolean,default:null},size:{type:String},name:{type:String},form:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},lang:{type:String},rtl:{type:Boolean,default:null},buttonOnly:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"},menuClass:{type:[String,Array,Object]}},data:function(){return{isHovered:!1,hasFocus:!1}},computed:{idButton:function(){return this.safeId()},idLabel:function(){return this.safeId("_value_")},idMenu:function(){return this.safeId("_dialog_")},idWrapper:function(){return this.safeId("_outer_")},computedDir:function(){return!0===this.rtl?"rtl":!1===this.rtl?"ltr":null}},methods:{focus:function(){this.disabled||en(this.$refs.toggle)},blur:function(){this.disabled||nn(this.$refs.toggle)},setFocus:function(t){this.hasFocus="focus"===t.type},handleHover:function(t){this.isHovered=t},stopEvent:function(t){t.stopPropagation()}},render:function(t){var e,n,r,i=this.idButton,o=this.idLabel,a=this.idMenu,s=this.idWrapper,l=this.disabled,c=this.readonly,u=this.required,h=this.isHovered,d=this.hasFocus,p=this.state,f=this.visible,m=this.size,g=ge(this.value)||"",y=this.labelSelected,_=!!this.buttonOnly,v=this.buttonVariant,b={isHovered:h,hasFocus:d,state:p,opened:f},x=t("button",{ref:"toggle",staticClass:"btn",class:(e={},eh(e,"btn-".concat(v),_),eh(e,"btn-".concat(m),!!m),eh(e,"h-auto",!_),eh(e,"dropdown-toggle",_),eh(e,"dropdown-toggle-no-caret",_),e),attrs:{id:i,type:"button",disabled:l,"aria-haspopup":"dialog","aria-expanded":f?"true":"false","aria-invalid":!1===p||u&&!g?"true":null,"aria-required":u?"true":null},directives:[{name:"b-hover",value:this.handleHover}],on:{mousedown:this.onMousedown,click:this.toggle,keydown:this.toggle,"!focus":this.setFocus,"!blur":this.setFocus}},[this.hasNormalizedSlot("button-content")?this.normalizeSlot("button-content",b):t(gi,{props:{scale:1.25}})]),w=t();this.name&&!l&&(w=t("input",{attrs:{type:"hidden",name:this.name||null,form:this.form||null,value:g}}));var S=t("div",{ref:"menu",staticClass:"dropdown-menu",class:[this.menuClass,{show:f,"dropdown-menu-right":this.right}],attrs:{id:a,role:"dialog",tabindex:"-1","aria-modal":"false","aria-labelledby":o},on:{keydown:this.onKeydown}},[this.normalizeSlot("default",{opened:f})]),T=t("label",{staticClass:"form-control text-break text-wrap bg-transparent h-auto",class:(n={"sr-only":_,"text-muted":!g},eh(n,"form-control-".concat(m),!!m),eh(n,"is-invalid",!1===p),eh(n,"is-valid",!0===p),n),attrs:{id:o,for:i,"aria-invalid":!1===p||u&&!g?"true":null,"aria-required":u?"true":null},directives:[{name:"b-hover",value:this.handleHover}],on:{"!click":this.stopEvent}},[g?this.formattedValue||g:this.placeholder||"",g&&y?t("bdi",{staticClass:"sr-only"},y):""]);return t("div",{staticClass:"b-form-btn-label-control dropdown",class:[this.directionClass,(r={"btn-group":_,"form-control":!_},eh(r,"form-control-".concat(m),!!m&&!_),eh(r,"d-flex",!_),eh(r,"h-auto",!_),eh(r,"align-items-stretch",!_),eh(r,"focus",d&&!_),eh(r,"show",f),eh(r,"is-valid",!0===p),eh(r,"is-invalid",!1===p),r)],attrs:{id:s,role:_?null:"group",lang:this.lang||null,dir:this.computedDir,"aria-disabled":l,"aria-readonly":c&&!l,"aria-labelledby":o,"aria-invalid":!1===p||u&&!g?"true":null,"aria-required":u?"true":null}},[x,w,S,T])}});function ih(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function oh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?ih(Object(n),!0).forEach(function(e){ah(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ih(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ah(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sh="BFormDatepicker",lh=function(t){return Qt(sh,t)||Qt("BCalendar",t)},ch={props:oh({value:{type:[String,Date],default:null},valueAsDate:{type:Boolean,default:!1},resetValue:{type:[String,Date]},initialDate:{type:[String,Date]},placeholder:{type:String},size:{type:String},min:{type:[String,Date]},max:{type:[String,Date]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},name:{type:String},form:{type:String},state:{type:Boolean,default:null},dateDisabledFn:{type:Function},noCloseOnSelect:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},showDecadeNav:{type:Boolean,default:!1},locale:{type:[String,Array]},startWeekday:{type:[Number,String],default:0},direction:{type:String},buttonOnly:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"},calendarWidth:{type:String,default:"270px"},selectedVariant:{type:String,default:"primary"},todayVariant:{type:String},noHighlightToday:{type:Boolean,default:!1},todayButton:{type:Boolean,default:!1},labelTodayButton:{type:String,default:function(){return Qt(sh,"labelTodayButton")}},todayButtonVariant:{type:String,default:"outline-primary"},resetButton:{type:Boolean,default:!1},labelResetButton:{type:String,default:function(){return Qt(sh,"labelResetButton")}},resetButtonVariant:{type:String,default:"outline-danger"},closeButton:{type:Boolean,default:!1},labelCloseButton:{type:String,default:function(){return Qt(sh,"labelCloseButton")}},closeButtonVariant:{type:String,default:"outline-secondary"},dateInfoFn:{type:Function},labelPrevDecade:{type:String,default:function(){return lh("labelPrevDecade")}},labelPrevYear:{type:String,default:function(){return lh("labelPrevYear")}},labelPrevMonth:{type:String,default:function(){return lh("labelPrevMonth")}},labelCurrentMonth:{type:String,default:function(){return lh("labelCurrentMonth")}},labelNextMonth:{type:String,default:function(){return lh("labelNextMonth")}},labelNextYear:{type:String,default:function(){return lh("labelNextYear")}},labelNextDecade:{type:String,default:function(){return lh("labelNextDecade")}},labelToday:{type:String,default:function(){return lh("labelToday")}},labelSelected:{type:String,default:function(){return lh("labelSelected")}},labelNoDateSelected:{type:String,default:function(){return lh("labelNoDateSelected")}},labelCalendar:{type:String,default:function(){return lh("labelCalendar")}},labelNav:{type:String,default:function(){return lh("labelNav")}},labelHelp:{type:String,default:function(){return lh("labelHelp")}},dateFormatOptions:{type:Object,default:function(){return{year:Ta,month:Ca,day:Ta,weekday:Ca}}},weekdayHeaderFormat:{type:String,default:Oa,validator:function(t){return s([Ca,Oa,Pa],t)}},dark:{type:Boolean,default:!1},menuClass:{type:[String,Array,Object]}},nh)},uh=i.extend({name:sh,mixins:[la,ch],model:{prop:"value",event:"input"},data:function(){return{localYMD:Ho(this.value)||"",isVisible:!1,localLocale:null,isRTL:!1,formattedValue:"",activeYMD:""}},computed:{calendarYM:function(){return this.activeYMD.slice(0,-3)},calendarProps:function(){var t=this;return{hidden:!t.isVisible,value:t.localYMD,min:t.min,max:t.max,initialDate:t.initialDate,readonly:t.readonly,disabled:t.disabled,locale:t.locale,startWeekday:t.startWeekday,direction:t.direction,width:t.calendarWidth,dateDisabledFn:t.dateDisabledFn,selectedVariant:t.selectedVariant,todayVariant:t.todayVariant,dateInfoFn:t.dateInfoFn,hideHeader:t.hideHeader,showDecadeNav:t.showDecadeNav,noHighlightToday:t.noHighlightToday,labelPrevDecade:t.labelPrevDecade,labelPrevYear:t.labelPrevYear,labelPrevMonth:t.labelPrevMonth,labelCurrentMonth:t.labelCurrentMonth,labelNextMonth:t.labelNextMonth,labelNextYear:t.labelNextYear,labelNextDecade:t.labelNextDecade,labelToday:t.labelToday,labelSelected:t.labelSelected,labelNoDateSelected:t.labelNoDateSelected,labelCalendar:t.labelCalendar,labelNav:t.labelNav,labelHelp:t.labelHelp,dateFormatOptions:t.dateFormatOptions,weekdayHeaderFormat:t.weekdayHeaderFormat}},computedLang:function(){return(this.localLocale||"").replace(/-u-.*$/i,"")||null},computedResetValue:function(){return Ho(ia(this.resetValue))||""}},watch:{value:function(t){this.localYMD=Ho(t)||""},localYMD:function(t){this.isVisible&&this.$emit("input",this.valueAsDate?Go(t)||null:t||"")},calendarYM:function(t,e){if(t!==e&&e)try{this.$refs.control.updatePopper()}catch(n){}}},methods:{focus:function(){this.disabled||en(this.$refs.control)},blur:function(){this.disabled||nn(this.$refs.control)},setAndClose:function(t){var e=this;this.localYMD=t,this.noCloseOnSelect||this.$nextTick(function(){e.$refs.control.hide(!0)})},onSelected:function(t){var e=this;this.$nextTick(function(){e.setAndClose(t)})},onInput:function(t){this.localYMD!==t&&(this.localYMD=t)},onContext:function(t){var e=t.activeYMD,n=t.isRTL,r=t.locale,i=t.selectedYMD,o=t.selectedFormatted;this.isRTL=n,this.localLocale=r,this.formattedValue=o,this.localYMD=i,this.activeYMD=e,this.$emit("context",t)},onTodayButton:function(){this.setAndClose(Ho(ia(Uo(),this.min,this.max)))},onResetButton:function(){this.setAndClose(this.computedResetValue)},onCloseButton:function(){this.$refs.control.hide(!0)},onShow:function(){this.isVisible=!0},onShown:function(){var t=this;this.$nextTick(function(){en(t.$refs.calendar),t.$emit("shown")})},onHidden:function(){this.isVisible=!1,this.$emit("hidden")},defaultButtonFn:function(t){var e=t.isHovered,n=t.hasFocus;return this.$createElement(e||n?pi:di,{attrs:{"aria-hidden":"true"}})}},render:function(t){var e=this.$scopedSlots,n=this.localYMD,r=this.disabled,i=this.readonly,o=ht(this.placeholder)?this.labelNoDateSelected:this.placeholder,a=[];if(this.todayButton){var s=this.labelTodayButton;a.push(t(Qr,{props:{size:"sm",disabled:r||i,variant:this.todayButtonVariant},attrs:{"aria-label":s||null},on:{click:this.onTodayButton}},s))}if(this.resetButton){var l=this.labelResetButton;a.push(t(Qr,{props:{size:"sm",disabled:r||i,variant:this.resetButtonVariant},attrs:{"aria-label":l||null},on:{click:this.onResetButton}},l))}if(this.closeButton){var c=this.labelCloseButton;a.push(t(Qr,{props:{size:"sm",disabled:r,variant:this.closeButtonVariant},attrs:{"aria-label":c||null},on:{click:this.onCloseButton}},c))}a.length>
450&&(a=[t("div",{staticClass:"b-form-date-controls d-flex flex-wrap",class:{"justify-content-between":a.length>1,"justify-content-end":a.length<2}},a)]);var u=t(ka,{key:"calendar",ref:"calendar",staticClass:"b-form-date-calendar w-100",props:this.calendarProps,on:{selected:this.onSelected,input:this.onInput,context:this.onContext},scopedSlots:E(e,["nav-prev-decade","nav-prev-year","nav-prev-month","nav-this-month","nav-next-month","nav-next-year","nav-next-decade"])},a);return t(rh,{ref:"control",staticClass:"b-form-datepicker",props:oh(oh({},this.$props),{},{id:this.safeId(),rtl:this.isRTL,lang:this.computedLang,value:n||"",formattedValue:n?this.formattedValue:"",placeholder:o||"",menuClass:[{"bg-dark":!!this.dark,"text-light":!!this.dark},this.menuClass]}),on:{show:this.onShow,shown:this.onShown,hidden:this.onHidden},scopedSlots:{"button-content":e["button-content"]||this.defaultButtonFn}},[u])}}),hh=Vt({components:{BFormDatepicker:uh,BDatepicker:uh}}),dh={props:{plain:{type:Boolean,default:!1}},computed:{custom:function(){return!this.plain}}};function ph(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function fh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ph(Object(n),!0).forEach(function(e){mh(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ph(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gh="BFormFile",yh='Setting "value"/"v-model" to an empty string for reset is deprecated. Set to "null" instead.',_h=function t(e){return _t(e)||a(e)&&e.every(function(e){return t(e)})},vh=i.extend({name:gh,mixins:[wr,la,zu,$u,dh,_n],inheritAttrs:!1,model:{prop:"value",event:"input"},props:{size:{type:String,default:function(){return Qt("BFormControl","size")}},value:{type:[ot,Array],default:null,validator:function(t){return""===t?(Et(yh,gh),!0):ht(t)||_h(t)}},accept:{type:String,default:""},capture:{type:Boolean,default:!1},placeholder:{type:String,default:function(){return Qt(gh,"placeholder")}},browseText:{type:String,default:function(){return Qt(gh,"browseText")}},dropPlaceholder:{type:String,default:function(){return Qt(gh,"dropPlaceholder")}},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{selectedFile:null,dragging:!1,hasFocus:!1}},computed:{selectLabel:function(){if(this.dragging&&this.dropPlaceholder)return this.dropPlaceholder;if(!this.selectedFile||0===this.selectedFile.length)return this.placeholder;var t=l(this.selectedFile).filter($);return this.hasNormalizedSlot("file-name")?[this.normalizeSlot("file-name",{files:t,names:t.map(function(t){return t.name})})]:dt(this.fileNameFormatter)?ge(this.fileNameFormatter(t)):t.map(function(t){return t.name}).join(", ")},computedAttrs:function(){return fh(fh({},this.bvAttrs),{},{type:"file",id:this.safeId(),name:this.name,disabled:this.disabled,required:this.required,form:this.form||null,capture:this.capture||null,accept:this.accept||null,multiple:this.multiple,webkitdirectory:this.directory,"aria-required":this.required?"true":null})}},watch:{selectedFile:function(t,e){t===e||a(t)&&a(e)&&t.length===e.length&&t.every(function(t,n){return t===e[n]})||(!t&&this.multiple?this.$emit("input",[]):this.$emit("input",t))},value:function(t){(!t||a(t)&&0===t.length)&&this.reset()}},methods:{focusHandler:function(t){this.plain||"focusout"===t.type?this.hasFocus=!1:this.hasFocus=!0},reset:function(){try{var t=this.$refs.input;t.value="",t.type="",t.type="file"}catch(e){}this.selectedFile=this.multiple?[]:null},onFileChange:function(t){var e=this;this.$emit("change",t);var n=t.dataTransfer&&t.dataTransfer.items;if(!n||this.noTraverse)this.setFiles(t.target.files||t.dataTransfer.files);else{for(var r=[],i=0;i<n.length;i++){var a=n[i].webkitGetAsEntry();a&&r.push(this.traverseFileTree(a))}Promise.all(r).then(function(t){e.setFiles(o(t))})}},setFiles:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(t)if(this.multiple){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);this.selectedFile=e}else this.selectedFile=t[0]||null;else this.selectedFile=null},onReset:function(){this.selectedFile=this.multiple?[]:null},onDragover:function(t){if(t.preventDefault(),t.stopPropagation(),!this.noDrop&&this.custom){this.dragging=!0;try{t.dataTransfer.dropEffect="copy"}catch(e){}}},onDragleave:function(t){t.preventDefault(),t.stopPropagation(),this.dragging=!1},onDrop:function(t){t.preventDefault(),t.stopPropagation(),this.noDrop||(this.dragging=!1,t.dataTransfer.files&&t.dataTransfer.files.length>0&&this.onFileChange(t))},traverseFileTree:function(t,e){var n=this;return new Promise(function(r){e=e||"",t.isFile?t.file(function(t){t.$path=e,r(t)}):t.isDirectory&&t.createReader().readEntries(function(i){for(var a=[],s=0;s<i.length;s++)a.push(n.traverseFileTree(i[s],e+t.name+"/"));Promise.all(a).then(function(t){r(o(t))})})})}},render:function(t){var e=t("input",{ref:"input",class:[{"form-control-file":this.plain,"custom-file-input"
45:this.custom,focus:this.custom&&this.hasFocus},this.stateClass],attrs:this.computedAttrs,on:{change:this.onFileChange,focusin:this.focusHandler,focusout:this.focusHandler,reset:this.onReset}});if(this.plain)return e;var n=t("label",{staticClass:"custom-file-label",class:[this.dragging?"dragging":null],attrs:{for:this.safeId(),"data-browse":this.browseText||null}},this.selectLabel);return t("div",{staticClass:"custom-file b-form-file",class:[this.stateClass,mh({},"b-custom-control-".concat(this.size),this.size)],attrs:{id:this.safeId("_BV_file_outer_")},on:{dragover:this.onDragover,dragleave:this.onDragleave,drop:this.onDrop}},[e,n])}}),bh=Vt({components:{BFormFile:vh,BFile:vh}}),xh=function(t){return"\\"+t},wh=function(t){t=ge(t);var e=t.length,n=t.charCodeAt(0);return t.split("").reduce(function(r,i,o){var a=t.charCodeAt(o);return 0===a?r+"�":127===a||a>=1&&a<=31||0===o&&a>=48&&a<=57||1===o&&a>=48&&a<=57&&45===n?r+xh("".concat(a.toString(16)," ")):0===o&&45===a&&1===e?r+xh(i):a>=128||45===a||95===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+i:r+xh(i)},"")},Sh=wh;function Th(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Eh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Th(Object(n),!0).forEach(function(e){Ch(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Th(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ch(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Oh=/^col-/,Ph=function(){return{type:[Boolean,String,Number],default:!1}},kh=function(){return{type:[String,Number],default:null}},Ah=function(t,e,n){var r=t;if(!ht(n)&&!1!==n)return e&&(r+="-".concat(e)),"col"!==t||""!==n&&!0!==n?(r+="-".concat(n),ve(r)):ve(r)},Ih=Xt(Ah),Mh=f(null),Dh=function(){var t=re().filter($),e=t.reduce(function(t,e){return e&&(t[e]=Ph()),t},f(null)),n=t.reduce(function(t,e){return t[Kn(e,"offset")]=kh(),t},f(null)),r=t.reduce(function(t,e){return t[Kn(e,"order")]=kh(),t},f(null));return Mh=p(f(null),{col:v(e),offset:v(n),order:v(r)}),Eh(Eh(Eh(Eh({col:{type:Boolean,default:!1},cols:kh()},e),{},{offset:kh()},n),{},{order:kh()},r),{},{alignSelf:{type:String,default:null,validator:function(t){return s(["auto","start","end","center","baseline","stretch"],t)}},tag:{type:String,default:"div"}})},Bh={name:"BCol",functional:!0,get props(){return delete this.props,this.props=Dh()},render:function(t,e){var n,r=e.props,i=e.data,o=e.children,a=[];for(var s in Mh)for(var l=Mh[s],c=0;c<l.length;c++){var u=Ih(s,l[c].replace(s,""),r[l[c]]);u&&a.push(u)}var h=a.some(function(t){return Oh.test(t)});return a.push((n={col:r.col||!h&&!r.cols},Ch(n,"col-".concat(r.cols),r.cols),Ch(n,"offset-".concat(r.offset),r.offset),Ch(n,"order-".concat(r.order),r.order),Ch(n,"align-self-".concat(r.alignSelf),r.alignSelf),n)),t(r.tag,ln(i,{class:a}),o)}};function zh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Lh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zh(Object(n),!0).forEach(function(e){Rh(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zh(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Rh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jh="BFormGroup",Fh="input:not([disabled]),textarea:not([disabled]),select:not([disabled])",Nh=function(t,e){var n=e.normalizeSlot("invalid-feedback")||e.invali
45dFeedback,r=t();return n&&(r=t(Cu,{props:{id:e.invalidFeedbackId,state:e.computedState,tooltip:e.tooltip,ariaLive:e.feedbackAriaLive,role:e.feedbackAriaLive?"alert":null},attrs:{tabindex:n?"-1":null}},[n])),r},$h=function(t,e){var n=e.normalizeSlot("valid-feedback")||e.validFeedback,r=t();return n&&(r=t(Pu,{props:{id:e.validFeedbackId,state:e.computedState,tooltip:e.tooltip,ariaLive:e.feedbackAriaLive,role:e.feedbackAriaLive?"alert":null},attrs:{tabindex:n?"-1":null}},[n])),r},Vh=function(t,e){var n=e.normalizeSlot("description")||e.description,r=t();return n&&(r=t(Tu,{attrs:{id:e.descriptionId,tabindex:n?"-1":null}},[n])),r},Uh=function(t,e){var n=e.normalizeSlot("label")||e.label,r=e.labelFor,i=!r,o=e.isHorizontal,a=i?"legend":"label";if(n||o){if(e.labelSrOnly){var s=t();return n&&(s=t(a,{class:"sr-only",attrs:{id:e.labelId,for:r||null}},[n])),t(o?Bh:"div",{props:o?e.labelColProps:{}},[s])}return t(o?Bh:a,{on:i?{click:e.legendClick}:{},props:o?Lh({tag:a},e.labelColProps):{},attrs:{id:e.labelId,for:r||null,tabindex:i?"-1":null},class:[i?"bv-no-focus-ring":"",o||i?"col-form-label":"",!o&&i?"pt-0":"",o||i?"":"d-block",e.labelSize?"col-form-label-".concat(e.labelSize):"",e.labelAlignClasses,e.labelClass]},[n])}return t()},Gh=Xt(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;return"".concat(e).concat(fe(t))}),Hh=function(){var t=re(),e=t.reduce(function(t,e){return t[Gh(e,"labelCols")]={type:[Number,String,Boolean],default:!e&&null},t},f(null)),n=t.reduce(function(t,e){return t[Gh(e,"labelAlign")]={type:String},t},f(null));return Lh(Lh(Lh({label:{type:String},labelFor:{type:String},labelSize:{type:String},labelSrOnly:{type:Boolean,default:!1}},e),n),{},{labelClass:{type:[String,Array,Object]},description:{type:String},invalidFeedback:{type:String},validFeedback:{type:String},tooltip:{type:Boolean,default:!1},feedbackAriaLive:{type:String,default:"assertive"},validated:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}})},qh={name:jh,mixins:[la,$u,_n],get props(){return delete this.props,this.props=Hh()},computed:{labelColProps:function(){var t=this,e={};return re().forEach(function(n){var r=t[Gh(n,"labelCols")];if(r=""===r||(r||!1),pt(r)||"auto"===r||(r=ie(r,0),r=r>0&&r),r){var i=n||(pt(r)?"col":"cols");e[i]=r}}),e},labelAlignClasses:function(){var t=this,e=[];return re().forEach(function(n){var r=t[Gh(n,"labelAlign")]||null;if(r){var i=n?"text-".concat(n,"-").concat(r):"text-".concat(r);e.push(i)}}),e},isHorizontal:function(){return v(this.labelColProps).length>0},labelId:function(){return this.hasNormalizedSlot("label")||this.label?this.safeId("_BV_label_"):null},descriptionId:function(){return this.hasNormalizedSlot("description")||this.description?this.safeId("_BV_description_"):null},hasInvalidFeedback:function(){return!1===this.computedState&&(this.hasNormalizedSlot("invalid-feedback")||this.invalidFeedback)},invalidFeedbackId:function(){return this.hasInvalidFeedback?this.safeId("_BV_feedback_invalid_"):null},hasValidFeedback:function(){return!0===this.computedState&&(this.hasNormalizedSlot("valid-feedback")||this.validFeedback)},validFeedbackId:function(){return this.hasValidFeedback?this.safeId("_BV_feedback_valid_"):null},describedByIds:function(){return[this.descriptionId,this.invalidFeedbackId,this.validFeedbackId].filter(Boolean).join(" ")||null}},watch:{describedByIds:function(t,e){t!==e&&this.setInputDescribedBy(t,e)}},mounted:function(){var t=this;this.$nextTick(function(){t.setInputDescribedBy(t.describedByIds)})},methods:{legendClick:function(t){if(!this.labelFor){var e=t.target?t.target.tagName:"";if(!/^(input|select|textarea|label|button|a)$/i.test(e)){var n=Le(Fh,this.$refs.content).filter(De);n&&1===n.length&&en(n[0])}}},setInputDescribedBy:function(t,e){if(this.labelFor&&V["j"]){var n=Re("#".concat(Sh(this.labelFor)),this.$refs.content);if(n){var r="aria-describedby",i=(We(n,r)||"").split(/\s+/);t=(t||"").split(/\s+/),e=(e||"").split(/\s+/),i=i.filter(function(t){return!s(e,t)}).concat(t).filter(Boolean),i=v(i.reduce(function(t,e){return Lh(Lh({},t),{},Rh({},e,!0))},{})).join(" ").trim(),i?He(n,r,i):qe(n,r)}}}},render:function(t){var e=!this.labelFor,n=this.isHorizontal,r=Uh(t,this),i=t(n?Bh:"div",{ref:"content",staticClass:"bv-no-focus-ring",attrs:{tabindex:e?"-1":null,role:e?"group":null}},[this.normalizeSlot("default")||t(),Nh(t,this),$h(t,this),Vh(t,this)]),o={staticClass:"form-group",class:[this.validated?"was-validated":null,this.stateClass],attrs:{id:this.safeId(),disabled:e?this.disabled:null,role:e?null:"group","aria-invalid":!1===this.computedState?"true":null,"aria-labelledby":e&&n?this.labelId:null,"aria-describedby":e?this.describedByIds:null}};return t(e?"fieldset":n?Au:"div",o,n&&e?[t(Au,[r,i])]:[r,i])}},Wh=Vt({components:{BFormGroup:qh,BFormFieldset:qh}}),Zh={computed:{selectionStart:{cache:!1,get:function(){return this.$refs.input.selectionStart},set:function(t){this.$refs.input.selectionStart=t}},selectionEnd:{cache:!1,get:function(){return this.$refs.input.selectionEnd},set:function(t){this.$refs.input.selectionEnd=t}},selectionDirection:{cache:!1,get:function(){return this.$refs.input.selectionDirection},set:function(t){this.$refs.input.selectionDirection=t}}},methods:{select:function(){var t;(t=this.$refs.input).select.apply(t,arguments)},setSelectionRange:function(){var t;(t=this.$refs.input).setSelectionRange.apply(t,arguments)},setRangeText:function(){var t;(t=this.$refs.input).setRangeText.apply(t,arguments)}}},Xh={model:{prop:"value",event:"update"},props:{value:{type:[String,Number],default:""},ariaInvalid:{type:[Boolean,String],default:!1},readonly:{type:Boolean,default:!1},plaintext:{type:Boolean,default:!1},autocomplete:{type:String},placeholder:{type:String},formatter:{type:Function},lazyFormatter:{type:Boolean,default:!1},trim:{type:Boolean,default:!1},number:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},debounce:{type:[Number,String],default:0}},data:function(){return{localValue:ge(this.value),vModelValue:this.value}},computed:{computedClass:function(){return[{"custom-range":"range"===this.type,"form-control-plaintext":this.plaintext&&"range"!==this.type&&"color"!==this.type,"form-control":!this.plaintext&&"range"!==this.type||"color"===this.type},this.sizeFormClass,this.stateClass]},computedAriaInvalid:function(){return this.ariaInvalid&&"false"!==this.ariaInvalid?!0===this.ariaInvalid?"true":this.ariaInvalid:!1===this.computedState?"true":null},computedDebounce:function(){return In(ie(this.debounce,0),0)},hasFormatter:function(){return dt(this.formatter)}},watch:{value:function(t){var e=ge(t);e!==this.localValue&&t!==this.vModelValue&&(this.clearDebounce(),this.localValue=e,this.vModelValue=t)}},created:function(){this.$_inputDebounceTimer=null},mounted:function(){this.$on("hook:beforeDestroy",this.clearDebounce);var t=this.value,e=ge(t);e!==this.localValue&&t!==this.vModelValue&&(this.localValue=e,this.vModelValue=t)},methods:{clearDebounce:function(){clearTimeout(this.$_inputDebounceTimer),this.$_inputDebounceTimer=null},formatValue:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t=ge(t),!this.hasFormatter||this.lazyFormatter&&!n||(t=this.formatter(t,e)),t},modifyValue:function(t){return this.trim&&(t=t.trim()),this.number&&(t=oe(t,t)),t}
45,updateValue:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.lazy;if(!r||n)if(t=this.modifyValue(t),t!==this.vModelValue){this.clearDebounce();var i=function(){e.vModelValue=t,e.$emit("update",t)},o=this.computedDebounce;o>0&&!r&&!n?this.$_inputDebounceTimer=setTimeout(i,o):i()}else if(this.hasFormatter){var a=this.$refs.input;a&&t!==a.value&&(a.value=t)}},onInput:function(t){if(!t.target.composing){var e=t.target.value,n=this.formatValue(e,t);!1===n||t.defaultPrevented?t.preventDefault():(this.localValue=n,this.updateValue(n),this.$emit("input",n))}},onChange:function(t){var e=t.target.value,n=this.formatValue(e,t);!1===n||t.defaultPrevented?t.preventDefault():(this.localValue=n,this.updateValue(n,!0),this.$emit("change",n))},onBlur:function(t){var e=t.target.value,n=this.formatValue(e,t,!0);!1!==n&&(this.localValue=ge(this.modifyValue(n)),this.updateValue(n,!0)),this.$emit("blur",t)},focus:function(){this.disabled||en(this.$el)},blur:function(){this.disabled||nn(this.$el)}}},Yh={computed:{validity:{cache:!1,get:function(){return this.$refs.input.validity}},validationMessage:{cache:!1,get:function(){return this.$refs.input.validationMessage}},willValidate:{cache:!1,get:function(){return this.$refs.input.willValidate}}},methods:{setCustomValidity:function(){var t;return(t=this.$refs.input).setCustomValidity.apply(t,arguments)},checkValidity:function(){var t;return(t=this.$refs.input).checkValidity.apply(t,arguments)},reportValidity:function(){var t;return(t=this.$refs.input).reportValidity.apply(t,arguments)}}};function Kh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Jh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kh(Object(n),!0).forEach(function(e){Qh(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kh(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Qh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var td=["text","password","email","number","url","tel","search","range","color","date","time","datetime","datetime-local","month","week"],ed=i.extend({name:"BFormInput",mixins:[Sr,la,zu,Nu,$u,Xh,Zh,Yh],props:{type:{type:String,default:"text",validator:function(t){return s(td,t)}},noWheel:{type:Boolean,default:!1},min:{type:[String,Number]},max:{type:[String,Number]},step:{type:[String,Number]},list:{type:String}},computed:{localType:function(){return s(td,this.type)?this.type:"text"},computedAttrs:function(){var t=this.localType,e=this.disabled,n=this.placeholder,r=this.required,i=this.min,o=this.max,a=this.step;return{id:this.safeId(),name:this.name||null,form:this.form||null,type:t,disabled:e,placeholder:n,required:r,autocomplete:this.autocomplete||null,readonly:this.readonly||this.plaintext,min:i,max:o,step:a,list:"password"!==t?this.list:null,"aria-required":r?"true":null,"aria-invalid":this.computedAriaInvalid}},computedListeners:function(){return Jh(Jh({},this.bvListeners),{},{input:this.onInput,change:this.onChange,blur:this.onBlur})}},watch:{noWheel:function(t){this.setWheelStopper(t)}},mounted:function(){this.setWheelStopper(this.noWheel)},deactivated:function(){this.setWheelStopper(!1)},activated:function(){this.setWheelStopper(this.noWheel)},beforeDestroy:function(){this.setWheelStopper(!1)},methods:{setWheelStopper:function(t){var e=this.$el;nl(t,e,"focus",this.onWheelFocus),nl(t,e,"blur",this.onWheelBlur),t||el(document,"wheel",this.stopWheel)},onWheelFocus:function(){tl(document,"wheel",this.stopWheel)},onWheelBlur:function(){el(document,"wheel",this.stopWheel)},stopWheel:function(t){t.preventDefault(),nn(this.$el)}},render:function(t){return t("input",{ref:"input",class:this.computedClass,attrs:this.computedAttrs,domProps:{value:this.localValue},on:this.computedListeners})}}
45),nd=Vt({components:{BFormInput:ed,BInput:ed}}),rd={checked:{default:null}},id=i.extend({name:"BFormRadioGroup",mixins:[la,zu,Gu,vu,Nu,$u],provide:function(){return{bvRadioGroup:this}},props:rd,data:function(){return{localChecked:this.checked}},computed:{isRadioGroup:function(){return!0}}}),od=Vt({components:{BFormRadio:Uu,BRadio:Uu,BFormRadioGroup:id,BRadioGroup:id}});function ad(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sd="BFormRating",ld=3,cd=5,ud=gr.LEFT,hd=gr.RIGHT,dd=gr.UP,pd=gr.DOWN,fd=i.extend({name:"BVFormRatingStar",mixins:[_n],props:{rating:{type:Number,default:0},star:{type:Number,default:0},focused:{type:Boolean,default:!1},variant:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},hasClear:{type:Boolean,default:!1}},methods:{onClick:function(t){this.disabled||this.readonly||(t.preventDefault(),this.$emit("selected",this.star))}},render:function(t){var e=this.rating,n=this.star,r=this.focused,i=this.hasClear,o=this.variant,a=this.disabled,s=this.readonly,l=i?0:1,c=e>=n?"full":e>=n-.5?"half":"empty",u={variant:o,disabled:a,readonly:s};return t("span",{staticClass:"b-rating-star",class:{focused:r&&e===n||!ie(e)&&n===l,"b-rating-star-empty":"empty"===c,"b-rating-star-half":"half"===c,"b-rating-star-full":"full"===c},attrs:{tabindex:a||s?null:"-1"},on:{click:this.onClick}},[t("span",{staticClass:"b-rating-icon"},[this.normalizeSlot(c,u)])])}}),md=function(t){return In(ld,ie(t,cd))},gd=function(t,e,n){return In(An(t,n),e)},yd=i.extend({name:sd,components:{BIconStar:Ei,BIconStarHalf:Oi,BIconStarFill:Ci,BIconX:Pi},mixins:[la],model:{prop:"value",event:"change"},props:{value:{type:[Number,String],default:null},stars:{type:[Number,String],default:cd,validator:function(t){return ie(t)>=ld}},variant:{type:String,default:function(){return Qt(sd,"variant")}},color:{type:String,default:function(){return Qt(sd,"color")}},showValue:{type:Boolean,default:!1},showValueMax:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{type:String},name:{type:String},form:{type:String},noBorder:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},precision:{type:[Number,String],default:null},iconEmpty:{type:String,default:"star"},iconHalf:{type:String,default:"star-half"},iconFull:{type:String,default:"star-fill"},iconClear:{type:String,default:"x"},locale:{type:[String,Array]},showClear:{type:Boolean,default:!1}},data:function(){var t=oe(this.value,null),e=md(this.stars);return{localValue:ut(t)?null:gd(t,0,e),hasFocus:!1}},computed:{computedStars:function(){return md(this.stars)},computedRating:function(){var t=oe(this.localValue,0),e=ie(this.precision,3);return gd(oe(t.toFixed(e)),0,this.computedStars)},computedLocale:function(){var t=l(this.locale).filter($),e=new Intl.NumberFormat(t);return e.resolvedOptions().locale},isInteractive:function(){return!this.disabled&&!this.readonly},isRTL:function(){return sa(this.computedLocale)},formattedRating:function(){var t=ie(this.precision),e=this.showValueMax,n=this.computedLocale,r={notation:"standard",minimumFractionDigits:isNaN(t)?0:t,maximumFractionDigits:isNaN(t)?3:t},i=this.computedStars.toLocaleString(n),o=this.localValue;return o=ut(o)?e?"-":"":o.toLocaleString(n,r),e?"".concat(o,"/").concat(i):o}},watch:{value:function(t,e){if(t!==e){var n=oe(t,null);this.localValue=ut(n)?null:gd(n,0,this.computedStars)}},localValue:function(t,e){t!==e&&t!==(this.value||0)&&this.$emit("change",t||null)},disabled:function(t){t&&(this.hasFocus=!1,this.blur())}},methods:{focus:function(){this.disabled||en(this.$el)},blur:function(){this.disabled||nn(this.$el)},onKeydown:function(t){var e=t.keyCode;if(this.isInteractive&&s([ud,pd,hd,dd],e)){t.preventDefault();var n=ie(this.localValue,0),r=this.showClear?0:1,i=this.computedStars,o=this.isRTL?-1:1;e===ud?this.localValue=gd(n-o,r,i)||null:e===hd?this.localValue=gd(n+o,r,i):e===pd?this.localValue=gd(n-1,r,i)||null:e===dd&&(this.localValue=gd(n+1,r,i))}},onSelected:function(t){this.isInteractive&&(this.localValue=t)},onFocus:function(t){this.hasFocus=!!this.isInteractive&&"focus"===t.type},renderIcon:function(t){return this.$createElement(Di,{props:{icon:t,variant:this.disabled||this.color?null:this.variant||null}})},iconEmptyFn:function(){return this.renderIcon(this.iconEmpty)}
45,iconHalfFn:function(){return this.renderIcon(this.iconHalf)},iconFullFn:function(){return this.renderIcon(this.iconFull)},iconClearFn:function(){return this.$createElement(Di,{props:{icon:this.iconClear}})}},render:function(t){var e,n=this,r=this.disabled,i=this.readonly,o=this.size,a=this.name,s=this.form,l=this.inline,c=this.variant,u=this.color,h=this.noBorder,d=this.hasFocus,p=this.computedRating,f=this.computedStars,m=this.formattedRating,g=this.showClear,y=this.isRTL,_=this.isInteractive,v=this.$scopedSlots,b=[];if(g&&!r&&!i){var x=t("span",{staticClass:"b-rating-icon"},[(v["icon-clear"]||this.iconClearFn)()]);b.push(t("span",{staticClass:"b-rating-star b-rating-star-clear flex-grow-1",class:{focused:d&&0===p},attrs:{tabindex:_?"-1":null},on:{click:function(){return n.onSelected(null)}},key:"clear"},[x]))}for(var w=0;w<f;w++){var S=w+1;b.push(t(fd,{staticClass:"flex-grow-1",style:u&&!r?{color:u}:{},props:{rating:p,star:S,variant:r?null:c||null,disabled:r,readonly:i,focused:d,hasClear:g},on:{selected:this.onSelected},scopedSlots:{empty:v["icon-empty"]||this.iconEmptyFn,half:v["icon-half"]||this.iconHalfFn,full:v["icon-full"]||this.iconFullFn},key:w}))}return a&&b.push(t("input",{attrs:{type:"hidden",value:ut(this.localValue)?"":p,name:a,form:s||null},key:"hidden"})),this.showValue&&b.push(t("b",{staticClass:"b-rating-value flex-grow-1",attrs:{"aria-hidden":"true"},key:"value"},ge(m))),t("output",{staticClass:"b-rating form-control align-items-center",class:(e={},ad(e,"form-control-".concat(o),!!o),ad(e,"d-inline-flex",l),ad(e,"d-flex",!l),ad(e,"border-0",h),ad(e,"disabled",r),ad(e,"readonly",!r&&i),e),attrs:{id:this.safeId(),dir:y?"rtl":"ltr",tabindex:r?null:"0",disabled:r,role:"slider","aria-disabled":r?"true":null,"aria-readonly":!r&&i?"true":null,"aria-live":"off","aria-valuemin":g?"0":"1","aria-valuemax":ge(f),"aria-valuenow":p?ge(p):null},on:{keydown:this.onKeydown,focus:this.onFocus,blur:this.onFocus}},b)}}),_d=Vt({components:{BFormRating:yd,BRating:yd}}),vd={mixins:[vu],props:{labelField:{type:String,default:"label"},optionsField:{type:String,default:"options"}},methods:{normalizeOption:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(S(t)){var n=Tt(t,this.valueField),r=Tt(t,this.textField),i=Tt(t,this.optionsField,null);return ut(i)?{value:ct(n)?e||r:n,text:String(ct(r)?e:r),html:Tt(t,this.htmlField),disabled:Boolean(Tt(t,this.disabledField))}:{label:String(Tt(t,this.labelField)||r),options:this.normalizeOptions(i)}}return{value:e||t,text:String(t),disabled:!1}}}},bd="BFormSelectOption",xd={value:{required:!0},disabled:{type:Boolean,default:!1}},wd=i.extend({name:bd,functional:!0,props:xd,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=n.value,a=n.disabled;return t("option",ln(r,{attrs:{disabled:a},domProps:{value:o}}),i)}}),Sd=i.extend({name:"BFormSelectOptionGroup",mixins:[_n,vu],props:{label:{type:String,required:!0}},render:function(t){var e=this.formOptions.map(function(e,n){var r=e.value,i=e.text,o=e.html,a=e.disabled;return t(wd,{attrs:{value:r,disabled:a},domProps:ao(o,i),key:"option_".concat(n)})});return t("optgroup",{attrs:{label:this.label}},[this.normalizeSlot("first"),e,this.normalizeSlot("default")])}}),Td=i.extend({name:"BFormSelect",mixins:[la,_n,zu,Nu,$u,dh,vd],model:{prop:"value",event:"input"},props:{value:{},multiple:{type:Boolean,default:!1},selectSize:{type:Number,default:0},ariaInvalid:{type:[Boolean,String],default:!1}},data:function(){return{localValue:this.value}},computed:{computedSelectSize:function(){return this.plain||0!==this.selectSize?this.selectSize:null},inputClass:function(){return[this.plain?"form-control":"custom-select",this.size&&this.plain?"form-control-".concat(this.size):null,this.size&&!this.plain?"custom-select-".concat(this.size):null,this.stateClass]},computedAriaInvalid:function(){return!0===this.ariaInvalid||"true"===this.ariaInvalid?"true":"is-invalid"===this.stateClass?"true":null}},watch:{value:function(t){this.localValue=t},localValue:function(){this.$emit("input",this.localValue)}},methods:{focus:function(){en(this.$refs.input)},blur:function(){nn(this.$refs.input)},onChange:function(t){var e=this,n=t.target,r=o(n.options).filter(function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});this.localValue=n.multiple?r:r[0],this.$nextTick(function(){e.$emit("change",e.localValue)})}},render:function(t){var e=this.name,n=this.disabled,r=this.required,i=this.computedSelectSize,o=this.localValue,s=this.formOptions.map(function(e,n){var r=e.value,i=e.label,o=e.options,s=e.disabled,l="option_".concat(n);return a(o)?t(Sd,{props:{label:i,options:o},key:l}):t(wd,{props:{value:r,disabled:s},domProps:ao(e.html,e.text),key:l})});return t("select",{class:this.inputClass,attrs:{id:this.safeId(),name:e,form:this.form||null,multiple:this.multiple||null,size:i,disabled:n,required:r,"aria-required":r?"true":null,"aria-invalid":this.computedAriaInvalid},on:{change:this.onChange},directives:[{name:"model",value:o}],ref:"input"},[this.normalizeSlot("first"),s,this.normalizeSlot("default")])}}),Ed=Vt({components:{BFormSelect:Td,BFormSelectOption:wd,BFormSelectOptionGroup:Sd,BSelect:Td,BSelectOption:wd,BSelectOptionGroup:Sd}});function Cd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Od(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Cd(Object(n),!0).forEach(function(e){Pd(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kd="BFormSpinbutton",Ad=gr.UP,Id=gr.DOWN,Md=gr.HOME,Dd=gr.END,Bd=gr.PAGEUP,zd=gr.PAGEDOWN,Ld=1,Rd=100,jd=1,Fd=500,Nd=100,$d=10,Vd=4,Ud=i.extend({name:kd,mixins:[wr,la,_n],inheritAttrs:!1,props:{value:{type:Number,default:null},min:{type:[Number,String],default:Ld},max:{type:[Number,String],default:Rd},step:{type:[Number,String],default:jd},wrap:{type:Boolean,default:!1},formatterFn:{type:Function},size:{type:String},placeholder:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},name:{type:String},form:{type:String},state:{type:Boolean,default:null},inline:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},ariaLabel:{type:String},ariaControls:{type:String},labelDecrement:{type:String,default:function(){return Qt(kd,"labelDecrement")}},labelIncrement:{type:String,default:function(){return Qt(kd,"labelIncrement")}},locale:{type:[String,Array]},repeatDelay:{type:[Number,String],default:Fd},repeatInterval:{type:[Number,String],default:Nd},repeatThreshold:{type:[Number,String],default:$d},repeatStepMultiplier:{type:[Number,String],default:Vd}},data:function(){return{localValue:oe(this.value,null),hasFocus:!1}},computed:{spinId:function(){return this.safeId()},computedInline:function(){return this.inline&&!this.vertical},computedReadonly:function(){return this.readonly&&!this.disabled},computedRequired:function(){return this.required&&!this.computedReadonly&&!this.disabled},computedStep:function(){return oe(this.step,jd)},computedMin:function(){return oe(this.min,Ld)},computedMax:function(){var t=oe(this.max,Rd),e=this.computedStep,n=this.computedMin;return Bn((t-n)/e)*e+n},computedDelay:function(){var t=ie(this.repeatDelay,0);return t>0?t:Fd},computedInterval:function(){var t=ie(this.repeatInterval,0);return t>0?t:Nd},computedThreshold:function(){return In(ie(this.repeatThreshold,$d),1)},computedStepMultiplier:function(){return In(ie(this.repeatStepMultiplier,Vd),1)},computedPrecision:function(){var t=this.computedStep;return Bn(t)===t?0:(t.toString().split(".")[1]||"").length},computedMultiplier:function(){return zn(10,this.computedPrecision||0)},valueAsFixed:function(){var t=this.localValue;return ut(t)?"":t.toFixed(this.computedPrecision)},computedLocale:function(){var t=l(this.locale).filter($),e=new Intl.NumberFormat(t);return e.resolvedOptions().locale},computedRTL:function(){return sa(this.computedLocale)},defaultFormatter:function(){var t=this.computedPrecision,e=new Intl.NumberFormat(this.computedLocale,{style:"decimal",useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:t,maximumFractionDigits:t,notation:"standard"});return e.format},computedFormatter:function(){return dt(this.formatterFn)?this.formatterFn:this.defaultFormatter},computedAttrs:function(){return Od(Od({},this.bvAttrs),{},{role:"group",lang:this.computedLocale,tabindex:this.disabled?null:"-1",title:this.ariaLabel})},computedSpinAttrs:function(){var t=this.spinId,e=this.localValue,n=this.computedRequired,r=this.disabled,i=this.state,o=this.computedFormatter,a=!ut(e);return Od(Od({dir:this.computedRTL?"rtl":"ltr"},this.bvAttrs),{},{id:t,role:"spinbutton",tabindex:r?null:"0","aria-live":"off","aria-label":this.ariaLabel||null,"aria-controls":this.ariaControls||null,"aria-invalid":!1===i||!a&&n?"true":null,"aria-required":n?"true":null,"aria-valuemin":ge(this.computedMin),"aria-valuemax":ge(this.computedMax),"aria-valuenow":a?e:null,"aria-valuetext":a?o(e):null})}},watch:{value:function(t){this.localValue=oe(t,null)},localValue:function(t){this.$emit("input",t)},disabled:function(t){t&&this.clearRepeat()},readonly:function(t){t&&this.clearRepeat()}},created:function(){this.$_autoDelayTimer=null,this.$_autoRepeatTimer=null,this.$_keyIsDown=!1},beforeDestroy:function(){this.clearRepeat()},deactivated:function(){this.clearRepeat()},methods:{focus:function(){this.disabled||en(this.$refs.spinner)},blur:function(){this.disabled||nn(this.$refs.spinner)},emitChange:function(){this.$emit("change",this.localValue)},stepValue:function(t){var e=this.localValue;if(!this.disabled&&!ut(e)){var n=this.computedStep*t,r=this.computedMin,i=this.computedMax,o=this.computedMultiplier,a=this.wrap;e=Ln((e-r)/n)*n+r+n,e=Ln(e*o)/o,this.localValue=e>i?a?r:i:e<r?a?i:r:e}},onFocusBlur:function(t){this.disabled?this.hasFocus=!1:this.hasFocus="focus"===t.type},stepUp:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.localValue;ut(e)?this.localValue=this.computedMin:this.stepValue(1*t)},stepDown:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.localValue;ut(e)?this.localValue=this.wrap?this.computedMax:this.computedMin:this.stepValue(-1*t)},onKeydown:function(t){var e=t.keyCode,n=t.altKey,r=t.ctrlKey,i=t.metaKey;if(!(this.disabled||this.readonly||n||r||i)&&s([Ad,Id,Md,Dd,Bd,zd],e)){if(t.preventDefault(),this.$_keyIsDown)return;this.resetTimers(),s([Ad,Id],e)?(this.$_keyIsDown=!0,e===Ad?this.handleStepRepeat(t,this.stepUp):e===Id&&this.handleStepRepeat(t,this.stepDown)):e===Bd?this.stepUp(this.computedStepMultiplier):e===zd?this.stepDown(this.computedStepMultiplier):e===Md?this.localValue=this.computedMin:e===Dd&&(this.localValue=this.computedMax)}},onKeyup:function(t){var e=t.keyCode,n=t.altKey,r=t.ctrlKey,i=t.metaKey;this.disabled||this.readonly||n||r||i||s([Ad,Id,Md,Dd,Bd,zd],e)&&(this.resetTimers(),this.$_keyIsDown=!1,t.preventDefault(),this.emitChange())},handleStepRepeat:function(t,e){var n=this,r=t||{},i=r.type,o=r.button;if(!this.disabled&&!this.readonly){if("mousedown"===i&&o)return;this.resetTimers(),e(1);var a=this.computedThreshold,s=this.computedStepMultiplier,l=this.computedDelay,c=this.computedInterval;this.$_autoDelayTimer=setTimeout(function(){var t=0;n.$_autoRepeatTimer=setInterval(function(){e(t<a?1:s),t++},c)},l)}},onMouseup:function(t){var e=t||{},n=e.type,r=e.button;"mouseup"===n&&r||(t.preventDefault(),this.resetTimers(),this.setMouseup(!1),this.emitChange())},setMouseup:function(t){try{nl(t,document.body,"mouseup",this.onMouseup,!1),nl(t,document.body,"touchend",this.onMouseup,!1)}catch(e){}},resetTimers:function(){clearTimeout(this.$_autoDelayTimer),clearInterval(this.$_autoRepeatTimer),this.$_autoDelayTimer=null,this.$_autoRepeatTimer=null},clearRepeat:function(){this.resetTimers(),this.setMouseup(!1),this.$_keyIsDown=!1}},render:function(t){var e,n=this,r=this.spinId,i=this.localValue,o=this.computedInline,a=this.computedReadonly,s=this.vertical,l=this.disabled,c=this.state,u=this.size,h=this.computedFormatter,d=!ut(i),p=function(e,i,o,c,u,h,d){var p=t(o,{props:{scale:n.hasFocus?1.5:1.25},attrs:{"aria-hidden":"true"}}),f={hasFocus:n.hasFocus},m=function(t){l||a||(t.preventDefault(),n.setMouseup(!0),en(t.currentTarget),n.handleStepRepeat(t,e))};return t("button",{key:c||null,ref:c,staticClass:"btn btn-sm border-0 rounded-0",class:{"py-0":!s},attrs:{tabindex:"-1",type:"button",disabled:l||a||h,"aria-disabled":l||a||h?"true":null,"aria-controls":r,"aria-label":i||null,"aria-keyshortcuts":u||null},on:{mousedown:m,touchstart:m}},[t("div",[n.normalizeSlot(d,f)||p])])},f=p(this.stepUp,this.labelIncrement,Ti,"inc","ArrowUp",!1,"increment"),m=p(this.stepDown,this.labelDecrement,wi,"dec","ArrowDown",!1,"decrement"),g=t();this.name&&!l&&(g=t("input",{key:"hidden",attrs:{type:"hidden",name:this.name,form:this.form||null,value:this.valueAsFixed}}));var y=t("output",{ref:"spinner",key:"output",staticClass:"flex-grow-1",class:{"d-flex":s,"align-self-center":!s,"align-items-center":s,"border-top":s,"border-bottom":s,"border-left":!s,"border-right":!s},attrs:this.computedSpinAttrs},[t("bdi",d?h(i):this.placeholder||"")]);return t("div",{staticClass:"b-form-spinbutton form-control",class:(e={disabled:l,readonly:a,focus:this.hasFocus},Pd(e,"form-control-".concat(u),!!u),Pd(e,"d-inline-flex",o||s),Pd(e,"d-flex",!o&&!s),Pd(e,"align-items-stretch",!s),Pd(e,"flex-column",s),Pd(e,"is-valid",!0===c),Pd(e,"is-invalid",!1===c),e),attrs:this.computedAttrs,on:{keydown:this.onKeydown,keyup:this.onKeyup,"!focus":this.onFocusBlur,"!blur":this.onFocusBlur}},s?[f,g,y,m]:[m,g,y,f])}}),Gd=Vt({components:{BFormSpinbutton:Ud,BSpinbutton:Ud}}),Hd="BFormTag",qd=i.extend({name:Hd,mixins:[la,_n],props:{variant:{type:String,default:function(){return Qt(Hd,"variant")}},disabled:{type:Boolean,default:!1},title:{type:String},pill:{type:Boolean,default:!1},removeLabel:{type:String,default:function(){return Qt(Hd,"removeLabel")}},tag:{type:String,default:"span"}},methods:{onDelete:function(t){var e=t.type,n=t.keyCode;
45this.disabled||"click"!==e&&("keydown"!==e||n!==gr.DELETE)||this.$emit("remove")}},render:function(t){var e=this.safeId(),n=this.safeId("_taglabel_"),r=t();this.disabled||(r=t(wn,{staticClass:"b-form-tag-remove",props:{ariaLabel:this.removeLabel},attrs:{"aria-controls":e,"aria-describedby":n,"aria-keyshortcuts":"Delete"},on:{click:this.onDelete,keydown:this.onDelete}}));var i=t("span",{staticClass:"b-form-tag-content flex-grow-1 text-truncate",attrs:{id:n}},this.normalizeSlot("default")||this.title||[t()]);return t(no,{staticClass:"b-form-tag d-inline-flex align-items-baseline mw-100",class:{disabled:this.disabled},attrs:{id:e,title:this.title||null,"aria-labelledby":n},props:{tag:this.tag,variant:this.variant,pill:this.pill}},[i,r])}});function Wd(t){return Kd(t)||Yd(t)||Xd(t)||Zd()}function Zd(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xd(t,e){if(t){if("string"===typeof t)return Jd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jd(t,e):void 0}}function Yd(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function Kd(t){if(Array.isArray(t))return Jd(t)}function Jd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qd(Object(n),!0).forEach(function(e){ep(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ep(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var np="BFormTags",rp=["text","email","tel","url","number"],ip=/[\s\uFEFF\xA0]+/g,op=gr.ENTER,ap=gr.BACKSPACE,sp=gr.DELETE,lp=function(t){return me(t).replace(ip,"\\s")},cp=function(t){return l(t).map(function(t){return _e(ge(t))}).filter(function(t,e,n){return t.length>0&&n.indexOf(t)===e})},up=function(t){return ft(t)?t:yt(t)&&t.target.value||""},hp=function(){return{all:[],valid:[],invalid:[],duplicate:[]}},dp=i.extend({name:np,mixins:[la,_n],model:{prop:"value",event:"input"},props:{inputId:{type:String},placeholder:{type:String,default:function(){return Qt(np,"placeholder")}},disabled:{type:Boolean,default:!1},name:{type:String},form:{type:String},autofocus:{type:Boolean,default:!1},state:{type:Boolean,default:null},size:{type:String},inputType:{type:String,default:"text",validator:function(t){return s(rp,t)}},inputClass:{type:[String,Array,Object]},inputAttrs:{type:Object,default:function(){return{}}},addButtonText:{type:String,default:function(){return Qt(np,"addButtonText")}},addButtonVariant:{type:String,default:function(){return Qt(np,"addButtonVariant")}},tagVariant:{type:String,default:function(){return Qt(np,"tagVariant")}},tagClass:{type:[String,Array,Object]},tagPills:{type:Boolean,default:!1},tagRemoveLabel:{type:String,default:function(){return Qt(np,"tagRemoveLabel")}},tagRemovedLabel:{type:String,default:function(){return Qt(np,"tagRemovedLabel")}},tagValidator:{type:Function},duplicateTagText:{type:String,default:function(){return Qt(np,"duplicateTagText")}},invalidTagText:{type:String,default:function(){return Qt(np,"invalidTagText")}},separator:{type:[String,Array]},removeOnDelete:{type:Boolean,default:!1},addOnChange:{type:Boolean,default:!1},noAddOnEnter:{type:Boolean,default:!1},noOuterFocus:{type:Boolean,default:!1},ignoreInputFocusSelector:{type:[Array,String],default:function(){return[".b-form-tag","button","input","select"]}},value:{type:Array,default:function(){return[]}}},data:function(){return{hasFocus:!1,newTag:"",tags:[],removedTags:[],tagsState:hp()}},computed:{computedInputId:function(){return this.inputId||this.safeId("__input__")},computedInputType:function(){return s(rp,this.inputType)?this.inputType:"text"},computedInputAttrs:function(){return tp(tp({},this.inputAttrs),{},{id:this.computedInputId,value:this.newTag,disabled:this.disabled||null,form:this.form||null})},computedInputHandlers:function(){return{input:this.onInputInput,change:this.onInputChange,keydown:this.onInputKeydown}},computedSeparator:function(){return l(this.separator).filter(ft).filter($).join("")},computedSeparatorRegExp:function(){var t=this.computedSeparator;return t?new RegExp("[".concat(lp(t),"]+")):null},computedJoiner:function(){var t=this.computedSeparator.charAt(0);return" "!==t?"".concat(t," "):t},computeIgnoreInputFocusSelector:function(){return l(this.ignoreInputFocusSelector).filter($).join(",").trim()},disableAddButton:function(){var t=this,e=_e(this.newTag);return""===e||!this.splitTags(e).some(function(e){return!s(t.tags,e)&&t.validateTag(e)})},duplicateTags:function(){return this.tagsState.duplicate},hasDuplicateTags:function(){return this.duplicateTags.length>0}
45,invalidTags:function(){return this.tagsState.invalid},hasInvalidTags:function(){return this.invalidTags.length>0}},watch:{value:function(t){this.tags=cp(t)},tags:function(t,e){Io(t,this.value)||this.$emit("input",t),Io(t,e)||(t=l(t).filter($),e=l(e).filter($),this.removedTags=e.filter(function(e){return!s(t,e)}))},tagsState:function(t,e){Io(t,e)||this.$emit("tag-state",t.valid,t.invalid,t.duplicate)}},created:function(){this.tags=cp(this.value)},mounted:function(){this.handleAutofocus()},activated:function(){this.handleAutofocus()},methods:{addTag:function(t){if(t=ft(t)?t:this.newTag,!this.disabled&&""!==_e(t)){var e=this.parseTags(t);if(e.valid.length>0||0===e.all.length)if(je(this.getInput(),"select"))this.newTag="";else{var n=[].concat(Wd(e.invalid),Wd(e.duplicate));this.newTag=e.all.filter(function(t){return s(n,t)}).join(this.computedJoiner).concat(n.length>0?this.computedJoiner.charAt(0):"")}e.valid.length>0&&(this.tags=l(this.tags,e.valid)),this.tagsState=e,this.focus()}},removeTag:function(t){var e=this;this.disabled||(this.tags=this.tags.filter(function(e){return e!==t}),this.$nextTick(function(){e.focus()}))},onInputInput:function(t){if(!(this.disabled||yt(t)&&t.target.composing)){var e=up(t),n=this.computedSeparatorRegExp;this.newTag!==e&&(this.newTag=e),e=ye(e),n&&n.test(e.slice(-1))?this.addTag():this.tagsState=""===e?hp():this.parseTags(e)}},onInputChange:function(t){if(!this.disabled&&this.addOnChange){var e=up(t);this.newTag!==e&&(this.newTag=e),this.addTag()}},onInputKeydown:function(t){if(!this.disabled&&yt(t)){var e=t.keyCode,n=t.target.value||"";this.noAddOnEnter||e!==op?!this.removeOnDelete||e!==ap&&e!==sp||""!==n||(t.preventDefault(),this.tags=this.tags.slice(0,-1)):(t.preventDefault(),this.addTag())}},onClick:function(t){var e=this,n=this.computeIgnoreInputFocusSelector,r=t.target;this.disabled||Me(r)||n&&Fe(n,r,!0)||this.$nextTick(function(){e.focus()})},onFocusin:function(){this.hasFocus=!0},onFocusout:function(){this.hasFocus=!1},handleAutofocus:function(){var t=this;this.$nextTick(function(){Ce(function(){t.autofocus&&!t.disabled&&t.focus()})})},focus:function(){this.disabled||en(this.getInput())},blur:function(){this.disabled||nn(this.getInput())},splitTags:function(t){t=ge(t);var e=this.computedSeparatorRegExp;return(e?t.split(e):[t]).map(_e).filter($)},parseTags:function(t){var e=this,n=this.splitTags(t),r={all:n,valid:[],invalid:[],duplicate:[]};return n.forEach(function(t){s(e.tags,t)||s(r.valid,t)?s(r.duplicate,t)||r.duplicate.push(t):e.validateTag(t)?r.valid.push(t):s(r.invalid,t)||r.invalid.push(t)}),r},validateTag:function(t){var e=this.tagValidator;return!dt(e)||e(t)},getInput:function(){return Re("#".concat(Sh(this.computedInputId)),this.$el)},defaultRender:function(t){var e=t.tags,n=t.addTag,r=t.removeTag,i=t.inputType,o=t.inputAttrs,a=t.inputHandlers,s=t.inputClass,l=t.tagClass,c=t.tagVariant,u=t.tagPills,h=t.tagRemoveLabel,d=t.invalidTagText,p=t.duplicateTagText,f=t.isInvalid,m=t.isDuplicate,g=t.disabled,y=t.placeholder,_=t.addButtonText,v=t.addButtonVariant,b=t.disableAddButton,x=this.$createElement,w=e.map(function(t){return t=ge(t),x(qd,{key:"li-tag__".concat(t),class:l,props:{tag:"li",title:t,disabled:g,variant:c,pill:u,removeLabel:h},on:{remove:function(){return r(t)}}},t)}),S=d&&f?this.safeId("__invalid_feedback__"):null,T=p&&m?this.safeId("__duplicate_feedback__"):null,E=[o["aria-describedby"],S,T].filter($).join(" "),C=x("input",{ref:"input",directives:[{name:"model",value:o.value}],staticClass:"b-form-tags-input w-100 flex-grow-1 p-0 m-0 bg-transparent border-0",class:s,style:{outline:0,minWidth:"5rem"},attrs:tp(tp({},o),{},{"aria-describedby":E||null,type:i,placeholder:y||null}),domProps:{value:o.value},on:a}),O=x(Qr,{ref:"button",staticClass:"b-form-tags-button py-0",class:{invisible:b},style:{fontSize:"90%"},props:{variant:v,disabled:b},on:{click:function(){return n()}}},[this.normalizeSlot("add-button-text")||_]),P=this.safeId("__TAG__LIST__"),k=x("li",{key:"__li-input__",staticClass:"flex-grow-1",attrs:{role:"none","aria-live":"off","aria-controls":P}},[x("div",{staticClass:"d-flex",attrs:{role:"group"}},[C,O])]),A=x("ul",{key:"_tags_list_",staticClass:"b-form-tags-list list-unstyled mb-0 d-flex flex-wrap align-items-center",attrs:{id:P}},[w,k]),I=x();if(d||p){var M=this.computedJoiner,D=x();S&&(D=x(Cu,{key:"_tags_invalid_feedback_",props:{id:S,forceShow:!0}},[this.invalidTagText,": ",this.invalidTags.join(M)]));var B=x();T&&(B=x(Tu,{key:"_tags_duplicate_feedback_",props:{id:T}},[this.duplicateTagText,": ",this.duplicateTags.join(M)])),I=x("div",{key:"_tags_feedback_",attrs:{"aria-live":"polite","aria-atomic":"true"}},[D,B])}return[A,I]}},render:function(t){var e=this,n={tags:this.tags.slice(),removeTag:this.removeTag,addTag:this.addTag,inputType:this.computedInputType,inputAttrs:this.computedInputAttrs,inputHandlers:this.computedInputHandlers,inputId:this.computedInputId,invalidTags:this.invalidTags.slice(),isInvalid:this.hasInvalidTags,duplicateTags:this.duplicateTags.slice(),isDuplicate:this.hasDuplicateTags,disableAddButton:this.disableAddButton,state:this.state,separator:this.separator,disabled:this.disabled,size:this.size,placeholder:this.placeholder,inputClass:this.inputClass,tagRemoveLabel:this.tagRemoveLabel,tagVariant:this.tagVariant,tagPills:this.tagPills,tagClass:this.tagClass,addButtonText:this.addButtonText,addButtonVariant:this.addButtonVariant,invali
45dTagText:this.invalidTagText,duplicateTagText:this.duplicateTagText},r=this.normalizeSlot("default",n)||this.defaultRender(n),i=t("output",{staticClass:"sr-only",attrs:{id:this.safeId("_selected-tags_"),role:"status",for:this.computedInputId,"aria-live":this.hasFocus?"polite":"off","aria-atomic":"true","aria-relevant":"additions text"}},this.tags.join(", ")),o=t("div",{staticClass:"sr-only",attrs:{id:this.safeId("_removed-tags_"),role:"status","aria-live":this.hasFocus?"assertive":"off","aria-atomic":"true"}},this.removedTags.length>0?"(".concat(this.tagRemovedLabel,") ").concat(this.removedTags.join(", ")):""),a=t();return this.name&&!this.disabled&&(a=this.tags.map(function(n){return t("input",{key:n,attrs:{type:"hidden",value:n,name:e.name,form:e.form||null}})})),t("div",{staticClass:"b-form-tags form-control h-auto",class:ep({focus:this.hasFocus&&!this.noOuterFocus&&!this.disabled,disabled:this.disabled,"is-valid":!0===this.state,"is-invalid":!1===this.state},"form-control-".concat(this.size),this.size),attrs:{id:this.safeId(),role:"group",tabindex:this.disabled||this.noOuterFocus?null:"-1","aria-describedby":this.safeId("_selected_")},on:{click:this.onClick,focusin:this.onFocusin,focusout:this.onFocusout}},[i,o,r,a])}}),pp=Vt({components:{BFormTags:dp,BTags:dp,BFormTag:qd,BTag:qd}});function fp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fp(Object(n),!0).forEach(function(e){gp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function gp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yp=i.extend({name:"BFormTextarea",directives:{"b-visible":ws},mixins:[Sr,la,Cl,zu,Nu,$u,Xh,Zh,Yh],props:{rows:{type:[Number,String],default:2},maxRows:{type:[Number,String]},wrap:{type:String,default:"soft"},noResize:{type:Boolean,default:!1},noAutoShrink:{type:Boolean,default:!1}},data:function(){return{heightInPx:null}},computed:{computedStyle:function(){var t={resize:!this.computedRows||this.noResize?"none":null};return this.computedRows||(t.height=this.heightInPx,t.overflowY="scroll"),t},computedMinRows:function(){return In(ie(this.rows,2),2)},computedMaxRows:function(){return In(this.computedMinRows,ie(this.maxRows,0))},computedRows:function(){return this.computedMinRows===this.computedMaxRows?this.computedMinRows:null},computedAttrs:function(){var t=this.disabled,e=this.required;return{id:this.safeId(),name:this.name||null,form:this.form||null,disabled:t,placeholder:this.placeholder||null,required:e,autocomplete:this.autocomplete||null,readonly:this.readonly||this.plaintext,rows:this.computedRows,wrap:this.wrap||null,"aria-required":this.required?"true":null,"aria-invalid":this.computedAriaInvalid}},computedListeners:function(){return mp(mp({},this.bvListeners),{},{input:this.onInput,change:this.onChange,blur:this.onBlur})}},watch:{localValue:function(){this.setHeight()}},mounted:function(){this.setHeight()},methods:{visibleCallback:function(t){t&&this.$nextTick(this.setHeight)},setHeight:function(){var t=this;this.$nextTick(function(){Ce(function(){t.heightInPx=t.computeHeight()})})},computeHeight:function(){if(this.$isServer||!ut(this.computedRows))return null;var t=this.$el;if(!De(t))return null;var e=Ye(t),n=oe(e.lineHeight,1),r=oe(e.borderTopWidth,0)+oe(e.borderBottomWidth,0),i=oe(e.paddingTop,0)+oe(e.paddingBottom,0),o=r+i,a=n*this.computedMinRows+o,s=t.style.height||e.height;t.style.height="auto";var l=t.scrollHeight;t.style.height=s;var c=In((l-i)/n,2),u=An(In(c,this.computedMinRows),this.computedMaxRows),h=In(Dn(u*n+o),a);return this.noAutoShrink&&oe(s,0)>h?s:"".concat(h,"px")}},render:function(t){return t("textarea",{ref:"input",class:this.computedClass,style:this.computedStyle,directives:[{name:"b-visible",value:this.visibleCallback,modifiers:{640:!0}}],attrs:this.computedAttrs,domProps:{value:this.localValue},on:this.computedListeners})}}),_p=Vt({components:{BFormTextarea:yp,BTextarea:yp}});function vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function bp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?vp(Object(n),!0).forEach(function(e){xp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wp(t,e){return Op(t)||Cp(t,e)||Tp(t,e)||Sp()}function Sp(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Tp(t,e){if(t){if("string"===typeof t)return Ep(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ep(t,e):void 0}}function Ep(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Cp(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)if(n.push(a.value),e&&n.length===e)break}catch(l){i=!0,o=l}finally{try{r||null==s["return"]||s["return"]()}finally{if(i)throw o}}return n}}function Op(t){if(Array.isArray(t))return t}var Pp="BTime",kp="numeric",Ap=gr.LEFT,Ip=gr.RIGHT,Mp=/^([0-1]?[0-9]|2[0-3]):[0-5]?[0-9](:[0-5]?[0-9])?$/,Dp=function(t){return Qt(Pp,t)||Qt("BFormSpinbutton",t)},Bp=function(t){return"00".concat(t||"").slice(-2)},zp=function(t){t=ge(t);var e=null,n=null,r=null;if(Mp.test(t)){var i=t.split(":").map(function(t){return ie(t,null)}),o=wp(i,3);e=o[0],n=o[1],r=o[2]}return{hours:ht(e)?null:e,minutes:ht(n)?null:n,seconds:ht(r)?null:r,ampm:ht(e)||e<12?0:1}},Lp=function(t){var e=t.hours,n=t.minutes,r=t.seconds,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(ut(e)||ut(n)||i&&ut(r))return"";var o=[e,n,i?r:0];return o.map(Bp).join(":")},Rp=i.extend({name:Pp,mixins:[la,_n],model:{prop:"value",event:"input"},props:{value:{type:String,default:""},showSeconds:{type:Boolean,default:!1},hour12:{type:Boolean,default:null},locale:{type:[String,Array]},ariaLabelledby:{type:String},secondsStep:{type:[Number,String],default:1},minutesStep:{type:[Number,String],default:1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},labelNoTimeSelected:{type:String,default:function(){return Qt(Pp,"labelNoTimeSelected")}},labelSelected:{type:String,default:function(){return Qt(Pp,"labelSelected")}},labelHours:{type:String,default:function(){return Qt(Pp,"labelHours")}},labelMinutes:{type:String,default:function(){return Qt(Pp,"labelMinutes")}},labelSeconds:{type:String,default:function(){return Qt(Pp,"labelSeconds")}},labelAmpm:{type:String,default:function(){return Qt(Pp,"labelAmpm")}},labelAm:{type:String,default:function(){return Qt(Pp,"labelAm")}},labelPm:{type:String,default:function(){return Qt(Pp,"labelPm")}},labelIncrement:{type:String,default:function(){return Dp("labelIncrement")}},labelDecrement:{type:String,default:function(){return Dp("labelDecrement")}},hidden:{type:Boolean,default:!1}},data:function(){var t=zp(this.value||"");return{modelHours:t.hours,modelMinutes:t.minutes,modelSeconds:t.seconds,modelAmpm:t.ampm,isLive:!1}},computed:{computedHMS:function(){var t=this.modelHours,e=this.modelMinutes,n=this.modelSeconds;return Lp({hours:t,minutes:e,seconds:n},this.showSeconds)},resolvedOptions:function(){var t=l(this.locale).filter($),e={hour:kp,minute:kp,second:kp};ht(this.hour12)||(e.hour12=!!this.hour12);var n=new Intl.DateTimeFormat(t,e),r=n.resolvedOptions(),i=r.hour12||!1,o=r.hourCycle||(i?"h12":"h23");return{locale:r.locale,hour12:i,hourCycle:o}},computedLocale:function(){return this.resolvedOptions.locale},computedLang:function(){return(this.computedLocale||"").replace(/-u-.*$/,"")},computedRTL:function(){return sa(this.computedLang)},computedHourCycle:function(){return this.resolvedOptions.hourCycle},is12Hour:function(){return!!this.resolvedOptions.hour12},context:function(){return{locale:this.computedLocale,isRTL:this.computedRTL,hourCycle:this.computedHourCycle,hour12:this.is12Hour,hours:this.modelHours,minutes:this.modelMinutes,seconds:this.showSeconds?this.modelSeconds:0,value:this.computedHMS,formatted:this.formattedTimeStr
45ing}},valueId:function(){return this.safeId()||null},computedAriaLabelledby:function(){return[this.ariaLabelledby,this.valueId].filter($).join(" ")||null},timeFormatter:function(){var t={hour12:this.is12Hour,hourCycle:this.computedHourCycle,hour:kp,minute:kp,timeZone:"UTC"};return this.showSeconds&&(t.second=kp),Wo(this.computedLocale,t)},numberFormatter:function(){var t=new Intl.NumberFormat(this.computedLocale,{style:"decimal",minimumIntegerDigits:2,minimumFractionDigits:0,maximumFractionDigits:0,notation:"standard"});return t.format},formattedTimeString:function(){var t=this.modelHours,e=this.modelMinutes,n=this.showSeconds&&this.modelSeconds||0;return this.computedHMS?this.timeFormatter(Uo(Date.UTC(0,0,1,t,e,n))):this.labelNoTimeSelected||" "},spinScopedSlots:function(){var t=this.$createElement;return{increment:function(e){var n=e.hasFocus;return t(_i,{props:{scale:n?1.5:1.25},attrs:{"aria-hidden":"true"}})},decrement:function(e){var n=e.hasFocus;return t(_i,{props:{flipV:!0,scale:n?1.5:1.25},attrs:{"aria-hidden":"true"}})}}}},watch:{value:function(t,e){if(t!==e&&!Io(zp(t),zp(this.computedHMS))){var n=zp(t),r=n.hours,i=n.minutes,o=n.seconds,a=n.ampm;this.modelHours=r,this.modelMinutes=i,this.modelSeconds=o,this.modelAmpm=a}},computedHMS:function(t,e){t!==e&&this.$emit("input",t)},context:function(t,e){Io(t,e)||this.$emit("context",t)},modelAmpm:function(t,e){var n=this;if(t!==e){var r=ut(this.modelHours)?0:this.modelHours;this.$nextTick(function(){0===t&&r>11?n.modelHours=r-12:1===t&&r<12&&(n.modelHours=r+12)})}},modelHours:function(t,e){t!==e&&(this.modelAmpm=t>11?1:0)}},created:function(){var t=this;this.$nextTick(function(){t.$emit("context",t.context)})},mounted:function(){this.setLive(!0)},activated:function(){this.setLive(!0)},deactivated:function(){this.setLive(!1)},beforeDestroy:function(){this.setLive(!1)},methods:{focus:function(){this.disabled||en(this.$refs.spinners[0])},blur:function(){if(!this.disabled){var t=Ae();Ne(this.$el,t)&&nn(t)}},formatHours:function(t){var e=this.computedHourCycle;return t=this.is12Hour&&t>12?t-12:t,t=0===t&&"h12"===e?12:0===t&&"h24"===e?24:12===t&&"h11"===e?0:t,this.numberFormatter(t)},formatMinutes:function(t){return this.numberFormatter(t)},formatSeconds:function(t){return this.numberFormatter(t)},formatAmpm:function(t){return 0===t?this.labelAm:1===t?this.labelPm:""},setHours:function(t){this.modelHours=t},setMinutes:function(t){this.modelMinutes=t},setSeconds:function(t){this.modelSeconds=t},setAmpm:function(t){this.modelAmpm=t},onSpinLeftRight:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.type,n=t.keyCode;if(!this.disabled&&"keydown"===e&&(n===Ap||n===Ip)){t.preventDefault(),t.stopPropagation();var r=this.$refs.spinners||[],i=r.map(function(t){return!!t.hasFocus}).indexOf(!0);i+=n===Ap?-1:1,i=i>=r.length?0:i<0?r.length-1:i,en(r[i])}},setLive:function(t){var e=this;t?this.$nextTick(function(){Ce(function(){e.isLive=!0})}):this.isLive=!1}},render:function(t){var e=this;if(this.hidden)return t();var n=this.valueId,r=this.computedAriaLabelledby,i=[],o=function(r,o,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=e.safeId("_spinbutton_".concat(o,"_"))||null;return i.push(l),t(Ud,{key:o,ref:"spinners",refInFor:!0,class:a,props:bp({id:l,placeholder:"--",vertical:!0,required:!0,disabled:e.disabled,readonly:e.readonly,locale:e.computedLocale,labelIncrement:e.labelIncrement,labelDecrement:e.labelDecrement,wrap:!0,ariaControls:n,min:0},s),scopedSlots:e.spinScopedSlots,on:{change:r}})},a=function(){return t("div",{staticClass:"d-flex flex-column",class:{"text-muted":e.disabled||e.readonly},attrs:{"aria-hidden":"true"}},[t(vi,{props:{shiftV:4,scale:.5}}),t(vi,{props:{shiftV:-4,scale:.5}})])},s=[];s.push(o(this.setHours,"hours","b-time-hours",{value:this.modelHours,max:23,step:1,formatterFn:this.formatHours,ariaLabel:this.labelHours})),s.push(a()),s.push(o(this.setMinutes,"minutes","b-time-minutes",{value:this.modelMinutes,max:59,step:this.minutesStep||1,formatterFn:this.formatMinutes,ariaLabel:this.labelMinutes})),this.showSeconds&&(s.push(a()),s.push(o(this.setSeconds,"seconds","b-time-seconds",{value:this.modelSeconds,max:59,step:this.secondsStep||1,formatterFn:this.formatSeconds,ariaLabel:this.labelSeconds}))),this.is12Hour&&s.push(o(this.setAmpm,"ampm","b-time-ampm",{value:this.modelAmpm,max:1,formatterFn:this.formatAmpm,ariaLabel:this.labelAmpm,required:!1})),s=t("div",{staticClass:"d-flex align-items-center justify-content-center mx-auto",attrs:{role:"group",tabindex:this.disabled||this.readonly?null:"-1","aria-labelledby":r},on:{keydown:this.onSpinLeftRight,click:function(t){t.target===t.currentTarget&&e.focus()}}},s);
45var l=t("output",{staticClass:"form-control form-control-sm text-center",class:{disabled:this.disabled||this.readonly},attrs:{id:n,role:"status",for:i.filter($).join(" ")||null,tabindex:this.disabled?null:"-1","aria-live":this.isLive?"polite":"off","aria-atomic":"true"},on:{click:this.focus,focus:this.focus}},[t("bdi",this.formattedTimeString),this.computedHMS?t("span",{staticClass:"sr-only"}," (".concat(this.labelSelected,") ")):""]),c=t("header",{staticClass:"b-time-header",class:{"sr-only":this.hideHeader}},[l]),u=this.normalizeSlot("default");return u=u?t("footer",{staticClass:"b-time-footer"},u):t(),t("div",{staticClass:"b-time d-inline-flex flex-column text-center",attrs:{role:"group",lang:this.computedLang||null,"aria-labelledby":r||null,"aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly&&!this.disabled?"true":null}},[c,s,u])}});function jp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Fp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jp(Object(n),!0).forEach(function(e){Np(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Np(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $p="BFormTimepicker",Vp=function(t){return Qt($p,t)||Qt("BTime",t)||Qt("BFormSpinbutton",t)},Up={props:Fp({value:{type:String,default:""},resetValue:{type:String,default:""},placeholder:{type:String},size:{type:String},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},name:{type:String},form:{type:String},state:{type:Boolean,default:null},hour12:{type:Boolean,default:null},locale:{type:[String,Array]},showSeconds:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},secondsStep:{type:[Number,String],default:1},minutesStep:{type:[Number,String],default:1},buttonOnly:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"},nowButton:{type:Boolean,default:!1},labelNowButton:{type:String,default:function(){return Qt($p,"labelNowButton")}},nowButtonVariant:{type:String,default:"outline-primary"},resetButton:{type:Boolean,default:!1},labelResetButton:{type:String,default:function(){return Qt($p,"labelResetButton")}},resetButtonVariant:{type:String,default:"outline-danger"},noCloseButton:{type:Boolean,default:!1},labelCloseButton:{type:String,default:function(){return Qt($p,"labelCloseButton")}},closeButtonVariant:{type:String,default:"outline-secondary"},labelSelected:{type:String,default:function(){return Vp("labelSelected")}},labelNoTimeSelected:{type:String,default:function(){return Vp("labelNoTimeSelected")}},labelHours:{type:String,default:function(){return Vp("labelHours")}},labelMinutes:{type:String,default:function(){return Vp("labelMinutes")}},labelSeconds:{type:String,default:function(){return Vp("labelSeconds")}},labelAmpm:{type:String,default:function(){return Vp("labelAmpm")}},labelAm:{type:String,default:function(){return Vp("labelAm")}},labelPm:{type:String,default:function(){return Vp("labelPm")}},labelIncrement:{type:String,default:function(){return Vp("labelIncrement")}},labelDecrement:{type:String,default:function(){return Vp("labelDecrement")}},menuClass:{type:[String,Array,Object]}},nh)},Gp=i.extend({name:$p,mixins:[la,Up],model:{prop:"value",event:"input"},data:function(){return{localHMS:this.value||"",localLocale:null,isRTL:!1,formattedValue:"",isVisible:!1}},computed:{computedLang:function(){return(this.localLocale||"").replace(/-u-.*$/i,"")||null},timeProps:function(){var t=this;return{hidden:!t.isVisible,value:t.localHMS,readonly:t.readonly,disabled:t.disabled,locale:t.locale,hour12:t.hour12,hideHeader:t.hideHeader,showSeconds:t.showSeconds,secondsStep:t.secondsStep,minutesStep:t.minutesStep,labelNoTimeSelected:t.labelNoTimeSelected,labelSelected:t.labelSelected,labelHours:t.labelHours,labelMinutes:t.labelMinutes,labelSeconds:t.labelSeconds,labelAmpm:t.labelAmpm,labelAm:t.labelAm,labelPm:t.labelPm,labelIncrement:t.labelIncrement,labelDecrement:t.labelDecrement}}},watch:{value:function(t){this.localHMS=t||""},localHMS:function(t){this.isVisible&&this.$emit("input",t||"")}},methods:{focus:function(){this.disabled||en(this.$refs.control)},blur:function(){this.disabled||nn(this.$refs.control)},setAndClose:function(t){var e=this;this.localHMS=t,this.$nextTick(function(){e.$refs.control.hide(!0)})},onInput:function(t){this.localHMS!==t&&(this.localHMS=t)},onContext:function(t){var e=t.isRTL,n=t.locale,r=t.value,i=t.formatted;this.isRTL=e,this.localLocale=n,this.formattedValue=i,this.localHMS=r||"",this.$emit("context",t)},onNowButton:function(){var t=new Date,e=t.getHours(),n=t.getMinutes(),r=this.showSeconds?t.getSeconds():0,i=[e,n,r].map(function(t){return"00".concat(t||"").slice(-2)}).join(":");this.setAndClose(i)},onResetButton:function(){this.setAndClose(this.resetValue)},onCloseButton:function(){this.$refs.control.hide(!0)},onShow:function(){this.isVisible=!0},onShown:function(){var t=this;this.$nextTick(function(){en(t.$refs.time),t.$emit("shown")})},onHidden:function(){this.isVisible=!1,this.$emit("hidden")},defaultButtonFn:function(t){var e=t.isHovered,n=t.hasFocus;return this.$createElement(e||n?xi:bi,{attrs:{"aria-hidden":"true"}})}},render:function(t){var e=this.localHMS,n=this.disabled,r=this.readonly,i=ht(this.placeholder)?this.labelNoTimeSelected:this.placeholder,o=[];if(this.nowButton){var a=this.labelNowButton;o.push(t(Qr,{key:"now-btn",props:{size:"sm",disabled:n||r,variant:this.nowButtonVariant},attrs:{"aria-label":a||null},on:{click:this.onNowButton}},a))}if(this.resetButton){o.length>0&&o.push(t("span"," "));var s=this.labelResetButton;o.push(t(Qr,{key:"reset-btn",props:{size:"sm",disabled:n||r,variant:this.resetButtonVariant},attrs:{"aria-label":s||null},on:{click:this.onResetButton}},s))}if(!this.noCloseButton){o.length>0&&o.push(t("span"," "));var l=this.labelCloseButton;o.push(t(Qr,{key:"close-btn",props:{size:"sm",disabled:n,variant:this.closeButtonVariant},attrs:{"aria-label":l||null},on:{click:this.onCloseButton}},l))}o.length>
450&&(o=[t("div",{staticClass:"b-form-date-controls d-flex flex-wrap",class:{"justify-content-between":o.length>1,"justify-content-end":o.length<2}},o)]);var c=t(Rp,{ref:"time",staticClass:"b-form-time-control",props:this.timeProps,on:{input:this.onInput,context:this.onContext}},o);return t(rh,{ref:"control",staticClass:"b-form-timepicker",props:Fp(Fp({},this.$props),{},{id:this.safeId(),rtl:this.isRTL,lang:this.computedLang,value:e||"",formattedValue:e?this.formattedValue:"",placeholder:i||""}),on:{show:this.onShow,shown:this.onShown,hidden:this.onHidden},scopedSlots:{"button-content":this.$scopedSlots["button-content"]||this.defaultButtonFn}},[c])}}),Hp=Vt({components:{BFormTimepicker:Gp,BTimepicker:Gp}}),qp=Vt({components:{BImg:Ps,BImgLazy:Ms}}),Wp={tag:{type:String,default:"div"}},Zp=i.extend({name:"BInputGroupText",functional:!0,props:Wp,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{staticClass:"input-group-text"}),i)}});function Xp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Yp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xp(Object(n),!0).forEach(function(e){Kp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Kp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jp={id:{type:String,default:null},tag:{type:String,default:"div"},isText:{type:Boolean,default:!1}},Qp=i.extend({name:"BInputGroupAddon",functional:!0,props:Yp(Yp({},Jp),{},{append:{type:Boolean,default:!1}}),render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{class:{"input-group-append":n.append,"input-group-prepend":!n.append},attrs:{id:n.id}}),n.isText?[t(Zp,i)]:i)}});function tf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ef(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tf(Object(n),!0).forEach(function(e){nf(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function nf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rf=i.extend({name:"BInputGroupAppend",functional:!0,props:Jp,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(Qp,ln(r,{props:ef(ef({},n),{},{append:!0})}),i)}});function of(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function af(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?of(Object(n),!0).forEach(function(e){sf(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lf=i.extend({name:"BInputGroupPrepend",functional:!0,props:Jp,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(Qp,ln(r,{props:af(af({},n),{},{append:!1})}),i)}});function cf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var uf="BInputGroup",hf={id:{type:String},size:{type:String,default:function(){return Qt(uf,"size")}},prepend:{type:String},prependHtml:{type:String},append:{type:String},appendHtml:{type:String},tag:{type:String,default:"div"}},df=i.extend({name:uf,functional:!0,props:hf,render:function(t,e){var n=e.props,r=e.data,i=e.slots,o=e.scopedSlots,a=n.prepend,s=n.prependHtml,l=n.append,c=n.appendHtml,u=n.size,h=o||{},d=i(),p={},f=t(),m=gn("prepend",h,d);(m||a||s)&&(f=t(lf,[m?yn("prepend",p,h,d):t(Zp,{domProps:ao(s,a)})]));var g=t(),y=gn("append",h,d);return(y||l||c)&&(g=t(rf,[y?yn("append",p,h,d):t(Zp,{domProps:ao(c,l)})])),t(n.tag,ln(r,{staticClass:"input-group",class:cf({},"input-group-".concat(u),u),attrs:{id:n.id||null,role:"group"}}),[f,yn("default",p,h,d),g])}}),pf=Vt({components:{BInputGroup:df,BInputGroupAddon:Qp,BInputGroupPrepend:lf,BInputGroupAppend:rf,BInputGroupText:Zp}});function ff(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var mf={tag:{type:String,default:"div"},fluid:{type:[Boolean,String],default:!1}},gf=i.extend({name:"BContainer",functional:!0,props:mf,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{class:ff({container:!(n.fluid||""===n.fluid),"container-fluid":!0===n.fluid||""===n.fluid},"container-".concat(n.fluid),n.fluid&&!0!==n.fluid)}),i)}});function yf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _f="BJumbotron",vf={fluid:{type:Boolean,default:!1},containerFluid:{type:[Boolean,String],default:!1},header:{type:String},headerHtml:{type:String},headerTag:{type:String,default:"h1"},headerLevel:{type:[Number,String],default:"3"},lead:{type:String},leadHtml:{type:String},leadTag:{type:String,default:"p"},tag:{type:String,default:"div"},bgVariant:{type:String,default:function(){return Qt(_f,"bgVariant")}},borderVariant:{type:String,default:function(){return Qt(_f,"borderVariant")}},textVariant:{type:String,default:function(){return Qt(_f,"textVariant")}}},bf=i.extend({name:_f,functional:!0,props:vf,render:function(t,e){var n,r=e.props,i=e.data,o=e.slots,a=e.scopedSlots,s=r.header,l=r.headerHtml,c=r.lead,u=r.leadHtml,h=r.textVariant,d=r.bgVariant,p=r.borderVariant,f=a||{},m=o(),g={},y=t(),_=gn("header",f,m);if(_||s||l){var v=r.headerLevel;y=t(r.headerTag,{class:yf({},"display-".concat(v),v),domProps:_?{}
45:ao(l,s)},yn("header",g,f,m))}var b=t(),x=gn("lead",f,m);(x||c||u)&&(b=t(r.leadTag,{staticClass:"lead",domProps:x?{}:ao(u,c)},yn("lead",g,f,m)));var w=[y,b,yn("default",g,f,m)];return r.fluid&&(w=[t(gf,{props:{fluid:r.containerFluid}},w)]),t(r.tag,ln(i,{staticClass:"jumbotron",class:(n={"jumbotron-fluid":r.fluid},yf(n,"text-".concat(h),h),yf(n,"bg-".concat(d),d),yf(n,"border-".concat(p),p),yf(n,"border",p),n)}),w)}}),xf=Vt({components:{BJumbotron:bf}});function wf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Sf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wf(Object(n),!0).forEach(function(e){Tf(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wf(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Tf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ef=["start","end","center"],Cf=function(){return{type:[String,Number],default:null}},Of=Xt(function(t,e){return e=_e(ge(e)),e?ve(["row-cols",t,e].filter($).join("-")):null}),Pf=Xt(function(t){return ve(t.replace("cols",""))}),kf=[],Af=function(){var t=re(),e=t.reduce(function(t,e){return t[Kn(e,"cols")]=Cf(),t},f(null));return kf=v(e),Sf({tag:{type:String,default:"div"},noGutters:{type:Boolean,default:!1},alignV:{type:String,default:null,validator:function(t){return s(l(Ef,"baseline","stretch"),t)}},alignH:{type:String,default:null,validator:function(t){return s(l(Ef,"between","around"),t)}},alignContent:{type:String,default:null,validator:function(t){return s(l(Ef,"between","around","stretch"),t)}}},e)},If={name:"BRow",functional:!0,get props(){return delete this.props,this.props=Af(),this.props},render:function(t,e){var n,r=e.props,i=e.data,o=e.children,a=[];return kf.forEach(function(t){var e=Of(Pf(t),r[t]);e&&a.push(e)}),a.push((n={"no-gutters":r.noGutters},Tf(n,"align-items-".concat(r.alignV),r.alignV),Tf(n,"justify-content-".concat(r.alignH),r.alignH),Tf(n,"align-content-".concat(r.alignContent),r.alignContent),n)),t(r.tag,ln(i,{staticClass:"row",class:a}),o)}},Mf=Vt({components:{BContainer:gf,BRow:If,BCol:Bh,BFormRow:Au}}),Df=Vt({components:{BLink:Rr}});function Bf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var zf={tag:{type:String,default:"div"},flush:{type:Boolean,default:!1},horizontal:{type:[Boolean,String],default:!1}},Lf=i.extend({name:"BListGroup",functional:!0,props:zf,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=""===n.horizontal||n.horizontal;o=!n.flush&&o;var a={staticClass:"list-group",class:Bf({"list-group-flush":n.flush,"list-group-horizontal":!0===o},"list-group-horizontal-".concat(o),ft(o))};return t(n.tag,ln(r,a),i)}});function Rf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function jf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Rf(Object(n),!0).forEach(function(e){Ff(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ff(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Nf="BListGroupItem",$f=["a","router-link","button","b-link"],Vf=C(Lr,["event","routerTag"]);delete Vf.href.default,delete Vf.to.default;var Uf=jf({tag:{type:String,default:"div"},action:{type:Boolean,default:null},button:{type:Boolean,default:null},variant:{type:String,default:function(){return Qt(Nf,"variant")}}},Vf),Gf=i.extend({name:Nf,functional:!0,props:Uf,render:function(t,e){var n,r=e.props,i=e.data,o=e.children,a=r.button,l=r.variant,c=r.active,u=r.disabled,h=ur(r),d=a?"button":h?Rr:r.tag,p=!!(r.action||h||a||s($f,r.tag)),f={},m={};return Ie(d,"button")?(i.attrs&&i.attrs.type||(f.type="button"),r.disabled&&(f.disabled=!0)):m=Qn(Vf,r),t(d,ln(i,{attrs:f,props:m,staticClass:"list-group-item",class:(n={},Ff(n,"list-group-item-".concat(l),l),Ff(n,"list-group-item-action",p),Ff(n,"active",c),Ff(n,"disabled",u),n)}),o)}}),Hf=Vt({components:{BListGroup:Lf,BListGroupItem:Gf}}),qf={tag:{type:String,default:"div"}},Wf=i.extend({name:"BMediaBody",functional:!0,props:qf,render:function(t,e){var n=e.props,r=e.data,i=e.children;return t(n.tag,ln(r,{staticClass:"media-body"}),i)}});function Zf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xf={tag:{type:String,default:"div"},verticalAlign:{type:String,default:"top"}},Yf=i.extend({name:"BMediaAside",functional:!0,props:Xf,render:function(t,e){var n=e.props,r=e.data,i=e.children,o="top"===n.verticalAlign?"start":"bottom"===n.verticalAlign?"end":n.verticalAlign;return t(n.tag,ln(r,{staticClass:"d-flex",class:Zf({},"align-self-".concat(o),o)}),i)}}),Kf={tag:{type:String,default:"div"},rightAlign:{type:Boolean,default:!1},verticalAlign:{type:String,default:"top"},noBody:{type:Boolean,default:!1}},Jf=i.extend({name:"BMedia",functional:!0,props:Kf,render:function(t,e){var n=e.props,r=e.data,i=e.slots,o=e.scopedSlots,a=e.children,s=n.noBody?a:[];if(!n.noBody){var l=i(),c=o||{},u=yn("aside",{},c,l),h=yn("default",{},c,l);u&&!n.rightAlign&&s.push(t(Yf,{staticClass:"mr-3",props:{verticalAlign:n.verticalAlign}},u)),s.push(t(Wf,h)),u&&n.rightAlign&&s.push(t(Yf,{staticClass:"ml-3",props:{verticalAlign:n.verticalAlign}},u))}return t(n.tag,ln(r,{staticClass:"media"}),s)}}),Qf=Vt({components:{BMedia:Jf,BMediaAside:Yf,BMediaBody:Wf}}
45),tm=i.extend({abstract:!0,name:"BTransporterTargetSingle",props:{nodes:{type:[Array,Function]}},data:function(t){return{updatedNodes:t.nodes}},destroyed:function(){Pe(this.$el)},render:function(t){var e=dt(this.updatedNodes)?this.updatedNodes({}):this.updatedNodes;return e=l(e).filter(Boolean),e&&e.length>0&&!e[0].text?e[0]:t()}}),em=i.extend({name:"BTransporterSingle",mixins:[_n],props:{disabled:{type:Boolean,default:!1},container:{type:[String,rt],default:"body"},tag:{type:String,default:"div"}},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmountTarget():this.$nextTick(this.mountTarget)}}},created:function(){this.$_defaultFn=null,this.$_target=null},beforeMount:function(){this.mountTarget()},updated:function(){this.updateTarget()},beforeDestroy:function(){this.unmountTarget(),this.$_defaultFn=null},methods:{getContainer:function(){if(V["j"]){var t=this.container;return ft(t)?Re(t):t}return null},mountTarget:function(){if(!this.$_target){var t=this.getContainer();if(t){var e=document.createElement("div");t.appendChild(e),this.$_target=new tm({el:e,parent:this,propsData:{nodes:l(this.normalizeSlot("default"))}})}}},updateTarget:function(){if(V["j"]&&this.$_target){var t=this.$scopedSlots.default;this.disabled||(t&&this.$_defaultFn!==t?this.$_target.updatedNodes=t:t||(this.$_target.updatedNodes=this.$slots.default)),this.$_defaultFn=t}},unmountTarget:function(){this.$_target&&this.$_target.$destroy(),this.$_target=null}},render:function(t){if(this.disabled){var e=l(this.normalizeSlot("default")).filter($);if(e.length>0&&!e[0].text)return e[0]}return t()}}),nm="$_bv_documentHandlers_",rm={created:function(){var t=this;V["j"]&&(this[nm]={},this.$once("hook:beforeDestroy",function(){var e=t[nm]||{};delete t[nm],v(e).forEach(function(t){var n=e[t]||[];n.forEach(function(e){return el(document,t,e,Js)})})}))},methods:{listenDocument:function(t,e,n){t?this.listenOnDocument(e,n):this.listenOffDocument(e,n)},listenOnDocument:function(t,e){this[nm]&&ft(t)&&dt(e)&&(this[nm][t]=this[nm][t]||[],s(this[nm][t],e)||(this[nm][t].push(e),tl(document,t,e,Js)))},listenOffDocument:function(t,e){this[nm]&&ft(t)&&dt(e)&&(el(document,t,e,Js),this[nm][t]=(this[nm][t]||[]).filter(function(t){return t!==e}))}}},im="$_bv_windowHandlers_",om={beforeCreate:function(){this[im]={}},beforeDestroy:function(){if(V["j"]){var t=this[im];delete this[im],v(t).forEach(function(e){var n=t[e]||[];n.forEach(function(t){return el(window,e,t,Js)})})}},methods:{listenWindow:function(t,e,n){t?this.listenOnWindow(e,n):this.listenOffWindow(e,n)},listenOnWindow:function(t,e){V["j"]&&this[im]&&ft(t)&&dt(e)&&(this[im][t]=this[im][t]||[],s(this[im][t],e)||(this[im][t].push(e),tl(window,t,e,Js)))},listenOffWindow:function(t,e){V["j"]&&this[im]&&ft(t)&&dt(e)&&(el(window,t,e,Js),this[im][t]=(this[im][t]||[]).filter(function(t){return t!==e}))}}},am=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t&&t.$options._scopeId||e},sm=am;function lm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cm={computed:{scopedStyleAttrs:function(){var t=sm(this.$parent);return t?lm({},t,""):{}}}},um=1040,hm={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},dm=i.extend({data:function(){return{modals:[],baseZIndex:null,scrollbarWidth:null,isBodyOverflowing:!1}},computed:{modalCount:function(){return this.modals.length},modalsAreOpen:function(){return this.modalCount>0}},watch:{modalCount:function(t,e){V["j"]&&(this.getScrollbarWidth(),t>0&&0===e?(this.checkScrollbar(),this.setScrollbar(),Ve(document.body,"modal-open")):0===t&&e>0&&(this.resetScrollbar(),Ue(document.body,"modal-open")),He(document.body,"data-modal-open-count",String(t)))},modals:function(t){var e=this;this.checkScrollbar(),Ce(function(){e.updateModals(t||[])})}},methods:{registerModal:function(t){var e=this;t&&-1===this.modals.indexOf(t)&&(this.modals.push(t),t.$once("hook:beforeDestroy",function(){e.unregisterModal(t)}))},unregisterModal:function(t){var e=this.modals.indexOf(t);e>-1&&(this.modals.splice(e,1),t._isBeingDestroyed||t._isDestroyed||this.resetModal(t))},getBaseZIndex:function(){if(ut(this.baseZIndex)&&V["j"]){var t=document.createElement("div");t.className="modal-backdrop d-none",t.style.display="none",document.body.appendChild(t),this.baseZIndex=ie(Ye(t).zIndex,um),document.body.removeChild(t)}return this.baseZIndex||um},getScrollbarWidth:function(){if(ut(this.scrollbarWidth)&&V["j"]){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t),this.scrollbarWidth=Xe(t).width-t.clientWidth,document.body.removeChild(t)}return this.scrollbarWidth||0},updateModals:function(t){var e=this,n=this.getBaseZIndex(),r=this.getScrollbarWidth();t.forEach(function(t,i){t.zIndex=n+i,t.scrollbarWidth=r,t.isTop=i===e.modals.length-1,t.isBodyOverflowing=e.isBodyOverflowing})},resetModal:function(t){t&&(t.zIndex=this.getBaseZIndex(),t.isTop=!0,t.isBodyOverflowing=!1)},checkScrollbar:function(){var t=Xe(document.body),e=t.left,n=t.right;this.isBodyOverflowing=e+n<window.innerWidth},setScrollbar:function(){var t=document.body;if(t._paddingChangedForModal=t._paddingChangedForModal||[],t._marginChangedForModal=t._marginChangedForModal||[],this.isBodyOverflowing){var e=this.scrollbarWidth;Le(hm.FIXED_CONTENT).forEach(function(n){var r=n.style.paddingRight;He(n,"data-padding-right",r),n.style.paddingRight="".concat(oe(Ye(n).paddingRight,0)+e,"px"),t._paddingChangedForModal.push(n)}),Le(hm.STICKY_CONTENT).forEach(function(n){var r=n.style.marginRight;He(n,"data-margin-right",r),n.style.marginRight="".concat(oe(Ye(n).marginRight,0)-e,"px"),t._marginChangedForModal.push(n)}
45),Le(hm.NAVBAR_TOGGLER).forEach(function(n){var r=n.style.marginRight;He(n,"data-margin-right",r),n.style.marginRight="".concat(oe(Ye(n).marginRight,0)+e,"px"),t._marginChangedForModal.push(n)});var n=t.style.paddingRight;He(t,"data-padding-right",n),t.style.paddingRight="".concat(oe(Ye(t).paddingRight,0)+e,"px")}},resetScrollbar:function(){var t=document.body;t._paddingChangedForModal&&t._paddingChangedForModal.forEach(function(t){Ze(t,"data-padding-right")&&(t.style.paddingRight=We(t,"data-padding-right")||"",qe(t,"data-padding-right"))}),t._marginChangedForModal&&t._marginChangedForModal.forEach(function(t){Ze(t,"data-margin-right")&&(t.style.marginRight=We(t,"data-margin-right")||"",qe(t,"data-margin-right"))}),t._paddingChangedForModal=null,t._marginChangedForModal=null,Ze(t,"data-padding-right")&&(t.style.paddingRight=We(t,"data-padding-right")||"",qe(t,"data-padding-right"))}}}),pm=new dm;function fm(t){return fm="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},fm(t)}function mm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function gm(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mm(Object(n),!0).forEach(function(e){ym(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mm(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ym(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vm(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)}}function bm(t,e,n){return e&&vm(t.prototype,e),n&&vm(t,n),t}function xm(t,e,n){return xm="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=wm(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},xm(t,e,n||t)}function wm(t,e){while(!Object.prototype.hasOwnProperty.call(t,e))if(t=km(t),null===t)break;return t}function Sm(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tm(t,e)}function Tm(t,e){return Tm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tm(t,e)}function Em(t){var e=Pm();return function(){var n,r=km(t);if(e){var i=km(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cm(this,n)}}function Cm(t,e){return!e||"object"!==fm(e)&&"function"!==typeof e?Om(t):e}function Om(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pm(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function km(t){return km=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},km(t)}var Am=function(t){Sm(n,t);var e=Em(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _m(this,n),r=e.call(this,t,i),m(Om(r),{trigger:O()}),r}return bm(n,null,[{key:"Defaults",get:function(){return gm(gm({},xm(km(n),"Defaults",this)),{},{trigger:null})}}]),n}(fc);function Im(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Mm(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Im(Object(n),!0).forEach(function(e){Dm(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Im(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Dm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bm="BModal",zm={subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["style","class"]},Lm={size:{type:String,default:function(){return Qt(Bm,"size")}},centered:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},buttonSize:{type:String},noStacking:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noEnforceFocus:{type:Boolean,default:!1},ignoreEnforceFocusSelector:{type:[Array,String],default:""},title:{type:String,default:""},titleHtml:{type:String},titleTag:{type:String,default:function(){return Qt(Bm,"titleTag")}},titleClass:{type:[String,Array,Object]},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String},headerBgVariant:{type:String,default:function(){return Qt(Bm,"headerBgVariant")}},headerBorderVariant:{type:String,default:function(){return Qt(Bm,"headerBorderVariant")}},headerTextVariant:{type:String,default:function(){return Qt(Bm,"headerTextVariant")}},headerCloseVariant:{type:String,default:function(){return Qt(Bm,"headerCloseVariant")}},headerClass:{type:[String,Array,Object]},bodyBgVariant:{type:String,default:function(){return Qt(Bm,"bodyBgVariant")}},bodyTextVariant:{type:String,default:function(){return Qt(Bm,"bodyTextVariant")}},modalClass:{type:[String,Array,Object]},dialogClass:{type:[String,Array,Object]},contentClass:{type:[String,Array,Object]},bodyClass:{type:[String,Array,Object]},footerBgVariant:{type:String,default:function(){return Qt(Bm,"footerBgVariant")}},footerBorderVariant:{type:String,default:function(){return Qt(Bm,"footerBorderVariant")}},footerTextVariant:{type:String,default:function(){return Qt(Bm,"footerTextVariant")}},footerClass:{type:[String,Array,Object]},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},hideBackdrop:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},okDisabled:{type:Boolean,default:!1},cancelDisabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},returnFocus:{type:[rt,String,Object],default:null},headerCloseContent:{type:String,default:function(){return Qt(Bm,"headerCloseContent")}},headerCloseLabel:{type:String,default:function(){return Qt(Bm,"headerCloseLabel")}},cancelTitle:{type:String,default:function(){return Qt(Bm,"cancelTitle")}},cancelTitleHtml:{type:String},okTitle:{type:String,default:function(){return Qt(Bm,"okTitle")}},okTitleHtml:{type:String},cancelVariant:{type:String,default:function(){return Qt(Bm,"cancelVariant")}},okVariant:{type:String,default:function(){return Qt(Bm,"okVariant")}},lazy:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},static:{type:Boolean,default:!1},autoFocusButton:{type:String,default:null,validator:function(t){return ht(t)||s(["ok","cancel","close"],t)}}},Rm=i.extend({name:Bm,mixins:[wr,la,rm,Cl,om,_n,cm],inheritAttrs:!1,model:{prop:"visible",event:"change"},props:Lm,data:function(){return{isHidden:!0,isVisible:!1,isTransitioning:!1,isShow:!1,isBlock:!1,isOpening:!1,isClosing:!1,ignoreBackdropClick:!1,isModalOverflowing:!1,return_focus:this.returnFocus||null,scrollbarWidth:0,zIndex:pm.getBaseZIndex(),isTop:!0,isBodyOverflowing:!1}},computed:{modalId:function(){return this.safeId()},modalOuterId:function(){return this.safeId("__BV_modal_outer_")},modalHeaderId:function(){return this.safeId("__BV_modal_header_")},modalBodyId:function(){return this.safeId("__BV_modal_body_")},modalTitleId:function(){return this.safeId("__BV_modal_title_")},modalContentId:function(){return this.safeId("__BV_modal_content_")},modalFooterId:function(){return this.safeId("__BV_modal_footer_")},modalBackdropId:function(){return this.safeId("__BV_modal_backdrop_")},modalClasses:function(){return[{fade:!this.noFade,show:this.isShow},this.modalClass]},modalStyles:function(){var t="".concat(this.scrollbarWidth,"px");return{paddingLeft:!this.isBodyOverflowing&&this.isModalOverflowing?t:"",paddingRight:this.isBodyOverflowing&&!this.isModalOverflowing?t:"",display:this.isBlock?"block":"none"}},dialogClasses:function(){var t;return[(t={},Dm(t,"modal-".concat(this.size),this.size),Dm(t,"modal-dialog-centered",this.centered),Dm(t,"modal-dialog-scrollable",this.scrollable),t),this.dialogClass]},headerClasses:function(){var t;return[(t={},Dm(t,"bg-".concat(this.headerBgVariant),this.headerBgVariant),Dm(t,"text-".concat(this.headerTextVariant),this.headerTextVariant),Dm(t,"border-".concat(this.headerBorderVariant),this.headerBorderVariant),t),this.headerClass]},titleClasses:function(){return[{"sr-only":this.titleSrOnly},this.titleClass]},bodyClasses:function(){var t;return[(t={},Dm(t,"bg-".concat(this.bodyBgVariant),this.bodyBgVariant),Dm(t,"text-".concat(this.bodyTextVariant),this.bodyTextVariant),t),this.bodyClass]},footerClasses:function(){var t;return[(t={},Dm(t,"bg-".concat(this.footerBgVariant),this.footerBgVariant),Dm(t,"text-".concat(this.footerTextVariant),this.footerTextVariant),Dm(t,"border-".concat(this.footerBorderVariant),this.footerBorderVariant),t),this.footerClass]},modalOuterStyle:function(){return{position:"absolute",zIndex:this.zIndex}},slotScope:function(){return{ok:this.onOk,cancel:this.onCancel,close:this.onClose,hide:this.hide,visible:this.isVisible}},computeIgnoreEnforceFocusSelector:function(){return l(this.ignoreEnforceFocusSelector).filter($).join(",").trim()},computedAttrs:function(){var t=this.static?{}:this.scopedStyleAttrs;return Mm(Mm(Mm({},t),this.bvAttrs),{},{id:this.modalOuterId})},computedModalAttrs:function(){var t=this.isVisible,e=this.ariaLabel;return{id:this.modalId,role:"dialog","aria-hidden":t?null:"true","aria-modal":t?"true":null,"aria-label":e,"aria-labelledby":this.hideHeader||e||!(this.hasNormalizedSlot("modal-title")||this.titleHtml||this.title)?null:this.modalTitleId,"aria-describedby":this.modalBodyId}}},watch:{visible:function(t,e){t!==e&&this[t?"show":"hide"]()}},created:function(){this.$_observer=null},mounted:function(){this.zIndex=pm.getBaseZIndex(),this.listenOnRoot("bv::show::modal",this.showHandler),this.listenOnRoot("bv::hide::modal",this.hideHandler),this.listenOnRoot("bv::toggle::modal",this.toggleHandler),this.listenOnRoot("bv::modal::show",this.modalListener),!0===this.visible&&this.$nextTick(this.show)},beforeDestroy:function(){this.setObserver(!1),this.isVisible&&(this.isVisible=!1,this.isShow=!1,this.isTransitioning=!1)},methods:{setObserver:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$_observer&&this.$_observer.disconnect(),this.$_observer=null,t&&(this.$_observer=Ys(this.$refs.content,this.checkModalOverflow.bind(this),zm))},updateModel:function(t){t!==this.visible&&this.$emit("change",t)},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Am(t,Mm(Mm({cancelable:!1,target:this.$refs.modal||this.$el||null,relatedTarget:null,trigger:null},e),{},{vueTarget:this,componentId:this.modalId}))},show:function(){if(!this.isVisible&&!this.isOpening)if(this.isClosing)this.$once("hidden",this.show);else{this.isOpening=!0,this.return_focus=this.return_focus||this.getActiveElement();var t=this.buildEvent("show",{cancelable:!0});if(this.emitEvent(t),t.defaultPrevented||this.isVisible)return this.isOpening=!1,void this.updateModel(!1);this.doShow()}},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.isVisible&&!this.isClosing){this.isClosing=!0;var e=this.buildEvent("hide",{cancelable:"FORCE"!==t,trigger:t||null});if("ok"===t?this.$emit("ok",e):"cancel"===t?this.$emit("cancel",e):"headerclose"===t&&this.$emit("close",e),this.emitEvent(e),e.defaultPrevented||!this.isVisible)return this.isClosing=!1,void this.updateModel(!0);this.setObserver(!1),this.isVisible=!1,this.updateModel(!1)}},toggle:function(t){t&&(this.return_focus=t),this.isVisible?this.hide("toggle"):this.show()},getActiveElement:function(){var t=Ae(V["j"]?[document.body]:[]);return t&&t.focus?t:null},doShow:function(){var t=this;pm.modalsAreOpen&&this.noStacking?this.listenOnRootOnce("bv::modal::hidden",this.doShow):(pm.registerModal(this),this.isHidden=!1,this.$nextTick(function(){t.isVisible=!0,t.isOpening=!1,t.updateModel(!0),t.$nextTick(function(){t.setObserver(!0)})}))},onBeforeEnter:function(){this.isTransitioning=!0,this.setResizeEvent(!0)},onEnter:function(){var t=this;this.isBlock=!0,Ce(function(){Ce(function(){t.isShow=!0}
45)})},onAfterEnter:function(){var t=this;this.checkModalOverflow(),this.isTransitioning=!1,Ce(function(){t.emitEvent(t.buildEvent("shown")),t.setEnforceFocus(!0),t.$nextTick(function(){t.focusFirst()})})},onBeforeLeave:function(){this.isTransitioning=!0,this.setResizeEvent(!1),this.setEnforceFocus(!1)},onLeave:function(){this.isShow=!1},onAfterLeave:function(){var t=this;this.isBlock=!1,this.isTransitioning=!1,this.isModalOverflowing=!1,this.isHidden=!0,this.$nextTick(function(){t.isClosing=!1,pm.unregisterModal(t),t.returnFocusTo(),t.emitEvent(t.buildEvent("hidden"))})},emitEvent:function(t){var e=t.type;this.emitOnRoot("bv::modal::".concat(e),t,t.componentId),this.$emit(e,t)},onDialogMousedown:function(){var t=this,e=this.$refs.modal,n=function n(r){el(e,"mouseup",n,Js),r.target===e&&(t.ignoreBackdropClick=!0)};tl(e,"mouseup",n,Js)},onClickOut:function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:this.isVisible&&!this.noCloseOnBackdrop&&Ne(document.body,t.target)&&(Ne(this.$refs.content,t.target)||this.hide("backdrop"))},onOk:function(){this.hide("ok")},onCancel:function(){this.hide("cancel")},onClose:function(){this.hide("headerclose")},onEsc:function(t){t.keyCode===gr.ESC&&this.isVisible&&!this.noCloseOnEsc&&this.hide("esc")},focusHandler:function(t){var e=this.$refs.content,n=t.target;if(!(this.noEnforceFocus||!this.isTop||!this.isVisible||!e||document===n||Ne(e,n)||this.computeIgnoreEnforceFocusSelector&&Fe(this.computeIgnoreEnforceFocusSelector,n,!0))){var r=tn(this.$refs.content),i=this.$refs,o=i.bottomTrap,a=i.topTrap;if(o&&n===o){if(en(r[0]))return}else if(a&&n===a&&en(r[r.length-1]))return;en(e,{preventScroll:!0})}},setEnforceFocus:function(t){this.listenDocument(t,"focusin",this.focusHandler)},setResizeEvent:function(t){this.listenWindow(t,"resize",this.checkModalOverflow),this.listenWindow(t,"orientationchange",this.checkModalOverflow)},showHandler:function(t,e){t===this.modalId&&(this.return_focus=e||this.getActiveElement(),this.show())},hideHandler:function(t){t===this.modalId&&this.hide("event")},toggleHandler:function(t,e){t===this.modalId&&this.toggle(e)},modalListener:function(t){this.noStacking&&t.vueTarget!==this&&this.hide()},focusFirst:function(){var t=this;V["j"]&&Ce(function(){var e=t.$refs.modal,n=t.$refs.content,r=t.getActiveElement();if(e&&n&&(!r||!Ne(n,r))){var i=t.$refs["ok-button"],o=t.$refs["cancel-button"],a=t.$refs["close-button"],s=t.autoFocusButton,l="ok"===s&&i?i.$el||i:"cancel"===s&&o?o.$el||o:"close"===s&&a?a.$el||a:n;en(l),l===n&&t.$nextTick(function(){e.scrollTop=0})}})},returnFocusTo:function(){var t=this.returnFocus||this.return_focus||null;this.return_focus=null,this.$nextTick(function(){t=ft(t)?Re(t):t,t&&(t=t.$el||t,en(t))})},checkModalOverflow:function(){if(this.isVisible){var t=this.$refs.modal;this.isModalOverflowing=t.scrollHeight>document.documentElement.clientHeight}},makeModal:function(t){var e=t();if(!this.hideHeader){var n=this.normalizeSlot("modal-header",this.slotScope);if(!n){var r=t();this.hideHeaderClose||(r=t(wn,{props:{content:this.headerCloseContent,disabled:this.isTransitioning,ariaLabel:this.headerCloseLabel,textVariant:this.headerCloseVariant||this.headerTextVariant},on:{click:this.onClose},ref:"close-button"},[this.normalizeSlot("modal-header-close")])),n=[t(this.titleTag,{staticClass:"modal-title",class:this.titleClasses,attrs:{id:this.modalTitleId},domProps:this.hasNormalizedSlot("modal-title")?{}:ao(this.titleHtml,this.title)},[this.normalizeSlot("modal-title",this.slotScope)]),r]}e=t("header",{staticClass:"modal-header",class:this.headerClasses,attrs:{id:this.modalHeaderId},ref:"header"},[n])}var i=t("div",{staticClass:"modal-body",class:this.bodyClasses,attrs:{id:this.modalBodyId},ref:"body"},this.normalizeSlot("default",this.slotScope)),o=t();if(!this.hideFooter){var a=this.normalizeSlot("modal-footer",this.slotScope);if(!a){var s=t();this.okOnly||(s=t(Qr,{props:{variant:this.cancelVariant,size:this.buttonSize,disabled:this.cancelDisabled||this.busy||this.isTransitioning},domProps:this.hasNormalizedSlot("modal-cancel")?{}:ao(this.cancelTitleHtml,this.cancelTitle),on:{click:this.onCancel},ref:"cancel-button"},this.normalizeSlot("modal-cancel")));
45var l=t(Qr,{props:{variant:this.okVariant,size:this.buttonSize,disabled:this.okDisabled||this.busy||this.isTransitioning},domProps:this.hasNormalizedSlot("modal-ok")?{}:ao(this.okTitleHtml,this.okTitle),on:{click:this.onOk},ref:"ok-button"},this.normalizeSlot("modal-ok"));a=[s,l]}o=t("footer",{staticClass:"modal-footer",class:this.footerClasses,attrs:{id:this.modalFooterId},ref:"footer"},[a])}var c=t("div",{staticClass:"modal-content",class:this.contentClass,attrs:{id:this.modalContentId,tabindex:"-1"},ref:"content"},[e,i,o]),u=t(),h=t();this.isVisible&&!this.noEnforceFocus&&(u=t("span",{ref:"topTrap",attrs:{tabindex:"0"}}),h=t("span",{ref:"bottomTrap",attrs:{tabindex:"0"}}));var d=t("div",{staticClass:"modal-dialog",class:this.dialogClasses,on:{mousedown:this.onDialogMousedown},ref:"dialog"},[u,c,h]),p=t("div",{staticClass:"modal",class:this.modalClasses,style:this.modalStyles,attrs:this.computedModalAttrs,on:{keydown:this.onEsc,click:this.onClickOut},directives:[{name:"show",value:this.isVisible}],ref:"modal"},[d]);p=t("transition",{props:{enterClass:"",enterToClass:"",enterActiveClass:"",leaveClass:"",leaveActiveClass:"",leaveToClass:""},on:{beforeEnter:this.onBeforeEnter,enter:this.onEnter,afterEnter:this.onAfterEnter,beforeLeave:this.onBeforeLeave,leave:this.onLeave,afterLeave:this.onAfterLeave}},[p]);var f=t();return!this.hideBackdrop&&this.isVisible&&(f=t("div",{staticClass:"modal-backdrop",attrs:{id:this.modalBackdropId}},this.normalizeSlot("modal-backdrop"))),f=t(mn,{props:{noFade:this.noFade}},[f]),t("div",{style:this.modalOuterStyle,attrs:this.computedAttrs,key:"modal-outer-".concat(this._uid)},[p,f])}},render:function(t){return this.static?this.lazy&&this.isHidden?t():this.makeModal(t):this.isHidden?t():t(em,[this.makeModal(t)])}}),jm="bv::show::modal",Fm="__bv_modal_directive__",Nm=function(t){var e=t.modifiers,n=void 0===e?{}:e,r=t.arg,i=t.value;return ft(i)?i:ft(r)?r:v(n).reverse()[0]},$m=function(t){return t&&je(t,".dropdown-menu > li, li.nav-item")&&Re("a, button",t)||t},Vm=function(t){t&&"BUTTON"!==t.tagName&&(Ze(t,"role")||He(t,"role","button"),"A"===t.tagName||Ze(t,"tabindex")||He(t,"tabindex","0"))},Um=function(t,e,n){var r=Nm(e),i=$m(t);if(r&&i){var o=function(t){var e=t.currentTarget;if(!Be(e)){var i=t.type,o=t.keyCode;"click"!==i&&("keydown"!==i||o!==gr.ENTER&&o!==gr.SPACE)||n.context.$root.$emit(jm,r,e)}};t[Fm]={handler:o,target:r,trigger:i},Vm(i),tl(i,"click",o,Ks),"BUTTON"!==i.tagName&&"button"===We(i,"role")&&tl(i,"keydown",o,Ks)}},Gm=function(t){var e=t[Fm]||{},n=e.trigger,r=e.handler;n&&r&&(el(n,"click",r,Ks),el(n,"keydown",r,Ks),el(t,"click",r,Ks),el(t,"keydown",r,Ks)),delete t[Fm]},Hm=function(t,e,n){var r=t[Fm]||{},i=Nm(e),o=$m(t);i===r.target&&o===r.trigger||(Gm(t,e,n),Um(t,e,n)),Vm(o)},qm=function(){},Wm={inserted:Hm,updated:qm,componentUpdated:Hm,unbind:Gm};function Zm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xm(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)}}function Ym(t,e,n){return e&&Xm(t.prototype,e),n&&Xm(t,n),t}function Km(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Jm(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Km(Object(n),!0).forEach(function(e){Qm(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Km(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Qm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tg(t){return ig(t)||rg(t)||ng(t)||eg()}function eg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ng(t,e){if(t){if("string"===typeof t)return og(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?og(t,e):void 0}}function rg(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function ig(t){if(Array.isArray(t))return og(t)}function og(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ag="$bvModal",sg="_bv__modal",lg=["id"].concat(tg(v(C(Lm,["busy","lazy","noStacking","static","visible"])))),cg=function(){},ug={msgBoxContent:"default",title:"modal-title",okTitle:"modal-ok",cancelTitle:"modal-cancel"},hg=function(t){return lg.reduce(function(e,n){return ct(t[n])||(e[n]=t[n]),e},{})},dg=function(t){var e=t.extend({name:"BMsgBox",extends:Rm,destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},mounted:function(){var t=this,e=function(){var e=t;t.$nextTick(function(){setTimeout(function(){return e.$destroy()},0)})};this.$parent.$once("hook:destroyed",e),this.$once("hidden",e),this.$router&&this.$route&&this.$once("hook:beforeDestroy",this.$watch("$router",e)),this.show()}}),n=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cg;if(!Ct(ag)&&!Ot(ag)){var i=new e({parent:t,propsData:Jm(Jm(Jm({},hg(Qt("BModal")||{})),{},{hideHeaderClose:!0,hideHeader:!(n.title||n.titleHtml)},C(n,v(ug))),{},{lazy:!1,busy:!1,visible:!1,noStacking:!1,noEnforceFocus:!1})});return v(ug).forEach(function(t){ct(n[t])||(i.$slots[ug[t]]=l(n[t]))}),new Promise(function(t,e){var n=!1;i.$once("hook:destroyed",function(){n||e(new Error("BootstrapVue MsgBox destroyed before resolve"))}),i.$on("hide",function(e){if(!e.defaultPrevented){var i=r(e);e.defaultPrevented||(n=!0,t(i))}});var o=document.createElement("div");document.body.appendChild(o),i.$mount(o)})}},r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(e&&!Ot(ag)&&!Ct(ag)&&dt(i))return n(t,Jm(Jm({},hg(r)),{},{msgBoxContent:e}),i)},i=function(){function t(e){Zm(this,t),p(this,{_vm:e,_root:e.$root}),m(this,{_vm:O(),_root:O()})}return Ym(t,[{key:"show",value:function(t){if(t&&this._root){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(e=this._root).$emit.apply(e,["bv::show::modal",t].concat(r))}}},{key:"hide",value:function(t){if(t&&this._root){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(e=this._root).$emit.apply(e,["bv::hide::modal",t].concat(r))}}},{key:"msgBoxOk",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Jm(Jm({},e),{},{okOnly:!0,okDisabled:!1,hideFooter:!1,msgBoxContent:t});return r(this._vm,t,n,function(){return!0})}},{key:"msgBoxConfirm",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Jm(Jm({},e),{},{okOnly:!1,okDisabled:!1,cancelDisabled:!1,hideFooter:!1});return r(this._vm,t,n,function(t){var e=t.trigger;return"ok"===e||"cancel"!==e&&null})}}]),t}();t.mixin({beforeCreate:function(){this[sg]=new i(this)}}),b(t.prototype,ag)||g(t.prototype,ag,{get:function(){return this&&this[sg]||Et('"'.concat(ag,'" must be accessed from a Vue instance "this" context.'),"BModal"),this[sg]}})},pg=Vt({plugins:{plugin:dg}}),fg=Vt({components:{BModal:Rm},directives:{VBModal:Wm},plugins:{BVModalPlugin:pg}});function mg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gg={tag:{type:String,default:"ul"},fill:{type:Boolean,default:!1},justified:{type:Boolean,default:!1},align:{type:String},tabs:{type:Boolean,default:!1},pills:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},small:{type:Boolean,default:!1},cardHeader:{type:Boolean,default:!1}},yg=function(t){return t="left"===t?"start":"right"===t?"end":t,"justify-content-".concat(t)},_g=i.extend({name:"BNav",functional:!0,props:gg,render:function(t,e){var n,r=e.props,i=e.data,o=e.children;return t(r.tag,ln(i,{staticClass:"nav",class:(n={"nav-tabs":r.tabs,"nav-pills":r.pills&&!r.tabs,"card-header-tabs":!r.vertical&&r.cardHeader&&r.tabs,"card-header-pills":!r.vertical&&r.cardHeader&&r.pills&&!r.tabs,"flex-column":r.vertical,"nav-fill":!r.vertical&&r.fill,"nav-justified":!r.vertical&&r.justified},mg(n,yg(r.align),!r.vertical&&r.align),mg(n,"small",r.small),n)}),o)}});function vg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function bg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?vg(Object(n),!0).forEach(function(e){xg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wg=C(Lr,["event","routerTag"]),Sg=i.extend({name:"BNavItem",functional:!0,props:bg(bg({},wg),{},{linkAttrs:{type:Object,default:function(){}},linkClasses:{type:[String,Object,Array],default:null}}),render:function(t,e){var n=e.props,r=e.data,i=e.listeners,o=e.children;return delete r.on,t("li",ln(r,{staticClass:"nav-item"}),[t(Rr,{staticClass:"nav-link",class:n.linkClasses,attrs:n.linkAttrs,props:n,on:i},o)])}}),Tg={},Eg=i.extend({name:"BNavText",functional:!0,props:Tg,render:function(t,e){var n=e.data,r=e.children;return t("li",ln(n,{staticClass:"navbar-text"}),r)}});function Cg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Og(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Cg(Object(n),!0).forEach(function(e){Pg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kg=Og(Og({},C(tu,["inline"])),{},{formClass:{type:[String,Array,Object]}}),Ag=i.extend({name:"BNavForm",functional:!0,props:kg,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=e.listeners,a=void 0===o?{}:o,s=r.attrs;r.attrs={},r.on={};var l=t(eu,{class:n.formClass,props:Og(Og({},n),{},{inline:!0}),attrs:s,on:a},i);return t("li",ln(r,{staticClass:"form-inline"}),[l])}}),Ig=Qn(["text","html","menuClass","toggleClass","noCaret","role","lazy"],Mc),Mg=i.extend({name:"BNavItemDropdown",mixins:[la,Oc,_n],props:Ig,computed:{toggleId:function(){return this.safeId("_BV_toggle_")},isNav:function(){return!0},dropdownClasses:function(){return[this.directionClass,{show:this.visible}]},menuClasses:function(){return[this.menuClass,{"dropdown-menu-right":this.right,show:this.visible}]},toggleClasses:function(){return[this.toggleClass,{"dropdown-toggle-no-caret":this.noCaret}]}},render:function(t){var e=this.toggleId,n=this.visible,r=t(Rr,{staticClass:"nav-link dropdown-toggle",class:this.toggleClasses,props:{href:"#".concat(this.id||""),disabled:this.disabled},attrs:{id:e,role:"button","aria-haspopup":"true","aria-expanded":n?"true":"false"},on:{mousedown:this.onMousedown,click:this.toggle,keydown:this.toggle},ref:"toggle"},[this.normalizeSlot(["button-content","text"])||t("span",{domProps:ao(this.html,this.text)})]),i=t("ul",{staticClass:"dropdown-menu",class:this.menuClasses,attrs:{tabindex:"-1","aria-labelledby":e},on:{keydown:this.onKeydown},ref:"menu"},!this.lazy||n?this.normalizeSlot("default",{hide:this.hide}):[t()]);return t("li",{staticClass:"nav-item b-nav-dropdown dropdown",class:this.dropdownClasses,attrs:{id:this.safeId()}},[r,i])}}),Dg=Vt({components:{BNav:_g,BNavItem:Sg,BNavText:Eg,BNavForm:Ag,BNavItemDropdown:Mg,BNavItemDd:Mg,BNavDropdown:Mg,BNavDd:Mg},plugins:{DropdownPlugin:pu}});function Bg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var zg="BNavbar",Lg={tag:{type:String,default:"nav"},type:{type:String,default:"light"},variant:{type:String,default:function(){return Qt(zg,"variant")}},toggleable:{type:[Boolean,String],default:!1},fixed:{type:String},sticky:{type:Boolean,default:!1},print:{type:Boolean,default:!1}},Rg=i.extend({name:zg,mixins:[_n],props:Lg,provide:function(){return{bvNavbar:this}},computed:{breakpointClass:function(){var t=null,e=te()[0],n=this.toggleable;return n&&ft(n)&&n!==e?t="navbar-expand-".concat(n):!1===n&&(t="navbar-expand"),t}},render:function(t){var e;return t(this.tag,{staticClass:"navbar",class:[(e={"d-print":this.print,"sticky-top":this.sticky}
45,Bg(e,"navbar-".concat(this.type),this.type),Bg(e,"bg-".concat(this.variant),this.variant),Bg(e,"fixed-".concat(this.fixed),this.fixed),e),this.breakpointClass],attrs:{role:Ie(this.tag,"nav")?null:"navigation"}},[this.normalizeSlot("default")])}});function jg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fg=Qn(["tag","fill","justified","align","small"],gg),Ng=function(t){return t="left"===t?"start":"right"===t?"end":t,"justify-content-".concat(t)},$g=i.extend({name:"BNavbarNav",functional:!0,props:Fg,render:function(t,e){var n,r=e.props,i=e.data,o=e.children;return t(r.tag,ln(i,{staticClass:"navbar-nav",class:(n={"nav-fill":r.fill,"nav-justified":r.justified},jg(n,Ng(r.align),r.align),jg(n,"small",r.small),n)}),o)}});function Vg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ug(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vg(Object(n),!0).forEach(function(e){Gg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Gg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hg=C(Lr,["event","routerTag"]);Hg.href.default=void 0,Hg.to.default=void 0;var qg=Ug({tag:{type:String,default:"div"}},Hg),Wg=i.extend({name:"BNavbarBrand",functional:!0,props:qg,render:function(t,e){var n=e.props,r=e.data,i=e.children,o=n.to||n.href,a=o?Rr:n.tag;return t(a,ln(r,{staticClass:"navbar-brand",props:o?Qn(Hg,n):{}}),i)}}),Zg="BNavbarToggle",Xg="navbar-toggler",Yg=i.extend({name:Zg,directives:{BToggle:oc},mixins:[Cl,_n],props:{label:{type:String,default:function(){return Qt(Zg,"label")}},target:{type:String,required:!0},disabled:{type:Boolean,default:!1}},data:function(){return{toggleState:!1}},created:function(){this.listenOnRoot(Ul,this.handleStateEvt),this.listenOnRoot(Gl,this.handleStateEvt)},methods:{onClick:function(t){this.disabled||this.$emit("click",t)},handleStateEvt:function(t,e){t===this.target&&(this.toggleState=e)}},render:function(t){var e=this.disabled;return t("button",{staticClass:Xg,class:{disabled:e},directives:[{name:"BToggle",value:this.target}],attrs:{type:"button",disabled:e,"aria-label":this.label},on:{click:this.onClick}},[this.normalizeSlot("default",{expanded:this.toggleState})||t("span",{staticClass:"".concat(Xg,"-icon")})])}}),Kg=Vt({components:{BNavbar:Rg,BNavbarNav:$g,BNavbarBrand:Wg,BNavbarToggle:Yg,BNavToggle:Yg},plugins:{NavPlugin:Dg,CollapsePlugin:cc,DropdownPlugin:pu}});function Jg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qg="BSpinner",ty=i.extend({name:Qg,functional:!0,props:{type:{type:String,default:"border"},label:{type:String},variant:{type:String,default:function(){return Qt(Qg,"variant")}},small:{type:Boolean,default:!1},role:{type:String,default:"status"},tag:{type:String,default:"span"}},render:function(t,e){var n,r=e.props,i=e.data,o=e.slots,a=e.scopedSlots,s=o(),l=a||{},c=yn("label",{},l,s)||r.label;return c&&(c=t("span",{staticClass:"sr-only"},c)),t(r.tag,ln(i,{attrs:{role:c?r.role||"status":null,"aria-hidden":c?null:"true"},class:(n={},Jg(n,"spinner-".concat(r.type),r.type),Jg(n,"spinner-".concat(r.type,"-sm"),r.small),Jg(n,"text-".concat(r.variant),r.variant),n)}),[c||t()])}});function ey(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ny(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ey(Object(n),!0).forEach(function(e){ry(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ey(Object(n)).forEac
45h(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ry(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var iy={top:0,left:0,bottom:0,right:0},oy=i.extend({name:"BOverlay",mixins:[_n],props:{show:{type:Boolean,default:!1},variant:{type:String,default:"light"},bgColor:{type:String},opacity:{type:[Number,String],default:.85,validator:function(t){var e=oe(t,0);return e>=0&&e<=1}},blur:{type:String,default:"2px"},rounded:{type:[Boolean,String],default:!1},noCenter:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},spinnerType:{type:String,default:"border"},spinnerVariant:{type:String},spinnerSmall:{type:Boolean,default:!1},overlayTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},noWrap:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:10}},computed:{computedRounded:function(){var t=this.rounded;return!0===t||""===t?"rounded":t?"rounded-".concat(t):""},computedVariant:function(){return this.variant&&!this.bgColor?"bg-".concat(this.variant):""},overlayScope:function(){return{spinnerType:this.spinnerType||null,spinnerVariant:this.spinnerVariant||null,spinnerSmall:this.spinnerSmall}}},methods:{defaultOverlayFn:function(t){var e=t.spinnerType,n=t.spinnerVariant,r=t.spinnerSmall;return this.$createElement(ty,{props:{type:e,variant:n,small:r}})}},render:function(t){var e=this,n=t();if(this.show){var r=this.overlayScope,i=t("div",{staticClass:"position-absolute",class:[this.computedVariant,this.computedRounded],style:ny(ny({},iy),{},{opacity:this.opacity,backgroundColor:this.bgColor||null,backdropFilter:this.blur?"blur(".concat(this.blur,")"):null})}),o=t("div",{staticClass:"position-absolute",style:this.noCenter?ny({},iy):{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}},[this.normalizeSlot("overlay",r)||this.defaultOverlayFn(r)]);n=t(this.overlayTag,{key:"overlay",staticClass:"b-overlay",class:{"position-absolute":!this.noWrap||this.noWrap&&!this.fixed,"position-fixed":this.noWrap&&this.fixed},style:ny(ny({},iy),{},{zIndex:this.zIndex||10}),on:{click:function(t){return e.$emit("click",t)}}},[i,o])}return n=t(fn,{props:{noFade:this.noFade,appear:!0},on:{"after-enter":function(){return e.$emit("shown")},"after-leave":function(){return e.$emit("hidden")}}},[n]),this.noWrap?n:t(this.wrapTag,{staticClass:"b-overlay-wrap position-relative",attrs:{"aria-busy":this.show?"true":null}},this.noWrap?[n]:[this.normalizeSlot("default"),n])}}),ay=Vt({components:{BOverlay:oy}}),sy=function(t){return Array.apply(null,{length:t})},ly=sy,cy=3,uy=5,hy=function(t,e){return ly(e).map(function(e,n){return{number:t+n,classes:null}})},dy=function(t){var e=ie(t)||1;return e<1?uy:e},py=function(t,e){var n=ie(t)||1;return n>e?e:n<1?1:n},fy=function(t){if(t.keyCode===gr.SPACE)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.currentTarget.click(),!1},my={disabled:{type:Boolean,default:!1},value:{type:[Number,String],default:null,validator:function(t){return!(!ut(t)&&ie(t,0)<1)||(Et('"v-model" value must be a number greater than "0"',"BPagination"),!1)}},limit:{type:[Number,String],default:uy,validator:function(t){return!(ie(t,0)<1)||(Et('Prop "limit" must be a number greater than "0"',"BPagination"),!1)}},align:{type:String,default:"left"},pills:{type:Boolean,default:!1},hideGotoEndButtons:{type:Boolean,default:!1},ariaLabel:{type:String,default:"Pagination"},labelFirstPage:{type:String,default:"Go to first page"},firstText:{type:String,default:"«"},firstNumber:{type:Boolean,default:!1},firstClass:{type:[String,Array,Object],default:null},labelPrevPage:{type:String,default:"Go to previous page"},prevText:{type:String,default:"‹"},prevClass:{type:[String,Array,Object],default:null},labelNextPage:{type:String,default:"Go to next page"},nextText:{type:String,default:"›"},nextClass:{type:[String,Array,Object]},labelLastPage:{type:String,default:"Go to last page"},lastText:{type:String,default:"»"},lastNumber:{type:Boolean,default:!1},lastClass:{type:[String,Array,Object]},labelPage:{type:[String,Function],default:"Go to page"},pageClass:{type:[String,Array,Object]},hideEllipsis:{type:Boolean,default:!1},ellipsisText:{type:String,default:"…"},ellipsisClass:{type:[String,Array,Object]}},gy={mixins:[_n],model:{prop:"value",event:"input"},props:my,data:function(){var t=ie(this.value,0);return t=t>0?t:-1,{currentPage:t,localNumberOfPages:1,localLimit:uy}},computed:{btnSize:function(){return this.size?"pagination-".concat(this.size):""},alignment:function(){var t=this.align;return"center"===t?"justify-content-center":"end"===t||"right"===t?"justify-content-end":"fill"===t?"text-center":""},styleClass:function(){return this.pills?"b-pagination-pills":""},computedCurrentPage:function(){return py(this.currentPage,this.localNumberOfPages)},paginationParams:function(){var t=this.localLimit,e=this.localNumberOfPages,n=this.computedCurrentPage,r=this.hideEllipsis,i=this.firstNumber,o=this.lastNumber,a=!1,s=!1,l=t,c=1;e<=t?l=e:n<t-1&&t>cy?(r&&!o||(s=!0,l=t-(i?0:1)),l=An(l,t)):e-n+2<t&&t>cy?(r&&!i||(a=!0,l=t-(o?0:1)),c=e-l+1):(t>cy&&(l=t-2,a=!(r&&!i),s=!(r&&!o)),c=n-Bn(l/2)),c<1?(c=1,a=!1):c>e-l&&(c=e-l+1,s=!1),a&&i&&c<4&&(l+=2,c=1,a=!1);var u=c+l-1;return s&&o&&u>e-3&&(l+=u===e-2?2:3,s=!1),t<=cy&&(i&&1===c?l=An(l+1,e,t+1):o&&e===c+l-1&&(c=In(c-1,1),l=An(e-c+1,e,t+1))),l=An(l,e-c+1),{show
45FirstDots:a,showLastDots:s,numberOfLinks:l,startNumber:c}},pageList:function(){var t=this.paginationParams,e=t.numberOfLinks,n=t.startNumber,r=this.computedCurrentPage,i=hy(n,e);if(i.length>3){var o=r-n,a="bv-d-xs-down-none";if(0===o)for(var s=3;s<i.length;s++)i[s].classes=a;else if(o===i.length-1)for(var l=0;l<i.length-3;l++)i[l].classes=a;else{for(var c=0;c<o-1;c++)i[c].classes=a;for(var u=i.length-1;u>o+1;u--)i[u].classes=a}}return i}},watch:{value:function(t,e){t!==e&&(this.currentPage=py(t,this.localNumberOfPages))},currentPage:function(t,e){t!==e&&this.$emit("input",t>0?t:null)},limit:function(t,e){t!==e&&(this.localLimit=dy(t))}},created:function(){var t=this;this.localLimit=dy(this.limit),this.$nextTick(function(){t.currentPage=t.currentPage>t.localNumberOfPages?t.localNumberOfPages:t.currentPage})},methods:{handleKeyNav:function(t){var e=t.keyCode,n=t.shiftKey;this.isNav||(e===gr.LEFT||e===gr.UP?(t.preventDefault(),n?this.focusFirst():this.focusPrev()):e!==gr.RIGHT&&e!==gr.DOWN||(t.preventDefault(),n?this.focusLast():this.focusNext()))},getButtons:function(){return Le("button.page-link, a.page-link",this.$el).filter(function(t){return De(t)})},focusCurrent:function(){var t=this;this.$nextTick(function(){var e=t.getButtons().find(function(e){return ie(We(e,"aria-posinset"),0)===t.computedCurrentPage});
45en(e)||t.focusFirst()})},focusFirst:function(){var t=this;this.$nextTick(function(){var e=t.getButtons().find(function(t){return!Be(t)});en(e)})},focusLast:function(){var t=this;this.$nextTick(function(){var e=t.getButtons().reverse().find(function(t){return!Be(t)});en(e)})},focusPrev:function(){var t=this;this.$nextTick(function(){var e=t.getButtons(),n=e.indexOf(Ae());n>0&&!Be(e[n-1])&&en(e[n-1])})},focusNext:function(){var t=this;this.$nextTick(function(){var e=t.getButtons(),n=e.indexOf(Ae());n<e.length-1&&!Be(e[n+1])&&en(e[n+1])})}},render:function(t){var e=this,n=[],r=this.localNumberOfPages,i=this.pageList.map(function(t){return t.number}),o=this.disabled,a=this.paginationParams,s=a.showFirstDots,l=a.showLastDots,c=this.computedCurrentPage,u="fill"===this.align,h=this.isNav,d=function(t){return t===c},p=this.currentPage<1,f=function(n,i,a,s,l,c,f){var m=o||d(c)||p||n<1||n>r,g=n<1?1:n>r?r:n,y={disabled:m,page:g,index:g-1},_=e.normalizeSlot(a,y)||ge(s)||t(),v=t(m?"span":h?Rr:"button",{staticClass:"page-link",class:{"flex-grow-1":!h&&!m&&u},props:m||!h?{}:e.linkProps(n),attrs:{role:h?null:"menuitem",type:h||m?null:"button",tabindex:m||h?null:"-1","aria-label":i,"aria-controls":e.ariaControls||null,"aria-disabled":m?"true":null},on:m?{}:{"!click":function(t){e.onClick(n,t)},keydown:fy}},[_]);return t("li",{key:f,staticClass:"page-item",class:[{disabled:m,"flex-fill":u,"d-flex":u&&!h&&!m},l],attrs:{role:h?null:"presentation","aria-hidden":m?"true":null}},[v])},m=function(n){return t("li",{key:"ellipsis-".concat(n?"last":"first"),staticClass:"page-item",class:["disabled","bv-d-xs-down-none",u?"flex-fill":"",e.ellipsisClass],attrs:{role:"separator"}},[t("span",{staticClass:"page-link"},[e.normalizeSlot("ellipsis-text")||ge(e.ellipsisText)||t()])])},g=function(n,i){var a=d(n.number)&&!p,s=o?null:a||p&&0===i?"0":"-1",l={role:h?null:"menuitemradio",type:h||o?null:"button","aria-disabled":o?"true":null,"aria-controls":e.ariaControls||null,"aria-label":dt(e.labelPage)?e.labelPage(n.number):"".concat(e.labelPage," ").concat(n.number),"aria-checked":h?null:a?"true":"false","aria-current":h&&a?"page":null,"aria-posinset":n.number,"aria-setsize":r,tabindex:h?null:s},c=ge(e.makePage(n.number)),f={page:n.number,index:n.number-1,content:c,active:a,disabled:o},m=t(o?"span":h?Rr:"button",{props:o||!h?{}:e.linkProps(n.number),staticClass:"page-link",class:{"flex-grow-1":!h&&!o&&u},attrs:l,on:o?{}:{"!click":function(t){e.onClick(n.number,t)},keydown:fy}},[e.normalizeSlot("page",f)||c]);return t("li",{key:"page-".concat(n.number),staticClass:"page-item",class:[{disabled:o,active:a,"flex-fill":u,"d-flex":u&&!h&&!o},n.classes,e.pageClass],attrs:{role:h?null:"presentation"}},[m])},y=t();this.firstNumber||this.hideGotoEndButtons||(y=f(1,this.labelFirstPage,"first-text",this.firstText,this.firstClass,1,"pagination-goto-first")),n.push(y),n.push(f(c-1,this.labelPrevPage,"prev-text",this.prevText,this.prevClass,1,"pagination-goto-prev")),n.push(this.firstNumber&&1!==i[0]?g({number:1},0):t()),n.push(s?m(!1):t()),this.pageList.forEach(function(t,r){var o=s&&e.firstNumber&&1!==i[0]?1:0;n.push(g(t,r+o))}),n.push(l?m(!0):t()),n.push(this.lastNumber&&i[i.length-1]!==r?g({number:r},-1):t()),n.push(f(c+1,this.labelNextPage,"next-text",this.nextText,this.nextClass,r,"pagination-goto-next"));var _=t();this.lastNumber||this.hideGotoEndButtons||(_=f(r,this.labelLastPage,"last-text",this.lastText,this.lastClass,r,"pagination-goto-last")),n.push(_);
45var v=t("ul",{ref:"ul",staticClass:"pagination",class:["b-pagination",this.btnSize,this.alignment,this.styleClass],attrs:{role:h?null:"menubar","aria-disabled":o?"true":"false","aria-label":h?null:this.ariaLabel||null},on:h?{}:{keydown:this.handleKeyNav}},n);return h?t("nav",{attrs:{"aria-disabled":o?"true":null,"aria-hidden":o?"true":"false","aria-label":h&&this.ariaLabel||null}},[v]):v}},yy="BPagination",_y=20,vy=0,by={size:{type:String,default:function(){return Qt(yy,"size")}},perPage:{type:[Number,String],default:_y},totalRows:{type:[Number,String],default:vy},ariaControls:{type:String}},xy=function(t){return In(ie(t)||_y,1)},wy=function(t){return In(ie(t)||vy,0)},Sy=i.extend({name:yy,mixins:[gy],props:by,computed:{numberOfPages:function(){var t=Dn(wy(this.totalRows)/xy(this.perPage));return t<1?1:t},pageSizeNumberOfPages:function(){return{perPage:xy(this.perPage),totalRows:wy(this.totalRows),numberOfPages:this.numberOfPages}}},watch:{pageSizeNumberOfPages:function(t,e){ht(e)||(t.perPage!==e.perPage&&t.totalRows===e.totalRows?this.currentPage=1:t.numberOfPages!==e.numberOfPages&&this.currentPage>t.numberOfPages&&(this.currentPage=1)),this.localNumberOfPages=t.numberOfPages}},created:function(){var t=this;this.localNumberOfPages=this.numberOfPages;var e=ie(this.value,0);e>0?this.currentPage=e:this.$nextTick(function(){t.currentPage=0})},mounted:function(){this.localNumberOfPages=this.numberOfPages},methods:{onClick:function(t,e){var n=this;t>this.numberOfPages?t=this.numberOfPages:t<1&&(t=1),this.currentPage=t,this.$emit("change",this.currentPage),this.$nextTick(function(){var t=e.target;De(t)&&n.$el.contains(t)?en(t):n.focusCurrent()})},makePage:function(t){return t},linkProps:function(){return{}}}}),Ty=Vt({components:{BPagination:Sy}});function Ey(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Cy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ey(Object(n),!0).forEach(function(e){Oy(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ey(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Oy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Py="BPaginationNav",ky=C(Lr,["event","routerTag"]),Ay=Cy({size:{type:String,default:function(){return Qt(Py,"size")}},numberOfPages:{type:[Number,String],default:1,validator:function(t){var e=ie(t,0);return!(e<1)||(Et('Prop "number-of-pages" must be a number greater than "0"',Py),!1)}},baseUrl:{type:String,default:"/"},useRouter:{type:Boolean,default:!1},linkGen:{type:Function},pageGen:{type:Function},pages:{type:Array},noPageDetect:{type:Boolean,default:!1}},ky),Iy=function(t){return In(ie(t,0),1)},My=i.extend({name:Py,mixins:[gy],props:Ay,computed:{isNav:function(){return!0},computedValue:function(){var t=ie(this.value,0);return t<1?null:t}},watch:{numberOfPages:function(){var t=this;this.$nextTick(function(){t.setNumberOfPages()})},pages:function(){var t=this;this.$nextTick(function(){t.setNumberOfPages()})}},created:function(){this.setNumberOfPages()},mounted:function(){var t=this;this.$router&&this.$watch("$route",function(){t.$nextTick(function(){Ce(function(){t.guessCurrentPage()})})})},methods:{setNumberOfPages:function(){var t=this;a(this.pages)&&this.pages.length>0?this.localNumberOfPages=this.pages.length:this.localNumberOfPages=Iy(this.numberOfPages),this.$nextTick(function(){t.guessCurrentPage()})},onClick:function(t,e){var n=this;t!==this.currentPage&&(Ce(function(){n.currentPage=t,n.$emit("change",t)}),this.$nextTick(function(){var t=e.currentTarget||e.target;nn(t)}))},getPageInfo:function(t){if(!a(this.pages)||0===this.pages.length||ct(this.pages[t-1])){var e="".concat(this.baseUrl).concat(t);return{link:this.useRouter?{path:e}:e,text:ge(t)}}var n=this.pages[t-1];if(w(n)){var r=n.link;return{link:w(r)?r:this.useRouter?{path:r}:r,text:ge(n.text||t)}}return{link:ge(n),text:ge(t)}},makePage:function(t){var e=this.getPageInfo(t);return this.pageGen&&dt(this.pageGen)?this.pageGen(t,e):e.text},makeLink:function(t){var e=this.getPageInfo(t);return this.linkGen&&dt(this.linkGen)?this.linkGen(t,e):e.link},linkProps:function(t){var e=Qn(ky,this),n=this.makeLink(t);return this.useRouter||w(n)?e.to=n:e.href=n,e},resolveLink:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{t=document.createElement("a"),t.href=fr({to:e},"a","/","/"),document.body.appendChild(t);var n=t,r=n.pathname,i=n.hash,o=n.search;return document.body.removeChild(t),{path:r,hash:i,query:cr(o)}}catch(a){try{t&&t.parentNode&&t.parentNode.removeChild(t)}catch(a){}return{}}},resolveRoute:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{var e=this.$router.resolve(t,this.$route).route;return{path:e.path,hash:e.hash,query:e.query}}catch(n){return{}}},guessCurrentPage:function(){var t=this.computedValue,e=this.$router,n=this.$route;if(!this.noPageDetect&&!t&&(V["j"]||!V["j"]&&e))for(var r=e&&n?{path:n.path,hash:n.hash,query:n.query}:{},i=V["j"]?window.location||document.location:null,o=i?{path:i.pathname,hash:i.hash,query:cr(i.search)}:{},a=1;!t&&a<=this.localNumberOfPages;a++){var s=this.makeLink(a);t=e&&(w(s)||this.useRouter)?Io(this.resolveRoute(s),r)?a:null:V["j"]?Io(this.resolveLink(s),o)?a:null:-1}this.currentPage=t>0?t:0}}}),Dy=Vt({components:{BPaginationNav:My}}),By="BVPopper",zy={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOPLEFT:"top",TOPRIGHT:"top",RIGHTTOP:"right",RIGHTBOTTOM:"right",BOTTOMLEFT:"bottom",BOTTOMRIGHT:"bottom",LEFTTOP:"left",LEFTBOTTOM:"left"},Ly={AUTO:0,TOPLEFT:-1,TOP:0,TOPRIGHT:1,RIGHTTOP:-1,RIGHT:0,RIGHTBOTTOM:1,BOTTOMLEFT:-1,BOTTOM:0,BOTTOMR
45IGHT:1,LEFTTOP:-1,LEFT:0,LEFTBOTTOM:1},Ry=i.extend({name:By,props:{target:{type:[rt,it]},placement:{type:String,default:"top"},fallbackPlacement:{type:[String,Array],default:"flip"},offset:{type:Number,default:0},boundary:{type:[String,rt],default:"scrollParent"},boundaryPadding:{type:Number,default:5},arrowPadding:{type:Number,default:6}},data:function(){return{noFade:!1,localShow:!0,attachment:this.getAttachment(this.placement)}},computed:{templateType:function(){return"unknown"},popperConfig:function(){var t=this,e=this.placement;return{placement:this.getAttachment(e),modifiers:{offset:{offset:this.getOffset(e)},flip:{behavior:this.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{padding:this.boundaryPadding,boundariesElement:this.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t.popperPlacementChange(e)},onUpdate:function(e){t.popperPlacementChange(e)}}}},created:function(){var t=this;this.$_popper=null,this.localShow=!0,this.$on("show",function(e){t.popperCreate(e)}),this.$on("hidden",function(){t.$nextTick(t.$destroy)}),this.$parent.$once("hook:destroyed",this.$destroy)},beforeMount:function(){this.attachment=this.getAttachment(this.placement)},mounted:function(){},updated:function(){this.updatePopper()},beforeDestroy:function(){this.destroyPopper()},destroyed:function(){var t=this.$el;t&&t.parentNode&&t.parentNode.removeChild(t)},methods:{hide:function(){this.localShow=!1},getAttachment:function(t){return zy[String(t).toUpperCase()]||"auto"},getOffset:function(t){if(!this.offset){var e=this.$refs.arrow||Re(".arrow",this.$el),n=oe(Ye(e).width,0)+oe(this.arrowPadding,0);switch(Ly[String(t).toUpperCase()]||0){case 1:return"+50%p - ".concat(n,"px");case-1:return"-50%p + ".concat(n,"px");default:return 0}}return this.offset},popperCreate:function(t){this.destroyPopper(),this.$_popper=new uc["a"](this.target,t,this.popperConfig)},destroyPopper:function(){this.$_popper&&this.$_popper.destroy(),this.$_popper=null},updatePopper:function(){this.$_popper&&this.$_popper.scheduleUpdate()},popperPlacementChange:function(t){this.attachment=this.getAttachment(t.placement)},renderTemplate:function(t){return t("div")}},render:function(t){var e=this;return t(fn,{props:{appear:!0,noFade:this.noFade},on:{beforeEnter:function(t){return e.$emit("show",t)},afterEnter:function(t){return e.$emit("shown",t)},beforeLeave:function(t){return e.$emit("hide",t)},afterLeave:function(t){return e.$emit("hidden",t)}}},[this.localShow?this.renderTemplate(t):t()])}});function jy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Fy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jy(Object(n),!0).forEach(function(e){Ny(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jy(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ny(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $y="BVTooltipTemplate",Vy=i.extend({name:$y,extends:Ry,mixins:[cm],props:{id:{type:String},html:{type:Boolean}},data:function(){return{title:"",content:"",variant:null,customClass:null,interactive:!0}},computed:{templateType:function(){return"tooltip"},templateClasses:function(){var t;return[(t={noninteractive:!this.interactive},Ny(t,"b-".concat(this.templateType,"-").concat(this.variant),this.variant),Ny(t,"bs-".concat(this.templateType,"-").concat(this.attachment),this.attachment),t),this.customClass]},templateAttributes:function(){return Fy({id:this.id,role:"tooltip",tabindex:"-1"},this.scopedStyleAttrs)},templateListeners:function(){var t=this;return{mouseenter:function(e){t.$emit("mouseenter",e)},mouseleave:function(e){t.$emit("mouseleave",e)},focusin:function(e){t.$emit("focusin",e)},focusout:function(e){t.$emit("focusout",e)}}}},methods:{renderTemplate:function(t){var e=dt(this.title)?this.title({}):ht(this.title)?t():this.title,n=this.html&&!dt(this.title)?{innerHTML:this.title}:{};return t("div",{staticClass:"tooltip b-tooltip",class:this.templateClasses,attrs:this.templateAttributes,on:this.templateListeners},[t("div",{ref:"arrow",staticClass:"arrow"}),t("div",{staticClass:"tooltip-inner",domProps:n},[e])])}}});function Uy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
vendor: 4,342 bytes, line 45
45e%2?Uy(Object(n),!0).forEach(function(e){Hy(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Uy(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Hy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qy="BVTooltip",Wy=".modal-content",Zy="bv::modal::hidden",Xy=".b-sidebar",Yy=[Wy,Xy].join(", "),Ky="dropdown",Jy=".dropdown-menu.show",Qy={title:"",content:"",variant:null,customClass:null,triggers:"",placement:"auto",fallbackPlacement:"flip",target:null,container:null,noFade:!1,boundary:"scrollParent",boundaryPadding:5,offset:0,delay:0,arrowPadding:6,interactive:!0,disabled:!1,id:null,html:!1},t_=i.extend({name:qy,props:{},data:function(){return Gy(Gy({},Qy),{},{activeTrigger:{hover:!1,click:!1,focus:!1},localShow:!1})},computed:{templateType:function(){return"tooltip"},computedId:function(){return this.id||"__bv_".concat(this.templateType,"_").concat(this._uid,"__")},computedDelay:function(){var t={show:0,hide:0};return S(this.delay)?(t.show=In(ie(this.delay.show,0),0),t.hide=In(ie(this.delay.hide,0),0)):(mt(this.delay)||ft(this.delay))&&(t.show=t.hide=In(ie(this.delay,0),0)),t},computedTriggers:function(){return l(this.triggers).filter(Boolean).join(" ").trim().toLowerCase().split(/\s+/).sort()},isWithActiveTrigger:function(){for(var t in this.activeTrigger)if(this.activeTrigger[t])return!0;return!1},computedTemplateData:function(){return{title:this.title,content:this.content,variant:this.variant,customClass:this.customClass,noFade:this.noFade,interactive:this.interactive}}},watch:{computedTriggers:function(t,e){var n=this;Io(t,e)||this.$nextTick(function(){n.unListen(),e.forEach(function(e){s(t,e)||n.activeTrigger[e]&&(n.activeTrigger[e]=!1)}),n.listen()})},computedTemplateData:function(){this.handleTemplateUpdate()},disabled:function(t){t?this.disable():this.enable()}},created:function(){var t=this;this.$_tip=null,this.$_hoverTimeout=null,this.$_hoverState="",this.$_visibleInterval=null,this.$_enabled=!this.disabled,this.$_noop=Hs.bind(this),this.$parent&&this.$parent.$once("hook:beforeDestroy",this.$destroy),this.$nextTick(function(){var e=t.getTarget();e&&Ne(document.body,e)?(t.scopeId=sm(t.$parent),t.listen()):Et("Unable to find target element in document.",t.templateType)})},updated:function(){this.$nextTick(this.handleTemplateUpdate)},deactivated:function(){this.forceHide()},beforeDestroy:function(){this.unListen(),this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.clearVisibilityInterval(),this.destroyTemplate(),this.$_noop=null},methods:{getTemplate:function(){return Vy},updateData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1;v(Qy).forEach(function(r){ct(e[r])||t[r]===e[r]||(t[r]=e[r],"title"===r&&(n=!0))}),n&&this.localShow&&this.fixTitle()},createTemplateAndShow:function(){var t=this.getContainer(),e=this.getTemplate(),n=this.$_tip=new e({parent:this,propsData:{id:this.computedId,html:this.html,placement:this.placement,fallbackPlacement:this.fallbackPlacement,target:this.getPlacementTarget(),boundary:this.getBoundary(),offset:ie(this.offset,0),arrowPadding:ie(this.arrowPadding,0),boundaryPadding:ie(this.boundaryPadding,0)}});this.handleTemplateUpdate(),n.$once("show",this.onTemplateShow),n.$once("shown",this.onTemplateShown),n.$once("hide",this.onTemplateHide),n.$once("hidden",this.onTemplateHidden),n.$once("hook:destroyed",this.destroyTemplate),n.$on("focusin",this.handleEvent),n.$on("focusout",this.handleEvent),n.$on("mouseenter",this.handleEvent),n.$on("mouseleave",this.handleEvent),n.$mount(t.appendChild(document.createElement("div")))},hideTemplate:function(){this.$_tip&&this.$_tip.hide(),this.clearActiveTriggers(),this.$_hoverState=""},destroyTemplate:function(){this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.$_hoverState="",this.clearActiveTriggers(),this.localPlacementTarget=null;try{this.$_tip.$destroy()}catch(t){}this.$_tip=null,this.removeAriaDescribedby(),this.restoreTitle(),this.localShow=!1},getTemplateElement:function(){return this.$_tip?this.$_tip.$el:null},handleTemplateUpdate:function(){var t=this,e=this.$_tip;if(e){var n=["title","content","variant","customClass","noFade","interactive"];
45n.forEach(function(n){e[n]!==t[n]&&(e[n]=t[n])})}},show:function(){var t=this.getTarget();if(t&&Ne(document.body,t)&&De(t)&&!this.dropdownOpen()&&(!ht(this.title)&&""!==this.title||!ht(this.content)&&""!==this.content)&&!this.$_tip&&!this.localShow){this.localShow=!0;var e=this.buildEvent("show",{cancelable:!0});this.emitEvent(e),e.defaultPrevented?this.destroyTemplate():(this.fixTitle(),this.addAriaDescribedby(),this.createTemplateAndShow())}},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getTemplateElement();if(e&&this.localShow){var n=this.buildEvent("hide",{cancelable:!t});this.emitEvent(n),n.defaultPrevented||this.hideTemplate()}else this.restoreTitle()},forceHide:function(){var t=this.getTemplateElement();t&&this.localShow&&(this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.$_hoverState="",this.clearActiveTriggers(),this.$_tip&&(this.$_tip.noFade=!0),this.hide(!0))},enable:function(){this.$_enabled=!0,this.emitEvent(this.buildEvent("enabled"))},disable:function(){this.$_enabled=!1,this.emitEvent(this.buildEvent("disabled"))},onTemplateShow:function(){this.setWhileOpenListeners(!0)},onTemplateShown:function(){var t=this.$_hoverState;this.$_hoverState="","out"===t&&this.leave(null),this.emitEvent(this.buildEvent("shown"))},onTemplateHide:function(){this.setWhileOpenListeners(!1)},onTemplateHidden:function(){this.destroyTemplate(),this.emitEvent(this.buildEvent("hidden"))},getTarget:function(){var t=this.target?this.target.$el||this.target:null;return t=ft(t)?$e(t.replace(/^#/,"")):t,t=dt(t)?t():t,ke(t)?t:null},getPlacementTarget:function(){return this.getTarget()},getTargetId:function(){var t=this.getTarget();return t&&t.id?t.id:null},getContainer:function(){var t=!!this.container&&(this.container.$el||this.container),e=document.body,n=this.getTarget();return!1===t?Fe(Yy,n)||e:ft(t)&&$e(t.replace(/^#/,""))||e},getBoundary:function(){return this.boundary?this.boundary.$el||this.boundary:"scrollParent"},isInModal:function(){var t=this.getTarget();return t&&Fe(Wy,t)},isDropdown:function(){var t=this.getTarget();return t&&Ge(t,Ky)},dropdownOpen:function(){var t=this.getTarget();return this.isDropdown()&&t&&Re(Jy,t)},clearHoverTimeout:function(){clearTimeout(this.$_hoverTimeout),this.$_hoverTimeout=null},clearVisibilityInterval:function(){clearInterval(this.$_visibleInterval),this.$_visibleInterval=null},clearActiveTriggers:function(){for(var t in this.activeTrigger)this.activeTrigger[t]=!1},addAriaDescribedby:function(){var t=this.getTarget(),e=We(t,"aria-describedby")||"";e=e.split(/\s+/).concat(this.computedId).join(" ").trim(),He(t,"aria-describedby",e)},removeAriaDescribedby:function(){var t=this,e=this.getTarget(),n=We(e,"aria-describedby")||"";n=n.split(/\s+/).filter(function(e){return e!==t.computedId}).join(" ").trim(),n?He(e,"aria-describedby",n):qe(e,"aria-describedby")},fixTitle:function(){var t=this.getTarget();t&&We(t,"title")&&(He(t,"data-original-title",We(t,"title")||""),He(t,"title",""))},restoreTitle:function(){var t=this.getTarget();t&&Ze(t,"data-original-title")&&(He(t,"title",We(t,"data-original-title")||""),qe(t,"data-original-title"))},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new fc(t,Gy({cancelable:!1,target:this.getTarget(),relatedTarget:this.getTemplateElement()||null,componentId:this.computedId,vueTarget:this},e))},emitEvent:function(t){var e=t.type,n=this.$root;n&&n.$emit&&n.$emit("bv::".concat(this.templateType,"::").concat(e),t),this.$emit(e,t)},listen:function(){var t=this,e=this.getTarget();e&&(this.setRootListener(!0),this.computedTriggers.forEach(function(n){"click"===n?tl(e,"click",t.handleEvent,Js):"focus"===n?(tl(e,"focusin",t.handleEvent,Js),tl(e,"focusout",t.handleEvent,Js)):"blur"===n?tl(e,"focusout",t.handleEvent,Js):"hover"===n&&(tl(e,"mouseenter",t.handleEvent,Js),tl(e,"mouseleave",t.handleEvent,Js))},this))},unListen:function(){var t=this,e=["click","focusin","focusout","mouseenter","mouseleave"],n=this.getTarget();this.setRootListener(!1),e.forEach(function(e){n&&el(n,e,t.handleEvent,Js)},this)},setRootListener:function(t){var e=this.$root;if(e){var n=t?"$on":"$off",r=this.templateType;e[n]("bv::hide::".concat(r),this.doHide),e[n]("bv::show::".concat(r),this.doShow),e[n]("bv::disable::".concat(r),this.doDisable),e[n]("bv::enable::".concat(r),this.doEnable)}},setWhileOpenListeners:function(t){this.setModalListener(t),this.setDropdownListener(t),this.visibleCheck(t),this.setOnTouchStartListener(t)},visibleCheck:function(t){var e=this;this.clearVisibilityInterval();var n=this.getTarget(),r=this.getTemplateElement();t&&(this.$_visibleInterval=setInterval(function(){!r||!e.localShow||n.parentNode&&De(n)||e.forceHide()},100))},setModalListener:function(t){this.isInModal()&&this.$root[t?"$on":"$off"](Zy,this.forceHide)},setOnTouchStartListener:function(t){var e=this;"ontouchstart"in document.documentElement&&o(document.body.children).forEac
45h(function(n){nl(t,n,"mouseover",e.$_noop)})},setDropdownListener:function(t){var e=this.getTarget();e&&this.$root&&this.isDropdown&&e.__vue__&&e.__vue__[t?"$on":"$off"]("shown",this.forceHide)},handleEvent:function(t){var e=this.getTarget();if(e&&!Be(e)&&this.$_enabled&&!this.dropdownOpen()){var n=t.type,r=this.computedTriggers;if("click"===n&&s(r,"click"))this.click(t);else if("mouseenter"===n&&s(r,"hover"))this.enter(t);else if("focusin"===n&&s(r,"focus"))this.enter(t);else if("focusout"===n&&(s(r,"focus")||s(r,"blur"))||"mouseleave"===n&&s(r,"hover")){var i=this.getTemplateElement(),o=t.target,a=t.relatedTarget;if(i&&Ne(i,o)&&Ne(e,a)||i&&Ne(e,o)&&Ne(i,a)||i&&Ne(i,o)&&Ne(i,a)||Ne(e,o)&&Ne(e,a))return;this.leave(t)}}},doHide:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.forceHide()},doShow:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.show()},doDisable:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.disable()},doEnable:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.enable()},click:function(t){this.$_enabled&&!this.dropdownOpen()&&(en(t.currentTarget),this.activeTrigger.click=!this.activeTrigger.click,this.isWithActiveTrigger?this.enter(null):this.leave(null))},toggle:function(){this.$_enabled&&!this.dropdownOpen()&&(this.localShow?this.leave(null):this.enter(null))},enter:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(this.activeTrigger["focusin"===e.type?"focus":"hover"]=!0),this.localShow||"in"===this.$_hoverState?this.$_hoverState="in":(this.clearHoverTimeout(),this.$_hoverState="in",this.computedDelay.show?(this.fixTitle(),this.$_hoverTimeout=setTimeout(function(){"in"===t.$_hoverState?t.show():t.localShow||t.restoreTitle()},this.computedDelay.show)):this.show())},leave:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(this.activeTrigger["focusout"===e.type?"focus":"hover"]=!1,"focusout"===e.type&&s(this.computedTriggers,"blur")&&(this.activeTrigger.click=!1,this.activeTrigger.hover=!1)),this.isWithActiveTrigger||(this.clearHoverTimeout(),this.$_hoverState="out",this.computedDelay.hide?this.$_hoverTimeout=setTimeout(function(){"out"===t.$_hoverState&&t.hide()},this.computedDelay.hide):this.hide())}}}),e_="BTooltip",n_=i.extend({name:e_,props:{title:{type:String},target:{type:[String,rt,it,Function,Object],required:!0},triggers:{type:[String,Array],default:"hover focus"},placement:{type:String,default:"top"},fallbackPlacement:{type:[String,Array],default:"flip",validator:function(t){return a(t)&&t.every(function(t){return ft(t)})||s(["flip","clockwise","counterclockwise"],t)}},variant:{type:String,default:function(){return Qt(e_,"variant")}},customClass:{type:String,default:function(){return Qt(e_,"customClass")}},delay:{type:[Number,Object,String],default:function(){return Qt(e_,"delay")}},boundary:{type:[String,rt,Object],default:function(){return Qt(e_,"boundary")}},boundaryPadding:{type:[Number,String],default:function(){return Qt(e_,"boundaryPadding")}},offset:{type:[Number,String],default:0},noFade:{type:Boolean,default:!1},container:{type:[String,rt,Object]},show:{type:Boolean,default:!1},noninteractive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{type:String}},data:function(){return{localShow:this.show,localTitle:"",localContent:""}},computed:{templateData:function(){return{title:this.localTitle,content:this.localContent,target:this.target,triggers:this.triggers,placement:this.placement,fallbackPlacement:this.fallbackPlacement,variant:this.variant,customClass:this.customClass,container:this.container,boundary:this.boundary,boundaryPadding:this.boundaryPadding,delay:this.delay,offset:this.offset,noFade:this.noFade,interactive:!this.noninteractive,disabled:this.disabled,id:this.id}},templateTitleContent:function(){return{title:this.title,content:this.content}}},watch:{show:function(t,e){t!==e&&t!==this.localShow&&this.$_toolpop&&(t?this.$_toolpop.show():this.$_toolpop.forceHide())},disabled:function(t){t?this.doDisable():this.doEnable()},localShow:function(t){this.$emit("update:show",t)},templateData:function(){var t=this;this.$nextTick(function(){t.$_toolpop&&t.$_toolpop.updateData(t.templateData)})},templateTitleContent:function(){this.$nextTick(this.updateContent)}},created:function(){this.$_toolpop=null},updated:function(){this.$nextTick(this.updateContent)},beforeDestroy:function(){this.$off("open",this.doOpen),this.$off("close",this.doClose),this.$off("disable",this.doDisable),this.$off("enable",this.doEnable),this.$_toolpop&&(this.$_toolpop.$destroy(),this.$_toolpop=null)},mounted:function(){var t=this;this.$nextTick(function(){var e=t.getComponent();t.updateContent();var n=sm(t)||sm(t.$parent),r=t.$_toolpop=new e({parent:t,_scopeId:n||void 0});r.updateData(t.templateData),r.$on("show",t.onShow),r.$on("shown",t.onShown),r.$on("hide",t.onHide),r.$on("hidden",t.onHidden
45),r.$on("disabled",t.onDisabled),r.$on("enabled",t.onEnabled),t.disabled&&t.doDisable(),t.$on("open",t.doOpen),t.$on("close",t.doClose),t.$on("disable",t.doDisable),t.$on("enable",t.doEnable),t.localShow&&r.show()})},methods:{getComponent:function(){return t_},updateContent:function(){this.setTitle(this.$scopedSlots.default||this.title)},setTitle:function(t){t=ht(t)?"":t,this.localTitle!==t&&(this.localTitle=t)},setContent:function(t){t=ht(t)?"":t,this.localContent!==t&&(this.localContent=t)},onShow:function(t){this.$emit("show",t),t&&(this.localShow=!t.defaultPrevented)},onShown:function(t){this.localShow=!0,this.$emit("shown",t)},onHide:function(t){this.$emit("hide",t)},onHidden:function(t){this.$emit("hidden",t),this.localShow=!1},onDisabled:function(t){t&&"disabled"===t.type&&(this.$emit("update:disabled",!0),this.$emit("disabled",t))},onEnabled:function(t){t&&"enabled"===t.type&&(this.$emit("update:disabled",!1),this.$emit("enabled",t))},doOpen:function(){!this.localShow&&this.$_toolpop&&this.$_toolpop.show()},doClose:function(){this.localShow&&this.$_toolpop&&this.$_toolpop.hide()},doDisable:function(){this.$_toolpop&&this.$_toolpop.disable()},doEnable:function(){this.$_toolpop&&this.$_toolpop.enable()}},render:function(t){return t()}}),r_="BVPopoverTemplate",i_=i.extend({name:r_,extends:Vy,computed:{templateType:function(){return"popover"}},methods:{renderTemplate:function(t){var e=dt(this.title)?this.title({}):this.title,n=dt(this.content)?this.content({}):this.content,r=this.html&&!dt(this.title)?{innerHTML:this.title}:{},i=this.html&&!dt(this.content)?{innerHTML:this.content}:{};return t("div",{staticClass:"popover b-popover",class:this.templateClasses,attrs:this.templateAttributes,on:this.templateListeners},[t("div",{ref:"arrow",staticClass:"arrow"}),ht(e)||""===e?t():t("h3",{staticClass:"popover-header",domProps:r},[e]),ht(n)||""===n?t():t("div",{staticClass:"popover-body",domProps:i},[n])])}}}),o_="BVPopover",a_=i.extend({name:o_,extends:t_,computed:{templateType:function(){return"popover"}},methods:{getTemplate:function(){return i_}}}),s_="BPopover",l_=i.extend({name:s_,extends:n_,inheritAttrs:!1,props:{title:{type:String},content:{type:String},triggers:{type:[String,Array],default:"click"},placement:{type:String,default:"right"},variant:{type:String,default:function(){return Qt(s_,"variant")}},customClass:{type:String,default:function(){return Qt(s_,"customClass")}},delay:{type:[Number,Object,String],default:function(){return Qt(s_,"delay")}},boundary:{type:[String,rt,Object],default:function(){return Qt(s_,"boundary")}},boundaryPadding:{type:[Number,String],default:function(){return Qt(s_,"boundaryPadding")}}},methods:{getComponent:function(){return a_},updateContent:function(){this.setContent(this.$scopedSlots.default||this.content),this.setTitle(this.$scopedSlots.title||this.title)}}});function c_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c_(Object(n),!0).forEach(function(e){h_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function h_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d_="__BV_Popover__",p_="click",f_={focus:!0,hover:!0,click:!0,blur:!0,manual:!0},m_=/^html$/i,g_=/^nofade$/i,y_=/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/i,__=/^(window|viewport|scrollParent)$/i,v_=/^d\d+$/i,b_=/^ds\d+$/i,x_=/^dh\d+$/i,w_=/^o-?\d+$/i,S_=/^v-.+$/i,T_=/\s+/,E_=function(t,e){var n="BPopover",r={title:void 0,content:void 0,trigger:"",placement:"right",fallbackPlacement:"flip",container:!1,animation:!0,offset:0,disabled:!1,id:null,html:!1,delay:Qt(n,"delay"),boundary:String(Qt(n,"boundary")),boundaryPadding:ie(Qt(n,"boundaryPadding"),0),variant:Qt(n,"variant"),customClass:Qt(n,"customClass")};if(ft(t.value)||mt(t.value)?r.content=t.value:dt(t.value)?r.content=t.value:S(t.value)&&(r=u_(u_({},r),t.value)),t.arg&&(r.container="#".concat(t.arg)),ct(r.title)){var i=e.data||{};r.title=i.attrs&&!ht(i.attrs.title)?i.attrs.title:void 0}S(r.delay)||(r.delay={show:ie(r.delay,0),hide:ie(r.delay,0)}
45),v(t.modifiers).forEach(function(t){if(m_.test(t))r.html=!0;else if(g_.test(t))r.animation=!1;else if(y_.test(t))r.placement=t;else if(__.test(t))t="scrollparent"===t?"scrollParent":t,r.boundary=t;else if(v_.test(t)){var e=ie(t.slice(1),0);r.delay.show=e,r.delay.hide=e}else b_.test(t)?r.delay.show=ie(t.slice(2),0):x_.test(t)?r.delay.hide=ie(t.slice(2),0):w_.test(t)?r.offset=ie(t.slice(1),0):S_.test(t)&&(r.variant=t.slice(2)||null)});var o={};return l(r.trigger||"").filter($).join(" ").trim().toLowerCase().split(T_).forEach(function(t){f_[t]&&(o[t]=!0)}),v(t.modifiers).forEach(function(t){t=t.toLowerCase(),f_[t]&&(o[t]=!0)}),r.trigger=v(o).join(" "),"blur"===r.trigger&&(r.trigger="focus"),r.trigger||(r.trigger=p_),r},C_=function(t,e,n){if(V["j"]){var r=E_(e,n);if(!t[d_]){var i=n.context;t[d_]=new a_({parent:i,_scopeId:sm(i,void 0)}),t[d_].__bv_prev_data__={},t[d_].$on("show",function(){var e={};dt(r.title)&&(e.title=r.title(t)),dt(r.content)&&(e.content=r.content(t)),v(e).length>0&&t[d_].updateData(e)})}var o={title:r.title,content:r.content,triggers:r.trigger,placement:r.placement,fallbackPlacement:r.fallbackPlacement,variant:r.variant,customClass:r.customClass,container:r.container,boundary:r.boundary,delay:r.delay,offset:r.offset,noFade:!r.animation,id:r.id,disabled:r.disabled,html:r.html},a=t[d_].__bv_prev_data__;if(t[d_].__bv_prev_data__=o,!Io(o,a)){var s={target:t};v(o).forEach(function(e){o[e]!==a[e]&&(s[e]="title"!==e&&"content"!==e||!dt(o[e])?o[e]:o[e](t))}),t[d_].updateData(s)}}},O_=function(t){t[d_]&&(t[d_].$destroy(),t[d_]=null),delete t[d_]},P_={bind:function(t,e,n){C_(t,e,n)},componentUpdated:function(t,e,n){n.context.$nextTick(function(){C_(t,e,n)})},unbind:function(t){O_(t)}},k_=Vt({directives:{VBPopover:P_}}),A_=Vt({components:{BPopover:l_},plugins:{VBPopoverPlugin:k_}}),I_="BProgressBar",M_=i.extend({name:I_,mixins:[_n],inject:{bvProgress:{default:function(){return{}}}},props:{value:{type:[Number,String],default:0},label:{type:String},labelHtml:{type:String},max:{type:[Number,String],default:null},precision:{type:[Number,String],default:null},variant:{type:String,default:function(){return Qt(I_,"variant")}},striped:{type:Boolean,default:null},animated:{type:Boolean,default:null},showProgress:{type:Boolean,default:null},showValue:{type:Boolean,default:null}},computed:{progressBarClasses:function(){return[this.computedVariant?"bg-".concat(this.computedVariant):"",this.computedStriped||this.computedAnimated?"progress-bar-striped":"",this.computedAnimated?"progress-bar-animated":""]},progressBarStyles:function(){return{width:this.computedValue/this.computedMax*100+"%"}},computedValue:function(){return oe(this.value,0)},computedMax:function(){var t=oe(this.max)||oe(this.bvProgress.max,0);return t>0?t:100},computedPrecision:function(){return In(ie(this.precision,ie(this.bvProgress.precision,0)),0)},computedProgress:function(){var t=this.computedPrecision,e=zn(10,t);return ae(100*e*this.computedValue/this.computedMax/e,t)},computedVariant:function(){return this.variant||this.bvProgress.variant},computedStriped:function(){return pt(this.striped)?this.striped:this.bvProgress.striped||!1},computedAnimated:function(){return pt(this.animated)?this.animated:this.bvProgress.animated||!1},computedShowProgress:function(){return pt(this.showProgress)?this.showProgress:this.bvProgress.showProgress||!1},computedShowValue:function(){return pt(this.showValue)?this.showValue:this.bvProgress.showValue||!1}},render:function(t){var e=this.label,n=this.labelHtml,r=this.computedValue,i=this.computedPrecision,o=t(),a={};return this.hasNormalizedSlot("default")?o=this.normalizeSlot("default"):e||n?a=ao(n,e):this.computedShowProgress?o=this.computedProgress:this.computedShowValue&&(o=ae(r,i)),t("div",{staticClass:"progress-bar",class:this.progressBarClasses,style:this.progressBarStyles,attrs:{role:"progressbar","aria-valuemin":"0","aria-valuemax":ge(this.computedMax),"aria-valuenow":ae(r,i)},domProps:a},[o])}}),D_="BProgress",B_=i.extend({name:D_,mixins:[_n],provide:function(){return{bvProgress:this}},props:{variant:{type:String,default:function(){return Qt(D_,"variant")}},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1},height:{type:String},precision:{type:[Number,String],default:0},showProgress:{type:Boolean,default:!1},showValue:{type:Boolean,default:!1},max:{type:[Number,String],default:100},value:{type:[Number,String],default:0}},computed:{progressHeight:function(){return{height:this.height||null}}},render:function(t){var e=this.normalizeSlot("default");return e||(e=t(M_,{props:{value:this.value,max:this.max,precision:this.precision,variant:this.variant,animated:this.animated,striped:this.striped,showProgress:this.showProgress,showValue:this.showValue}})),t("div",{class:["progress"],style:this.progressHeight},[e])}}),z_=Vt({components:{BProgress:B_,BProgressBar:M_}});function L_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function R_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?L_(Object(n),!0).forEach(function(e){j_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function j_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var F_="BSidebar",N_="b-sidebar",$_=function(t,e){var n=e.normalizeSlot("title",e.slotScope)||ge(e.title)||null;return n?t("strong",{attrs:{id:e.safeId("__title__")}},[n]):t("span")},V_=function(t,e){if(e.noHeaderClose)return t();var n=e.closeLabel,r=e.textVariant,i=e.hide;return t(wn,{ref:"close-button",props:{ariaLabel:n,textVariant:r},on:{click:i}},[e.normalizeSlot("header-close")||t(Pi)])},U_=function(t,e){if(e.noHeader)return t();var n=$_(t,e),r=V_(t,e);return t("header",{key:"header",staticClass:"".concat(N_,"-header"),class:e.headerClass},e.right?[r,n]:[n,r])},G_=function(t,e){return t("div",{key:"body",staticClass:"".concat(N_,"-body"),class:e.bodyClass},[e.normalizeSlot("default",e.slotScope)])},H_=function(t,e){var n=e.normalizeSlot("footer",e.slotScope);return n?t("footer",{key:"footer",staticClass:"".concat(N_,"-footer"),class:e.footerClass},[n]):t()},q_=function(t,e){var n=U_(t,e);return e.lazy&&!e.isOpen?n:[n,G_(t,e),H_(t,e)]},W_=function(t,e){if(!e.backdrop)return t();var n=e.backdropVariant;return t("div",{directives:[{name:"show",value:e.localShow}],staticClass:"b-sidebar-backdrop",class:j_({},"bg-".concat(n),!!n),on:{click:e.onBackdropClick}})},Z_=i.extend({name:F_,mixins:[wr,la,Cl,_n],inheritAttrs:!1,model:{prop:"visible",event:"change"},props:{title:{type:String},right:{type:Boolean,default:!1},bgVariant:{type:String,default:function(){return Qt(F_,"bgVariant")}},textVariant:{type:String,default:function(){return Qt(F_,"textVariant")}},shadow:{type:[Boolean,String],default:function(){return Qt(F_,"shadow")}},width:{type:String,default:function(){return Qt(F_,"width")}},zIndex:{type:[Number,String]},ariaLabel:{type:String},ariaLabelledby:{type:String},closeLabel:{type:String},tag:{type:String,default:function(){return Qt(F_,"tag")}},sidebarClass:{type:[String,Array,Object]},headerClass:{type:[String,Array,Object]},bodyClass:{type:[String,Array,Object]},footerClass:{type:[String,Array,Object]},backdrop:{type:Boolean,default:!1},backdropVariant:{type:String,default:function(){return Qt(F_,"backdropVariant")}},noSlide:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noHeaderClose:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnRouteChange:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},data:function(){return{localShow:!!this.visible,isOpen:!!this.visible}},computed:{transitionProps:function(){return this.noSlide?{css:!0}:{css:!0,enterClass:"",enterActiveClass:"slide",enterToClass:"show",leaveClass:"show",leaveActiveClass:"slide",leaveToClass:""}},slotScope:function(){return{visible:this.localShow,right:this.right,hide:this.hide}},computedTile:function(){return this.normalizeSlot("title",this.slotScope)||ge(this.title)||null},titleId:function(){return this.computedTile?this.safeId("__title__"):null},computedAttrs:function(){return R_(R_({},this.bvAttrs),{},{id:this.safeId(),tabindex:"-1",role:"dialog","aria-modal":this.backdrop?"true":"false","aria-hidden":this.localShow?null:"true","aria-label":this.ariaLabel||null,"aria-labelledby":this.ariaLabelledby||this.titleId||null})}},watch:{visible:function(t,e){t!==e&&(this.localShow=t)},localShow:function(t,e){t!==e&&(this.emitState(t),this.$emit("change",t))},$route:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.noCloseOnRouteChange||t.fullPath===e.fullPath||this.hide()}},created:function(){this.$_returnFocusEl=null},mounted:function(){var t=this;this.listenOnRoot(Vl,this.handleToggle),this.listenOnRoot(Hl,this.handleSync),this.$nextTick(function(){t.emitState(t.localShow)})},activated:function(){this.emitSync()},beforeDestroy:function(){this.localShow=!1,this.$_returnFocusEl=null},methods:{hide:function(){this.localShow=!1},emitState:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.localShow;this.emitOnRoot(Ul,this.safeId(),t)},emitSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.localShow;this.emitOnRoot(Gl,this.safeId(),t)},handleToggle:function(t){t&&t===this.safeId()&&(this.localShow=!this.localShow)},handleSync:function(t){var e=this;t&&t===this.safeId()&&this.$nextTick(function(){e.emitSync(e.localShow)})},onKeydown:function(t){var e=t.keyCode;!this.noCloseOnEsc&&e===gr.ESC&&this.localShow&&this.hide()},onBackdropClick:function(){this.localShow&&!this.noCloseOnBackdrop&&this.hide()},onTopTrapFocus:function(){var t=tn(this.$refs.content);en(t.reverse()[0])},onBottomTrapFocus:function(){var t=tn(this.$refs.content);en(t[0])},onBeforeEnter:function(){this.$_returnFocusEl=Ae(V["j"]?[document.body]:[]),this.isOpen=!0},onAfterEnter:function(t){Ne(t,Ae())||en(t),this.$emit("shown")},onAfterLeave:function(){en(this.$_returnFocusEl),this.$_returnFocusEl=null,this.isOpen=!1,this.$emit("hidden")}},render:function(t){var e,n=this.localShow,r=""===this.shadow||this.shadow,i=t(this.tag,{ref:"content",directives:[{name:"show",value:n}],staticClass:N_,class:[(e={shadow:!0===r},j_(e,"shadow-".concat(r),r&&!0!==r),j_(e,"".concat(N_,"-right"),this.right),j_(e,"bg-".concat(this.bgVariant),!!this.bgVariant),j_(e,"text-".concat(this.textVariant),!!this.textVariant),e),this.sidebarClass],attrs:this.computedAttrs,style:{width:this.width}},[q_(t,this)]);i=t("transition",{props:this.transitionProps,on:{beforeEnter:this.onBeforeEnter,afterEnter:this.onAfterEnter,afterLeave:this.onAfterLeave}},[i]);var o=t(mn,{props:{noFade:this.noSlide}},[W_(t,this)]),a=t(),s=t();return this.backdrop&&this.localShow&&(a=t("div",{attrs:{tabindex:"0"},on:{focus:this.onTopTrapFocus}}),s=t("div",{attrs:{tabindex:"0"},on:{focus:this.onBottomTrapFocus}})),t("div",{staticClass:"b-sidebar-outer",style:{zIndex:this.zIndex},attrs:{tabindex:"-1"},on:{keydown:this.onKeydown}},[a,i,s,o])}}),X_=Vt({components:{BSidebar:Z_},plugins:{VBTogglePlugin:lc}}),Y_=Vt({components:{BSpinner:ty}}),K_={methods:{hasListener:function(t){var e=this.$listeners||{},n=this._events||{};return!ct(e[t])||a(n[t])&&n[t].length>0}}},J_=/_/g,Q_=/([a-z])([A-Z])/g,tv=/(\s|^)(\w)/g,ev=function(t){return t.replace(J_," ").replace(Q_,function(t,e,n){return e+" "+n}).replace(tv,function(t,e,n){return e+n.toUpperCase()})}
45,nv=ev,rv={_rowVariant:!0,_cellVariants:!0,_showDetails:!0},iv=["a","a *","button","button *","input:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])","textarea:not(.disabled):not([disabled])",'[role="link"]','[role="link"] *','[role="button"]','[role="button"] *',"[tabindex]:not(.disabled):not([disabled])"].join(","),ov=function(t,e){var n=null;return ft(e)?n={key:t,label:e}:dt(e)?n={key:t,formatter:e}:w(e)?(n=T(e),n.key=n.key||t):!1!==e&&(n={key:t}),n},av=function(t,e){var n=[];if(a(t)&&t.filter($).forEach(function(t){if(ft(t))n.push({key:t,label:nv(t)});else if(w(t)&&t.key&&ft(t.key))n.push(T(t));else if(w(t)&&1===v(t).length){var e=v(t)[0],r=ov(e,t[e]);r&&n.push(r)}}),0===n.length&&a(e)&&e.length>0){var r=e[0];v(r).forEach(function(t){rv[t]||n.push({key:t,label:nv(t)})})}var i={};return n.filter(function(t){return!i[t.key]&&(i[t.key]=!0,t.label=ft(t.label)?t.label:nv(t.key),!0)})},sv=av,lv={props:{items:{type:Array,default:function(){return[]}},fields:{type:Array,default:null},primaryKey:{type:String},value:{type:Array,default:function(){return[]}}},data:function(){return{localItems:a(this.items)?this.items.slice():[]}},computed:{computedFields:function(){return sv(this.fields,this.localItems)},computedFieldsObj:function(){var t=this.$parent;return this.computedFields.reduce(function(e,n){if(e[n.key]=T(n),n.formatter){var r=n.formatter;ft(r)&&dt(t[r])?r=t[r]:dt(r)||(r=void 0),e[n.key].formatter=r}return e},{})},computedItems:function(){return(this.paginatedItems||this.sortedItems||this.filteredItems||this.localItems||[]).slice()},context:function(){return{filter:this.localFilter,sortBy:this.localSortBy,sortDesc:this.localSortDesc,perPage:In(ie(this.perPage,0),0),currentPage:In(ie(this.currentPage,0),1),apiUrl:this.apiUrl}}},watch:{items:function(t){a(t)?this.localItems=t.slice():ht(t)&&(this.localItems=[])},computedItems:function(t,e){Io(t,e)||this.$emit("input",t)},context:function(t,e){Io(t,e)||this.$emit("context-changed",t)}},mounted:function(){this.$emit("input",this.computedItems)},methods:{getFieldFormatter:function(t){var e=this.computedFieldsObj[t];return e?e.formatter:void 0}}};function cv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var uv={props:{stacked:{type:[Boolean,String],default:!1}},computed:{isStacked:function(){return""===this.stacked||this.stacked},isStackedAlways:function(){return!0===this.isStacked},stackedTableClasses:function(){return cv({"b-table-stacked":this.isStackedAlways},"b-table-stacked-".concat(this.stacked),!this.isStackedAlways&&this.isStacked)}}},hv=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return v(t).reduce(function(i,o){if(!rv[o]&&!(e&&e.length>0&&s(e,o))&&(!(n&&n.length>0)||s(n,o))){var a=r[o]||{},l=t[o],c=a.filterByFormatted,u=dt(c)?c:c?a.formatter:null;i[o]=dt(u)?u(l,o,t):l}return i},{})},dv=hv,pv=function t(e){return ht(e)?"":w(e)&&!gt(e)?v(e).sort().filter(function(t){return!ht(t)}).map(function(n){return t(e[n])}).join(" "):ge(e)},fv=pv,mv=function(t,e,n,r){return w(t)?fv(dv(t,e,n,r)):""},gv=mv,yv='Prop "filter-debounce" is deprecated. Use the debounce feature of "<b-form-input>" instead.',_v=/[\s\uFEFF\xA0]+/g,vv={props:{filter:{type:[String,RegExp,Object,Array],default:null},filterFunction:{type:Function},filterIgnoredFields:{type:Array},filterIncludedFields:{type:Array},filterDebounce:{type:[Number,String],deprecated:yv,default:0,validator:function(t){return/^\d+/.test(String(t))}}},data:function(){return{isFiltered:!1,localFilter:this.filterSanitize(this.filter)}},computed:{computedFilterIgnored:function(){return this.filterIgnoredFields?l(this.filterIgnoredFields).filter($):null},computedFilterIncluded:function(){return this.filterIncludedFields?l(this.filterIncludedFields).filter($):null},computedFilterDebounce:function(){var t=ie(this.filterDebounce,0);return t>0&&Et(yv,"BTable"),t},localFiltering:function(){return!this.hasProvider||!!this.noProviderFiltering},filteredCheck:function(){return{filteredItems:this.filteredItems,localItems:this.localItems,localFilter:this.localFilter}},localFilterFn:function(){return dt(this.filterFunction)?this.filterFunction:null},filteredItems:function(){var t=this.localItems||[],e=this.localFilter,n=this.localFiltering?this.filterFnFactory(this.localFilterFn,e)||this.defaultFilterFnFactory(e):null;return n&&t.length>0?t.filter(n):t}},watch:{computedFilterDebounce:function(t){!t&&this.$_filterTimer&&(this.clearFilterTimer(),this.localFilter=this.filterSanitize(this.filter))},filter:{deep:!0,handler:function(t){var e=this,n=this.computedFilterDebounce;this.clearFilterTimer(),n&&n>0?this.$_filterTimer=setTimeout(function(){e.localFilter=e.filterSanitize(t)},n):this.localFilter=this.filterSanitize(t)}},filteredCheck:function(t){var e=t.filteredItems,n=t.localFilter,r=!1;n?Io(n,[])||Io(n,{})?r=!1:n&&(r=!0):r=!1,r&&this.$emit("filtered",e,e.length),this.isFiltered=r},isFiltered:function(t,e){!1===t&&!0===e&&this.$emit("filtered",this.localItems,this.localItems.length)}},created:function(){var t=this;this.$_filterTimer=null,this.$nextTick(function(){t.isFiltered=Boolean(t.localFilter)})},beforeDestroy:function(){this.clearFilterTimer()},methods:{clearFilterTimer:function(){clearTimeout(this.$_filterTimer),this.$_filterTimer=null},filterSanitize:function(t){return!this.localFiltering||this.localFilterFn||ft(t)||vt(t)?F(t):""},filterFnFactory:function(t,e){if(!t||!dt(t)||!e||Io(e,[])||Io(e,{}))return null;var n=function(n){return t(n,e)};return n},defaultFilterFnFactory:function(t){var e=this;if(!t||!ft(t)&&!vt(t))return null;var n=t;if(ft(n)){var r=me(t).replace(_v,"\\s+");n=new RegExp(".*".concat(r,".*"),"i")}var i=function(t){return n.lastIndex=0,n.test(gv(t,e.computedFilterIgnored,e.computedFilterIncluded,e.computedFieldsObj))};return i}}},bv=function(t,e){return t.map(function(t,e){return[e,t]}).sort(function(t,e){return this(t[1],e[1])||t[0]-e[0]}.bind(e)).map(function(t){return t[1]})},xv=bv,wv=function(t,e,n,r,i,o,a,s){var l=Tt(t,n,null),c=Tt(e,n,null);return dt(i)&&(l=i(l,n,t),c=i(c,n,e)),l=ht(l)?"":l,c=ht(c)?"":c,gt(l)&&gt(c)||mt(l)&&mt(c)?l<c?-1:l>c?1:0:s&&""===l&&""!==c?1:s&&""!==l&&""===c?-1:fv(l).localeCompare(fv(c),a,o)},Sv=wv;function Tv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ev(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Tv(Object(n),!0).forEach(function(e){Cv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tv(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Cv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ov={props:{sortBy:{type:String,default:""},sortDesc:{type:Boolean,default:!1},sortDirection:{type:String,default:"asc",validator:function(t){return s(["asc","desc","last"],t)}},sortCompare:{type:Function},sortCompareOptions:{type:Object,default:function(){return{numeric:!0}}},sortCompareLocale:{type:[String,Array]},sortNullLast:{type:Boolean,default:!1},noSortReset:{type:Boolean,default:!1},labelSortAsc:{type:String,default:"Click to sort Ascending"},labelSortDesc:{type:String,default:"Click to sort Descending"},labelSortClear:{type:String,default:"Click to clear sorting"},noLocalSorting:{type:Boolean,default:!1},noFooterSorting:{type:Boolean,default:!1},sortIconLeft:{type:Boolean,default:!1}},data:function(){return{localSortBy:this.sortBy||"",localSortDesc:this.sortDesc||!1}},computed:{localSorting:function(){return this.hasProvider?!!this.noProviderSorting:!this.noLocalSorting},isSortable:function(){return this.computedFields.some(function(t){return t.sortable})},sortedItems:function(){var t=(this.filteredItems||this.localItems||[]).slice(),e=this.localSortBy,n=this.localSortDesc,r=this.sortCompare,i=this.localSorting,o=Ev(Ev({},this.sortCompareOptions),{},{usage:"sort"}),a=this.sortCompareLocale||void 0,s=this.sortNullLast;if(e&&i){var l=this.computedFieldsObj[e]||{},c=l.sortByFormatted,u=dt(c)?c:c?this.getFieldFormatter(e):void 0;return xv(t,function(t,i){var l=null;return dt(r)&&(l=r(t,i,e,n,u,o,a)),(ht(l)||!1===l)&&(l=Sv(t,i,e,n,u,o,a,s)),(l||0)*(n?-1:1)})}return t}},watch:{isSortable:function(t){t?this.isSortable&&this.$on("head-clicked",this.handleSort):this.$off("head-clicked",this.handleSort)},sortDesc:function(t){t!==this.localSortDesc&&(this.localSortDesc=t||!1)},sortBy:function(t){t!==this.localSortBy&&(this.localSortBy=t||"")},localSortDesc:function(t,e){t!==e&&this.$emit("update:sortDesc",t)},localSortBy:function(t,e){t!==e&&this.$emit("update:sortBy",t)}},created:function(){this.isSortable&&this.$on("head-clicked",this.handleSort)},methods:{handleSort:function(t,e,n,r){var i=this;if(this.isSortable&&(!r||!this.noFooterSorting)){var o=!1,a=function(){var t=e.sortDirection||i.sortDirection;"asc"===t?i.localSortDesc=!1:"desc"===t&&(i.localSortDesc=!0)};e.sortable?(t===this.localSortBy?this.localSortDesc=!this.localSortDesc:(this.localSortBy=t,a()),o=!0):this.localSortBy&&!this.noSortReset&&(this.localSortBy="",a(),o=!0),o&&this.$emit("sort-changed",this.context)}},sortTheadThClasses:function(t,e,n){return{"b-table-sort-icon-left":e.sortable&&this.sortIconLeft&&!(n&&this.noFooterSorting)}},sortTheadThAttrs:function(t,e,n){if(!this.isSortable||n&&this.noFooterSorting)return{};var r=e.sortable,i=r&&this.localSortBy===t?this.localSortDesc?"descending":"ascending":r?"none":null;return{"aria-sort":i}},sortTheadThLabel:function(t,e,n){if(!this.isSortable||n&&this.noFooterSorting)return null;var r=e.sortable,i="";if(r)if(this.localSortBy===t)i=this.localSortDesc?this.labelSortAsc:this.labelSortDesc;else{i=this.localSortDesc?this.labelSortDesc:this.labelSortAsc;var o=this.sortDirection||e.sortDirection;"asc"===o?i=this.labelSortAsc:"desc"===o&&(i=this.labelSortDesc)}else this.noSortReset||(i=this.localSortBy?this.labelSortClear:"");return _e(i)||null}}},Pv={props:{perPage:{type:[Number,String],default:0},currentPage:{type:[Number,String],default:1}},computed:{localPaging:function(){return!this.hasProvider||!!this.noProviderPaging},paginatedItems:function(){var t=this.sortedItems||this.filteredItems||this.localItems||[],e=In(ie(this.currentPage,1),1),n=In(ie(this.perPage,0),0);return this.localPaging&&n&&(t=t.slice((e-1)*n,e*n)),t}}},kv={props:{caption:{type:String},captionHtml:{type:String}},computed:{captionId:function(){return this.isStacked?this.safeId("_caption_"):null}},methods:{renderCaption:function(){var t=this.caption,e=this.captionHtml,n=this.$createElement,r=n(),i=this.hasNormalizedSlot("table-caption");return(i||t||e)&&(r=n("caption",{key:"caption",attrs:{id:this.captionId},domProps:i?{}:ao(e,t)},this.normalizeSlot("table-caption"))),r}}},Av={methods:{renderColgroup:function(){var t=this.$createElement,e=this.computedFields,n=t();return this.hasNormalizedSlot("table-colgroup")&&(n=t("colgroup",{key:"c
45olgroup"},[this.normalizeSlot("table-colgroup",{columns:e.length,fields:e})])),n}}},Iv=["TD","TH","TR"],Mv=function(t){if(!t||!t.target)return!1;var e=t.target;if(e.disabled||-1!==Iv.indexOf(e.tagName))return!1;if(Fe(".dropdown-menu",e))return!0;var n="LABEL"===e.tagName?e:Fe("label",e);if(n){var r=We(n,"for"),i=r?$e(r):Re("input, select, textarea",n);if(i&&!i.disabled)return!0}return je(e,iv)},Dv=Mv,Bv=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=Ke();return!!(e&&""!==e.toString().trim()&&e.containsNode&&ke(t))&&e.containsNode(t,!0)},zv=Bv;function Lv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Rv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lv(Object(n),!0).forEach(function(e){jv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lv(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fv={headVariant:{type:String,default:null}},Nv=i.extend({name:"BThead",mixins:[wr,Sr,_n],inheritAttrs:!1,provide:function(){return{bvTableRowGroup:this}},inject:{bvTable:{default:function(){return{}}}},props:Fv,computed:{isThead:function(){return!0},isDark:function(){return this.bvTable.dark},isStacked:function(){return this.bvTable.isStacked},isResponsive:function(){return this.bvTable.isResponsive},isStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},hasStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},tableVariant:function(){return this.bvTable.tableVariant},theadClasses:function(){return[this.headVariant?"thead-".concat(this.headVariant):null]},theadAttrs:function(){return Rv({role:"rowgroup"},this.bvAttrs)}},render:function(t){return t("thead",{class:this.theadClasses,attrs:this.theadAttrs,on:this.bvListeners},this.normalizeSlot("default"))}});function $v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Vv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$v(Object(n),!0).forEach(function(e){Uv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$v(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Uv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gv={footVariant:{type:String,default:null}},Hv=i.extend({name:"BTfoot",mixins:[wr,Sr,_n],inheritAttrs:!1,provide:function(){return{bvTableRowGroup:this}},inject:{bvTable:{default:function(){return{}}}},props:Gv,computed:{isTfoot:function(){return!0},isDark:function(){return this.bvTable.dark},isStacked:function(){return this.bvTable.isStacked},isResponsive:function(){return this.bvTable.isResponsive},isStickyHeader:function(){return!1},hasStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},tableVariant:function(){return this.bvTable.tableVariant},tfootClasses:function(){return[this.footVariant?"thead-".concat(this.footVariant):null]},tfootAttrs:function(){return Vv({role:"rowgroup"},this.bvAttrs)}},render:function(t){return t("tfoot",{class:this.tfootClasses,attrs:this.tfootAttrs,on:this.bvListeners},this.normalizeSlot("default"))}});function qv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Wv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?qv(Object(n),!0).forEach(function(e){Zv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xv={variant:{type:String,default:null}},Yv="light",Kv="dark",Jv=i.extend({name:"BTr",mixins:[wr,Sr,_n],inheritAttrs:!1,provide:function(){return{bvTableTr:this}},inject:{bvTableRowGroup:{default:function(){return{}}}},props:Xv,computed:{inTbody:function(){return this.bvTableRowGroup.isTbody},inThead:function(){return this.bvTableRowGroup.isThead},inTfoot:function(){return this.bvTableRowGroup.isTfoot},isDark:function(){return this.bvTableRowGroup.isDark},isStacked:function(){return this.bvTableRowGroup.isStacked},isResponsive:function(){return this.bvTableRowGroup.isResponsive},isStickyHeader:function(){return this.bvTableRowGroup.isStickyHeader},hasStickyHeader:function(){return!this.isStacked&&this.bvTableRowGroup.hasStickyHeader},tableVariant:function(){return this.bvTableRowGroup.tableVariant},headVariant:function(){return this.inThead?this.bvTableRowGroup.headVariant:null},footVariant:function(){return this.inTfoot?this.bvTableRowGroup.footVariant:null},isRowDark:function(){return this.headVariant!==Yv&&this.footVariant!==Yv&&(this.headVariant===Kv||this.footVariant===Kv||this.isDark)},trClasses:function(){return[this.variant?"".concat(this.isRowDark?"bg":"table","-").concat(this.variant):null]},trAttrs:function(){return Wv({role:"row"},this.bvAttrs)}},render:function(t){return t("tr",{class:this.trClasses,attrs:this.trAttrs,on:this.bvListeners},this.normalizeSlot("default"))}});function Qv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qv(Object(n),!0).forEach(function(e){eb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qv(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function eb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nb=function(t){return t=ie(t,0),t>0?t:null},rb=function(t){return ht(t)||nb(t)>0},ib={variant:{type:String,default:null},colspan:{type:[Number,String],default:null,validator:rb},rowspan:{type:[Number,String],default:null,validator:rb},stackedHeading:{type:String,default:null},stickyColumn:{type:Boolean,default:!1}},ob=i.extend({name:"BTableCell",mixins:[wr,Sr,_n],inheritAttrs:!1,inject:{bvTableTr:{default:function(){return{}}}},props:ib,computed:{tag:function(){return"td"},inTbody:function(){return this.bvTableTr.inTbody},inThead:function(){return this.bvTableTr.inThead},inTfoot:function(){return this.bvTableTr.inTfoot},isDark:function(){return this.bvTableTr.isDark},isStacked:function(){return this.bvTableTr.isStacked},isStackedCell:function(){return this.inTbody&&this.isStacked},isResponsive:function(){return this.bvTableTr.isResponsive},isStickyHeader:function(){return this.bvTableTr.isStickyHeader},hasStickyHeader:function(){return this.bvTableTr.hasStickyHeader},isStickyColumn:function(){return!this.isStacked&&(this.isResponsive||this.hasStickyHeader)&&this.stickyColumn},rowVariant:function(){return this.bvTableTr.variant},headVariant:function(){return this.bvTableTr.headVariant},footVariant:function(){return this.bvTableTr.footVariant},tableVariant:function(){return this.bvTableTr.tableVariant},computedColspan:function(){return nb(this.colspan)},computedRowspan:function(){return nb(this.rowspan)},cellClasses:function(){var t=this.variant;return(!t&&this.isStickyHeader&&!this.headVariant||!t&&this.isStickyColumn&&this.inTfoot&&!this.footVariant||!t&&this.isStickyColumn&&this.inThead&&!this.headVariant||!t&&this.isStickyColumn&&this.inTbody)&&(t=this.rowVariant||this.tableVariant||"b-table-default"),[t?"".concat(this.isDark?"bg"
45:"table","-").concat(t):null,this.isStickyColumn?"b-table-sticky-column":null]},cellAttrs:function(){var t=this.inThead||this.inTfoot,e=this.computedColspan,n=this.computedRowspan,r="cell",i=null;return t?(r="columnheader",i=e>0?"colspan":"col"):Ie(this.tag,"th")&&(r="rowheader",i=n>0?"rowgroup":"row"),tb(tb({colspan:e,rowspan:n,role:r,scope:i},this.bvAttrs),{},{"data-label":this.isStackedCell&&!ht(this.stackedHeading)?ge(this.stackedHeading):null})}},render:function(t){var e=[this.normalizeSlot("default")];return t(this.tag,{class:this.cellClasses,attrs:this.cellAttrs,on:this.bvListeners},[this.isStackedCell?t("div",[e]):e])}}),ab=i.extend({name:"BTh",extends:ob,computed:{tag:function(){return"th"}}});function sb(t){return hb(t)||ub(t)||cb(t)||lb()}function lb(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cb(t,e){if(t){if("string"===typeof t)return db(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?db(t,e):void 0}}function ub(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function hb(t){if(Array.isArray(t))return db(t)}function db(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function fb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pb(Object(n),!0).forEach(function(e){mb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gb={props:{headVariant:{type:String,default:function(){return Qt("BTable","headVariant")}},headRowVariant:{type:String},theadClass:{type:[String,Array,Object]},theadTrClass:{type:[String,Array,Object]}},methods:{fieldClasses:function(t){return[t.class?t.class:"",t.thClass?t.thClass:""]},headClicked:function(t,e,n){this.stopIfBusy&&this.stopIfBusy(t)||Dv(t)||zv(this.$el)||(t.stopPropagation(),t.preventDefault(),this.$emit("head-clicked",e.key,e,t,n))},renderThead:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.$createElement,r=this.computedFields||[];if(this.isStackedAlways||0===r.length)return n();var i=this.isSortable,o=this.isSelectable,a=this.headVariant,s=this.footVariant,l=this.headRowVariant,c=this.footRowVariant,u=i||this.hasListener("head-clicked"),h=o?this.selectAllRows:Hs,d=o?this.clearSelected:Hs,p=function(r,o){var a=r.label,s=r.labelHtml,l=r.variant,c=r.stickyColumn,p=r.key,f=null;r.label.trim()||r.headerTitle||(f=nv(r.key));var m={};u&&(m.click=function(n){t.headClicked(n,r,e)},m.keydown=function(n){var i=n.keyCode;i!==gr.ENTER&&i!==gr.SPACE||t.headClicked(n,r,e)});var g=i?t.sortTheadThAttrs(p,r,e):{},y=i?t.sortTheadThClasses(p,r,e):null,_=i?t.sortTheadThLabel(p,r,e):null,v={class:[t.fieldClasses(r),y],props:{variant:l,stickyColumn:c},style:r.thStyle||{},attrs:fb(fb({tabindex:u?"0":null,abbr:r.headerAbbr||null,title:r.headerTitle||null,"aria-colindex":o+1,"aria-label":f},t.getThValues(null,p,r.thAttr,e?"foot":"head",{})),g),on:m,key:p},b=["head(".concat(p,")"),"head(".concat(p.toLowerCase(),")"),"head()"];e&&(b=["foot(".concat(p,")"),"foot(".concat(p.toLowerCase(),")"),"foot()"].concat(sb(b)));var x={label:a,column:p,field:r,isFoot:e,selectAllRows:h,clearSelected:d},w=t.normalizeSlot(b,x)||n("div",{domProps:ao(s,a)}),S=_?n("span",{staticClass:"sr-only"}," (".concat(_,")")):null;return n(ab,v,[w,S].filter($))},f=r.map(p).filter($),m=[];if(e)m.push(n(Jv,{class:this.tfootTrClass,props:{variant:ht(c)?l:c}},f));else{var g={columns:r.length,fields:r,selectAllRows:h,clearSelected:d};m.push(this.normalizeSlot("thead-top",g)||n()),m.push(n(Jv,{class:this.theadTrClass,props:{variant:l}},f))}return n(e?Hv:Nv,{key:e?"bv-tfoot":"bv-thead",class:(e?this.tfootClass:this.theadClass)||null,props:e?{footVariant:s||a||null}:{headVariant:a||null}},m)}}},yb={props:{footClone:{type:Boolean,default:!1},footVariant:{type:String,default:function(){return Qt("BTable","footVariant")}},footRowVariant:{type:String},tfootClass:{type:[String,Array,Object]},tfootTrClass:{type:[String,Array,Object]}},methods:{renderTFootCustom:function(){var t=this.$createElement;return this.hasNormalizedSlot("custom-foot")?t(Hv,{key:"bv-tfoot-custom",class:this.tfootClass||null,props:{footVariant:this.footVariant||this.headVariant||null}},this.normalizeSlot("custom-foot",{items:this.computedItems.slice(),fields:this.computedFields.slice(),columns:this.computedFields.length})):t()},renderTfoot:function(){return this.footClone?this.renderThead(!0):this.renderTFootCustom()}}};function _b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function vb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?_b(Object(n),!0).forEach(function(e){bb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function bb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xb={tbodyTransitionProps:{type:Object},tbodyTransitionHandlers:{type:Object}},wb=i.extend({name:"BTbody",mixins:[wr,Sr,_n],inheritAttrs:!1,provide:function(){return{bvTableRowGroup:this}},inject:{bvTable:{default:function(){return{}}}},props:xb,computed:{isTbody:function(){return!0},isDark:function(){return this.bvTable.dark},isStacked:function(){return this.bvTable.isStacked},isResponsive:function(){return this.bvTable.isResponsive},isStickyHeader:function(){return!1},hasStickyHeader:function(){return!this.isStacked&&this.bvTable.stickyHeader},tableVariant:function(){return this.bvTable.tableVariant},isTransitionGroup:function(){return this.tbodyTransitionProps||this.tbodyTransitionHandlers},tbodyAttrs:function(){return vb({role:"rowgroup"},this.bvAttrs)},tbodyProps:function(){return this.tbodyTransitionProps?vb(vb({},this.tbodyTransitionProps),{},{tag:"tbody"}):{}}},render:function(t){var e={props:this.tbodyProps,attrs:this.tbodyAttrs};return this.isTransitionGroup?(e.on=this.tbodyTransitionHandlers||{},e.nativeOn=this.bvListeners):e.on=this.bvListeners,t(this.isTransitionGroup?"transition-group":"tbody",e,this.normalizeSlot("default"))}});function Sb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Tb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sb(Object(n),!0).forEach(function(e){Eb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sb(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Eb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Cb="row-details",Ob={props:{tbodyTrClass:{type:[String,Array,Object,Function]},tbodyTrAttr:{type:[Object,Function]},detailsTdClass:{type:[String,Array,Object]}},methods:{getTdValues:function(t,e,n,r){var i=this.$parent;if(n){var o=Tt(t,e,"");return dt(n)?n(o,e,t):ft(n)&&dt(i[n])?i[n](o,e,t):n}return r},getThValues:function(t,e,n,r,i){var o=this.$parent;if(n){var a=Tt(t,e,"");return dt(n)?n(a,e,t,r):ft(n)&&dt(o[n])?o[n](a,e,t,r):n}return i},getFormattedValue:function(t,e){var n=e.key,r=this.getFieldFormatter(n),i=Tt(t,n,null);return dt(r)&&(i=r(i,n,t)),ht(i)?"":i},toggleDetailsFactory:function(t,e){var n=this;
45return function(){t&&n.$set(e,"_showDetails",!e._showDetails)}},rowHovered:function(t){this.tbodyRowEvtStopped(t)||this.emitTbodyRowEvent("row-hovered",t)},rowUnhovered:function(t){this.tbodyRowEvtStopped(t)||this.emitTbodyRowEvent("row-unhovered",t)},renderTbodyRowCell:function(t,e,n,r){var i=this,o=this.$createElement,a=this.hasNormalizedSlot(Cb),s=this.getFormattedValue(n,t),l=t.key,c=!this.isStacked&&(this.isResponsive||this.stickyHeader)&&t.stickyColumn,u=c?t.isRowHeader?ab:ob:t.isRowHeader?"th":"td",h=n._cellVariants&&n._cellVariants[l]?n._cellVariants[l]:t.variant||null,d={key:"row-".concat(r,"-cell-").concat(e,"-").concat(l),class:[t.class?t.class:"",this.getTdValues(n,l,t.tdClass,"")],props:{},attrs:Tb({"aria-colindex":String(e+1)},t.isRowHeader?this.getThValues(n,l,t.thAttr,"row",{}):this.getTdValues(n,l,t.tdAttr,{}))};c?d.props={stackedHeading:this.isStacked?t.label:null,stickyColumn:!0,variant:h}:(d.attrs["data-label"]=this.isStacked&&!ht(t.label)?ge(t.label):null,d.attrs.role=t.isRowHeader?"rowheader":"cell",d.attrs.scope=t.isRowHeader?"row":null,h&&d.class.push("".concat(this.dark?"bg":"table","-").concat(h)));var p={item:n,index:r,field:t,unformatted:Tt(n,l,""),value:s,toggleDetails:this.toggleDetailsFactory(a,n),detailsShowing:Boolean(n._showDetails)};this.supportsSelectableRows&&(p.rowSelected=this.isRowSelected(r),p.selectRow=function(){return i.selectRow(r)},p.unselectRow=function(){return i.unselectRow(r)});var f=this.$_bodyFieldSlotNameCache[l],m=f?this.normalizeSlot(f,p):ge(s);return this.isStacked&&(m=[o("div",[m])]),o(u,d,[m])},renderTbodyRow:function(t,e){var n=this,r=this.$createElement,i=this.computedFields,o=this.striped,a=this.hasNormalizedSlot(Cb),s=t._showDetail
45s&&a,l=this.$listeners["row-clicked"]||this.hasSelectableRowClick,c=[],u=s?this.safeId("_details_".concat(e,"_")):null,h=i.map(function(r,i){return n.renderTbodyRowCell(r,i,t,e)}),d=null;this.currentPage&&this.perPage&&this.perPage>0&&(d=String((this.currentPage-1)*this.perPage+e+1));var p=this.primaryKey,f=ge(Tt(t,p))||null,m=f||ge(e),g=f?this.safeId("_row_".concat(f)):null,y=this.selectableRowClasses?this.selectableRowClasses(e):{},_=this.selectableRowAttrs?this.selectableRowAttrs(e):{},v=dt(this.tbodyTrClass)?this.tbodyTrClass(t,"row"):this.tbodyTrClass,b=dt(this.tbodyTrAttr)?this.tbodyTrAttr(t,"row"):this.tbodyTrAttr;if(c.push(r(Jv,{key:"__b-table-row-".concat(m,"__"),ref:"itemRows",refInFor:!0,class:[v,y,s?"b-table-has-details":""],props:{variant:t._rowVariant||null},attrs:Tb(Tb({id:g},b),{},{tabindex:l?"0":null,"data-pk":f||null,"aria-details":u,"aria-owns":u,"aria-rowindex":d},_),on:{mouseenter:this.rowHovered,mouseleave:this.rowUnhovered}},h)),s){var x={item:t,index:e,fields:i,toggleDetails:this.toggleDetailsFactory(a,t)};this.supportsSelectableRows&&(x.rowSelected=this.isRowSelected(e),x.selectRow=function(){return n.selectRow(e)},x.unselectRow=function(){return n.unselectRow(e)});var w=r(ob,{props:{colspan:i.length},class:this.detailsTdClass},[this.normalizeSlot(Cb,x)]);o&&c.push(r("tr",{key:"__b-table-details-stripe__".concat(m),staticClass:"d-none",attrs:{"aria-hidden":"true",role:"presentation"}}));var S=dt(this.tbodyTrClass)?this.tbodyTrClass(t,Cb):this.tbodyTrClass,T=dt(this.tbodyTrAttr)?this.tbodyTrAttr(t,Cb):this.tbodyTrAttr;c.push(r(Jv,{key:"__b-table-details__".concat(m),staticClass:"b-table-details",class:[S],props:{variant:t._rowVariant||null},attrs:Tb(Tb({},T),{},{id:u,tabindex:"-1"})},[w]))}else a&&(c.push(r()),o&&c.push(r()));return c}}};function Pb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function kb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pb(Object(n),!0).forEach(function(e){Ab(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pb(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ab(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ib=kb(kb({},xb),{},{tbodyClass:{type:[String,Array,Object]}}),Mb={mixins:[Ob],props:Ib,beforeDestroy:function(){this.$_bodyFieldSlotNameCache=null},methods:{getTbodyTrs:function(){var t=this.$refs||{},e=t.tbody?t.tbody.$el||t.tbody:null,n=(t.itemRows||[]).map(function(t){return t.$el||t});return e&&e.children&&e.children.length>0&&n&&n.length>0?o(e.children).filter(function(t){return s(n,t)}):[]},getTbodyTrIndex:function(t){if(!ke(t))return-1;var e="TR"===t.tagName?t:Fe("tr",t,!0);return e?this.getTbodyTrs().indexOf(e):-1},emitTbodyRowEvent:function(t,e){if(t&&this.hasListener(t)&&e&&e.target){var n=this.getTbodyTrIndex(e.target);if(n>-1){var r=this.computedItems[n];this.$emit(t,r,n,e)}}},tbodyRowEvtStopped:function(t){return this.stopIfBusy&&this.stopIfBusy(t)},onTbodyRowKeydown:function(t){var e=t.target;if(!this.tbodyRowEvtStopped(t)&&"TR"===e.tagName&&Me(e)&&0===e.tabIndex){var n=t.keyCode;if(s([gr.ENTER,gr.SPACE],n))t.stopPropagation(),t.preventDefault(),this.onTBodyRowClicked(t);
45else if(s([gr.UP,gr.DOWN,gr.HOME,gr.END],n)){var r=this.getTbodyTrIndex(e);if(r>-1){t.stopPropagation(),t.preventDefault();var i=this.getTbodyTrs(),o=t.shiftKey;n===gr.HOME||o&&n===gr.UP?en(i[0]):n===gr.END||o&&n===gr.DOWN?en(i[i.length-1]):n===gr.UP&&r>0?en(i[r-1]):n===gr.DOWN&&r<i.length-1&&en(i[r+1])}}}},onTBodyRowClicked:function(t){this.tbodyRowEvtStopped(t)||Dv(t)||zv(this.$el)||this.emitTbodyRowEvent("row-clicked",t)},onTbodyRowMiddleMouseRowClicked:function(t){this.tbodyRowEvtStopped(t)||2!==t.which||this.emitTbodyRowEvent("row-middle-clicked",t)},onTbodyRowContextmenu:function(t){this.tbodyRowEvtStopped(t)||this.emitTbodyRowEvent("row-contextmenu",t)},onTbodyRowDblClicked:function(t){this.tbodyRowEvtStopped(t)||Dv(t)||this.emitTbodyRowEvent("row-dblclicked",t)},renderTbody:function(){var t=this,e=this.computedItems,n=this.$createElement,r=this.hasListener("row-clicked")||this.hasSelectableRowClick,i=[],o=this.renderBusy?this.renderBusy():null;if(o)i.push(o);else{var a={},s=this.hasNormalizedSlot("cell()")?"cell()":null;this.computedFields.forEach(function(e){var n=e.key,r="cell(".concat(n,")"),i="cell(".concat(n.toLowerCase(),")");a[n]=t.hasNormalizedSlot(r)?r:t.hasNormalizedSlot(i)?i:s}),this.$_bodyFieldSlotNameCache=a,i.push(this.renderTopRow?this.renderTopRow():n()),e.forEach(function(e,n){i.push(t.renderTbodyRow(e,n))}),i.push(this.renderEmpty?this.renderEmpty():n()),i.push(this.renderBottomRow?this.renderBottomRow():n())}var l={auxclick:this.onTbodyRowMiddleMouseRowClicked,contextmenu:this.onTbodyRowContextmenu,dblclick:this.onTbodyRowDblClicked};r&&(l.click=this.onTBodyRowClicked,l.keydown=this.onTbodyRowKeydown);var c=n(wb,{ref:"tbody",class:this.tbodyClass||null,props:{tbodyTransitionProps:this.tbodyTransitionProps,tbodyTransitionHandlers:this.tbodyTransitionHandlers},on:l},i);return c}}},Db={props:{showEmpty:{type:Boolean,default:!1},emptyText:{type:String,default:"There are no records to show"},emptyHtml:{type:String},emptyFilteredText:{type:String,default:"There are no records matching your request"},emptyFilteredHtml:{type:String}},methods:{renderEmpty:function(){var t=this.$createElement,e=this.computedItems,n=t();if(this.showEmpty&&(!e||0===e.length)&&(!this.computedBusy||!this.hasNormalizedSlot("table-busy"))){var r=this.isFiltered,i=this.emptyText,o=this.emptyHtml,a=this.emptyFilteredText,s=this.emptyFilteredHtml,l=this.computedFields,c=this.tbodyTrClass,u=this.tbodyTrAttr;n=this.normalizeSlot(this.isFiltered?"emptyfiltered":"empty",{emptyFilteredHtml:s,emptyFilteredText:a,emptyHtml:o,emptyText:i,fields:l,items:this.computedItems}),n||(n=t("div",{class:["text-center","my-2"],domProps:r?ao(s,a):ao(o,i)})),n=t(ob,{props:{colspan:l.length||null}},[t("div",{attrs:{role:"alert","aria-live":"polite"}},[n])]),n=t(Jv,{staticClass:"b-table-empty-row",class:[dt(c)?this.tbodyTrClass(null,"row-empty"):c],attrs:dt(u)?this.tbodyTrAttr(null,"row-empty"):u,key:r?"b-empty-filtered-row":"b-empty-row"},[n])}return n}}},Bb="top-row",zb={methods:{renderTopRow:function(){var t=this.$createElement;if(!this.hasNormalizedSlot(Bb)||!0===this.stacked||""===this.stacked)return t();var e=this.computedFields;return t(Jv,{key:"b-top-row",staticClass:"b-table-top-row",class:[dt(this.tbodyTrClass)?this.tbodyTrClass(null,"row-top"):this.tbodyTrClass],attrs:dt(this.tbodyTrAttr)?this.tbodyTrAttr(null,"row-top"):this.tbodyTrAttr},[this.normalizeSlot(Bb,{columns:e.length,fields:e})])}}},Lb="bottom-row",Rb={methods:{renderBottomRow:function(){var t=this.$createElement;if(!this.hasNormalizedSlot(Lb)||!0===this.stacked||""===this.stacked)return t();var e=this.computedFields;return t(Jv,{key:"b-bottom-row",staticClass:"b-table-bottom-row",class:[dt(this.tbodyTrClass)?this.tbodyTrClass(null,"row-bottom"):this.tbodyTrClass],attrs:dt(this.tbodyTrAttr)?this.tbodyTrAttr(null,"row-bottom"):this.tbodyTrAttr},this.normalizeSlot(Lb,{columns:e.length,fields:e}))}}},jb="table-busy",Fb={props:{busy:{type:Boolean,default:!1}},data:function(){return{localBusy:!1}},computed:{computedBusy:function(){return this.busy||this.localBusy}},watch:{localBusy:function(t,e){t!==e&&this.$emit("update:busy",t)}},methods:{stopIfBusy:function(t){return!!this.computedBusy&&(t.preventDefault(),t.stopPropagation(),!0)},renderBusy:function(){var t=this.$createElement;return this.computedBusy&&this.hasNormalizedSlot(jb)?t(Jv,{key:"table-busy-slot",staticClass:"b-table-busy-slot",class:[dt(this.tbodyTrClass)?this.tbodyTrClass(null,jb):this.tbodyTrClass],attrs:dt(this.tbodyTrAttr)?this.tbodyTrAttr(null,jb):this.tbodyTrAttr},[t(ob,{props:{colspan:this.computedFields.length||null}},[this.normalizeSlot(jb)])]):null}}};function Nb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $b={props:{selectable:{type:Boolean,default:!1},selectMode:{type:String,default:"multi",validator:function(t){return s(["range","multi","single"],t)}},selectedVariant:{type:String,default:function(){return Qt("BTable","selectedVariant")}},noSelectOnClick:{type:Boolean,default:!1}},data:function(){return{selectedRows:[],selectedLastRow:-1}},computed:{isSelectable:function(){return this.selectable&&this.selectMode},hasSelectableRowClick:function(){return this.isSelectable&&!this.noSelectOnClick},supportsSelectableRows:function(){return!0},selectableHasSelection:function(){return this.isSelectable&&this.selectedRows&&this.selectedRows.length>0&&this.selectedRows.some($)},selectableIsMultiSelect:function(){return this.isSelectable&&s(["range","multi"],this.selectMode)},selectableTableClasses:function(){var t;return t={"b-table-selectable":this.isSelectable},Nb(t,"b-table-select-".concat(this.selectMode),this.isSelectable),Nb(t,"b-table-selecting",this.selectableHasSelection),Nb(t,"b-table-selectable-no-click",this.isSelectable&&!this.hasSelectableRowClick),t},selectableTableAttrs:function(){return{"aria-multiselectable":this.isSelectable?this.selectableIsMultiSelect?"true":"false":null}}},watch:{computedItems:function(t,e){var n=!1;if(this.isSelectable&&this.selectedRows.length>0){n=a(t)&&a(e)&&t.length===e.length;for(var r=0;n&&r<t.length;r++)n=Io(dv(t[r]),dv(e[r]))}n||this.clearSelected()},selectable:function(t){this.clearSelected(),this.setSelectionHandlers(t)},selectMode:function(){this.clearSelected()},hasSelectableRowClick:function(t){this.clearSelected(),this.setSelectionHandlers(!t)},selectedRows:function(t,e){var n=this;if(this.isSelectable&&!Io(t,e)){var r=[];t.forEach(function(t,e){t&&r.push(n.computedItems[e])}),this.$emit("row-selected",r)}}},beforeMount:function(){this.isSelectable&&this.setSelectionHandlers(!0)},methods:{selectRow:function(t){if(this.isSelectable&&mt(t)&&t>=0&&t<this.computedItems.length&&!this.isRowSelected(t)){var e=this.selectableIsMultiSelect?this.selectedRows.slice():[];e[t]=!0,this.selectedLastClicked=-1,this.selectedRows=e}},unselectRow:function(t){if(this.isSelectable&&mt(t)&&this.isRowSelected(t)){var e=this.selectedRows.slice();e[t]=!1,this.selectedLastClicked=-1,this.selectedRows=e}},selectAllRows:function(){var t=this.computedItems.length;this.isSelectable&&t>0&&(this.selectedLastClicked=-1,this.selectedRows=this.selectableIsMultiSelect?ly(t).map(function(){return!0}):[!0])},isRowSelected:function(t){return!(!mt(t)||!this.selectedRows[t])},clearSelected:function(){this.selectedLastClicked=-1,this.selectedRows=[]},selectableRowClasses:function(t){if(this.isSelectable&&this.isRowSelected(t)){var e=this.selectedVariant;return Nb({"b-table-row-selected":!0}
45,"".concat(this.dark?"bg":"table","-").concat(e),e)}return{}},selectableRowAttrs:function(t){return{"aria-selected":this.isSelectable?this.isRowSelected(t)?"true":"false":null}},setSelectionHandlers:function(t){var e=t&&!this.noSelectOnClick?"$on":"$off";this[e]("row-clicked",this.selectionHandler),this[e]("filtered",this.clearSelected),this[e]("context-changed",this.clearSelected)},selectionHandler:function(t,e,n){if(this.isSelectable&&!this.noSelectOnClick){var r=this.selectMode,i=this.selectedRows.slice(),o=!i[e];if("single"===r)i=[];else if("range"===r)if(this.selectedLastRow>-1&&n.shiftKey){for(var a=An(this.selectedLastRow,e);a<=In(this.selectedLastRow,e);a++)i[a]=!0;o=!0}else n.ctrlKey||n.metaKey||(i=[],o=!0),this.selectedLastRow=o?e:-1;i[e]=o,this.selectedRows=i}else this.clearSelected()}}},Vb={mixins:[Cl],props:{items:{type:[Array,Function],default:function(){return[]}},noProviderPaging:{type:Boolean,default:!1},noProviderSorting:{type:Boolean,default:!1},noProviderFiltering:{type:Boolean,default:!1},apiUrl:{type:String,default:""}},computed:{hasProvider:function(){return dt(this.items)},providerTriggerContext:function(){var t={apiUrl:this.apiUrl,filter:null,sortBy:null,sortDesc:null,perPage:null,currentPage:null};return this.noProviderFiltering||(t.filter=this.localFilter),this.noProviderSorting||(t.sortBy=this.localSortBy,t.sortDesc=this.localSortDesc),this.noProviderPaging||(t.perPage=this.perPage,t.currentPage=this.currentPage),T(t)}},watch:{items:function(t){(this.hasProvider||dt(t))&&this.$nextTick(this._providerUpdate)},providerTriggerContext:function(t,e){Io(t,e)||this.$nextTick(this._providerUpdate)}},mounted:function(){var t=this;!this.hasProvider||this.localItems&&0!==this.localItems.length||this._providerUpdate(),this.listenOnRoot("bv::refresh::table",function(e){e!==t.id&&e!==t||t.refresh()})},methods:{refresh:function(){this.$off("refreshed",this.refresh),this.computedBusy?this.localBusy&&this.hasProvider&&this.$on("refreshed",this.refresh):(this.clearSelected(),this.hasProvider?this.$nextTick(this._providerUpdate):this.localItems=a(this.items)?this.items.slice():[])},_providerSetLocal:function(t){this.localItems=a(t)?t.slice():[],this.localBusy=!1,this.$emit("refreshed"),this.id&&this.emitOnRoot("bv::table::refreshed",this.id)},_providerUpdate:function(){var t=this;this.hasProvider&&(this.computedBusy?this.$nextTick(this.refresh):(this.localBusy=!0,this.$nextTick(function(){try{var e=t.items(t.context,t._providerSetLocal);bt(e)?e.then(function(e){t._providerSetLocal(e)}):a(e)?t._providerSetLocal(e):2!==t.items.length&&(Et("Provider function didn't request callback and did not return a promise or data.","BTable"),t.localBusy=!1)}catch(n){Et("Provider function error [".concat(n.name,"] ").concat(n.message,"."),"BTable"),t.localBusy=!1,t.$off("refreshed",t.refresh)}})))}}};function Ub(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ub(Object(n),!0).forEach(function(e){Hb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ub(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Hb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qb={inheritAttrs:!1,mixins:[wr],provide:function(){return{bvTable:this}},props:{striped:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},hover:{type:Boolean,default:!1},small:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1},responsive:{type:[Boolean,String],default:!1},stickyHeader:{type:[Boolean,String],default:!1},noBorderCollapse:{type:Boolean,default:!1},captionTop:{type:Boolean,default:!1},tableVariant:{type:String},tableClass:{type:[String,Array,Object]}},computed:{isResponsive:function(){var t=""===this.responsive||this.responsive;return!this.isStacked&&t},isStickyHeader:function(){var t=""===this.stickyHeader||this.stickyHeader;return!this.isStacked&&t},wrapperClasses:function(){return[this.isStickyHeader?"b-table-sticky-header":"",!0===this.isResponsive?"table-responsive":this.isResponsive?"table-responsive-".concat(this.responsive):""].filter($)},wrapperStyles:function(){return this.isStickyHeader&&!pt(this.isStickyHeader)?{maxHeight:this.isStickyHeader}:{}},tableClasses:function(){var t=this.isTableSimple?this.hover:this.hover&&this.computedItems.length>0&&!this.computedBusy;return[this.tableClass,{"table-striped":this.striped,"table-hover":t,"table-dark":this.dark,"table-bordered":this.bordered,"table-borderless":this.borderless,"table-sm":this.small,border:this.outlined,"b-table-fixed":this.fixed,"b-table-caption-top":this.captionTop,"b-table-no-border-collapse":this.noBorderCollapse}
45,this.tableVariant?"".concat(this.dark?"bg":"table","-").concat(this.tableVariant):"",this.stackedTableClasses,this.selectableTableClasses]},tableAttrs:function(){var t=[(this.bvAttrs||{})["aria-describedby"],this.captionId].filter($).join(" ")||null,e=this.computedItems,n=this.filteredItems,r=this.computedFields,i=this.selectableTableAttrs||{},o=this.isTableSimple?{}:{"aria-busy":this.computedBusy?"true":"false","aria-colcount":ge(r.length),"aria-describedby":t},a=e&&n&&n.length>e.length?ge(n.length):null;return Gb(Gb(Gb({"aria-rowcount":a},this.bvAttrs),{},{id:this.safeId(),role:"table"},o),i)}},render:function(t){var e=[];this.isTableSimple?e.push(this.normalizeSlot("default")):(e.push(this.renderCaption?this.renderCaption():null),e.push(this.renderColgroup?this.renderColgroup():null),e.push(this.renderThead?this.renderThead():null),e.push(this.renderTbody?this.renderTbody():null),e.push(this.renderTfoot?this.renderTfoot():null));var n=t("table",{key:"b-table",staticClass:"table b-table",class:this.tableClasses,attrs:this.tableAttrs},e.filter($));return this.wrapperClasses.length>0?t("div",{key:"wrap",class:this.wrapperClasses,style:this.wrapperStyles},[n]):n}},Wb=i.extend({name:"BTable",mixins:[wr,K_,la,_n,lv,qb,uv,gb,yb,Mb,uv,vv,Ov,Pv,kv,Av,$b,Db,zb,Rb,Fb,Vb]}),Zb=i.extend({name:"BTableLite",mixins:[K_,la,_n,lv,qb,uv,gb,yb,Mb,kv,Av]}),Xb=i.extend({name:"BTableSimple",mixins:[la,_n,qb,uv],computed:{isTableSimple:function(){return!0}}}),Yb=Vt({components:{BTableLite:Zb}}),Kb=Vt({components:{BTableSimple:Xb,BTbody:wb,BThead:Nv,BTfoot:Hv,BTr:Jv,BTd:ob,BTh:ab}}),Jb=Vt({components:{BTable:Wb},plugins:{TableLitePlugin:Yb,TableSimplePlugin:Kb}});function Qb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qb(Object(n),!0).forEach(function(e){ex(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qb(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ex(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nx=C(gg,["tabs","isNavBar","cardHeader"]),rx=function(t){return!t.disabled},ix=i.extend({name:"BTabButtonHelper",inject:{bvTabs:{default:function(){return{}}}},props:{tab:{default:null},tabs:{type:Array,default:function(){return[]}},id:{type:String,default:null},controls:{type:String,default:null},tabIndex:{type:Number,default:null},posInSet:{type:Number,default:null},setSize:{type:Number,default:null},noKeyNav:{type:Boolean,default:!1}},methods:{focus:function(){en(this.$refs.link)},handleEvt:function(t){var e=function(){t.preventDefault(),t.stopPropagation()};if(!this.tab.disabled){var n=t.type,r=t.keyCode,i=t.shiftKey;"click"===n?(e(),this.$emit("click",t)):"keydown"===n&&r===gr.SPACE?(e(),this.$emit("click",t)):"keydown"!==n||this.noKeyNav||(r===gr.UP||r===gr.LEFT||r===gr.HOME?(e(),i||r===gr.HOME?this.$emit("first",t):this.$emit("prev",t)):r!==gr.DOWN&&r!==gr.RIGHT&&r!==gr.END||(e(),i||r===gr.END?this.$emit("last",t):this.$emit("next",t)))}}},render:function(t){var e=t(Rr,{ref:"link",staticClass:"nav-link",class:[{active:this.tab.localActive&&!this.tab.disabled,disabled:this.tab.disabled},this.tab.titleLinkClass,this.tab.localActive?this.bvTabs.activeNavItemClass:null],props:{disabled:this.tab.disabled},attrs:tx(tx({},this.tab.titleLinkAttributes),{},{role:"tab",id:this.id,tabindex:this.tabIndex,"aria-selected":this.tab.localActive&&!this.tab.disabled?"true":"false","aria-setsize":this.setSize,"aria-posinset":this.posInSet,"aria-controls":this.controls}),on:{click:this.handleEvt,keydown:this.handleEvt}},[this.tab.normalizeSlot("title")||this.tab.title]);return t("li",{staticClass:"nav-item",class:[this.tab.titleItemClass],attrs:{role:"presentation"}},[e])}}),ox=i.extend({name:"BTabs",mixins:[la,_n],provide:function(){return{bvTabs:this}},model:{prop:"value",event:"input"},props:tx(tx({},nx),{},{tag:{type:String,default:"div"},card:{type:Boolean,default:!1},end:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noNavStyle:{type:Boolean,default:!1},noKeyNav:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},contentClass:{type:[String,Array,Object]},navClass:{type:[String,Array,Object]},navWrapperClass:{type:[String,Array,Object]},activeNavItemClass:{type:[String,Array,Object]},activeTabClass:{type:[String,Array,Object]},value:{type:Number,default:null}}),data:function(){return{currentTab:ie(this.value,-1),tabs:[],registeredTabs:[],isMounted:!1}},computed:{fade:function(){return!this.noFade},localNavClass:function(){var t=[];return this.card&&this.vertical&&t.push("card-header","h-100","border-bottom-0","rounded-0"),[].concat(t,[this.navClass])}},watch:{currentTab:function(t){var e=-1;
45this.tabs.forEach(function(n,r){t!==r||n.disabled?n.localActive=!1:(n.localActive=!0,e=r)}),this.$emit("input",e)},value:function(t,e){if(t!==e){t=ie(t,-1),e=ie(e,0);var n=this.tabs;n[t]&&!n[t].disabled?this.activateTab(n[t]):t<e?this.previousTab():this.nextTab()}},registeredTabs:function(){var t=this;this.$nextTick(function(){Ce(function(){t.updateTabs()})})},tabs:function(t,e){var n=this;Io(t.map(function(t){return t._uid}),e.map(function(t){return t._uid}))||this.$nextTick(function(){n.$emit("changed",t.slice(),e.slice())})},isMounted:function(t){var e=this;t&&Ce(function(){e.updateTabs()}),this.setObserver(t)}},created:function(){var t=this;this.$_observer=null,this.currentTab=ie(this.value,-1),this.$nextTick(function(){t.updateTabs()})},mounted:function(){var t=this;this.updateTabs(),this.$nextTick(function(){t.isMounted=!0})},deactivated:function(){this.isMounted=!1},activated:function(){var t=this;this.currentTab=ie(this.value,-1),this.$nextTick(function(){t.updateTabs(),t.isMounted=!0})},beforeDestroy:function(){this.isMounted=!1},destroyed:function(){this.tabs=[]},methods:{registerTab:function(t){var e=this;s(this.registeredTabs,t)||(this.registeredTabs.push(t),t.$once("hook:destroyed",function(){e.unregisterTab(t)}))},unregisterTab:function(t){this.registeredTabs=this.registeredTabs.slice().filter(function(e){return e!==t})},setObserver:function(t){if(this.$_observer&&this.$_observer.disconnect(),this.$_observer=null,t){var e=this,n=function(){e.$nextTick(function(){Ce(function(){e.updateTabs()})})};this.$_observer=Ys(this.$refs.tabsContainer,n,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["id"]})}},getTabs:function(){var t=this.registeredTabs.filter(function(t){return 0===t.$children.filter(function(t){return t._isTab}).length}),e=[];if(this.isMounted&&t.length>0){var n=t.map(function(t){return"#".concat(t.safeId())}).join(", ");e=Le(n,this.$el).map(function(t){return t.id}).filter($)}return xv(t,function(t,n){return e.indexOf(t.safeId())-e.indexOf(n.safeId())})},updateTabs:function(){var t=this.getTabs(),e=t.indexOf(t.slice().reverse().find(function(t){return t.localActive&&!t.disabled}));if(e<0){var n=this.currentTab;n>=t.length?e=t.indexOf(t.slice().reverse().find(rx)):t[n]&&!t[n].disabled&&(e=n)}e<0&&(e=t.indexOf(t.find(rx))),t.forEach(function(t){t.localActive=!1}),t[e]&&(t[e].localActive=!0),this.tabs=t,this.currentTab=e},getButtonForTab:function(t){return(this.$refs.buttons||[]).find(function(e){return e.tab===t})},updateButton:function(t){var e=this.getButtonForTab(t);e&&e.$forceUpdate&&e.$forceUpdate()},activateTab:function(t){var e=!1;if(t){var n=this.tabs.indexOf(t);if(!t.disabled&&n>-1&&n!==this.currentTab){var r=new fc("activate-tab",{cancelable:!0,vueTarget:this,componentId:this.safeId()});this.$emit(r.type,n,this.currentTab,r),r.defaultPrevented||(e=!0,this.currentTab=n)}}return e||this.currentTab===this.value||this.$emit("input",this.currentTab),e},deactivateTab:function(t){return!!t&&this.activateTab(this.tabs.filter(function(e){return e!==t}).find(rx))},focusButton:function(t){var e=this;this.$nextTick(function(){en(e.getButtonForTab(t))})},emitTabClick:function(t,e){yt(e)&&t&&t.$emit&&!t.disabled&&t.$emit("click",e)},clickTab:function(t,e){this.activateTab(t),this.emitTabClick(t,e)},firstTab:function(t){var e=this.tabs.find(rx);this.activateTab(e)&&t&&(this.focusButton(e),this.emitTabClick(e,t))},previousTab:function(t){var e=In(this.currentTab,0),n=this.tabs.slice(0,e).reverse().find(rx);this.activateTab(n)&&t&&(this.focusButton(n),this.emitTabClick(n,t))},nextTab:function(t){var e=In(this.currentTab,-1),n=this.tabs.slice(e+1).find(rx);this.activateTab(n)&&t&&(this.focusButton(n),this.emitTabClick(n,t))},lastTab:function(t){var e=this.tabs.slice().reverse().find(rx);this.activateTab(e)&&t&&(this.focusButton(e),this.emitTabClick(e,t))}},render:function(t){var e=this,n=this.tabs,r=n.find(function(t){return t.localActive&&!t.disabled}),i=n.find(function(t){return!t.disabled}),o=n.map(function(o,a){var s=null;return e.noKeyNav||(s=-1,(r===o||!r&&i===o)&&(s=null)),t(ix,{key:o._uid||a,ref:"buttons",refInFor:!0,props:{tab:o,tabs:n,id:o.controlledBy||(o.safeId?o.safeId("_BV_tab_button_"):null),controls:o.safeId?o.safeId():null,tabIndex:s,setSize:n.length,posInSet:a+1,noKeyNav:e.noKeyNav},on:{click:function(t){e.clickTab(o,t)},first:e.firstTab,prev:e.previousTab,next:e.nextTab,last:e.lastTab}})}),a=t(_g,{ref:"nav",class:this.localNavClass,attrs:{role:"tablist",id:this.safeId("_BV_tab_controls_")},props:{fill:this.fill,justified:this.justified,align:this.align,tabs:!this.noNavStyle&&!this.pills,pills:!this.noNavStyle&&this.pills,vertical:this.vertical,small:this.small,cardHeader:this.card&&!this.vertical}},[this.normalizeSlot("tabs-start")||t(),o,this.normalizeSlot("tabs-end")||t()]);a=t("div",{key:"bv-tabs-nav",class:[{"card-header":this.card&&!this.vertical&&!this.end,"card-footer":this.card&&!this.vertical&&this.end,"col-auto":this.vertical},this.navWrapperClass]},[a]);var s=t();n&&0!==n.length||(s=t("div",{key:"bv-empty-tab",class:["tab-pane","active",{"card-body":this.card}]},this.normalizeSlot("empty")));var c=t("div",{ref:"tabsContainer",key:"bv-tabs-container",staticClass:"tab-content",class:[{col:this.vertical},this.contentClass],attrs:{id:this.safeId("_BV_tab_container_")}},l(this.normalizeSlot("default"),s));return t(this.tag,{staticClass:"tabs",class:{row:this.vertical,"no-gutters":this.vertical&&this.card},attrs:{id:this.safeId()}},[this.end?c:t(),[a],this.end?t():c])}}),ax=i.extend({name:"BTab",mixins:[la,_n],inject:{bvTabs:{default:function(){return{}}}},props:{active:{type:Boolean,default:!1},tag:{type:String,default:"div"},buttonId:{type:String},title:{type:String,default:""},titleItemClass:{type:[String,Array,Object]},titleLinkClass:{type:[String,Array,Object]},titleLinkAttributes:{type:Object},disabled:{type:Boolean,default:!1},noBody:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},data:function(){return{localActive:this.active&&!this.disabled,show:!1}},computed:{tabClasses:function(){return[{active:this.localActive,disabled:this.disabled,"card-body":this.bvTabs.card&&!this.noBody},this.localActive?this.bvTabs.activeTabClass:null]},controlledBy:function(){return this.buttonId||this.safeId("__BV_tab_button__")},computedNoFade:function(){return!this.bvTabs.fade},computedLazy:function(){return this.bvTabs.lazy||this.lazy},_isTab:function(){return!0}},watch:{localActive:function(t){this.$emit("update:active",t)},active:function(t,e){t!==e&&(t?this.activate():this.deactivate()||this.$emit("update:active",this.localActive))},disabled:function(t,e){t!==e&&t&&this.localActive&&this.bvTabs.firstTab&&(this.localActive=!1,this.bvTabs.firstTab(
45))}},mounted:function(){this.registerTab(),this.show=this.localActive},updated:function(){this.hasNormalizedSlot("title")&&this.bvTabs.updateButton&&this.bvTabs.updateButton(this)},destroyed:function(){this.unregisterTab()},methods:{registerTab:function(){this.bvTabs.registerTab&&this.bvTabs.registerTab(this)},unregisterTab:function(){this.bvTabs.unregisterTab&&this.bvTabs.unregisterTab(this)},activate:function(){return!(!this.bvTabs.activateTab||this.disabled)&&this.bvTabs.activateTab(this)},deactivate:function(){return!(!this.bvTabs.deactivateTab||!this.localActive)&&this.bvTabs.deactivateTab(this)}},render:function(t){var e=t(this.tag,{ref:"panel",staticClass:"tab-pane",class:this.tabClasses,directives:[{name:"show",rawName:"v-show",value:this.localActive,expression:"localActive"}],attrs:{role:"tabpanel",id:this.safeId(),"aria-hidden":this.localActive?"false":"true","aria-labelledby":this.controlledBy||null}},[this.localActive||!this.computedLazy?this.normalizeSlot("default"):t()]);return t(mn,{props:{mode:"out-in",noFade:this.computedNoFade}},[e])}}),sx=Vt({components:{BTabs:ox,BTab:ax}}),lx=Vt({components:{BTime:Rp}}),cx=n("2b88"),ux="BToaster",hx={name:{type:String,required:!0},ariaLive:{type:String,default:function(){return Qt(ux,"ariaLive")}},ariaAtomic:{type:String,default:function(){return Qt(ux,"ariaAtomic")}},role:{type:String,default:function(){return Qt(ux,"role")}}},dx=i.extend({data:function(){return{name:"b-toaster"}},methods:{onAfterEnter:function(t){var e=this;Ce(function(){Ue(t,"".concat(e.name,"-enter-to"))})}},render:function(t){return t("transition-group",{props:{tag:"div",name:this.name},on:{afterEnter:this.onAfterEnter}},this.$slots.default)}}),px=i.extend({name:ux,props:hx,data:function(){return{doRender:!1,dead:!1,staticName:this.name}},beforeMount:function(){var t=this;this.staticName=this.name,cx["Wormhole"].hasTarget(this.staticName)?(Et('A "<portal-target>" with name "'.concat(this.name,'" already exists in the document.'),"BToaster"),this.dead=!0):(this.doRender=!0,this.$once("hook:beforeDestroy",function(){t.$root.$emit("bv::toaster::destroyed",t.staticName)}))},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},render:function(t){var e=t("div",{class:["d-none",{"b-dead-toaster":this.dead}]});if(this.doRender){var n=t(cx["PortalTarget"],{staticClass:"b-toaster-slot",props:{name:this.staticName,multiple:!0,tag:"div",slim:!1,transition:dx}});e=t("div",{staticClass:"b-toaster",class:[this.staticName],attrs:{id:this.staticName,role:this.role||null,"aria-live":this.ariaLive,"aria-atomic":this.ariaAtomic}},[n])}return e}});function fx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fx(Object(n),!0).forEach(function(e){gx(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fx(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function gx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yx="BToast",_x=1e3,vx=E(Lr,["href","to"]),bx=mx({id:{type:String},title:{type:String},toaster:{type:String,default:function(){return Qt(yx,"toaster")}},visible:{type:Boolean,default:!1},variant:{type:String,default:function(){return Qt(yx,"variant")}},isStatus:{type:Boolean,default:!1},appendToast:{type:Boolean,default:!1},noAutoHide:{type:Boolean,default:!1},autoHideDelay:{type:[Number,String],default:function(){return Qt(yx,"autoHideDelay")}},noCloseButton:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noHoverPause:{type:Boolean,default:!1},solid:{type:Boolean,default:!1},toastClass:{type:[String,Object,Array],default:function(){return Qt(yx,"toastClass")}},headerClass:{type:[String,Object,Array],default:function(){return Qt(yx,"headerClass")}},bodyClass:{type:[String,Object,Array],default:function(){return Qt(yx,"bodyClass")}},static:{type:Boolean,default:!1}},vx),xx=i.extend({name:yx,mixins:[wr,la,Cl,_n,cm],inheritAttrs:!1,model:{prop:"visible",event:"change"},props:bx,data:function(){return{isMounted:!1,doRender:!1,localShow:!1,isTransitioning:!1,isHiding:!1,order:0,timer:null,dismissStarted:0,resumeDismiss:0}},computed:{bToastClasses:function(){return gx({"b-toast-solid":this.solid,"b-toast-append":this.appendToast,"b-toast-prepend":!this.appendToast},"b-toast-".concat(this.variant),this.variant)},slotScope:function(){return{hide:this.hide}},computedDuration:function(){return In(ie(this.autoHideDelay,0),_x)},computedToaster:function(){return String(this.toaster)},transitionHandlers:function(){return{beforeEnter:this.onBeforeEnter,afterEnter:this.onAfterEnter,beforeLeave:this.onBeforeLeave,afterLeave:this.onAfterLeave}},computedAttrs:function(){return mx(mx({},this.bvAttrs),{},{id:this.safeId(),tabindex:"0"})}},watch:{visible:function(t){t?this.show():this.hide()},localShow:function(t){t!==this.visible&&this.$emit("change",t)},toaster:function(){this.$nextTick(this.ensureToaster)},static:function(t){t&&this.localShow&&this.ensureToaster()}},mounted:function(){var t=this;this.isMounted=!0,this.$nextTick(function(){t.visible&&Ce(function(){t.show()})}),this.listenOnRoot("bv::show::toast",function(e){e===t.safeId()&&t.show()}),this.listenOnRoot("bv::hide::toast",function(e){e&&e!==t.safeId()||t.hide()}),this.listenOnRoot("bv::toaster::destroyed",function(e){e===t.computedToaster&&t.hide()})}
45,beforeDestroy:function(){this.clearDismissTimer()},methods:{show:function(){var t=this;if(!this.localShow){this.ensureToaster();var e=this.buildEvent("show");this.emitEvent(e),this.dismissStarted=this.resumeDismiss=0,this.order=Date.now()*(this.appendToast?1:-1),this.isHiding=!1,this.doRender=!0,this.$nextTick(function(){Ce(function(){t.localShow=!0})})}},hide:function(){var t=this;if(this.localShow){var e=this.buildEvent("hide");this.emitEvent(e),this.setHoverHandler(!1),this.dismissStarted=this.resumeDismiss=0,this.clearDismissTimer(),this.isHiding=!0,Ce(function(){t.localShow=!1})}},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new fc(t,mx(mx({cancelable:!1,target:this.$el||null,relatedTarget:null},e),{},{vueTarget:this,componentId:this.safeId()}))},emitEvent:function(t){var e=t.type;this.emitOnRoot("bv::toast:".concat(e),t),this.$emit(e,t)},ensureToaster:function(){if(!this.static&&!cx["Wormhole"].hasTarget(this.computedToaster)){var t=document.createElement("div");document.body.appendChild(t);var e=new px({parent:this.$root,propsData:{name:this.computedToaster}});e.$mount(t)}},startDismissTimer:function(){this.clearDismissTimer(),this.noAutoHide||(this.timer=setTimeout(this.hide,this.resumeDismiss||this.computedDuration),this.dismissStarted=Date.now(),this.resumeDismiss=0)},clearDismissTimer:function(){clearTimeout(this.timer),this.timer=null},setHoverHandler:function(t){var e=this.$refs["b-toast"];nl(t,e,"mouseenter",this.onPause,Js),nl(t,e,"mouseleave",this.onUnPause,Js)},onPause:function(){if(!this.noAutoHide&&!this.noHoverPause&&this.timer&&!this.resumeDismiss){var t=Date.now()-this.dismissStarted;t>0&&(this.clearDismissTimer(),this.resumeDismiss=In(this.computedDuration-t,_x))}},onUnPause:function(){this.noAutoHide||this.noHoverPause||!this.resumeDismiss?this.resumeDismiss=this.dismissStarted=0:this.startDismissTimer()},onLinkClick:function(){var t=this;this.$nextTick(function(){Ce(function(){t.hide()})})},onBeforeEnter:function(){this.isTransitioning=!0},onAfterEnter:function(){this.isTransitioning=!1;var t=this.buildEvent("shown");this.emitEvent(t),this.startDismissTimer(),this.setHoverHandler(!0)},onBeforeLeave:function(){this.isTransitioning=!0},onAfterLeave:function(){this.isTransitioning=!1,this.order=0,this.resumeDismiss=this.dismissStarted=0;var t=this.buildEvent("hidden");this.emitEvent(t),this.doRender=!1},makeToast:function(t){var e=this,n=[],r=this.normalizeSlot("toast-title",this.slotScope);r?n.push(r):this.title&&n.push(t("strong",{staticClass:"mr-2"},this.title)),this.noCloseButton||n.push(t(wn,{staticClass:"ml-auto mb-1",on:{click:function(){e.hide()}}}));var i=t();n.length>0&&(i=t("header",{staticClass:"toast-header",class:this.headerClass},n));var o=ur(this),a=t(o?Rr:"div",{staticClass:"toast-body",class:this.bodyClass,props:o?Qn(vx,this):{},on:o?{click:this.onLinkClick}:{}},[this.normalizeSlot("default",this.slotScope)||t()]),s=t("div",{key:"toast-".concat(this._uid),ref:"toast",staticClass:"toast",class:this.toastClass,attrs:this.computedAttrs},[i,a]);return s}},render:function(t){if(!this.doRender||!this.isMounted)return t();var e="b-toast-".concat(this._uid),n=this.static?{}:this.scopedStyleAttrs;return t(cx["Portal"],{props:{name:e,to:this.computedToaster,order:this.order,slim:!0,disabled:this.static}},[t("div",{key:e,ref:"b-toast",staticClass:"b-toast",class:this.bToastClasses,attrs:mx(mx({},n),{},{id:this.safeId("_toast_outer"),role:this.isHiding?null:this.isStatus?"status":"alert","aria-live":this.isHiding?null:this.isStatus?"polite":"assertive","aria-atomic":this.isHiding?null:"true"})},[t(mn,{props:{noFade:this.noFade},on:this.transitionHandlers},[this.localShow?this.makeToast(t):t()])])])}});function wx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sx(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)}}function Tx(t,e,n){return e&&Sx(t.prototype,e),n&&Sx(t,n),t}function Ex(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Cx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
45e%2?Ex(Object(n),!0).forEach(function(e){Ox(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ox(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Px(t){return Mx(t)||Ix(t)||Ax(t)||kx()}function kx(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ax(t,e){if(t){if("string"===typeof t)return Dx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dx(t,e):void 0}}function Ix(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function Mx(t){if(Array.isArray(t))return Dx(t)}function Dx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Bx="$bvToast",zx="_bv__toast",Lx=["id"].concat(Px(v(C(bx,["static","visible"])))),Rx={toastContent:"default",title:"toast-title"},jx=function(t){return Lx.reduce(function(e,n){return ct(t[n])||(e[n]=t[n]),e},{})},Fx=function(t){var e=t.extend({name:"BToastPop",extends:xx,destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},mounted:function(){var t=this,e=function(){t.localShow=!1,t.doRender=!1,t.$nextTick(function(){t.$nextTick(function(){Ce(function(){t.$destroy()})})})};this.$parent.$once("hook:destroyed",e),this.$once("hidden",e),this.listenOnRoot("bv::toaster::destroyed",function(n){n===t.toaster&&e()})}}),n=function(t,n){if(!Ct(Bx)){var r=new e({parent:n,propsData:Cx(Cx(Cx({},jx(Qt("BToast")||{})),C(t,v(Rx))),{},{static:!1,visible:!0})});v(Rx).forEach(function(e){var i=t[e];ct(i)||("title"===e&&ft(i)&&(i=[n.$createElement("strong",{class:"mr-2"},i)]),r.$slots[Rx[e]]=l(i))});var i=document.createElement("div");document.body.appendChild(i),r.$mount(i)}},r=function(){function t(e){wx(this,t),p(this,{_vm:e,_root:e.$root}),m(this,{_vm:O(),_root:O()})}return Tx(t,[{key:"toast",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&!Ct(Bx)&&n(Cx(Cx({},jx(e)),{},{toastContent:t}),this._vm)}},{key:"show",value:function(t){t&&this._root.$emit("bv::show::toast",t)}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._root.$emit("bv::hide::toast",t)}}]),t}();t.mixin({beforeCreate:function(){this[zx]=new r(this)}}),b(t.prototype,Bx)||g(t.prototype,Bx,{get:function(){return this&&this[zx]||Et('"'.concat(Bx,'" must be accessed from a Vue instance "this" context.'),"BToast"),this[zx]}})},Nx=Vt({plugins:{plugin:Fx}}),$x=Vt({components:{BToast:xx,BToaster:px},plugins:{BVToastPlugin:Nx}});function Vx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ux(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vx(Object(n),!0).forEach(function(e){Gx(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vx(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Gx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hx="__BV_Tooltip__",qx="hover focus",Wx={focus:!0,hover:!0,click:!0,blur:!0,manual:!0},Zx=/^html$/i,Xx=/^noninteractive$/i,Yx=/^nofade$/i,Kx=/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/i,Jx=/^(window|viewport|scrollParent)$/i,Qx=/^d\d+$/i,tw=/^ds\d+$/i,ew=/^dh\d+$/i,nw=/^o-?\d+$/i,rw=/^v-.+$/i,iw=/\s+/,ow=function(t,e){var n="BTooltip",r={title:void 0,trigger:"",placement:"top",fallbackPlacement:"flip",container:!1,animation:!0,offset:0,id:null,html:!1,interactive:!0,disabled:!1,delay:Qt(n,"delay"),boundary:String(Qt(n,"boundary")),boundaryPadding:ie(Qt(n,"boundaryPadding"),0),variant:Qt(n,"variant"),customClass:Qt(n,"customClass")};if(ft(t.value)||mt(t.value)?r.title=t.value:dt(t.value)?r.title=t.value:S(t.value)&&(r=Ux(Ux({},r),t.value)),ct(r.title)){var i=e.data||{};r.title=i.attrs&&!ht(i.attrs.title)?i.attrs.title:void 0}S(r.delay)||(r.delay={show:ie(r.delay,0),hide:ie(r.delay,0)}
45),t.arg&&(r.container="#".concat(t.arg)),v(t.modifiers).forEach(function(t){if(Zx.test(t))r.html=!0;else if(Xx.test(t))r.interactive=!1;else if(Yx.test(t))r.animation=!1;else if(Kx.test(t))r.placement=t;else if(Jx.test(t))t="scrollparent"===t?"scrollParent":t,r.boundary=t;else if(Qx.test(t)){var e=ie(t.slice(1),0);r.delay.show=e,r.delay.hide=e}else tw.test(t)?r.delay.show=ie(t.slice(2),0):ew.test(t)?r.delay.hide=ie(t.slice(2),0):nw.test(t)?r.offset=ie(t.slice(1),0):rw.test(t)&&(r.variant=t.slice(2)||null)});var o={};return l(r.trigger||"").filter($).join(" ").trim().toLowerCase().split(iw).forEach(function(t){Wx[t]&&(o[t]=!0)}),v(t.modifiers).forEach(function(t){t=t.toLowerCase(),Wx[t]&&(o[t]=!0)}),r.trigger=v(o).join(" "),"blur"===r.trigger&&(r.trigger="focus"),r.trigger||(r.trigger=qx),r},aw=function(t,e,n){if(V["j"]){var r=ow(e,n);if(!t[Hx]){var i=n.context;t[Hx]=new t_({parent:i,_scopeId:sm(i,void 0)}),t[Hx].__bv_prev_data__={},t[Hx].$on("show",function(){dt(r.title)&&t[Hx].updateData({title:r.title(t)})})}var o={title:r.title,triggers:r.trigger,placement:r.placement,fallbackPlacement:r.fallbackPlacement,variant:r.variant,customClass:r.customClass,container:r.container,boundary:r.boundary,delay:r.delay,offset:r.offset,noFade:!r.animation,id:r.id,interactive:r.interactive,disabled:r.disabled,html:r.html},a=t[Hx].__bv_prev_data__;if(t[Hx].__bv_prev_data__=o,!Io(o,a)){var s={target:t};v(o).forEach(function(e){o[e]!==a[e]&&(s[e]="title"===e&&dt(o[e])?o[e](t):o[e])}),t[Hx].updateData(s)}}},sw=function(t){t[Hx]&&(t[Hx].$destroy(),t[Hx]=null),delete t[Hx]},lw={bind:function(t,e,n){aw(t,e,n)},componentUpdated:function(t,e,n){n.context.$nextTick(function(){aw(t,e,n)})},unbind:function(t){sw(t)}},cw=Vt({directives:{VBTooltip:lw}}),uw=Vt({components:{BTooltip:n_},plugins:{VBTooltipPlugin:cw}}),hw=Vt({plugins:{AlertPlugin:kn,AspectPlugin:Zn,AvatarPlugin:Xi,BadgePlugin:ro,BreadcrumbPlugin:vo,ButtonPlugin:bo,ButtonGroupPlugin:Eo,ButtonToolbarPlugin:Po,CalendarPlugin:Aa,CardPlugin:Us,CarouselPlugin:_l,CollapsePlugin:cc,DropdownPlugin:pu,EmbedPlugin:yu,FormPlugin:Iu,FormCheckboxPlugin:Wu,FormDatepickerPlugin:hh,FormFilePlugin:bh,FormGroupPlugin:Wh,FormInputPlugin:nd,FormRadioPlugin:od,FormRatingPlugin:_d,FormSelectPlugin:Ed,FormSpinbuttonPlugin:Gd,FormTagsPlugin:pp,FormTextareaPlugin:_p,FormTimepickerPlugin:Hp,ImagePlugin:qp,InputGroupPlugin:pf,JumbotronPlugin:xf,LayoutPlugin:Mf,LinkPlugin:Df,ListGroupPlugin:Hf,MediaPlugin:Qf,ModalPlugin:fg,NavPlugin:Dg,NavbarPlugin:Kg,OverlayPlugin:ay,PaginationPlugin:Ty,PaginationNavPlugin:Dy,PopoverPlugin:A_,ProgressPlugin:z_,SidebarPlugin:X_,SpinnerPlugin:Y_,TablePlugin:Jb,TabsPlugin:sx,TimePlugin:lx,ToastPlugin:$x,TooltipPlugin:uw}}),dw=Vt({directives:{VBHover:th}}),pw=Vt({directives:{VBModal:Wm}});function fw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fw(Object(n),!0).forEach(function(e){gw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fw(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function gw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _w(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)}}function vw(t,e,n){return e&&_w(t.prototype,e),n&&_w(t,n),t}var bw="v-b-scrollspy",xw="bv::scrollspy::activate",ww={element:"body",offset:10,method:"auto",throttle:75},Sw={element:"(string|element|component)",offset:"number",method:"string",throttle:"number"},Tw={DROPDOWN_ITEM:"dropdown-item",ACTIVE:"active"},Ew={ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown, .dropup",DROPDOWN_IT
45EMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},Cw={OFFSET:"offset",POSITION:"position"},Ow=/^.*(#[^#]+)$/,Pw=["webkitTransitionEnd","transitionend","otransitionend","oTransitionEnd"],kw=function(t){return x(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()},Aw=function(t,e,n){for(var r in n)if(b(n,r)){var i=n[r],o=e[r],a=o&&ke(o)?"element":kw(o);a=o&&o._isVue?"component":a,new RegExp(i).test(a)||Et("".concat(t,': Option "').concat(r,'" provided type "').concat(a,'" but expected type "').concat(i,'"'))}},Iw=function(){function t(e,n,r){yw(this,t),this.$el=e,this.$scroller=null,this.$selector=[Ew.NAV_LINKS,Ew.LIST_ITEMS,Ew.DROPDOWN_ITEMS].join(","),this.$offsets=[],this.$targets=[],this.$activeTarget=null,this.$scrollHeight=0,this.$resizeTimeout=null,this.$scrollerObserver=null,this.$targetsObserver=null,this.$root=r||null,this.$config=null,this.updateConfig(n)}return vw(t,[{key:"updateConfig",value:function(t,e){this.$scroller&&(this.unlisten(),this.$scroller=null);var n=mw(mw({},this.constructor.Default),t);if(e&&(this.$root=e),Aw(this.constructor.Name,n,this.constructor.DefaultType),this.$config=n,this.$root){var r=this;this.$root.$nextTick(function(){r.listen()})}else this.listen()}},{key:"dispose",value:function(){this.unlisten(),clearTimeout(this.$resizeTimeout),this.$resizeTimeout=null,this.$el=null,this.$config=null,this.$scroller=null,this.$selector=null,this.$offsets=null,this.$targets=null,this.$activeTarget=null,this.$scrollHeight=null}},{key:"listen",value:function(){var t=this,e=this.getScroller();e&&"BODY"!==e.tagName&&tl(e,"scroll",this,Js),tl(window,"scroll",this,Js),tl(window,"resize",this,Js),tl(window,"orientationchange",this,Js),Pw.forEach(function(e){tl(window,e,t,Js)}),this.setObservers(!0),this.handleEvent("refresh")}},{key:"unlisten",value:function(){var t=this,e=this.getScroller();this.setObservers(!1),e&&"BODY"!==e.tagName&&el(e,"scroll",this,Js),el(window,"scroll",this,Js),el(window,"resize",this,Js),el(window,"orientationchange",this,Js),Pw.forEach(function(e){el(window,e,t,Js)})}},{key:"setObservers",value:function(t){var e=this;this.$scrollerObserver&&this.$scrollerObserver.disconnect(),this.$targetsObserver&&this.$targetsObserver.disconnect(),this.$scrollerObserver=null,this.$targetsObserver=null,t&&(this.$targetsObserver=Ys(this.$el,function(){e.handleEvent("mutation")},{subtree:!0,childList:!0,attributes:!0,attributeFilter:["href"]}),this.$scrollerObserver=Ys(this.getScroller(),function(){e.handleEvent("mutation")},{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["id","style","class"]}))}},{key:"handleEvent",value:function(t){var e=ft(t)?t:t.type,n=this,r=function(){n.$resizeTimeout||(n.$resizeTimeout=setTimeout(function(){n.refresh(),n.process(),n.$resizeTimeout=null},n.$config.throttle))};"scroll"===e?(this.$scrollerObserver||this.listen(),this.process()):/(resize|orientationchange|mutation|refresh)/.test(e)&&r()}},{key:"refresh",value:function(){var t=this,e=this.getScroller();if(e){var n=e!==e.window?Cw.POSITION:Cw.OFFSET,r="auto"===this.$config.method?n:this.$config.method,i=r===Cw.POSITION?Qe:Je,o=r===Cw.POSITION?this.getScrollTop():0;return this.$offsets=[],this.$targets=[],this.$scrollHeight=this.getScrollHeight(),Le(this.$selector,this.$el).map(function(t){return We(t,"href")}).filter(function(t){return t&&Ow.test(t||"")}).map(function(t){var n=t.replace(Ow,"$1").trim();if(!n)return null;var r=Re(n,e);return r&&De(r)?{offset:ie(i(r).top,0)+o,target:n}:null}).filter(Boolean).sort(function(t,e){return t.offset-e.offset}).reduce(function(e,n){return e[n.target]||(t.$offsets.push(n.offset),t.$targets.push(n.target),e[n.target]=!0),e},{}),this}}},{key:"process",value:function(){var t=this.getScrollTop()+this.$config.offset,e=this.getScrollHeight(),n=this.$config.offset+e-this.getOffsetHeight();if(this.$scrollHeight!==e&&this.refresh(),t>=n){var r=this.$targets[this.$targets.length-1];this.$activeTarget!==r&&this.activate(r)}else{if(this.$activeTarget&&t<this.$offsets[0]&&this.$offsets[0]>0)return this.$activeTarget=null,void this.clear();for(var i=this.$offsets.length;i--;){var o=this.$activeTarget!==this.$targets[i]&&t>=this.$offsets[i]&&(ct(this.$offsets[i+1])||t<this.$offsets[i+1]);o&&this.activate(this.$targets[i])}}}},{key:"getScroller",value:function(){if(this.$scroller)return this.$scroller;var t=this.$config.element;return t?(ke(t.$el)?t=t.$el:ft(t)&&(t=Re(t)),t?(this.$scroller="BODY"===t.tagName?window:t,this.$scroller):null):null}},{key:"getScrollTop",value:function(){var t=this.getScroller();return t===window?t.pageYOffset:t.scrollTop}}
45,{key:"getScrollHeight",value:function(){return this.getScroller().scrollHeight||In(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"getOffsetHeight",value:function(){var t=this.getScroller();return t===window?window.innerHeight:Xe(t).height}},{key:"activate",value:function(t){var e=this;this.$activeTarget=t,this.clear();var n=Le(this.$selector.split(",").map(function(e){return"".concat(e,'[href$="').concat(t,'"]')}).join(","),this.$el);n.forEach(function(t){if(Ge(t,Tw.DROPDOWN_ITEM)){var n=Fe(Ew.DROPDOWN,t);n&&e.setActiveState(Re(Ew.DROPDOWN_TOGGLE,n),!0),e.setActiveState(t,!0)}else{e.setActiveState(t,!0),je(t.parentElement,Ew.NAV_ITEMS)&&e.setActiveState(t.parentElement,!0);var r=t;while(r){r=Fe(Ew.NAV_LIST_GROUP,r);var i=r?r.previousElementSibling:null;i&&je(i,"".concat(Ew.NAV_LINKS,", ").concat(Ew.LIST_ITEMS))&&e.setActiveState(i,!0),i&&je(i,Ew.NAV_ITEMS)&&(e.setActiveState(Re(Ew.NAV_LINKS,i),!0),e.setActiveState(i,!0))}}}),n&&n.length>0&&this.$root&&this.$root.$emit(xw,t,n)}},{key:"clear",value:function(){var t=this;Le("".concat(this.$selector,", ").concat(Ew.NAV_ITEMS),this.$el).filter(function(t){return Ge(t,Tw.ACTIVE)}).forEach(function(e){return t.setActiveState(e,!1)})}},{key:"setActiveState",value:function(t,e){t&&(e?Ve(t,Tw.ACTIVE):Ue(t,Tw.ACTIVE))}}],[{key:"Name",get:function(){return bw}},{key:"Default",get:function(){return ww}},{key:"DefaultType",get:function(){return Sw}}]),t}(),Mw=Iw,Dw="__BV_ScrollSpy__",Bw=/^\d+$/,zw=/^(auto|position|offset)$/,Lw=function(t){var e={};return t.arg&&(e.element="#".concat(t.arg)),v(t.modifiers).forEach(function(t){Bw.test(t)?e.offset=ie(t,0):zw.test(t)&&(e.method=t)}),ft(t.value)?e.element=t.value:mt(t.value)?e.offset=Ln(t.value):w(t.value)&&v(t.value).filter(function(t){return!!Mw.DefaultType[t]}).forEach(function(n){e[n]=t.value[n]}),e},Rw=function(t,e,n){if(V["j"]){var r=Lw(e);t[Dw]?t[Dw].updateConfig(r,n.context.$root):t[Dw]=new Mw(t,r,n.context.$root)}},jw=function(t){t[Dw]&&(t[Dw].dispose(),t[Dw]=null,delete t[Dw])},Fw={bind:function(t,e,n){Rw(t,e,n)},inserted:function(t,e,n){Rw(t,e,n)},update:function(t,e,n){e.value!==e.oldValue&&Rw(t,e,n)},componentUpdated:function(t,e,n){e.value!==e.oldValue&&Rw(t,e,n)},unbind:function(t){jw(t)}},Nw=Vt({directives:{VBScrollspy:Fw}}),$w=Vt({directives:{VBVisible:ws}}),Vw=Vt({plugins:{VBHoverPlugin:dw,VBModalPlugin:pw,VBPopoverPlugin:k_,VBScrollspyPlugin:Nw,VBTogglePlugin:lc,VBTooltipPlugin:cw,VBVisiblePlugin:$w}}),Uw="BootstrapVue",Gw=$t({plugins:{componentsPlugin:hw,directivesPlugin:Vw}}),Hw={install:Gw,NAME:Uw};e["a"]=Hw},"613b":function(t,e,n){var r=n("5537")("keys"),i=n("ca5a");t.exports=function(t){return r[t]||(r[t]=i(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"62e4":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}},"63b6":function(t,e,n){var r=n("e53d"),i=n("584a"),o=n("d864"),a=n("35e8"),s=n("07e3"),l="prototype",c=function(t,e,n){var u,h,d,p=t&c.F,f=t&c.G,m=t&c.S,g=t&c.P,y=t&c.B,_=t&c.W,v=f?i:i[e]||(i[e]={}),b=v[l],x=f?r:m?r[e]:(r[e]||{})[l];for(u in f&&(n=e),n)h=!p&&x&&void 0!==x[u],h&&s(v,u)||(d=h?x[u]:n[u],v[u]=f&&"function"!=typeof x[u]?n[u]:y&&h?o(d,r):_&&x[u]==d?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[l]=t[l],e}(d):g&&"function"==typeof d?o(Function.call,d):d,g&&((v.virtual||(v.virtual={}))[u]=d,t&c.R&&b&&!b[u]&&a(b,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},6718:function(t,e,n){var r=n("e53d"),i=n("584a"),o=n("b8e3"),a=n("ccb9"),s=n("d9f6").f;
45t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},"67bb":function(t,e,n){t.exports=n("f921")},6821:function(t,e,n){var r=n("626a"),i=n("be13");t.exports=function(t){return r(i(t))}},"68f7":function(t,e,n){"use strict";var r=n("63b6"),i=n("79aa"),o=n("d864"),a=n("a22a");t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,l=arguments[1];return i(this),e=void 0!==l,e&&i(l),void 0==t?new this:(n=[],e?(r=0,s=o(l,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"69d3":function(t,e,n){n("6718")("asyncIterator")},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"6abf":function(t,e,n){var r=n("e6f3"),i=n("1691").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),i=n("0bfb"),o=n("9e1e"),a="toString",s=/./[a],l=function(t){n("2aba")(RegExp.prototype,a,t,!0)};n("79e5")(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?l(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):s.name!=a&&l(function(){return s.call(this)})},"6c1a":function(t,e,n){var r=n("5ca1"),i=n("2d5c"),o=Math.exp;r(r.S+r.F*n("79e5")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),i=n("35e8"),o=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var c=s[l],u=r[c],h=u&&u.prototype;h&&!h[a]&&i(h,a,c),o[c]=o.Array}},7075:function(t,e,n){"use strict";var r=n("63b6");t.exports=function(t){r(r.S,t,{of:function(){var t=arguments.length,e=new Array(t);while(t--)e[t]=arguments[t];return new this(e)}})}},"71c1":function(t,e,n){var r=n("3a38"),i=n("25eb");t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),l=r(n),c=s.length;return l<0||l>=c?t?"":void 0:(o=s.charCodeAt(l),o<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536)}}},7333:function(t,e,n){"use strict";var r=n("0d58"),i=n("2621"),o=n("52a7"),a=n("4bf8"),s=n("626a"),l=Object.assign;t.exports=!l||n("79e5")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=r})?function(t,e){var n=a(t),l=arguments.length,c=1,u=i.f,h=o.f;while(l>c){var d,p=s(arguments[c++]),f=u?r(p).concat(u(p)):r(p),m=f.length,g=0;while(m>g)h.call(p,d=f[g++])&&(n[d]=p[d])}return n}:l},7514:function(t,e,n){"use strict";var r=n("5ca1"),i=n("0a49")(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(o)},7554:function(t,e,n){n("68f7")("Map")},"75fc":function(t,e,n){"use strict";var r=n("a745"),i=n.n(r);function o(t){if(i()(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}var a=n("774e"),s=n.n(a),l=n("c8bb"),c=n.n(l);function u(t){if(c()(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return s()(t)}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function d(t){return o(t)||u(t)||h()}n.d(e,"a",function(){return d})},7618:function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n("5d58"),i=n.n(r),o=n("67bb"),a=n.n(o);function s(t){return s="function"===typeof a.a&&"symbol"===typeof i.a?function(t){return typeof t}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":typeof t},s(t)}function l(t){return l="function"===typeof a.a&&"symbol"===s(i.a)?function(t){return s(t)}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":s(t)},l(t)}
45},"765d":function(t,e,n){n("6718")("observable")},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},7785:function(t,e,n){"use strict";var r=window.URL||window.webkitURL;t.exports=function(t,e){try{try{var n;try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;n=new i,n.append(t),n=n.getBlob()}catch(o){n=new Blob([t])}return new Worker(r.createObjectURL(n))}catch(o){return new Worker("data:application/javascript,"+encodeURIComponent(t))}}catch(o){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},"77f1":function(t,e,n){var r=n("4588"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),i=n("86cc"),o=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},"7a77":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},"7aac":function(t,e,n){"use strict";var r=n("c532");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(){}}}()},"7be7":function(t,e,n){n("0a90"),t.exports=n("584a").parseFloat},"7cd6":function(t,e,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},"7d7b":function(t,e,n){var r=n("e4ae"),i=n("7cd6");t.exports=n("584a").getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},"7e90":function(t,e,n){var r=n("d9f6"),i=n("e4ae"),o=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){i(t);var n,a=o(e),s=a.length,l=0;while(s>l)r.f(t,n=a[l++],e[n]);return t}},"7f20":function(t,e,n){var r=n("86cc").f,i=n("69a8"),o=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},8079:function(t,e,n){var r=n("7726"),i=n("1991").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,l="process"==n("2d95")(a);t.exports=function(){var t,e,n,c=function(){var r,i;l&&(r=a.domain)&&r.exit();while(t){i=t.fn,t=t.next;try{i()}catch(o){throw t?n():e=void 0,o}}e=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"837d":function(t,e,n){"use strict";var r=n("5aee"),i=n("9f79"),o="Map";t.exports=n("ada4")(o,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,o),t);return e&&e.v},set:function(t,e){return r.def(i(this,o),0===t?0:t,e)}},r,!0)},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},8436:function(t,e){t.exports=function(){}},"84f2":function(t,e){t.exports={}},8516:function(t,e,n){var r=n("63b6");r(r.S,"Number",{isInteger:n("0cd9")})},"85f2":function(t,e,n){t.exports=n("454f")},"86cc":function(t,e,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}}
45,8790:function(t,e,n){n("8516"),t.exports=n("584a").Number.isInteger},"87a4":function(t,e,n){var r=n("63b6");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},"8aae":function(t,e,n){n("32a6"),t.exports=n("584a").Object.keys},"8b97":function(t,e,n){var r=n("d3f4"),i=n("cb7c"),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},"8df4":function(t,e,n){"use strict";var r=n("7a77");function i(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 r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t,e=new i(function(e){t=e});return{token:e,cancel:t}},t.exports=i},"8e60":function(t,e,n){t.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,e,n){"use strict";var r=n("a159"),i=n("aebd"),o=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9093:function(t,e,n){var r=n("ce10"),i=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},9138:function(t,e,n){t.exports=n("35e8")},9306:function(t,e,n){"use strict";var r=n("c3a1"),i=n("9aa9"),o=n("355d"),a=n("241e"),s=n("335c"),l=Object.assign;t.exports=!l||n("294c")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=r})?function(t,e){var n=a(t),l=arguments.length,c=1,u=i.f,h=o.f;while(l>c){var d,p=s(arguments[c++]),f=u?r(p).concat(u(p)):r(p),m=f.length,g=0;while(m>g)h.call(p,d=f[g++])&&(n[d]=p[d])}return n}:l},"938d":function(t,e,n){"use strict";(function(t){n.d(e,"i",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"g",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"j",function(){return l}),n.d(e,"k",function(){return u}),n.d(e,"e",function(){return h}),n.d(e,"h",function(){return d}),n.d(e,"f",function(){return p}),n.d(e,"c",function(){return f}),n.d(e,"a",function(){return g});var r="undefined"!==typeof window,i="undefined"!==typeof document,o="undefined"!==typeof navigator,a="undefined"!==typeof Promise,s="undefined"!==typeof MutationObserver||"undefined"!==typeof WebKitMutationObserver||"undefined"!==typeof MozMutationObserver,l=r&&i&&o,c=l?window.navigator.userAgent.toLowerCase():"",u=c.indexOf("jsdom")>0,h=(/msie|trident/.test(c),function(){var t=!1;if(l)try{var e={get passive(){t=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(n){t=!1}return t}()),d=l&&("ontouchstart"in document.documentElement||navigator.maxTouchPoints>0),p=l&&Boolean(window.PointerEvent||window.MSPointerEvent),f=l&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,m=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r="undefined"!==typeof t&&t?Object({NODE_ENV:"production",BASE_URL:"/"})||!1:{};return e?r[e]||n:r},g=function(){return m("BOOTSTRAP_VUE_NO_WARN")}}).call(this,n("4362"))},"95d5":function(t,e,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},"96fb":function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},"9aa9":function(t,e){e.f=Object.getOwnPropertySymbols},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&n("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9c80":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"9def":function(t,e,n){var r=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"9f79":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},"9fa6":function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
45+/=";function i(){this.message="String contains an invalid character"}function o(t){for(var e,n,o=String(t),a="",s=0,l=r;o.charAt(0|s)||(l="=",s%1);a+=l.charAt(63&e>>8-s%1*8)){if(n=o.charCodeAt(s+=.75),n>255)throw new i;e=e<<8|n}return a}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=o},a159:function(t,e,n){var r=n("e4ae"),i=n("7e90"),o=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},l="prototype",c=function(){var t,e=n("1ec9")("iframe"),r=o.length,i="<",a=">";e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),c=t.F;while(r--)delete c[l][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[l]=r(t),n=new s,s[l]=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},a1ce:function(t,e,n){var r=n("63b6"),i=n("25eb"),o=n("294c"),a=n("e692"),s="["+a+"]",l="​…",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),h=function(t,e,n){var i={},s=o(function(){return!!a[t]()||l[t]()!=l}),c=i[t]=s?e(d):a[t];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},d=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(u,"")),t};t.exports=h},a21f:function(t,e,n){var r=n("584a"),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},a22a:function(t,e,n){var r=n("d864"),i=n("b0dc"),o=n("3702"),a=n("e4ae"),s=n("b447"),l=n("7cd6"),c={},u={};e=t.exports=function(t,e,n,h,d){var p,f,m,g,y=d?function(){return t}:l(t),_=r(n,h,e?2:1),v=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(p=s(t.length);p>v;v++)if(g=e?_(a(f=t[v])[0],f[1]):_(t[v]),g===c||g===u)return g}else for(m=y.call(t);!(f=m.next()).done;)if(g=i(m,_,f.value,e),g===c||g===u)return g};e.BREAK=c,e.RETURN=u},a25f:function(t,e,n){var r=n("7726"),i=r.navigator;t.exports=i&&i.userAgent||""},a3c3:function(t,e,n){var r=n("63b6");r(r.S+r.F,"Object",{assign:n("9306")})},a481:function(t,e,n){"use strict";var r=n("cb7c"),i=n("4bf8"),o=n("9def"),a=n("4588"),s=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,h=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g,f=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,m){return[function(r,i){var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=m(n,t,this,e);if(i.done)return i.value;var h=r(t),d=String(this),p="function"===typeof e;p||(e=String(e));var y=h.global;if(y){var _=h.unicode;h.lastIndex=0}var v=[];while(1){var b=l(h,d);if(null===b)break;if(v.push(b),!y)break;var x=String(b[0]);""===x&&(h.lastIndex=s(d,o(h.lastIndex),_))}for(var w="",S=0,T=0;T<v.length;T++){b=v[T];for(var E=String(b[0]),C=c(u(a(b.index),d.length),0),O=[],P=1;P<b.length;P++)O.push(f(b[P]));var k=b.groups;if(p){var A=[E].concat(O,C,d);void 0!==k&&A.push(k);var I=String(e.apply(void 0,A))}else I=g(E,d,C,O,k,e);C>=S&&(w+=d.slice(S,C)+I,S=C+E.length)}return w+d.slice(S)}];function g(t,e,r,o,a,s){var l=r+t.length,c=o.length,u=p;return void 0!==a&&(a=i(a),u=d),n.call(s,u,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(l);case"<":s=a[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>c){var d=h(u/10);return 0===d?n:d<=c?void 0===o[d-1]?i.charAt(1):o[d-1]+i.charAt(1):n}s=o[u-1]}return void 0===s?"":s})}})},a4bb:function(t,e,n){t.exports=n("8aae")},a5b8:function(t,e,n){"use strict";var r=n("d8e8");function i(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},a745:function(t,e,n){t.exports=n("f410")},aa77:function(t,e,n){var r=n("5ca1"),i=n("be13"),o=n("79e5"),a=n("fdef"),s="["+a+"]",l="​…",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),h=function(t,e,n){var i={},s=o(function(){return!!a[t]()||l[t]()!=l}),c=i[t]=s?e(d):a[t];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},d=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(u,"")),t};t.exports=h},aae3:function(t,e,n){var r=n("d3f4"),i=n("2d95"),o=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),i=n("0d58"),o=n("2aba"),a=n("7726"),s=n("32e9"),l=n("84f2"),c=n("2b4c"),u=c("iterator"),h=c("toStringTag"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},f=i(p),m=0;m<f.length;m++){var g,y=f[m],_=p[y],v=a[y],b=v&&v.prototype;if(b&&(b[u]||s(b,u,d),b[h]||s(b,h,y),l[y]=d,_))for(g in r)b[g]||o(b,g,r[g],!0)}},ac6d:function(t,e,n){},ada4:function(t,e,n){"use strict";var r=n("e53d"),i=n("63b6"),o=n("ebfd"),a=n("294c"),s=n("35e8"),l=n("5c95"),c=n("a22a"),u=n("1173"),h=n("f772"),d=n("45f2"),p=n("d9f6").f,f=n("57b1")(0),m=n("8e60");t.exports=function(t,e,n,g,y,_){var v=r[t],b=v,x=y?"set":"add",w=b&&b.prototype,S={};
45return m&&"function"==typeof b&&(_||w.forEach&&!a(function(){(new b).entries().next()}))?(b=e(function(e,n){u(e,b,t,"_c"),e._c=new v,void 0!=n&&c(n,y,e[x],e)}),f("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in w&&(!_||"clear"!=t)&&s(b.prototype,t,function(n,r){if(u(this,b,t),!e&&_&&!h(n))return"get"==t&&void 0;var i=this._c[t](0===n?0:n,r);return e?this:i})}),_||p(b.prototype,"size",{get:function(){return this._c.size}})):(b=g.getConstructor(e,t,y,x),l(b.prototype,n),o.NEED=!0),d(b,t),S[t]=b,i(i.G+i.W+i.F,S),_||g.setStrong(b,t,y),b}},aeb1:function(t,e,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})(0,function(){return function t(e,n,r){var i,o,a=window,s="application/octet-stream",l=r||s,c=e,u=!n&&!r&&c,h=document.createElement("a"),d=function(t){return String(t)},p=a.Blob||a.MozBlob||a.WebKitBlob||d,f=n||"download";if(p=p.call?p.bind(a):Blob,"true"===String(this)&&(c=[c,l],l=c[0],c=c[1]),u&&u.length<2048&&(f=u.split("/").pop().split("?")[0],h.href=u,-1!==h.href.indexOf(u))){var m=new XMLHttpRequest;return m.open("GET",u,!0),m.responseType="blob",m.onload=function(e){t(e.target.response,f,s)},setTimeout(function(){m.send()},0),m}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&p!==d))return navigator.msSaveBlob?navigator.msSaveBlob(v(c),f):b(c);c=v(c),l=c.type||s}else if(/([\x80-\xff])/.test(c)){var g=0,y=new Uint8Array(c.length),_=y.length;for(g;g<_;++g)y[g]=c.charCodeAt(g);c=new p([y],{type:l})}function v(t){var e=t.split(/[:;,]/),n=e[1],r="base64"==e[2]?atob:decodeURIComponent,i=r(e.pop()),o=i.length,a=0,s=new Uint8Array(o);for(a;a<o;++a)s[a]=i.charCodeAt(a);return new p([s],{type:n})}function b(t,e){if("download"in h)return h.href=t,h.setAttribute("download",f),h.className="download-js-link",h.innerHTML="downloading...",h.style.display="none",document.body.appendChild(h),setTimeout(function(){h.click(),document.body.removeChild(h),!0===e&&setTimeout(function(){a.URL.revokeObjectURL(h.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,s)),window.open(t)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=t),!0;var n=document.createElement("iframe");document.body.appendChild(n),!e&&/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,s)),n.src=t,setTimeout(function(){document.body.removeChild(n)},333)}if(i=c instanceof p?c:new p([c],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(i,f);if(a.URL)b(a.URL.createObjectURL(i),!0);else{if("string"===typeof i||i.constructor===d)try{return b("data:"+l+";base64,"+a.btoa(i))}catch(x){return b("data:"+l+","+encodeURIComponent(i))}o=new FileReader,o.onload=function(t){b(this.result)},o.readAsDataURL(i)}return!0}})},aebd:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},b0b4:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("85f2"),i=n.n(r);function o(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),i()(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}},b0c5:function(t,e,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(t,e,n){var r=n("e4ae");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(a){var o=t["return"];throw void 0!==o&&r(o.call(t)),a}}},b447:function(t,e,n){var r=n("3a38"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},b50d:function(t,e,n){"use strict";var r=n("c532"),i=n("467f"),o=n("30b5"),a=n("c345"),s=n("3934"),l=n("2d83"),c="undefined"!==typeof window&&window.btoa&&window.btoa.bind(window)||n("9fa6");t.exports=function(t){return new Promise(function(e,u){var h=t.data,d=t.headers;r.isFormData(h)&&delete d["Content-Type"];var p=new XMLHttpRequest,f="onreadystatechange",m=!1;if("undefined"===typeof window||!window.XDomainRequest||"withCredentials"in p||s(t.url)||(p=new window.XDomainRequest,f="onload",m=!0,p.onprogress=function(){},p.ontimeout=function(){}),t.auth){var g=t.auth.username||"",y=t.auth.password||"";d.Authorization="Basic "+c(g+":"+y)}if(p.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p[f]=function(){if(p&&(4===p.readyState||m)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?p.response:p.responseText,o={data:r,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:t,request:p};i(e,u,o),p=null}},p.onerror=function(){u(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){u(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var _=n("7aac"),v=(t.withCredentials||s(t.url))&&t.xsrfCookieName?_.read(t.xsrfCookieName):void 0;v&&(d[t.xsrfHeaderName]=v)}if("setRequestHeader"in p&&r.forEach(d,function(t,e){"undefined"===typeof h&&"content-type"===e.toLowerCase()?delete d[e]:p.setRequestHeader(e,t)}),t.withCredentials&&(p.withCredentials=!0),t.responseType)try{p.responseType=t.responseType}catch(b){if("json"!==t.responseType)throw b}"function"===typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){p&&(p.abort(),u(t),p=null)}),void 0===h&&(h=null),p.send(h)})}},b54a:function(t,e,n){"use strict";n("386b")("link",function(t){return function(e){return t(this,"a","href",e)}})},b8e3:function(t,e){t.exports=!0},bc3a:function(t,e,n){t.exports=n("cee4")},bcaa:function(t,e,n){var r=n("cb7c"),i=n("d3f4"),o=n("a5b8");t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t),a=n.resolve;return a(e),n.promise}},bdd0:function(t,e,n){},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},bf0b:function(t,e,n){var r=n("355d"),i=n("aebd"),o=n("36c3"),a=n("1bc3"),s=n("07e3"),l=n("794b"),c=Object.getOwnPropertyDescriptor;e.f=n("8e60")?c:function(t,e){if(t=o(t),e=a(e,!0),l)try{return c(t,e)}catch(n){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},bf57:function(t,e,n){"use strict";function r(t){return t&&"object"===typeof t&&"default"in t?t["default"]:t}var i=r(n("2ef0")),o=r(n("aeb1")),a=r(n("369b")),s={name:"JsonCSV",props:{data:{type:Array,required:!0},fields:{required:!1},name:{type:String,default:"data.csv"},delimiter:{type:String,default:",",required:!1},separatorExcel:{type:Boolean,default:!1},encoding:{type:String,default:"utf8"},advancedOptions:{type:Object,default:function(){}},labels:{required:!1},testing:{required:!1,default:!1}},computed:{idName:function(){var t=(new Date).getTime();return"export_"+t},exportableData:function(){var t=this.cleaningData();return t.length?t:null}},methods:{labelsFunctionGenerator:function(){var t=this;if(!i.isUndefined(this.labels)&&!i.isFunction(this.labels)&&!i.isObject(this.labels))throw new Error("Labels needs to be a function(value,key) or object.");return i.isFunction(this.labels)?function(e){var n=i.mapKeys(e,t.labels);return n}:i.isObject(this.labels)?function(e){return i.mapKeys(e,function(e,n){return t.labels[n]||n})}:function(t){return t}},fieldsFunctionGenerator:function(){var t=this;if(!i.isUndefined(this.fields)&&!i.isFunction(this.fields)&&!i.isObject(this.fields)&&!i.isArray(this.fields))throw new Error("Fields needs to be a function(value,key) or array.");return i.isFunction(this.fields)||i.isObject(this.fields)&&!i.isArray(this.fields)?function(e){return i.pickBy(e,t.fields)}:i.isArray(this.fields)?function(e){return i.pick(e,t.fields)}:function(t){return t}},cleaningData:function(){if(i.isUndefined(this.fields)&&i.isUndefined(this.labels))return this.data;var t=this.labelsFunctionGenerator(),e=this.fieldsFunctionGenerator();return i.map(this.data,function(n){return t(e(n))})},generate:function(){this.$emit("export-started");var t=this.exportableData;if(t){var e=a.unparse(t,Object.assign({delimiter:this.delimiter,encoding:this.encoding},this.advancedOptions));this.separatorExcel&&(e="SEP="+this.delimiter+"\r\n"+e),this.$emit("export-finished"),this.testing||o(e,this.name,"application/csv")}else console.error("No data to export")}}};function l(t,e,n,r,i,o,a,s,l,c){"boolean"!==typeof a&&(l=s,s=a,a=!1);var u,h="function"===typeof n?n.options:n;if(t&&t.render&&(h.render=t.render,h.staticRenderFns=t.staticRenderFns,h._compiled=!0,i&&(h.functional=!0)),r&&(h._scopeId=r),o?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},h._ssrRegister=u):e&&(u=a?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),u)if(h.functional){var d=h.render;h.render=function(t,e){return u.call(e),d(t,e)}}
45else{var p=h.beforeCreate;h.beforeCreate=p?[].concat(p,u):[u]}return n}var c=l,u=s;s.__file="JsonCSV.vue";var h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:t.idName},on:{click:t.generate}},[t._t("default",[t._v("\n        Download "+t._s(t.name)+"\n    ")])],2)},d=[],p=void 0,f="data-v-0b0f40e0",m=void 0,g=!1,y=c({render:h,staticRenderFns:d},p,u,f,g,m,void 0,void 0);t.exports=y},bfac:function(t,e,n){var r=n("0b64");t.exports=function(t,e){return new(r(t))(e)}},c207:function(t,e){},c345:function(t,e,n){"use strict";var r=n("c532"),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}},c366:function(t,e,n){var r=n("6821"),i=n("9def"),o=n("77f1");t.exports=function(t){return function(e,n,a){var s,l=r(e),c=i(l.length),u=o(a,c);if(t&&n!=n){while(c>u)if(s=l[u++],s!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},c367:function(t,e,n){"use strict";var r=n("8436"),i=n("50ed"),o=n("481b"),a=n("36c3");t.exports=n("30f1")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,e,n){var r=n("e6f3"),i=n("1691");t.exports=Object.keys||function(t){return r(t,i)}},c401:function(t,e,n){"use strict";var r=n("c532");t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},c532:function(t,e,n){"use strict";var r=n("1d2b"),i=n("044b"),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return"[object ArrayBuffer]"===o.call(t)}function l(t){return"undefined"!==typeof FormData&&t instanceof FormData}function c(t){var e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function u(t){return"string"===typeof t}function h(t){return"number"===typeof t}function d(t){return"undefined"===typeof t}function p(t){return null!==t&&"object"===typeof t}function f(t){return"[object Date]"===o.call(t)}function m(t){return"[object File]"===o.call(t)}function g(t){return"[object Blob]"===o.call(t)}function y(t){return"[object Function]"===o.call(t)}function _(t){return p(t)&&y(t.pipe)}function v(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams}function b(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function x(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function w(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function S(){var t={};function e(e,n){"object"===typeof t[n]&&"object"===typeof e?t[n]=S(t[n],e):t[n]=e}for(var n=0,r=arguments.length;n<r;n++)w(arguments[n],e);return t}function T(t,e,n){return w(e,function(e,i){t[i]=n&&"function"===typeof e?r(e,n):e}),t}t.exports={isArray:a,isArrayBuffer:s,isBuffer:i,isFormData:l,isArrayBufferView:c,isString:u,isNumber:h,isObject:p,isUndefined:d,isDate:f,isFile:m,isBlob:g,isFunction:y,isStream:_,isURLSearchParams:v,isStandardBrowserEnv:x,forEach:w,merge:S,extend:T,trim:b}},c5f6:function(t,e,n){"use strict";var r=n("7726"),i=n("69a8"),o=n("2d95"),a=n("5dbc"),s=n("6a99"),l=n("79e5"),c=n("9093").f,u=n("11e9").f,h=n("86cc").f,d=n("aa77").trim,p="Number",f=r[p],m=f,g=f.prototype,y=o(n("2aeb")(g))==p,_="trim"in String.prototype,v=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=_?e.trim():d(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,l=e.slice(2),c=0,u=l.length;c<u;
45c++)if(a=l.charCodeAt(c),a<48||a>i)return NaN;return parseInt(l,r)}}return+e};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof f&&(y?l(function(){g.valueOf.call(n)}):o(n)!=p)?a(new m(v(e)),n,f):v(e)};for(var b,x=n("9e1e")?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)i(m,b=x[w])&&!i(f,b)&&h(f,b,u(m,b));f.prototype=g,g.constructor=f,n("2aba")(r,p,f)}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8af:function(t,e,n){"use strict";var r=n("c532");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8bb:function(t,e,n){t.exports=n("54a1")},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),i=n("d53b"),o=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cae8:function(t,e,n){(function(e){!function(e,n){t.exports=n()}(0,function(){"use strict";var t=function(t,e){var n={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},r={on:function(t,e,r){if(void 0===n[t])throw new Error("Invalid event type: "+t);n[t].push({selector:e,fn:r})},render:function(t){e.store.featureChanged(t)}},i=function(t,i){for(var o=n[t],a=o.length;a--;){var s=o[a];if(s.selector(i)){s.fn.call(r,i)||e.store.render(),e.ui.updateMapClasses();break}}};return t.start.call(r),{render:t.render,stop:function(){t.stop&&t.stop()},trash:function(){t.trash&&(t.trash(),e.store.render())},combineFeatures:function(){t.combineFeatures&&t.combineFeatures()},uncombineFeatures:function(){t.uncombineFeatures&&t.uncombineFeatures()},drag:function(t){i("drag",t)},click:function(t){i("click",t)},mousemove:function(t){i("mousemove",t)},mousedown:function(t){i("mousedown",t)},mouseup:function(t){i("mouseup",t)},mouseout:function(t){i("mouseout",t)},keydown:function(t){i("keydown",t)},keyup:function(t){i("keyup",t)},touchstart:function(t){i("touchstart",t)},touchmove:function(t){i("touchmove",t)},touchend:function(t){i("touchend",t)},tap:function(t){i("tap",t)}}},n=6378137;function r(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(i(t[n]))}return e}function i(t){var e,r,i,a,s,l,c=0,u=t.length;if(u>2){for(l=0;l<u;l++)l===u-2?(i=u-2,a=u-1,s=0):l===u-1?(i=u-1,a=0,s=1):(i=l,a=l+1,s=l+2),e=t[i],r=t[a],c+=(o(t[s][0])-o(e[0]))*Math.sin(o(r[1]));c=c*n*n/2}return c}function o(t){return t*Math.PI/180}var a={geometry:function t(e){var n,i=0;switch(e.type){case"Polygon":return r(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)i+=r(e.coordinates[n]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)i+=t(e.geometries[n]);return i}},ring:i},s="mapboxgl-ctrl",l="mapbox-gl-draw_ctrl-draw-btn",c="mapbox-gl-draw_line",u="mapbox-gl-draw_polygon",h="mapbox-gl-draw_point",d="mapbox-gl-draw_trash",p="mapbox-gl-draw_combine",f="mapbox-gl-draw_uncombine",m="mapboxgl-ctrl-group",g="active",y="mapbox-gl-draw_boxselect",_="mapbox-gl-draw-hot",v="mapbox-gl-draw-cold",b="add",x="move",w="drag",S="pointer",T="none",E={POLYGON:"polygon",LINE:"line_string",POINT:"point"},C="Feature",O="Polygon",P="LineString",k="Point",A="FeatureCollection",I="Multi",M="MultiPoint",D="MultiLineString",B="MultiPolygon",z={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},L="draw.create",R="draw.delete",j="draw.update",F="draw.selectionchange",N="draw.modechange",$="draw.actionable",V="draw.render",U="draw.combine",G="draw.uncombine",H="move",q="change_coordinates",W="feature",Z="midpoint",X="vertex",Y="true",K="false",J=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],Q={Point:0,LineString:1,Polygon:2};function tt(t,e){var n=Q[t.geometry.type]-Q[e.geometry.type];return 0===n&&t.geometry.type===O?t.area-e.area:n}function et(t){if(this._items={},this._nums={},this._length=t?t.length:0,t)for(var e=0,n=t.length;e<n;e++)this.add(t[e]),void 0!==t[e]&&("string"==typeof t[e]?this._items[t[e]]=e:this._nums[t[e]]=e)}et.prototype.add=function(t){return this.has(t)||(this._length++,"string"==typeof t?this._items[t]=this._length:this._nums[t]=this._length),this},et.prototype.delete=function(t){return!1===this.has(t)||(this._length--,delete this._items[t],delete this._nums[t]),this},et.prototype.has=function(t){return("string"==typeof t||"number"==typeof t)&&(void 0!==this._items[t]||void 0!==this._nums[t])},et.prototype.values=function(){var t=this,e=[];
45return Object.keys(this._items).forEach(function(n){e.push({k:n,v:t._items[n]})}),Object.keys(this._nums).forEach(function(n){e.push({k:JSON.parse(n),v:t._nums[n]})}),e.sort(function(t,e){return t.v-e.v}).map(function(t){return t.k})},et.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var nt=[W,Z,X],rt={click:function(t,e,n){return it(t,e,n,n.options.clickBuffer)},touch:function(t,e,n){return it(t,e,n,n.options.touchBuffer)}};function it(t,e,n,r){if(null===n.map)return[];var i=t?function(t,e){return void 0===e&&(e=0),[[t.point.x-e,t.point.y-e],[t.point.x+e,t.point.y+e]]}(t,r):e,o={};n.options.styles&&(o.layers=n.options.styles.map(function(t){return t.id}));var s=n.map.queryRenderedFeatures(i,o).filter(function(t){return-1!==nt.indexOf(t.properties.meta)}),l=new et,c=[];return s.forEach(function(t){var e=t.properties.id;l.has(e)||(l.add(e),c.push(t))}),function(t){return t.map(function(t){return t.geometry.type===O&&(t.area=a.geometry({type:C,property:{},geometry:t.geometry})),t}).sort(tt).map(function(t){return delete t.area,t})}(c)}function ot(t,e){var n=rt.click(t,null,e),r={mouse:T};return n[0]&&(r.mouse=n[0].properties.active===Y?x:S,r.feature=n[0].properties.meta),-1!==e.events.currentModeName().indexOf("draw")&&(r.mouse=b),e.ui.queueMapClasses(r),e.ui.updateMapClasses(),n[0]}function at(t,e){var n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function st(t,e,n){void 0===n&&(n={});var r=null!=n.fineTolerance?n.fineTolerance:4,i=null!=n.grossTolerance?n.grossTolerance:12,o=null!=n.interval?n.interval:500;t.point=t.point||e.point,t.time=t.time||e.time;var a=at(t.point,e.point);return a<r||a<i&&e.time-t.time<o}function lt(t,e,n){void 0===n&&(n={});var r=null!=n.tolerance?n.tolerance:25,i=null!=n.interval?n.interval:250;return t.point=t.point||e.point,t.time=t.time||e.time,at(t.point,e.point)<r&&e.time-t.time<i}function ct(t,e){return t(e={exports:{}},e.exports),e.exports}var ut=ct(function(t){var e=t.exports=function(t,n){if(n||(n=16),void 0===t&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;var o=r-Math.floor(r),a="";for(i=0;i<Math.floor(r);i++)a=Math.floor(Math.random()*n).toString(n)+a;if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,t)?e(t,n):a};e.rack=function(t,n,r){var i=function(i){var a=0;do{if(a++>10){if(!r)throw new Error("too many ID collisions, use more bits");t+=r}var s=e(t,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=i,s},o=i.hats={};return i.get=function(t){return i.hats[t]},i.set=function(t,e){return i.hats[t]=e,i},i.bits=t||128,i.base=n||16,i}}),ht=function(t,e){this.ctx=t,this.properties=e.properties||{},this.coordinates=e.geometry.coordinates,this.id=e.id||ut(),this.type=e.geometry.type};ht.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},ht.prototype.incomingCoords=function(t){this.setCoordinates(t)},ht.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},ht.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},ht.prototype.setProperty=function(t,e){this.properties[t]=e},ht.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:C,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.t
45ype}}))},ht.prototype.internal=function(t){var e={id:this.id,meta:W,"meta:type":this.type,active:K,mode:t};if(this.ctx.options.userProperties)for(var n in this.properties)e["user_"+n]=this.properties[n];return{type:C,properties:e,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var dt=function(t,e){ht.call(this,t,e)};(dt.prototype=Object.create(ht.prototype)).isValid=function(){return"number"==typeof this.coordinates[0]&&"number"==typeof this.coordinates[1]},dt.prototype.updateCoordinate=function(t,e,n){this.coordinates=3===arguments.length?[e,n]:[t,e],this.changed()},dt.prototype.getCoordinate=function(){return this.getCoordinates()};var pt=function(t,e){ht.call(this,t,e)};(pt.prototype=Object.create(ht.prototype)).isValid=function(){return this.coordinates.length>1},pt.prototype.addCoordinate=function(t,e,n){this.changed();var r=parseInt(t,10);this.coordinates.splice(r,0,[e,n])},pt.prototype.getCoordinate=function(t){var e=parseInt(t,10);return JSON.parse(JSON.stringify(this.coordinates[e]))},pt.prototype.removeCoordinate=function(t){this.changed(),this.coordinates.splice(parseInt(t,10),1)},pt.prototype.updateCoordinate=function(t,e,n){var r=parseInt(t,10);this.coordinates[r]=[e,n],this.changed()};var ft=function(t,e){ht.call(this,t,e),this.coordinates=this.coordinates.map(function(t){return t.slice(0,-1)})};(ft.prototype=Object.create(ht.prototype)).isValid=function(){return 0!==this.coordinates.length&&this.coordinates.every(function(t){return t.length>2})},ft.prototype.incomingCoords=function(t){this.coordinates=t.map(function(t){return t.slice(0,-1)}),this.changed()},ft.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},ft.prototype.addCoordinate=function(t,e,n){this.changed();var r=t.split(".").map(function(t){return parseInt(t,10)});this.coordinates[r[0]].splice(r[1],0,[e,n])},ft.prototype.removeCoordinate=function(t){this.changed();var e=t.split(".").map(function(t){return parseInt(t,10)}),n=this.coordinates[e[0]];n&&(n.splice(e[1],1),n.length<3&&this.coordinates.splice(e[0],1))},ft.prototype.getCoordinate=function(t){var e=t.split(".").map(function(t){return parseInt(t,10)}),n=this.coordinates[e[0]];return JSON.parse(JSON.stringify(n[e[1]]))},ft.prototype.getCoordinates=function(){return this.coordinates.map(function(t){return t.concat([t[0]])})},ft.prototype.updateCoordinate=function(t,e,n){this.changed();var r=t.split("."),i=parseInt(r[0],10),o=parseInt(r[1],10);void 0===this.coordinates[i]&&(this.coordinates[i]=[]),this.coordinates[i][o]=[e,n]};var mt={MultiPoint:dt,MultiLineString:pt,MultiPolygon:ft},gt=function(t,e,n,r,i){var o=n.split("."),a=parseInt(o[0],10),s=o[1]?o.slice(1).join("."):null;return t[a][e](s,r,i)},yt=function(t,e){if(ht.call(this,t,e),delete this.coordinates,this.model=mt[e.geometry.type],void 0===this.model)throw new TypeError(e.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(e.geometry.coordinates)};function _t(t){this.map=t.map,this.drawConfig=JSON.parse(JSON.stringify(t.options||{})),this._ctx=t}(yt.prototype=Object.create(ht.prototype))._coordinatesToFeatures=function(t){var e=this,n=this.model.bind(this);return t.map(function(t){return new n(e.ctx,{id:ut(),type:C,properties:{},geometry:{coordinates:t,type:e.type.replace("Multi","")}})})},yt.prototype.isValid=function(){return this.features.every(function(t){return t.isValid()})},yt.prototype.setCoordinates=function(t){this.features=this._coordinatesToFeatures(t),this.changed()},yt.prototype.getCoordinate=function(t){return gt(this.features,"getCoordinate",t)},yt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(t){return t.type===O?t.getCoordinates():t.coordinates})))},yt.prototype.updateCoordinate=function(t,e,n){gt(this.features,"updateCoordinate",t,e,n),this.changed()},yt.prototype.addCoordinate=function(t,e,n){gt(this.features,"addCoordinate",t,e,n),this.changed()},yt.prototype.removeCoordinate=function(t){gt(this.features,"removeCoordinate",t),this.changed()},yt.prototype.getFeatures=function(){return this.features},_t.prototype.setSelected=function(t){return this._ctx.store.setSelected(t)},_t.prototype.setSelectedCoordinates=function(t){var e=this;this._ctx.store.setSelectedCoordinates(t),t.reduce(function(t,n){return void 0===t[n.feature_id]&&(t[n.feature_id]=!0,e._ctx.store.get(n.feature_id).changed()),t},{})},_t.prototype.getSelected=function(){return this._ctx.store.getSelected()},_t.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},_t.prototype.isSelected=function(t){return this._ctx.store.isSelected(t)},_t.prototype.getFeature=function(t){return this._ctx.store.get(t)},_t.prototype.select=function(t){return this._ctx.store.select(t)},_t.prototype.deselect=function(t){return this._ctx.store.deselect(t)},_t.prototype.deleteFeature=function(t,e){return void 0===e&&(e={}),this._ctx.store.delete(t,e)},_t.prototype.addFeature=function(t){return this._ctx.store.add(t)},_t.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},_t.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},_t.prototype.setActionableState=function(t){void 0===t&&(t={});var e={trash:t.trash||!1,combineFeatures:t.combineFeatures||!1,uncombineFeatures:t.uncombineFeatures||!1};return this._ctx.events.actionable(e)},_t.prototype.changeMode=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),this._ctx.events.changeMode(t,e,n)},_t.prototype.updateUIClasses=function(t){return this._ctx.ui.queueMapClasses(t)},_t.prototype.activateUIButton=function(t){return this._ctx.ui.setActiveButton(t)},_t.prototype.featuresAt=function(t,e,n){if(void 0===n&&(n="click"),"click"!==n&&"touch"!==n)throw new Error("invalid buffer type");return rt[n](t,e,this._ctx)},_t.prototype.newFeature=function(t){var e=t.geometry.type;return e===k?new dt(this._ctx,t):e===P?new pt(this._ctx,t):e===O?new ft(this._ctx,t):new yt(this._ctx,t)},_t.prototype.isInstanceOf=function(t,e){if(t===k)return e instanceof dt;if(t===P)return e instanceof pt;if(t===O)return e instanceof ft;if("MultiFeature"===t)return e instanceof yt;throw new Error("Unknown feature class: "+t)},_t.prototype.doRender=function(t){return this._ctx.store.featureChanged(t)},_t.prototype.onSetup=function(){},_t.prototype.onDrag=function(){},_t.prototype.onClick=function(){},_t.prototype.onMouseMove=function(){},_t.prototype.onMouseDown=function(){},_t.prototype.onMouseUp=function(){},_t.prototype.onMouseOut=function(){},_t.prototype.onKeyUp=function(){},_t.prototype.onKeyDown=function(){},_t.prototype.onTouchStart=function(){},_t.prototype.onTouchMove=function(){},_t.prototype.onTouchEnd=function(){},_t.prototype.onTap=function(){},_t.prototype.onStop=function(){},_t.prototype.onTrash=function(){},_t.prototype.onCombineFeature=function(){},_t.prototype.onUncombineFeature=function(){},_t.prototype.toDisplayFeatures=function(){throw new Error("You must over
45write toDisplayFeatures")};var vt={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},bt=Object.keys(vt);function xt(t){var e=Object.keys(t);return function(n,r){void 0===r&&(r={});var i={},o=e.reduce(function(e,n){return e[n]=t[n],e},new _t(n));return{start:function(){var e=this;i=o.onSetup(r),bt.forEach(function(n){var r,a=vt[n],s=function(){return!1};t[a]&&(s=function(){return!0}),e.on(n,s,(r=a,function(t){return o[r](i,t)}))})},stop:function(){o.onStop(i)},trash:function(){o.onTrash(i)},combineFeatures:function(){o.onCombineFeatures(i)},uncombineFeatures:function(){o.onUncombineFeatures(i)},render:function(t,e){o.toDisplayFeatures(i,t,e)}}}}function wt(t){return[].concat(t).filter(function(t){return void 0!==t})}function St(){var t=this;if(!t.ctx.map||void 0===t.ctx.map.getSource(_))return l();var e=t.ctx.events.currentModeName();t.ctx.ui.queueMapClasses({mode:e});var n=[],r=[];t.isDirty?r=t.getAllIds():(n=t.getChangedIds().filter(function(e){return void 0!==t.get(e)}),r=t.sources.hot.filter(function(e){return e.properties.id&&-1===n.indexOf(e.properties.id)&&void 0!==t.get(e.properties.id)}).map(function(t){return t.properties.id})),t.sources.hot=[];var i=t.sources.cold.length;t.sources.cold=t.isDirty?[]:t.sources.cold.filter(function(t){var e=t.properties.id||t.properties.parent;return-1===n.indexOf(e)});var o=i!==t.sources.cold.length||r.length>0;function a(n,r){var i=t.get(n).internal(e);t.ctx.events.currentModeRender(i,function(e){t.sources[r].push(e)})}if(n.forEach(function(t){return a(t,"hot")}),r.forEach(function(t){return a(t,"cold")}),o&&t.ctx.map.getSource(v).setData({type:A,features:t.sources.cold}),t.ctx.map.getSource(_).setData({type:A,features:t.sources.hot}),t._emitSelectionChange&&(t.ctx.map.fire(F,{features:t.getSelected().map(function(t){return t.toGeoJSON()}),points:t.getSelectedCoordinates().map(function(t){return{type:C,properties:{},geometry:{type:k,coordinates:t.coordinates}}})}),t._emitSelectionChange=!1),t._deletedFeaturesToEmit.length){var s=t._deletedFeaturesToEmit.map(function(t){return t.toGeoJSON()});t._deletedFeaturesToEmit=[],t.ctx.map.fire(R,{features:s})}function l(){t.isDirty=!1,t.clearChangedIds()}l(),t.ctx.map.fire(V,{})}function Tt(t){var e,n=this;this._features={},this._featureIds=new et,this._selectedFeatureIds=new et,this._selectedCoordinates=[],this._changedFeatureIds=new et,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=t,this.sources={hot:[],cold:[]},this.render=function(){e||(e=requestAnimationFrame(function(){e=null,St.call(n)}))},this.isDirty=!1}function Et(t,e){var n=t._selectedCoordinates.filter(function(e){return t._selectedFeatureIds.has(e.feature_id)});t._selectedCoordinates.length===n.length||e.silent||(t._emitSelectionChange=!0),t._selectedCoordinates=n}Tt.prototype.createRenderBatch=function(){var t=this,e=this.render,n=0;return this.render=function(){n++},function(){t.render=e,n>0&&t.render()}},Tt.prototype.setDirty=function(){return this.isDirty=!0,this},Tt.prototype.featureChanged=function(t){return this._changedFeatureIds.add(t),this},Tt.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},Tt.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},Tt.prototype.getAllIds=function(){return this._featureIds.values()},Tt.prototype.add=function(t){return this.featureChanged(t.id),this._features[t.id]=t,this._featureIds.add(t.id),this},Tt.prototype.delete=function(t,e){var n=this;return void 0===e&&(e={}),wt(t).forEach(function(t){n._featureIds.has(t)&&(n._featureIds.delete(t),n._selectedFeatureIds.delete(t),e.silent||-1===n._deletedFeaturesToEmit.indexOf(n._features[t])&&n._deletedFeaturesToEmit.push(n._features[t]),delete n._features[t],n.isDirty=!0)}),Et(this,e),this},Tt.prototype.get=function(t){return this._features[t]},Tt.prototype.getAll=function(){var t=this;return Object.keys(this._features).map(function(e){return t._features[e]})},Tt.prototype.select=function(t,e){var n=this;return void 0===e&&(e={}),wt(t).forEach(function(t){n._selectedFeatureIds.has(t)||(n._selectedFeatureIds.add(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))}),this},Tt.prototype.deselect=function(t,e){var n=this;return void 0===e&&(e={}),wt(t).forEach(function(t){n._selectedFeatureIds.has(t)&&(n._selectedFeatureIds.delete(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))}),Et(this,e),this},Tt.prototype.clearSelected=function(t){return void 0===t&&(t={}),this.deselect(this._selectedFeatureIds.values(),{silent:t.silent}),this},Tt.prototype.setSelected=function(t,e){var n=this;return void 0===e&&(e={}),t=wt(t),this.deselect(this._selectedFeatureIds.values().filter(function(e){return-1===t.indexOf(e)}),{silent:e.silent}),this.select(t.filter(function(t){return!n._selectedFeatureIds.has(t)}),{silent:e.silent}),this},Tt.prototype.setSelectedCoordinates=function(t){return this._selectedCoordinates=t,this._emitSelectionChange=!0,this},Tt.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},Tt.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},Tt.prototype.getSelected=function(){var t=this;return this._selectedFeatureIds.values().map(function(e){return t.get(e)})},Tt.prototype.getSelectedCoordinates=function(){var t=this;return this._selectedCoordinates.map(function(e){return{coordinates:t.get(e.feature_id).getCoordinate(e.coord_path)}})},Tt.prototype.isSelected=function(t){return this._selectedFeatureIds.has(t)},Tt.prototype.setFeatureProperty=function(t,e,n){this.get(t).setProperty(e,n),this.featureChanged(t)},Tt.prototype.storeMapConfig=function(){var t=this;J.forEach(function(e){t.ctx.map[e]&&(t._mapInitialConfig[e]=t.ctx.map[e].isEnabled())})},Tt.prototype.restoreMapConfig=function(){var t=this;Object.keys(this._mapInitialConfig).forEach(function(e){t._mapInitialConfig[e]?t.ctx.map[e].enable():t.ctx.map[e].disable()})},Tt.prototype.getInitialConfigValue=function(t){return void 0===this._mapInitialConfig[t]||this._mapInitialConfig[t]};var Ct=function(){for(var t=arguments,e={},n=0;n<arguments.length;n++){var r=t[n];for(var i in r)Ot.call(r,i)&&(e[i]=r[i])}return e},Ot=Object.prototype.hasOwnProperty,Pt=["mode","feature","mouse"];function kt(e){var n=null,r=null,i={onRemove:function(){return e.map.off("load",i.connect),clearInterval(r),i.removeLayers(),e.store.restoreMapConfig(),e.ui.removeButtons(),e.events.removeEventListeners(),e.ui.clearMapClasses(),e.map=null,e.container=null,e.store=null,n&&n.parentNode&&n.parentNode.removeChild(n),n=null,this},connect:function(){e.map.off("load",i.connect),clearInterval(r),i.addLayers(),e.store.storeMapConfig(),e.events.addEventListeners()},onAdd:function(o){var a=o.fire;return o.fire=function(t,e){var n=arguments;return 1===a.length&&1!==arguments.length&&(n=[Ct({},{type:t},e)]),a.apply(o,n)},e.map=o,e.events=function(e){var n=Object.keys(e.options.modes).reduce(function(t,n){return t[n]=xt(e.options.modes[n]),t},{}),r={},i={},o={},a=null,s=null;o.drag=function(t,n){n({point:t.point,time:(new Date).getTime()})?(e.ui.queueMapClasses({mouse:w}),s.drag(t)):t.originalEvent.stopPropagation()},o.mousedrag=function(t){o.drag(t,function(t){return!st(r,t)})},o.touchdrag=function(t){o.drag(t,function(t){return!lt(i,t)})},o.mousemove=function(t){if(1===(void 0!==t.originalEvent.buttons?t.originalEvent.buttons:t.originalEvent.which))return o.mou
45sedrag(t);var n=ot(t,e);t.featureTarget=n,s.mousemove(t)},o.mousedown=function(t){r={time:(new Date).getTime(),point:t.point};var n=ot(t,e);t.featureTarget=n,s.mousedown(t)},o.mouseup=function(t){var n=ot(t,e);t.featureTarget=n,st(r,{point:t.point,time:(new Date).getTime()})?s.click(t):s.mouseup(t)},o.mouseout=function(t){s.mouseout(t)},o.touchstart=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){i={time:(new Date).getTime(),point:t.point};var n=rt.touch(t,null,e)[0];t.featureTarget=n,s.touchstart(t)}},o.touchmove=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled)return s.touchmove(t),o.touchdrag(t)},o.touchend=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){var n=rt.touch(t,null,e)[0];t.featureTarget=n,lt(i,{time:(new Date).getTime(),point:t.point})?s.tap(t):s.touchend(t)}};var l=function(t){return!(8===t||46===t||t>=48&&t<=57)};function c(r,i,o){void 0===o&&(o={}),s.stop();var l=n[r];if(void 0===l)throw new Error(r+" is not valid");a=r;var c=l(e,i);s=t(c,e),o.silent||e.map.fire(N,{mode:r}),e.store.setDirty(),e.store.render()}o.keydown=function(t){"mapboxgl-canvas"===(t.srcElement||t.target).classList[0]&&(8!==t.keyCode&&46!==t.keyCode||!e.options.controls.trash?l(t.keyCode)?s.keydown(t):49===t.keyCode&&e.options.controls.point?c(z.DRAW_POINT):50===t.keyCode&&e.options.controls.line_string?c(z.DRAW_LINE_STRING):51===t.keyCode&&e.options.controls.polygon&&c(z.DRAW_POLYGON):(t.preventDefault(),s.trash()))},o.keyup=function(t){l(t.keyCode)&&s.keyup(t)},o.zoomend=function(){e.store.changeZoom()},o.data=function(t){if("style"===t.dataType){var n=e.setup,r=e.map,i=e.options,o=e.store;i.styles.some(function(t){return r.getLayer(t.id)})||(n.addLayers(),o.setDirty(),o.render())}};var u={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){a=e.options.defaultMode,s=t(n[a](e),e)},changeMode:c,actionable:function(t){var n=!1;Object.keys(t).forEach(function(e){if(void 0===u[e])throw new Error("Invalid action type");u[e]!==t[e]&&(n=!0),u[e]=t[e]}),n&&e.map.fire($,{actions:u})},currentModeName:function(){return a},currentModeRender:function(t,e){return s.render(t,e)},fire:function(t,e){o[t]&&o[t](e)},addEventListeners:function(){e.map.on("mousemove",o.mousemove),e.map.on("mousedown",o.mousedown),e.map.on("mouseup",o.mouseup),e.map.on("data",o.data),e.map.on("touchmove",o.touchmove),e.map.on("touchstart",o.touchstart),e.map.on("touchend",o.touchend),e.container.addEventListener("mouseout",o.mouseout),e.options.keybindings&&(e.container.addEventListener("keydown",o.keydown),e.container.addEventListener("keyup",o.keyup))},removeEventListeners:function(){e.map.off("mousemove",o.mousemove),e.map.off("mousedown",o.mousedown),e.map.off("mouseup",o.mouseup),e.map.off("data",o.data),e.map.off("touchmove",o.touchmove),e.map.off("touchstart",o.touchstart),e.map.off("touchend",o.touchend),e.container.removeEventListener("mouseout",o.mouseout),e.options.keybindings&&(e.container.removeEventListener("keydown",o.keydown),e.container.removeEventListener("keyup",o.keyup))},trash:function(t){s.trash(t)},combineFeatures:function(){s.combineFeatures()},uncombineFeatures:function(){s.uncombineFeatures()},getMode:function(){return a}}}(e),e.ui=function(t){var e={},n=null,r={mode:null,feature:null,mouse:null},i={mode:null,feature:null,mouse:null};function o(t){i=Ct(i,t)}function a(){var e,n;if(t.container){var o=[],a=[];Pt.forEach(function(t){i[t]!==r[t]&&(o.push(t+"-"+r[t]),null!==i[t]&&a.push(t+"-"+i[t]))}),o.length>0&&(e=t.container.classList).remove.apply(e,o),a.length>0&&(n=t.container.classList).add.apply(n,a),r=Ct(r,i)}}function y(t,e){void 0===e&&(e={});var r=document.createElement("button");return r.className=l+" "+e.className,r.setAttribute("title",e.title),e.container.appendChild(r),r.addEventListener("click",function(r){if(r.preventDefault(),r.stopPropagation(),r.target===n)return _(),void e.onDeactivate();v(t),e.onActivate()},!0),r}function _(){n&&(n.classList.remove(g),n=null)}function v(t){_();var r=e[t];r&&r&&"trash"!==t&&(r.classList.add(g),n=r)}return{setActiveButton:v,queueMapClasses:o,updateMapClasses:a,clearMapClasses:function(){o({mode:null,feature:null,mouse:null}),a()},addButtons:function(){var n=t.options.controls,r=document.createElement("div");return r.className=m+" "+s,n?(n[E.LINE]&&(e[E.LINE]=y(E.LINE,{container:r,className:c,title:"LineString tool "+(t.options.keybindings?"(l)":""),onActivate:function(){return t.events.changeMode(z.DRAW_LINE_STRING)},onDeactivate:function(){return t.events.trash()}})),n[E.POLYGON]&&(e[E.POLYGON]=y(E.POLYGON,{container:r,className:u,title:"Polygon tool "+(t.options.keybindings?"(p)":""),onActivate:function(){return t.events.changeMode(z.DRAW_POLYGON)},onDeactivate:function(){return t.events.trash()}})),n[E.POINT]&&(e[E.POINT]=y(E.POINT,{container:r,className:h,title:"Marker tool "+(t.options.keybindings?"(m)":""),onActivate:function(){return t.events.changeMode(z.DRAW_POINT)},onDeactivate:function(){return t.events.trash()}})),n.trash&&(e.trash=y("trash",{container:r,className:d,title:"Delete",onActivate:function(){t.events.trash()}})),n.combine_features&&(e.combine_features=y("combineFeatures",{container:r,className:p,title:"Combine",onActivate:function(){t.events.combineFeatures()}})),n.uncombine_features&&(e.uncombine_features=y("uncombineFeatures",{container:r,className:f,title:"Uncombine",onActivate:function(){t.events.uncombineFeatures()}})),r):r},removeButtons:function(){Object.keys(e).forEach(function(t){var n=e[t];n.parentNode&&n.parentNode.removeChild(n),delete e[t]})}}}(e),e.container=o.getContainer(),e.store=new Tt(e),n=e.ui.addButtons(),e.o
45ptions.boxSelect&&(o.boxZoom.disable(),o.dragPan.disable(),o.dragPan.enable()),o.loaded()?i.connect():(o.on("load",i.connect),r=setInterval(function(){o.loaded()&&i.connect()},16)),e.events.start(),n},addLayers:function(){e.map.addSource(v,{data:{type:A,features:[]},type:"geojson"}),e.map.addSource(_,{data:{type:A,features:[]},type:"geojson"}),e.options.styles.forEach(function(t){e.map.addLayer(t)}),e.store.setDirty(!0),e.store.render()},removeLayers:function(){e.options.styles.forEach(function(t){e.map.getLayer(t.id)&&e.map.removeLayer(t.id)}),e.map.getSource(v)&&e.map.removeSource(v),e.map.getSource(_)&&e.map.removeSource(_)}};return e.setup=i,i}function At(t){return function(e){var n=e.featureTarget;return!!n&&!!n.properties&&n.properties.meta===t}}function It(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===Y&&t.featureTarget.properties.meta===W}function Mt(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===K&&t.featureTarget.properties.meta===W}function Dt(t){return void 0===t.featureTarget}function Bt(t){var e=t.featureTarget;return!!e&&!!e.properties&&e.properties.meta===X}function zt(t){return!!t.originalEvent&&!0===t.originalEvent.shiftKey}function Lt(t){return 27===t.keyCode}function Rt(t){return 13===t.keyCode}var jt=Ft;function Ft(t,e){this.x=t,this.y=e}function Nt(t,e){var n=e.getBoundingClientRect();return new jt(t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0))}function $t(t,e,n,r){return{type:C,properties:{meta:X,parent:t,coord_path:n,active:r?Y:K},geometry:{type:k,coordinates:e}}}function Vt(t,e,n){void 0===e&&(e={}),void 0===n&&(n=null);var r,i=t.geometry,o=i.type,a=i.coordinates,s=t.properties&&t.properties.id,l=[];function c(t,n){var r="",i=null;t.forEach(function(t,o){var a=null!=n?n+"."+o:String(o),c=$t(s,t,a,u(a));if(e.midpoints&&i){var h=function(t,e,n){var r=e.geometry.coordinates,i=n.geometry.coordinates;if(r[1]>85||r[1]<-85||i[1]>85||i[1]<-85)return null;var o={lng:(r[0]+i[0])/2,lat:(r[1]+i[1])/2};return{type:C,properties:{meta:Z,parent:t,lng:o.lng,lat:o.lat,coord_path:n.properties.coord_path},geometry:{type:k,coordinates:[o.lng,o.lat]}}}(s,i,c);h&&l.push(h)}i=c;var d=JSON.stringify(t);r!==d&&l.push(c),0===o&&(r=d)})}function u(t){return!!e.selectedPaths&&-1!==e.selectedPaths.indexOf(t)}return o===k?l.push($t(s,a,n,u(n))):o===O?a.forEach(function(t,e){c(t,null!==n?n+"."+e:String(e))}):o===P?c(a,n):0===o.indexOf(I)&&(r=o.replace(I,""),a.forEach(function(n,i){var o={type:C,properties:t.properties,geometry:{type:r,coordinates:n}};l=l.concat(Vt(o,e,i))})),l}Ft.prototype={clone:function(){return new Ft(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}
45,_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}},Ft.convert=function(t){return t instanceof Ft?t:Array.isArray(t)?new Ft(t[0],t[1]):t};var Ut=function(t){setTimeout(function(){t.map&&t.map.doubleClickZoom&&t._ctx&&t._ctx.store&&t._ctx.store.getInitialConfigValue&&t._ctx.store.getInitialConfigValue("doubleClickZoom")&&t.map.doubleClickZoom.enable()},0)},Gt=function(t){setTimeout(function(){t.map&&t.map.doubleClickZoom&&t.map.doubleClickZoom.disable()},0)},Ht=function(t){if(!t||!t.type)return null;var e=qt[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featurecollection"===e?t:void 0:null},qt={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function Wt(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce(function(t,e){return t.concat(Wt(e))},[]),t;case"Feature":return t.geometry?Wt(t.geometry).map(function(e){var n={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:e};return void 0!==t.id&&(n.id=t.id),n}):[t];case"MultiPoint":return t.coordinates.map(function(t){return{type:"Point",coordinates:t}});case"MultiPolygon":return t.coordinates.map(function(t){return{type:"Polygon",coordinates:t}});case"MultiLineString":return t.coordinates.map(function(t){return{type:"LineString",coordinates:t}});case"GeometryCollection":return t.geometries.map(Wt).reduce(function(t,e){return t.concat(e)},[]);case"Point":case"Polygon":case"LineString":return[t]}}var Zt=function(t){if(!t)return[];var e=Wt(Ht(t)),n=[];return e.features.forEach(function(t){t.geometry&&(n=n.concat(function t(e){return Array.isArray(e)&&e.length&&"number"==typeof e[0]?[e]:e.reduce(function(e,n){return Array.isArray(n)&&Array.isArray(n[0])?e.concat(t(n)):(e.push(n),e)},[])}(t.geometry.coordinates)))}),n},Xt=ct(function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],u=!0;return function t(h){var d=n?i(h):h,p={},f=!0,m={node:d,node_:h,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){m.isRoot||(m.parent.node[m.key]=t),m.node=t,e&&(f=!1)},delete:function(t){delete m.parent.node[m.key],t&&(f=!1)},remove:function(t){s(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],t&&(f=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){u=!1},block:function(){f=!1}};if(!u)return m;function g(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=o(m.node)),m.isLeaf=0==m.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===h){m.circular=a[t];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}g();var y=e.call(m,m.node);return void 0!==y&&m.update&&m.update(y),p.before&&p.before.call(m,m.node),f?("object"!=typeof m.node||null===m.node||m.circular||(a.push(m),g(),l(m.keys,function(e,i){r.push(e),p.pre&&p.pre.call(m,m.node[e],e);var o=t(m.node[e]);n&&c.call(m.node,e)&&(m.node[e]=o.node),o.isLast=i==m.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(m,o),r.pop()}),a.pop()),p.after&&p.after.call(m,m.node),m):m}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return l(o(t),function(n){e[n]=t[n]}),e}return t}
45n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!c.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!c.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];c.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach(function(e){this.isRoot&&n||(r=t.call(this,r,e))}),r},n.prototype.paths=function(){var t=[];return this.forEach(function(e){t.push(this.path)}),t},n.prototype.nodes=function(){var t=[];return this.forEach(function(e){t.push(this.node)}),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),l(o(r),function(t){s[t]=n(r[t])}),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},l=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};l(o(n.prototype),function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}});var c=Object.hasOwnProperty||function(t,e){return e in t}}),Yt=Kt;function Kt(t){if(!(this instanceof Kt))return new Kt(t);this._bbox=t||[1/0,1/0,-1/0,-1/0],this._valid=!!t}Kt.prototype.include=function(t){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[0]),this._bbox[3]=Math.max(this._bbox[3],t[1]),this},Kt.prototype.equals=function(t){var e;return e=t instanceof Kt?t.bbox():t,this._bbox[0]==e[0]&&this._bbox[1]==e[1]&&this._bbox[2]==e[2]&&this._bbox[3]==e[3]},Kt.prototype.center=function(t){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},Kt.prototype.union=function(t){var e;return this._valid=!0,e=t instanceof Kt?t.bbox():t,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[2]),this._bbox[3]=Math.max(this._bbox[3],e[3]),this},Kt.prototype.bbox=function(){return this._valid?this._bbox:null},Kt.prototype.contains=function(t){if(!t)return this._fastContains();if(!this._valid)return null;var e=t[0],n=t[1];return this._bbox[0]<=e&&this._bbox[1]<=n&&this._bbox[2]>=e&&this._bbox[3]>=n},Kt.prototype.intersect=function(t){return this._valid?(e=t instanceof Kt?t.bbox():t,!(this._bbox[0]>e[2]||this._bbox[2]<e[0]||this._bbox[3]<e[1]||this._bbox[1]>e[3])):null;var e},Kt.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var t="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",t)},Kt.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Jt={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},Qt=Object.keys(Jt),te=function(t){return ee(t).bbox()};function ee(t){for(var e=Yt(),n=Zt(t),r=0;r<n.length;r++)e.include(n[r]);return e}function ne(t,e){var n=-90,r=90,i=-90,o=90,a=270,s=-270;t.forEach(function(t){var e=te(t),l=e[1],c=e[3],u=e[0],h=e[2];l>n&&(n=l),c<r&&(r=c),c>i&&(i=c),l<o&&(o=l),u<a&&(a=u),h>s&&(s=h)});var l=e;return n+l.lat>85&&(l.lat=85-n),i+l.lat>90&&(l.lat=90-i),r+l.lat<-85&&(l.lat=-85-r),o+l.lat<-90&&(l.lat=-90-o),a+l.lng<=-270&&(l.lng+=360*Math.ceil(Math.abs(l.lng)/360)),s+l.lng>=270&&(l.lng-=360*Math.ceil(Math.abs(l.lng)/360)),l}function re(t,e){var n=ne(t.map(function(t){return t.toGeoJSON()}),e);t.forEach(function(t){var e,r=t.getCoordinates(),i=function(t){var e={lng:t[0]+n.lng,lat:t[1]+n.lat};return[e.lng,e.lat]},o=function(t){return t.map(function(t){return i(t)})};t.type===k?e=i(r):t.type===P||t.type===M?e=r.map(i):t.type===O||t.type===D?e=r.map(o):t.type===B&&(e=r.map(function(t){return t.map(function(t){return o(t)})})),t.incomingCoords(e)})}te.polygon=function(t){return ee(t).polygon()},te.bboxify=function(t){return Xt(t).map(function(t){t&&Qt.some(function(e){return!!t[e]&&-1!==Jt[e].indexOf(t.type)})&&(t.bbox=ee(t).bbox(),this.update(t))})};var ie={onSetup:function(t){var e=this,n={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:t.featureIds||[]};return this.setSelected(n.initiallySelectedFeatureIds.filter(function(t){return void 0!==e.getFeature(t)})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),n},fireUpdate:function(){this.map.fire(j,{action:H,features:this.getSelected().map(function(t){return t.toGeoJSON()})})},fireActionable:function(){var t=this,e=this.getSelected(),n=e.filter(function(e){return t.isInstanceOf("MultiFeature",e)}),r=!1;if(e.length>1){r=!0;var i=e[0].type.replace("Multi","");e.forEach(function(t){t.type.replace("Multi","")!==i&&(r=!1)})}var o=n.length>0,a=e.length>0;this.setActionableState({combineFeatures:r,uncombineFeatures:o,trash:a})},getUniqueIds:function(t){return t.length?t.map(function(t){return t.properties.id}).filter(function(t){return void 0!==t}).reduce(function(t,e){return t.add(e),t},new et).values():[]},stopExtendedInteractions:function(t){t.boxSelectElement&&(t.boxSelectElement.parentNode&&t.boxSelectElement.parentNode.removeChild(t.boxSelectElement),t.boxSelectElement=null),this.map.dragPan.enable(),t.boxSelecting=!1,t.canBoxSelect=!1,t.dragMoving=!1,t.canDragMove=!1},onStop:function(){Ut(this)},onMouseMove:function(t){return this.stopExtendedInteractions(t),!0},onMouseOut:function(t){return!t.dragMoving||this.fireUpdate()}};
45ie.onTap=ie.onClick=function(t,e){return Dt(e)?this.clickAnywhere(t,e):At(X)(e)?this.clickOnVertex(t,e):function(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.meta===W}(e)?this.clickOnFeature(t,e):void 0},ie.clickAnywhere=function(t){var e=this,n=this.getSelectedIds();n.length&&(this.clearSelectedFeatures(),n.forEach(function(t){return e.doRender(t)})),Ut(this),this.stopExtendedInteractions(t)},ie.clickOnVertex=function(t,e){this.changeMode(z.DIRECT_SELECT,{featureId:e.featureTarget.properties.parent,coordPath:e.featureTarget.properties.coord_path,startPos:e.lngLat}),this.updateUIClasses({mouse:x})},ie.startOnActiveFeature=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),this.doRender(e.featureTarget.properties.id),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},ie.clickOnFeature=function(t,e){var n=this;Gt(this),this.stopExtendedInteractions(t);var r=zt(e),i=this.getSelectedIds(),o=e.featureTarget.properties.id,a=this.isSelected(o);if(!r&&a&&this.getFeature(o).type!==k)return this.changeMode(z.DIRECT_SELECT,{featureId:o});a&&r?(this.deselect(o),this.updateUIClasses({mouse:S}),1===i.length&&Ut(this)):!a&&r?(this.select(o),this.updateUIClasses({mouse:x})):a||r||(i.forEach(function(t){return n.doRender(t)}),this.setSelected(o),this.updateUIClasses({mouse:x})),this.doRender(o)},ie.onMouseDown=function(t,e){return It(e)?this.startOnActiveFeature
45(t,e):this.drawConfig.boxSelect&&function(t){return!!t.originalEvent&&!!t.originalEvent.shiftKey&&0===t.originalEvent.button}(e)?this.startBoxSelect(t,e):void 0},ie.startBoxSelect=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),t.boxSelectStartLocation=Nt(e.originalEvent,this.map.getContainer()),t.canBoxSelect=!0},ie.onTouchStart=function(t,e){if(It(e))return this.startOnActiveFeature(t,e)},ie.onDrag=function(t,e){return t.canDragMove?this.dragMove(t,e):this.drawConfig.boxSelect&&t.canBoxSelect?this.whileBoxSelect(t,e):void 0},ie.whileBoxSelect=function(t,e){t.boxSelecting=!0,this.updateUIClasses({mouse:b}),t.boxSelectElement||(t.boxSelectElement=document.createElement("div"),t.boxSelectElement.classList.add(y),this.map.getContainer().appendChild(t.boxSelectElement));var n=Nt(e.originalEvent,this.map.getContainer()),r=Math.min(t.boxSelectStartLocation.x,n.x),i=Math.max(t.boxSelectStartLocation.x,n.x),o=Math.min(t.boxSelectStartLocation.y,n.y),a=Math.max(t.boxSelectStartLocation.y,n.y),s="translate("+r+"px, "+o+"px)";t.boxSelectElement.style.transform=s,t.boxSelectElement.style.WebkitTransform=s,t.boxSelectElement.style.width=i-r+"px",t.boxSelectElement.style.height=a-o+"px"},ie.dragMove=function(t,e){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};re(this.getSelected(),n),t.dragMoveLocation=e.lngLat},ie.onMouseUp=function(t,e){var n=this;if(t.dragMoving)this.fireUpdate();else if(t.boxSelecting){var r=[t.boxSelectStartLocation,Nt(e.originalEvent,this.map.getContainer())],i=this.featuresAt(null,r,"click"),o=this.getUniqueIds(i).filter(function(t){return!n.isSelected(t)});o.length&&(this.select(o),o.forEach(function(t){return n.doRender(t)}),this.updateUIClasses({mouse:x}))}this.stopExtendedInteractions(t)},ie.toDisplayFeatures=function(t,e,n){e.properties.active=this.isSelected(e.properties.id)?Y:K,n(e),this.fireActionable(),e.properties.active===Y&&e.geometry.type!==k&&Vt(e).forEach(n)},ie.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},ie.onCombineFeatures=function(){var t=this.getSelected();if(!(0===t.length||t.length<2)){for(var e=[],n=[],r=t[0].type.replace("Multi",""),i=0;i<t.length;i++){var o=t[i];if(o.type.replace("Multi","")!==r)return;
45o.type.includes("Multi")?o.getCoordinates().forEach(function(t){e.push(t)}):e.push(o.getCoordinates()),n.push(o.toGeoJSON())}if(n.length>1){var a=this.newFeature({type:C,properties:n[0].properties,geometry:{type:"Multi"+r,coordinates:e}});this.addFeature(a),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([a.id]),this.map.fire(U,{createdFeatures:[a.toGeoJSON()],deletedFeatures:n})}this.fireActionable()}},ie.onUncombineFeatures=function(){var t=this,e=this.getSelected();if(0!==e.length){for(var n=[],r=[],i=function(i){var o=e[i];t.isInstanceOf("MultiFeature",o)&&(o.getFeatures().forEach(function(e){t.addFeature(e),e.properties=o.properties,n.push(e.toGeoJSON()),t.select([e.id])}),t.deleteFeature(o.id,{silent:!0}),r.push(o.toGeoJSON()))},o=0;o<e.length;o++)i(o);n.length>1&&this.map.fire(G,{createdFeatures:n,deletedFeatures:r}),this.fireActionable()}};var oe=At(X),ae=At(Z),se={fireUpdate:function(){this.map.fire(j,{action:q,features:this.getSelected().map(function(t){return t.toGeoJSON()})})},fireActionable:function(t){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:t.selectedCoordPaths.length>0})},startDragging:function(t,e){this.map.dragPan.disable(),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},stopDragging:function(t){this.map.dragPan.enable(),t.dragMoving=!1,t.canDragMove=!1,t.dragMoveLocation=null},onVertex:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties,r=t.selectedCoordPaths.indexOf(n.coord_path);zt(e)||-1!==r?zt(e)&&-1===r&&t.selectedCoordPaths.push(n.coord_path):t.selectedCoordPaths=[n.coord_path];var i=this.pathsToCoordinates(t.featureId,t.selectedCoordPaths);this.setSelectedCoordinates(i)},onMidpoint:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties;t.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),t.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(t,e){return e.map(function(e){return{feature_id:t,coord_path:e}})},onFeature:function(t,e){0===t.selectedCoordPaths.length?this.startDragging(t,e):this.stopDragging(t)},dragFeature:function(t,e,n){re(this.getSelected(),n),t.dragMoveLocation=e.lngLat},dragVertex:function(t,e,n){for(var r=t.selectedCoordPaths.map(function(e){return t.feature.getCoordinate(e)}),i=ne(r.map(function(t){return{type:C,properties:{},geometry:{type:k,coordinates:t}}}),n),o=0;o<r.length;o++){var a=r[o];t.feature.updateCoordinate(t.selectedCoordPaths[o],a[0]+i.lng,a[1]+i.lat)}},clickNoTarget:function(){this.changeMode(z.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(z.SIMPLE_SELECT)},clickActiveFeature:function(t){t.selectedCoordPaths=[],this.clearSelectedCoordinates(),t.feature.changed()},onSetup:function(t){var e=t.featureId,n=this.getFeature(e);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===k)throw new TypeError("direct_select mode doesn't handle point features");var r={featureId:e,feature:n,dragMoveLocation:t.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:t.coordPath?[t.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(e,r.selectedCoordPaths)),this.setSelected(e),Gt(this),this.setActionableState({trash:!0}),r},onStop:function(){Ut(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(t,e,n){t.featureId===e.properties.id?(e.properties.active=Y,n(e),Vt(e,{map:this.map,midpoints:!0,selectedPaths:t.selectedCoordPaths}).forEach(n)):(e.properties.active=K,n(e)),this.fireActionable(t)},onTrash:function(t){t.selectedCoordPaths.sort(function(t,e){return e.localeCompare(t,"en",{numeric:!0})}).forEach(function(e){return t.feature.removeCoordinate(e)}),this.fireUpdate(),t.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(t),!1===t.feature.isValid()&&(this.deleteFeature([t.featureId]),this.changeMode(z.SIMPLE_SELECT,{}))},onMouseMove:function(t,e){var n=It(e),r=oe(e),i=0===t.selectedCoordPaths.length;return n&&i||r&&!i?this.updateUIClasses({mouse:x}):this.updateUIClasses({mouse:T}),this.stopDragging(t),!0},onMouseOut:function(t){return t.dragMoving&&this.fireUpdate(),!0}};se.onTouchStart=se.onMouseDown=function(t,e){return oe(e)?this.onVertex(t,e):It(e)?this.onFeature(t,e):ae(e)?this.onMidpoint(t,e):void 0},se.onDrag=function(t,e){if(!0===t.canDragMove){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};t.selectedCoordPaths.length>
450?this.dragVertex(t,e,n):this.dragFeature(t,e,n),t.dragMoveLocation=e.lngLat}},se.onClick=function(t,e){return Dt(e)?this.clickNoTarget(t,e):It(e)?this.clickActiveFeature(t,e):Mt(e)?this.clickInactive(t,e):void this.stopDragging(t)},se.onTap=function(t,e){return Dt(e)?this.clickNoTarget(t,e):It(e)?this.clickActiveFeature(t,e):Mt(e)?this.clickInactive(t,e):void 0},se.onTouchEnd=se.onMouseUp=function(t){t.dragMoving&&this.fireUpdate(),this.stopDragging(t)};var le={};function ce(t,e){return!!t.lngLat&&t.lngLat.lng===e[0]&&t.lngLat.lat===e[1]}le.onSetup=function(){var t=this.newFeature({type:C,properties:{},geometry:{type:k,coordinates:[]}});return this.addFeature(t),this.clearSelectedFeatures(),this.updateUIClasses({mouse:b}),this.activateUIButton(E.POINT),this.setActionableState({trash:!0}),{point:t}},le.stopDrawingAndRemove=function(t){this.deleteFeature([t.point.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT)},le.onTap=le.onClick=function(t,e){this.updateUIClasses({mouse:x}),t.point.updateCoordinate("",e.lngLat.lng,e.lngLat.lat),this.map.fire(L,{features:[t.point.toGeoJSON()]}),this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.point.id]})},le.onStop=function(t){this.activateUIButton(),t.point.getCoordinate().length||this.deleteFeature([t.point.id],{silent:!0})},le.toDisplayFeatures=function(t,e,n){var r=e.properties.id===t.point.id;if(e.properties.active=r?Y:K,!r)return n(e)},le.onTrash=le.stopDrawingAndRemove,le.onKeyUp=function(t,e){if(Lt(e)||Rt(e))return this.stopDrawingAndRemove(t,e)};var ue={onSetup:function(){var t=this.newFeature({type:C,properties:{},geometry:{type:O,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),Gt(this),this.updateUIClasses({mouse:b}),this.activateUIButton(E.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&ce(e,t.polygon.coordinates[0][t.currentVertexPosition-1]))return this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.polygon.id]});this.updateUIClasses({mouse:b}),t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),t.currentVertexPosition++,t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},onMouseMove:function(t,e){t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),Bt(e)&&this.updateUIClasses({mouse:S})}};ue.onTap=ue.onClick=function(t,e){return Bt(e)?this.clickOnVertex(t,e):this.clickAnywhere(t,e)},ue.onKeyUp=function(t,e){Lt(e)?(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT)):Rt(e)&&this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},ue.onStop=function(t){this.updateUIClasses({mouse:T}),Ut(this),this.activateUIButton(),void 0!==this.getFeature(t.polygon.id)&&(t.polygon.removeCoordinate("0."+t.currentVertexPosition),t.polygon.isValid()?this.map.fire(L,{features:[t.polygon.toGeoJSON()]}):(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT,{},{silent:!0})))},ue.toDisplayFeatures=function(t,e,n){var r=e.properties.id===t.polygon.id;if(e.properties.active=r?Y:K,!r)return n(e);if(0!==e.geometry.coordinates.length){var i=e.geometry.coordinates[0].length;if(!(i<3)){if(e.properties.meta=W,n($t(t.polygon.id,e.geometry.coordinates[0][0],"0.0",!1)),i>3){var o=e.geometry.coordinates[0].length-3;n($t(t.polygon.id,e.geometry.coordinates[0][o],"0."+o,!1))}if(i<=4){var a=[[e.geometry.coordinates[0][0][0],e.geometry.coordinates[0][0][1]],[e.geometry.coordinates[0][1][0],e.geometry.coordinates[0][1][1]]];if(n({type:C,properties:e.properties,geometry:{coordinates:a,type:P}}),3===i)return}return n(e)}}},ue.onTrash=function(t){this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT)};var he={onSetup:function(t){var e,n,r=(t=t||{}).featureId,i="forward";if(r){if(!(e=this.getFeature(r)))throw new Error("Could not find a feature with the provided featureId");var o=t.from;if(o&&"Feature"===o.type&&o.geometry&&"Point"===o.geometry.type&&(o=o.geometry),o&&"Point"===o.type&&o.coordinates&&2===o.coordinates.length&&(o=o.c
45oordinates),!o||!Array.isArray(o))throw new Error("Please use the `from` property to indicate which point to continue the line from");var a=e.coordinates.length-1;if(e.coordinates[a][0]===o[0]&&e.coordinates[a][1]===o[1])n=a+1,e.addCoordinate.apply(e,[n].concat(e.coordinates[a]));else{if(e.coordinates[0][0]!==o[0]||e.coordinates[0][1]!==o[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");i="backwards",n=0,e.addCoordinate.apply(e,[n].concat(e.coordinates[0]))}}else e=this.newFeature({type:C,properties:{},geometry:{type:P,coordinates:[]}}),n=0,this.addFeature(e);return this.clearSelectedFeatures(),Gt(this),this.updateUIClasses({mouse:b}),this.activateUIButton(E.LINE),this.setActionableState({trash:!0}),{line:e,currentVertexPosition:n,direction:i}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&ce(e,t.line.coordinates[t.currentVertexPosition-1])||"backwards"===t.direction&&ce(e,t.line.coordinates[t.currentVertexPosition+1]))return this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.line.id]});this.updateUIClasses({mouse:b}),t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),"forward"===t.direction?(t.currentVertexPosition++,t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)):t.line.addCoordinate(0,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.line.id]})},onMouseMove:function(t,e){t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),Bt(e)&&this.updateUIClasses({mouse:S})}};he.onTap=he.onClick=function(t,e){if(Bt(e))return this.clickOnVertex(t,e);this.clickAnywhere(t,e)},he.onKeyUp=function(t,e){Rt(e)?this.changeMode(z.SIMPLE_SELECT,{featureIds:[t.line.id]}):Lt(e)&&(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT))},he.onStop=function(t){Ut(this),this.activateUIButton(),void 0!==this.getFeature(t.line.id)&&(t.line.removeCoordinate(""+t.currentVertexPosition),t.line.isValid()?this.map.fire(L,{features:[t.line.toGeoJSON()]}):(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT,{},{silent:!0})))},he.onTrash=function(t){this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(z.SIMPLE_SELECT)},he.toDisplayFeatures=function(t,e,n){var r=e.properties.id===t.line.id;if(e.properties.active=r?Y:K,!r)return n(e);e.geometry.coordinates.length<2||(e.properties.meta=W,n($t(t.line.id,e.geometry.coordinates["forward"===t.direction?e.geometry.coordinates.length-2:1],""+("forward"===t.direction?e.geometry.coordinates.length-2:1),!1)),n(e))};var de={simple_select:ie,direct_select:se,draw_point:le,draw_polygon:ue,draw_line_string:he},pe={defaultMode:z.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"cir
45cle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}],modes:de,controls:{},userProperties:!1},fe={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},me={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function ge(t,e){return t.map(function(t){return t.source?t:Ct(t,{id:t.id+"."+e,source:"hot"===e?_:v})})}var ye=ct(function(t,n){var r="[object Arguments]",i="[object Map]",o="[object Object]",a="[object Set]",s=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[r]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[i]=c["[object Number]"]=c[o]=c["[object RegExp]"]=c[a]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof e&&e&&e.Object===Object&&e,h="object"==typeof self&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),p=n&&!n.nodeType&&n,f=p&&t&&!t.nodeType&&t,m=f&&f.exports===p,g=m&&u.process,y=function(){try{return g&&g.binding&&g.binding("util")}catch(t){}}(),_=y&&y.isTypedArray;function v(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function b(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function x(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var w,S,T,E=Array.prototype,C=Function.prototype,O=Object.prototype,P=d["__core-js_shared__"],k=C.toString,A=O.hasOwnProperty,I=(w=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",M=O.toString,D=RegExp("^"+k.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=m?d.Buffer:void 0,z=d.Symbol,L=d.Uint8Array,R=O.propertyIsEnumerable,j=E.splice,F=z?z.toStringTag:void 0,N=Object.getOwnPropertySymbols,$=B?B.isBuffer:void 0,V=(S=Object.keys,T=Object,function(t){return S(T(t))}),U=yt(d,"DataView"),G=yt(d,"Map"),H=yt(d,"Promise"),q=yt(d,"Set"),W=yt(d,"WeakMap"),Z=yt(Object,"create"),X=xt(U),Y=xt(G),K=xt(H),J=xt(q),Q=xt(W),tt=z?z.prototype:void 0,et=tt?tt.valueOf:void 0;function nt(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])}}function rt(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])}}function it(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])}}function ot(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new it;++e<n;)this.add(t[e])}function at(t){var e=this.__data__=new rt(t);this.size=e.size}
vendor: 1,804 bytes, line 45
45function st(t,e){var n=Tt(t),r=!n&&St(t),i=!n&&!r&&Et(t),o=!n&&!r&&!i&&At(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=s.length;for(var c in t)!e&&!A.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bt(c,l))||s.push(c);return s}function lt(t,e){for(var n=t.length;n--;)if(wt(t[n][0],e))return n;return-1}function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":F&&F in Object(t)?function(t){var e=A.call(t,F),n=t[F];try{t[F]=void 0;var r=!0}catch(t){}var i=M.call(t);return r&&(e?t[F]=n:delete t[F]),i}(t):function(t){return M.call(t)}(t)}function ut(t){return kt(t)&&ct(t)==r}function ht(t,e,n,s,l){return t===e||(null==t||null==e||!kt(t)&&!kt(e)?t!=t&&e!=e:function(t,e,n,s,l,c){var u=Tt(t),h=Tt(e),d=u?"[object Array]":vt(t),p=h?"[object Array]":vt(e),f=(d=d==r?o:d)==o,m=(p=p==r?o:p)==o,g=d==p;if(g&&Et(t)){if(!Et(e))return!1;u=!0,f=!1}if(g&&!f)return c||(c=new at),u||At(t)?ft(t,e,n,s,l,c):function(t,e,n,r,o,s,l){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!s(new L(t),new L(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return wt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case i:var c=b;case a:var u=1&r;if(c||(c=x),t.size!=e.size&&!u)return!1;var h=l.get(t);if(h)return h==e;r|=2,l.set(t,e);var d=ft(c(t),c(e),r,o,s,l);return l.delete(t),d;case"[object Symbol]":if(et)return et.call(t)==et.call(e)}return!1}(t,e,d,n,s,l,c);if(!(1&n)){var y=f&&A.call(t,"__wrapped__"),_=m&&A.call(e,"__wrapped__");
45if(y||_){var v=y?t.value():t,w=_?e.value():e;return c||(c=new at),l(v,w,n,s,c)}}return!!g&&(c||(c=new at),function(t,e,n,r,i,o){var a=1&n,s=mt(t),l=s.length,c=mt(e).length;if(l!=c&&!a)return!1;for(var u=l;u--;){var h=s[u];if(!(a?h in e:A.call(e,h)))return!1}var d=o.get(t);if(d&&o.get(e))return d==e;var p=!0;o.set(t,e),o.set(e,t);for(var f=a;++u<l;){h=s[u];var m=t[h],g=e[h];if(r)var y=a?r(g,m,h,e,t,o):r(m,g,h,t,e,o);if(!(void 0===y?m===g||i(m,g,n,r,o):y)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var _=t.constructor,v=e.constructor;_==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,s,l,c))}(t,e,n,s,ht,l))}function dt(t){return!(!Pt(t)||function(t){return!!I&&I in t}(t))&&(Ct(t)?D:s).test(xt(t))}function pt(t){if(n=(e=t)&&e.constructor,r="function"==typeof n&&n.prototype||O,e!==r)return V(t);var e,n,r,i=[];for(var o in Object(t))A.call(t,o)&&"constructor"!=o&&i.push(o);return i}function ft(t,e,n,r,i,o){var a=1&n,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var u=-1,h=!0,d=2&n?new ot:void 0;for(o.set(t,e),o.set(e,t);++u<s;){var p=t[u],f=e[u];if(r)var m=a?r(f,p,u,e,t,o):r(p,f,u,t,e,o);if(void 0!==m){if(m)continue;h=!1;break}if(d){if(!v(e,function(t,e){if(a=e,!d.has(a)&&(p===t||i(p,t,n,r,o)))return d.push(e);var a})){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function mt(t){return function(t,e,n){var r=e(t);return Tt(t)?r:function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}(r,n(t))}(t,It,_t)}function gt(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function yt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return dt(n)?n:void 0}nt.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},nt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nt.prototype.get=function(t){var e=this.__data__;if(Z){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return A.call(e,t)?e[t]:void 0},nt.prototype.has=function(t){var e=this.__data__;return Z?void 0!==e[t]:A.call(e,t)},nt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Z&&void 0===e?"__lodash_hash_undefined__":e,this},rt.prototype.clear=function(){this.__data__=[],this.size=0},rt.prototype.delete=function(t){var e=this.__data__,n=lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():j.call(e,n,1),--this.size,!0)},rt.prototype.get=function(t){var e=this.__data__,n=lt(e,t);return n<0?void 0:e[n][1]},rt.prototype.has=function(t){return lt(this.__data__,t)>-1},rt.prototype.set=function(t,e){var n=this.__data__,r=lt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},it.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(G||rt),string:new nt}},it.prototype.delete=function(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e},it.prototype.get=function(t){return gt(this,t).get(t)},it.prototype.has=function(t){return gt(this,t).has(t)},it.prototype.set=function(t,e){var n=gt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},ot.prototype.add=ot.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ot.prototype.has=function(t){return this.__data__.has(t)},at.prototype.clear=function(){this.__data__=new rt,this.size=0},at.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},at.prototype.get=function(t){return this.__data__.get(t)},at.prototype.has=function(t){return this.__data__.has(t)},at.prototype.set=function(t,e){var n=this.__data__;if(n instanceof rt){var r=n.__data__;if(!G||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new it(r)}return n.set(t,e),this.size=n.size,this};var _t=N?function(t){return null==t?[]:(t=Object(t),function(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}(N(t),function(e){return R.call(t,e)}))}:function(){return[]},vt=ct;function bt(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||l.test(t))&&t>-1&&t%1==0&&t<e}function xt(t){if(null!=t){try{return k.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function wt(t,e){return t===e||t!=t&&e!=e}(U&&"[object DataView]"!=vt(new U(new ArrayBuffer(1)))||G&&vt(new G)!=i||H&&"[object Promise]"!=vt(H.resolve())||q&&vt(new q)!=a||W&&"[object WeakMap]"!=vt(new W))&&(vt=function(t){var e=ct(t),n=e==o?t.constructor:void 0,r=n?xt(n):"";if(r)switch(r){case X:return"[object DataView]";case Y:return i;case K:return"[object Promise]";case J:return a;case Q:return"[object WeakMap]"}return e});var St=ut(function(){return arguments}())?ut:function(t){return kt(t)&&A.call(t,"callee")&&!R.call(t,"callee")},Tt=Array.isArray,Et=$||function(){return!1};function Ct(t){if(!Pt(t))return!1;var e=ct(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ot(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Pt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function kt(t){return null!=t&&"object"==typeof t}var At=_?function(t){return function(e){return t(e)}}(_):function(t){return kt(t)&&Ot(t.length)&&!!c[ct(t)]};function It(t){return null!=(e=t)&&Ot(e.length)&&!Ct(e)?st(t):pt(t);var e}t.exports=function(t,e){return ht(t,e)}}),_e={Polygon:ft,LineString:pt,Point:dt,MultiPolygon:yt,MultiLineString:yt,MultiPoint:yt};function ve(t,e){return e.modes=z,e.getFeatureIdsAt=function(e){return rt.click({point:e},null,t).map(function(t){return t.properties.id})},e.getSelectedIds=function(){return t.store.getSelectedIds()},e.getSelected=function(){return{type:A,features:t.store.getSelectedIds().map(function(e){return t.store.get(e)}).map(function(t){return t.toGeoJSON()})}},e.getSelectedPoints=function(){return{type:A,features:t.store.getSelectedCoordinates().map(function(t){return{type:C,properties:{},geometry:{type:k,coordinates:t.coordinates}}})}},e.set=function(n){if(void 0===n.type||n.type!==A||!Array.isArray(n.features))throw new Error("Invalid FeatureCollection");var r=t.store.createRenderBatch(),i=t.store.getAllIds().slice(),o=e.add(n),a=new et(o);return(i=i.filter(function(t){return!a.has(t)})).length&&e.delete(i),r(),o},e.add=function(e){var n=JSON.parse(JSON.stringify(Ht(e))).features.map(function(e){if(e.id=e.id||ut(),null===e.geometry)throw new Error("Invalid geometry: null");if(void 0===t.store.get(e.id)||t.store.get(e.id).type!==e.geometry.type){var n=_e[e.geometry.type];if(void 0===n)throw new Error("Invalid geometry type: "+e.geometry.type+".");var r=new n(t,e);t.store.add(r)}else{var i=t.store.get(e.id);i.properties=e.properties,ye(i.getCoordinates(),e.geometry.coordinates)||i.incomingCoords(e.geometry.coordinates)}return e.id});return t.store.render(),n},e.get=function(e){var n=t.store.get(e);if(n)return n.toGeoJSON()},e.getAll=function(){return{type:A,features:t.store.getAll().map(function(t){return t.toGeoJSON()})}},e.delete=function(n){return t.store.delete(n,{silent:!0}),e.getMode()!==z.DIRECT_SELECT||t.store.getSelectedIds().length?t.store.render():t.events.changeMode(z.SIMPLE_SELECT,void 0,{silent:!0}),e},e.deleteAll=function(){return t.store.delete(t.store.getAllIds(),{silent:!0}),e.getMode()===z.DIRECT_SELECT?t.events.changeMode(z.SIMPLE_SELECT,void 0,{silent:!0}):t.store.render(),e},e.changeMode=function(n,r){return void 0===r&&(r={}),n===z.SIMPLE_SELECT&&e.getMode()===z.SIMPLE_SELECT?(i=r.featureIds||[],o=t.store.getSelectedIds(),i.length===o.length&&JSON.stringify(i.map(function(t){return t}).sort())===JSON.stringify(o.map(function(t){return t}).sort())||(t.store.setSelected(r.featureIds,{silent:!0}),t.store.render()),e):(n===z.DIRECT_SELECT&&e.getMode()===z.DIRECT_SELECT&&r.featureId===t.store.getSelectedIds()[0]||t.events.changeMode(n,r,{silent:!0}),e);var i,o},e.getMode=function(){return t.events.getMode()},e.trash=function(){return t.events.trash({silent:!0}),e},e.combineFeatures=function(){return t.events.combineFeatures({silent:!0}),e},e.uncombineFeatures=function(){return t.events.uncombineFeatures({silent:!0}),e},e.setFeatureProperty=function(n,r,i){return t.store.setFeatureProperty(n,r,i),e},e}var be=function(t,e){var n={options:t=function(t){void 0===t&&(t={});var e=Ct(t);return t.controls||(e.controls={}),!1===t.displayControlsDefault?e.controls=Ct(me,t.controls):e.controls=Ct(fe,t.controls),(e=Ct(pe,e)).styles=ge(e.styles,"cold").concat(ge(e.styles,"hot")),e}(t)};e=ve(n,e),n.api=e;var r=kt(n);return e.onAdd=r.onAdd,e.onRemove=r.onRemove,e.types=E,e.options=t,e};function xe(t){be(t,this)}return xe.modes=de,xe})}).call(this,n("c8ba"))},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ccb9:function(t,e,n){e.f=n("5168")},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},ce10:function(t,e,n){var r=n("69a8"),i=n("6821"),o=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,s=i(t),l=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);while(e.length>
45l)r(s,n=e[l++])&&(~o(c,n)||c.push(n));return c}},ce7e:function(t,e,n){var r=n("63b6"),i=n("584a"),o=n("294c");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},cee4:function(t,e,n){"use strict";var r=n("c532"),i=n("1d2b"),o=n("0a06"),a=n("2444");function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var l=s(a);l.Axios=o,l.create=function(t){return s(r.merge(a,t))},l.Cancel=n("7a77"),l.CancelToken=n("8df4"),l.isCancel=n("2e67"),l.all=function(t){return Promise.all(t)},l.spread=n("0df6"),t.exports=l,t.exports.default=l},d225:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d491:function(t,e,n){"use strict";const r={ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},i={POLYGON:"polygon",LINE:"line_string",POINT:"point"},o={FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},a={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},s={CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",ACTIONABLE:"draw.actionable",RENDER:"draw.render",COMBINE_FEATURES:"draw.combine",UNCOMBINE_FEATURES:"draw.uncombine"},l={MOVE:"move",CHANGE_COORDINATES:"change_coordinates"},c={FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},u={ACTIVE:"true",INACTIVE:"false"};function h(t){const e=t.featureTarget;return!!e&&(!!e.properties&&e.properties.meta===c.VERTEX)}function d(t){return 27===t.keyCode}function p(t){return 13===t.keyCode}var f={enable(t){setTimeout(()=>{t.map&&t.map.doubleClickZoom&&t._ctx&&t._ctx.store&&t._ctx.store.getInitialConfigValue&&t._ctx.store.getInitialConfigValue("doubleClickZoom")&&t.map.doubleClickZoom.enable()},0)},disable(t){setTimeout(()=>{t.map&&t.map.doubleClickZoom&&t.map.doubleClickZoom.disable()},0)}};function m(t,e){return!!t.lngLat&&(t.lngLat.lng===e[0]&&t.lngLat.lat===e[1])}var g=m,y=function(t,e,n,r){return{type:o.FEATURE,properties:{meta:c.VERTEX,parent:t,coord_path:n,active:r?u.ACTIVE:u.INACTIVE},geometry:{type:o.POINT,coordinates:e}}};const _={onSetup:function(){const t=this.newFeature({type:o.FEATURE,properties:{},geometry:{type:o.POLYGON,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),f.disable(this),this.updateUIClasses({mouse:r.ADD}),this.activateUIButton(i.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&g(e,t.polygon.coordinates[0][t.currentVertexPosition-1]))return this.changeMode(a.SIMPLE_SELECT,{featureIds:[t.polygon.id]});this.updateUIClasses({mouse:r.ADD}),t.polygon.updateCoordinate(`0.${t.currentVertexPosition}`,e.lngLat.lng,e.lngLat.lat),t.currentVertexPosition++,t.polygon.updateCoordinate(`0.${t.currentVertexPosition}`,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(a.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},onMouseMove:function(t,e){t.polygon.updateCoordinate(`0.${t.currentVertexPosition}`,e.lngLat.lng,e.lngLat.lat),h(e)&&this.updateUIClasses({mouse:r.POINTER})}};_.onTap=_.onClick=function(t,e){return h(e)?this.clickOnVertex(t,e):this.clickAnywhere(t,e)},_.onKeyUp=function(t,e){d(e)?(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(a.SIMPLE_SELECT)):p(e)&&this.changeMode(a.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},_.onStop=function(t){this.updateUIClasses({mouse:r.NONE}),f.enable(this),this.activateUIButton(),void 0!==this.getFeature(t.polygon.id)&&(t.polygon.removeCoordinate(`0.${t.currentVertexPosition}`),t.polygon.isValid()?this.map.fire(s.CREATE,{features:[t.polygon.toGeoJSON()]}
45):(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(a.SIMPLE_SELECT,{},{silent:!0})))},_.toDisplayFeatures=function(t,e,n){const r=e.properties.id===t.polygon.id;if(e.properties.active=r?u.ACTIVE:u.INACTIVE,!r)return n(e);if(0===e.geometry.coordinates.length)return;const i=e.geometry.coordinates[0].length;if(!(i<3)){if(e.properties.meta=c.FEATURE,n(y(t.polygon.id,e.geometry.coordinates[0][0],"0.0",!1)),i>3){const r=e.geometry.coordinates[0].length-3;n(y(t.polygon.id,e.geometry.coordinates[0][r],`0.${r}`,!1))}if(i<=4){const t=[[e.geometry.coordinates[0][0][0],e.geometry.coordinates[0][0][1]],[e.geometry.coordinates[0][1][0],e.geometry.coordinates[0][1][1]]];if(n({type:o.FEATURE,properties:e.properties,geometry:{coordinates:t,type:o.LINE_STRING}}),3===i)return}return n(e)}},_.onTrash=function(t){this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(a.SIMPLE_SELECT)};var v=_;function b(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function x(t){return!!t&&t.constructor===Object}function w(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function S(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function T(t,e){void 0===e&&(e={});var n="object"===typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var r=S(t),i=[];switch(r){case"LineString":i=E(t);break;case"MultiLineString":case"Polygon":w(t).forEach(function(t){i.push(E(t))});break;case"MultiPolygon":w(t).forEach(function(t){var e=[];t.forEach(function(t){e.push(E(t))}),i.push(e)});break;case"Point":return t;case"MultiPoint":var o={};w(t).forEach(function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(o,e)||(i.push(t),o[e]=!0)});break;default:throw new Error(r+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=i,t):{type:r,coordinates:i}:!0===n?(t.geometry.coordinates=i,t):b({type:r,coordinates:i},t.properties,{bbox:t.bbox,id:t.id})}function E(t){var e=w(t);if(2===e.length&&!C(e[0],e[1]))return e;var n=[],r=e.length-1,i=n.length;n.push(e[0]);for(var o=1;o<r;o++){var a=n[n.length-1];e[o][0]===a[0]&&e[o][1]===a[1]||(n.push(e[o]),i=n.length,i>2&&O(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),i=n.length,C(e[0],e[e.length-1])&&i<4)throw new Error("invalid polygon");return O(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1),n}function C(t,e){return t[0]===e[0]&&t[1]===e[1]}function O(t,e,n){var r=n[0],i=n[1],o=t[0],a=t[1],s=e[0],l=e[1],c=r-o,u=i-a,h=s-o,d=l-a,p=c*d-u*h;return 0===p&&(Math.abs(h)>=Math.abs(d)?h>0?o<=r&&r<=s:s<=r&&r<=o:d>0?a<=i&&i<=l:l<=i&&i<=a)}var P=T;function k(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return A(t);case"FeatureCollection":return M(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return D(t);default:throw new Error("unknown GeoJSON type")}}function A(t){var e={type:"Feature"};return Object.keys(t).forEach(function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}}),e.properties=I(t.properties),e.geometry=D(t.geometry),e}function I(t){var e={};return t?(Object.keys(t).forEach(function(n){var r=t[n];"object"===typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map(function(t){return t}):e[n]=I(r):e[n]=r}),e):e}function M(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach(function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}}),e.features=t.features.map(function(t){return A(t)}),e}function D(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map(function(t){return D(t)}),e):(e.coordinates=B(t.coordinates),e)}function B(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map(function(t){return B(t)})}var z=k;function L(t,e){var n,r,i,o,a,s,l,c,u,h,d=0,p="FeatureCollection"===t.type,f="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:f?t.geometry:t,c=p?t.features[n].properties:f?t.properties:{},u=p?t.features[n].bbox:f?t.bbox:void 0,h=p?t.features[n].id:f?t.id:void 0,l=!!s&&"GeometryCollection"===s.type,a=l?s.geometries.length:1,i=0;i<a;i++)if(o=l?s.geometries[i]:s,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,d,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,d,c,u,h))return!1;d++}}function R(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function j(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;
45if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return o=t.x-r,a=t.y-i,o*o+a*a}function F(t,e){for(var n,r=t[0],i=[r],o=1,a=t.length;o<a;o++)n=t[o],R(n,r)>e&&(i.push(n),r=n);return r!==n&&i.push(n),i}function N(t,e,n,r,i){for(var o,a=r,s=e+1;s<n;s++){var l=j(t[s],t[e],t[n]);l>a&&(o=s,a=l)}a>r&&(o-e>1&&N(t,e,o,r,i),i.push(t[o]),n-o>1&&N(t,o,n,r,i))}function $(t,e){var n=t.length-1,r=[t[0]];return N(t,0,n,e,r),r.push(t[n]),r}function V(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return t=n?t:F(t,r),t=$(t,r),t}function U(t,e){if(e=e||{},!x(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,r=e.highQuality||!1,i=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==i&&(t=z(t)),L(t,function(t){G(t,n,r)}),t}function G(t,e,n){var r=t.type;if("Point"===r||"MultiPoint"===r)return t;P(t,!0);var i=t.coordinates;switch(r){case"LineString":t["coordinates"]=H(i,e,n);break;case"MultiLineString":t["coordinates"]=i.map(function(t){return H(t,e,n)});break;case"Polygon":t["coordinates"]=q(i,e,n);break;case"MultiPolygon":t["coordinates"]=i.map(function(t){return q(t,e,n)})}return t}function H(t,e,n){return V(t.map(function(t){return{x:t[0],y:t[1],z:t[2]}}),e,n).map(function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]})}function q(t,e,n){return t.map(function(t){var r=t.map(function(t){return{x:t[0],y:t[1]}});if(r.length<4)throw new Error("invalid polygon");var i=V(r,e,n).map(function(t){return[t.x,t.y]});while(!W(i))e-=.01*e,i=V(r,e,n).map(function(t){return[t.x,t.y]});return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i})}function W(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var Z=U;const X=Object.assign({},v);X.onSetup=function(){const t=this.newFeature({type:o.FEATURE,properties:{},geometry:{type:o.POLYGON,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),setTimeout(()=>{this.map&&this.map.dragPan&&this.map.dragPan.disable()},0),this.updateUIClasses({mouse:r.ADD}),this.activateUIButton(i.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0,dragMoving:!1}},X.onDrag=X.onTouchMove=function(t,e){t.dragMoving=!0,this.updateUIClasses({mouse:r.ADD}),t.polygon.updateCoordinate(`0.${t.currentVertexPosition}`,e.lngLat.lng,e.lngLat.lat),t.currentVertexPosition++,t.polygon.updateCoordinate(`0.${t.currentVertexPosition}`,e.lngLat.lng,e.lngLat.lat)},X.onMouseUp=function(t,e){t.dragMoving&&(this.simplify(t.polygon),this.fireUpdate(),this.changeMode(a.SIMPLE_SELECT,{featureIds:[t.polygon.id]}))},X.onTouchEnd=function(t,e){this.onMouseUp(t,e)},X.fireUpdate=function(){this.map.fire(s.UPDATE,{action:l.MOVE,features:this.getSelected().map(t=>t.toGeoJSON())})}
45,X.simplify=function(t){const e=1/Math.pow(1.05,10*this.map.getZoom());Z(t,{mutate:!0,tolerance:e,highQuality:!0})};e["a"]=X},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d864:function(t,e,n){var r=n("79aa");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},d8d6:function(t,e,n){n("1654"),n("6c1c"),t.exports=n("ccb9").f("iterator")},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d925:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},d9ab:function(t,e,n){var r=n("5ca1"),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},d9f6:function(t,e,n){var r=n("e4ae"),i=n("794b"),o=n("1bc3"),a=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var r=n("584a"),i=n("e53d"),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dcbc:function(t,e,n){var r=n("2aba");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return r.exec(t).slice(1)};function o(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var a=i>=0?arguments[i]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,r="/"===a.charAt(0))}return e=n(o(e.split("/"),function(t){return!!t}),!r).join("/"),(r?"/":"")+e||"."},e.normalize=function(t){var r=e.isAbsolute(t),i="/"===a(t,-1);return t=n(o(t.split("/"),function(t){return!!t}),!r).join("/"),t||r||(t="."),t&&i&&(t+="/"),(r?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(o(t,function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length;e++)if(""!==t[e])break;for(var n=t.length-1;n>=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return c=c.concat(o.slice(s)),c.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=i(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},e.basename=function(t,e){var n=i(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){return i(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e192:function(t,e,n){(function(e,n){t.exports=n()})(0,function(){"use strict";var t,e,n;function r(r,i){if(t)if(e){var o="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk); self.onerror = null;",a={};t(a),n=i(a),"undefined"!==typeof window&&window&&window.URL&&window.URL.createObjectURL&&(n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else e=i;else t=i}
45r(["exports"],function(t){var e="undefined"!=typeof self?self:{},n="2.11.0";let r;const i={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==r){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{r=null!=Object({NODE_ENV:"production",BASE_URL:"/"}).API_URL_REGEX?new RegExp(Object({NODE_ENV:"production",BASE_URL:"/"}).API_URL_REGEX):t}catch(e){r=t}}return r},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},o={supported:!1,testSupport:function(t){!l&&s&&(c?u(t):a=t)}};let a,s,l=!1,c=!1;function u(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,s),t.isContextLost())return;o.supported=!0}
vendor: 10,864 bytes, line 45
45catch(t){}t.deleteTexture(e),l=!0}e.document&&(s=e.document.createElement("img"),s.onload=function(){a&&u(a),a=null,c=!0},s.onerror=function(){l=!0,a=null},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const h="01";var d=p;function p(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=e,this.p2x=n,this.p2y=r}p.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var n=t,r=0;r<8;r++){var i=this.sampleCurveX(n)-t;if(Math.abs(i)<e)return n;var o=this.sampleCurveDerivativeX(n);if(Math.abs(o)<1e-6)break;n-=i/o}var a=0,s=1;for(n=t,r=0;r<20&&(i=this.sampleCurveX(n),!(Math.abs(i-t)<e));r++)t>i?a=n:s=n,n=.5*(s-a)+a;return n},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var f=m;function m(t,e){this.x=t,this.y=e}m.prototype={clone:function(){return new m(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[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,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=n*this.x+e*this.y;return this.x=e*this.x-n*this.y,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=e.x+n*(this.x-e.x)-r*(this.y-e.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(t){return t instanceof m?t:Array.isArray(t)?new m(t[0],t[1]):t};const g=Math.PI/180,y=180/Math.PI;function _(t){return t*g}function v(t){return t*y}const b=[[0,0],[1,0],[1,1],[0,1]];function x(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function w(t,e,n,r){const i=new d(t,e,n,r);return function(t){return i.solve(t)}}const S=w(.25,.1,.25,1);function T(t,e,n){return Math.min(n,Math.max(e,t))}function E(t,e,n){return(n=T((n-t)/(e-t),0,1))*n*(3-2*n)}function C(t,e,n){const r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i}function O(t,e,n){if(!t.length)return n(null,[]);let r=t.length;const i=new Array(t.length);let o=null;t.forEach((t,a)=>{e(t,(t,e)=>{t&&(o=t),i[a]=e,0==--r&&n(o,i)})})}function P(t){const e=[];for(const n in t)e.push(t[n]);return e}function k(t,...e){for(const n of e)for(const e in n)t[e]=n[e];return t}let A=1;function I(){return A++}function M(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function D(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function B(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function z(t,e){t.forEach(t=>{e[t]&&(e[t]=e[t].bind(e))})}function L(t,e){return-1!==t.indexOf(e,t.length-e.length)}function R(t,e,n){const r={};for(const i in t)r[i]=e.call(n||this,t[i],i,t);return r}function j(t,e,n){const r={};for(const i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r}function F(t){return Array.isArray(t)?t.map(F):"object"==typeof t&&t?R(t,F):t}const N={};function $(t){N[t]||("undefined"!=typeof console&&console.warn(t),N[t]=!0)}function V(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function U(t){let e=0;for(let n,r,i=0,o=t.length,a=o-1;i<o;a=i++)n=t[i],r=t[a],e+=(r.x-n.x)*(n.y+r.y);return e}function G(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function H(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(t,n,r,i)=>{const o=r||i;return e[n]=!o||o.toLowerCase(),""}),e["max-age"]){const t=parseInt(e["max-age"],10);isNaN(t)?delete e["max-age"]:e["max-age"]=t}return e}let q=null;function W(t){if(null==q){const e=t.navigator?t.navigator.userAgent:null;q=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return q}function Z(t){try{const n=e[t];return n.setItem("_mapbox_test_",1),n.removeItem("_mapbox_test_"),!0}catch(t){return!1}}function X(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}const Y="mapbox-tiles";let K,J,Q=500,tt=50;function et(){try{return e.caches}catch(t){}}function nt(){et()&&!K&&(K=e.caches.open(Y))}function rt(t){const e=t.indexOf("?");if(e<0)return t;const n=function(t){const e=t.indexOf("?");return e>0?t.slice(e+1).split("&"):[]}(t),r=n.filter(t=>{const e=t.split("=");return"language"===e[0]||"worldview"===e[0]});return r.length?`${t.slice(0,e)}?${r.join("&")}`:t.slice(0,e)}let it=1/0;const ot={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ot);class at extends Error{constructor(t,e,n){401===e&&yt(n)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),super(t),this.status=e,this.url=n}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const st=G()?()=>self.worker&&self.worker.referrer:()=>("blob:"===e.location.protocol?e.parent:e).location.href,lt=function(t,n){if(!(/^file:/.test(r=t.url)||/^file:/.test(st())&&!/^\w+:/.test(r))){if(e.fetch&&e.Request&&e.AbortController&&e.Request.prototype.hasOwnProperty("signal"))return function(t,n){const r=new e.AbortController,i=new e.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:st(),signal:r.signal});let o=!1,a=!1;const s=(l=i.url).indexOf("sku=")>0&&yt(l);var l;"json"===t.type&&i.headers.set("Accept","application/json");const c=(r,o,l)=>{if(a)return;if(r&&"SecurityError"!==r.message&&$(r),o&&l)return u(o);const c=Date.now();e.fetch(i).then(e=>{if(e.ok){const t=s?e.clone():null;return u(e,t,c)}return n(new at(e.statusText,e.status,t.url))}).catch(t=>{20!==t.code&&n(new Error(t.message))})},u=(r,s,l)=>{("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then(t=>{a||(s&&l&&function(t,n,r){if(nt(),!K)return;const i={status:n.status,statusText:n.statusText,headers:new e.Headers};n.headers.forEach((t,e)=>i.headers.set(e,t));const o=H(n.headers.get("Cache-Control")||"");if(o["no-store"])return;o["max-age"]&&i.headers.set("Expires",new Date(r+1e3*o["max-age"]).toUTCString());const a=i.headers.get("Expires");a&&(new Date(a).getTime()-r<42e4||function(t,e){if(void 0===J)try{new Response(new ReadableStream),J=!0}catch(t){J=!1}J?e(t.body):t.blob().then(e)}(n,n=>{const r=new e.Response(n,i);nt(),K&&K.then(e=>e.put(rt(t.url),r)).catch(t=>$(t.message))}))}(i,s,l),o=!0,n(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))}).catch(t=>{a||n(new Error(t.message))})};return s?function(t,e){if(nt(),!K)return e(null);const n=rt(t.url);K.then(t=>{t.match(n).then(r=>{const i=function(t){if(!t)return!1;const e=new Date(t.headers.get("Expires")||0),n=H(t.headers.get("Cache-Control")||"");return e>Date.now()&&!n["no-cache"]}(r);t.delete(n),i&&t.put(n,r.clone()),e(null,r,i)}).catch(e)}).catch(e)}(i,c):c(null,null),{cancel:()=>{a=!0,o||r.abort()}}}(t,n);if(G()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,n,void 0,!0)}var r;return function(t,n){const r=new e.XMLHttpRequest;r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer");for(const e in t.headers)r.setRequestHeader(e,t.headers[e]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=(()=>{n(new Error(r.statusText))}),r.onload=(()=>{if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){let e=r.response;if("json"===t.type)try{e=JSON.parse(r.response)}catch(t){return n(t)}n(null,e,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else n(new at(r.statusText,r.status,t.url))}),r.send(t.body),{cancel:()=>r.abort()}}(t,n)},ct=function(t,e){return lt(k(t,{type:"arrayBuffer"}),e)};function ut(t){const n=e.document.createElement("a");return n.href=t,n.protocol===e.document.location.protocol&&n.host===e.document.location.host}const ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let dt,pt;dt=[],pt=0;const ft=function(t,n){if(o.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),pt>=i.MAX_PARALLEL_IMAGE_REQUESTS){const e={requestParameters:t,callback:n,cancelled:!1,cancel(){this.cancelled=!0}};return dt.push(e),e}pt++;let r=!1;const a=()=>{if(!r)for(r=!0,pt--;dt.length&&pt<i.MAX_PARALLEL_IMAGE_REQUESTS;){const t=dt.shift(),{requestParameters:e,callback:n,cancelled:r}=t;r||(t.cancel=ft(e,n).cancel)}},s=ct(t,(t,r,i,o)=>{a(),t?n(t):r&&(e.createImageBitmap?function(t,n){const r=new e.Blob([new Uint8Array(t)],{type:"image/png"});e.createImageBitmap(r).then(t=>{n(null,t)}).catch(t=>{n(new Error(`Could not load image because of ${t.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(r,(t,e)=>
45n(t,e,i,o)):function(t,n){const r=new e.Image,i=e.URL;r.onload=(()=>{n(null,r),i.revokeObjectURL(r.src),r.onload=null,e.requestAnimationFrame(()=>{r.src=ht})}),r.onerror=(()=>n(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")));const o=new e.Blob([new Uint8Array(t)],{type:"image/png"});r.src=t.byteLength?i.createObjectURL(o):ht}(r,(t,e)=>n(t,e,i,o)))});return{cancel:()=>{s.cancel(),a()}}},mt="NO_ACCESS_TOKEN";function gt(t){return 0===t.indexOf("mapbox:")}function yt(t){return i.API_URL_REGEX.test(t)}function _t(t){return i.API_STYLE_REGEX.test(t)&&!vt(t)}function vt(t){return i.API_SPRITE_REGEX.test(t)}const bt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function xt(t){const e=t.match(bt);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 wt(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}function St(t){if(!t)return null;const n=t.split(".");if(!n||3!==n.length)return null;try{return JSON.parse(decodeURIComponent(e.atob(n[1]).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(t){return null}}class Tt{constructor(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(t){const n=St(i.ACCESS_TOKEN);let r="";return r=n&&n.u?e.btoa(encodeURIComponent(n.u).replace(/%([0-9A-F]{2})/g,(t,e)=>String.fromCharCode(Number("0x"+e)))):i.ACCESS_TOKEN||"",t?`mapbox.eventData.${t}:${r}`:`mapbox.eventData:${r}`}fetchEventData(){const t=Z("localStorage"),n=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{const i=e.localStorage.getItem(n);i&&(this.eventData=JSON.parse(i));const o=e.localStorage.getItem(r);o&&(this.anonId=o)}catch(t){$("Unable to read from LocalStorage")}}saveEventData(){const t=Z("localStorage"),n=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{e.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&e.localStorage.setItem(n,JSON.stringify(this.eventData))}catch(t){$("Unable to write to LocalStorage")}}processRequests(t){}postEvent(t,e,n,r){if(!i.EVENTS_URL)return;const o=xt(i.EVENTS_URL);o.params.push(`access_token=${r||i.ACCESS_TOKEN||""}`);const a={event:this.type,created:new Date(t).toISOString()},s=e?k(a,e):a,l={url:wt(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=function(t,e){return lt(k(t,{method:"POST"}),e)}(l,t=>{this.pendingRequest=null,n(t),this.saveEventData(),this.processRequests(r)})}queueRequest(t,e){this.queue.push(t),this.processRequests(e)}}const Et=new class extends Tt{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){i.EVENTS_URL&&i.ACCESS_TOKEN&&Array.isArray(t)&&t.some(t=>gt(t)||yt(t))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=St(i.ACCESS_TOKEN),r=e?e.u:i.ACCESS_TOKEN;let o=r!==this.eventData.tokenU;B(this.anonId)||(this.anonId=M(),o=!0);const a=this.queue.shift();if(this.eventData.lastSuccess){const t=new Date(this.eventData.lastSuccess),e=new Date(a),n=(a-this.eventData.lastSuccess)/864e5;o=o||n>=1||n<-1||t.getDate()!==e.getDate()}else o=!0;o?this.postEvent(a,{sdkIdentifier:"mapbox-gl-js",sdkVersion:n,skuId:h,"enabled.telemetry":!1,userId:this.anonId},t=>{t||(this.eventData.lastSuccess=a,this.eventData.tokenU=r)},t):this.processRequests()}},Ct=Et.postTurnstileEvent.bind(Et),Ot=new class extends Tt{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,n,r){this.skuToken=e,this.errorCb=r,i.EVENTS_URL&&(n||i.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},n):this.errorCb(new Error(mt)))}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{id:e,timestamp:r}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),B(this.anonId)||(this.anonId=M()),this.postEvent(r,{sdkIdentifier:"mapbox-gl-js",sdkVersion:n,skuId:h,skuToken:this.skuToken,userId:this.anonId},t=>{t?this.errorCb(t):e&&(this.success[e]=!0)},t))}},Pt=Ot.postMapLoadEvent.bind(Ot),kt=new class extends Tt{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){i.EVENTS_URL&&(t||i.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{timestamp:r,performanceData:i}=this.queue.shift(),o=function(t){const r=e.performance.getEntriesByType("resource"),i=e.performance.getEntriesByType("mark"),o=function(t){const e={};if(t)for(const n in t)if("other"!==n)for(const r of t[n]){const t=`${n}RequestCount`,i=`${n}ResolveRangeMin`,o=`${n}ResolveRangeMax`;e[i]=Math.min(e[i]||1/0,r.startTime),e[o]=Math.max(e[o]||-1/0,r.responseEnd),void 0===e[t]&&(e[t]=0),++e[t]}return e}(function(t,e){const n={};if(t)for(const r of t){const t=e(r);void 0===n[t]&&(n[t]=[]),n[t].push(r)}return n}(r,Lt)),a=e.devicePixelRatio,s=e.navigator.connection||e.navigator.mozConnection||e.navigator.webkitConnection,l={counters:[],metadata:[],attributes:[]},c=(t,e,n)=>{null!=n&&t.push({name:e,value:n.toString()})};for(const e in o)c(l.counters,e,o[e]);if(t.interactionRange[0]!==1/0&&t.interactionRange[1]!==-1/0&&(c(l.counters,"interactionRangeMin",t.interactionRange[0]),c(l.counters,"interactionRangeMax",t.interactionRange[1])),i)for(const e of Object.keys(Bt)){const t=Bt[e],n=i.find(e=>e.name===t);n&&c(l.counters,t,n.startTime)}return c(l.attributes,"style",function(t){if(t)for(const e of t){const t=e.name.split("?")[0];if(_t(t)){const e=t.split("/").slice(-2);if(2===e.length)return`mapbox://styles/${e[0]}/${e[1]}`}}}(r)),c(l.attributes,"terrainEnabled",t.terrainEnabled?"true":"false"),c(l.attributes,"fogEnabled",t.fogEnabled?"true":"false"),c(l.attributes,"projection",t.projection.name),c(l.attributes,"zoom",t.zoom),c(l.metadata,"devicePixelRatio",a),c(l.metadata,"connectionEffectiveType",s?s.effectiveType:void 0),c(l.metadata,"navigatorUserAgent",e.navigator.userAgent),c(l.metadata,"screenWidth",e.screen.width),c(l.metadata,"screenHeight",e.screen.height),c(l.metadata,"windowWidth",e.innerWidth),c(l.metadata,"windowHeight",e.innerHe
vendor: 6,890 bytes, line 45
45ight),c(l.metadata,"mapWidth",t.width/a),c(l.metadata,"mapHeight",t.height/a),c(l.metadata,"webglRenderer",t.renderer),c(l.metadata,"webglVendor",t.vendor),c(l.metadata,"sdkVersion",n),c(l.metadata,"sdkIdentifier","mapbox-gl-js"),l}(i);for(const e of o.metadata);for(const e of o.counters);for(const e of o.attributes);this.postEvent(r,o,()=>{},t)}},At=kt.postPerformanceEvent.bind(kt),It=new class extends Tt{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,n,r){if(!i.API_URL||!i.SESSION_PATH)return;const o=xt(i.API_URL+i.SESSION_PATH);o.params.push(`sku=${e||""}`),o.params.push(`access_token=${r||i.ACCESS_TOKEN||""}`);const a={url:wt(o),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(t,e){return lt(k(t,{method:"GET"}),e)}(a,t=>{this.pendingRequest=null,n(t),this.saveEventData(),this.processRequests(r)})}getSessionAPI(t,e,n,r){this.skuToken=e,this.errorCb=r,i.SESSION_PATH&&i.API_URL&&(n||i.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},n):this.errorCb(new Error(mt)))}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{id:e,timestamp:n}=this.queue.shift();e&&this.success[e]||this.getSession(n,this.skuToken,t=>{t?this.errorCb(t):e&&(this.success[e]=!0)},t)}},Mt=It.getSessionAPI.bind(It),Dt=new Set,Bt={create:"create",load:"load",fullLoad:"fullLoad"},zt={mark(t){e.performance.mark(t)},measure(t,n,r){e.performance.measure(t,n,r)}};function Lt(t){const e=t.name.split("?")[0];return e.includes("mapbox-gl.js")?"javascript":e.includes("mapbox-gl.css")?"css":function(t){return i.API_FONTS_REGEX.test(t)}(e)?"fontRange":vt(e)?"sprite":_t(e)?"style":function(t){return i.API_TILEJSON_REGEX.test(t)}(e)?"tilejson":"other"}const Rt=e.performance;function jt(t){const e=t?t.url.toString():void 0;return Rt.getEntriesByName(e)}let Ft,Nt,$t,Vt;const Ut={now:()=>void 0!==$t?$t:e.performance.now(),setNow(t){$t=t},restoreNow(){$t=void 0},frame(t){const n=e.requestAnimationFrame(t);return{cancel:()=>e.cancelAnimationFrame(n)}},getImageData(t,n=0){const{width:r,height:i}=t;Vt||(Vt=e.document.createElement("canvas"));const o=Vt.getContext("2d");if(!o)throw new Error("failed to create canvas 2d context");return(r>Vt.width||i>Vt.height)&&(Vt.width=r,Vt.height=i),o.clearRect(-n,-n,r+2*n,i+2*n),o.drawImage(t,0,0,r,i),o.getImageData(-n,-n,r+2*n,i+2*n)},resolveURL:t=>(Ft||(Ft=e.document.createElement("a")),Ft.href=t,Ft.href),get devicePixelRatio(){return e.devicePixelRatio},get prefersReducedMotion(){return!!e.matchMedia&&(null==Nt&&(Nt=e.matchMedia("(prefers-reduced-motion: reduce)")),Nt.matches)}};function Gt(t,e,n){n[t]&&-1!==n[t].indexOf(e)||(n[t]=n[t]||[],n[t].push(e))}function Ht(t,e,n){if(n&&n[t]){const r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}class qt{constructor(t,e={}){k(this,e),this.type=t}}class Wt extends qt{constructor(t,e={}){super("error",k({error:t},e))}}class Zt{on(t,e){return this._listeners=this._listeners||{},Gt(t,e,this._listeners),this}off(t,e){return Ht(t,e,this._listeners),Ht(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},Gt(t,e,this._oneTimeListeners),this):new Promise(e=>this.once(t,e))}fire(t,e){"string"==typeof t&&(t=new qt(t,e||{}));const n=t.type;if(this.listens(n)){t.target=this;const e=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(const n of e)n.call(this,t);const r=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(const o of r)Ht(n,o,this._oneTimeListeners),o.call(this,t);const i=this._eventedParent;i&&(k(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(t))}else t instanceof Wt&&console.error(t.error);return this}listens(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))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var Xt=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"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"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"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":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"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"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"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"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0}
45,"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"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_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1
vendor: 17,950 bytes, line 45
45,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"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":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}
vendor: 15,297 bytes, line 45
45,"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"cross-faded"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"cross-faded":{"type":"property-type"},"cross-faded-data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function Yt(t,...e){for(const n of e)for(const e in n)t[e]=n[e];return t}function Kt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Jt(t){if(Array.isArray(t))return t.map(Jt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const n in t)e[n]=Jt(t[n]);return e}return Kt(t)}
vendor: 27,999 bytes, line 45
45class Qt extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}var te=Qt;class ee{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[n,r]of e)this.bindings[n]=r}concat(t){return new ee(this,t)}get(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.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}var ne=ee;const re={kind:"null"},ie={kind:"number"},oe={kind:"string"},ae={kind:"boolean"},se={kind:"color"},le={kind:"object"},ce={kind:"value"},ue={kind:"collator"},he={kind:"formatted"},de={kind:"resolvedImage"};function pe(t,e){return{kind:"array",itemType:t,N:e}}function fe(t){if("array"===t.kind){const e=fe(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const me=[re,ie,oe,ae,se,he,le,pe(ce),de];function ge(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ge(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(const t of me)if(!ge(t,e))return null}return`Expected ${fe(t)} but found ${fe(e)} instead.`}function ye(t,e){return e.some(e=>e.kind===t.kind)}function _e(t,e){return e.some(e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t)}var ve,be={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]};function xe(t){return(t=Math.round(t))<0?0:t>255?255:t}function we(t){return xe("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function Se(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Te(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}try{ve={}.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in be)return be[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.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===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var r=n.indexOf("("),i=n.indexOf(")");if(-1!==r&&i+1===n.length){var o=n.substr(0,r),a=n.substr(r+1,i-(r+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=Se(a.pop());case"rgb":return 3!==a.length?null:[we(a[0]),we(a[1]),we(a[2]),s];case"hsla":if(4!==a.length)return null;s=Se(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,c=Se(a[1]),u=Se(a[2]),h=u<=.5?u*(c+1):u+c-u*c,d=2*u-h;return[xe(255*Te(d,h,l+1/3)),xe(255*Te(d,h,l)),xe(255*Te(d,h,l-1/3)),s];default:return null}}return null}}catch(t){}class Ee{constructor(t,e,n,r=1){this.r=t,this.g=e,this.b=n,this.a=r}static parse(t){if(!t)return;if(t instanceof Ee)return t;if("string"!=typeof t)return;const e=ve(t);return e?new Ee(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,n,r]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(n)},${r})`}toArray(){const{r:t,g:e,b:n,a:r}=this;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]}toArray01(){const{r:t,g:e,b:n,a:r}=this;return 0===r?[0,0,0,0]:[t/r,e/r,n/r,r]}toArray01PremultipliedAlpha(){const{r:t,g:e,b:n,a:r}=this;return[t,e,n,r]}}Ee.black=new Ee(0,0,0,1),Ee.white=new Ee(1,1,1,1),Ee.transparent=new Ee(0,0,0,0),Ee.red=new Ee(1,0,0,1),Ee.blue=new Ee(0,0,1,1);var Ce=Ee;class Oe{constructor(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"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Pe{constructor(t,e,n,r,i){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=i}}class ke{constructor(t){this.sections=t}static fromString(t){return new ke([new Pe(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(t=>0!==t.text.length||t.image&&0!==t.image.name.length)}static factory(t){return t instanceof ke?t:ke.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map(t=>t.text).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const n={};e.fontStack&&(n["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(n["font-scale"]=e.scale),e.textColor&&(n["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(n)}return t}}class Ae{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Ae({name:t,available:!1}):null}serialize(){return["image",this.name]}}function Ie(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 Me(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Ce)return!0;if(t instanceof Oe)return!0;if(t instanceof ke)return!0;if(t instanceof Ae)return!0;if(Array.isArray(t)){for(const e of t)if(!Me(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Me(t[e]))return!1;return!0}return!1}function De(t){if(null===t)return re;if("string"==typeof t)return oe;if("boolean"==typeof t)return ae;if("number"==typeof t)return ie;if(t instanceof Ce)return se;if(t instanceof Oe)return ue;if(t instanceof ke)return he;if(t instanceof Ae)return de;if(Array.isArray(t)){const e=t.length;let n;for(const r of t){const t=De(r);if(n){if(n===t)continue;n=ce;break}n=t}return pe(n||ce,e)}return le}function Be(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Ce||t instanceof ke||t instanceof Ae?t.toString():JSON.stringify(t)}class ze{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Me(t[1]))return e.error("invalid value");const n=t[1];let r=De(n);const i=e.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new ze(r,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Ce?["rgba"].concat(this.value.toArray()):this.value instanceof ke?this.value.serialize():this.value}}var Le=ze,Re=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const je={string:oe,number:ie,boolean:ae,object:le};class Fe{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let n,r=1;const i=t[0];if("array"===i){let i,o;if(t.length>2){const n=t[1];if("string"!=typeof n||!(n in je)||"object"===n)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=je[n],r++}else i=ce;if(t.length>3){if(null!==t[2]&&("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);o=t[2],r++}n=pe(i,o)}else n=je[i];const o=[];for(;r<t.length;r++){const n=e.parse(t[r],r,ce);if(!n)return null;o.push(n)}return new Fe(n,o)}evaluate(t){for(let e=0;e<this.args.length;e++){const n=this.args[e].evaluate(t);if(!ge(this.type,De(n)))return n;if(e===this.args.length-1)throw new Re(`Expected value to be of type ${fe(this.type)}, but found ${fe(De(n))} instead.`)}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const n=t.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){e.push(n.kind);const r=t.N;("number"==typeof r||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map(t=>t.serialize()))}}var Ne=Fe;class $e{constructor(t){this.type=he,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return e.error("First argument must be an image or text section.");const r=[];let i=!1;for(let o=1;o<=t.length-1;++o){const n=t[o];if(i&&"object"==typeof n&&!Array.isArray(n)){i=!1;let t=null;if(n["font-scale"]&&(t=e.parse(n["font-scale"],1,ie),!t))return null;let o=null;if(n["text-font"]&&(o=e.parse(n["text-font"],1,pe(oe)),!o))return null;let a=null;if(n["text-color"]&&(a=e.parse(n["text-color"],1,se),!a))return null;const s=r[r.length-1];s.scale=t,s.font=o,s.textColor=a}else{const n=e.parse(t[o],1,ce);if(!n)return null;const a=n.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:n,scale:null,font:null,textColor:null})}}return new $e(r)}evaluate(t){return new ke(this.sections.map(e=>{const n=e.content.evaluate(t);return De(n)===de?new Pe("",n,null,null,null):new Pe(Be(n),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)}))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const n={};e.scale&&(n["font-scale"]=e.scale.serialize()),e.font&&(n["text-font"]=e.font.serialize()),e.textColor&&(n["text-color"]=e.textColor.serialize()),t.push(n)}return t}}class Ve{constructor(t){this.type=de,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const n=e.parse(t[1],1,oe);return n?new Ve(n):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),n=Ae.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Ue={"to-boolean":ae,"to-color":se,"to-number":ie,"to-string":oe};class Ge{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return e.error("Expected one argument.");const r=Ue[n],i=[];for(let o=1;o<t.length;o++){const n=e.parse(t[o],o,ce);if(!n)return null;i.push(n)}return new Ge(r,i)}evaluate(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){let e,n;for(const r of this.args){if(e=r.evaluate(t),n=null,e instanceof Ce)return e;if("string"==typeof e){const n=t.parseColor(e);if(n)return n}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.`:Ie(e[0],e[1],e[2],e[3]),!n))return new Ce(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Re(n||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const n of this.args){if(e=n.evaluate(t),null===e)return 0;const r=Number(e);if(!isNaN(r))return r}throw new Re(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?ke.fromString(Be(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?Ae.fromString(Be(this.args[0].evaluate(t))):Be(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}serialize(){if("formatted"===this.type.kind)return new $e([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Ve(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild(e=>{t.push(e.serialize())}),t}}var He=Ge;const qe=["Unknown","Point","LineString","Polygon"];var We=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?qe[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:n,y:r}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(n*e-t[0])+this.featureDistanceData.bearing[1]*(r*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Ce.parse(t)),e}};class Ze{constructor(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(t=>t.serialize()))}static parse(t,e){const n=t[0],r=Ze.definitions[n];if(!r)return e.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter(([e])=>!Array.isArray(e)||e.length===t.length-1);let s=null;for(const[l,c]of a){s=new wn(e.registry,e.path,null,e.scope);const r=[];let o=!1;for(let e=1;e<t.length;e++){const n=t[e],i=Array.isArray(l)?l[e-1]:l.type,a=s.parse(n,1+r.length,i);if(!a){o=!0;break}r.push(a)}if(!o)if(Array.isArray(l)&&l.length!==r.length)s.error(`Expected ${l.length} arguments, but found ${r.length} instead.`);else{for(let t=0;t<r.length;t++){const e=Array.isArray(l)?l[t]:l.type,n=r[t];s.concat(t+1).checkSubtype(e,n.type)}if(0===s.errors.length)return new Ze(n,i,c,r)}}if(1===a.length)e.errors.push(...s.errors);else{const n=(a.length?a:o).map(([t])=>{return e=t,Array.isArray(e)?`(${e.map(fe).join(", ")})`:`(${fe(e.type)}...)`;var e}).join(" | "),r=[];for(let i=1;i<t.length;i++){const n=e.parse(t[i],1+r.length);if(!n)return null;r.push(fe(n.type))}e.error(`Expected arguments of type ${n}, but found (${r.join(", ")}) instead.`)}return null}static register(t,e){Ze.definitions=e;for(const n in e)t[n]=Ze}}var Xe=Ze;class Ye{constructor(t,e,n){this.type=ue,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");const r=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,ae);if(!r)return null;const i=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,ae);if(!i)return null;let o=null;return n.locale&&(o=e.parse(n.locale,1,oe),!o)?null:new Ye(r,i,o)}evaluate(t){return new Oe(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}serialize(){const t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}const Ke=8192;function Je(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Qe(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function tn(t,e){const n=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,i=Math.pow(2,e.z);return[Math.round(n*i*Ke),Math.round(r*i*Ke)]}function en(t,e,n){const r=t[0]-e[0],i=t[1]-e[1],o=t[0]-n[0],a=t[1]-n[1];return r*a-o*i==0&&r*o<=0&&i*a<=0}function nn(t,e){let n=!1;for(let a=0,s=e.length;a<s;a++){const s=e[a];for(let e=0,a=s.length;e<a-1;e++){if(en(t,s[e],s[e+1]))return!1;(i=s[e])[1]>(r=t)[1]!=(o=s[e+1])[1]>r[1]&&r[0]<(o[0]-i[0])*(r[1]-i[1])/(o[1]-i[1])+i[0]&&(n=!n)}}var r,i,o;return n}function rn(t,e){for(let n=0;n<e.length;n++)if(nn(t,e[n]))return!0;return!1}function on(t,e,n,r){const i=r[0]-n[0],o=r[1]-n[1],a=(t[0]-n[0])*o-i*(t[1]-n[1]),s=(e[0]-n[0])*o-i*(e[1]-n[1]);return a>0&&s<0||a<0&&s>0}function an(t,e,n){for(const c of n)for(let n=0;n<c.length-1;++n)if(0!=(s=[(a=c[n+1])[0]-(o=c[n])[0],a[1]-o[1]])[0]*(l=[(i=e)[0]-(r=t)[0],i[1]-r[1]])[1]-s[1]*l[0]&&on(r,i,o,a)&&on(o,a,r,i))return!0;var r,i,o,a,s,l;return!1}function sn(t,e){for(let n=0;n<t.length;++n)if(!nn(t[n],e))return!1;for(let n=0;n<t.length-1;++n)if(an(t[n],t[n+1],e))return!1;return!0}function ln(t,e){for(let n=0;n<e.length;n++)if(sn(t,e[n]))return!0;return!1}function cn(t,e,n){const r=[];for(let i=0;i<t.length;i++){const o=[];for(let r=0;r<t[i].length;r++){const a=tn(t[i][r],n);Je(e,a),o.push(a)}r.push(o)}return r}function un(t,e,n){const r=[];for(let i=0;i<t.length;i++){const o=cn(t[i],e,n);r.push(o)}return r}function hn(t,e,n,r){if(t[0]<n[0]||t[0]>n[2]){const e=.5*r;let i=t[0]-n[0]>e?-r:n[0]-t[0]>e?r:0;0===i&&(i=t[0]-n[2]>e?-r:n[2]-t[0]>e?r:0),t[0]+=i}Je(e,t)}function dn(t,e,n,r){const i=Math.pow(2,r.z)*Ke,o=[r.x*Ke,r.y*Ke],a=[];if(!t)return a;for(const s of t)for(const t of s){const r=[t.x+o[0],t.y+o[1]];hn(r,e,n,i),a.push(r)}return a}function pn(t,e,n,r){const i=Math.pow(2,r.z)*Ke,o=[r.x*Ke,r.y*Ke],a=[];if(!t)return a;for(const l of t){const t=[];for(const n of l){const r=[n.x+o[0],n.y+o[1]];Je(e,r),t.push(r)}a.push(t)}if(e[2]-e[0]<=i/2){(s=e)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const t of a)for(const r of t)hn(r,e,n,i)}var s;return a}class fn{constructor(t,e){this.type=ae,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Me(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t<e.features.length;++t){const n=e.features[t].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new fn(e,e.features[t].geometry)}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new fn(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new fn(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if("Polygon"===e.type){const o=cn(e.coordinates,r,i),a=dn(t.geometry(),n,r,i);if(!Qe(n,r))return!1;for(const t of a)if(!nn(t,o))return!1}if("MultiPolygon"===e.type){const o=un(e.coordinates,r,i),a=dn(t.geometry(),n,r,i);if(!Qe(n,r))return!1;for(const t of a)if(!rn(t,o))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if("Polygon"===e.type){const o=cn(e.coordinates,r,i),a=pn(t.geometry(),n,r,i);if(!Qe(n,r))return!1;for(const t of a)if(!sn(t,o))return!1}if("MultiPolygon"===e.type){const o=un(e.coordinates,r,i),a=pn(t.geometry(),n,r,i);if(!Qe(n,r))return!1;for(const t of a)if(!ln(t,o))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var mn=fn;function gn(t){if(t instanceof Xe){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)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}if(t instanceof mn)return!1;let e=!0;return t.eachChild(t=>{e&&!gn(t)&&(e=!1)}),e}function yn(t){if(t instanceof Xe&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild(t=>{e&&!yn(t)&&(e=!1)}),e}function _n(t,e){if(t instanceof Xe&&e.indexOf(t.name)>=0)return!1;let n=!0;return t.eachChild(t=>{n&&!_n(t,e)&&(n=!1)}),n}class vn{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const n=t[1];return e.scope.has(n)?new vn(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)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var bn=vn;class xn{constructor(t,e=[],n,r=new ne,i=[]){this.registry=t,this.path=e,this.key=e.map(t=>`[${t}]`).join(""),this.scope=r,this.errors=i,this.expectedType=n}parse(t,e,n,r,i={}){return e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)}_parse(t,e){function n(t,e,n){return"assert"===n?new Ne(e,[t]):"coerce"===n?new He(e,[t]):t}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", []].');const r=t[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[r];if(i){let r=i.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,i=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==i.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==i.kind&&"string"!==i.kind){if(this.checkSubtype(t,i))return null}else r=n(r,t,e.typeAnnotation||"coerce");else r=n(r,t,e.typeAnnotation||"assert")}if(!(r instanceof Le)&&"resolvedImage"!==r.type.kind&&Sn(r)){const e=new We;try{r=new Le(r.type,r.evaluate(e))}catch(t){return this.error(t.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,e,n){const r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new xn(this.registry,r,e||null,i,this.errors)}error(t,...e){const n=`${this.key}${e.map(t=>`[${t}]`).join("")}`;this.errors.push(new te(n,t))}checkSubtype(t,e){const n=ge(t,e);return n&&this.error(n),n}}var wn=xn;function Sn(t){if(t instanceof bn)return Sn(t.boundExpression);if(t instanceof Xe&&"error"===t.name)return!1;if(t instanceof Ye)return!1;if(t instanceof mn)return!1;const e=t instanceof He||t instanceof Ne;let n=!0;return t.eachChild(t=>{n=e?n&&Sn(t):n&&t instanceof Le}),!!n&&gn(t)&&_n(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Tn(t,e){const n=t.length-1;let r,i,o=0,a=n,s=0;for(;o<=a;)if(s=Math.floor((o+a)/2),r=t[s],i=t[s+1],r<=e){if(s===n||e<i)return s;o=s+1}else{if(!(r>e))throw new Re("Input is not a number.");a=s-1}return 0}class En{constructor(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[r,i]of n)this.labels.push(r),this.outputs.push(i)}static parse(t,e){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.");const n=e.parse(t[1],1,ie);if(!n)return null;const r=[];let i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(let o=1;o<t.length;o+=2){const n=1===o?-1/0:t[o],a=t[o+1],s=o,l=o+1;if("number"!=typeof n)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not c
45omputed expressions) for the input values.',s);if(r.length&&r[r.length-1][0]>=n)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const c=e.parse(a,l,i);if(!c)return null;i=i||c.type,r.push([n,c])}return new En(i,n,r)}evaluate(t){const e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);const i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[Tn(e,r)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}serialize(){const t=["step",this.input.serialize()];for(let e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var Cn=En;function On(t,e,n){return t*(1-n)+e*n}var Pn=Object.freeze({__proto__:null,number:On,color:function(t,e,n){return new Ce(On(t.r,e.r,n),On(t.g,e.g,n),On(t.b,e.b,n),On(t.a,e.a,n))},array:function(t,e,n){return t.map((t,r)=>On(t,e[r],n))}});const kn=.95047,An=1.08883,In=4/29,Mn=6/29,Dn=3*Mn*Mn,Bn=Math.PI/180,zn=180/Math.PI;function Ln(t){return t>.008856451679035631?Math.pow(t,1/3):t/Dn+In}function Rn(t){return t>Mn?t*t*t:Dn*(t-In)}
vendor: 15,951 bytes, line 45
45function jn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Fn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Nn(t){const e=Fn(t.r),n=Fn(t.g),r=Fn(t.b),i=Ln((.4124564*e+.3575761*n+.1804375*r)/kn),o=Ln((.2126729*e+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Ln((.0193339*e+.119192*n+.9503041*r)/An)),alpha:t.a}}function $n(t){let 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=1*Rn(e),n=kn*Rn(n),r=An*Rn(r),new Ce(jn(3.2404542*n-1.5371385*e-.4985314*r),jn(-.969266*n+1.8760108*e+.041556*r),jn(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}function Vn(t,e,n){const r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}const Un={forward:Nn,reverse:$n,interpolate:function(t,e,n){return{l:On(t.l,e.l,n),a:On(t.a,e.a,n),b:On(t.b,e.b,n),alpha:On(t.alpha,e.alpha,n)}}},Gn={forward:function(t){const{l:e,a:n,b:r}=Nn(t),i=Math.atan2(r,n)*zn;return{h:i<0?i+360:i,c:Math.sqrt(n*n+r*r),l:e,alpha:t.a}},reverse:function(t){const e=t.h*Bn,n=t.c;return $n({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:Vn(t.h,e.h,n),c:On(t.c,e.c,n),l:On(t.l,e.l,n),alpha:On(t.alpha,e.alpha,n)}}};var Hn=Object.freeze({__proto__:null,lab:Un,hcl:Gn});class qn{constructor(t,e,n,r,i){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(const[o,a]of i)this.labels.push(o),this.outputs.push(a)}static interpolationFactor(t,e,n,r){let i=0;if("exponential"===t.name)i=Wn(e,t.base,n,r);else if("linear"===t.name)i=Wn(e,1,n,r);else if("cubic-bezier"===t.name){const o=t.controlPoints;i=new d(o[0],o[1],o[2],o[3]).solve(Wn(e,1,n,r))}return i}static parse(t,e){let[n,r,i,...o]=t;if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const t=r[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:t}}else{if("cubic-bezier"!==r[0])return e.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const t=r.slice(1);if(4!==t.length||t.some(t=>"number"!=typeof t||t<0||t>1))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:t}}}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(i=e.parse(i,2,ie),!i)return null;const a=[];let s=null;"interpolate-hcl"===n||"interpolate-lab"===n?s=se:e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType);for(let l=0;l<o.length;l+=2){const t=o[l],n=o[l+1],r=l+3,i=l+4;if("number"!=typeof t)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',r);if(a.length&&a[a.length-1][0]>=t)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',r);const c=e.parse(n,i,s);if(!c)return null;s=s||c.type,a.push([t,c])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new qn(s,n,r,i,a):e.error(`Type ${fe(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);const i=e.length;if(r>=e[i-1])return n[i-1].evaluate(t);const o=Tn(e,r),a=qn.interpolationFactor(this.interpolation,r,e[o],e[o+1]),s=n[o].evaluate(t),l=n[o+1].evaluate(t);return"interpolate"===this.operator?Pn[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?Gn.reverse(Gn.interpolate(Gn.forward(s),Gn.forward(l),a)):Un.reverse(Un.interpolate(Un.forward(s),Un.forward(l),a))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e}}function Wn(t,e,n,r){const i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}var Zn=qn;class Xn{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let n=null;const r=e.expectedType;r&&"value"!==r.kind&&(n=r);const i=[];for(const a of t.slice(1)){const t=e.parse(a,1+i.length,n,void 0,{typeAnnotation:"omit"});if(!t)return null;n=n||t.type,i.push(t)}const o=r&&i.some(t=>ge(r,t.type));return new Xn(o?ce:n,i)}evaluate(t){let e,n=null,r=0;for(const i of this.args){if(r++,n=i.evaluate(t),n&&n instanceof Ae&&!n.available&&(e||(e=n),n=null,r===this.args.length))return e;if(null!==n)break}return n}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}serialize(){const t=["coalesce"];return this.eachChild(e=>{t.push(e.serialize())}),t}}var Yn=Xn;class Kn{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const n=[];for(let i=1;i<t.length-1;i+=2){const r=t[i];if("string"!=typeof r)return e.error(`Expected string, but found ${typeof r} instead.`,i);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);const o=e.parse(t[i+1],i+1);if(!o)return null;n.push([r,o])}const r=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return r?new Kn(n,r):null}outputDefined(){return this.result.outputDefined()}serialize(){const t=["let"];for(const[e,n]of this.bindings)t.push(e,n.serialize());return t.push(this.result.serialize()),t}}var Jn=Kn;class Qn{constructor(t,e,n){this.type=t,this.index=e,this.input=n}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,ie),r=e.parse(t[2],2,pe(e.expectedType||ce));return n&&r?new Qn(r.type.itemType,n,r):null}evaluate(t){const e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new Re(`Array index out of bounds: ${e} < 0.`);if(e>=n.length)throw new Re(`Array index out of bounds: ${e} > ${n.length-1}.`);if(e!==Math.floor(e))throw new Re(`Array index must be an integer, but found ${e} instead.`);return n[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var tr=Qn;class er{constructor(t,e){this.type=ae,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,ce),r=e.parse(t[2],2,ce);return n&&r?ye(n.type,[ae,oe,ie,re,ce])?new er(n,r):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${fe(n.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(null==n)return!1;if(!_e(e,["boolean","string","number","null"]))throw new Re(`Expected first argument to be of type boolean, string, number or null, but found ${fe(De(e))} instead.`);if(!_e(n,["string","array"]))throw new Re(`Expected second argument to be of type array or string, but found ${fe(De(n))} instead.`);return n.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var nr=er;class rr{constructor(t,e,n){this.type=ie,this.needle=t,this.haystack=e,this.fromIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,ce),r=e.parse(t[2],2,ce);if(!n||!r)return null;if(!ye(n.type,[ae,oe,ie,re,ce]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${fe(n.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,ie);return i?new rr(n,r,i):null}return new rr(n,r)}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!_e(e,["boolean","string","number","null"]))throw new Re(`Expected first argument to be of type boolean, string, number or null, but found ${fe(De(e))} instead.`);if(!_e(n,["string","array"]))throw new Re(`Expected second argument to be of type array or string, but found ${fe(De(n))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var ir=rr;class or{constructor(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o}static parse(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.");let n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const i={},o=[];for(let l=2;l<t.length-1;l+=2){let a=t[l];const s=t[l+1];Array.isArray(a)||(a=[a]);const c=e.concat(l);if(0===a.length)return c.error("Expected at least one branch label.");for(const t of a){if("number"!=typeof t&&"string"!=typeof t)return c.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,De(t)))return null}else n=De(t);if(void 0!==i[String(t)])return c.error("Branch labels must be unique.");i[String(t)]=o.length}const u=e.parse(s,l,r);if(!u)return null;r=r||u.type,o.push(u)}const a=e.parse(t[1],1,ce);if(!a)return null;const s=e.parse(t[t.length-1],t.length-1,r);return s?"value"!==a.type.kind&&e.concat(1).checkSubtype(n,a.type)?null:new or(n,r,a,i,o,s):null}evaluate(t){const e=this.input.evaluate(t);return(De(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),n=[],r={};for(const o of e){const t=r[this.cases[o]];void 0===t?(r[this.cases[o]]=n.length,n.push([this.cases[o],[o]])):n[t][1].push(o)}const i=t=>"number"===this.inputType.kind?Number(t):t;for(const[o,a]of n)t.push(1===a.length?i(a[0]):a.map(i)),t.push(this.outputs[o].serialize());return t.push(this.otherwise.serialize()),t}}var ar=or;class sr{constructor(t,e,n){this.type=t,this.branches=e,this.otherwise=n}static parse(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.");let n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const r=[];for(let o=1;o<t.length-1;o+=2){const i=e.parse(t[o],o,ae);if(!i)return null;const a=e.parse(t[o+1],o+1,n);if(!a)return null;r.push([i,a]),n=n||a.type}const i=e.parse(t[t.length-1],t.length-1,n);return i?new sr(n,r,i):null}evaluate(t){for(const[e,n]of this.branches)if(e.evaluate(t))return n.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,n]of this.branches)t(e),t(n);t(this.otherwise)}outputDefined(){return this.branches.every(([t,e])=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild(e=>{t.push(e.serialize())}),t}}var lr=sr;class cr{constructor(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,ce),r=e.parse(t[2],2,ie);if(!n||!r)return null;if(!ye(n.type,[pe(ce),oe,ce]))return e.error(`Expected first argument to be of type array or string, but found ${fe(n.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,ie);return i?new cr(n.type,n,r,i):null}return new cr(n.type,n,r)}evaluate(t){const e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!_e(e,["string","array"]))throw new Re(`Expected first argument to be of type array or string, but found ${fe(De(e))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var ur=cr;function hr(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function dr(t,e,n,r){return 0===r.compare(e,n)}function pr(t,e,n){const r="=="!==t&&"!="!==t;return class i{constructor(t,e,n){this.type=ae,this.lhs=t,this.rhs=e,this.collator=n,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const n=t[0];let o=e.parse(t[1],1,ce);if(!o)return null;if(!hr(n,o.type))return e.concat(1).error(`"${n}" comparisons are not supported for type '${fe(o.type)}'.`);let a=e.parse(t[2],2,ce);if(!a)return null;if(!hr(n,a.type))return e.concat(2).error(`"${n}" comparisons are not supported for type '${fe(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error(`Cannot compare types '${fe(o.type)}' and '${fe(a.type)}'.`);r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Ne(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Ne(o.type,[a])));let s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,ue),!s)return null}return new i(o,a,s)}evaluate(i){const o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){const e=De(o),n=De(a);if(e.kind!==n.kind||"string"!==e.kind&&"number"!==e.kind)throw new Re(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${n.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const t=De(o),n=De(a);if("string"!==t.kind||"string"!==n.kind)return e(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):e(i,o,a)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild(t=>{e.push(t.serialize())}),e}}}const fr=pr("==",function(t,e,n){return e===n},dr),mr=pr("!=",function(t,e,n){return e!==n},function(t,e,n,r){return!dr(0,e,n,r)}),gr=pr("<",function(t,e,n){return e<n},function(t,e,n,r){return r.compare(e,n)<0}),yr=pr(">",function(t,e,n){return e>n},function(t,e,n,r){return r.compare(e,n)>0}),_r=pr("<=",function(t,e,n){return e<=n},function(t,e,n,r){return r.compare(e,n)<=0}),vr=pr(">=",function(t,e,n){return e>=n},function(t,e,n,r){return r.compare(e,n)>=0});
vendor: 11,194 bytes, line 45
45class br{constructor(t,e,n,r,i,o){this.type=oe,this.number=t,this.locale=e,this.currency=n,this.unit=r,this.minFractionDigits=i,this.maxFractionDigits=o}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const n=e.parse(t[1],1,ie);if(!n)return null;const r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");let i=null;if(r.locale&&(i=e.parse(r.locale,1,oe),!i))return null;let o=null;if(r.currency&&(o=e.parse(r.currency,1,oe),!o))return null;let a=null;if(r.unit&&(a=e.parse(r.unit,1,oe),!a))return null;let s=null;if(r["min-fraction-digits"]&&(s=e.parse(r["min-fraction-digits"],1,ie),!s))return null;let l=null;return r["max-fraction-digits"]&&(l=e.parse(r["max-fraction-digits"],1,ie),!l)?null:new br(n,i,o,a,s,l)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class xr{constructor(t){this.type=ie,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const 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 ${fe(n.type)} instead.`):new xr(n):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Re(`Expected value to be of type string or array, but found ${fe(De(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild(e=>{t.push(e.serialize())}),t}}const wr={"==":fr,"!=":mr,">":yr,"<":gr,">=":vr,"<=":_r,array:Ne,at:tr,boolean:Ne,case:lr,coalesce:Yn,collator:Ye,format:$e,image:Ve,in:nr,"index-of":ir,interpolate:Zn,"interpolate-hcl":Zn,"interpolate-lab":Zn,length:xr,let:Jn,literal:Le,match:ar,number:Ne,"number-format":br,object:Ne,slice:ur,step:Cn,string:Ne,"to-boolean":He,"to-color":He,"to-number":He,"to-string":He,var:bn,within:mn};function Sr(t,[e,n,r,i]){e=e.evaluate(t),n=n.evaluate(t),r=r.evaluate(t);const o=i?i.evaluate(t):1,a=Ie(e,n,r,o);if(a)throw new Re(a);return new Ce(e/255*o,n/255*o,r/255*o,o)}function Tr(t,e){return t in e}function Er(t,e){const n=e[t];return void 0===n?null:n}function Cr(t){return{type:t}}Xe.register(wr,{error:[{kind:"error"},[oe],(t,[e])=>{throw new Re(e.evaluate(t))}],typeof:[oe,[ce],(t,[e])=>fe(De(e.evaluate(t)))],"to-rgba":[pe(ie,4),[se],(t,[e])=>e.evaluate(t).toArray()],rgb:[se,[ie,ie,ie],Sr],rgba:[se,[ie,ie,ie,ie],Sr],has:{type:ae,overloads:[[[oe],(t,[e])=>Tr(e.evaluate(t),t.properties())],[[oe,le],(t,[e,n])=>Tr(e.evaluate(t),n.evaluate(t))]]},get:{type:ce,overloads:[[[oe],(t,[e])=>Er(e.evaluate(t),t.properties())],[[oe,le],(t,[e,n])=>Er(e.evaluate(t),n.evaluate(t))]]},"feature-state":[ce,[oe],(t,[e])=>Er(e.evaluate(t),t.featureState||{})],properties:[le,[],t=>t.properties()],"geometry-type":[oe,[],t=>t.geometryType()],id:[ce,[],t=>t.id()],zoom:[ie,[],t=>t.globals.zoom],pitch:[ie,[],t=>t.globals.pitch||0],"distance-from-center":[ie,[],t=>t.distanceFromCenter()],"heatmap-density":[ie,[],t=>t.globals.heatmapDensity||0],"line-progress":[ie,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[ie,[],t=>t.globals.skyRadialProgress||0],accumulated:[ce,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[ie,Cr(ie),(t,e)=>{let n=0;for(const r of e)n+=r.evaluate(t);return n}],"*":[ie,Cr(ie),(t,e)=>{let n=1;for(const r of e)n*=r.evaluate(t);return n}],"-":{type:ie,overloads:[[[ie,ie],(t,[e,n])=>e.evaluate(t)-n.evaluate(t)],[[ie],(t,[e])=>-e.evaluate(t)]]},"/":[ie,[ie,ie],(t,[e,n])=>e.evaluate(t)/n.evaluate(t)],"%":[ie,[ie,ie],(t,[e,n])=>e.evaluate(t)%n.evaluate(t)],ln2:[ie,[],()=>Math.LN2],pi:[ie,[],()=>Math.PI],e:[ie,[],()=>Math.E],"^":[ie,[ie,ie],(t,[e,n])=>Math.pow(e.evaluate(t),n.evaluate(t))],sqrt:[ie,[ie],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[ie,[ie],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[ie,[ie],(t,[e])=>Math.log(e.evaluate(t))],log2:[ie,[ie],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[ie,[ie],(t,[e])=>Math.sin(e.evaluate(t))],cos:[ie,[ie],(t,[e])=>Math.cos(e.evaluate(t))],tan:[ie,[ie],(t,[e])=>Math.tan(e.evaluate(t))],asin:[ie,[ie],(t,[e])=>Math.asin(e.evaluate(t))],acos:[ie,[ie],(t,[e])=>Math.acos(e.evaluate(t))],atan:[ie,[ie],(t,[e])=>Math.atan(e.evaluate(t))],min:[ie,Cr(ie),(t,e)=>Math.min(...e.map(e=>e.evaluate(t)))],max:[ie,Cr(ie),(t,e)=>Math.max(...e.map(e=>e.evaluate(t)))],abs:[ie,[ie],(t,[e])=>Math.abs(e.evaluate(t))],round:[ie,[ie],(t,[e])=>{const n=e.evaluate(t);return n<0?-Math.round(-n):Math.round(n)}],floor:[ie,[ie],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[ie,[ie],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[ae,[oe,ce],(t,[e,n])=>t.properties()[e.value]===n.value],"filter-id-==":[ae,[ce],(t,[e])=>t.id()===e.value],"filter-type-==":[ae,[oe],(t,[e])=>t.geometryType()===e.value],"filter-<":[ae,[oe,ce],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r<i}],"filter-id-<":[ae,[ce],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n<r}],"filter->":[ae,[oe,ce],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r>i}],"filter-id->":[ae,[ce],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[ae,[oe,ce],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[ae,[ce],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[ae,[oe,ce],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[ae,[ce],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[ae,[ce],(t,[e])=>e.value in t.properties()],"filter-has-id":[ae,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[ae,[pe(oe)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[ae,[pe(ce)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[ae,[oe,pe(ce)],(t,[e,n])=>n.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[ae,[oe,pe(ce)],(t,[e,n])=>(function(t,e,n,r){for(;n<=r;){const i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1})(t.properties()[e.value],n.value,0,n.value.length-1)],all:{type:ae,overloads:[[[ae,ae],(t,[e,n])=>e.evaluate(t)&&n.evaluate(t)],[Cr(ae),(t,e)=>{for(const n of e)if(!n.evaluate(t))return!1;return!0}]]},any:{type:ae,overloads:[[[ae,ae],(t,[e,n])=>e.evaluate(t)||n.evaluate(t)],[Cr(ae),(t,e)=>{for(const n of e)if(n.evaluate(t))return!0;return!1}]]},"!":[ae,[ae],(t,[e])=>!e.evaluate(t)],"is-supported-script":[ae,[oe],(t,[e])=>{const n=t.globals&&t.globals.isSupportedScript;return!n||n(e.evaluate(t))}],upcase:[oe,[oe],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[oe,[oe],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[oe,Cr(ce),(t,e)=>e.map(e=>Be(e.evaluate(t))).join("")],"resolved-locale":[oe,[ue],(t,[e])=>e.evaluate(t).resolvedLocale()]});var Or=wr;function Pr(t){return{result:"success",value:t}}function kr(t){return{result:"error",value:t}}function Ar(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ir(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Mr(t){return!!t.expression&&t.expression.interpolated}function Dr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Br(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function zr(t){return t}function Lr(t,e){const n="color"===e.type,r=t.stops&&"object"==typeof t.stops[0][0],i=r||!(r||void 0!==t.property),o=t.type||(Mr(e)?"exponential":"interval");if(n&&((t=Yt({},t)).stops&&(t.stops=t.stops.map(t=>[t[0],Ce.parse(t[1])])),t.default=Ce.parse(t.default?t.default:e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Hn[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let a,s,l;if("exponential"===o)a=Nr;else if("interval"===o)a=Fr;else if("categorical"===o){a=jr,s=Object.create(null);for(const e of t.stops)s[e[0]]=e[1];l=typeof t.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);a=$r}if(r){const n={},r=[];for(let e=0;e<t.stops.length;e++){const i=t.stops[e],o=i[0].zoom;void 0===n[o]&&(n[o]={zoom:o,type:t.type,property:t.property,default:t.default,stops:[]},r.push(o)),n[o].stops.push([i[0].value,i[1]])}const i=[];for(const t of r)i.push([n[t].zoom,Lr(n[t],e)]);const o={name:"linear"};return{kind:"composite",interpolationType:o,interpolationFactor:Zn.interpolationFactor.bind(void 0,o),zoomStops:i.map(t=>t[0]),evaluate:({zoom:n},r)=>Nr({stops:i,base:t.base},e,n).evaluate(n,r)}}if(i){const n="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:n,interpolationFactor:Zn.interpolationFactor.bind(void 0,n),zoomStops:t.stops.map(t=>t[0]),evaluate:({zoom:n})=>a(t,e,n,s,l)}}return{kind:"source",evaluate(n,r){const i=r&&r.properties?r.properties[t.property]:void 0;return void 0===i?Rr(t.default,e.default):a(t,e,i,s,l)}}}function Rr(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function jr(t,e,n,r,i){return Rr(typeof n===i?r[n]:void 0,t.default,e.default)}function Fr(t,e,n){if("number"!==Dr(n))return Rr(t.default,e.default);const 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];const i=Tn(t.stops.map(t=>t[0]),n);return t.stops[i][1]}function Nr(t,e,n){const r=void 0!==t.base?t.base:1;if("number"!==Dr(n))return Rr(t.default,e.default);const 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];const o=Tn(t.stops.map(t=>t[0]),n),a=function(t,e,n,r){const 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],l=t.stops[o+1][1];let c=Pn[e.type]||zr;if(t.colorSpace&&"rgb"!==t.colorSpace){const e=Hn[t.colorSpace];c=((t,n)=>e.reverse(e.interpolate(e.forward(t),e.forward(n),a)))}return"function"==typeof s.evaluate?{evaluate(...t){const e=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);
vendor: 4,820 bytes, line 45
45if(void 0!==e&&void 0!==n)return c(e,n,a)}}:c(s,l,a)}function $r(t,e,n){return"color"===e.type?n=Ce.parse(n):"formatted"===e.type?n=ke.fromString(n.toString()):"resolvedImage"===e.type?n=Ae.fromString(n.toString()):Dr(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),Rr(n,t.default,e.default)}class Vr{constructor(t,e){this.expression=t,this._warningHistory={},this._evaluator=new We,this._defaultValue=e?function(t){return"color"===t.type&&(Br(t.default)||Array.isArray(t.default))?new Ce(0,0,0,0):"color"===t.type?Ce.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,n,r,i,o,a,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,n,r,i,o,a,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new Re(`Expected value to be one of ${Object.keys(this._enumValues).map(t=>JSON.stringify(t)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function Ur(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Or}function Gr(t,e){const n=new wn(Or,[],e?function(t){const e={color:se,string:oe,number:ie,enum:oe,boolean:ae,formatted:he,resolvedImage:de};return"array"===t.type?pe(e[t.value]||ce,t.length):e[t.type]}(e):void 0),r=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?Pr(new Vr(r,e)):kr(n.errors)}class Hr{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!yn(e.expression)}evaluateWithoutErrorHandling(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)}evaluate(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)}}class qr{constructor(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==t&&!yn(e.expression),this.interpolationType=r}evaluateWithoutErrorHandling(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)}evaluate(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)}interpolationFactor(t,e,n){return this.interpolationType?Zn.interpolationFactor(this.interpolationType,t,e,n):0}}function Wr(t,e){if("error"===(t=Gr(t,e)).result)return t;const n=t.value.expression,r=gn(n);if(!r&&!Ar(e))return kr([new te("","data expressions not supported")]);const i=_n(n,["zoom","pitch","distance-from-center"]);if(!i&&!Ir(e))return kr([new te("","zoom expressions not supported")]);const o=Xr(n);return o||i?o instanceof te?kr([o]):o instanceof Zn&&!Mr(e)?kr([new te("",'"interpolate" expressions cannot be used with this property')]):Pr(o?new qr(r?"camera":"composite",t.value,o.labels,o instanceof Zn?o.interpolation:void 0):new Hr(r?"constant":"source",t.value)):kr([new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Zr{constructor(t,e){this._parameters=t,this._specification=e,Yt(this,Lr(this._parameters,this._specification))}static deserialize(t){return new Zr(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Xr(t){let e=null;if(t instanceof Jn)e=Xr(t.result);else if(t instanceof Yn){for(const n of t.args)if(e=Xr(n),e)break}else(t instanceof Cn||t instanceof Zn)&&t.input instanceof Xe&&"zoom"===t.input.name&&(e=t);return e instanceof te||t.eachChild(t=>{const n=Xr(t);n instanceof te?e=n:!e&&n?e=new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&n&&e!==n&&(e=new te("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}class Yr{constructor(t,e,n,r){this.message=(t?`${t}: `:"")+n,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)}}function Kr(t){const e=t.key,n=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec;let s=[];const l=Dr(n);if("object"!==l)return[new Yr(e,n,`object expected, ${l}
45 found`)];for(const c in n){const t=c.split(".")[0],l=r[t]||r["*"];let u;i[t]?u=i[t]:r[t]?u=Ai:i["*"]?u=i["*"]:r["*"]&&(u=Ai),u?s=s.concat(u({key:(e?`${e}.`:e)+c,value:n[c],valueSpec:l,style:o,styleSpec:a,object:n,objectKey:c},n)):s.push(new Yr(e,n[c],`unknown property "${c}"`))}for(const c in r)i[c]||r[c].required&&void 0===r[c].default&&void 0===n[c]&&s.push(new Yr(e,n,`missing required property "${c}"`));return s}function Jr(t){const e=t.value,n=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||Ai;if("array"!==Dr(e))return[new Yr(o,e,`array expected, ${Dr(e)} found`)];if(n.length&&e.length!==n.length)return[new Yr(o,e,`array length ${n.length} expected, length ${e.length} found`)];if(n["min-length"]&&e.length<n["min-length"])return[new Yr(o,e,`array length at least ${n["min-length"]} expected, length ${e.length} found`)];let s={type:n.value,values:n.values,minimum:n.minimum,maximum:n.maximum,function:void 0};i.$version<7&&(s.function=n.function),"object"===Dr(n.value)&&(s=n.value);let l=[];for(let c=0;c<e.length;c++)l=l.concat(a({array:e,arrayIndex:c,value:e[c],valueSpec:s,style:r,styleSpec:i,key:`${o}[${c}]`}));return l}function Qr(t){const e=t.key,n=t.value,r=t.valueSpec;let i=Dr(n);if("number"===i&&n!=n&&(i="NaN"),"number"!==i)return[new Yr(e,n,`number expected, ${i} found`)];if("minimum"in r){let i=r.minimum;if("array"===Dr(r.minimum)&&(i=r.minimum[t.arrayIndex]),n<i)return[new Yr(e,n,`${n} is less than the minimum value ${i}`)]}if("maximum"in r){let i=r.maximum;if("array"===Dr(r.maximum)&&(i=r.maximum[t.arrayIndex]),n>i)return[new Yr(e,n,`${n} is greater than the maximum value ${i}`)]}return[]}function ti(t){const e=t.valueSpec,n=Kt(t.value.type);let r,i,o,a={};const s="categorical"!==n&&void 0===t.value.property,l=!s,c="array"===Dr(t.value.stops)&&"array"===Dr(t.value.stops[0])&&"object"===Dr(t.value.stops[0][0]),u=Kr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===n)return[new Yr(t.key,t.value,'identity function may not have a "stops" property')];let e=[];const r=t.value;return e=e.concat(Jr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===Dr(r)&&0===r.length&&e.push(new Yr(t.key,r,"array must have at least one stop")),e},default:function(t){return Ai({key:t.key,value:t.value,valueSpec:e,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===n&&s&&u.push(new Yr(t.key,t.value,'missing required property "property"')),"identity"===n||t.value.stops||u.push(new Yr(t.key,t.value,'missing required property "stops"')),"exponential"===n&&t.valueSpec.expression&&!Mr(t.valueSpec)&&u.push(new Yr(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Ar(t.valueSpec)?u.push(new Yr(t.key,t.value,"property functions not supported")):s&&!Ir(t.valueSpec)&&u.push(new Yr(t.key,t.value,"zoom functions not supported"))),"categorical"!==n&&!c||void 0!==t.value.property||u.push(new Yr(t.key,t.value,'"property" property is required')),u;function h(t){let n=[];const r=t.value,s=t.key;if("array"!==Dr(r))return[new Yr(s,r,`array expected, ${Dr(r)} found`)];if(2!==r.length)return[new Yr(s,r,`array length 2 expected, length ${r.length} found`)];if(c){if("object"!==Dr(r[0]))return[new Yr(s,r,`object expected, ${Dr(r[0])} found`)];if(void 0===r[0].zoom)return[new Yr(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new Yr(s,r,"object stop key must have value")];const e=Kt(r[0].zoom);if("number"!=typeof e)return[new Yr(s,r[0].zoom,"stop zoom values must be numbers")];if(o&&o>e)return[new Yr(s,r[0].zoom,"stop zoom values must appear in ascending order")];e!==o&&(o=e,i=void 0,a={}),n=n.concat(Kr({key:`${s}[0]`,value:r[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Qr,value:d}}))}else n=n.concat(d({key:`${s}[0]`,value:r[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},r));return Ur(Jt(r[1]))?n.concat([new Yr(`${s}[1]`,r[1],"expressions are not allowed in function stops.")]):n.
vendor: 67,675 bytes, line 45
45concat(Ai({key:`${s}[1]`,value:r[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function d(t,o){const s=Dr(t.value),l=Kt(t.value),c=null!==t.value?t.value:o;if(r){if(s!==r)return[new Yr(t.key,c,`${s} stop domain type must match previous stop domain type ${r}`)]}else r=s;if("number"!==s&&"string"!==s&&"boolean"!==s&&"number"!=typeof l&&"string"!=typeof l&&"boolean"!=typeof l)return[new Yr(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==n){let r=`number expected, ${s} found`;return Ar(e)&&void 0===n&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Yr(t.key,c,r)]}return"categorical"!==n||"number"!==s||"number"==typeof l&&isFinite(l)&&Math.floor(l)===l?"categorical"!==n&&"number"===s&&"number"==typeof l&&"number"==typeof i&&void 0!==i&&l<i?[new Yr(t.key,c,"stop domain values must appear in ascending order")]:(i=l,"categorical"===n&&l in a?[new Yr(t.key,c,"stop domain values must be unique")]:(a[l]=!0,[])):[new Yr(t.key,c,`integer expected, found ${String(l)}`)]}}function ei(t){const e=("property"===t.expressionContext?Wr:Gr)(Jt(t.value),t.valueSpec);if("error"===e.result)return e.value.map(e=>new Yr(`${t.key}${e.key}`,t.value,e.message));const n=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!n.outputDefined())return[new Yr(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===t.expressionContext&&"layout"===t.propertyType&&!yn(n))return[new Yr(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext)return ni(n,t);if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!_n(n,["zoom","feature-state"]))return[new Yr(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!gn(n))return[new Yr(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ni(t,e){const n=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const i of e.valueSpec.expression.parameters)n.delete(i);if(0===n.size)return[];const r=[];return t instanceof Xe&&n.has(t.name)?[new Yr(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(t=>{r.push(...ni(t,e))}),r)}function ri(t){const e=t.key,n=t.value,r=t.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(Kt(n))&&i.push(new Yr(e,n,`expected one of [${r.values.join(", ")}], ${JSON.stringify(n)} found`)):-1===Object.keys(r.values).indexOf(Kt(n))&&i.push(new Yr(e,n,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(n)} found`)),i}function ii(t){if(!0===t||!1===t)return!0;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":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));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(const e of t.slice(1))if(!ii(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function oi(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};ii(t)||(t=di(t));const n=t;let r=!0;try{r=function(t){if(!li(t))return t;let e=Jt(t);return si(e),e=ai(e),e}(n)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(n,null,2)}\n        `)}const i=Xt[`filter_${e}`],o=Gr(r,i);let a=null;if("error"===o.result)throw new Error(o.value.map(t=>`${t.key}: ${t.message}`).join(", "));a=((t,e,n)=>o.value.evaluate(t,e,{},n));let s=null,l=null;if(r!==n){const t=Gr(n,i);if("error"===t.result)throw new Error(t.value.map(t=>`${t.key}: ${t.message}`).join(", "));s=((e,n,r,i,o)=>t.value.evaluate(e,n,{},r,void 0,void 0,i,o)),l=!gn(t.value.expression)}return{filter:a,dynamicFilter:s||void 0,needGeometry:hi(r),needFeature:!!l}}function ai(t){if(!Array.isArray(t))return t;const e=function(t){if(ci.has(t[0]))for(let e=1;e<t.length;e++)if(li(t[e]))return!0;return t}(t);return!0===e?e:e.map(t=>ai(t))}function si(t){let e=!1;const n=[];if("case"===t[0]){for(let r=1;r<t.length-1;r+=2)e=e||li(t[r]),n.push(t[r+1]);n.push(t[t.length-1])}else if("match"===t[0]){e=e||li(t[1]);for(let e=2;e<t.length-1;e+=2)n.push(t[e+1]);n.push(t[t.length-1])}else if("step"===t[0]){e=e||li(t[1]);for(let e=1;e<t.length-1;e+=2)n.push(t[e+1])}e&&(t.length=0,t.push("any",...n));for(let r=1;r<t.length;r++)si(t[r])}function li(t){if(!Array.isArray(t))return!1;if("pitch"===(e=t[0])||"distance-from-center"===e)return!0;var e;for(let n=1;n<t.length;n++)if(li(t[n]))return!0;return!1}const ci=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function ui(t,e){return t<e?-1:t>e?1:0}function hi(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e<t.length;e++)if(hi(t[e]))return!0;return!1}function di(t){if(!t)return!0;const e=t[0];return t.length<=1?"any"!==e:"=="===e?pi(t[1],t[2],"=="):"!="===e?gi(pi(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?pi(t[1],t[2],e):"any"===e?(n=t.slice(1),["any"].concat(n.map(di))):"all"===e?["all"].concat(t.slice(1).map(di)):"none"===e?["all"].concat(t.slice(1).map(di).map(gi)):"in"===e?fi(t[1],t.slice(2)):"!in"===e?gi(fi(t[1],t.slice(2))):"has"===e?mi(t[1]):"!has"===e?gi(mi(t[1])):"within"!==e||t;var n}function pi(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 fi(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(t=>typeof t!=typeof e[0])?["filter-in-large",t,["literal",e.sort(ui)]]:["filter-in-small",t,["literal",e]]}}function mi(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function gi(t){return["!",t]}function yi(t){return ii(Jt(t.value))?ei(Yt({},t,{expressionContext:"filter",valueSpec:t.styleSpec[`filter_${t.layerType||"fill"}`]})):_i(t)}function _i(t){const e=t.value,n=t.key;if("array"!==Dr(e))return[new Yr(n,e,`array expected, ${Dr(e)} found`)];const r=t.styleSpec;let i,o=[];if(e.length<1)return[new Yr(n,e,"filter array must have at least 1 element")];switch(o=o.concat(ri({key:`${n}[0]`,value:e[0],valueSpec:r.filter_operator,style:t.style,styleSpec:t.styleSpec})),Kt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===Kt(e[1])&&o.push(new Yr(n,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":3!==e.length&&o.push(new Yr(n,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(i=Dr(e[1]),"string"!==i&&o.push(new Yr(`${n}[1]`,e[1],`string expected, ${i} found`)));for(let a=2;a<e.length;a++)i=Dr(e[a]),"$type"===Kt(e[1])?o=o.concat(ri({key:`${n}[${a}]`,value:e[a],valueSpec:r.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&o.push(new Yr(`${n}[${a}]`,e[a],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let r=1;r<e.length;r++)o=o.concat(_i({key:`${n}[${r}]`,value:e[r],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":i=Dr(e[1]),2!==e.length?o.push(new Yr(n,e,`filter array for "${e[0]}" operator must have 2 elements`)):"string"!==i&&o.push(new Yr(`${n}[1]`,e[1],`string expected, ${i} found`));break;case"within":i=Dr(e[1]),2!==e.length?o.push(new Yr(n,e,`filter array for "${e[0]}" operator must have 2 elements`)):"object"!==i&&o.push(new Yr(`${n}[1]`,e[1],`object expected, ${i} found`))}return o}function vi(t,e){const n=t.key,r=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[`${e}_${t.layerType}`];if(!s)return[];const l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return Ai({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});const c=t.valueSpec||s[a];if(!c)return[new Yr(n,o,`unknown property "${a}"`)];let u;if("string"===Dr(o)&&Ar(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new Yr(n,o,`"${a}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(u[1])} }\`.`)];const h=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&h.push(new Yr(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Br(Jt(o))&&"identity"===Kt(o.type)&&h.push(new Yr(n,o,'"text-font" does not support identity functions'))),h.concat(Ai({key:t.key,value:o,valueSpec:c,style:r,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function bi(t){return vi(t,"paint")}function xi(t){return vi(t,"layout")}function wi(t){let e=[];const n=t.value,r=t.key,i=t.style,o=t.styleSpec;n.type||n.ref||e.push(new Yr(r,n,'either "type" or "ref" is required'));let a=Kt(n.type);const s=Kt(n.ref);if(n.id){const o=Kt(n.id);for(let a=0;a<t.arrayIndex;a++){const t=i.layers[a];Kt(t.id)===o&&e.push(new Yr(r,n.id,`duplicate layer id "${n.id}", previously used at line ${t.id.__line__}`))}}if("ref"in n){let t;["type","source","source-layer","filter","layout"].forEach(t=>{t in n&&e.push(new Yr(r,n[t],`"${t}" is prohibited for ref layers`))}),i.layers.forEach(e=>{Kt(e.id)===s&&(t=e)}),t?t.ref?e.push(new Yr(r,n.ref,"ref cannot reference another ref layer")):a=Kt(t.type):"string"==typeof s&&e.push(new Yr(r,n.ref,`ref layer "${s}" not found`))}else if("background"!==a&&"sky"!==a)if(n.source){const t=i.sources&&i.sources[n.source],o=t&&Kt(t.type);t?"vector"===o&&"raster"===a?e.push(new Yr(r,n.source,`layer "${n.id}" requires a raster source`)):"raster"===o&&"raster"!==a?e.push(new Yr(r,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==o||n["source-layer"]?"raster-dem"===o&&"hillshade"!==a?e.push(new Yr(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!n.paint||!n.paint["line-gradient"]&&!n.paint["line-trim-offset"]||"geojson"===o&&t.lineMetrics||e.push(new Yr(r,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Yr(r,n,`layer "${n.id}" must specify a "source-layer"`)):e.push(new Yr(r,n.source,`source "${n.source}" not found`))}else e.push(new Yr(r,n,'missing required property "source"'));return e=e.concat(Kr({key:r,value:n,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Ai({key:`${r}.type`,value:n.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"}),filter:t=>yi(Yt({layerType:a},t)),layout:t=>Kr({layer:n,key:t.key,value:t.value,valueSpec:{},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>xi(Yt({layerType:a},t))}}),paint:t=>Kr({layer:n,key:t.key,value:t.value,valueSpec:{},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>bi(Yt({layerType:a},t))}})}})),e}function Si(t){const e=t.value,n=t.key,r=Dr(e);return"string"!==r?[new Yr(n,e,`string expected, ${r} found`)]:[]}const Ti={promoteId:function({key:t,value:e}){if("string"===Dr(e))return Si({key:t,value:e});{const n=[];for(const r in e)n.push(...Si({key:`${t}.${r}`,value:e[r]}));return n}}};function Ei(t){const e=t.value,n=t.key,r=t.styleSpec,i=t.style;if(!e.type)return[new Yr(n,e,'"type" is required')];const o=Kt(e.type);let a;switch(o){case"vector":case"raster":case"raster-dem":return a=Kr({key:n,value:e,valueSpec:r[`source_${o.replace("-","_")}`],style:t.style,styleSpec:r,objectElementValidators:Ti}),a;case"geojson":if(a=Kr({key:n,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,objectElementValidators:Ti}),e.cluster)for(const t in e.clusterProperties){const[r,i]=e.clusterProperties[t],o="string"==typeof r?[r,["accumulated"],["get",t]]:r;a.push(...ei({key:`${n}.${t}.map`,value:i,expressionContext:"cluster-map"})),a.push(...ei({key:`${n}.${t}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return a;case"video":return Kr({key:n,value:e,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return Kr({key:n,value:e,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return[new Yr(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ri({key:`${n}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function Ci(t){const e=t.value,n=t.styleSpec,r=n.light,i=t.style;let o=[];const a=Dr(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new Yr("light",e,`object expected, ${a} found`)]),o;for(const s in e){const t=s.match(/^(.*)-transition$/);o=o.concat(t&&r[t[1]]&&r[t[1]].transition?Ai({key:s,value:e[s],valueSpec:n.transition,style:i,styleSpec:n}):r[s]?Ai({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n}):[new Yr(s,e[s],`unknown property "${s}"`)])}return o}function Oi(t){const e=t.value,n=t.key,r=t.style,i=t.styleSpec,o=i.terrain;let a=[];const s=Dr(e);if(void 0===e)return a;if("object"!==s)return a=a.concat([new Yr("terrain",e,`object expected, ${s} found`)]),a;for(const l in e){const t=l.match(/^(.*)-transition$/);a=a.concat(t&&o[t[1]]&&o[t[1]].transition?Ai({key:l,value:e[l],valueSpec:i.transition,style:r,styleSpec:i}):o[l]?Ai({key:l,value:e[l],valueSpec:o[l],style:r,styleSpec:i}):[new Yr(l,e[l],`unknown property "${l}"`)])}if(e.source){const t=r.sources&&r.sources[e.source],i=t&&Kt(t.type);t?"raster-dem"!==i&&a.push(new Yr(n,e.source,`terrain cannot be used with a source of type ${String(i)}, it only be used with a "raster-dem" source type`)):a.push(new Yr(n,e.source,`source "${e.source}" not found`))}else a.push(new Yr(n,e,'terrain is missing required property "source"'));return a}function Pi(t){const e=t.value,n=t.style,r=t.styleSpec,i=r.fog;let o=[];const a=Dr(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new Yr("fog",e,`object expected, ${a} found`)]),o;for(const s in e){const t=s.match(/^(.*)-transition$/);o=o.concat(t&&i[t[1]]&&i[t[1]].transition?Ai({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r}):i[s]?Ai({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r}):[new Yr(s,e[s],`unknown property "${s}"`)])}return o}const ki={"*":()=>[],array:Jr,boolean:function(t){const e=t.value,n=t.key,r=Dr(e);return"boolean"!==r?[new Yr(n,e,`boolean expected, ${r} found`)]:[]},number:Qr,color:function(t){const e=t.key,n=t.value,r=Dr(n);return"string"!==r?[new Yr(e,n,`color expected, ${r} found`)]:null===ve(n)?[new Yr(e,n,`color expected, "${n}" found`)]:[]},enum:ri,filter:yi,function:ti,layer:wi,object:Kr,source:Ei,light:Ci,terrain:Oi,fog:Pi,string:Si,formatted:function(t){return 0===Si(t).length?[]:ei(t)},resolvedImage:function(t){return 0===Si(t).length?[]:ei(t)},projection:function(t){const e=t.value,n=t.styleSpec,r=n.projection,i=t.style;let o=[];const a=Dr(e);if("object"===a)for(const s in e)o=o.concat(Ai({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n}));else"string"!==a&&(o=o.concat([new Yr("projection",e,`object or string expected, ${a} found`)]));return o}};function Ai(t){const e=t.value,n=t.valueSpec,r=t.styleSpec;return n.expression&&Br(Kt(e))?ti(t):n.expression&&Ur(Jt(e))?ei(t):n.type&&ki[n.type]?ki[n.type](t):Kr(Yt({},t,{valueSpec:n.type?r[n.type]:n}))}function Ii(t){const e=t.value,n=t.key,r=Si(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new Yr(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Yr(n,e,'"glyphs" url must include a "{range}" token'))),r}function Mi(t,e=Xt){return zi(Ai({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Ii,"*":()=>[]}}))}const Di=t=>zi(bi(t)),Bi=t=>zi(xi(t));function zi(t){return t.slice().sort((t,e)=>t.line&&e.line?t.line-e.line:0)}function Li(t,e){let n=!1;if(e&&e.length)for(const r of e)t.fire(new Wt(new Error(r.message))),n=!0;return n}var Ri=ji;function ji(t,e,n){var r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],this.d=(e=i[1])+2*(n=i[2]);for(var o=0;o<this.d*this.d;o++){var a=i[3+o],s=i[3+o+1];r.push(a===s?null:i.subarray(a,s))}var l=i[3+r.length+1];this.keys=i.subarray(i[3+r.length],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 u=n/e*t;this.min=-u,this.max=t+u}ji.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)},ji.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ji.prototype._insertCell=function(t,e,n,r,i,o){this.cells[i].push(o)},ji.prototype.query=function(t,e,n,r,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,n,r,this._queryCell,s,{},i),s},ji.prototype._queryCell=function(t,e,n,r,i,o,a,s){var l=this.cells[i];if(null!==l)for(var c=this.keys,u=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var p=4*d;(s?s(u[p+0],u[p+1],u[p+2],u[p+3]):t<=u[p+2]&&e<=u[p+3]&&n>=u[p+0]&&r>=u[p+1])?(a[d]=!0,o.push(c[d])):a[d]=!1}}},ji.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(n),h=this._convertToCellCoord(r),d=l;d<=u;d++)for(var p=c;p<=h;p++){var f=this.d*p+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,n,r,f,o,a,s))return}},ji.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},ji.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ji.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+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[3+a]=o,i.set(s,o),o+=s.length}return i[3+t.length]=o,i.set(this.keys,o),i[3+t.length+1]=o+=this.keys.length,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};const Fi={};function Ni(t,e,n={}){Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Fi[e]={klass:t,omit:n.omit||[]}}Ni(Object,"Object"),Ri.serialize=function(t,e){const n=t.toArrayBuffer();return e&&e.push(n),{buffer:n}},Ri.deserialize=function(t){return new Ri(t.buffer)},Object.defineProperty(Ri,"name",{value:"Grid"}),Ni(Ri,"Grid"),Ni(Ce,"Color"),Ni(Error,"Error"),Ni(at,"AJAXError"),Ni(Ae,"ResolvedImage"),Ni(Zr,"StylePropertyFunction"),Ni(Vr,"StyleExpression",{omit:["_evaluator"]}),Ni(qr,"ZoomDependentExpression"),Ni(Hr,"ZoomConstantExpression"),Ni(Xe,"CompoundExpression",{omit:["_evaluate"]});for(const wm in Or)Fi[Or[wm]._classRegistryKey]||Ni(Or[wm],`Expression${wm}`);function $i(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Vi(t){return e.ImageBitmap&&t instanceof e.ImageBitmap}function Ui(t,n){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($i(t)||Vi(t))return n&&n.push(t),t;if(ArrayBuffer.isView(t)){const e=t;return n&&n.push(e.buffer),e}if(t instanceof e.ImageData)return n&&n.push(t.data.buffer),t;if(Array.isArray(t)){const e=[];for(const r of t)e.push(Ui(r,n));return e}if("object"==typeof t){const e=t.constructor,r=e._classRegistryKey;if(!r)throw new Error(`can't serialize object of unregistered class ${r}`);const i=e.serialize?e.serialize(t,n):{};if(!e.serialize){for(const e in t)t.hasOwnProperty(e)&&(Fi[r].omit.indexOf(e)>=0||(i[e]=Ui(t[e],n)));t instanceof Error&&(i.message=t.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}throw new Error("can't serialize object of type "+typeof t)}function Gi(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||$i(t)||Vi(t)||ArrayBuffer.isView(t)||t instanceof e.ImageData)return t;if(Array.isArray(t))return t.map(Gi);if("object"==typeof t){const e=t.$name||"Object",{klass:n}=Fi[e];if(!n)throw new Error(`can't deserialize unregistered class ${e}`);if(n.deserialize)return n.deserialize(t);const r=Object.create(n.prototype);for(const i of Object.keys(t))"$name"!==i&&(r[i]=Gi(t[i]));return r}throw new Error("can't deserialize object of type "+typeof t)}class Hi{constructor(){this.first=!0}update(t,e){const 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))}}const qi=t=>t>=1536&&t<=1791,Wi=t=>t>=1872&&t<=1919,Zi=t=>t>=2208&&t<=2303,Xi=t=>t>=11904&&t<=12031,Yi=t=>t>=12032&&t<=12255,Ki=t=>t>=12272&&t<=12287,Ji=t=>t>=12288&&t<=12351,Qi=t=>t>=12352&&t<=12447,to=t=>t>=12448&&t<=12543,eo=t=>t>=12544&&t<=12591,no=t=>t>=12704&&t<=12735,ro=t=>t>=12736&&t<=12783,io=t=>t>=12784&&t<=12799,oo=t=>t>=12800&&t<=13055,ao=t=>t>=13056&&t<=13311,so=t=>t>=13312&&t<=19903,lo=t=>t>=19968&&t<=40959,co=t=>t>=40960&&t<=42127,uo=t=>t>=42128&&t<=42191,ho=t=>t>=44032&&t<=55215,po=t=>t>=63744&&t<=64255,fo=t=>t>=64336&&t<=65023,mo=t=>t>=65040&&t<=65055,go=t=>t>=65072&&t<=65103,yo=t=>t>=65104&&t<=65135,_o=t=>t>=65136&&t<=65279,vo=t=>t>=65280&&t<=65519;function bo(t){for(const e of t)if(So(e.charCodeAt(0)))return!0;return!1}function xo(t){for(const e of t)if(!wo(e.charCodeAt(0)))return!1;return!0}function wo(t){return!(qi(t)||Wi(t)||Zi(t)||fo(t)||_o(t))}function So(t){return!(746!==t&&747!==t&&(t<4352||!(no(t)||eo(t)||go(t)&&!(t>=65097&&t<=65103)||po(t)||ao(t)||Xi(t)||ro(t)||!(!Ji(t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||so(t)||lo(t)||oo(t)||(t=>t>=12592&&t<=12687)(t)||(t=>t>=43360&&t<=43391)(t)||(t=>t>=55216&&t<=55295)(t)||(t=>t>=4352&&t<=4607)(t)||ho(t)||Qi(t)||Ki(t)||(t=>t>=12688&&t<=12703)(t)||Yi(t)||io(t)||to(t)&&12540!==t||!(!vo(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)||!(!yo(t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(t=>t>=5120&&t<=5759)(t)||(t=>t>=6320&&t<=6399)(t)||mo(t)||(t=>t>=19904&&t<=19967)(t)||co(t)||uo(t))))}function To(t){return!(So(t)||function(t){return!!((t=>t>=128&&t<=255)(t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||(t=>t>=8192&&t<=8303)(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)||(t=>t>=8448&&t<=8527)(t)||(t=>t>=8528&&t<=8591)(t)||(t=>t>=8960&&t<=9215)(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)||(t=>t>=9216&&t<=9279)(t)&&9251!==t||(t=>t>=9280&&t<=9311)(t)||(t=>t>=9312&&t<=9471)(t)||(t=>t>=9632&&t<=9727)(t)||(t=>t>=9728&&t<=9983)(t)&&!(t>=9754&&t<=9759)||(t=>t>=11008&&t<=11263)(t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Ji(t)||to(t)||(t=>t>=57344&&t<=63743)(t)||go(t)||yo(t)||vo(t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Eo(t){return t>=1424&&t<=2303||fo(t)||_o(t)}function Co(t,e){return!(!e&&Eo(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||(t=>t>=6016&&t<=6143)(t))}function Oo(t){for(const e of t)if(Eo(e.charCodeAt(0)))return!0;return!1}const Po="deferred",ko="loading",Ao="loaded";let Io=null,Mo="unavailable",Do=null;const Bo=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Mo="error"),Io&&Io(t)};function zo(){Lo.fire(new qt("pluginStateChange",{pluginStatus:Mo,pluginURL:Do}))}const Lo=new Zt,Ro=function(){return Mo},jo=function(){if(Mo!==Po||!Do)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Mo=ko,zo(),Do&&ct({url:Do},t=>{t?Bo(t):(Mo=Ao,zo())})},Fo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Mo===Ao||null!=Fo.applyArabicShaping,isLoading:()=>Mo===ko,setState(t){Mo=t.pluginStatus,Do=t.pluginURL},isParsed:()=>null!=Fo.applyArabicShaping&&null!=Fo.processBidirectionalText&&null!=Fo.processStyledBidirectionalText,getPluginURL:()=>Do};class No{constructor(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition,this.pitch=e.pitch):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Hi,this.transition={},this.pitch=0)}isSupportedScript(t){return function(t,e){for(const n of t)if(!Co(n.charCodeAt(0),e))return!1;return!0}(t,Fo.isLoaded())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,e=t-Math.floor(t),n=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}}}class $o{constructor(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Zr(t,e);if(Ur(t)){const n=Wr(t,e);if("error"===n.result)throw new Error(n.value.map(t=>`${t.key}: ${t.message}`).join(", "));return n.value}{let n=t;return"string"==typeof t&&"color"===e.type&&(n=Ce.parse(t)),{kind:"constant",evaluate:()=>n}}}(void 0===e?t.specification.default:e,t.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(t,e,n){return this.property.possiblyEvaluate(this,t,e,n)}}class Vo{constructor(t){this.property=t,this.value=new $o(t,void 0)}transitioned(t,e){return new Go(this.property,this.value,e,k({},t.transition,this.transition),t.now)}untransitioned(){return new Go(this.property,this.value,null,{},0)}}class Uo{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return F(this._values[t].value.value)}setValue(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Vo(this._values[t].property)),this._values[t].value=new $o(this._values[t].property,null===e?void 0:F(e))}getTransition(t){return F(this._values[t].transition)}setTransition(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Vo(this._values[t].property)),this._values[t].transition=F(e)||void 0}serialize(){const t={};for(const e of Object.keys(this._values)){const n=this.getValue(e);void 0!==n&&(t[e]=n);const r=this.getTransition(e);void 0!==r&&(t[`${e}-transition`]=r)}return t}transitioned(t,e){const n=new Ho(this._properties);for(const r of Object.keys(this._values))n._values[r]=this._values[r].transitioned(t,e._values[r]);return n}untransitioned(){const t=new Ho(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class Go{constructor(t,e,n,r,i){const o=r.delay||0,a=r.duration||0;i=i||0,this.property=t,this.value=e,this.begin=i+o,this.end=this.begin+a,t.specification.transition&&(r.delay||r.duration)&&(this.prior=n)}possiblyEvaluate(t,e,n){const r=t.now||0,i=this.value.possiblyEvaluate(t,e,n),o=this.prior;if(o){if(r>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r<this.begin)return o.possiblyEvaluate(t,e,n);{const a=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,n),i,x(a))}}return i}}class Ho{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,e,n){const r=new Zo(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(t,e,n);return r}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class qo{constructor(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}getValue(t){return F(this._values[t].value)}setValue(t,e){this._values[t]=new $o(this._values[t].property,null===e?void 0:F(e))}serialize(){const t={};for(const e of Object.keys(this._values)){const n=this.getValue(e);void 0!==n&&(t[e]=n)}return t}possiblyEvaluate(t,e,n){const r=new Zo(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(t,e,n);return r}}class Wo{constructor(t,e,n){this.property=t,this.value=e,this.parameters=n}isConstant(){return"constant"===this.value.kind}constantOr(t){return"constant"===this.value.kind?this.value.value:t}evaluate(t,e,n,r){return this.property.evaluate(this.value,this.parameters,t,e,n,r)}}class Zo{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class Xo{constructor(t){this.specification=t}possiblyEvaluate(t,e){return t.expression.evaluate(e)}interpolate(t,e,n){const r=Pn[this.specification.type];return r?r(t,e,n):t}}class Yo{constructor(t,e){this.specification=t,this.overrides=e}possiblyEvaluate(t,e,n,r){return new Wo(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},n,r)}:t.expression,e)}interpolate(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 Wo(this,{kind:"constant",value:void 0},t.parameters);const r=Pn[this.specification.type];return r?new Wo(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.parameters):t}evaluate(t,e,n,r,i,o){return"constant"===t.kind?t.value:t.evaluate(e,n,r,i,o)}}class Ko extends Yo{possiblyEvaluate(t,e,n,r){if(void 0===t.value)return new Wo(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){const i=t.expression.evaluate(e,null,{},n,r),o="resolvedImage"===t.property.specification.type&&"string"!=typeof i?i.name:i,a=this._calculate(o,o,o,e);return new Wo(this,{kind:"constant",value:a},e)}if("camera"===t.expression.kind){const n=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new Wo(this,{kind:"constant",value:n},e)}return new Wo(this,t.expression,e)}evaluate(t,e,n,r,i,o){if("source"===t.kind){const a=t.evaluate(e,n,r,i,o);return this._calculate(a,a,a,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},n,r),t.evaluate({zoom:Math.floor(e.zoom)},n,r),t.evaluate({zoom:Math.floor(e.zoom)+1},n,r),e):t.value}_calculate(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e,other:n}:{from:n,to:e,other:t}}interpolate(t){return t}}class Jo{constructor(t){this.specification=t}possiblyEvaluate(t,e,n,r){if(void 0!==t.value){if("constant"===t.expression.kind){const i=t.expression.evaluate(e,null,{},n,r);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new No(Math.floor(e.zoom-1),e)),t.expression.evaluate(new No(Math.floor(e.zoom),e)),t.expression.evaluate(new No(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}}interpolate(t){return t}}class Qo{constructor(t){this.specification=t}possiblyEvaluate(t,e,n,r){return!!t.expression.evaluate(e,null,{},n,r)}interpolate(){return!1}}class ta{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const e=new No(0,{});for(const n in t){const r=t[n];r.specification.overridable&&this.overridableProperties.push(n);const i=this.defaultPropertyValues[n]=new $o(r,void 0),o=this.defaultTransitionablePropertyValues[n]=new Vo(r);this.defaultTransitioningPropertyValues[n]=o.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=i.possiblyEvaluate(e)}}}function ea(t,e){return 256*(t=T(Math.floor(t),0,255))+T(Math.floor(e),0,255)}Ni(Yo,"DataDrivenProperty"),Ni(Xo,"DataConstantProperty"),Ni(Ko,"CrossFadedDataDrivenProperty"),Ni(Jo,"CrossFadedProperty"),Ni(Qo,"ColorRampProperty");const na={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ra{constructor(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}}class ia{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function oa(t,e=1){let n=0,r=0;return{members:t.map(t=>{const i=na[t.type].BYTES_PER_ELEMENT,o=n=aa(n,Math.max(e,i)),a=t.components||1;return r=Math.max(r,i),n+=i*a,{name:t.name,type:t.type,components:a,offset:o}}),size:aa(n,Math.max(r,e)),alignment:e}}function aa(t,e){return Math.ceil(t/e)*e}class sa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){const n=this.length;return this.resize(n+1),this.emplace(n,t,e)}emplace(t,e,n){const r=2*t;return this.int16[r+0]=e,this.int16[r+1]=n,t}}sa.prototype.bytesPerElement=4,Ni(sa,"StructArrayLayout2i4");class la extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=3*t;return this.int16[i+0]=e,this.int16[i+1]=n,this.int16[i+2]=r,t}}la.prototype.bytesPerElement=6,Ni(la,"StructArrayLayout3i6");class ca extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=4*t;return this.int16[o+0]=e,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,t}}ca.prototype.bytesPerElement=8,Ni(ca,"StructArrayLayout4i8");class ua extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,n,r,i,o,a)}emplace(t,e,n,r,i,o,a,s){const l=6*t,c=12*t,u=3*t;return this.int16[l+0]=e,this.int16[l+1]=n,this.uint8[c+4]=r,this.uint8[c+5]=i,this.uint8[c+6]=o,this.uint8[c+7]=a,this.float32[u+2]=s,t}}ua.prototype.bytesPerElement=12,Ni(ua,"StructArrayLayout2i4ub1f12");class ha extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=4*t;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,t}}ha.prototype.bytesPerElement=16,Ni(ha,"StructArrayLayout4f16");class da extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,l,c){const u=this.length;return this.resize(u+1),this.emplace(u,t,e,n,r,i,o,a,s,l,c)}emplace(t,e,n,r,i,o,a,s,l,c,u){const h=10*t;return this.uint16[h+0]=e,this.uint16[h+1]=n,this.uint16[h+2]=r,this.uint16[h+3]=i,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,t}}da.prototype.bytesPerElement=20,Ni(da,"StructArrayLayout10ui20");class pa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s){const l=this.length;return this.resize(l+1),this.emplace(l,t,e,n,r,i,o,a,s)}emplace(t,e,n,r,i,o,a,s,l){const c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=n,this.uint16[c+2]=r,this.uint16[c+3]=i,this.uint16[c+4]=o,this.uint16[c+5]=a,this.uint16[c+6]=s,this.uint16[c+7]=l,t}}pa.prototype.bytesPerElement=16,Ni(pa,"StructArrayLayout8ui16");class fa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)}emplace(t,e,n,r,i,o,a){const s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t}}fa.prototype.bytesPerElement=12,Ni(fa,"StructArrayLayout6i12");class ma extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,l,c,u,h){const d=this.length;return this.resize(d+1),this.emplace(d,t,e,n,r,i,o,a,s,l,c,u,h)}emplace(t,e,n,r,i,o,a,s,l,c,u,h,d){const p=12*t;return this.int16[p+0]=e,this.int16[p+1]=n,this.int16[p+2]=r,this.int16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=h,this.int16[p+11]=d,t}}ma.prototype.bytesPerElement=24,Ni(ma,"StructArrayLayout4i4ui4i24");class ga extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)}emplace(t,e,n,r,i,o,a){const s=10*t,l=5*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.float32[l+2]=i,this.float32[l+3]=o,this.float32[l+4]=a,t}}ga.prototype.bytesPerElement=20,Ni(ga,"StructArrayLayout3i3f20");class ya extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint32[1*t+0]=e,t}}ya.prototype.bytesPerElement=4,Ni(ya,"StructArrayLayout1ul4");class _a extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,l,c,u,h,d){const p=this.length;return this.resize(p+1),this.emplace(p,t,e,n,r,i,o,a,s,l,c,u,h,d)}emplace(t,e,n,r,i,o,a,s,l,c,u,h,d,p){const f=20*t,m=10*t;return this.int16[f+0]=e,this.int16[f+1]=n,this.int16[f+2]=r,this.int16[f+3]=i,this.int16[f+4]=o,this.float32[m+3]=a,this.float32[m+4]=s,this.float32[m+5]=l,this.float32[m+6]=c,this.int16[f+14]=u,this.uint32[m+8]=h,this.uint16[f+18]=d,this.uint16[f+19]=p,t}}_a.prototype.bytesPerElement=40,Ni(_a,"StructArrayLayout5i4f1i1ul2ui40");class va extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,n,r,i,o,a)}emplace(t,e,n,r,i,o,a,s){const l=8*t;return this.int16[l+0]=e,this.int16[l+1]=n,this.int16[l+2]=r,this.int16[l+4]=i,this.int16[l+5]=o,this.int16[l+6]=a,this.int16[l+7]=s,t}}va.prototype.bytesPerElement=16,Ni(va,"StructArrayLayout3i2i2i16");class ba extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,r,i)}emplace(t,e,n,r,i,o){const a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,t}}ba.prototype.bytesPerElement=16,Ni(ba,"StructArrayLayout2f1f2i16");class xa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,t}}xa.prototype.bytesPerElement=12,Ni(xa,"StructArrayLayout2ub2f12");class wa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=3*t;return this.float32[i+0]=e,this.float32[i+1]=n,this.float32[i+2]=r,t}}wa.prototype.bytesPerElement=12,Ni(wa,"StructArrayLayout3f12");class Sa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=n,this.uint16[i+2]=r,t}}Sa.prototype.bytesPerElement=6,Ni(Sa,"StructArrayLayout3ui6");class Ta extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b){const x=this.length;return this.resize(x+1),this.emplace(x,t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b)}emplace(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b,x){const w=30*t,S=15*t,T=60*t;return this.int16[w+0]=e,this.int16[w+1]=n,this.int16[w+2]=r,this.float32[S+2]=i,this.float32[S+3]=o,this.uint16[w+8]=a,this.uint16[w+9]=s,this.uint32[S+5]=l,this.uint32[S+6]=c,this.uint32[S+7]=u,this.uint16[w+16]=h,this.uint16[w+17]=d,this.uint16[w+18]=p,this.float32[S+10]=f,this.float32[S+11]=m,this.uint8[T+48]=g,this.uint8[T+49]=y,this.uint8[T+50]=_,this.uint32[S+13]=v,this.int16[w+28]=b,this.uint8[T+58]=x,t}}Ta.prototype.bytesPerElement=60,Ni(Ta,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class Ea extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b,x,w,S,T,E,C,O,P,k){const A=this.length;return this.resize(A+1),this.emplace(A,t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b,x,w,S,T,E,C,O,P,k)}emplace(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b,x,w,S,T,E,C,O,P,k,A){const I=38*t,M=19*t;return this.int16[I+0]=e,this.int16[I+1]=n,this.int16[I+2]=r,this.float32[M+2]=i,this.float32[M+3]=o,this.int16[I+8]=a,this.int16[I+9]=s,this.int16[I+10]=l,this.int16[I+11]=c,this.int16[I+12]=u,this.int16[I+13]=h,this.uint16[I+14]=d,this.uint16[I+15]=p,this.uint16[I+16]=f,this.uint16[I+17]=m,this.uint16[I+18]=g,this.uint16[I+19]=y,this.uint16[I+20]=_,this.uint16[I+21]=v,this.uint16[I+22]=b,this.uint16[I+23]=x,this.uint16[I+24]=w,this.uint16[I+25]=S,this.uint16[I+26]=T,this.uint16[I+27]=E,this.uint16[I+28]=C,this.uint32[M+15]=O,this.float32[M+16]=P,this.float32[M+17]=k,this.float32[M+18]=A,t}}Ea.prototype.bytesPerElement=76,Ni(Ea,"StructArrayLayout3i2f6i15ui1ul3f76");class Ca extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.float32[1*t+0]=e,t}}Ca.prototype.bytesPerElement=4,Ni(Ca,"StructArrayLayout1f4");class Oa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,r,i)}emplace(t,e,n,r,i,o){const a=5*t;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=r,this.float32[a+3]=i,this.float32[a+4]=o,t}}Oa.prototype.bytesPerElement=20,Ni(Oa,"StructArrayLayout5f20");class Pa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=6*t;return this.uint32[3*t+0]=e,this.uint16[o+2]=n,this.uint16[o+3]=r,this.uint16[o+4]=i,t}}Pa.prototype.bytesPerElement=12,Ni(Pa,"StructArrayLayout1ul3ui12");class ka extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){const n=this.length;return this.resize(n+1),this.emplace(n,t,e)}emplace(t,e,n){const r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=n,t}}ka.prototype.bytesPerElement=4,Ni(ka,"StructArrayLayout2ui4");class Aa extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint16[1*t+0]=e,t}}Aa.prototype.bytesPerElement=2,Ni(Aa,"StructArrayLayout1ui2");class Ia extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){const n=this.length;return this.resize(n+1),this.emplace(n,t,e)}emplace(t,e,n){const r=2*t;return this.float32[r+0]=e,this.float32[r+1]=n,t}}Ia.prototype.bytesPerElement=8,Ni(Ia,"StructArrayLayout2f8");class Ma extends ra{get a_pos_30(){return this._structArray.int16[this._pos2+0]}get a_pos_31(){return this._structArray.int16[this._pos2+1]}get a_pos_32(){return this._structArray.int16[this._pos2+2]}get a_pos_normal_30(){return this._structArray.int16[this._pos2+3]}get a_pos_normal_31(){return this._structArray.int16[this._pos2+4]}get a_pos_normal_32(){return this._structArray.int16[this._pos2+5]}}Ma.prototype.size=12;class Da extends fa{get(t){return new Ma(this,t)}}Ni(Da,"FillExtrusionExtArray");class Ba extends ra{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}Ba.prototype.size=40;class za extends _a{get(t){return new Ba(this,t)}}Ni(za,"CollisionBoxArray");class La extends ra{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(t){this._structArray.uint8[this._pos1+49]=t}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(t){this._structArray.uint8[this._pos1+50]=t}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(t){this._structArray.uint32[this._pos4+13]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(t){this._structArray.uint8[this._pos1+58]=t}}La.prototype.size=60;class Ra extends Ta{get(t){return new La(this,t)}}Ni(Ra,"PlacedSymbolArray");class ja extends ra{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(t){this._structArray.uint32[this._pos4+15]=t}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}ja.prototype.size=76;class Fa extends Ea{get(t){return new ja(this,t)}}Ni(Fa,"SymbolInstanceArray");class Na extends Ca{getoffsetX(t){return this.float32[1*t+0]}}Ni(Na,"GlyphOffsetArray");class $a extends la{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}Ni($a,"SymbolLineVertexArray");class Va extends ra{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}Va.prototype.size=12;class Ua extends Pa{get(t){return new Va(this,t)}}Ni(Ua,"FeatureIndexArray");class Ga extends ra{get a_centroid_pos0(){return this._structArray.uint16[this._pos2+0]}get a_centroid_pos1(){return this._structArray.uint16[this._pos2+1]}}Ga.prototype.size=4;class Ha extends ka{get(t){return new Ga(this,t)}}Ni(Ha,"FillExtrusionCentroidArray");class qa extends ra{get a_pos_30(){return this._structArray.int16[this._pos2+0]}get a_pos_31(){return this._structArray.int16[this._pos2+1]}get a_pos_32(){return this._structArray.int16[this._pos2+2]}get a_pos_normal_30(){return this._structArray.int16[this._pos2+3]}get a_pos_normal_31(){return this._structArray.int16[this._pos2+4]}get a_pos_normal_32(){return this._structArray.int16[this._pos2+5]}}qa.prototype.size=12;class Wa extends fa{get(t){return new qa(this,t)}}Ni(Wa,"CircleGlobeExtArray");const Za=oa([{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"}]),Xa=oa([{name:"a_dash_to",components:4,type:"Uint16"},{name:"a_dash_from",components:4,type:"Uint16"}]);var Ya={exports:{}},Ka={exports:{}};Ka.exports=function(t,e){var n,r,i,o,a,s,l,c;for(r=t.length-(n=3&t.length),i=e,a=3432918353,s=461845907,c=0;c<r;)l=255&t.charCodeAt(c)|(255&t.charCodeAt(++c))<<8|(255&t.charCodeAt(++c))<<16|(255&t.charCodeAt(++c))<<24,++c,i=27492+(65535&(o=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0};var Ja={exports:{}};Ja.exports=function(t,e){for(var n,r=t.length,i=e^r,o=0;r>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};var Qa=Ka.exports,ts=Ja.exports;Ya.exports=Qa,Ya.exports.murmur3=Qa,Ya.exports.murmur2=ts;class es{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,e,n,r){this.ids.push(ns(t)),this.positions.push(e,n,r)}getPositions(t){const e=ns(t);let n=0,r=this.ids.length-1;for(;n<r;){const t=n+r>>1;this.ids[t]>=e?r=t:n=t+1}const i=[];for(;this.ids[n]===e;)i.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return i}static serialize(t,e){const n=new Float64Array(t.ids),r=new Uint32Array(t.positions);return rs(n,r,0,n.length-1),e&&e.push(n.buffer,r.buffer),{ids:n,positions:r}}static deserialize(t){const e=new es;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e}}function ns(t){const e=+t;return!isNaN(e)&&Number.MIN_SAFE_INTEGER<=e&&e<=Number.MAX_SAFE_INTEGER?e:Ya.exports(String(t))}function rs(t,e,n,r){for(;n<r;){const i=t[n+r>>1];let o=n-1,a=r+1;for(;;){do{o++}while(t[o]<i);do{a--}while(t[a]>i);if(o>=a)break;is(t,o,a),is(e,3*o,3*a),is(e,3*o+1,3*a+1),is(e,3*o+2,3*a+2)}a-n<r-a?(rs(t,e,n,a),n=a+1):(rs(t,e,a+1,r),r=a)}}function is(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}Ni(es,"FeaturePositionMap");class os{constructor(t){this.gl=t.gl,this.initialized=!1}fetchUniformLocation(t,e){return this.location||this.initialized||(this.location=this.gl.getUniformLocation(t,e),this.initialized=!0),!!this.location}}class as extends os{constructor(t){super(t),this.current=0}set(t,e,n){this.fetchUniformLocation(t,e)&&this.current!==n&&(this.current=n,this.gl.uniform1f(this.location,n))}}class ss extends os{constructor(t){super(t),this.current=[0,0,0,0]}set(t,e,n){this.fetchUniformLocation(t,e)&&(n[0]===this.current[0]&&n[1]===this.current[1]&&n[2]===this.current[2]&&n[3]===this.current[3]||(this.current=n,this.gl.uniform4f(this.location,n[0],n[1],n[2],n[3])))}}class ls extends os{constructor(t){super(t),this.current=Ce.transparent}set(t,e,n){this.fetchUniformLocation(t,e)&&(n.r===this.current.r&&n.g===this.current.g&&n.b===this.current.b&&n.a===this.current.a||(this.current=n,this.gl.uniform4f(this.location,n.r,n.g,n.b,n.a)))}}const cs=new Float32Array(16),us=new Float32Array(9),hs=new Float32Array(4);function ds(t){return[ea(255*t.r,255*t.g),ea(255*t.b,255*t.a)]}class ps{constructor(t,e,n){this.value=t,this.uniformNames=e.map(t=>`u_${t}`),this.type=n}setUniform(t,e,n,r,i){e.set(t,i,r.constantOr(this.value))}getBinding(t,e){return"color"===this.type?new ls(t):new as(t)}}class fs{constructor(t,e){this.uniformNames=e.map(t=>`u_${t}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio||1,this.pixelRatioTo=t.pixelRatio||1,this.patternFrom=e.tl.concat(e.br),this.patternTo=t.tl.concat(t.br)}setUniform(t,e,n,r,i){const o="u_pattern_to"===i||"u_dash_to"===i?this.patternTo:"u_pattern_from"===i||"u_dash_from"===i?this.patternFrom:"u_pixel_ratio_to"===i?this.pixelRatioTo:"u_pixel_ratio_from"===i?this.pixelRatioFrom:null;o&&e.set(t,i,o)}getBinding(t,e){return"u_pattern_from"===e||"u_pattern_to"===e||"u_dash_from"===e||"u_dash_to"===e?new ss(t):new as(t)}}class ms{constructor(t,e,n,r){this.expression=t,this.type=n,this.maxValue=0,this.paintVertexAttributes=e.map(t=>({name:`a_${t}`,type:"Float32",components:"color"===n?2:1,offset:0})),this.paintVertexArray=new r}populatePaintArray(t,e,n,r,i,o){const a=this.paintVertexArray.length,s=this.expression.evaluate(new No(0),e,{},i,r,o);this.paintVertexArray.resize(t),this._setPaintValue(a,t,s)}updatePaintArray(t,e,n,r,i){const o=this.expression.evaluate({zoom:0},n,r,void 0,i);this._setPaintValue(t,e,o)}_setPaintValue(t,e,n){if("color"===this.type){const r=ds(n);for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,r[0],r[1])}else{for(let r=t;r<e;r++)this.paintVertexArray.emplace(r,n);this.maxValue=Math.max(this.maxValue,Math.abs(n))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class gs{constructor(t,e,n,r,i,o){this.expression=t,this.uniformNames=e.map(t=>`u_${t}_t`),this.type=n,this.useIntegerZoom=r,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map(t=>({name:`a_${t}`,type:"Float32",components:"color"===n?4:2,offset:0})),this.paintVertexArray=new o}populatePaintArray(t,e,n,r,i,o){const a=this.expression.evaluate(new No(this.zoom),e,{},i,r,o),s=this.expression.evaluate(new No(this.zoom+1),e,{},i,r,o),l=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(l,t,a,s)}updatePaintArray(t,e,n,r,i){const o=this.expression.evaluate({zoom:this.zoom},n,r,void 0,i),a=this.expression.evaluate({zoom:this.zoom+1},n,r,void 0,i);this._setPaintValue(t,e,o,a)}_setPaintValue(t,e,n,r){if("color"===this.type){const i=ds(n),o=ds(r);for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,i[0],i[1],o[0],o[1])}else{for(let i=t;i<e;i++)this.paintVertexArray.emplace(i,n,r);this.maxValue=Math.max(this.maxValue,Math.abs(n),Math.abs(r))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,e,n,r,i){const o=this.useIntegerZoom?Math.floor(n.zoom):n.zoom,a=T(this.expression.interpolationFactor(o,this.zoom,this.zoom+1),0,1);e.set(t,i,a)}getBinding(t,e){return new as(t)}}class ys{constructor(t,e,n,r,i,o,a){this.expression=t,this.type=n,this.useIntegerZoom=r,this.zoom=i,this.layerId=a,this.paintVertexAttributes=("array"===n?Xa:Za).members;for(let s=0;s<e.length;++s);this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o}populatePaintArray(t,e,n){const r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(r,t,e.patterns&&e.patterns[this.layerId],n)}updatePaintArray(t,e,n,r,i,o){this._setPaintValues(t,e,n.patterns&&n.patterns[this.layerId],o)}_setPaintValues(t,e,n,r){if(!r||!n)return;const{min:i,mid:o,max:a}=n,s=r[i],l=r[o],c=r[a];if(s&&l&&c)for(let u=t;u<e;u++)this._setPaintValue(this.zoomInPaintVertexArray,u,l,s),this._setPaintValue(this.zoomOutPaintVertexArray,u,l,c)}_setPaintValue(t,e,n,r){t.emplace(e,n.tl[0],n.tl[1],n.br[0],n.br[1],r.tl[0],r.tl[1],r.br[0],r.br[1],n.pixelRatio,r.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class _s{constructor(t,e,n=(()=>!0)){this.binders={},this._buffers=[];const r=[];for(const i in t.paint._values){if(!n(i))continue;const o=t.paint.get(i);if(!(o instanceof Wo&&Ar(o.property.specification)))continue;const a=xs(i,t.type),s=o.value,l=o.property.specification.type,c=o.property.useIntegerZoom,u=o.property.specification["property-type"],h="cross-faded"===u||"cross-faded-data-driven"===u,d="line-dasharray"===String(i)&&"constant"!==t.layout.get("line-cap").value.kind;if("constant"!==s.kind||d)if("source"===s.kind||d||h){const n=Ts(i,l,"source");this.binders[i]=h?new ys(s,a,l,c,e,n,t.id):new ms(s,a,l,n),r.push(`/a_${i}`)}else{const t=Ts(i,l,"composite");this.binders[i]=new gs(s,a,l,c,e,t),r.push(`/z_${i}`)}else this.binders[i]=h?new fs(s.value,a):new ps(s.value,a,l),r.push(`/u_${i}`)}this.cacheKey=r.sort().join("")}getMaxValue(t){const e=this.binders[t];return e instanceof ms||e instanceof gs?e.maxValue:0}populatePaintArrays(t,e,n,r,i,o){for(const a in this.binders){const s=this.binders[a];(s instanceof ms||s instanceof gs||s instanceof ys)&&s.populatePaintArray(t,e,n,r,i,o)}}setConstantPatternPositions(t,e){for(const n in this.binders){const r=this.binders[n];r instanceof fs&&r.setConstantPatternPositions(t,e)}}updatePaintArrays(t,e,n,r,i,o){let a=!1;for(const s in t){const l=e.getPositions(s);for(const e of l){const l=n.feature(e.index);for(const n in this.binders){const c=this.binders[n];if((c instanceof ms||c instanceof gs||c instanceof ys)&&!0===c.expression.isStateDependent){const u=r.paint.get(n);c.expression=u.value,c.updatePaintArray(e.start,e.end,l,t[s],i,o),a=!0}}}}return a}defines(){const t=[];for(const e in this.binders){const n=this.binders[e];(n instanceof ps||n instanceof fs)&&t.push(...n.uniformNames.map(t=>`#define HAS_UNIFORM_${t}`))}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const n=this.binders[e];if(n instanceof ms||n instanceof gs||n instanceof ys)for(let e=0;e<n.paintVertexAttributes.length;e++)t.push(n.paintVertexAttributes[e].name)}return t}getBinderUniforms(){const t=[];for(const e in this.binders){const n=this.binders[e];if(n instanceof ps||n instanceof fs||n instanceof gs)for(const e of n.uniformNames)t.push(e)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t){const e=[];for(const n in this.binders){const r=this.binders[n];if(r instanceof ps||r instanceof fs||r instanceof gs)for(const i of r.uniformNames)e.push({name:i,property:n,binding:r.getBinding(t,i)})}return e}setUniforms(t,e,n,r,i){for(const{name:o,property:a,binding:s}of n)this.binders[a].setUniform(t,s,i,r.get(a),o)}updatePaintBuffers(t){this._buffers=[];for(const e in this.binders){const n=this.binders[e];if(t&&n instanceof ys){const e=2===t.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;e&&this._buffers.push(e)}else(n instanceof ms||n instanceof gs)&&n.paintVertexBuffer&&this._buffers.push(n.paintVertexBuffer)}}upload(t){for(const e in this.binders){const n=this.binders[e];(n instanceof ms||n instanceof gs||n instanceof ys)&&n.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const e=this.binders[t];(e instanceof ms||e instanceof gs||e instanceof ys)&&e.destroy()}}}class vs{constructor(t,e,n=(()=>!0)){this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=new _s(r,e,n);this.needsUpload=!1,this._featureMap=new es,this._bufferOffset=0}populatePaintArrays(t,e,n,r,i,o,a){for(const s in this.programConfigurations)this.programConfigurations[s].populatePaintArrays(t,e,r,i,o,a);void 0!==e.id&&this._featureMap.add(e.id,n,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,n,r,i){for(const o of n)this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,this._featureMap,e,o,r,i)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}const bs={"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":["ga
45pwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"line-dasharray":["dash_to","dash_from"]};function xs(t,e){return bs[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}const ws={"line-pattern":{source:da,composite:da},"fill-pattern":{source:da,composite:da},"fill-extrusion-pattern":{source:da,composite:da},"line-dasharray":{source:pa,composite:pa}},Ss={color:{source:Ia,composite:ha},number:{source:Ca,composite:Ia}};function Ts(t,e,n){const r=ws[t];return r&&r[n]||Ss[e][n]}Ni(ps,"ConstantBinder"),Ni(fs,"CrossFadedConstantBinder"),Ni(ms,"SourceExpressionBinder"),Ni(ys,"CrossFadedCompositeBinder"),Ni(gs,"CompositeExpressionBinder"),Ni(_s,"ProgramConfiguration",{omit:["_buffers"]}),Ni(vs,"ProgramConfigurationSet");const Es="-transition";class Cs extends Zt{constructor(t,e){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&"sky"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),e.layout&&(this._unevaluatedLayout=new qo(e.layout)),e.paint)){this._transitionablePaint=new Uo(e.paint);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Zo(e.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,e,n={}){null!=e&&this._validate(Bi,`layers.${this.id}.layout.${t}`,t,e,n)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)}getPaintProperty(t){return L(t,Es)?this._transitionablePaint.getTransition(t.slice(0,-Es.length)):this._transitionablePaint.getValue(t)}setPaintProperty(t,e,n={}){if(null!=e&&this._validate(Di,`layers.${this.id}.paint.${t}`,t,e,n))return!1;if(L(t,Es))return this._transitionablePaint.setTransition(t.slice(0,-Es.length),e||void 0),!1;{const n=this._transitionablePaint._values[t],r="cross-faded-data-driven"===n.property.specification["property-type"],i=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);const a=this._transitionablePaint._values[t].value;return a.isDataDriven()||i||r||this._handleOverridablePaintPropertyUpdate(t,o,a)}}_handleSpecialPaintPropertyUpdate(t){}getProgramIds(){return null}getProgramConfiguration(t){return null}_handleOverridablePaintPropertyUpdate(t,e,n){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}
vendor: 28,775 bytes, line 45
45serialize(){const 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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),j(t,(t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length))}_validate(t,e,n,r,i={}){return(!i||!1!==i.validate)&&Li(this,t.call(Mi,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:Xt,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof Wo&&Ar(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=oi(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const Os=oa([{name:"a_pos",components:2,type:"Int16"}],4),Ps=oa([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class ks{constructor(t=[]){this.segments=t}prepareSegment(t,e,n,r){let i=this.segments[this.segments.length-1];return t>ks.MAX_VERTEX_ARRAY_LENGTH&&$(`Max vertices per segment is ${ks.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!i||i.vertexLength+t>ks.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy()}static simpleSegment(t,e,n,r){return new ks([{vertexOffset:t,primitiveOffset:e,vertexLength:n,primitiveLength:r,vaos:{},sortKey:0}])}}ks.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ni(ks,"SegmentVector");var As=8192;class Is{constructor(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]))}setNorthEast(t){return this._ne=t instanceof Ds?new Ds(t.lng,t.lat):Ds.convert(t),this}setSouthWest(t){return this._sw=t instanceof Ds?new Ds(t.lng,t.lat):Ds.convert(t),this}extend(t){const e=this._sw,n=this._ne;let r,i;if(t instanceof Ds)r=t,i=t;else{if(!(t instanceof Is))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Is.convert(t)):this.extend(Ds.convert(t)):"object"==typeof t&&null!==t&&t.hasOwnProperty("lat")&&t.hasOwnProperty("lon")?this.extend(Ds.convert(t)):this;if(r=t._sw,i=t._ne,!r||!i)return this}return e||n?(e.lng=Math.min(r.lng,e.lng),e.lat=Math.min(r.lat,e.lat),n.lng=Math.max(i.lng,n.lng),n.lat=Math.max(i.lat,n.lat)):(this._sw=new Ds(r.lng,r.lat),this._ne=new Ds(i.lng,i.lat)),this}getCenter(){return new Ds((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Ds(this.getWest(),this.getNorth())}getSouthEast(){return new Ds(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:e,lat:n}=Ds.convert(t);let r=this._sw.lng<=e&&e<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=e&&e>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&r}static convert(t){return!t||t instanceof Is?t:new Is(t)}}const Ms=6371008.8;class Ds{constructor(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")}wrap(){return new Ds(C(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const e=Math.PI/180,n=this.lat*e,r=t.lat*e,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return Ms*Math.acos(Math.min(i,1))}toBounds(t=0){const e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Is(new Ds(this.lng-n,this.lat-e),new Ds(this.lng+n,this.lat+e))}static convert(t){if(t instanceof Ds)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Ds(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Ds(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const Bs=2*Math.PI*Ms;function zs(t){return Bs*Math.cos(t*Math.PI/180)}function Ls(t){return(180+t)/360}function Rs(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function js(t,e){return t/zs(e)}function Fs(t){return 360*t-180}function Ns(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}function $s(t,e){return t*zs(Ns(e))}const Vs=85.051129;function Us(t){return 1/Math.cos(t*Math.PI/180)}class Gs{constructor(t,e,n=0){this.x=+t,this.y=+e,this.z=+n}static fromLngLat(t,e=0){const n=Ds.convert(t);return new Gs(Ls(n.lng),Rs(n.lat),js(e,n.lat))}toLngLat(){return new Ds(Fs(this.x),Ns(this.y))}toAltitude(){return $s(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Bs*Us(Ns(this.y))}}function Hs(t,e,n,r,i,o,a,s,l){const c=(e+r)/2,u=(n+i)/2,h=new f(c,u);s(h),function(t,e,n,r,i,o){const a=n-i,s=r-o;return Math.abs((r-e)*a-(n-t)*s)/Math.hypot(a,s)}(h.x,h.y,o.x,o.y,a.x,a.y)>=l?(Hs(t,e,n,c,u,o,h,s,l),Hs(t,c,u,r,i,h,a,s,l)):t.push(a)}function qs(t,e,n){let r=t[0],i=r.x,o=r.y;e(r);const a=[r];for(let s=1;s<t.length;s++){const l=t[s],{x:c,y:u}=l;e(l),Hs(a,i,o,c,u,r,l,e,n),i=c,o=u,r=l}return a}function Ws(t,e,n,r){if(r(e,n)){const i=e.add(n)._mult(.5);Ws(t,e,i,r),Ws(t,i,n,r)}else t.push(n)}function Zs(t,e){let n=t[0];const r=[n];for(let i=1;i<t.length;i++){const o=t[i];Ws(r,n,o,e),n=o}return r}const Xs=Math.pow(2,14)-1,Ys=-Xs-1;function Ks(t,e){const n=Math.round(t.x*e),r=Math.round(t.y*e);return t.x=T(n,Ys,Xs),t.y=T(r,Ys,Xs),(n<t.x||n>t.x+1||r<t.y||r>t.y+1)&&$("Geometry exceeds allowed extent, reduce your vector tile buffer size"),t}function Js(t,e,n){const r=t.loadGeometry(),i=t.extent,o=As/i;if(e&&n&&n.projection.isReprojectedInTileSpace){const o=1<<e.z,{scale:a,x:s,y:l,projection:c}=n,u=t=>{const n=Fs((e.x+t.x/i)/o),r=Ns((e.y+t.y/i)/o),u=c.project(n,r);t.x=(u.x*a-s)*i,t.y=(u.y*a-l)*i};for(let e=0;e<r.length;e++)if(1!==t.type)r[e]=qs(r[e],u,1);else{const t=[];for(const n of r[e])n.x<0||n.x>=i||n.y<0||n.y>=i||(u(n),t.push(n));r[e]=t}}for(const a of r)for(const t of a)Ks(t,o);return r}function Qs(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Js(t):[]}}function tl(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}function el(t,e,n){const r=16384;t.emplaceBack(e.x,e.y,e.z,n[0]*r,n[1]*r,n[2]*r)}class nl{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.hasPattern=!1,this.projection=t.projection,this.layoutVertexArray=new sa,this.indexArray=new Sa,this.segments=new ks,this.programConfigurations=new vs(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(t,e,n,r){const i=this.layers[0],o=[];let a=null;"circle"===i.type&&(a=i.layout.get("circle-sort-key"));for(const{feature:l,id:c,index:u,sourceLayerIndex:h}of t){const t=this.layers[0]._featureFilter.needGeometry,e=Qs(l,t);if(!this.layers[0]._featureFilter.filter(new No(this.zoom),e,n))continue;const i=a?a.evaluate(e,{},n):void 0,s={id:c,properties:l.properties,type:l.type,sourceLayerIndex:h,index:u,geometry:t?e.geometry:Js(l,n,r),patterns:{},sortKey:i};o.push(s)}a&&o.sort((t,e)=>t.sortKey-e.sortKey);let s=null;"globe"===r.projection.name&&(this.globeExtVertexArray=new Wa,s=r.projection);for(const l of o){const{geometry:r,index:i,sourceLayerIndex:o}=l,a=t[i].feature;this.addFeature(l,r,i,e.availableImages,n,s),e.featureIndex.insert(a,r,i,o,this.index)}}update(t,e,n,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Os.members),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,Ps.members))),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(t,e,n,r,i,o){for(const a of e)for(const e of a){const n=e.x,r=e.y;if(n<0||n>=As||r<0||r>=As)continue;if(o){const t=o.projectTilePoint(n,r,i),e=o.upVector(i,n,r),a=this.globeExtVertexArray;el(a,t,e),el(a,t,e),el(a,t,e),el(a,t,e)}const a=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),s=a.vertexLength;tl(this.layoutVertexArray,n,r,-1,-1),tl(this.layoutVertexArray,n,r,1,-1),tl(this.layoutVertexArray,n,r,1,1),tl(this.layoutVertexArray,n,r,-1,1),this.indexArray.emplaceBack(s,s+1,s+2),this.indexArray.emplaceBack(s,s+2,s+3),a.vertexLength+=4,a.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{},r,i)}}function rl(t,e){for(let n=0;n<t.length;n++)if(dl(e,t[n]))return!0;for(let n=0;n<e.length;n++)if(dl(t,e[n]))return!0;return!!sl(t,e)}function il(t,e,n){return!!dl(t,e)||!!cl(e,t,n)}function ol(t,e){if(1===t.length)return hl(e,t[0]);for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.length;e++)if(dl(t,r[e]))return!0}for(let n=0;n<t.length;n++)if(hl(e,t[n]))return!0;for(let n=0;n<e.length;n++)if(sl(t,e[n]))return!0;return!1}function al(t,e,n){if(t.length>1){if(sl(t,e))return!0;for(let r=0;r<e.length;r++)if(cl(e[r],t,n))return!0}for(let r=0;r<t.length;r++)if(cl(t[r],e,n))return!0;return!1}function sl(t,e){if(0===t.length||0===e.length)return!1;for(let n=0;n<t.length-1;n++){const r=t[n],i=t[n+1];for(let t=0;t<e.length-1;t++)if(ll(r,i,e[t],e[t+1]))return!0}return!1}function ll(t,e,n,r){return V(t,n,r)!==V(e,n,r)&&V(t,e,n)!==V(t,e,r)}function cl(t,e,n){const r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(let i=1;i<e.length;i++)if(ul(t,e[i-1],e[i])<r)return!0;return!1}function ul(t,e,n){const r=e.distSqr(n);if(0===r)return t.distSqr(e);const i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return t.distSqr(i<0?e:i>1?n:n.sub(e)._mult(i)._add(e))}function hl(t,e){let n,r,i,o=!1;for(let a=0;a<t.length;a++){n=t[a];for(let t=0,a=n.length-1;t<n.length;a=t++)r=n[t],i=n[a],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 dl(t,e){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){const 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 pl(t,e,n,r,i){for(const a of t)if(e<=a.x&&n<=a.y&&r>=a.x&&i>=a.y)return!0;const o=[new f(e,n),new f(e,i),new f(r,i),new f(r,n)];if(t.length>2)for(const a of o)if(dl(t,a))return!0;for(let a=0;a<t.length-1;a++)if(fl(t[a],t[a+1],o))return!0;return!1}function fl(t,e,n){const r=n[0],i=n[2];if(t.x<r.x&&e.x<r.x||t.x>i.x&&e.x>i.x||t.y<r.y&&e.y<r.y||t.y>i.y&&e.y>i.y)return!1;const o=V(t,e,n[0]);return o!==V(t,e,n[1])||o!==V(t,e,n[2])||o!==V(t,e,n[3])}function ml(t,e,n){const r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).getMaxValue(t)}function gl(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function yl(t,e,n,r,i){if(!e[0]&&!e[1])return t;const o=f.convert(e)._mult(i);"viewport"===n&&o._rotate(-r);const a=[];for(let s=0;s<t.length;s++)a.push(t[s].sub(o));return a}function _l(t,e,n,r){const i=f.convert(t)._mult(r);return"viewport"===e&&i._rotate(-n),i}Ni(nl,"CircleBucket",{omit:["layers"]});const vl=new ta({"circle-sort-key":new Yo(Xt.layout_circle["circle-sort-key"])});var bl={paint:new ta({"circle-radius":new Yo(Xt.paint_circle["circle-radius"]),"circle-color":new Yo(Xt.paint_circle["circle-color"]),"circle-blur":new Yo(Xt.paint_circle["circle-blur"]),"circle-opacity":new Yo(Xt.paint_circle["circle-opacity"]),"circle-translate":new Xo(Xt.paint_circle["circle-translate"]),"circle-translate-anchor":new Xo(Xt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Xo(Xt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Xo(Xt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Yo(Xt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Yo(Xt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Yo(Xt.paint_circle["circle-stroke-opacity"])}),layout:vl},xl=1e-6,wl="undefined"!=typeof Float32Array?Float32Array:Array;function Sl(){var t=new wl(9);return wl!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Tl(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1],f=n[2],m=n[3],g=n[4],y=n[5],_=n[6],v=n[7],b=n[8];return t[0]=d*r+p*a+f*c,t[1]=d*i+p*s+f*u,t[2]=d*o+p*l+f*h,t[3]=m*r+g*a+y*c,t[4]=m*i+g*s+y*u,t[5]=m*o+g*l+y*h,t[6]=_*r+v*a+b*c,t[7]=_*i+v*s+b*u,t[8]=_*o+v*l+b*h,t}function El(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}function Cl(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],f=e[12],m=e[13],g=e[14],y=e[15],_=n*s-r*a,v=n*l-i*a,b=n*c-o*a,x=r*l-i*s,w=r*c-o*s,S=i*c-o*l,T=u*m-h*f,E=u*g-d*f,C=u*y-p*f,O=h*g-d*m,P=h*y-p*m,k=d*y-p*g,A=_*k-v*P+b*O+x*C-w*E+S*T;return A?(t[0]=(s*k-l*P+c*O)*(A=1/A),t[1]=(i*P-r*k-o*O)*A,t[2]=(m*S-g*w+y*x)*A,t[3]=(d*w-h*S-p*x)*A,t[4]=(l*C-a*k-c*E)*A,t[5]=(n*k-i*C+o*E)*A,t[6]=(g*b-f*S-y*v)*A,t[7]=(u*S-d*b+p*v)*A,t[8]=(a*P-s*C+c*T)*A,t[9]=(r*C-n*P-o*T)*A,t[10]=(f*w-m*b+y*_)*A,t[11]=(h*b-u*w-p*_)*A,t[12]=(s*E-a*O-l*T)*A,t[13]=(n*O-r*E+i*T)*A,t[14]=(m*v-f*x-g*_)*A,t[15]=(u*x-h*v+d*_)*A,t):null}function Ol(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],p=e[10],f=e[11],m=e[12],g=e[13],y=e[14],_=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*h+w*m,t[1]=v*i+b*l+x*d+w*g,t[2]=v*o+b*c+x*p+w*y,t[3]=v*a+b*u+x*f+w*_,t[4]=(v=n[4])*r+(b=n[5])*s+(x=n[6])*h+(w=n[7])*m,t[5]=v*i+b*l+x*d+w*g,t[6]=v*o+b*c+x*p+w*y,t[7]=v*a+b*u+x*f+w*_,t[8]=(v=n[8])*r+(b=n[9])*s+(x=n[10])*h+(w=n[11])*m,t[9]=v*i+b*l+x*d+w*g,t[10]=v*o+b*c+x*p+w*y,t[11]=v*a+b*u+x*f+w*_,t[12]=(v=n[12])*r+(b=n[13])*s+(x=n[14])*h+(w=n[15])*m,t[13]=v*i+b*l+x*d+w*g,t[14]=v*o+b*c+x*p+w*y,t[15]=v*a+b*u+x*f+w*_,t}function Pl(t,e,n){var r,i,o,a,s,l,c,u,h,d,p,f,m=n[0],g=n[1],y=n[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],p=e[10],f=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=d,t[10]=p,t[11]=f,t[12]=r*m+s*g+h*y+e[12],t[13]=i*m+l*g+d*y+e[13],t[14]=o*m+c*g+p*y+e[14],t[15]=a*m+u*g+f*y+e[15]),t}function kl(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}function Al(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=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+c*r,t[5]=a*i+u*r,t[6]=s*i+h*r,t[7]=l*i+d*r,t[8]=c*i-o*r,t[9]=u*i-a*r,t[10]=h*i-s*r,t[11]=d*i-l*r,t}function Il(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-u*r,t[2]=s*i-h*r,t[3]=l*i-d*r,t[8]=o*r+c*i,t[9]=a*r+u*i,t[10]=s*r+h*i,t[11]=l*r+d*i,t}function Ml(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Dl(t,e,n){var r,i,o,a=n[0],s=n[1],l=n[2],c=Math.hypot(a,s,l);return c<xl?null:(a*=c=1/c,s*=c,l*=c,r=Math.sin(e),i=Math.cos(e),t[0]=a*a*(o=1-i)+i,t[1]=s*a*o+l*r,t[2]=l*a*o-s*r,t[3]=0,t[4]=a*s*o-l*r,t[5]=s*s*o+i,t[6]=l*s*o+a*r,t[7]=0,t[8]=a*l*o+s*r,t[9]=s*l*o-a*r,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Bl=Ol;function zl(){var t=new wl(3);return wl!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ll(t){var e=new wl(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Rl(t){return Math.hypot(t[0],t[1],t[2])}function jl(t,e,n){var r=new wl(3);return r[0]=t,r[1]=e,r[2]=n,r}function Fl(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Nl(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function $l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Vl(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function Ul(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function Gl(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Hl(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function ql(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Wl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Zl(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=i*l-o*s,t[1]=o*a-r*l,t[2]=r*s-i*a,t}function Xl(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/(a=a||1),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}function Yl(t,e,n){var r=n[0],i=n[1],o=n[2],a=e[0],s=e[1],l=e[2],c=i*l-o*s,u=o*a-r*l,h=r*s-i*a,d=i*h-o*u,p=o*c-r*h,f=r*u-i*c,m=2*n[3];return u*=m,h*=m,p*=2,f*=2,t[0]=a+(c*=m)+(d*=2),t[1]=s+u+p,t[2]=l+h+f,t}var Kl,Jl=Nl,Ql=$l,tc=Rl;function ec(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function nc(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function rc(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}function ic(){var t=new wl(4);return wl!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function oc(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function ac(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=r*l+a*s,t[1]=i*l+o*s,t[2]=o*l-i*s,t[3]=a*l-r*s,t}function sc(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=r*l-o*s,t[1]=i*l+a*s,t[2]=o*l+r*s,t[3]=a*l-i*s,t}zl(),Kl=new wl(4),wl!=Float32Array&&(Kl[0]=0,Kl[1]=0,Kl[2]=0,Kl[3]=0);var lc=nc;zl(),jl(1,0,0),jl(0,1,0),ic(),ic(),Sl();class cc{constructor(t,e){this.pos=t,this.dir=e}intersectsPlane(t,e,n){const r=Wl(e,this.dir);if(Math.abs(r)<1e-6)return!1;const i=((t[0]-this.pos[0])*e[0]+(t[1]-this.pos[1])*e[1]+(t[2]-this.pos[2])*e[2])/r;return n[0]=this.pos[0]+this.dir[0]*i,n[1]=this.pos[1]+this.dir[1]*i,n[2]=this.pos[2]+this.dir[2]*i,!0}closestPointOnSphere(t,e,n){if(function(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=xl*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=xl*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=xl*Math.max(1,Math.abs(i),Math.abs(s))}(this.pos,t)||0===e)return n[0]=n[1]=n[2]=0,!1;const[r,i,o]=this.dir,a=this.pos[0]-t[0],s=this.pos[1]-t[1],l=this.pos[2]-t[2],c=r*r+i*i+o*o,u=2*(a*r+s*i+l*o),h=u*u-4*c*(a*a+s*s+l*l-e*e);if(h<0){const t=Math.max(-u/2,0),c=a+r*t,h=s+i*t,d=l+o*t,p=Math.hypot(c,h,d);return n[0]=c*e/p,n[1]=h*e/p,n[2]=d*e/p,!1}{const t=(-u-Math.sqrt(h))/(2*c);if(t<0){const t=Math.hypot(a,s,l);return n[0]=a*e/t,n[1]=s*e/t,n[2]=l*e/t,!1}return n[0]=a+r*t,n[1]=s+i*t,n[2]=l+o*t,!0}}}class uc{constructor(t,e,n,r,i){this.TL=t,this.TR=e,this.BR=n,this.BL=r,this.horizon=i}static fromInvProjectionMatrix(t,e,n){const r=[-1,1,1],i=[1,1,1],o=[1,-1,1],a=[-1,-1,1],s=Xl(r,r,t),l=Xl(i,i,t),c=Xl(o,o,t),u=Xl(a,a,t);return new uc(s,l,c,u,e/n)}}class hc{constructor(t,e){this.points=t,this.planes=e}static fromInvProjectionMatrix(t,e,n,r){const i=Math.pow(2,n),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(n=>{const o=rc([],n,t),a=1/o[3]/e*i;return function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}(o,o,[a,a,r?1/o[3]:a,a])}),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(t=>{const e=ql([],Zl([],Jl([],o[t[0]],o[t[1]]),Jl([],o[t[2]],o[t[1]]))),n=-Wl(e,o[t[1]]);return e.concat(n)});return new hc(o,a)}}class dc{static fromPoints(t){const e=[1/0,1/0,1/0],n=[-1/0,-1/0,-1/0];for(const r of t)Vl(e,e,r),Ul(n,n,r);return new dc(e,n)}static applyTransform(t,e){const n=t.getCorners();for(let r=0;r<n.length;++r)Xl(n[r],n[r],e);return dc.fromPoints(n)}constructor(t,e){this.min=t,this.max=e,this.center=Gl([],Fl([],this.min,this.max),.5)}quadrant(t){const e=[t%2==0,t<2],n=Ll(this.min),r=Ll(this.max);for(let i=0;i<e.length;i++)n[i]=e[i]?this.min[i]:this.center[i],r[i]=e[i]?this.center[i]:this.max[i];return r[2]=this.max[2],new dc(n,r)}distanceX(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]}distanceY(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]}distanceZ(t){return Math.max(Math.min(this.max[2],t[2]),this.min[2])-t[2]}getCorners(){const t=this.min,e=this.max;return[[t[0],t[1],t[2]],[e[0],t[1],t[2]],[e[0],e[1],t[2]],[t[0],e[1],t[2]],[t[0],t[1],e[2]],[e[0],t[1],e[2]],[e[0],e[1],e[2]],[t[0],e[1],e[2]]]}intersects(t){const e=this.getCorners();let n=!0;for(let r=0;r<t.planes.length;r++){const i=t.planes[r];let o=0;for(let t=0;t<e.length;t++)o+=Wl(i,e[t])+i[3]>=0;if(0===o)return 0;o!==e.length&&(n=!1)}if(n)return 2;for(let r=0;r<3;r++){let e=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let i=0;i<t.points.length;i++){const o=t.points[i][r]-this.min[r];e=Math.min(e,o),n=Math.max(n,o)}if(n<0||e>this.max[r]-this.min[r])return 0}return 1}}function pc(t,e,n,r,i,o,a,s,l){if(o&&t.queryGeometry.isAboveHorizon)return!1;o&&(l*=t.pixelToTileUnitsFactor);const c=t.tileID.canonical,u=n.projection.upVectorScale(c,n.center.lat,n.worldSize).metersToTile;for(const h of e)for(const e of h){const h=e.add(s),d=i&&n.elevation?n.elevation.exaggeration()*i.getElevationAt(h.x,h.y,!0):0,p=n.projection.projectTilePoint(h.x,h.y,c);if(d>0){const t=n.projection.upVector(c,h.x,h.y);p.x+=t[0]*u*d,p.y+=t[1]*u*d,p.z+=t[2]*u*d}const f=o?h:fc(p.x,p.y,p.z,r),m=o?t.tilespaceRays.map(t=>yc(t,d)):t.queryGeometry.screenGeometry,g=rc([],[p.x,p.y,p.z,1],r);if(!a&&o?l*=g[3]/n.cameraToCenterDistance:a&&!o&&(l*=n.cameraToCenterDistance/g[3]),o){const t=Ns((e.y/As+c.y)/(1<<c.z));l/=n.projection.pixelsPerMeter(t,1)/js(1,t)}if(il(m,f,l))return!0}return!1}function fc(t,e,n,r){const i=rc([],[t,e,n,1],r);return new f(i[0]/i[3],i[1]/i[3])}const mc=jl(0,0,0),gc=jl(0,0,1);function yc(t,e){const n=zl();return mc[2]=e,t.intersectsPlane(mc,gc,n),new f(n[0],n[1])}class _c extends nl{}function vc(t,{width:e,height:n},r,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==e*n*r)throw new RangeError("mismatched image size")}else i=new Uint8Array(e*n*r);return t.width=e,t.height=n,t.data=i,t}function bc(t,e,n){const{width:r,height:i}=e;r===t.width&&i===t.height||(xc(t,e,{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=e.data)}function xc(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");const a=t.data,s=e.data;for(let l=0;l<i.height;l++){const c=((n.y+l)*t.width+n.x)*o,u=((r.y+l)*e.width+r.x)*o;for(let t=0;t<i.width*o;t++)s[u+t]=a[c+t]}return e}Ni(_c,"HeatmapBucket",{omit:["layers"]});class wc{constructor(t,e){vc(this,t,1,e)}resize(t){bc(this,new wc(t),1)}clone(){return new wc({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,n,r,i){xc(t,e,n,r,i,1)}}class Sc{constructor(t,e){vc(this,t,4,e)}resize(t){bc(this,new Sc(t),4)}replace(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new Sc({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,n,r,i){xc(t,e,n,r,i,4)}}Ni(wc,"AlphaImage"),Ni(Sc,"RGBAImage");var Tc={paint:new ta({"heatmap-radius":new Yo(Xt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Yo(Xt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Xo(Xt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Qo(Xt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Xo(Xt.paint_heatmap["heatmap-opacity"])})};function Ec(t){const e={},n=t.resolution||256,r=t.clips?t.clips.length:1,i=t.image||new Sc({width:n,height:r}),o=(n,r,o)=>{e[t.evaluationKey]=o;const a=t.expression.evaluate(e);i.data[n+r+0]=Math.floor(255*a.r/a.a),i.data[n+r+1]=Math.floor(255*a.g/a.a),i.data[n+r+2]=Math.floor(255*a.b/a.a),i.data[n+r+3]=Math.floor(255*a.a)};if(t.clips)for(let a=0,s=0;a<r;++a,s+=4*n)for(let e=0,r=0;e<n;e++,r+=4){const i=e/(n-1),{start:l,end:c}=t.clips[a];o(s,r,l*(1-i)+c*i)}else for(let a=0,s=0;a<n;a++,s+=4)o(0,s,a/(n-1));return i}var Cc={paint:new ta({"hillshade-illumination-direction":new Xo(Xt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Xo(Xt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Xo(Xt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Xo(Xt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Xo(Xt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Xo(Xt.paint_hillshade["hillshade-accent-color"])})};const Oc=oa([{name:"a_pos",components:2,type:"Int16"}],4),{members:Pc}=Oc;var kc={exports:{}};function Ac(t,e,n){n=n||2;var r,i,o,a,s,l,c,u=e&&e.length,h=u?e[0]*n:t.length,d=Ic(t,0,h,n,!0),p=[];if(!d||d.next===d.prev)return p;if(u&&(d=function(t,e,n,r){var i,o,a,s=[];for(i=0,o=e.length;i<o;i++)(a=Ic(t,e[i]*r,i<o-1?e[i+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),s.push(Vc(a));for(s.sort(jc),i=0;i<s.length;i++)n=Fc(s[i],n);return n}(t,e,d,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)(s=t[f])<r&&(r=s),(l=t[f+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?32767/c:0}return Dc(d,p,n,r,i,c,0),p}function Ic(t,e,n,r,i){var o,a;if(i===eu(t,e,n,r)>0)for(o=e;o<n;o+=r)a=Jc(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=Jc(o,t[o],t[o+1],a);return a&&qc(a,a.next)&&(Qc(a),a=a.next),a}function Mc(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!qc(r,r.next)&&0!==Hc(r.prev,r,r.next))r=r.next;else{if(Qc(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Dc(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=$c(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,l,c=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<c&&(s++,r=r.nextZ);e++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(t,r,i,o);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?zc(t,r,i,o):Bc(t))e.push(s.i/n|0),e.push(t.i/n|0),e.push(l.i/n|0),Qc(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?Dc(t=Lc(Mc(t),e,n),e,n,r,i,o,2):2===a&&Rc(t,e,n,r,i,o):Dc(Mc(t),e,n,r,i,o,1);break}}}function Bc(t){var e=t.prev,n=t,r=t.next;if(Hc(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,l=n.y,c=r.y,u=i<o?i<a?i:a:o<a?o:a,h=s<l?s<c?s:c:l<c?l:c,d=i>
vendor: 1,568 bytes, line 45
45o?i>a?i:a:o>a?o:a,p=s>l?s>c?s:c:l>c?l:c,f=r.next;f!==e;){if(f.x>=u&&f.x<=d&&f.y>=h&&f.y<=p&&Uc(i,s,o,l,a,c,f.x,f.y)&&Hc(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function zc(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Hc(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,h=o.y,d=a.y,p=s<l?s<c?s:c:l<c?l:c,f=u<h?u<d?u:d:h<d?h:d,m=s>l?s>c?s:c:l>c?l:c,g=u>h?u>d?u:d:h>d?h:d,y=$c(p,f,e,n,r),_=$c(m,g,e,n,r),v=t.prevZ,b=t.nextZ;v&&v.z>=y&&b&&b.z<=_;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==a&&Uc(s,u,l,h,c,d,v.x,v.y)&&Hc(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==i&&b!==a&&Uc(s,u,l,h,c,d,b.x,b.y)&&Hc(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=y;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==a&&Uc(s,u,l,h,c,d,v.x,v.y)&&Hc(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=_;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==i&&b!==a&&Uc(s,u,l,h,c,d,b.x,b.y)&&Hc(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Lc(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!qc(i,o)&&Wc(i,r,r.next,o)&&Yc(i,o)&&Yc(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Qc(r),Qc(r.next),r=t=o),r=r.next}while(r!==t);return Mc(r)}function Rc(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Gc(a,s)){var l=Kc(a,s);return a=Mc(a,a.next),l=Mc(l,l.next),Dc(a,e,n,r,i,o,0),void Dc(l,e,n,r,i,o,0)}s=s.next}a=a.next}while(a!==t)}function jc(t,e){return t.x-e.x}function Fc(t,e){var n=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
vendor: 4,906 bytes, line 45
45);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==e);if(!n)return null;var l,c=n,u=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&Uc(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),Yc(r,t)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&Nc(n,r)))&&(n=r,d=l)),r=r.next}while(r!==c);return n}(t,e);if(!n)return e;var r=Kc(n,t);return Mc(r,r.next),Mc(n,n.next)}function Nc(t,e){return Hc(t.prev,t,e.prev)<0&&Hc(e.next,t,t.next)<0}function $c(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Vc(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function Uc(t,e,n,r,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function Gc(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&&Wc(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Yc(t,e)&&Yc(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)&&(Hc(t.prev,t,e.prev)||Hc(t,e.prev,e))||qc(t,e)&&Hc(t.prev,t,t.next)>0&&Hc(e.prev,e,e.next)>0)}function Hc(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function qc(t,e){return t.x===e.x&&t.y===e.y}function Wc(t,e,n,r){var i=Xc(Hc(t,e,n)),o=Xc(Hc(t,e,r)),a=Xc(Hc(n,r,t)),s=Xc(Hc(n,r,e));return i!==o&&a!==s||!(0!==i||!Zc(t,n,e))||!(0!==o||!Zc(t,r,e))||!(0!==a||!Zc(n,t,r))||!(0!==s||!Zc(n,e,r))}function Zc(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Xc(t){return t>0?1:t<0?-1:0}function Yc(t,e){return Hc(t.prev,t,t.next)<0?Hc(t,e,t.next)>=0&&Hc(t,t.prev,e)>=0:Hc(t,e,t.prev)<0||Hc(t,t.next,e)<0}function Kc(t,e){var n=new tu(t.i,t.x,t.y),r=new tu(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 Jc(t,e,n,r){var i=new tu(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 Qc(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 tu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function eu(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 nu(t,e,n,r,i){ru(t,e,n||0,r||t.length-1,i||ou)}function ru(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=e-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);ru(t,e,Math.max(n,Math.floor(e-a*l/o+c)),Math.min(r,Math.floor(e+(o-a)*l/o+c)),i)}var u=t[e],h=n,d=r;for(iu(t,n,e),i(t[r],u)>0&&iu(t,n,r);h<d;){for(iu(t,h,d),h++,d--;i(t[h],u)<0;)h++;for(;i(t[d],u)>0;)d--}0===i(t[n],u)?iu(t,n,d):iu(t,++d,r),d<=e&&(n=d+1),e<=d&&(r=d-1)}}function iu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function ou(t,e){return t<e?-1:t>e?1:0}function au(t,e){const n=t.length;if(n<=1)return[t];const r=[];let i,o;for(let a=0;a<n;a++){const e=U(t[a]);0!==e&&(t[a].area=Math.abs(e),void 0===o&&(o=e<0),o===e<0?(i&&r.push(i),i=[t[a]]):i.push(t[a]))}if(i&&r.push(i),e>1)for(let a=0;a<r.length;a++)r[a].length<=e||(nu(r[a],e,1,r[a].length-1,su),r[a]=r[a].slice(0,e));return r}function su(t,e){return e.area-t.area}function lu(t,e,n){const r=n.patternDependencies;let i=!1;for(const o of e){const e=o.paint.get(`${t}-pattern`);e.isConstant()||(i=!0);const n=e.constantOr(null);n&&(i=!0,r[n.to]=!0,r[n.from]=!0)}return i}function cu(t,e,n,r,i){const o=i.patternDependencies;for(const a of e){const e=a.paint.get(`${t}-pattern`).value;if("constant"!==e.kind){let t=e.evaluate({zoom:r-1},n,{},i.availableImages),s=e.evaluate({zoom:r},n,{},i.availableImages),l=e.evaluate({zoom:r+1},n,{},i.availableImages);t=t&&t.name?t.name:t,s=s&&s.name?s.name:s,l=l&&l.name?l.name:l,o[t]=!0,o[s]=!0,o[l]=!0,n.patterns[a.id]={min:t,mid:s,max:l}}}return n}kc.exports=Ac,kc.exports.default=Ac,Ac.deviation=function(t,e,n,r){var i=e&&e.length,o=Math.abs(eu(t,0,i?e[0]*n:t.length,n));if(i)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(eu(t,e[a]*n,a<s-1?e[a+1]*n:t.length,n));var l=0;for(a=0;a<r.length;a+=3){var c=r[a]*n,u=r[a+1]*n,h=r[a+2]*n;l+=Math.abs((t[c]-t[h])*(t[u+1]-t[c+1])-(t[c]-t[u])*(t[h+1]-t[c+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},Ac.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&&n.holes.push(r+=t[i-1].length)}return n};class uu{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>
vendor: 9,206 bytes, line 45
45t.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new sa,this.indexArray=new Sa,this.indexArray2=new ka,this.programConfigurations=new vs(t.layers,t.zoom),this.segments=new ks,this.segments2=new ks,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id),this.projection=t.projection}populate(t,e,n,r){this.hasPattern=lu("fill",this.layers,e);const i=this.layers[0].layout.get("fill-sort-key"),o=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:c}of t){const t=this.layers[0]._featureFilter.needGeometry,u=Qs(a,t);if(!this.layers[0]._featureFilter.filter(new No(this.zoom),u,n))continue;const h=i?i.evaluate(u,{},n,e.availableImages):void 0,d={id:s,properties:a.properties,type:a.type,sourceLayerIndex:c,index:l,geometry:t?u.geometry:Js(a,n,r),patterns:{},sortKey:h};o.push(d)}i&&o.sort((t,e)=>t.sortKey-e.sortKey);for(const a of o){const{geometry:r,index:i,sourceLayerIndex:o}=a;if(this.hasPattern){const t=cu("fill",this.layers,a,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(a,r,i,n,{},e.availableImages);e.featureIndex.insert(t[i].feature,r,i,o,this.index)}}update(t,e,n,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n,r)}addFeatures(t,e,n,r,i){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,e,n,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Pc),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,n,r,i,o=[]){for(const a of au(e,500)){let t=0;for(const s of a)t+=s.length;const e=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=e.vertexLength,r=[],i=[];for(const s of a){if(0===s.length)continue;s!==a[0]&&i.push(r.length/2);const t=this.segments2.prepareSegment(s.length,this.layoutVertexArray,this.indexArray2),e=t.vertexLength;this.layoutVertexArray.emplaceBack(s[0].x,s[0].y),this.indexArray2.emplaceBack(e+s.length-1,e),r.push(s[0].x),r.push(s[0].y);for(let n=1;n<s.length;n++)this.layoutVertexArray.emplaceBack(s[n].x,s[n].y),this.indexArray2.emplaceBack(e+n-1,e+n),r.push(s[n].x),r.push(s[n].y);t.vertexLength+=s.length,t.primitiveLength+=s.length}const o=kc.exports(r,i);for(let a=0;a<o.length;a+=3)this.indexArray.emplaceBack(n+o[a],n+o[a+1],n+o[a+2]);e.vertexLength+=t,e.primitiveLength+=o.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,o,r)}}Ni(uu,"FillBucket",{omit:["layers","patternFeatures"]});const hu=new ta({"fill-sort-key":new Yo(Xt.layout_fill["fill-sort-key"])});var du={paint:new ta({"fill-antialias":new Xo(Xt.paint_fill["fill-antialias"]),"fill-opacity":new Yo(Xt.paint_fill["fill-opacity"]),"fill-color":new Yo(Xt.paint_fill["fill-color"]),"fill-outline-color":new Yo(Xt.paint_fill["fill-outline-color"]),"fill-translate":new Xo(Xt.paint_fill["fill-translate"]),"fill-translate-anchor":new Xo(Xt.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ko(Xt.paint_fill["fill-pattern"])}),layout:hu};const pu=oa([{name:"a_pos_normal_ed",components:4,type:"Int16"}]),fu=oa([{name:"a_centroid_pos",components:2,type:"Uint16"}]),mu=oa([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]),{members:gu}=pu;var yu={},_u=f,vu=bu;function bu(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(xu,this,e)}function xu(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 wu(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)r+=((n=t[a]).x-(e=t[i]).x)*(e.y+n.y);return r}bu.types=["Unknown","Point","LineString","Polygon"],bu.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 l=t.readVarint();r=7&l,i=l>>3}if(i--,1===r||2===r)o+=t.readSVarint(),a+=t.readSVarint(),1===r&&(e&&s.push(e),e=[]),e.push(new _u(o,a));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&s.push(e),s},bu.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,l=1/0,c=-1/0;t.pos<e;){if(r<=0){var u=t.readVarint();n=7&u,r=u>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<l&&(l=o),o>c&&(c=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,c]},bu.prototype.toGeoJSON=function(t,e,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=bu.types[this.type];function u(t){for(var e=0;e<t.length;e++){var n=t[e];t[e]=[360*(n.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(n.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(r=0;r<l.length;r++)h[r]=l[r][0];u(l=h);break;case 2:for(r=0;r<l.length;r++)u(l[r]);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=wu(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),r=0;r<l.length;r++)for(i=0;i<l[r].length;i++)u(l[r][i])}1===l.length?l=l[0]:c="Multi"+c;var d={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var Su=vu,Tu=Eu;function Eu(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(Cu,this,e),this.length=this._features.length}function Cu(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))}Eu.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 Su(this._pbf,e,this.extent,this._keys,this._values)};var Ou=Tu;function Pu(t,e,n){if(3===t){var r=new Ou(n,n.readVarint()+n.pos);r.length&&(e[r.name]=r)}}var ku=yu.VectorTile=function(t,e){this.layers=t.readFields(Pu,{},e)},Au=yu.VectorTileFeature=vu;function Iu(t,e,n,r){const i=[],o=0===r?(t,e,n,r,i,o)=>{t.push(new f(o,n+(o-e)/(r-e)*(i-n)))}:(t,e,n,r,i,o)=>{t.push(new f(e+(o-n)/(i-n)*(r-e),o))};for(const a of t){const t=[];for(const i of a){if(i.length<=2)continue;const a=[];for(let t=0;t<i.length-1;t++){const s=i[t].x,l=i[t].y,c=i[t+1].x,u=i[t+1].y,h=0===r?s:l,d=0===r?c:u;h<e?d>e&&o(a,s,l,c,u,e):h>n?d<n&&o(a,s,l,c,u,n):a.push(i[t]),d<e&&h>=e&&o(a,s,l,c,u,e),d>n&&h<=n&&o(a,s,l,c,u,n)}let s=i[i.length-1];const l=0===r?s.x:s.y;l>=e&&l<=n&&a.push(s),a.length&&(s=a[a.length-1],a[0].x===s.x&&a[0].y===s.y||a.push(a[0]),t.push(a))}t.length&&i.push(t)}return i}yu.VectorTileLayer=Tu;const Mu=Au.types,Du=Math.pow(2,13);function Bu(t,e,n,r,i,o,a,s){t.emplaceBack((e<<1)+a,(n<<1)+o,(Math.floor(r*Du)<<1)+i,Math.round(s))}function zu(t,e,n){const r=16384;t.emplaceBack(e.x,e.y,e.z,n[0]*r,n[1]*r,n[2]*r)}class Lu{constructor(){this.acc=new f(0,0),this.polyCount=[]}startRing(t){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new f(t.x,t.y),this.max=new f(t.x,t.y))}append(t,e){this.currentPolyCount.edges++,this.acc._add(t);const n=this.min,r=this.max;t.x<n.x?n.x=t.x:t.x>r.x&&(r.x=t.x),t.y<n.y?n.y=t.y:t.y>r.y&&(r.y=t.y),((0===t.x||t.x===As)&&t.x===e.x)!=((0===t.y||t.y===As)&&t.y===e.y)&&this.processBorderOverlap(t,e),e.x<0!=t.x<0&&this.addBorderIntersection(0,On(e.y,t.y,(0-e.x)/(t.x-e.x))),e.x>As!=t.x>As&&this.addBorderIntersection(1,On(e.y,t.y,(As-e.x)/(t.x-e.x))),e.y<0!=t.y<0&&this.addBorderIntersection(2,On(e.x,t.x,(0-e.y)/(t.y-e.y))),e.y>As!=t.y>As&&this.addBorderIntersection(3,On(e.x,t.x,(As-e.y)/(t.y-e.y)))}addBorderIntersection(t,e){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const n=this.borders[t];e<n[0]&&(n[0]=e),e>n[1]&&(n[1]=e)}processBorderOverlap(t,e){if(t.x===e.x){if(t.y===e.y)return;const n=0===t.x?0:1;this.addBorderIntersection(n,e.y),this.addBorderIntersection(n,t.y)}else{const n=0===t.y?2:3;this.addBorderIntersection(n,e.x),this.addBorderIntersection(n,t.x)}}centroid(){const t=this.polyCount.reduce((t,e)=>t+e.edges,0);
45return 0!==t?this.acc.div(t)._round():new f(0,0)}span(){return new f(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce((t,e)=>t+ +(e[0]!==Number.MAX_VALUE),0)}}class Ru{constructor(t){this.zoom=t.zoom,this.canonical=t.canonical,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=t.projection,this.layoutVertexArray=new ca,this.centroidVertexArray=new Ha,this.indexArray=new Sa,this.programConfigurations=new vs(t.layers,t.zoom),this.segments=new ks,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id),this.enableTerrain=t.enableTerrain}populate(t,e,n,r){this.features=[],this.hasPattern=lu("fill-extrusion",this.layers,e),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=function(t){const e=Math.exp(Math.PI*(1-t.y/(1<<t.z)*2));return 80150034*e/(e*e+1)/As/(1<<t.z)}(n),this.edgeRadius=this.layers[0].layout.get("fill-extrusion-edge-radius")/this.tileToMeter;for(const{feature:i,id:o,index:a,sourceLayerIndex:s}of t){const t=this.layers[0]._featureFilter.needGeometry,l=Qs(i,t);if(!this.layers[0]._featureFilter.filter(new No(this.zoom),l,n))continue;const c={id:o,sourceLayerIndex:s,index:a,geometry:t?l.geometry:Js(i,n,r),properties:i.properties,type:i.type,patterns:{}},u=this.layoutVertexArray.length;this.hasPattern?this.features.push(cu("fill-extrusion",this.layers,c,this.zoom,e)):this.addFeature(c,c.geometry,a,n,{},e.availableImages,r),e.featureIndex.insert(i,c.geometry,a,s,this.index,u)}this.sortBorders()}addFeatures(t,e,n,r,i){for(const o of this.features){const{geometry:t}=o;this.addFeature(o,t,o.index,e,n,r,i)}this.sortBorders()}update(t,e,n,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,gu),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=t.createVertexBuffer(this.layoutVertexExtArray,mu.members,!0))),this.programConfigurations.upload(t),this.uploaded=!0}uploadCentroid(t){0!==this.centroidVertexArray.length&&(this.centroidVertexBuffer?this.needsCentroidUpdate&&this.centroidVertexBuffer.updateData(this.centroidVertexArray):this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,fu.members,!0),this.needsCentroidUpdate=!1)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.centroidVertexBuffer&&this.centroidVertexBuffer.destroy(),this.layoutVertexExtBuffer&&this.layoutVertexExtBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,n,r,i,o,a){const s=[new f(0,0),new f(As,As)],l=a.projection,c="globe"===l.name,u=this.enableTerrain&&!c?new Lu:null,h="Polygon"===Mu[t.type];c&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new Da);const d=au(e,500);for(let f=d.length-1;f>=0;f--){const t=d[f];(0===t.length||(p=t[0]).every(t=>t.x<=0)||p.every(t=>t.x>=As)||p.every(t=>t.y<=0)||p.every(t=>t.y>=As))&&d.splice(f,1)}var p;let m;if(c)m=Hu(d,s,r);else{m=[];for(const t of d)m.push({polygon:t,bounds:s})}const g=h?this.edgeRadius:0;for(const{polygon:f,bounds:y}of m){let t=0,e=0;for(const r of f)h&&!r[0].equals(r[r.length-1])&&r.push(r[0]),e+=h?r.length-1:r.length;const n=this.segments.prepareSegment((h?5:4)*e,this.layoutVertexArray,this.indexArray);if(h){const e=[],i=[];t=n.vertexLength;for(const t of f){let o,a;t.length&&t!==f[0]&&i.push(e.length/2),o=t[1].sub(t[0])._perp()._unit();for(let i=1;i<t.length;i++){const s=t[i],u=t[i===t.length-1?1:i+1];let{x:h,y:d}=s;if(g){a=u.sub(s)._perp()._unit();const t=o.add(a)._unit(),e=g*Math.min(4,1/(o.x*t.x+o.y*t.y));h+=e*t.x,d+=e*t.y,o=a}Bu(this.layoutVertexArray,h,d,0,0,1,1,0),n.vertexLength++,e.push(s.x,s.y),c&&zu(this.layoutVertexExtArray,l.projectTilePoint(h,d,r),l.upVector(r,h,d))}}const o=kc.exports(e,i);for(let r=0;r<o.length;r+=3)this.indexArray.emplaceBack(t+o[r],t+o[r+2],t+o[r+1]),n.primitiveLength++}for(const i of f){u&&i.length&&u.startRing(i[0]);let e,o,a,s=i.length>4&&Vu(i[i.length-2],i[0],i[1]),d=g?Fu(i[i.length-2],i[0],i[1],g):0;o=i[1].sub(i[0])._perp()._unit();let p=!0;for(let f=1,m=0;f<i.length;f++){let _=i[f-1],v=i[f];const b=i[f===i.length-1?1:f+1];if(u&&h&&u.currentPolyCount.top++,$u(v,_,y)){g&&(o=b.sub(v)._perp()._unit(),p=!p);continue}u&&u.append(v,_);const x=v.sub(_)._perp(),w=x.x/(Math.abs(x.x)+Math.abs(x.y)),S=x.y>0?1:0,T=_.dist(v);if(m+T>32768&&(m=0),g){a=b.sub(v)._perp()._unit();let t=Nu(_,v,b,ju(o,a),g);isNaN(t)&&(t=0);const e=v.sub(_)._unit();_=_.add(e.mult(d))._round(),v=v.add(e.mult(-t))._round(),d=t,o=a}const E=n.vertexLength,C=i.length>4&&Vu(_,v,b);let O=Uu(m,s,p);if(Bu(this.layoutVertexArray,_.x,_.y,w,S,0,0,O),Bu(this.layoutVertexArray,_.x,_.y,w,S,0,1,O),m+=T,O=Uu(m,C,!p),s=C,Bu(this.layoutVertexArray,v.x,v.y,w,S,0,0,O),Bu(this.layoutVertexArray,v.x,v.y,w,S,0,1,O),n.vertexLength+=4,this.indexArray.emplaceBack(E+0,E+1,E+2),this.indexArray.emplaceBack(E+1,E+3,E+2),n.primitiveLength+=2,g){const r=t+(1===f?i.length-2:f-2),o=1===f?t:r+1;if(this.indexArray.emplaceBack(E+1,r,E+3),this.indexArray.emplaceBack(r,o,E+3),n.primitiveLength+=2,void 0===e&&(e=E),!$u(b,i[f],y)){const t=f===i.length-1?e:n.vertexLength;this.indexArray.emplaceBack(E+2,E+3,t),this.indexArray.emplaceBack(E+3,t+1,t),this.indexArray.emplaceBack(E+3,o,t+1),n.primitiveLength+=3}p=!p}if(c){const t=this.layoutVertexExtArray,e=l.projectTilePoint(_.x,_.y,r),n=l.projectTilePoint(v.x,v.y,r),i=l.upVector(r,_.x,_.y),o=l.upVector(r,v.x,v.y);
vendor: 6,141 bytes, line 45
45zu(t,e,i),zu(t,e,i),zu(t,n,o),zu(t,n,o)}}h&&(t+=i.length-1)}}if(u&&u.polyCount.length>0){if(u.borders){u.vertexArrayOffset=this.centroidVertexArray.length;const t=u.borders,e=this.featuresOnBorder.push(u)-1;for(let n=0;n<4;n++)t[n][0]!==Number.MAX_VALUE&&this.borders[n].push(e)}this.encodeCentroid(u.borders?void 0:u.centroid(),u)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,o,r)}sortBorders(){for(let t=0;t<4;t++)this.borders[t].sort((e,n)=>this.featuresOnBorder[e].borders[t][0]-this.featuresOnBorder[n].borders[t][0])}encodeCentroid(t,e,n=!0){let r,i;if(t)if(0!==t.y){const n=e.span()._mult(this.tileToMeter);r=(Math.max(t.x,1)<<3)+Math.min(7,Math.round(n.x/10)),i=(Math.max(t.y,1)<<3)+Math.min(7,Math.round(n.y/10))}else r=Math.ceil(7*(t.x+450)),i=0;else r=0,i=+n;let o=n?this.centroidVertexArray.length:e.vertexArrayOffset;for(const a of e.polyCount){n&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*a.edges+a.top);for(let t=0;t<a.top;t++)this.centroidVertexArray.emplace(o++,r,i);for(let t=0;t<2*a.edges;t++)this.centroidVertexArray.emplace(o++,0,i),this.centroidVertexArray.emplace(o++,r,i)}}}function ju(t,e){const n=t.add(e)._unit();return t.x*n.x+t.y*n.y}function Fu(t,e,n,r){const i=e.sub(t)._perp()._unit(),o=n.sub(e)._perp()._unit();return Nu(t,e,n,ju(i,o),r)}function Nu(t,e,n,r,i){const o=Math.sqrt(1-r*r);return Math.min(t.dist(e)/3,e.dist(n)/3,i*o/r)}function $u(t,e,n){return t.x<n[0].x&&e.x<n[0].x||t.x>n[1].x&&e.x>n[1].x||t.y<n[0].y&&e.y<n[0].y||t.y>n[1].y&&e.y>n[1].y}function Vu(t,e,n){if(t.x<0||t.x>=As||e.x<0||e.x>=As||n.x<0||n.x>=As)return!1;const r=n.sub(e),i=r.perp(),o=t.sub(e);return(r.x*o.x+r.y*o.y)/Math.sqrt((r.x*r.x+r.y*r.y)*(o.x*o.x+o.y*o.y))>-.866&&i.x*o.x+i.y*o.y<0}function Uu(t,e,n){const r=e?2|t:-3&t;return n?1|r:-2&r}function Gu(){const t=Math.PI/32,e=Math.tan(t),n=Ms;return n*Math.sqrt(1+2*e*e)-n}function Hu(t,e,n){const r=1<<n.z,i=Fs(n.x/r),o=Fs((n.x+1)/r),a=Ns(n.y/r),s=Ns((n.y+1)/r);return function(t,e,n,r,i=0,o){const a=[];if(!t.length||!n||!r)return a;const s=(t,e)=>{for(const n of t)a.push({polygon:n,bounds:e})},l=Math.ceil(Math.log2(n)),c=Math.ceil(Math.log2(r)),u=l-c,h=[];for(let f=0;f<Math.abs(u);f++)h.push(u>0?0:1);for(let f=0;f<Math.min(l,c);f++)h.push(0),h.push(1);let d=t;if(d=Iu(d,e[0].y-i,e[1].y+i,1),d=Iu(d,e[0].x-i,e[1].x+i,0),!d.length)return a;const p=[];for(h.length?p.push({polygons:d,bounds:e,depth:0}):s(d,e);p.length;){const t=p.pop(),e=t.depth,n=h[e],r=t.bounds[0],a=t.bounds[1],l=0===n?r.x:r.y,c=0===n?a.x:a.y,u=o?o(n,l,c):.5*(l+c),d=Iu(t.polygons,l-i,u+i,n),m=Iu(t.polygons,u-i,c+i,n);if(d.length){const t=[r,new f(0===n?u:a.x,1===n?u:a.y)];h.length>e+1?p.push({polygons:d,bounds:t,depth:e+1}):s(d,t)}if(m.length){const t=[new f(0===n?u:r.x,1===n?u:r.y),a];h.length>e+1?p.push({polygons:m,bounds:t,depth:e+1}):s(m,t)}}return a}(t,e,Math.ceil((o-i)/11.25),Math.ceil((a-s)/11.25),1,(t,e,i)=>{if(0===t)return.5*(e+i);{const t=Ns((n.y+e/As)/r);return(Rs(.5*(Ns((n.y+i/As)/r)+t))*r-n.y)*As}})}Ni(Ru,"FillExtrusionBucket",{omit:["layers","features"]}),Ni(Lu,"PartMetadata");const qu=new ta({"fill-extrusion-edge-radius":new Xo(Xt["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var Wu={paint:new ta({"fill-extrusion-opacity":new Xo(Xt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Yo(Xt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Xo(Xt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Xo(Xt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ko(Xt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Yo(Xt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Yo(Xt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Xo(Xt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new Xo(Xt["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new Xo(Xt["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"])}),layout:qu};function Zu(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]}class Xu{constructor(t,e,n){this.z=t,this.x=e,this.y=n,this.key=Ju(0,t,t,e,n)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e){const n=function(t,e,n){var r=Zu(256*t,256*(e=Math.pow(2,n)-e-1),n),i=Zu(256*(t+1),256*(e+1),n);return r[0]+","+r[1]+","+i[0]+","+i[1]}(this.x,this.y,this.z),r=function(t,e,n){let r,i="";for(let o=t;o>0;o--)r=1<<o-1,i+=(e&r?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}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",n)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Yu{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Ju(t,e.z,e.z,e.x,e.y)}}class Ku{constructor(t,e,n,r,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Xu(n,+r,+i),this.key=0===e&&t===n?this.canonical.key:Ju(e,t,n,r,i)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){const e=this.canonical.z-t;return t>this.canonical.z?new Ku(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ku(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}calculateScaledKey(t,e=!0){if(this.overscaledZ===t&&e)return this.key;if(t>this.canonical.z)return Ju(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y);{const n=this.canonical.z-t;return Ju(this.wrap*+e,t,t,this.canonical.x>>n,this.canonical.y>>n)}}isChildOf(t){if(t.wrap!==this.wrap)return!1;const 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}children(t){if(this.overscaledZ>
vendor: 4,295 bytes, line 45
45=t)return[new Ku(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Ku(e,this.wrap,e,n,r),new Ku(e,this.wrap,e,n+1,r),new Ku(e,this.wrap,e,n,r+1),new Ku(e,this.wrap,e,n+1,r+1)]}isLessThan(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))}wrapped(){return new Ku(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new Ku(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Yu(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}}function Ju(t,e,n,r,i){const o=1<<Math.min(n,22);let a=o*(i%o)+r%o;return t&&n<22&&(a+=o*o*((t<0?-2*t-1:2*t)%(1<<2*(22-n)))),16*(32*a+n)+(e-n)}Ni(Xu,"CanonicalTileID"),Ni(Ku,"OverscaledTileID",{omit:["projMatrix"]});class Qu extends f{constructor(t,e,n){super(t,e),this.z=n}}function th(t,e){return t.x*e.x+t.y*e.y}function eh(t,e){if(1===t.length){let n=0;const r=e[n++];let i;for(;!i||r.equals(i);)if(i=e[n++],!i)return 1/0;for(;n<e.length;n++){const o=e[n],a=t[0],s=i.sub(r),l=o.sub(r),c=a.sub(r),u=th(s,s),h=th(s,l),d=th(l,l),p=th(c,s),f=th(c,l),m=u*d-h*h,g=(d*p-h*f)/m,y=(u*f-h*p)/m,_=r.z*(1-g-y)+i.z*g+o.z*y;if(isFinite(_))return _}return 1/0}{let t=1/0;for(const n of e)t=Math.min(t,n.z);return t}}function nh(t,e,n,r,i,o,a,s){const l=a*i.getElevationAt(t,e,!0,!0),c=0!==o[0],u=c?0===o[1]?a*(o[0]/7-450):a*function(t,e,n){const r=Math.floor(e[0]/8),i=Math.floor(e[1]/8),o=10*(e[0]-8*r),a=10*(e[1]-8*i),s=t.getElevationAt(r,i,!0,!0),l=t.getMeterToDEM(n),c=Math.floor(.5*(o*l-1)),u=Math.floor(.5*(a*l-1)),h=t.tileCoordToPixel(r,i),d=2*c+1,p=2*u+1,f=function(t,e,n,r,i){return[t.getElevationAtPixel(e,n,!0),t.getElevationAtPixel(e+i,n,!0),t.getElevationAtPixel(e,n+i,!0),t.getElevationAtPixel(e+r,n+i,!0)]}(t,h.x-c,h.y-u,d,p),m=Math.abs(f[0]-f[1]),g=Math.abs(f[2]-f[3]),y=Math.abs(f[0]-f[2])+Math.abs(f[1]-f[3]),_=Math.min(.25,.5*l*(m+g)/d),v=Math.min(.25,.5*l*y/p);return s+Math.max(_*o,v*a)}(i,o,s):l;return{base:l+(0===n)?-1:n,top:c?Math.max(u+r,l+n+2):l+r}}const rh=oa([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"},{name:"a_linesofar",components:1,type:"Float32"}],4),{members:ih}=rh,oh=oa([{name:"a_packed",components:4,type:"Float32"}]),{members:ah}=oh,sh=Au.types,lh=Math.cos(Math.PI/180*37.5);class ch{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.projection=t.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(t=>{this.gradients[t.id]={}}),this.layoutVertexArray=new ua,this.layoutVertexArray2=new ha,this.indexArray=new Sa,this.programConfigurations=new vs(t.layers,t.zoom),this.segments=new ks,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(t,e,n,r){this.hasPattern=lu("line",this.layers,e);const i=this.layers[0].layout.get("line-sort-key"),o=[];for(const{feature:c,id:u,index:h,sourceLayerIndex:d}of t){const t=this.layers[0]._featureFilter.needGeometry,e=Qs(c,t);if(!this.layers[0]._featureFilter.filter(new No(this.zoom),e,n))continue;const a=i?i.evaluate(e,{},n):void 0,s={id:u,properties:c.properties,type:c.type,sourceLayerIndex:d,index:h,geometry:t?e.geometry:Js(c,n,r),patterns:{},sortKey:a};o.push(s)}i&&o.sort((t,e)=>t.sortKey-e.sortKey);const{lineAtlas:a,featureIndex:s}=e,l=this.addConstantDashes(a);for(const c of o){const{geometry:r,index:i,sourceLayerIndex:o}=c;if(l&&this.addFeatureDashes(c,a),this.hasPattern){const t=cu("line",this.layers,c,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(c,r,i,n,a.positions,e.availableImages);s.insert(t[i].feature,r,i,o,this.index)}}addConstantDashes(t){let e=!1;for(const n of this.layers){const r=n.paint.get("line-dasharray").value,i=n.layout.get("line-cap").value;if("constant"!==r.kind||"constant"!==i.kind)e=!0;
vendor: 59,761 bytes, lines 45-46
45else{const e=i.value,n=r.value;if(!n)continue;t.addDash(n.from,e),t.addDash(n.to,e),n.other&&t.addDash(n.other,e)}}return e}addFeatureDashes(t,e){const n=this.zoom;for(const r of this.layers){const i=r.paint.get("line-dasharray").value,o=r.layout.get("line-cap").value;if("constant"===i.kind&&"constant"===o.kind)continue;let a,s,l,c,u,h;if("constant"===i.kind){const t=i.value;if(!t)continue;a=t.other||t.to,s=t.to,l=t.from}else a=i.evaluate({zoom:n-1},t),s=i.evaluate({zoom:n},t),l=i.evaluate({zoom:n+1},t);"constant"===o.kind?c=u=h=o.value:(c=o.evaluate({zoom:n-1},t),u=o.evaluate({zoom:n},t),h=o.evaluate({zoom:n+1},t)),e.addDash(a,c),e.addDash(s,u),e.addDash(l,h);const d=e.getKey(a,c),p=e.getKey(s,u),f=e.getKey(l,h);t.patterns[r.id]={min:d,mid:p,max:f}}}update(t,e,n,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n,r)}addFeatures(t,e,n,r,i){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,e,n,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,ah)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ih),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,n,r,i,o){const a=this.layers[0].layout,s=a.get("line-join").evaluate(t,{}),l=a.get("line-cap").evaluate(t,{}),c=a.get("line-miter-limit"),u=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const h of e)this.addLine(h,t,s,l,c,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,o,r)}addLine(t,e,n,r,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e<t.length-1;e++)this.totalDistance+=t[e].dist(t[e+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const a="Polygon"===sh[e.type];let s=t.length;for(;s>=2&&t[s-1].equals(t[s-2]);)s--;let l=0;for(;l<s-1&&t[l].equals(t[l+1]);)l++;if(s<(a?3:2))return;"bevel"===n&&(i=1.05);const c=this.overscaling<=16?122880/(512*this.overscaling):0,u=this.segments.prepareSegment(10*s,this.layoutVertexArray,this.indexArray);let h,d,p,f,m;this.e1=this.e2=-1,a&&(h=t[s-2],m=t[l].sub(h)._unit()._perp());for(let g=l;g<s;g++){if(p=g===s-1?a?t[l+1]:void 0:t[g+1],p&&t[g].equals(p))continue;m&&(f=m),h&&(d=h),h=t[g],m=p?p.sub(h)._unit()._perp():f,f=f||m;let e=f.add(m);0===e.x&&0===e.y||e._unit();const y=f.x*m.x+f.y*m.y,_=e.x*m.x+e.y*m.y,v=0!==_?1/_:1/0,b=2*Math.sqrt(2-2*_),x=_<lh&&d&&p,w=f.x*m.y-f.y*m.x>0;if(x&&g>l){const t=h.dist(d);if(t>2*c){const e=h.sub(h.sub(d)._mult(c/t)._round());this.updateDistance(d,e),this.addCurrentVertex(e,f,0,0,u),d=e}}const S=d&&p;let T=S?n:a?"butt":r;if(S&&"round"===T&&(v<o?T="miter":v<=2&&(T="fakeround")),"miter"===T&&v>i&&(T="bevel"),"bevel"===T&&(v>2&&(T="flipbevel"),v<i&&(T="miter")),d&&this.updateDistance(d,h),"miter"===T)e._mult(v),this.addCurrentVertex(h,e,0,0,u);else if("flipbevel"===T){if(v>100)e=m.mult(-1);else{const t=v*f.add(m).mag()/f.sub(m).mag();e._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(h,e,0,0,u),this.addCurrentVertex(h,e.mult(-1),0,0,u)}else if("bevel"===T||"fakeround"===T){const t=-Math.sqrt(v*v-1),e=w?t:0,n=w?0:t;if(d&&this.addCurrentVertex(h,f,e,n,u),"fakeround"===T){const t=Math.round(180*b/Math.PI/20);for(let e=1;e<t;e++){let n=e/t;if(.5!==n){const t=n-.5;n+=n*t*(n-1)*((1.0904+y*(y*(3.55645-1.43519*y)-3.2452))*t*t+(.848013+y*(.215638*y-1.06021)))}const r=m.sub(f)._mult(n)._add(f)._unit()._mult(w?-1:1);this.addHalfVertex(h,r.x,r.y,!1,w,0,u)}}p&&this.addCurrentVertex(h,m,-e,-n,u)}else if("butt"===T)this.addCurrentVertex(h,e,0,0,u);else if("square"===T){const t=d?1:-1;d||this.addCurrentVertex(h,e,t,t,u),this.addCurrentVertex(h,e,0,0,u),d&&this.addCurrentVertex(h,e,t,t,u)}else"round"===T&&(d&&(this.addCurrentVertex(h,f,0,0,u),this.addCurrentVertex(h,f,1,1,u,!0)),p&&(this.addCurrentVertex(h,m,-1,-1,u,!0),this.addCurrentVertex(h,m,0,0,u)));if(x&&g<s-1){const t=h.dist(p);if(t>2*c){const e=h.add(p.sub(h)._mult(c/t)._round());this.updateDistance(h,e),this.addCurrentVertex(e,m,0,0,u),h=e}}}}addCurrentVertex(t,e,n,r,i,o=!1){const a=e.y*r-e.x,s=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*n,e.y-e.x*n,o,!1,n,i),this.addHalfVertex(t,a,s,o,!0,-r,i)}addHalfVertex({x:t,y:e},n,r,i,o,a,s){this.layoutVertexArray.emplaceBack((t<<1)+(i?1:0),(e<<1)+(o?1:0),Math.round(63*n)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const l=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),s.primitiveLength++),o?this.e2=l:this.e1=l}updateScaledDistance(){if(this.lineClips){const t=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=t*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}}Ni(ch,"LineBucket",{omit:["layers","patternFeatures"]});const uh=new ta({"line-cap":new Yo(Xt.layout_line["line-cap"]),"line-join":new Yo(Xt.layout_line["line-join"]),"line-miter-limit":new Xo(Xt.layout_line["line-miter-limit"]),"line-round-limit":new Xo(Xt.layout_line["line-round-limit"]),"line-sort-key":new Yo(Xt.layout_line["line-sort-key"])});var hh={paint:new ta({"line-opacity":new Yo(Xt.paint_line["line-opacity"]),"line-color":new Yo(Xt.paint_line["line-color"]),"line-translate":new Xo(Xt.paint_line["line-translate"]),"line-translate-anchor":new Xo(Xt.paint_line["line-translate-anchor"]),"line-width":new Yo(Xt.paint_line["line-width"]),"line-gap-width":new Yo(Xt.paint_line["line-gap-width"]),"line-offset":new Yo(Xt.paint_line["line-offset"]),"line-blur":new Yo(Xt.paint_line["line-blur"]),"line-dasharray":new Ko(Xt.paint_line["line-dasharray"]),"line-pattern":new Ko(Xt.paint_line["line-pattern"]),"line-gradient":new Qo(Xt.paint_line["line-gradient"]),"line-trim-offset":new Xo(Xt.paint_line["line-trim-offset"])}),layout:uh};const dh=new class extends Yo{possiblyEvaluate(t,e){return e=new No(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,n,r){return e=k({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,n,r)}}(hh.paint.properties["line-width"].specification);function ph(t,e){return e>0?e+2*t:t}dh.useIntegerZoom=!0;const fh=oa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),mh=oa([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),gh=oa([{name:"a_projected_pos",components:4,type:"Float32"}],4);oa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const yh=oa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),_h=oa([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);oa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const vh=oa([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),bh=oa([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);oa([{name:"triangle",components:3,type:"Uint16"}]),oa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{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:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Uint8",name:"flipState"}]),oa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),oa([{type:"Float32",name:"offsetX"}]),oa([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var xh=24;const wh=128;function Sh(t,e){const{expression:n}=e;if("constant"===n.kind)return{kind:"constant",layoutSize:n.evaluate(new No(t+1))};if("source"===n.kind)return{kind:"source"};{const{zoomStops:e,interpolationType:r}=n;let i=0;for(;i<e.length&&e[i]<=t;)i++;i=Math.max(0,i-1);let o=i;for(;o<e.length&&e[o]<t+1;)o++;o=Math.min(e.length-1,o);const a=e[i],s=e[o];return"composite"===n.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:r}:{kind:"camera",minZoom:a,maxZoom:s,minSize:n.evaluate(new No(a)),maxSize:n.evaluate(new No(s)),interpolationType:r}}}function Th(t,{uSize:e,uSizeT:n},{lowerSize:r,upperSize:i}){return"source"===t.kind?r/wh:"composite"===t.kind?On(r/wh,i/wh,n):e}function Eh(t,e){let n=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){const{interpolationType:i,minZoom:o,maxZoom:a}=t,s=i?T(Zn.interpolationFactor(i,e,o,a),0,1):0;"camera"===t.kind?r=On(t.minSize,t.maxSize,s):n=s}return{uSizeT:n,uSize:r}}var Ch=Object.freeze({__proto__:null,getSizeData:Sh,evaluateSizeForFeature:Th,evaluateSizeForZoom:Eh,SIZE_PACK_FACTOR:wh});function Oh(t,e,n){return t.sections.forEach(t=>{t.text=function(t,e,n){const r=e.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),Fo.applyArabicShaping&&(t=Fo.applyArabicShaping(t)),t}(t.text,e,n)}),t}const Ph={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function kh(t){return"︶"===t||"﹈"===t||"︸"===t||"﹄"===t||"﹂"===t||"︾"===t||"︼"===t||"︺"===t||"︘"===t||"﹀"===t||"︐"===t||"︓"===t||"︔"===t||"`"===t||" ̄"===t||"︑"===t||"︒"===t}function Ah(t){return"︵"===t||"﹇"===t||"︷"===t||"﹃"===t||"﹁"===t||"︽"===t||"︻"===t||"︹"===t||"︗"===t||"︿"===t}var Ih=Bh,Mh=function(t,e,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,p=t[e+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},Dh=function(t,e,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=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=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+p]=255&a,p+=f,a/=256,c-=8);t[n+p-f]|=128*m};
46/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function Bh(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Bh.Varint=0,Bh.Fixed64=1,Bh.Bytes=2,Bh.Fixed32=5;var zh=4294967296,Lh=1/zh,Rh="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function jh(t){return t.type===Bh.Bytes?t.readVarint()+t.pos:t.pos+1}function Fh(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Nh(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 $h(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function Vh(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function Uh(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function Gh(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function Hh(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function qh(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function Wh(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function Zh(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function Xh(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function Yh(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Kh(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function Jh(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Qh(t,e,n){e.glyphs=[],1===t&&n.readMessage(td,e)}function td(t,e,n){if(3===t){const{id:t,bitmap:r,width:i,height:o,left:a,top:s,advance:l}=n.readMessage(ed,{});e.glyphs.push({id:t,bitmap:new wc({width:i+6,height:o+6},r),metrics:{width:i,height:o,left:a,top:s,advance:l}})}else 4===t?e.ascender=n.readSVarint():5===t&&(e.descender=n.readSVarint())}function ed(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 nd(t){let e=0,n=0;for(const a of t)e+=a.w*a.h,n=Math.max(n,a.w);t.sort((t,e)=>e.h-t.h);const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),n),h:1/0}];let i=0,o=0;for(const a of t)for(let t=r.length-1;t>=0;t--){const e=r[t];if(!(a.w>e.w||a.h>e.h)){if(a.x=e.x,a.y=e.y,o=Math.max(o,a.y+a.h),i=Math.max(i,a.x+a.w),a.w===e.w&&a.h===e.h){const e=r.pop();t<r.length&&(r[t]=e)}else a.h===e.h?(e.x+=a.w,e.w-=a.w):a.w===e.w?(e.y+=a.h,e.h-=a.h):(r.push({x:e.x+a.w,y:e.y,w:e.w-a.w,h:a.h}),e.y+=a.h,e.h-=a.h);break}}return{w:i,h:o,fill:e/(i*o)||0}}Bh.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=Yh(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Jh(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Yh(this.buf,this.pos)+Yh(this.buf,this.pos+4)*zh;return this.pos+=8,t},readSFixed64:function(){var t=Yh(this.buf,this.pos)+Jh(this.buf,this.pos+4)*zh;return this.pos+=8,t},readFloat:function(){var t=Mh(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Mh(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(r=(112&(i=o[n.pos++]))>>4,i<128)return Fh(t,r,e);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return Fh(t,r,e);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return Fh(t,r,e);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return Fh(t,r,e);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return Fh(t,r,e);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return Fh(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=this.pos;return this.pos=t,t-e>=12&&Rh?function(t,e,n){return Rh.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var r="",i=e;i<n;){var o,a,s,l=t[i],c=null,u=l>239?4:l>223?3:l>191?2:1;if(i+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=t[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(a=t[i+2],128==(192&(o=t[i+1]))&&128==(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=t[i+2],s=t[i+3],128==(192&(o=t[i+1]))&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Bh.Bytes)return t.push(this.readVarint(e));var n=jh(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Bh.Bytes)return t.push(this.readSVarint());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Bh.Bytes)return t.push(this.readBoolean());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Bh.Bytes)return t.push(this.readFloat());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Bh.Bytes)return t.push(this.readDouble());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Bh.Bytes)return t.push(this.readFixed32());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Bh.Bytes)return t.push(this.readSFixed32());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Bh.Bytes)return t.push(this.readFixed64());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Bh.Bytes)return t.push(this.readSFixed64());var e=jh(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Bh.Varint)for(;this.buf[this.pos++]>127;);else if(e===Bh.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Bh.Fixed32)this.pos+=4;else{if(e!==Bh.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),Kh(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Kh(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Kh(this.buf,-1&t,this.pos),Kh(this.buf,Math.floor(t*Lh),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Kh(this.buf,-1&t,this.pos),Kh(this.buf,Math.floor(t*Lh),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,n.buf[n.pos]=127&(t>>>=7)}(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&&Nh(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),Dh(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Dh(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&&Nh(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,Bh.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,$h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Vh,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Hh,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Uh,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Gh,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,qh,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Wh,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Zh,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Xh,e)},writeBytesField:function(t,e){this.writeTag(t,Bh.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Bh.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Bh.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Bh.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Bh.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Bh.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Bh.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Bh.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Bh.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Bh.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};class rd{constructor(t,{pixelRatio:e,version:n,stretchX:r,stretchY:i,content:o}){this.paddedRect=t,this.pixelRatio=e,this.stretchX=r,this.stretchY=i,this.content=o,this.version=n}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class id{constructor(t,e){const n={},r={};this.haveRenderCallbacks=[];const i=[];this.addImages(t,n,i),this.addImages(e,r,i);const{w:o,h:a}=nd(i),s=new Sc({width:o||1,height:a||1});for(const l in t){const e=t[l],r=n[l].paddedRect;Sc.copy(e.data,s,{x:0,y:0},{x:r.x+1,y:r.y+1},e.data)}for(const l in e){const t=e[l],n=r[l].paddedRect,i=n.x+1,o=n.y+1,a=t.data.width,c=t.data.height;Sc.copy(t.data,s,{x:0,y:0},{x:i,y:o},t.data),Sc.copy(t.data,s,{x:0,y:c-1},{x:i,y:o-1},{width:a,height:1}),Sc.copy(t.data,s,{x:0,y:0},{x:i,y:o+c},{width:a,height:1}),Sc.copy(t.data,s,{x:a-1,y:0},{x:i-1,y:o},{width:1,height:c}),Sc.copy(t.data,s,{x:0,y:0},{x:i+a,y:o},{width:1,height:c})}this.image=s,this.iconPositions=n,this.patternPositions=r}addImages(t,e,n){for(const r in t){const i=t[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),e[r]=new rd(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}}patchUpdatedImages(t,e){this.haveRenderCallbacks=this.haveRenderCallbacks.filter(e=>t.hasImage(e)),t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const n in t.updatedImages)this.patchUpdatedImage(this.iconPositions[n],t.getImage(n),e),this.patchUpdatedImage(this.patternPositions[n],t.getImage(n),e)}patchUpdatedImage(t,e,n){if(!t||!e)return;if(t.version===e.version)return;t.version=e.version;const[r,i]=t.tl;n.update(e.data,void 0,{x:r,y:i})}}Ni(rd,"ImagePosition"),Ni(id,"ImageAtlas");const od={horizontal:1,vertical:2,horizontalOnly:3};class ad{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(t,e){const n=new ad;return n.scale=t||1,n.fontStack=e,n}static forImage(t){const e=new ad;return e.imageName=t,e}}class sd{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,e){const n=new sd;for(let r=0;r<t.sections.length;r++){const i=t.sections[r];i.image?n.addImageSection(i):n.addTextSection(i,e)}return n}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSections(){return this.sections}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(t){this.text=function(t,e){let n="";for(let r=0;r<t.length;r++){const i=t.charCodeAt(r+1)||null,o=t.charCodeAt(r-1)||null;n+=!e&&(i&&To(i)&&!Ph[t[r+1]]||o&&To(o)&&!Ph[t[r-1]])||!Ph[t[r]]?t[r]:Ph[t[r]]}return n}(this.text,t)}trim(){let t=0;for(let n=0;n<this.text.length&&cd[this.text.charCodeAt(n)];n++)t++;let e=this.text.length;for(let n=this.text.length-1;n>=0&&n>=t&&cd[this.text.charCodeAt(n)];n--)e--;this.text=this.text.substring(t,e),this.sectionIndex=this.sectionIndex.slice(t,e)}substring(t,e){const n=new sd;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,e)=>Math.max(t,this.sections[e].scale),0)}addTextSection(t,e){this.text+=t.text,this.sections.push(ad.forText(t.scale,t.fontStack||e));const n=this.sections.length-1;for(let r=0;r<t.text.length;++r)this.sectionIndex.push(n)}addImageSection(t){const e=t.image?t.image.name:"";if(0===e.length)return void $("Can't add FormattedSection with an empty image.");const n=this.getNextImageSectionCharCode();n?(this.text+=String.fromCharCode(n),this.sections.push(ad.forImage(e)),this.sectionIndex.push(this.sections.length-1)):$("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function ld(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m){const g=sd.fromFeature(t,i);let y;h===od.vertical&&g.verticalizePunctuation(d);const{processBidirectionalText:_,processStyledBidirectionalText:v}=Fo;if(_&&1===g.sections.length){y=[];const t=_(g.toString(),gd(g,c,o,e,r,p,f));for(const e of t){const t=new sd;t.text=e,t.sections=g.sections;for(let n=0;n<e.length;n++)t.sectionIndex.push(0);y.push(t)}}else if(v){y=[];const t=v(g.text,g.sectionIndex,gd(g,c,o,e,r,p,f));for(const e of t){const t=new sd;t.text=e[0],t.sectionIndex=e[1],t.sections=g.sections,y.push(t)}}else y=function(t,e){const n=[],r=t.text;let i=0;for(const o of e)n.push(t.substring(i,o)),i=o;return i<r.length&&n.push(t.substring(i,r.length)),n}(g,gd(g,c,o,e,r,p,f));const b=[],x={positionedLines:b,text:g.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:h,iconsInText:!1,verticalizable:!1,hasBaseline:!1};return function(t,e,n,r,i,o,a,s,l,c,u,h){let d=0,p=0,f=0;const m="right"===s?1:"left"===s?0:.5;let g=!1;for(const w of i){const t=w.getSections();for(const n of t){if(n.imageName)continue;const t=e[n.fontStack];if(t&&(g=void 0!==t.ascender&&void 0!==t.descender,!g))break}if(!g)break}let y=0;for(const w of i){w.trim();const i=w.getMaxScale(),a=(i-1)*xh,s={positionedGlyphs:[],lineOffset:0};t.positionedLines[y]=s;const v=s.positionedGlyphs;let b=0;if(!w.length()){p+=o,++y;continue}let x=0,S=0;for(let o=0;o<w.length();o++){const a=w.getSection(o),s=w.getSectionIndex(o),f=w.getCharCode(o);let m=a.scale,y=null,T=null,E=null,C=xh,O=0;const P=!(l===od.horizontal||!u&&!So(f)||u&&(cd[f]||(_=f,qi(_)||Wi(_)||Zi(_)||fo(_)||_o(_))));if(a.imageName){const e=r[a.imageName];if(!e)continue;E=a.imageName,t.iconsInText=t.iconsInText||!0,T=e.paddedRect;const n=e.displaySize;m=m*xh/h,y={width:n[0],height:n[1],left:1,top:-3,advance:P?n[1]:n[0],localGlyph:!1},O=g?-y.height*m:i*xh-17-n[1]*m,C=y.advance;const o=(P?n[0]:n[1])*m-xh*i;o>0&&o>b&&(b=o)}else{const t=n[a.fontStack];if(!t)continue;t[f]&&(T=t[f]);const r=e[a.fontStack];if(!r)continue;const o=r.glyphs[f];if(!o)continue;if(y=o.metrics,C=8203!==f?xh:0,g){const t=void 0!==r.ascender?Math.abs(r.ascender):0,e=void 0!==r.descender?Math.abs(r.descender):0,n=(t+e)*m;x<n&&(x=n,S=(t-e)/2*m),O=-t*m}else O=(i-m)*xh-17}P?(t.verticalizable=!0,v.push({glyph:f,imageName:E,x:d,y:p+O,vertical:P,scale:m,localGlyph:y.localGlyph,fontStack:a.fontStack,sectionIndex:s,metrics:y,rect:T}),d+=C*m+c):(v.push({glyph:f,imageName:E,x:d,y:p+O,vertical:P,scale:m,localGlyph:y.localGlyph,fontStack:a.fontStack,sectionIndex:s,metrics:y,rect:T}),d+=y.advance*m+c)}0!==v.length&&(f=Math.max(d-c,f),g?_d(v,m,b,S,o*i/2):_d(v,m,b,0,o/2)),d=0;const T=o*i+b;s.lineOffset=Math.max(b,a),p+=T,++y}var _;const v=p,{horizontalAlign:b,verticalAlign:x}=yd(a);(function(t,e,n,r,i,o){const a=(e-n)*i,s=-o*r;for(const l of t)for(const t of l.positionedGlyphs)t.x+=a,t.y+=s})(t.positionedLines,m,b,x,f,v),t.top+=-x*v,t.bottom=t.top+v,t.left+=-b*f,t.right=t.left+f,t.hasBaseline=g}(x,e,n,r,y,a,s,l,h,c,d,m),!function(t){for(const e of t)if(0!==e.positionedGlyphs.length)return!1;return!0}(b)&&x}const cd={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ud={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function hd(t,e,n,r,i,o){if(e.imageName){const t=r[e.imageName];return t?t.displaySize[0]*e.scale*xh/o+i:0}{const r=n[e.fontStack],o=r&&r.glyphs[t];return o?o.metrics.advance*e.scale+i:0}}function dd(t,e,n,r){const i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}function pd(t,e,n){let r=0;return 10===t&&(r-=1e4),n&&(r+=150),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function fd(t,e,n,r,i,o){let a=null,s=dd(e,n,i,o);for(const l of r){const t=dd(e-l.x,n,i,o)+l.badness;t<=s&&(a=l,s=t)}return{index:t,x:e,priorBreak:a,badness:s}}function md(t){return t?md(t.priorBreak).concat(t.index):[]}function gd(t,e,n,r,i,o,a){if("point"!==o)return[];if(!t)return[];const s=[],l=function(t,e,n,r,i,o){let a=0;for(let s=0;s<t.length();s++){const n=t.getSection(s);a+=hd(t.getCharCode(s),n,r,i,e,o)}return a/Math.max(1,Math.ceil(a/n))}(t,e,n,r,i,a),c=t.text.indexOf("​")>=0;let u=0;for(let d=0;d<t.length();d++){const n=t.getSection(d),o=t.getCharCode(d);if(cd[o]||(u+=hd(o,n,r,i,e,a)),d<t.length()-1){const e=!((h=o)<11904||!(no(h)||eo(h)||go(h)||po(h)||ao(h)||Xi(h)||ro(h)||Ji(h)||so(h)||lo(h)||oo(h)||vo(h)||Qi(h)||Ki(h)||Yi(h)||io(h)||to(h)||mo(h)||uo(h)||co(h)));(ud[o]||e||n.imageName)&&s.push(fd(d+1,u,l,s,pd(o,t.getCharCode(d+1),e&&c),!1))}}var h;return md(fd(t.length(),u,l,s,0,!0))}function yd(t){let 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 _d(t,e,n,r,i){if(!(e||n||r||i))return;const o=t.length-1,a=t[o],s=(a.x+a.metrics.advance*a.scale)*e;for(let l=0;l<=o;l++)t[l].x-=s,t[l].y+=n+r+i}function vd(t,e,n){const{horizontalAlign:r,verticalAlign:i}=yd(n),o=e[0]-t.displaySize[0]*r,a=e[1]-t.displaySize[1]*i;return{image:t,top:a,bottom:a+t.displaySize[1],left:o,right:o+t.displaySize[0]}}function bd(t,e,n,r,i,o){const a=t.image;let s;if(a.content){const t=a.content,e=a.pixelRatio||1;s=[t[0]/e,t[1]/e,a.displaySize[0]-t[2]/e,a.displaySize[1]-t[3]/e]}const l=e.left*o,c=e.right*o;let u,h,d,p;"width"===n||"both"===n?(p=i[0]+l-r[3],h=i[0]+c+r[1]):(p=i[0]+(l+c-a.displaySize[0])/2,h=p+a.displaySize[0]);const f=e.top*o,m=e.bottom*o;return"height"===n||"both"===n?(u=i[1]+f-r[0],d=i[1]+m+r[2]):(u=i[1]+(f+m-a.displaySize[1])/2,d=u+a.displaySize[1]),{image:a,top:u,right:h,bottom:d,left:p,collisionPadding:s}}class xd extends f{constructor(t,e,n,r,i){super(t,e),this.angle=r,this.z=n,void 0!==i&&(this.segment=i)}clone(){return new xd(this.x,this.y,this.z,this.angle,this.segment)}}function wd(t,e,n,r,i){if(void 0===e.segment)return!0;let o=e,a=e.segment+1,s=0;for(;s>-n/2;){if(a--,a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;const l=[];let c=0;for(;s<n/2;){const e=t[a],n=t[a+1];if(!n)return!1;let o=t[a-1].angleTo(e)-e.angleTo(n);for(o=Math.abs((o+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:o}),c+=o;s-l[0].distance>r;)c-=l.shift().angleDelta;if(c>i)return!1;a++,s+=e.dist(n)}return!0}function Sd(t){let e=0;for(let n=0;n<t.length-1;n++)e+=t[n].dist(t[n+1]);return e}function Td(t,e,n){return t?.6*e*n:0}function Ed(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Cd(t,e,n,r,i,o){const a=Td(n,i,o),s=Ed(n,r)*o;let l=0;const c=Sd(t)/2;for(let u=0;u<t.length-1;u++){const n=t[u],r=t[u+1],i=n.dist(r);if(l+i>c){const o=(c-l)/i,h=On(n.x,r.x,o),d=On(n.y,r.y,o),p=new xd(h,d,0,r.angleTo(n),u);return!a||wd(t,p,s,a,e)?p:void 0}l+=i}}function Od(t,e,n,r,i,o,a,s,l){const c=Td(r,o,a),u=Ed(r,i),h=u*a,d=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h<e/4&&(e=h+e/4),Pd(t,d?e/2*s%e:(u/2+2*o)*a*s%e,e,c,n,h,d,!1,l)}function Pd(t,e,n,r,i,o,a,s,l){const c=o/2,u=Sd(t);let h=0,d=e-n,p=[];for(let f=0;f<t.length-1;f++){const e=t[f],a=t[f+1],s=e.dist(a),m=a.angleTo(e);for(;d+n<h+s;){d+=n;const g=(d-h)/s,y=On(e.x,a.x,g),_=On(e.y,a.y,g);if(y>=0&&y<l&&_>=0&&_<l&&d-c>=0&&d+c<=u){const e=new xd(y,_,0,m,f);e._round(),r&&!wd(t,e,o,r,i)||p.push(e)}}h+=s}return s||p.length||a||(p=Pd(t,h/2,n,r,i,o,a,!0,l)),p}function kd(t,e,n,r,i){const o=[];for(let a=0;a<t.length;a++){const s=t[a];let l;for(let t=0;t<s.length-1;t++){let a=s[t],c=s[t+1];a.x<e&&c.x<e||(a.x<e?a=new f(e,a.y+(e-a.x)/(c.x-a.x)*(c.y-a.y))._round():c.x<e&&(c=new f(e,a.y+(e-a.x)/(c.x-a.x)*(c.y-a.y))._round()),a.y<n&&c.y<n||(a.y<n?a=new f(a.x+(n-a.y)/(c.y-a.y)*(c.x-a.x),n)._round():c.y<n&&(c=new f(a.x+(n-a.y)/(c.y-a.y)*(c.x-a.x),n)._round()),a.x>=r&&c.x>=r||(a.x>=r?a=new f(r,a.y+(r-a.x)/(c.x-a.x)*(c.y-a.y))._round():c.x>=r&&(c=new f(r,a.y+(r-a.x)/(c.x-a.x)*(c.y-a.y))._round()),a.y>=i&&c.y>=i||(a.y>=i?a=new f(a.x+(i-a.y)/(c.y-a.y)*(c.x-a.x),i)._round():c.y>=i&&(c=new f(a.x+(i-a.y)/(c.y-a.y)*(c.x-a.x),i)._round()),l&&a.equals(l[l.length-1])||(l=[a],o.push(l)),l.push(c)))))}}return o}Ni(xd,"Anchor");const Ad=1e20;function Id(t,e,n,r,i,o,a,s,l){for(let c=e;c<e+r;c++)Md(t,n*o+c,o,i,a,s,l);for(let c=n;c<n+i;c++)Md(t,c*o+e,1,r,a,s,l)}function Md(t,e,n,r,i,o,a){o[0]=0,a[0]=-Ad,a[1]=Ad,i[0]=t[e];for(let s=1,l=0,c=0;s<r;s++){i[s]=t[e+s*n];const r=s*s;do{const t=o[l];c=(i[s]-i[t]+r-t*t)/(s-t)/2}while(c<=a[l]&&--l>-1);l++,o[l]=s,a[l]=c,a[l+1]=Ad}for(let s=0,l=0;s<r;s++){for(;a[l+1]<s;)l++;const r=o[l],c=s-r;t[e+s*n]=i[r]+c*c}}const Dd={none:0,ideographs:1,all:2};class Bd{constructor(t,e,n){this.requestManager=t,this.localGlyphMode=e,this.localFontFamily=n,this.entries={},this.localGlyphs={200:{},400:{},500:{},900:{}}}setURL(t){this.url=t}getGlyphs(t,e){const n=[];for(const r in t)for(const e of t[r])n.push({stack:r,id:e});O(n,({stack:t,id:e},n)=>{let r=this.entries[t];r||(r=this.entries[t]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let i=r.glyphs[e];if(void 0!==i)return void n(null,{stack:t,id:e,glyph:i});if(i=this._tinySDF(r,t,e),i)return r.glyphs[e]=i,void n(null,{stack:t,id:e,glyph:i});const o=Math.floor(e/256);if(256*o>65535)return void n(new Error("glyphs > 65535 not supported"));if(r.ranges[o])return void n(null,{stack:t,id:e,glyph:i});let a=r.requests[o];a||(a=r.requests[o]=[],Bd.loadGlyphRange(t,o,this.url,this.requestManager,(t,e)=>{if(e){r.ascender=e.ascender,r.descender=e.descender;for(const t in e.glyphs)this._doesCharSupportLocalGlyph(+t)||(r.glyphs[+t]=e.glyphs[+t]);r.ranges[o]=!0}for(const n of a)n(t,e);delete r.requests[o]})),a.push((r,i)=>{r?n(r):i&&n(null,{stack:t,id:e,glyph:i.glyphs[e]||null})})},(t,n)=>{if(t)e(t);else if(n){const t={};for(const{stack:e,id:r,glyph:i}of n)void 0===t[e]&&(t[e]={}),void 0===t[e].glyphs&&(t[e].glyphs={}),t[e].glyphs[r]=i&&{id:i.id,bitmap:i.bitmap.clone(),metrics:i.metrics},t[e].ascender=this.entries[e].ascender,t[e].descender=this.entries[e].descender;e(null,t)}})}_doesCharSupportLocalGlyph(t){return this.localGlyphMode!==Dd.none&&(this.localGlyphMode===Dd.all?!!this.localFontFamily:!!this.localFontFamily&&(lo(t)||ho(t)||Qi(t)||to(t)||Ji(t)))}_tinySDF(t,e,n){const r=this.localFontFamily;if(!r||!this._doesCharSupportLocalGlyph(n))return;let i=t.tinySDF;if(!i){let n="400";/bold/i.test(e)?n="900":/medium/i.test(e)?n="500":/light/i.test(e)&&(n="200"),i=t.tinySDF=new Bd.TinySDF({fontFamily:r,fontWeight:n,fontSize:48,buffer:6,radius:16}),i.fontWeight=n}if(this.localGlyphs[i.fontWeight][n])return this.localGlyphs[i.fontWeight][n];const o=String.fromCharCode(n),{data:a,width:s,height:l,glyphWidth:c,glyphHeight:u,glyphLeft:h,glyphTop:d,glyphAdvance:p}=i.draw(o);return this.localGlyphs[i.fontWeight][n]={id:n,bitmap:new wc({width:s,height:l},a),metrics:{width:c/2,height:u/2,left:h/2,top:d/2-27,advance:p/2,localGlyph:!0}}}}function zd(t,e,n,r){const i=[],o=t.image,a=o.pixelRatio,s=o.paddedRect.w-2,l=o.paddedRect.h-2,c=t.right-t.left,u=t.bottom-t.top,h=o.stretchX||[[0,s]],d=o.stretchY||[[0,l]],p=(t,e)=>t+e[1]-e[0],m=h.reduce(p,0),g=d.reduce(p,0),y=s-m,_=l-g;let v=0,b=m,x=0,w=g,S=0,T=y,E=0,C=_;if(o.content&&r){const t=o.content;v=Ld(h,0,t[0]),x=Ld(d,0,t[1]),b=Ld(h,t[0],t[2]),w=Ld(d,t[1],t[3]),S=t[0]-v,E=t[1]-x,T=t[2]-t[0]-b,C=t[3]-t[1]-w}const O=(r,i,s,l)=>{const h=jd(r.stretch-v,b,c,t.left),d=Fd(r.fixed-S,T,r.stretch,m),p=jd(i.stretch-x,w,u,t.top),y=Fd(i.fixed-E,C,i.stretch,g),_=jd(s.stretch-v,b,c,t.left),O=Fd(s.fixed-S,T,s.stretch,m),P=jd(l.stretch-x,w,u,t.top),k=Fd(l.fixed-E,C,l.stretch,g),A=new f(h,p),I=new f(_,p),M=new f(_,P),D=new f(h,P),B=new f(d/a,y/a),z=new f(O/a,k/a),L=e*Math.PI/180;if(L){const t=Math.sin(L),e=Math.cos(L),n=[e,-t,t,e];A._matMult(n),I._matMult(n),D._matMult(n),M._matMult(n)}const R=r.stretch+r.fixed,j=i.stretch+i.fixed;return{tl:A,tr:I,bl:D,br:M,tex:{x:o.paddedRect.x+1+R,y:o.paddedRect.y+1+j,w:s.stretch+s.fixed-R,h:l.stretch+l.fixed-j},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:B,pixelOffsetBR:z,minFontScaleX:T/a/c,minFontScaleY:C/a/u,isSDF:n}};if(r&&(o.stretchX||o.stretchY)){const t=Rd(h,y,m),e=Rd(d,_,g);for(let n=0;n<t.length-1;n++){const r=t[n],o=t[n+1];for(let t=0;t<e.length-1;t++)i.push(O(r,e[t],o,e[t+1]))}}else i.push(O({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return i}function Ld(t,e,n){let r=0;for(const i of t)r+=Math.max(e,Math.min(n,i[1]))-Math.max(e,Math.min(n,i[0]));return r}function Rd(t,e,n){const r=[{fixed:-1,stretch:0}];for(const[i,o]of t){const t=r[r.length-1];r.push({fixed:i-t.stretch,stretch:t.stretch}),r.push({fixed:i-t.stretch,stretch:t.stretch+(o-i)})}return r.push({fixed:e+1,stretch:n}),r}function jd(t,e,n,r){return t/e*n+r}function Fd(t,e,n,r){return t-e*n/r}function Nd(t,e,n,r){const i=e+t.positionedLines[r].lineOffset;return 0===r?n+i/2:n+(i+(e+t.positionedLines[r-1].lineOffset))/2}Bd.loadGlyphRange=function(t,e,n,r,i){const o=256*e,a=o+255,s=r.transformRequest(r.normalizeGlyphsURL(n).replace("{fontstack}",t).replace("{range}",`${o}-${a}`),ot.Glyphs);ct(s,(t,e)=>{if(t)i(t);else if(e){const t={},n=function(t){return new Ih(t).readFields(Qh,{})}(e);for(const e of n.glyphs)t[e.id]=e;i(null,{glyphs:t,ascender:n.ascender,descender:n.descender})}})},Bd.TinySDF=class{constructor({fontSize:t=24,buffer:e=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=e,this.cutoff=r,this.radius=n;const s=this.size=t+4*e,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${a} ${o} ${t}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(t),a=Math.ceil(n),s=Math.min(this.size-this.buffer,Math.ceil(o-i)),l=Math.min(this.size-this.buffer,a+Math.ceil(r)),c=s+2*this.buffer,u=l+2*this.buffer,h=Math.max(c*u,0),d=new Uint8ClampedArray(h),p={data:d,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:e};if(0===s||0===l)return p;const{ctx:f,buffer:m,gridInner:g,gridOuter:y}=this;f.clearRect(m,m,s,l),f.fillText(t,m,m+a);const _=f.getImageData(m,m,s,l);y.fill(Ad,0,h),g.fill(0,0,h);for(let v=0;v<l;v++)for(let t=0;t<s;t++){const e=_.data[4*(v*s+t)+3]/255;if(0===e)continue;const n=(v+m)*c+t+m;if(1===e)y[n]=0,g[n]=Ad;else{const t=.5-e;y[n]=t>0?t*t:0,g[n]=t<0?t*t:0}}Id(y,0,0,c,u,c,this.f,this.v,this.z),Id(g,m,m,s,l,c,this.f,this.v,this.z);for(let v=0;v<h;v++){const t=Math.sqrt(y[v])-Math.sqrt(g[v]);d[v]=Math.round(255-255*(t/this.radius+this.cutoff))}return p}};class $d{constructor(t=[],e=Vd){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,r=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];for(;t<r;){let r=1+(t<<1),o=e[r];const a=r+1;if(a<this.length&&n(e[a],o)<0&&(r=a,o=e[a]),n(o,i)>=0)break;e[t]=o,t=r}e[t]=i}}function Vd(t,e){return t<e?-1:t>e?1:0}function Ud(t,e=1,n=!1){let r=1/0,i=1/0,o=-1/0,a=-1/0;const s=t[0];for(let p=0;p<s.length;p++){const t=s[p];(!p||t.x<r)&&(r=t.x),(!p||t.y<i)&&(i=t.y),(!p||t.x>o)&&(o=t.x),(!p||t.y>a)&&(a=t.y)}const l=Math.min(o-r,a-i);let c=l/2;const u=new $d([],Gd);if(0===l)return new f(r,i);for(let p=r;p<o;p+=l)for(let e=i;e<a;e+=l)u.push(new Hd(p+c,e+c,c,t));let h=function(t){let e=0,n=0,r=0;const i=t[0];for(let o=0,a=i.length,s=a-1;o<a;s=o++){const t=i[o],a=i[s],l=t.x*a.y-a.x*t.y;n+=(t.x+a.x)*l,r+=(t.y+a.y)*l,e+=3*l}return new Hd(n/e,r/e,0,t)}(t),d=u.length;for(;u.length;){const r=u.pop();(r.d>h.d||!h.d)&&(h=r,n&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,d)),r.max-h.d<=e||(c=r.h/2,u.push(new Hd(r.p.x-c,r.p.y-c,c,t)),u.push(new Hd(r.p.x+c,r.p.y-c,c,t)),u.push(new Hd(r.p.x-c,r.p.y+c,c,t)),u.push(new Hd(r.p.x+c,r.p.y+c,c,t)),d+=4)}return n&&(console.log(`num probes: ${d}`),console.log(`best distance: ${h.d}`)),h.p}function Gd(t,e){return e.max-t.max}function Hd(t,e,n,r){this.p=new f(t,e),this.h=n,this.d=function(t,e){let n=!1,r=1/0;for(let i=0;i<e.length;i++){const o=e[i];for(let e=0,i=o.length,a=i-1;e<i;a=e++){const i=o[e],s=o[a];i.y>t.y!=s.y>t.y&&t.x<(s.x-i.x)*(t.y-i.y)/(s.y-i.y)+i.x&&(n=!n),r=Math.min(r,ul(t,i,s))}}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}const qd=Number.POSITIVE_INFINITY,Wd=Math.sqrt(2);function Zd(t,e){return e[1]!==qd?function(t,e,n){let r=0,i=0;switch(e=Math.abs(e),n=Math.abs(n),t){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,i]}(t,e[0],e[1]):function(t,e){let n=0,r=0;e<0&&(e=0);const i=e/Wd;switch(t){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=e;break;case"right":n=-e}return[n,r]}(t,e[0])}function Xd(t,e,n,r,i,o,a,s,l,c){t.createArrays(),t.tilePixelRatio=As/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;const u=t.layers[0].layout,h=t.layers[0]._unevaluatedLayout._values,d={};if("composite"===t.textSizeData.kind){const{minZoom:e,maxZoom:n}=t.textSizeData;d.compositeTextSizes=[h["text-size"].possiblyEvaluate(new No(e),s),h["text-size"].possiblyEvaluate(new No(n),s)]}if("composite"===t.iconSizeData.kind){const{minZoom:e,maxZoom:n}=t.iconSizeData;d.compositeIconSizes=[h["icon-size"].possiblyEvaluate(new No(e),s),h["icon-size"].possiblyEvaluate(new No(n),s)]}d.layoutTextSize=h["text-size"].possiblyEvaluate(new No(l+1),s),d.layoutIconSize=h["icon-size"].possiblyEvaluate(new No(l+1),s),d.textMaxSize=h["text-size"].possiblyEvaluate(new No(18),s);const p="map"===u.get("text-rotation-alignment")&&"point"!==u.get("symbol-placement"),f=u.get("text-size");for(const m of t.features){const o=u.get("text-font").evaluate(m,{},s).join(","),l=f.evaluate(m,{},s),h=d.layoutTextSize.evaluate(m,{},s),g=(d.layoutIconSize.evaluate(m,{},s),{horizontal:{},vertical:void 0}),y=m.text;let _,v=[0,0];if(y){const r=y.toString(),a=u.get("text-letter-spacing").evaluate(m,{},s)*xh,c=u.get("text-line-height").evaluate(m,{},s)*xh,d=xo(r)?a:0,f=u.get("text-anchor").evaluate(m,{},s),_=u.get("text-variable-anchor");if(!_){const t=u.get("text-radial-offset").evaluate(m,{},s);v=t?Zd(f,[t*xh,qd]):u.get("text-offset").evaluate(m,{},s).map(t=>t*xh)}let b=p?"center":u.get("text-justify").evaluate(m,{},s);const x=u.get("symbol-placement"),w="point"===x,S="point"===x?u.get("text-max-width").evaluate(m,{},s)*xh:0,T=a=>{t.allowVerticalPlacement&&bo(r)&&(g.vertical=ld(y,e,n,i,o,S,c,f,a,d,v,od.vertical,!0,x,h,l))};if(!p&&_){const t="auto"===b?_.map(t=>Yd(t)):[b];let r=!1;for(let a=0;a<t.length;a++){const s=t[a];if(!g.horizontal[s])if(r)g.horizontal[s]=g.horizontal[0];else{const t=ld(y,e,n,i,o,S,c,"center",s,d,v,od.horizontal,!1,x,h,l);t&&(g.horizontal[s]=t,r=1===t.positionedLines.length)}}T("left")}else{if("auto"===b&&(b=Yd(f)),w||u.get("text-writing-mode").indexOf("horizontal")>=0||!bo(r)){const t=ld(y,e,n,i,o,S,c,f,b,d,v,od.horizontal,!1,x,h,l);t&&(g.horizontal[b]=t)}T("point"===x?"left":b)}}let b=!1;if(m.icon&&m.icon.name){const e=r[m.icon.name];e&&(_=vd(i[m.icon.name],u.get("icon-offset").evaluate(m,{},s),u.get("icon-anchor").evaluate(m,{},s)),b=e.sdf,void 0===t.sdfIcons?t.sdfIcons=e.sdf:t.sdfIcons!==e.sdf&&$("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.pixelRatio||0!==u.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}const x=tp(g.horizontal)||g.vertical;t.iconsInText||(t.iconsInText=!!x&&x.iconsInText),(x||_)&&Kd(t,m,g,_,r,d,h,0,v,b,a,s,c)}o&&t.generateCollisionDebugBuffers(l,t.collisionBoxArray)}function Yd(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Kd(t,e,n,r,i,o,a,s,l,c,u,h,d){let p=o.textMaxSize.evaluate(e,{},h);void 0===p&&(p=a);const f=t.layers[0].layout,m=f.get("icon-offset").evaluate(e,{},h),g=tp(n.horizontal)||n.vertical,y="globe"===d.name,v=a/24,b=t.tilePixelRatio*p/24,x=(k=t.overscaling,t.zoom>18&&k>2&&(k>>=1),Math.max(As/(512*k),1)*f.get("symbol-spacing")),w=f.get("text-padding")*t.tilePixelRatio,S=f.get("icon-padding")*t.tilePixelRatio,T=_(f.get("text-max-angle")),E="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),C="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),O=f.get("symbol-placement"),P=x/2;var k;const A=f.get("icon-text-fit");let I;r&&"none"!==A&&(t.allowVerticalPlacement&&n.vertical&&(I=bd(r,n.vertical,A,f.get("icon-text-fit-padding"),m,v)),g&&(r=bd(r,g,A,f.get("icon-text-fit-padding"),m,v)));const M=(a,s,p)=>{if(s.x<0||s.x>=As||s.y<0||s.y>=As)return;let f=null;if(y){const{x:t,y:e,z:n}=d.projectTilePoint(s.x,s.y,p);f={anchor:new xd(t,e,n,0,void 0),up:d.upVector(p,s.x,s.y)}}!function(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v,b,x,w,S,T){const E=t.addToLineVertexArray(e,r);let C,O,P,k,A,I,M,D=0,B=0,z=0,L=0,R=-1,j=-1;const F={};let N=Ya.exports("");const V=n?n.anchor:e;let U=0,G=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[U,G]=l.layout.get("text-offset").evaluate(b,{},T).map(t=>t*xh):(U=l.layout.get("text-radial-offset").evaluate(b,{},T)*xh,G=qd),t.allowVerticalPlacement&&i.vertical){const t=i.vertical;if(f)I=np(t),s&&(M=np(s));else{const n=l.layout.get("text-rotate").evaluate(b,{},T)+90;P=ep(c,V,e,u,h,d,t,p,n,m),s&&(k=ep(c,V,e,u,h,d,s,y,n))}}if(o){const r=l.layout.get("icon-rotate").evaluate(b,{},T),i="none"!==l.layout.get("icon-text-fit"),a=zd(o,r,w,i),p=s?zd(s,r,w,i):void 0;O=ep(c,V,e,u,h,d,o,y,r),D=4*a.length;const f=t.iconSizeData;let m=null;"source"===f.kind?(m=[wh*l.layout.get("icon-size").evaluate(b,{},T)],m[0]>Jd&&$(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===f.kind&&(m=[wh*x.compositeIconSizes[0].evaluate(b,{},T),wh*x.compositeIconSizes[1].evaluate(b,{},T)],(m[0]>Jd||m[1]>Jd)&&$(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,a,m,v,_,b,!1,n,e,E.lineStartIndex,E.lineLength,-1,S,T),R=t.icon.placedSymbolArray.length-1,p&&(B=4*p.length,t.addSymbols(t.icon,p,m,v,_,b,od.vertical,n,e,E.lineStartIndex,E.lineLength,-1,S,T),j=t.icon.placedSymbolArray.length-1)}for(const $ in i.horizontal){const r=i.horizontal[$];C||(N=Ya.exports(r.text),f?A=np(r):C=ep(c,V,e,u,h,d,r,p,l.layout.get("text-rotate").evaluate(b,{},T),m));const o=1===r.positionedLines.length;if(z+=Qd(t,n,e,r,a,l,f,b,m,E,i.vertical?od.horizontal:od.horizontalOnly,o?Object.keys(i.horizontal):[$],F,R,x,S,T),o)break}i.vertical&&(L+=Qd(t,n,e,i.vertical,a,l,f,b,m,E,od.vertical,["vertical"],F,j,x,S,T));let H=-1;const q=(t,e)=>t?Math.max(t,e):e;H=q(A,H),H=q(I,H),H=q(M,H);const W=H>-1?1:0;t.glyphOffsetArray.length>=gf.MAX_GLYPHS&&$("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey),t.symbolInstances.emplaceBack(V.x,V.y,V.z,e.x,e.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical>=0?F.vertical:-1,R,j,N,void 0!==C?C:t.collisionBoxArray.length,void 0!==C?C+1:t.collisionBoxArray.length,void 0!==P?P:t.collisionBoxArray.length,void 0!==P?P+1:t.collisionBoxArray.length,void 0!==O?O:t.collisionBoxArray.length,void 0!==O?O+1:t.collisionBoxArray.length,k||t.collisionBoxArray.length,k?k+1:t.collisionBoxArray.length,u,z,L,D,B,W,0,U,G,H)}(t,s,f,a,n,r,i,I,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,w,E,l,0,S,C,m,e,o,c,u,h)};if("line"===O)for(const _ of kd(e.geometry,0,0,As,As)){const e=Od(_,x,T,n.vertical||g,r,24,b,t.overscaling,As);for(const n of e){const e=g;e&&rp(t,e.text,P,n)||M(_,n,h)}}else if("line-center"===O){for(const _ of e.geometry)if(_.length>1){const t=Cd(_,T,n.vertical||g,r,24,b);t&&M(_,t,h)}}else if("Polygon"===e.type)for(const _ of au(e.geometry,0)){const t=Ud(_,16);M(_[0],new xd(t.x,t.y,0,0,void 0),h)}else if("LineString"===e.type)for(const _ of e.geometry)M(_,new xd(_[0].x,_[0].y,0,0,void 0),h);else if("Point"===e.type)for(const _ of e.geometry)for(const t of _)M([t],new xd(t.x,t.y,0,0,void 0),h)}const Jd=32640;function Qd(t,e,n,r,i,o,a,s,l,c,u,h,d,p,m,g,y){const _=function(t,e,n,r,i,o,a,s){const l=[];if(0===e.positionedLines.length)return l;const c=r.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=function(t){const e=t[0],n=t[1],r=e*n;return r>0?[e,-n]:r<0?[-e,n]:0===e?[n,e]:[n,-e]}(n);let h=Math.abs(e.top-e.bottom);for(const f of e.positionedLines)h-=f.lineOffset;const d=e.positionedLines.length,p=h/d;let m=e.top-n[1];for(let g=0;g<d;++g){const t=e.positionedLines[g];m=Nd(e,p,m,g);for(const r of t.positionedGlyphs){if(!r.rect)continue;const t=r.rect||{};let o=4,h=!0,d=1,p=0;if(r.imageName){const t=a[r.imageName];if(!t)continue;if(t.sdf){$("SDF images are not supported in formatted text and will be ignored.");continue}h=!1,d=t.pixelRatio,o=1/d}const g=(i||s)&&r.vertical,y=r.metrics.advance*r.scale/2,_=r.metrics,v=r.rect;if(null===v)continue;s&&e.verticalizable&&(p=r.imageName?y-r.metrics.width*r.scale/2:0);const b=i?[r.x+y,r.y]:[0,0];let x=[0,0],w=[0,0],S=!1;i||(g?(w=[r.x+y+u[0],r.y+u[1]-p],S=!0):x=[r.x+y+n[0],r.y+n[1]-p]);const T=v.w*r.scale/(d*(r.localGlyph?2:1)),E=v.h*r.scale/(d*(r.localGlyph?2:1));let C,O,P,k;if(g){const t=r.y-m,e=new f(-y,y-t),n=-Math.PI/2,i=new f(...w);C=new f(-y+x[0],x[1]),C._rotateAround(n,e)._add(i),C.x+=-t+y,C.y-=(_.left-o)*r.scale;const a=r.imageName?_.advance*r.scale:xh*r.scale,s=String.fromCharCode(r.glyph);kh(s)?C.x+=(1-o)*r.scale:Ah(s)?C.x+=a-_.height*r.scale+(-o-1)*r.scale:C.x+=r.imageName||_.width+2*o===v.w&&_.height+2*o===v.h?(a-E)/2:(a-(_.height+2*o)*r.scale)/2,O=new f(C.x,C.y-T),P=new f(C.x+E,C.y),k=new f(C.x+E,C.y-T)}else{const t=(_.left-o)*r.scale-y+x[0],e=(-_.top-o)*r.scale+x[1],n=t+T,i=e+E;C=new f(t,e),O=new f(n,e),P=new f(t,i),k=new f(n,i)}if(c){let t;t=i?new f(0,0):S?new f(u[0],u[1]):new f(n[0],n[1]),C._rotateAround(c,t),O._rotateAround(c,t),P._rotateAround(c,t),k._rotateAround(c,t)}const A=new f(0,0),I=new f(0,0);l.push({tl:C,tr:O,bl:P,br:k,tex:t,writingMode:e.writingMode,glyphOffset:b,sectionIndex:r.sectionIndex,isSDF:h,pixelOffsetTL:A,pixelOffsetBR:I,minFontScaleX:0,minFontScaleY:0})}}return l}(0,r,l,o,a,s,i,t.allowVerticalPlacement),v=t.textSizeData;let b=null;"source"===v.kind?(b=[wh*o.layout.get("text-size").evaluate(s,{},y)],b[0]>Jd&&$(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===v.kind&&(b=[wh*m.compositeTextSizes[0].evaluate(s,{},y),wh*m.compositeTextSizes[1].evaluate(s,{},y)],(b[0]>Jd||b[1]>Jd)&&$(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,_,b,l,a,s,u,e,n,c.lineStartIndex,c.lineLength,p,g,y);for(const f of h)d[f]=t.text.placedSymbolArray.length-1;return 4*_.length}function tp(t){for(const e in t)return t[e];return null}function ep(t,e,n,r,i,o,a,s,l,c){let u=a.top,h=a.bottom,d=a.left,p=a.right;const m=a.collisionPadding;if(m&&(d-=m[0],u-=m[1],p+=m[2],h+=m[3]),l){const t=new f(d,u),e=new f(p,u),n=new f(d,h),r=new f(p,h),i=_(l);let o=new f(0,0);c&&(o=new f(c[0],c[1])),t._rotateAround(i,o),e._rotateAround(i,o),n._rotateAround(i,o),r._rotateAround(i,o),d=Math.min(t.x,e.x,n.x,r.x),p=Math.max(t.x,e.x,n.x,r.x),u=Math.min(t.y,e.y,n.y,r.y),h=Math.max(t.y,e.y,n.y,r.y)}return t.emplaceBack(e.x,e.y,e.z,n.x,n.y,d,u,p,h,s,r,i,o),t.length-1}function np(t){t.collisionPadding&&(t.top-=t.collisionPadding[1],t.bottom+=t.collisionPadding[3]);const e=t.bottom-t.top;return e>0?Math.max(10,e):null}function rp(t,e,n,r){const i=t.compareText;if(e in i){const t=i[e];for(let e=t.length-1;e>=0;e--)if(r.dist(t[e])<n)return!0}else i[e]=[];return i[e].push(r),!1}const ip=oa([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),{members:op}=ip,ap=oa([{name:"a_pos_3",components:3,type:"Int16"}]);var sp=oa([{name:"a_pos",type:"Int16",components:2}]);const lp=As/Math.PI/2,cp=2*js(1,0)*lp*Math.PI,up=64,hp=[up,32,16],dp=-lp,pp=lp,fp=[new dc([dp,dp,dp],[pp,pp,pp]),new dc([dp,dp,dp],[0,0,pp]),new dc([0,dp,dp],[pp,0,pp]),new dc([dp,0,dp],[0,pp,pp]),new dc([0,0,dp],[pp,pp,pp])];function mp(t,e,n,r=!0){const i=Gl([],t._camera.position,t.worldSize),o=[e,n,1,1];rc(o,o,t.pixelMatrixInverse),ec(o,o,1/o[3]);const a=ql([],Jl([],o,i)),s=t.globeMatrix,l=[s[12],s[13],s[14]],c=Jl([],l,i),u=Rl(c),h=ql([],c),d=t.worldSize/(2*Math.PI),p=Wl(h,a),f=Math.asin(d/u);if(f<Math.acos(p)){if(!r)return null;const t=[],e=[];Gl(t,a,u/p),ql(e,Jl(e,t,c)),ql(a,Fl(a,c,Gl(a,e,Math.tan(f)*u)))}const m=[];new cc(i,a).closestPointOnSphere(l,d,m);const g=ql([],X(s,0)),y=ql([],X(s,1)),_=ql([],X(s,2)),b=Wl(g,m),x=Wl(y,m),w=Wl(_,m),S=v(Math.asin(-x/d));let E=v(Math.atan2(b,w));E=t.center.lng+function(t,e){const n=(e-t+180)%360-180;return n<-180?n+360:n}(t.center.lng,E);const C=Ls(E),O=T(Rs(S),0,1);return new Gs(C,O)}class gp{constructor(t,e,n){this.a=Jl([],t,n),this.b=Jl([],e,n),this.center=n;const r=ql([],this.a),i=ql([],this.b);this.angle=Math.acos(Wl(r,i))}}function yp(t,e){if(0===t.angle)return null;let n;return n=0===t.a[e]?1/t.angle*.5*Math.PI:1/t.angle*Math.atan(t.b[e]/t.a[e]/Math.sin(t.angle)-1/Math.tan(t.angle)),n<0||n>1?null:function(t,e,n,r){const i=Math.sin(n);return t*(Math.sin((1-r)*n)/i)+e*(Math.sin(r*n)/i)}(t.a[e],t.b[e],t.angle,T(n,0,1))+t.center[e]}function _p(t){if(t.z<=1)return fp[t.z+2*t.y+t.x];const e=Tp(Sp(t));return dc.fromPoints(e)}
vendor: 4,297 bytes, line 46
46function vp(t,e,n){return Gl(t,t,1-n),Hl(t,t,e,n)}function bp(t,e){const n=Dp(e.zoom);if(0===n)return _p(t);const r=Sp(t),i=Tp(r),o=Ls(r.getWest())*e.worldSize,a=Ls(r.getEast())*e.worldSize,s=Rs(r.getNorth())*e.worldSize,l=Rs(r.getSouth())*e.worldSize,c=[o,s,0],u=[a,s,0],h=[o,l,0],d=[a,l,0],p=Cl([],e.globeMatrix);return Xl(c,c,p),Xl(u,u,p),Xl(h,h,p),Xl(d,d,p),i[0]=vp(i[0],h,n),i[1]=vp(i[1],d,n),i[2]=vp(i[2],u,n),i[3]=vp(i[3],c,n),dc.fromPoints(i)}function xp(t,e,n){for(const r of t)Xl(r,r,e),Gl(r,r,n)}function wp(t,e,n){const r=e/t.worldSize,i=t.globeMatrix;if(n.z<=1){const t=_p(n).getCorners();return xp(t,i,r),dc.fromPoints(t)}const o=Sp(n),a=Tp(o);xp(a,i,r);const s=Number.MAX_VALUE,l=[-s,-s,-s],c=[s,s,s];if(o.contains(t.center)){for(const t of a)Vl(c,c,t),Ul(l,l,t);l[2]=0;const e=t.point,n=[e.x*r,e.y*r,0];return Vl(c,c,n),Ul(l,l,n),new dc(c,l)}const u=[i[12]*r,i[13]*r,i[14]*r],h=o.getCenter(),d=T(t.center.lat,-85.051129,Vs),p=T(h.lat,-85.051129,Vs),f=Ls(t.center.lng),m=Rs(d);let g=f-Ls(h.lng);const y=m-Rs(p);g>.5?g-=1:g<-.5&&(g+=1);let v=0;Math.abs(g)>Math.abs(y)?v=g>=0?1:3:(v=y>=0?0:2,Hl(u,u,[i[4]*r,i[5]*r,i[6]*r],-Math.sin(_(y>=0?o.getSouth():o.getNorth()))*lp));const b=a[v],x=a[(v+1)%4],w=new gp(b,x,u),S=[yp(w,0)||b[0],yp(w,1)||b[1],yp(w,2)||b[2]],E=Dp(t.zoom);if(E>0){const r=function({x:t,y:e,z:n},r,i,o,a){const s=1/(1<<n);let l=t*s,c=l+s,u=e*s,h=u+s,d=0;const p=(l+c)/2-o;return p>.5?d=-1:p<-.5&&(d=1),l=((l+d)*r-(o*=r))*i+o,c=((c+d)*r-o)*i+o,u=(u*r-(a*=r))*i+a,h=(h*r-a)*i+a,[[l,h,0],[c,h,0],[c,u,0],[l,u,0]]}(n,e,t._pixelsPerMercatorPixel,f,m);for(let t=0;t<a.length;t++)vp(a[t],r[t],E);const i=Fl([],r[v],r[(v+1)%4]);Gl(i,i,.5),vp(S,i,E)}for(const _ of a)Vl(c,c,_),Ul(l,l,_);return c[2]=Math.min(b[2],x[2]),Vl(c,c,S),Ul(l,l,S),new dc(c,l)}function Sp({x:t,y:e,z:n}){const r=1/(1<<n),i=new Ds(Fs(t*r),Ns((e+1)*r)),o=new Ds(Fs((t+1)*r),Ns(e*r));return new Is(i,o)}function Tp(t){const e=_(t.getNorth()),n=_(t.getSouth()),r=Math.cos(e),i=Math.cos(n),o=Math.sin(e),a=Math.sin(n),s=t.getWest(),l=t.getEast();return[Ep(i,a,s),Ep(i,a,l),Ep(r,o,l),Ep(r,o,s)]}function Ep(t,e,n,r=lp){return n=_(n),[t*Math.sin(n)*r,-e*r,t*Math.cos(n)*r]}function Cp(t,e,n){return Ep(Math.cos(_(t)),Math.sin(_(t)),e,n)}function Op(t,e,n,r){const i=1<<n.z,o=(t/As+n.x)/i;return Cp(Ns((e/As+n.y)/i),Fs(o),r)}function Pp({min:t,max:e}){return 16383/Math.max(e[0]-t[0],e[1]-t[1],e[2]-t[2])}const kp=new Float64Array(16);function Ap(t){const e=Pp(t),n=Ml(kp,[e,e,e]);return Pl(n,n,((r=[])[0]=-(i=t.min)[0],r[1]=-i[1],r[2]=-i[2],r));var r,i}function Ip(t){const e=(r=t.min,(n=kp)[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=r[0],n[13]=r[1],n[14]=r[2],n[15]=1,n);var n,r;const i=1/Pp(t);return kl(e,e,[i,i,i])}function Mp(t,e,n,r,i){const o=function(t){const e=As/(2*Math.PI);return t/(2*Math.PI)/e}(n),a=[t,e,-n/(2*Math.PI)],s=El(new Float64Array(16));return Pl(s,s,a),kl(s,s,[o,o,o]),Al(s,s,_(-i)),Il(s,s,_(-r)),s}function Dp(t){return E(5,6,t)}function Bp(t,e){const n=Cp(e.lat,e.lng),r=function(t){const e=Cp(t._center.lat,t._center.lng);let n=Zl([],jl(0,1,0),e);const r=Dl([],-t.angle,e);n=Xl(n,n,r),Dl(r,-t._pitch,n);const i=ql([],e);return Gl(i,i,t.cameraToCenterDistance/t.pixelsPerMeter*cp),Xl(i,i,r),Fl([],e,i)}(t);return a=(i=Nl([],r,n))[0],s=i[1],l=i[2],c=(o=n)[0],u=o[1],h=o[2],p=(d=Math.sqrt(a*a+s*s+l*l)*Math.sqrt(c*c+u*u+h*h))&&Wl(i,o)/d,Math.acos(Math.min(Math.max(p,-1),1));var i,o,a,s,l,c,u,h,d,p}const zp=_(85),Lp=Math.cos(zp),Rp=Math.sin(zp);function jp(t,e){const n=t.fovAboveCenter,r=t.elevation?t.elevation.getMinElevationBelowMSL()*e:0,i=(t._camera.position[2]*t.worldSize-r)/Math.cos(t._pitch),o=Math.sin(n)*i/Math.sin(Math.max(Math.PI/2-t._pitch-n,.01)),a=Math.sin(t._pitch)*o+i;return Math.min(1.01*a,i*(1/t._horizonShift))}function Fp(t,e){if(!e.isReprojectedInTileSpace)return{scale:1<<t.z,x:t.x,y:t.y,x2:t.x+1,y2:t.y+1,projection:e};const n=Math.pow(2,-t.z),r=t.x*n,i=(t.x+1)*n,o=t.y*n,a=(t.y+1)*n,s=Fs(r),l=Fs(i),c=Ns(o),u=Ns(a),h=e.project(s,c),d=e.project(l,c),p=e.project(l,u),f=e.project(s,u);let m=Math.min(h.x,d.x,p.x,f.x),g=Math.min(h.y,d.y,p.y,f.y),y=Math.max(h.x,d.x,p.x,f.x),_=Math.max(h.y,d.y,p.y,f.y);const v=n/16;function b(t,n,r,i,o,a){const s=(r+o)/2,l=(i+a)/2,c=e.project(Fs(s),Ns(l)),u=Math.max(0,m-c.x,g
vendor: 5,061 bytes, line 46
46-c.y,c.x-y,c.y-_);m=Math.min(m,c.x),y=Math.max(y,c.x),g=Math.min(g,c.y),_=Math.max(_,c.y),u>v&&(b(t,c,r,i,s,l),b(c,n,s,l,o,a))}b(h,d,r,o,i,o),b(d,p,i,o,i,a),b(p,f,i,a,r,a),b(f,h,r,a,r,o),m-=v,g-=v,y+=v,_+=v;const x=1/Math.max(y-m,_-g);return{scale:x,x:m*x,y:g*x,x2:y*x,y2:_*x,projection:e}}const Np=El(new Float32Array(16));class $p{constructor(t){this.spec=t,this.name=t.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(t,e){return{x:0,y:0,z:0}}unproject(t,e){return new Ds(0,0)}projectTilePoint(t,e,n){return{x:t,y:e,z:0}}locationPoint(t,e,n=!0){return t._coordinatePoint(t.locationCoordinate(e),n)}pixelsPerMeter(t,e){return js(1,t)*e}pixelSpaceConversion(t,e,n){return 1}farthestPixelDistance(t){return jp(t,t.pixelsPerMeter)}pointCoordinate(t,e,n,r){const i=t.horizonLineFromTop(!1),o=new f(e,Math.max(i,n));return t.rayIntersectionCoordinate(t.pointRayIntersection(o,r))}pointCoordinate3D(t,e,n){const r=new f(e,n);if(t.elevation)return t.elevation.pointCoordinate(r);{const e=this.pointCoordinate(t,r.x,r.y,0);return[e.x,e.y,e.z]}}isPointAboveHorizon(t,e){if(t.elevation)return!this.pointCoordinate3D(t,e.x,e.y);const n=t.horizonLineFromTop();return e.y<n}createInversionMatrix(t,e){return Np}createTileMatrix(t,e,n){let r,i,o;const a=n.canonical,s=El(new Float64Array(16));if(this.isReprojectedInTileSpace){const l=Fp(a,this);r=1,i=l.x+n.wrap*l.scale,o=l.y,kl(s,s,[r/l.scale,r/l.scale,t.pixelsPerMeter/e])}else r=e/t.zoomScale(a.z),i=(a.x+Math.pow(2,a.z)*n.wrap)*r,o=a.y*r;return Pl(s,s,[i,o,0]),kl(s,s,[r/As,r/As,1]),s}upVector(t,e,n){return[0,0,1]}upVectorScale(t,e,n){return{metersToTile:1}}}class Vp extends $p{constructor(t){super(t),this.range=[4,7],this.center=t.center||[-96,37.5];const[e,n]=this.parallels=t.parallels||[29.5,45.5],r=Math.sin(_(e));this.n=(r+Math.sin(_(n)))/2,this.c=1+r*(2*this.n-r),this.r0=Math.sqrt(this.c)/this.n}project(t,e){const{n:n,c:r,r0:i}=this,o=_(t-this.center[0]),a=_(e),s=Math.sqrt(r-2*n*Math.sin(a))/n;return{x:s*Math.sin(o*n),y:s*Math.cos(o*n)-i,z:0}}unproject(t,e){const{n:n,c:r,r0:i}=this,o=i+e;let a=Math.atan2(t,Math.abs(o))*Math.sign(o);o*n<0&&(a-=Math.PI*Math.sign(t)*Math.sign(o));const s=_(this.center[0])*n;a=C(a,-Math.PI-s,Math.PI-s);const l=T(v(a/n)+this.center[0],-180,180),c=Math.asin(T((r-(t*t+o*o)*n*n)/(2*n),-1,1)),u=T(v(c),-85.051129,Vs);return new Ds(l,u)}}const Up=1.340264,Gp=-.081106,Hp=893e-6,qp=.003796,Wp=Math.sqrt(3)/2;class Zp extends $p{project(t,e){e=e/180*Math.PI,t=t/180*Math.PI;const n=Math.asin(Wp*Math.sin(e)),r=n*n,i=r*r*r;return{x:.5*(t*Math.cos(n)/(Wp*(Up+3*Gp*r+i*(7*Hp+9*qp*r)))/Math.PI+.5),y:1-.5*(n*(Up+Gp*r+i*(Hp+qp*r))/Math.PI+1),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI;let n=e=(2*(1-e)-1)*Math.PI,r=n*n,i=r*r*r;for(let c,u,h,d=0;d<12&&(u=n*(Up+Gp*r+i*(Hp+qp*r))-e,h=Up+3*Gp*r+i*(7*Hp+9*qp*r),c=u/h,n=T(n-c,-Math.PI/3,Math.PI/3),r=n*n,i=r*r*r,!(Math.abs(c)<1e-12));++d);const o=Wp*t*(Up+3*Gp*r+i*(7*Hp+9*qp*r))/Math.cos(n),a=Math.asin(Math.sin(n)/Wp),s=T(180*o/Math.PI,-180,180),l=T(180*a/Math.PI,-85.051129,Vs);return new Ds(s,l)}}class Xp extends $p{constructor(t){super(t),this.wrap=!0,this.supportsWorldCopies=!0}project(t,e){return{x:.5+t/360,y:.5-e/360,z:0}}unproject(t,e){const n=360*(t-.5),r=T(360*(.5-e),-85.051129,Vs);return new Ds(n,r)}}const Yp=Math.PI/2;function Kp(t){return Math.tan((Yp+t)/2)}class Jp extends $p{constructor(t){super(t),this.center=t.center||[0,30];const[e,n]=this.parallels=t.parallels||[30,30];let r=_(e),i=_(n);this.southernCenter=r+i<0,this.southernCenter&&(r=-r,i=-i);const o=Math.cos(r),a=Kp(r);this.n=r===i?Math.sin(r):Math.log(o/Math.cos(i))/Math.log(Kp(i)/a),this.f=o*Math.pow(Kp(r),this.n)/this.n}project(t,e){e=_(e),this.southernCenter&&(e=-e),t=_(t-this.center[0]);const n=1e-6,{n:r,f:i}=this;i>0?e<-Yp+n&&(e=-Yp+n):e>Yp-n&&(e=Yp-n);const o=i/Math.pow(Kp(e),r);let a=o*Math.sin(r*t),s=i-o*Math.cos(r*t);return a=.5*(a/Math.PI+.5),s=.5*(s/Math.PI+.5),{x:a,y:this.southernCenter?s:1-s,z:0}}unproject(t,e){t=(2*t-.5)*Math.PI,this.southernCenter&&(e=1-e),e=(2*(1-e)-.5)*Math.PI;const{n:n,f:r}=this,i=r-e,o=Math.sign(i),a=Math.sign(n)*Math.sqrt(t*t+i*i);let s=Math.atan2(t,Math.abs(i))*o;i*n<0&&(s-=Math.PI*Math.sign(t)*o);const l=T(v(s/n)+this.center[0],-180,180),c=T(v(2*Math.atan(Math.pow(r/a,1/n))-Yp),-85.051129,Vs);return new Ds(l,this.southernCenter?-c:c)}}class Qp extends $p{constructor(t){super(t),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(t,e){return{x:Ls(t),y:Rs(e),z:0}}unproject(t,e){const n=Fs(t),r=Ns(e);return new Ds(n,r)}}const tf=_(Vs);class ef extends $p{project(t,e){const n=(e=_(e))*e,r=n*n;return{x:.5*((t=_(t))*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791))/Math.PI+.5),y:1-.5*(e*(1.007226+n*(.015085+r*(.028874*n-.04447
vendor: 4,222 bytes, line 46
465-.005916*r)))/Math.PI+1),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI;let n=e=(2*(1-e)-1)*Math.PI,r=25,i=0,o=n*n;do{o=n*n;const t=o*o;i=(n*(1.007226+o*(.015085+t*(.028874*o-.044475-.005916*t)))-e)/(1.007226+o*(.045255+t*(.259866*o-.311325-.005916*11*t))),n=T(n-i,-tf,tf)}while(Math.abs(i)>1e-6&&--r>0);o=n*n;const a=T(v(t/(.8707+o*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979))),-180,180),s=v(n);return new Ds(a,s)}}const nf=_(Vs);class rf extends $p{project(t,e){e=_(e),t=_(t);const n=Math.cos(e),r=2/Math.PI,i=Math.acos(n*Math.cos(t/2)),o=Math.sin(i)/i,a=.5*(t*r+2*n*Math.sin(t/2)/o)||0,s=.5*(e+Math.sin(e)/o)||0;return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+1),z:0}}unproject(t,e){let n=t=(2*t-.5)*Math.PI,r=e=(2*(1-e)-1)*Math.PI,i=25;const o=1e-6;let a=0,s=0;do{const i=Math.cos(r),o=Math.sin(r),l=2*o*i,c=o*o,u=i*i,h=Math.cos(n/2),d=Math.sin(n/2),p=2*h*d,f=d*d,m=1-u*h*h,g=m?1/m:0,y=m?Math.acos(i*h)*Math.sqrt(1/m):0,_=.5*(2*y*i*d+2*n/Math.PI)-t,v=.5*(y*o+r)-e,b=.5*g*(u*f+y*i*h*c)+1/Math.PI,x=g*(p*l/4-y*o*d),w=.125*g*(l*d-y*o*u*p),S=.5*g*(c*h+y*f*i)+.5,E=x*w-S*b;a=(v*x-_*S)/E,s=(_*w-v*b)/E,n=T(n-a,-Math.PI,Math.PI),r=T(r-s,-nf,nf)}while((Math.abs(a)>o||Math.abs(s)>o)&&--i>0);return new Ds(v(n),v(r))}}class of extends $p{constructor(t){super(t),this.center=t.center||[0,0],this.parallels=t.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(_(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(t,e){const{scale:n,cosPhi:r}=this;return{x:_(t)*r*n+.5,y:-Math.sin(_(e))/r*n+.5,z:0}}unproject(t,e){const{scale:n,cosPhi:r}=this,i=-(e-.5)/n,o=T(v((t-.5)/n)/r,-180,180),a=Math.asin(T(i*r,-1,1)),s=T(v(a),-85.051129,Vs);return new Ds(o,s)}}class af extends Qp{constructor(t){super(t),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug","custom"],this.range=[3,5]}projectTilePoint(t,e,n){const r=Op(t,e,n);return Xl(r,r,Ap(_p(n))),{x:r[0],y:r[1],z:r[2]}}locationPoint(t,e){const n=Cp(e.lat,e.lng),r=ql([],n),i=t.elevation?t.elevation.getAtPointOrZero(t.locationCoordinate(e),t._centerAltitude):t._centerAltitude;Hl(n,n,r,js(1,0)*As*i);const o=El(new Float64Array(16));return Ol(o,t.pixelMatrix,t.globeMatrix),Xl(n,n,o),new f(n[0],n[1])}pixelsPerMeter(t,e){return js(1,0)*e}pixelSpaceConversion(t,e,n){const r=js(1,t)*e,i=On(js(1,45)*e,r,n);return this.pixelsPerMeter(t,e)/i}createTileMatrix(t,e,n){const r=Ip(_p(n.canonical));return Ol(new Float64Array(16),t.globeMatrix,r)}createInversionMatrix(t,e){const{center:n}=t,r=Ap(_p(e));return Il(r,r,_(n.lng)),Al(r,r,_(n.lat)),kl(r,r,[t._pixelsPerMercatorPixel,t._pixelsPerMercatorPixel,1]),Float32Array.from(r)}pointCoordinate(t,e,n,r){return mp(t,e,n,!0)||new Gs(0,0)}pointCoordinate3D(t,e,n){const r=this.pointCoordinate(t,e,n,0);return[r.x,r.y,r.z]}isPointAboveHorizon(t,e){return!mp(t,e.x,e.y,!1)}farthestPixelDistance(t){const e=function(t,e){const n=t.cameraToCenterDistance,r=t._centerAltitude*e,i=t._camera,o=t._camera.forward(),a=Fl([],Gl([],o,-n),[0,0,r]),s=t.worldSize/(2*Math.PI),l=[0,0,-s],c=t.width/t.height,u=Math.tan(t.fovAboveCenter),h=Gl([],i.up(),u),d=Gl([],i.right(),u*c),p=ql([],Fl([],Fl([],o,h),d)),f=[];let m;if(new cc(a,p).closestPointOnSphere(l,s,f)){const e=Fl([],f,l),n=Jl([],e,a);m=Math.cos(t.fovAboveCenter)*Rl(n)}else{const t=Jl([],a,l),e=Jl([],l,a);ql(e,e);const n=Rl(t)-s;m=Math.sqrt(n*(n+2*s));const r=Math.acos(m/(s+n))-Math.acos(Wl(o,e));m*=Math.cos(r)}return 1.01*m}(t,this.pixelsPerMeter(t.center.lat,t.worldSize)),n=Dp(t.zoom);if(n>0){const r=jp(t,js(1,t.center.lat)*t.worldSize),i=t.worldSize/(2*Math.PI),o=Math.max(t.width,t.height)/t.worldSize*Math.PI;return On(e,r+i*(1-Math.cos(o)),Math.pow(n,10))}return e}upVector(t,e,n){return Op(e,n,t,1)}upVectorScale(t){return{metersToTile:cp*Pp(_p(t))}}}function sf(t){const e=t.parallels,n=!!e&&Math.abs(e[0]+e[1])<.01;switch(t.name){case"mercator":return new Qp(t);case"equirectangular":return new Xp(t);case"naturalEarth":return new ef(t);case"equalEarth":return new Zp(t);case"winkelTripel":return new rf(t);case"albers":return n?new of(t):new Vp(t);case"lambertConformalConic":return n?new of(t):new Jp(t);case"globe":return new af(t)}
vendor: 144,872 bytes, line 46
46throw new Error(`Invalid projection name: ${t.name}`)}const lf=Au.types,cf=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function uf(t,e,n,r,i,o,a,s,l,c,u,h,d){const p=s?Math.min(Jd,Math.round(s[0])):0,f=s?Math.min(Jd,Math.round(s[1])):0;t.emplaceBack(e,n,Math.round(32*r),Math.round(32*i),o,a,(p<<1)+(l?1:0),f,16*c,16*u,256*h,256*d)}function hf(t,e,n,r,i,o,a){t.emplaceBack(e,n,r,i,o,a)}function df(t,e,n,r,i){t.emplaceBack(e,n,r,i),t.emplaceBack(e,n,r,i),t.emplaceBack(e,n,r,i),t.emplaceBack(e,n,r,i)}function pf(t){for(const e of t.sections)if(Oo(e.text))return!0;return!1}class ff{constructor(t){this.layoutVertexArray=new ma,this.indexArray=new Sa,this.programConfigurations=t,this.segments=new ks,this.dynamicLayoutVertexArray=new ha,this.opacityVertexArray=new ya,this.placedSymbolArray=new Ra,this.globeExtVertexArray=new ga}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(t,e,n,r){this.isEmpty()||(n&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,fh.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,gh.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,cf,!0),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,mh.members,!0)),this.opacityVertexBuffer.itemSize=1),(n||r)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}Ni(ff,"SymbolBuffers");class mf{constructor(t,e,n){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new n,this.segments=new ks,this.collisionVertexArray=new xa,this.collisionVertexArrayExt=new wa}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,yh.members,!0),this.collisionVertexBufferExt=t.createVertexBuffer(this.collisionVertexArrayExt,_h.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Ni(mf,"CollisionBuffers");class gf{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(t=>t.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=El([]),this.placementViewportMatrix=El([]);const e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Sh(this.zoom,e["text-size"]),this.iconSizeData=Sh(this.zoom,e["icon-size"]);const n=this.layers[0].layout,r=n.get("symbol-sort-key"),i=n.get("symbol-z-order");this.canOverlap=n.get("text-allow-overlap")||n.get("icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==i&&void 0!==r.constantOr(1),this.sortFeaturesByY=("viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=n.get("text-writing-mode").map(t=>od[t]),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id),this.sourceID=t.sourceID,this.projection=t.projection}createArrays(){this.text=new ff(new vs(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new ff(new vs(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new Na,this.lineVertexArray=new $a,this.symbolInstances=new Fa}calculateGlyphDependencies(t,e,n,r,i){for(let o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,r&&i){const n=Ph[t.charAt(o)];n&&(e[n.charCodeAt(0)]=!0)}}populate(t,e,n,r){const i=this.layers[0],o=i.layout,a="globe"===this.projection.name,s=o.get("text-font"),l=o.get("text-field"),c=o.get("icon-image"),u=("constant"!==l.value.kind||l.value.value instanceof ke&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!u&&!h)return;const p=e.iconDependencies,f=e.glyphDependencies,m=e.availableImages,g=new No(this.zoom);for(const{feature:y,id:_,index:v,sourceLayerIndex:b}of t){const t=i._featureFilter.needGeometry,e=Qs(y,t);if(!i._featureFilter.filter(g,e,n))continue;if(t||(e.geometry=Js(y,n,r)),a&&1!==y.type&&n.z<=5){const t=e.geometry,r=.98078528056,i=(t,e)=>Wl(Op(t.x,t.y,n,1),Op(e.x,e.y,n,1))<r;for(let e=0;e<t.length;e++)t[e]=Zs(t[e],i)}let l,c;if(u){const t=i.getValueAndResolveTokens("text-field",e,n,m),r=ke.factory(t);pf(r)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===Ro()||this.hasRTLText&&Fo.isParsed())&&(l=Oh(r,i,e))}if(h){const t=i.getValueAndResolveTokens("icon-image",e,n,m);c=t instanceof Ae?t:Ae.fromString(t)}if(!l&&!c)continue;const x=this.sortFeaturesByKey?d.evaluate(e,{},n):void 0;if(this.features.push({id:_,text:l,icon:c,index:v,sourceLayerIndex:b,geometry:e.geometry,properties:y.properties,type:lf[y.type],sortKey:x}),c&&(p[c.name]=!0),l){const t=s.evaluate(e,{},n).join(","),r="map"===o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(od.vertical)>=0;for(const e of l.sections)if(e.image)p[e.image.name]=!0;else{const n=bo(l.toString()),i=e.fontStack||t,o=f[i]=f[i]||{};this.calculateGlyphDependencies(e.text,o,r,this.allowVerticalPlacement,n)}}}"line"===o.get("symbol-placement")&&(this.features=function(t){const e={},n={},r=[];let i=0;function o(e){r.push(t[e]),i++}function a(t,e,i){const o=n[t];return delete n[t],n[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(t,n,i){const o=e[n];return delete e[n],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function l(t,e,n){const r=n?e[0][e[0].length-1]:e[0][0];return`${t}:${r.x}:${r.y}`}for(let c=0;c<t.length;c++){const u=t[c],h=u.geometry,d=u.text?u.text.toString():null;if(!d){o(c);continue}const p=l(d,h),f=l(d,h,!0);if(p in n&&f in e&&n[p]!==e[f]){const t=s(p,f,h),i=a(p,f,r[t].geometry);delete e[p],delete n[f],n[l(d,r[i].geometry,!0)]=i,r[t].geometry=null}else p in n?a(p,f,h):f in e?s(p,f,h):(o(c),e[p]=i-1,n[f]=i-1)}return r.filter(t=>t.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((t,e)=>t.sortKey-e.sortKey)}update(t,e,n,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,n,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,n,r))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=sf(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const n=this.lineVertexArray.length,r=t.segment;if(void 0!==r){let n=t.dist(e[r+1]),i=t.dist(e[r]);const o={};for(let t=r+1;t<e.length;t++)o[t]={x:e[t].x,y:e[t].y,tileUnitDistanceFromAnchor:n},t<e.length-1&&(n+=e[t+1].dist(e[t]));for(let t=r||0;t>=0;t--)o[t]={x:e[t].x,y:e[t].y,tileUnitDistanceFromAnchor:i},t>0&&(i+=e[t-1].dist(e[t]));for(let t=0;t<e.length;t++){const e=o[t];this.lineVertexArray.emplaceBack(e.x,e.y,e.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}addSymbols(t,e,n,r,i,o,a,s,l,c,u,h,d,p){const f=t.indexArray,m=t.layoutVertexArray,g=t.globeExtVertexArray,y=t.segments.prepareSegment(4*e.length,m,f,this.canOverlap?o.sortKey:void 0),_=this.glyphOffsetArray.length,v=y.vertexLength,b=this.allowVerticalPlacement&&a===od.vertical?Math.PI/2:0,x=o.text&&o.text.sections;for(let S=0;S<e.length;S++){const{tl:r,tr:i,bl:a,br:c,tex:u,pixelOffsetTL:h,pixelOffsetBR:_,minFontScaleX:v,minFontScaleY:w,glyphOffset:T,isSDF:E,sectionIndex:C}=e[S],O=y.vertexLength,P=T[1];if(uf(m,l.x,l.y,r.x,P+r.y,u.x,u.y,n,E,h.x,h.y,v,w),uf(m,l.x,l.y,i.x,P+i.y,u.x+u.w,u.y,n,E,_.x,h.y,v,w),uf(m,l.x,l.y,a.x,P+a.y,u.x,u.y+u.h,n,E,h.x,_.y,v,w),uf(m,l.x,l.y,c.x,P+c.y,u.x+u.w,u.y+u.h,n,E,_.x,_.y,v,w),s){const e=s.anchor,n=s.up;hf(g,e.x,e.y,e.z,n[0],n[1],n[2]),hf(g,e.x,e.y,e.z,n[0],n[1],n[2]),hf(g,e.x,e.y,e.z,n[0],n[1],n[2]),hf(g,e.x,e.y,e.z,n[0],n[1],n[2]),df(t.dynamicLayoutVertexArray,e.x,e.y,e.z,b)}else df(t.dynamicLayoutVertexArray,l.x,l.y,l.z,b);f.emplaceBack(O,O+1,O+2),f.emplaceBack(O+1,O+2,O+3),y.vertexLength+=4,y.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(T[0]),S!==e.length-1&&C===e[S+1].sectionIndex||t.programConfigurations.populatePaintArrays(m.length,o,o.index,{},d,p,x&&x[C])}const w=s?s.anchor:l;t.placedSymbolArray.emplaceBack(w.x,w.y,w.z,l.x,l.y,_,this.glyphOffsetArray.length-_,v,c,u,l.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,0,!1,0,h,0)}_commitLayoutVertex(t,e,n,r,i,o,a){t.emplaceBack(e,n,r,i,o,Math.round(a.x),Math.round(a.y))}_addCollisionDebugVertices(t,e,n,r,i,o,a){const s=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),l=s.vertexLength,c=a.tileAnchorX,u=a.tileAnchorY;for(let d=0;d<4;d++)n.collisionVertexArray.emplaceBack(0,0,0,0);n.collisionVertexArrayExt.emplaceBack(e,-t.padding,-t.padding),n.collisionVertexArrayExt.emplaceBack(e,t.padding,-t.padding),n.collisionVertexArrayExt.emplaceBack(e,t.padding,t.padding),n.collisionVertexArrayExt.emplaceBack(e,-t.padding,t.padding),this._commitLayoutVertex(n.layoutVertexArray,r,i,o,c,u,new f(t.x1,t.y1)),this._commitLayoutVertex(n.layoutVertexArray,r,i,o,c,u,new f(t.x2,t.y1)),this._commitLayoutVertex(n.layoutVertexArray,r,i,o,c,u,new f(t.x2,t.y2)),this._commitLayoutVertex(n.layoutVertexArray,r,i,o,c,u,new f(t.x1,t.y2)),s.vertexLength+=4;const h=n.indexArray;h.emplaceBack(l,l+1),h.emplaceBack(l+1,l+2),h.emplaceBack(l+2,l+3),h.emplaceBack(l+3,l),s.primitiveLength+=4}_addTextDebugCollisionBoxes(t,e,n,r,i,o){for(let a=r;a<i;a++){const r=n.get(a),i=this.getSymbolInstanceTextSize(t,o,e,a);this._addCollisionDebugVertices(r,i,this.textCollisionBox,r.projectedAnchorX,r.projectedAnchorY,r.projectedAnchorZ,o)}}_addIconDebugCollisionBoxes(t,e,n,r,i,o){for(let a=r;a<i;a++){const r=n.get(a),i=this.getSymbolInstanceIconSize(t,e,o.placedIconSymbolIndex);this._addCollisionDebugVertices(r,i,this.iconCollisionBox,r.projectedAnchorX,r.projectedAnchorY,r.projectedAnchorZ,o)}}generateCollisionDebugBuffers(t,e){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new mf(va,vh.members,ka),this.iconCollisionBox=new mf(va,vh.members,ka);const n=Eh(this.iconSizeData,t),r=Eh(this.textSizeData,t);for(let i=0;i<this.symbolInstances.length;i++){const o=this.symbolInstances.get(i);this._addTextDebugCollisionBoxes(r,t,e,o.textBoxStartIndex,o.textBoxEndIndex,o),this._addTextDebugCollisionBoxes(r,t,e,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o),this._addIconDebugCollisionBoxes(n,t,e,o.iconBoxStartIndex,o.iconBoxEndIndex,o),this._addIconDebugCollisionBoxes(n,t,e,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex,o)}}getSymbolInstanceTextSize(t,e,n,r){const i=this.text.placedSymbolArray.get(e.rightJustifiedTextSymbolIndex>=0?e.rightJustifiedTextSymbolIndex:e.centerJustifiedTextSymbolIndex>=0?e.centerJustifiedTextSymbolIndex:e.leftJustifiedTextSymbolIndex>=0?e.leftJustifiedTextSymbolIndex:e.verticalPlacedTextSymbolIndex>=0?e.verticalPlacedTextSymbolIndex:r),o=Th(this.textSizeData,t,i)/xh;return this.tilePixelRatio*o}getSymbolInstanceIconSize(t,e,n){const r=this.icon.placedSymbolArray.get(n),i=Th(this.iconSizeData,t,r);return this.tilePixelRatio*i}_commitDebugCollisionVertexUpdate(t,e,n){t.emplaceBack(e,-n,-n),t.emplaceBack(e,n,-n),t.emplaceBack(e,n,n),t.emplaceBack(e,-n,n)}_updateTextDebugCollisionBoxes(t,e,n,r,i,o){for(let a=r;a<i;a++){const r=n.get(a),i=this.getSymbolInstanceTextSize(t,o,e,a);this._commitDebugCollisionVertexUpdate(this.textCollisionBox.collisionVertexArrayExt,i,r.padding)}}_updateIconDebugCollisionBoxes(t,e,n,r,i,o){for(let a=r;a<i;a++){const r=n.get(a),i=this.getSymbolInstanceIconSize(t,e,o);this._commitDebugCollisionVertexUpdate(this.iconCollisionBox.collisionVertexArrayExt,i,r.padding)}}updateCollisionDebugBuffers(t,e){if(!this.hasDebugData())return;this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexArrayExt.clear(),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexArrayExt.clear();const n=Eh(this.iconSizeData,t),r=Eh(this.textSizeData,t);for(let i=0;i<this.symbolInstances.length;i++){const o=this.symbolInstances.get(i);this._updateTextDebugCollisionBoxes(r,t,e,o.textBoxStartIndex,o.textBoxEndIndex,o),this._updateTextDebugCollisionBoxes(r,t,e,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o),this._updateIconDebugCollisionBoxes(n,t,e,o.iconBoxStartIndex,o.iconBoxEndIndex,o.placedIconSymbolIndex),this._updateIconDebugCollisionBoxes(n,t,e,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex,o.placedIconSymbolIndex)}this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexBufferExt&&this.textCollisionBox.collisionVertexBufferExt.updateData(this.textCollisionBox.collisionVertexArrayExt),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexBufferExt&&this.iconCollisionBox.collisionVertexBufferExt.updateData(this.iconCollisionBox.collisionVertexArrayExt)}_deserializeCollisionBoxesForSymbol(t,e,n,r,i,o,a,s,l){const c={};for(let u=e;u<n;u++){const e=t.get(u);c.textBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,padding:e.padding,projectedAnchorX:e.projectedAnchorX,projectedAnchorY:e.projectedAnchorY,projectedAnchorZ:e.projectedAnchorZ,tileAnchorX:e.tileAnchorX,tileAnchorY:e.tileAnchorY},c.textFeatureIndex=e.featureIndex;break}for(let u=r;u<i;u++){const e=t.get(u);c.verticalTextBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,padding:e.padding,projectedAnchorX:e.projectedAnchorX,projectedAnchorY:e.projectedAnchorY,projectedAnchorZ:e.projectedAnchorZ,tileAnchorX:e.tileAnchorX,tileAnchorY:e.tileAnchorY},c.verticalTextFeatureIndex=e.featureIndex;break}for(let u=o;u<a;u++){const e=t.get(u);c.iconBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,padding:e.padding,projectedAnchorX:e.projectedAnchorX,projectedAnchorY:e.projectedAnchorY,projectedAnchorZ:e.projectedAnchorZ,tileAnchorX:e.tileAnchorX,tileAnchorY:e.tileAnchorY},c.iconFeatureIndex=e.featureIndex;break}for(let u=s;u<l;u++){const e=t.get(u);c.verticalIconBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,padding:e.padding,projectedAnchorX:e.projectedAnchorX,projectedAnchorY:e.projectedAnchorY,projectedAnchorZ:e.projectedAnchorZ,tileAnchorX:e.tileAnchorX,tileAnchorY:e.tileAnchorY},c.verticalIconFeatureIndex=e.featureIndex;break}return c}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let e=0;e<this.symbolInstances.length;e++){const n=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,n.textBoxStartIndex,n.textBoxEndIndex,n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n.iconBoxStartIndex,n.iconBoxEndIndex,n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const n=t.placedSymbolArray.get(e),r=n.vertexStartIndex+4*n.numGlyphs;for(let i=n.vertexStartIndex;i<r;i+=4)t.indexArray.emplaceBack(i,i+1,i+2),t.indexArray.emplaceBack(i+1,i+2,i+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const e=Math.sin(t),n=Math.cos(t),r=[],i=[],o=[];for(let a=0;a<this.symbolInstances.length;++a){o.push(a);const t=this.symbolInstances.get(a);r.push(0|Math.round(e*t.tileAnchorX+n*t.tileAnchorY)),i.push(t.featureIndex)}return o.sort((t,e)=>r[t]-r[e]||i[e]-i[t]),o}addToSortKeyRanges(t,e){const n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===e?n.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach((t,e,n)=>{t>=0&&n.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Ni(gf,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),gf.MAX_GLYPHS=65535,gf.addDynamicAttributes=df;const yf=new ta({"symbol-placement":new Xo(Xt.layout_symbol["symbol-placement"]),"symbol-spacing":new Xo(Xt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Xo(Xt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Yo(Xt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Xo(Xt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Xo(Xt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Xo(Xt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Xo(Xt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Xo(Xt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Yo(Xt.layout_symbol["icon-size"]),"icon-text-fit":new Xo(Xt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Xo(Xt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Yo(Xt.layout_symbol["icon-image"]),"icon-rotate":new Yo(Xt.layout_symbol["icon-rotate"]),"icon-padding":new Xo(Xt.layout_symbol["icon-padding"]),"icon-keep-upright":new Xo(Xt.layout_symbol["icon-keep-upright"]),"icon-offset":new Yo(Xt.layout_symbol["icon-offset"]),"icon-anchor":new Yo(Xt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Xo(Xt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Xo(Xt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Xo(Xt.layout_symbol["text-rotation-alignment"]),"text-field":new Yo(Xt.layout_symbol["text-field"]),"text-font":new Yo(Xt.layout_symbol["text-font"]),"text-size":new Yo(Xt.layout_symbol["text-size"]),"text-max-width":new Yo(Xt.layout_symbol["text-max-width"]),"text-line-height":new Yo(Xt.layout_symbol["text-line-height"]),"text-letter-spacing":new Yo(Xt.layout_symbol["text-letter-spacing"]),"text-justify":new Yo(Xt.layout_symbol["text-justify"]),"text-radial-offset":new Yo(Xt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Xo(Xt.layout_symbol["text-variable-anchor"]),"text-anchor":new Yo(Xt.layout_symbol["text-anchor"]),"text-max-angle":new Xo(Xt.layout_symbol["text-max-angle"]),"text-writing-mode":new Xo(Xt.layout_symbol["text-writing-mode"]),"text-rotate":new Yo(Xt.layout_symbol["text-rotate"]),"text-padding":new Xo(Xt.layout_symbol["text-padding"]),"text-keep-upright":new Xo(Xt.layout_symbol["text-keep-upright"]),"text-transform":new Yo(Xt.layout_symbol["text-transform"]),"text-offset":new Yo(Xt.layout_symbol["text-offset"]),"text-allow-overlap":new Xo(Xt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Xo(Xt.layout_symbol["text-ignore-placement"]),"text-optional":new Xo(Xt.layout_symbol["text-optional"])});var _f={paint:new ta({"icon-opacity":new Yo(Xt.paint_symbol["icon-opacity"]),"icon-color":new Yo(Xt.paint_symbol["icon-color"]),"icon-halo-color":new Yo(Xt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Yo(Xt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Yo(Xt.paint_symbol["icon-halo-blur"]),"icon-translate":new Xo(Xt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Xo(Xt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Yo(Xt.paint_symbol["text-opacity"]),"text-color":new Yo(Xt.paint_symbol["text-color"],{runtimeType:se,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new Yo(Xt.paint_symbol["text-halo-color"]),"text-halo-width":new Yo(Xt.paint_symbol["text-halo-width"]),"text-halo-blur":new Yo(Xt.paint_symbol["text-halo-blur"]),"text-translate":new Xo(Xt.paint_symbol["text-translate"]),"text-translate-anchor":new Xo(Xt.paint_symbol["text-translate-anchor"])}),layout:yf};class vf{constructor(t){this.type=t.property.overrides?t.property.overrides.runtimeType:re,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ni(vf,"FormatSectionOverride",{omit:["defaultValue"]});class bf extends Cs{constructor(t){super(t,_f)}recalculate(t,e){super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"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"));const n=this.layout.get("text-writing-mode");if(n){const t=[];for(const e of n)t.indexOf(e)<0&&t.push(e);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]="point"===this.layout.get("symbol-placement")?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(t,e,n,r){const i=this.layout.get(t).evaluate(e,{},n,r),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||Ur(o.value)||!i?i:function(t,e){return e.replace(/{([^{}]+)}/g,(e,n)=>n in t?String(t[n]):"")}(e.properties,i)}createBucket(t){return new gf(t)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const t of _f.paint.overridableProperties){if(!bf.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),n=new vf(e),r=new Vr(n,e.property.specification);let i=null;i="constant"===e.value.kind||"source"===e.value.kind?new Hr("source",r):new qr("composite",r,e.value.zoomStops,e.value._interpolationType),this.paint._values[t]=new Wo(e.property,i,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,n){return!(!this.layout||e.isDataDriven()||n.isDataDriven())&&bf.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const n=t.get("text-field"),r=_f.paint.properties[e];let i=!1;const o=t=>{for(const e of t)if(r.overrides&&r.overrides.hasOverride(e))return void(i=!0)};if("constant"===n.value.kind&&n.value.value instanceof ke)o(n.value.value.sections);else if("source"===n.value.kind){const t=e=>{i||(e instanceof Le&&De(e.value)===he?o(e.value.sections):e instanceof $e?o(e.sections):e.eachChild(t))},e=n.value;e._styleExpression&&t(e._styleExpression.expression)}return i}getProgramConfiguration(t){return new _s(this,t)}}var xf={paint:new ta({"background-color":new Xo(Xt.paint_background["background-color"]),"background-pattern":new Jo(Xt.paint_background["background-pattern"]),"background-opacity":new Xo(Xt.paint_background["background-opacity"])})},wf={paint:new ta({"raster-opacity":new Xo(Xt.paint_raster["raster-opacity"]),"raster-hue-rotate":new Xo(Xt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Xo(Xt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Xo(Xt.paint_raster["raster-brightness-max"]),"raster-saturation":new Xo(Xt.paint_raster["raster-saturation"]),"raster-contrast":new Xo(Xt.paint_raster["raster-contrast"]),"raster-resampling":new Xo(Xt.paint_raster["raster-resampling"]),"raster-fade-duration":new Xo(Xt.paint_raster["raster-fade-duration"])})};class Sf extends Cs{constructor(t){super(t,{}),this.implementation=t}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)}onRemove(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)}}var Tf={paint:new ta({"sky-type":new Xo(Xt.paint_sky["sky-type"]),"sky-atmosphere-sun":new Xo(Xt.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new Xo(Xt.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new Xo(Xt.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new Xo(Xt.paint_sky["sky-gradient-radius"]),"sky-gradient":new Qo(Xt.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new Xo(Xt.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new Xo(Xt.paint_sky["sky-atmosphere-color"]),"sky-opacity":new Xo(Xt.paint_sky["sky-opacity"])})};function Ef(t,e,n){const r=[0,0,1],i=oc([]);return sc(i,i,n?-_(t)+Math.PI:_(t)),ac(i,i,-_(e)),Yl(r,r,i),ql(r,r)}const Cf={circle:class extends Cs{constructor(t){super(t,bl)}createBucket(t){return new nl(t)}queryRadius(t){const e=t;return ml("circle-radius",this,e)+ml("circle-stroke-width",this,e)+gl(this.paint.get("circle-translate"))}queryIntersectsFeature(t,e,n,r,i,o,a,s){const l=_l(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),c=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n);return pc(t,r,o,a,s,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),l,c)}getProgramIds(){return["circle"]}getProgramConfiguration(t){return new _s(this,t)}},heatmap:class extends Cs{createBucket(t){return new _c(t)}constructor(t){super(t,Tc),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"heatmap-color"===t&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Ec({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(t){return ml("heatmap-radius",this,t)}queryIntersectsFeature(t,e,n,r,i,o,a,s){const l=this.paint.get("heatmap-radius").evaluate(e,n);return pc(t,r,o,a,s,!0,!0,new f(0,0),l)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(t){return new _s(this,t)}},hillshade:class extends Cs{constructor(t){super(t,Cc)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}},fill:class extends Cs{constructor(t){super(t,du)}getProgramIds(){const t=this.paint.get("fill-pattern"),e=t&&t.constantOr(1),n=[e?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&n.push(e&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),n}getProgramConfiguration(t){return new _s(this,t)}recalculate(t,e){super.recalculate(t,e);const n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new uu(t)}queryRadius(){return gl(this.paint.get("fill-translate"))}queryIntersectsFeature(t,e,n,r,i,o){return!t.queryGeometry.isAboveHorizon&&ol(yl(t.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),r)}isTileClipped(){return!0}},"fill-extrusion":class extends Cs{constructor(t){super(t,Wu)}createBucket(t){return new Ru(t)}queryRadius(){return gl(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(t){return new _s(this,t)}queryIntersectsFeature(t,e,n,r,i,o,a,s,l){const c=_l(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),u=this.paint.get("fill-extrusion-height").evaluate(e,n),h=this.paint.get("fill-extrusion-base").evaluate(e,n),d=[0,0],p=s&&o.elevation,m=o.elevation?o.elevation.exaggeration():1,g=t.tile.getBucket(this);if(p&&g instanceof Ru){const t=g.centroidVertexArray,e=l+1;if(e<t.length){const n=t.get(e);d[0]=n.a_centroid_pos0,d[1]=n.a_centroid_pos1}}if(0===d[0]&&1===d[1])return!1;"globe"===o.projection.name&&(r=Hu([r],[new f(0,0),new f(As,As)],t.tileID.canonical).map(t=>t.polygon).flat());const y=p?s:null,[_,v]=function(t,e,n,r,i,o,a,s,l,c,u){return"globe"===t.projection.name?function(t,e,n,r,i,o,a,s,l,c,u){const h=[],d=[],p=t.projection.upVectorScale(u,t.center.lat,t.worldSize).metersToTile,f=[0,0,0,1],m=[0,0,0,1],g=(t,e,n,r)=>{t[0]=e,t[1]=n,t[2]=r,t[3]=1},y=Gu();n>0&&(n+=y),r+=y;for(const _ of e){const e=[],y=[];for(const h of _){const d=h.x+i.x,_=h.y+i.y,v=t.projection.projectTilePoint(d,_,u),b=t.projection.upVector(u,h.x,h.y);let x=n,w=r;if(a){const t=nh(d,_,n,r,a,s,l,c);x+=t.base,w+=t.top}0!==n?g(f,v.x+b[0]*p*x,v.y+b[1]*p*x,v.z+b[2]*p*x):g(f,v.x,v.y,v.z),g(m,v.x+b[0]*p*w,v.y+b[1]*p*w,v.z+b[2]*p*w),Xl(f,f,o),Xl(m,m,o),e.push(new Qu(f[0],f[1],f[2])),y.push(new Qu(m[0],m[1],m[2]))}h.push(e),d.push(y)}return[h,d]}(t,e,n,r,i,o,a,s,l,c,u):a?function(t,e,n,r,i,o,a,s,l){const c=[],u=[],h=[0,0,0,1];for(const d of t){const t=[],p=[];for(const c of d){const u=c.x+r.x,d=c.y+r.y,f=nh(u,d,e,n,o,a,s,l);h[0]=u,h[1]=d,h[2]=f.base,h[3]=1,rc(h,h,i),h[3]=Math.max(h[3],1e-5);const m=new Qu(h[0]/h[3],h[1]/h[3],h[2]/h[3]);h[0]=u,h[1]=d,h[2]=f.top,h[3]=1,rc(h,h,i),h[3]=Math.max(h[3],1e-5);const g=new Qu(h[0]/h[3],h[1]/h[3],h[2]/h[3]);t.push(m),p.push(g)}c.push(t),u.push(p)}return[c,u]}(e,n,r,i,o,a,s,l,c):function(t,e,n,r,i){const o=[],a=[],s=i[8]*e,l=i[9]*e,c=i[10]*e,u=i[11]*e,h=i[8]*n,d=i[9]*n,p=i[10]*n,f=i[11]*n;for(const m of t){const t=[],e=[];for(const n of m){const o=n.x+r.x,a=n.y+r.y,m=i[0]*o+i[4]*a+i[12],g=i[1]*o+i[5]*a+i[13],y=i[2]*o+i[6]*a+i[14],_=i[3]*o+i[7]*a+i[15],v=m+s,b=g+l,x=y+c,w=Math.max(_+u,1e-5),S=m+h,T=g+d,E=y+p,C=Math.max(_+f,1e-5);t.push(new Qu(v/w,b/w,x/w)),e.push(new Qu(S/C,T/C,E/C))}o.push(t),a.push(e)}return[o,a]}(e,n,r,i,o)}(o,r,h,u,c,a,y,d,m,o.center.lat,t.tileID.canonical),b=t.queryGeometry;return function(t,e,n){let r=1/0;ol(n,e)&&(r=eh(n,e[0]));for(let i=0;i<e.length;i++){const o=e[i],a=t[i];for(let t=0;t<o.length-1;t++){const e=o[t],i=[e,o[t+1],a[t+1],a[t],e];rl(n,i)&&(r=Math.min(r,eh(n,i)))}}return r!==1/0&&r}(_,v,b.isPointQuery()?b.screenBounds:b.screenGeometry)}},line:class extends Cs{constructor(t){super(t,hh),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression&&t._styleExpression.expression instanceof Cn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=dh.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new ch(t)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getProgramConfiguration(t){return new _s(this,t)}queryRadius(t){const e=t,n=ph(ml("line-width",this,e),ml("line-gap-width",this,e)),r=ml("line-offset",this,e);return n/2+Math.abs(r)+gl(this.paint.get("line-translate"))}queryIntersectsFeature(t,e,n,r,i,o){if(t.queryGeometry.isAboveHorizon)return!1;const a=yl(t.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),s=t.pixelToTileUnitsFactor/2*ph(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),l=this.paint.get("line-offset").evaluate(e,n);return l&&(r=function(t,e){const n=[],r=new f(0,0);for(let i=0;i<t.length;i++){const o=t[i],a=[];for(let t=0;t<o.length;t++){const n=o[t-1],i=o[t],s=o[t+1],l=0===t?r:i.sub(n)._unit()._perp(),c=t===o.length-1?r:s.sub(i)._unit()._perp(),u=l._add(c)._unit();u._mult(1/(u.x*c.x+u.y*c.y)),a.push(u._mult(e)._add(i))}n.push(a)}return n}(r,l*t.pixelToTileUnitsFactor)),function(t,e,n){for(let r=0;r<e.length;r++){const i=e[r];if(t.length>=3)for(let e=0;e<i.length;e++)if(dl(t,i[e]))return!0;if(al(t,i,n))return!0}return!1}(a,r,s)}isTileClipped(){return!0}},symbol:bf,background:class extends Cs{constructor(t){super(t,xf)}getProgramIds(){return[this.paint.get("background-pattern")?"backgroundPattern":"background"]}},raster:class extends Cs{constructor(t){super(t,wf)}getProgramIds(){return["raster"]}},sky:class extends Cs{constructor(t){super(t,Tf),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"sky-gradient"===t?this._updateColorRamp():"sky-atmosphere-sun"!==t&&"sky-atmosphere-halo-color"!==t&&"sky-atmosphere-color"!==t&&"sky-atmosphere-sun-intensity"!==t||(this._skyboxInvalidated=!0)}_updateColorRamp(){this.colorRamp=Ec({expression:this._transitionablePaint._values["sky-gradient"].value.expression,evaluationKey:"skyRadialProgress"}),this.colorRampTexture&&(this.colorRampTexture.destroy(),this.colorRampTexture=null)}needsSkyboxCapture(t){if(this._skyboxInvalidated||!this.skyboxTexture||!this.skyboxGeometry)return!0;if(!this.paint.get("sky-atmosphere-sun")){const e=t.style.light.properties.get("position");return this._lightPosition.azimuthal!==e.azimuthal||this._lightPosition.polar!==e.polar}return!1}getCenter(t,e){if("atmosphere"===this.paint.get("sky-type")){const n=this.paint.get("sky-atmosphere-sun"),r=!n,i=t.style.light,o=i.properties.get("position");return r&&"viewport"===i.properties.get("anchor")&&$("The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly."),r?Ef(o.azimuthal,90-o.polar,e):Ef(n[0],90-n[1],e)}const n=this.paint.get("sky-gradient-center");return Ef(n[0],90-n[1],e)}is3D(){return!1}isSky(){return!0}markSkyboxValid(t){this._skyboxInvalidated=!1,this._lightPosition=t.style.light.properties.get("position")}hasOffscreenPass(){return!0}getProgramIds(){const t=this.paint.get("sky-type");return"atmosphere"===t?["skyboxCapture","skybox"]:"gradient"===t?["skyboxGradient"]:null}}};class Of{constructor(t,e,n,r){this.context=t,this.format=n,this.texture=t.gl.createTexture(),this.update(e,r)}update(t,n,r){const{width:i,height:o}=t,{context:a}=this,{gl:s}=a,{HTMLImageElement:l,HTMLCanvasElement:c,HTMLVideoElement:u,ImageData:h,ImageBitmap:d}=e;if(s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!n||!1!==n.premultiply)),r||this.size&&this.size[0]===i&&this.size[1]===o){const{x:e,y:n}=r||{x:0,y:0};t instanceof l||t instanceof c||t instanceof u||t instanceof h||d&&t instanceof d?s.texSubImage2D(s.TEXTURE_2D,0,e,n,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,e,n,i,o,s.RGBA,s.UNSIGNED_BYTE,t.data)}else this.size=[i,o],t instanceof l||t instanceof c||t instanceof u||t instanceof h||d&&t instanceof d?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,i,o,0,this.format,s.UNSIGNED_BYTE,t.data);this.useMipmap=Boolean(n&&n.useMipmap&&this.isSizePowerOfTwo()),this.useMipmap&&s.generateMipmap(s.TEXTURE_2D)}bind(t,e){const{context:n}=this,{gl:r}=n;r.bindTexture(r.TEXTURE_2D,this.texture),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.useMipmap?t===r.NEAREST?r.NEAREST_MIPMAP_NEAREST:r.LINEAR_MIPMAP_NEAREST: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)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}class Pf{constructor(t){this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=(()=>{this._triggered=!1,this._callback()}))}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){this._channel=void 0,this._callback=(()=>{})}}class kf{constructor(){this.tasks={},this.taskQueue=[],z(["process"],this),this.invoker=new Pf(this.process),this.nextId=0}add(t,e){const n=this.nextId++,r=function({type:t,isSymbolTile:e,zoom:n}){return n=n||0,"message"===t?0:"maybePrepare"!==t||e?"parseTile"!==t||e?"parseTile"===t&&e?300-n:"maybePrepare"===t&&e?400-n:500:200-n:100-n}(e);if(0===r){G();try{t()}finally{}return{cancel:()=>{}}}return this.tasks[n]={fn:t,metadata:e,priority:r,id:n},this.taskQueue.push(n),this.invoker.trigger(),{cancel:()=>{delete this.tasks[n]}}}process(){G();try{if(this.taskQueue=this.taskQueue.filter(t=>!!this.tasks[t]),!this.taskQueue.length)return;const t=this.pick();if(null===t)return;const e=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),!e)return;e.fn()}finally{}}pick(){let t=null,e=1/0;for(let r=0;r<this.taskQueue.length;r++){const n=this.tasks[this.taskQueue[r]];n.priority<e&&(e=n.priority,t=r)}if(null===t)return null;const n=this.taskQueue[t];return this.taskQueue.splice(t,1),n}remove(){this.invoker.remove()}}class Af{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e<t.length;e++){const n=t[e];this._stringToNumber[n]=e,this._numberToString[e]=n}}encode(t){return this._stringToNumber[t]}decode(t){return this._numberToString[t]}}const If=["tile","layer","source","sourceLayer","state"];class Mf{constructor(t,e,n,r,i){this.type="Feature",this._vectorTileFeature=t,this._z=e,this._x=n,this._y=r,this.properties=t.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._x,this._y,this._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={type:"Feature",geometry:this.geometry,properties:this.properties};void 0!==this.id&&(t.id=this.id);for(const e of If)void 0!==this[e]&&(t[e]=this[e]);return t}}const Df=32,Bf=33,zf=new Uint16Array(8184);for(let wm=0;wm<2046;wm++){let t=wm+2,e=0,n=0,r=0,i=0,o=0,a=0;for(1&t?r=i=o=Df:e=n=a=Df;(t>>=1)>1;){const s=e+r>>1,l=n+i>>1;1&t?(r=e,i=n,e=o,n=a):(e=r,n=i,r=o,i=a),o=s,a=l}const s=4*wm;zf[s+0]=e,zf[s+1]=n,zf[s+2]=r,zf[s+3]=i}const Lf=new Uint16Array(2178),Rf=new Uint8Array(1089),jf=new Uint16Array(1089);function Ff(t){return 0===t?-.03125:32===t?.03125:0}var Nf=oa([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const $f={type:2,extent:As,loadGeometry:()=>[[new f(0,0),new f(8193,0),new f(8193,8193),new f(0,8193),new f(0,0)]]};class Vf{constructor(t,e,n,r,i){this.tileID=t,this.uid=I(),this.uses=0,this.tileSize=e,this.tileZoom=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=i,this.expiredRequestCount=0,this.state="loading",r&&r.transform&&(this.projection=r.transform.projection)}registerFadeDuration(t){const e=t+this.timeAdded;e<Ut.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}get tileTransform(){return this._tileTransform||(this._tileTransform=Fp(this.tileID.canonical,this.projection)),this._tileTransform}loadVectorData(t,e,n){if(this.unloadVectorData(),this.state="loaded",t){t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){const n={};if(!e)return n;for(const r of t){const t=r.layerIds.map(t=>e.getLayer(t)).filter(Boolean);if(0!==t.length){r.layers=t,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map(e=>t.filter(t=>t.id===e)[0]));for(const e of t)n[e.id]=r}}return n}(t.buckets,e.style),this.hasSymbolBuckets=!1;for(const t in this.buckets){const e=this.buckets[t];if(e instanceof gf){if(this.hasSymbolBuckets=!0,!n)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const t in this.buckets){const e=this.buckets[t];if(e instanceof gf&&e.hasRTLText){this.hasRTLText=!0,Fo.isLoading()||Fo.isLoaded()||"deferred"!==Ro()||jo();break}}this.queryPadding=0;for(const t in this.buckets){const n=this.buckets[t];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(t).queryRadius(n))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage),t.lineAtlas&&(this.lineAtlas=t.lineAtlas)}else this.collisionBoxArray=new za}unloadVectorData(){if(this.hasData()){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(t){return this.buckets[t.id]}upload(t){for(const n in this.buckets){const e=this.buckets[n];e.uploadPending()&&e.upload(t)}const e=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Of(t,this.imageAtlas.image,e.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Of(t,this.glyphAtlasImage,e.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new Of(t,this.lineAtlas.image,e.ALPHA),this.lineAtlas.uploaded=!0)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,e,n,r,i,o,a,s){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:r,pixelPosMatrix:a,transform:o,params:i,tileTransform:this.tileTransform},t,e,n):{}}querySourceFeatures(t,e){const n=this.latestFeatureIndex;if(!n||!n.rawTileData)return;const r=n.loadVTLayers(),i=e?e.sourceLayer:"",o=r._geojsonTileLayer||r[i];if(!o)return;const a=oi(e&&e.filter),{z:s,x:l,y:c}=this.tileID.canonical,u={z:s,x:l,y:c};for(let h=0;h<o.length;h++){const e=o.feature(h);if(a.needGeometry){const t=Qs(e,!0);if(!a.filter(new No(this.tileID.overscaledZ),t,this.tileID.canonical))continue}else if(!a.filter(new No(this.tileID.overscaledZ),e))continue;const r=n.getId(e,i),d=new Mf(e,s,l,c,r);d.tile=u,t.push(d)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return!!this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(t){const e=this.expirationTime;if(t.cacheControl){const e=H(t.cacheControl);e["max-age"]&&(this.expirationTime=Date.now()+1e3*e["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){const t=Date.now();let n=!1;if(this.expirationTime>t)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{const r=this.expirationTime-e;r?this.expirationTime=t+Math.max(r,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){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)}setFeatureState(t,e){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(t).length||!e)return;const n=this.latestFeatureIndex.loadVTLayers(),r=e.style.listImages();for(const i in this.buckets){if(!e.style.hasLayer(i))continue;const o=this.buckets[i],a=o.layers[0].sourceLayer||"_geojsonTileLayer",s=n[a],l=t[a];if(!s||!l||0===Object.keys(l).length)continue;if(o.update(l,s,r,this.imageAtlas&&this.imageAtlas.patternPositions||{}),o instanceof ch||o instanceof uu){const t=e.style._getSourceCache(o.layers[0].source);e._terrain&&e._terrain.enabled&&t&&o.programConfigurations.needsUpload&&e._terrain._clearRenderCacheForTile(t.id,this.tileID)}const c=e&&e.style&&e.style.getLayer(i);c&&(this.queryPadding=Math.max(this.queryPadding,c.queryRadius(o)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Ut.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(t){this.symbolFadeHoldUntil=Ut.now()+t}setTexture(t,e){const n=e.context,r=n.gl;this.texture=this.texture||e.getTileTexture(t.width),this.texture?this.texture.update(t,{useMipmap:!0}):(this.texture=new Of(n,t,r.RGBA,{useMipmap:!0}),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),n.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,n.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,n.extTextureFilterAnisotropicMax))}setDependencies(t,e){const n={};for(const r of e)n[r]=!0;this.dependencies[t]=n}hasDependency(t,e){for(const n of t){const t=this.dependencies[n];if(t)for(const n of e)if(t[n])return!0}return!1}clearQueryDebugViz(){}_makeDebugTileBoundsBuffers(t,e){if(!e||"mercator"===e.name||this._tileDebugBuffer)return;const n=Js($f,this.tileID.canonical,this.tileTransform)[0],r=new sa,i=new Aa;for(let o=0;o<n.length;o++){const{x:t,y:e}=n[o];r.emplaceBack(t,e),i.emplaceBack(o)}i.emplaceBack(0),this._tileDebugIndexBuffer=t.createIndexBuffer(i),this._tileDebugBuffer=t.createVertexBuffer(r,sp.members),this._tileDebugSegments=ks.simpleSegment(0,0,r.length,i.length)}_makeTileBoundsBuffers(t,e){if(this._tileBoundsBuffer||!e||"mercator"===e.name)return;const n=Js($f,this.tileID.canonical,this.tileTransform)[0];let r,i;if(this.isRaster){const t=function(t,e){const n=Fp(t,e),r=Math.pow(2,t.z);for(let c=0;c<Bf;c++)for(let i=0;i<Bf;i++){const o=Fs((t.x+(i+Ff(i))/Df)/r),a=Ns((t.y+(c+Ff(c))/Df)/r),s=e.project(o,a),l=c*Bf+i;Lf[2*l+0]=Math.round((s.x*n.scale-n.x)*As),Lf[2*l+1]=Math.round((s.y*n.scale-n.y)*As)}Rf.fill(0),jf.fill(0);for(let c=2045;c>=0;c--){const t=4*c,e=zf[t+0],n=zf[t+1],r=zf[t+2],i=zf[t+3],o=e+r>>1,a=n+i>>1,s=o+a-n,l=a+e-o,u=n*Bf+e,h=i*Bf+r,d=a*Bf+o,p=Math.hypot((Lf[2*u+0]+Lf[2*h+0])/2-Lf[2*d+0],(Lf[2*u+1]+Lf[2*h+1])/2-Lf[2*d+1])>=16;if(Rf[d]=Rf[d]||(p?1:0),c<1022){const t=(n+l>>1)*Bf+(e+s>>1),o=(i+l>>1)*Bf+(r+s>>1);Rf[d]=Rf[d]||Rf[t]||Rf[o]}}const i=new ca,o=new Sa;let a=0;function s(t,e){const n=e*Bf+t;return 0===jf[n]&&(i.emplaceBack(Lf[2*n+0],Lf[2*n+1],t*As/Df,e*As/Df),jf[n]=++a),jf[n]-1}function l(t,e,n,r,i,a){const c=t+n>>1,u=e+r>>1;if(Math.abs(t-i)+Math.abs(e-a)>1&&Rf[u*Bf+c])l(i,a,t,e,c,u),l(n,r,i,a,c,u);else{const l=s(t,e),c=s(n,r),u=s(i,a);o.emplaceBack(l,c,u)}}return l(0,0,Df,Df,Df,0),l(Df,Df,0,0,0,Df),{vertices:i,indices:o}}(this.tileID.canonical,e);r=t.vertices,i=t.indices}else{r=new ca,i=new Sa;for(const{x:e,y:i}of n)r.emplaceBack(e,i,0,0);const t=kc.exports(r.int16,void 0,4);for(let e=0;e<t.length;e+=3)i.emplaceBack(t[e],t[e+1],t[e+2])}this._tileBoundsBuffer=t.createVertexBuffer(r,Nf.members),this._tileBoundsIndexBuffer=t.createIndexBuffer(i),this._tileBoundsSegments=ks.simpleSegment(0,0,r.length,i.length)}_makeGlobeTileDebugBuffers(t,e){const n=e.projection;if(!n||"globe"!==n.name||e.freezeTileCoverage)return;const r=this.tileID.canonical,i=Ap(bp(r,e)),o=Dp(e.zoom);let a;o>0&&(a=Cl(new Float64Array(16),e.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(t,r,e,i,a,o),this._makeGlobeTileDebugTextBuffer(t,r,e,i,a,o)}_globePoint(t,e,n,r,i,o,a){let s=Op(t,e,n);if(o){const i=1<<n.z,l=Ls(r.center.lng),c=Rs(r.center.lat),u=(n.x+.5)/i-l;let h=0;u>.5?h=-1:u<-.5&&(h=1);let d=(t/As+n.x)/i+h,p=(e/As+n.y)/i;d=(d-l)*r._pixelsPerMercatorPixel+l,p=(p-c)*r._pixelsPerMercatorPixel+c;const f=[d*r.worldSize,p*r.worldSize,0];Xl(f,f,o),s=vp(s,f,a)}return Xl(s,s,i)}_makeGlobeTileDebugBorderBuffer(t,e,n,r,i,o){const a=new sa,s=new Aa,l=new la,c=(t,c,u,h,d)=>{const p=(u-t)/(d-1),f=(h-c)/(d-1),m=a.length;for(let g=0;g<d;g++){const u=t+g*p,h=c+g*f;a.emplaceBack(u,h);const d=this._globePoint(u,h,e,n,r,i,o);l.emplaceBack(d[0],d[1],d[2]),s.emplaceBack(m+g)}},u=As;c(0,0,u,0,16),c(u,0,u,u,16),c(u,u,0,u,16),c(0,u,0,0,16),this._tileDebugIndexBuffer=t.createIndexBuffer(s),this._tileDebugBuffer=t.createVertexBuffer(a,sp.members),this._globeTileDebugBorderBuffer=t.createVertexBuffer(l,ap.members),this._tileDebugSegments=ks.simpleSegment(0,0,a.length,s.length)}_makeGlobeTileDebugTextBuffer(t,e,n,r,i,o){const a=new sa,s=new Sa,l=new la,c=25;s.reserve(32),a.reserve(c),l.reserve(c);const u=(t,e)=>c*t+e;for(let h=0;h<c;h++){const t=2048*h;for(let s=0;s<c;s++){const c=2048*s;a.emplaceBack(c,t);const u=this._globePoint(c,t,e,n,r,i,o);l.emplaceBack(u[0],u[1],u[2])}}for(let h=0;h<4;h++)for(let t=0;t<4;t++){const e=u(h,t),n=u(h,t+1),r=u(h+1,t),i=u(h+1,t+1);s.emplaceBack(e,n,r),s.emplaceBack(r,n,i)}this._tileDebugTextIndexBuffer=t.createIndexBuffer(s),this._tileDebugTextBuffer=t.createVertexBuffer(a,sp.members),this._globeTileDebugTextBuffer=t.createVertexBuffer(l,ap.members),this._tileDebugTextSegments=ks.simpleSegment(0,0,c,32)}}class Uf{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,e,n){const r=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][r]=this.stateChanges[t][r]||{},k(this.stateChanges[t][r],n),null===this.deletedStates[t]){this.deletedStates[t]={};for(const e in this.state[t])e!==r&&(this.deletedStates[t][e]=null)}else if(this.deletedStates[t]&&null===this.deletedStates[t][r]){this.deletedStates[t][r]={};for(const e in this.state[t][r])n[e]||(this.deletedStates[t][r][e]=null)}else for(const i in n)this.deletedStates[t]&&this.deletedStates[t][r]&&null===this.deletedStates[t][r][i]&&delete this.deletedStates[t][r][i]}removeFeatureState(t,e,n){if(null===this.deletedStates[t])return;const r=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},n&&void 0!==e)null!==this.deletedStates[t][r]&&(this.deletedStates[t][r]=this.deletedStates[t][r]||{},this.deletedStates[t][r][n]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][r])for(n in this.deletedStates[t][r]={},this.stateChanges[t][r])this.deletedStates[t][r][n]=null;else this.deletedStates[t][r]=null;else this.deletedStates[t]=null}getState(t,e){const n=String(e),r=k({},(this.state[t]||{})[n],(this.stateChanges[t]||{})[n]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){const n=this.deletedStates[t][e];if(null===n)return{};for(const t in n)delete r[t]}return r}initializeTileState(t,e){t.setFeatureState(this.state,e)}coalesceChanges(t,e){const n={};for(const r in this.stateChanges){this.state[r]=this.state[r]||{};const t={};for(const e in this.stateChanges[r])this.state[r][e]||(this.state[r][e]={}),k(this.state[r][e],this.stateChanges[r][e]),t[e]=this.state[r][e];n[r]=t}for(const r in this.deletedStates){this.state[r]=this.state[r]||{};const t={};if(null===this.deletedStates[r])for(const e in this.state[r])t[e]={},this.state[r][e]={};else for(const e in this.deletedStates[r]){if(null===this.deletedStates[r][e])this.state[r][e]={};else for(const t of Object.keys(this.deletedStates[r][e]))delete this.state[r][e][t];t[e]=this.state[r][e]}n[r]=n[r]||{},k(n[r],t)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(const r in t)t[r].setFeatureState(n,e)}}class Gf{constructor(t){this.size=t,this.minimums=[],this.maximums=[],this.leaves=[]}getElevation(t,e){const n=this.toIdx(t,e);return{min:this.minimums[n],max:this.maximums[n]}}isLeaf(t,e){return this.leaves[this.toIdx(t,e)]}toIdx(t,e){return e*this.size+t}}function Hf(t,e,n,r){let i=0,o=Number.MAX_VALUE;for(let a=0;a<3;a++)if(Math.abs(r[a])<1e-15){if(n[a]<t[a]||n[a]>e[a])return null}else{const s=1/r[a];let l=(t[a]-n[a])*s,c=(e[a]-n[a])*s;if(l>c){const t=l;l=c,c=t}if(l>i&&(i=l),c<o&&(o=c),i>o)return null}return i}function qf(t,e,n,r,i,o,a,s,l,c,u){const h=r-t,d=i-e,p=o-n,f=a-t,m=s-e,g=l-n,y=u[1]*g-u[2]*m,_=u[2]*f-u[0]*g,v=u[0]*m-u[1]*f,b=h*y+d*_+p*v;if(Math.abs(b)<1e-15)return null;const x=1/b,w=c[0]-t,S=c[1]-e,T=c[2]-n,E=(w*y+S*_+T*v)*x;if(E<0||E>1)return null;const C=S*p-T*d,O=T*h-w*p,P=w*d-S*h,k=(u[0]*C+u[1]*O+u[2]*P)*x;return k<0||E+k>1?null:(f*C+m*O+g*P)*x}function Wf(t,e,n){return(t-e)/(n-e)}function Zf(t,e,n,r,i,o,a,s,l){const c=1<<n,u=o-r,h=a-i,d=(t+1)/c*u+r,p=(e+0)/c*h+i,f=(e+1)/c*h+i;s[0]=(t+0)/c*u+r,s[1]=p,l[0]=d,l[1]=f}class Xf{constructor(t){if(this.maximums=[],this.minimums=[],this.leaves=[],this.childOffsets=[],this.nodeCount=0,this.dem=t,this._siblingOffset=[[0,0],[1,0],[0,1],[1,1]],!this.dem)return;const e=function(t){const e=Math.ceil(Math.log2(t.dim/8)),n=[];let r=Math.ceil(Math.pow(2,e));const i=1/r,o=(t,e,n,r,i)=>{const o=r?1:0,a=(t+1)*n-o,s=e*n,l=(e+1)*n-o;i[0]=t*n,i[1]=s,i[2]=a,i[3]=l};let a=new Gf(r);const s=[];for(let l=0;l<r*r;l++){o(l%r,Math.floor(l/r),i,!1,s);const e=Kf(s[0],s[1],t),n=Kf(s[2],s[1],t),c=Kf(s[2],s[3],t),u=Kf(s[0],s[3],t);a.minimums.push(Math.min(e,n,c,u)),a.maximums.push(Math.max(e,n,c,u)),a.leaves.push(1)}for(n.push(a),r/=2;r>=1;r/=2){const t=n[n.length-1];a=new Gf(r);for(let e=0;e<r*r;e++){o(e%r,Math.floor(e/r),2,!0,s);const n=t.getElevation(s[0],s[1]),i=t.getElevation(s[2],s[1]),l=t.getElevation(s[2],s[3]),c=t.getElevation(s[0],s[3]),u=t.isLeaf(s[0],s[1]),h=t.isLeaf(s[2],s[1]),d=t.isLeaf(s[2],s[3]),p=t.isLeaf(s[0],s[3]),f=Math.min(n.min,i.min,l.min,c.min),m=Math.max(n.max,i.max,l.max,c.max),g=u&&h&&d&&p;a.maximums.push(m),a.minimums.push(f),a.leaves.push(m-f<=5&&g?1:0)}n.push(a)}return n}(this.dem),n=e.length-1,r=e[n];this._addNode(r.minimums[0],r.maximums[0],r.leaves[0]),this._construct(e,0,0,n,0)}raycastRoot(t,e,n,r,i,o,a=1){return Hf([t,e,-100],[n,r,this.maximums[0]*a],i,o)}raycast(t,e,n,r,i,o,a=1){if(!this.nodeCount)return null;const s=this.raycastRoot(t,e,n,r,i,o,a);if(null==s)return null;const l=[],c=[],u=[],h=[],d=[{idx:0,t:s,nodex:0,nodey:0,depth:0}];for(;d.length>0;){const{idx:s,t:p,nodex:f,nodey:m,depth:g}=d.pop();if(this.leaves[s]){Zf(f,m,g,t,e,n,r,u,h);const s=1<<g,l=(f+0)/s,c=(f+1)/s,d=(m+0)/s,y=(m+1)/s,_=Kf(l,d,this.dem)*a,v=Kf(c,d,this.dem)*a,b=Kf(c,y,this.dem)*a,x=Kf(l,y,this.dem)*a,w=qf(u[0],u[1],_,h[0],u[1],v,h[0],h[1],b,i,o),S=qf(h[0],h[1],b,u[0],h[1],x,u[0],u[1],_,i,o),T=Math.min(null!==w?w:Number.MAX_VALUE,null!==S?S:Number.MAX_VALUE);if(T!==Number.MAX_VALUE)return T;{const t=Hl([],i,o,p);if(Yf(_,v,x,b,Wf(t[0],u[0],h[0]),Wf(t[1],u[1],h[1]))>=t[2])return p}continue}let y=0;for(let d=0;d<this._siblingOffset.length;d++){Zf((f<<1)+this._siblingOffset[d][0],(m<<1)+this._siblingOffset[d][1],g+1,t,e,n,r,u,h),u[2]=-100,h[2]=this.maximums[this.childOffsets[s]+d]*a;const p=Hf(u,h,i,o);if(null!=p){const t=p;l[d]=t;let e=!1;for(let n=0;n<y&&!e;n++)t>=l[c[n]]&&(c.splice(n,0,d),e=!0);e||(c[y]=d),y++}}for(let t=0;t<y;t++){const e=c[t];d.push({idx:this.childOffsets[s]+e,t:l[e],nodex:(f<<1)+this._siblingOffset[e][0],nodey:(m<<1)+this._siblingOffset[e][1],depth:g+1})}}return null}_addNode(t,e,n){return this.minimums.push(t),this.maximums.push(e),this.leaves.push(n),this.childOffsets.push(0),this.nodeCount++}_construct(t,e,n,r,i){if(1===t[r].isLeaf(e,n))return;this.childOffsets[i]||(this.childOffsets[i]=this.nodeCount);const o=r-1,a=t[o];let s=0,l=0;for(let c=0;c<this._siblingOffset.length;c++){const t=2*e+this._siblingOffset[c][0],r=2*n+this._siblingOffset[c][1],i=a.getElevation(t,r),o=a.isLeaf(t,r),u=this._addNode(i.min,i.max,o);o&&(s|=1<<c),l||(l=u)}for(let c=0;c<this._siblingOffset.length;c++)s&1<<c||this._construct(t,2*e+this._siblingOffset[c][0],2*n+this._siblingOffset[c][1],o,l+c)}}function Yf(t,e,n,r,i,o){return On(On(t,n,o),On(e,r,o),i)}function Kf(t,e,n){const r=n.dim,i=T(t*r-.5,0,r-1),o=T(e*r-.5,0,r-1),a=Math.floor(i),s=Math.floor(o),l=Math.min(a+1,r-1),c=Math.min(s+1,r-1);return Yf(n.get(a,s),n.get(l,s),n.get(a,c),n.get(l,c),i-a,o-s)}const Jf={mapbox:[6553.6,25.6,.1,1e4],terrarium:[256,1,1/256,32768]};class Qf{get tree(){return this._tree||this._buildQuadTree(),this._tree}constructor(t,e,n,r=!1,i=!1){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return $(`"${n}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=e.height;const o=this.dim=e.height-2,a=new Uint32Array(e.data.buffer);if(this.pixels=new Uint8Array(e.data.buffer),this.encoding=n||"mapbox",this.borderReady=r,!r){for(let t=0;t<o;t++)a[this._idx(-1,t)]=a[this._idx(0,t)],a[this._idx(o,t)]=a[this._idx(o-1,t)],a[this._idx(t,-1)]=a[this._idx(t,0)],a[this._idx(t,o)]=a[this._idx(t,o-1)];a[this._idx(-1,-1)]=a[this._idx(0,0)],a[this._idx(o,-1)]=a[this._idx(o-1,0)],a[this._idx(-1,o)]=a[this._idx(0,o-1)],a[this._idx(o,o)]=a[this._idx(o-1,o-1)],i&&this._buildQuadTree()}}_buildQuadTree(){this._tree=new Xf(this)}get(t,e,n=!1){n&&(t=T(t,-1,this.dim),e=T(e,-1,this.dim));const r=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(this.pixels[r],this.pixels[r+1],this.pixels[r+2])}static getUnpackVector(t){return Jf[t]}get unpackVector(){return Jf[this.encoding]}_idx(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)}_unpackMapbox(t,e,n){return(256*t*256+256*e+n)/10-1e4}_unpackTerrarium(t,e,n){return 256*t+e+n/256-32768}static pack(t,e){const n=[0,0,0,0],r=Qf.getUnpackVector(e);let i=Math.floor((t+r[3])/r[2]);return n[2]=i%256,i=Math.floor(i/256),n[1]=i%256,i=Math.floor(i/256),n[0]=i,n}getPixels(){return new Sc({width:this.stride,height:this.stride},this.pixels)}backfillBorder(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let r=e*this.dim,i=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}const s=-e*this.dim,l=-n*this.dim;for(let c=o;c<a;c++)for(let e=r;e<i;e++){const n=4*this._idx(e,c),r=4*this._idx(e+s,c+l);this.pixels[n+0]=t.pixels[r+0],this.pixels[n+1]=t.pixels[r+1],this.pixels[n+2]=t.pixels[r+2],this.pixels[n+3]=t.pixels[r+3]}}onDeserialize(){this._tree&&(this._tree.dem=this)}}Ni(Qf,"DEMData"),Ni(Xf,"DemMinMaxQuadTree",{omit:["dem"]});class tm{constructor(t,e){this.max=t,this.onRemove=e,this.reset()}reset(){for(const t in this.data)for(const e of this.data[t])e.timeout&&clearTimeout(e.timeout),this.onRemove(e.value);return this.data={},this.order=[],this}add(t,e,n){const r=t.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);const i={value:e,timeout:void 0};if(void 0!==n&&(i.timeout=setTimeout(()=>{this.remove(t,i)},n)),this.data[r].push(i),this.order.push(r),this.order.length>this.max){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const 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}getByKey(t){const e=this.data[t];return e?e[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,e){if(!this.has(t))return this;const 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}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(t){const e=[];for(const n in this.data)for(const r of this.data[n])t(r.value)||e.push(r);for(const n of e)this.remove(n.value.tileID,n)}}class em{constructor(t,e,n){this.func=t,this.mask=e,this.range=n}}em.ReadOnly=!1,em.ReadWrite=!0,em.disabled=new em(519,em.ReadOnly,[0,1]);const nm=7680;class rm{constructor(t,e,n,r,i,o){this.test=t,this.ref=e,this.mask=n,this.fail=r,this.depthFail=i,this.pass=o}}rm.disabled=new rm({func:519,mask:0},0,0,nm,nm,nm);class im{constructor(t,e,n){this.blendFunction=t,this.blendColor=e,this.mask=n}}im.Replace=[1,0],im.disabled=new im(im.Replace,Ce.transparent,[!1,!1,!1,!1]),im.unblended=new im(im.Replace,Ce.transparent,[!0,!0,!0,!0]),im.alphaBlended=new im([1,771],Ce.transparent,[!0,!0,!0,!0]);const om=1029,am=2305;class sm{constructor(t,e,n){this.enable=t,this.mode=e,this.frontFace=n}}sm.disabled=new sm(!1,om,am),sm.backCCW=new sm(!0,om,am),sm.backCW=new sm(!0,om,2304),sm.frontCW=new sm(!0,1028,2304),sm.frontCCW=new sm(!0,1028,am);class lm extends Zt{constructor(t,e,n){super(),this.id=t,this._onlySymbols=n,e.on("data",t=>{"source"===t.dataType&&"metadata"===t.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))}),e.on("error",()=>{this._sourceErrored=!0}),this._source=e,this._tiles={},this._cache=new tm(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=e.minTileCacheSize,this._maxTileCacheSize=e.maxTileCacheSize,this._loadedParentTiles={},this._coveredTiles={},this._state=new Uf,this._isRaster="raster"===this._source.type||"raster-dem"===this._source.type||"custom"===this._source.type&&"raster"===this._source._dataType}onAdd(t){this.map=t,this._minTileCacheSize=void 0===this._minTileCacheSize&&t?t._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=void 0===this._maxTileCacheSize&&t?t._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const t in this._tiles){const e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(t,e){return t.isSymbolTile=this._onlySymbols,this._source.loadTile(t,e)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,()=>{})}_abortTile(t){if(this._source.abortTile)return this._source.abortTile(t,()=>{})}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const e in this._tiles){const n=this._tiles[e];n.upload(t),n.prepare(this.map.style.imageManager)}}getIds(){return P(this._tiles).map(t=>t.tileID).sort(cm).map(t=>t.key)}getRenderableIds(t){const e=[];for(const n in this._tiles)this._isIdRenderable(+n,t)&&e.push(this._tiles[n]);return t?e.sort((t,e)=>{const n=t.tileID,r=e.tileID,i=new f(n.canonical.x,n.canonical.y)._rotate(this.transform.angle),o=new f(r.canonical.x,r.canonical.y)._rotate(this.transform.angle);return n.overscaledZ-r.overscaledZ||o.y-i.y||o.x-i.x}).map(t=>t.tileID.key):e.map(t=>t.tileID).sort(cm).map(t=>t.key)}hasRenderableParent(t){const e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)}_isIdRenderable(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(+t,"reloading")}}_reloadTile(t,e){const n=this._tiles[t];n&&("loading"!==n.state&&(n.state=e),this._loadTile(n,this._tileLoaded.bind(this,n,t,e)))}_tileLoaded(t,e,n,r){if(r)if(t.state="errored",404!==r.status)this._source.fire(new Wt(r,{tile:t}));else if("raster-dem"===this._source.type&&this.usedForTerrain&&this.map.painter.terrain){const t=this.map.painter.terrain;this.update(this.transform,t.getScaledDemTileSize(),!0),t.resetTileLookupCache(this.id)}else this.update(this.transform);else t.timeAdded=Ut.now(),"expired"===n&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),"raster-dem"===this._source.type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),this._source.fire(new qt("data",{dataType:"source",tile:t,coord:t.tileID,sourceCacheId:this.id}))}_backfillDEM(t){const e=this.getRenderableIds();for(let r=0;r<e.length;r++){const i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){const e=this.getTileByID(i);n(t,e),n(e,t)}}function n(t,e){if(!t.dem||t.dem.borderReady)return;t.needsHillshadePrepare=!0,t.needsDEMTextureUpload=!0;let n=e.tileID.canonical.x-t.tileID.canonical.x;const 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)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,e,n,r){for(const i in this._tiles){let o=this._tiles[i];if(r[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>n)continue;let a=o.tileID;for(;o&&o.tileID.overscaledZ>e+1;){const t=o.tileID.scaledTo(o.tileID.overscaledZ-1);o=this._tiles[t.key],o&&o.hasData()&&(a=t)}let s=a;for(;s.overscaledZ>e;)if(s=s.scaledTo(s.overscaledZ-1),t[s.key]){r[a.key]=a;break}}}findLoadedParent(t,e){if(t.key in this._loadedParentTiles){const n=this._loadedParentTiles[t.key];return n&&n.tileID.overscaledZ>=e?n:null}for(let n=t.overscaledZ-1;n>=e;n--){const e=t.scaledTo(n),r=this._getLoadedTile(e);if(r)return r}}_getLoadedTile(t){const e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(this._source.reparseOverscaled?t.wrapped().key:t.canonical.key)}updateCacheSize(t,e){e=e||this._source.tileSize;const n=Math.ceil(t.width/e)+1,r=Math.ceil(t.height/e)+1,i=Math.floor(n*r*5),o="number"==typeof this._minTileCacheSize?Math.max(this._minTileCacheSize,i):i,a="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,o):o;this._cache.setMaxSize(a)}handleWrapJump(t){const e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){const t={};for(const n in this._tiles){const r=this._tiles[n];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+e),t[r.tileID.key]=r}this._tiles=t;for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e in this._tiles)this._setTileReloadTimer(+e,this._tiles[e])}}update(t,e,n){if(this.transform=t,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage)return;if(this.usedForTerrain&&!n)return;let r;this.updateCacheSize(t,e),"globe"!==this.transform.projection.name&&this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?r=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(t=>new Ku(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)):(r=t.coveringTiles({tileSize:e||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!n,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(r=r.filter(t=>this._source.hasTile(t)))):r=[];const i=this._updateRetainedTiles(r);if(um(this._source.type)&&0!==r.length){const t={},e={},n=Object.keys(i);for(const r of n){const n=i[r],o=this._tiles[r];if(!o||o.fadeEndTime&&o.fadeEndTime<=Ut.now())continue;const a=this.findLoadedParent(n,Math.max(n.overscaledZ-lm.maxOverzooming,this._source.minzoom));a&&(this._addTile(a.tileID),t[a.tileID.key]=a.tileID),e[r]=n}const o=r[r.length-1].overscaledZ;for(const r in this._tiles){const t=this._tiles[r];if(i[r]||!t.hasData())continue;let n=t.tileID;for(;n.overscaledZ>o;){n=n.scaledTo(n.overscaledZ-1);const o=this._tiles[n.key];if(o&&o.hasData()&&e[n.key]){i[r]=t.tileID;break}}}for(const r in t)i[r]||(this._coveredTiles[r]=!0,i[r]=t[r])}for(const a in i)this._tiles[a].clearFadeHold();const o=function(t,e){const n=[];for(const r in t)r in e||n.push(r);return n}(this._tiles,i);for(const a of o){const t=this._tiles[a];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(+a)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(+t)}_updateRetainedTiles(t){const e={};if(0===t.length)return e;const n={},r=t.reduce((t,e)=>Math.min(t,e.overscaledZ),1/0),i=t[0].overscaledZ,o=Math.max(i-lm.maxOverzooming,this._source.minzoom),a=Math.max(i+lm.maxUnderzooming,this._source.minzoom),s={};for(const l of t){const t=this._addTile(l);e[l.key]=l,t.hasData()||r<this._source.maxzoom&&(s[l.key]=l)}this._retainLoadedChildren(s,r,a,e);for(const l of t){let t=this._tiles[l.key];if(t.hasData())continue;if(l.canonical.z>=this._source.maxzoom){const t=l.children(this._source.maxzoom)[0],n=this.getTile(t);if(n&&n.hasData()){e[t.key]=t;continue}}else{const t=l.children(this._source.maxzoom);if(e[t[0].key]&&e[t[1].key]&&e[t[2].key]&&e[t[3].key])continue}let r=t.wasRequested();for(let i=l.overscaledZ-1;i>=o;--i){const o=l.scaledTo(i);if(n[o.key])break;if(n[o.key]=!0,t=this.getTile(o),!t&&r&&(t=this._addTile(o)),t&&(e[o.key]=o,r=t.wasRequested(),t.hasData()))break}}return e}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const e=[];let n,r=this._tiles[t].tileID;for(;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}e.push(r.key);const t=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(t),n)break;r=t}for(const t of e)this._loadedParentTiles[t]=n}}_addTile(t){let e=this._tiles[t.key];if(e)return e;e=this._cache.getAndRemove(t),e&&(this._setTileReloadTimer(t.key,e),e.tileID=t,this._state.initializeTileState(e,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,e)));const n=Boolean(e);if(!n){const n=this.map?this.map.painter:null;e=new Vf(t,this._source.tileSize*t.overscaleFactor(),this.transform.tileZoom,n,this._isRaster),this._loadTile(e,this._tileLoaded.bind(this,e,t.key,e.state))}return e?(e.uses++,this._tiles[t.key]=e,n||this._source.fire(new qt("dataloading",{tile:e,coord:e.tileID,dataType:"source"})),e):null}_setTileReloadTimer(t,e){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},n))}_removeTile(t){const 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()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(+t);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id)}tilesIn(t,e,n){const r=[],i=this.transform;if(!i)return r;const o="globe"===i.projection.name,a=Ls(i.center.lng);for(const s in this._tiles){const l=this._tiles[s];if(n&&l.clearQueryDebugViz(),l.holdingForFade())continue;let c;if(o){const t=l.tileID.canonical;if(0===t.z){const e=[Math.abs(T(a,...hm(t,-1))-a),Math.abs(T(a,...hm(t,1))-a)];c=[0,2*e.indexOf(Math.min(...e))-1]}else{const e=[Math.abs(T(a,...hm(t,-1))-a),Math.abs(T(a,...hm(t,0))-a),Math.abs(T(a,...hm(t,1))-a)];c=[e.indexOf(Math.min(...e))-1]}}else c=[0];for(const n of c){const o=t.containsTile(l,i,e,n);o&&r.push(o)}}return r}getVisibleCoordinates(t){const e=this.getRenderableIds(t).map(t=>this._tiles[t].tileID);for(const n of e)n.projMatrix=this.transform.calculateProjMatrix(n.toUnwrapped());return e}hasTransition(){if(this._source.hasTransition())return!0;if(um(this._source.type))for(const t in this._tiles){const e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=Ut.now())return!0}return!1}setFeatureState(t,e,n){this._state.updateState(t=t||"_geojsonTileLayer",e,n)}removeFeatureState(t,e,n){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,n)}getFeatureState(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)}setDependencies(t,e,n){const r=this._tiles[t];r&&r.setDependencies(e,n)}reloadTilesForDependencies(t,e){for(const n in this._tiles)this._tiles[n].hasDependency(t,e)&&this._reloadTile(+n,"reloading");this._cache.filter(n=>!n.hasDependency(t,e))}_preloadTiles(t,e){const n=new Map,r=Array.isArray(t)?t:[t],i=this.map.painter.terrain,o=this.usedForTerrain&&i?i.getScaledDemTileSize():this._source.tileSize;for(const a of r){const t=a.coveringTiles({tileSize:o,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const e of t)n.set(e.key,e);this.usedForTerrain&&a.updateElevation(!1)}O(Array.from(n.values()),(t,e)=>{const n=new Vf(t,this._source.tileSize*t.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(n,t=>{"raster-dem"===this._source.type&&n.dem&&this._backfillDEM(n),e(t,n)})},e)}}function cm(t,e){const n=Math.abs(2*t.wrap)-+(t.wrap<0),r=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-n||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function um(t){return"raster"===t||"image"===t||"video"===t||"custom"===t}function hm(t,e){const n=1<<t.z;return[t.x/n+e,(t.x+1)/n+e]}lm.maxOverzooming=10,lm.maxUnderzooming=3;class dm{constructor(t,e,n){this._demTile=t,this._dem=this._demTile.dem,this._scale=e,this._offset=n}static create(t,e,n){const r=n||t.findDEMTileFor(e);if(!r||!r.dem)return;const i=r.dem,o=r.tileID,a=1<<e.canonical.z-o.canonical.z;return new dm(r,r.tileSize/As/a,[(e.canonical.x/a-o.canonical.x)*i.dim,(e.canonical.y/a-o.canonical.y)*i.dim])}tileCoordToPixel(t,e){const n=e*this._scale+this._offset[1],r=Math.floor(t*this._scale+this._offset[0]),i=Math.floor(n);return new f(r,i)}getElevationAt(t,e,n,r){const i=t*this._scale+this._offset[0],o=e*this._scale+this._offset[1],a=Math.floor(i),s=Math.floor(o),l=this._dem;return r=!!r,n?On(On(l.get(a,s,r),l.get(a,s+1,r),o-s),On(l.get(a+1,s,r),l.get(a+1,s+1,r),o-s),i-a):l.get(a,s,r)}getElevationAtPixel(t,e,n){return this._dem.get(t,e,!!n)}getMeterToDEM(t){return(1<<this._demTile.tileID.canonical.z)*js(1,t)*this._dem.stride}}class pm{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Ri(As,16,0),this.featureIndexArray=new Ua,this.promoteId=e}insert(t,e,n,r,i,o=0){const a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i,o);const s=this.grid;for(let l=0;l<e.length;l++){const t=e[l],n=[1/0,1/0,-1/0,-1/0];for(let e=0;e<t.length;e++){const r=t[e];n[0]=Math.min(n[0],r.x),n[1]=Math.min(n[1],r.y),n[2]=Math.max(n[2],r.x),n[3]=Math.max(n[3],r.y)}n[0]<As&&n[1]<As&&n[2]>=0&&n[3]>=0&&s.insert(a,n[0],n[1],n[2],n[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new ku(new Ih(this.rawTileData)).layers,this.sourceLayerCoder=new Af(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const t in this.vtLayers)this.vtFeatures[t]=[]}return this.vtLayers}query(t,e,n,r){this.loadVTLayers();const i=t.params||{},o=oi(i.filter),a=t.tileResult,s=t.transform,l=a.bufferedTilespaceBounds,c=this.grid.query(l.min.x,l.min.y,l.max.x,l.max.y,(t,e,n,r)=>pl(a.bufferedTilespaceGeometry,t,e,n,r));c.sort(mm);let u=null;s.elevation&&c.length>0&&(u=dm.create(s.elevation,this.tileID));const h={};let d;for(let p=0;p<c.length;p++){const s=c[p];if(s===d)continue;d=s;const l=this.featureIndexArray.get(s);let f=null;this.loadMatchingFeature(h,l,o,i.layers,i.availableImages,e,n,r,(e,n,r,i=0)=>(f||(f=Js(e,this.tileID.canonical,t.tileTransform)),n.queryIntersectsFeature(a,e,r,f,this.z,t.transform,t.pixelPosMatrix,u,i)))}return h}loadMatchingFeature(t,e,n,r,i,o,a,s,l){const{featureIndex:c,bucketIndex:u,sourceLayerIndex:h,layoutVertexArrayOffset:d}=e,p=this.bucketLayerIDs[u];if(r&&!function(t,e){for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1}(r,p))return;const f=this.sourceLayerCoder.decode(h),m=this.vtLayers[f].feature(c);if(n.needGeometry){const t=Qs(m,!0);if(!n.filter(new No(this.tileID.overscaledZ),t,this.tileID.canonical))return}else if(!n.filter(new No(this.tileID.overscaledZ),m))return;const g=this.getId(m,f);for(let y=0;y<p.length;y++){const e=p[y];if(r&&r.indexOf(e)<0)continue;const n=o[e];if(!n)continue;let u={};void 0!==g&&s&&(u=s.getState(n.sourceLayer||"_geojsonTileLayer",g));const h=k({},a[e]);h.paint=fm(h.paint,n.paint,m,u,i),h.layout=fm(h.layout,n.layout,m,u,i);const f=!l||l(m,n,u,d);if(!f)continue;const _=new Mf(m,this.z,this.x,this.y,g);_.layer=h;let v=t[e];void 0===v&&(v=t[e]=[]),v.push({featureIndex:c,feature:_,intersectionZ:f})}}lookupSymbolFeatures(t,e,n,r,i,o,a,s){const l={};this.loadVTLayers();const c=oi(i);for(const u of t)this.loadMatchingFeature(l,{bucketIndex:n,sourceLayerIndex:r,featureIndex:u,layoutVertexArrayOffset:0},c,o,a,s,e);return l}loadFeature(t){const{featureIndex:e,sourceLayerIndex:n}=t;this.loadVTLayers();const r=this.sourceLayerCoder.decode(n),i=this.vtFeatures[r];if(i[e])return i[e];const o=this.vtLayers[r].feature(e);return i[e]=o,o}hasLayer(t){for(const e of this.bucketLayerIDs)for(const n of e)if(t===n)return!0;return!1}getId(t,e){let n=t.id;if(this.promoteId){const r="string"==typeof this.promoteId?this.promoteId:this.promoteId[e];null!=r&&(n=t.properties[r]),"boolean"==typeof n&&(n=Number(n))}return n}}function fm(t,e,n,r,i){return R(t,(t,o)=>{const a=e instanceof Zo?e.get(o):null;return a&&a.evaluate?a.evaluate(n,r,i):a})}function mm(t,e){return e-t}Ni(pm,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});class gm{constructor(t,e){this.width=t,this.height=e,this.nextRow=0,this.image=new wc({width:t,height:e}),this.positions={},this.uploaded=!1}getDash(t,e){const n=this.getKey(t,e);return this.positions[n]}trim(){const t=this.width,e=this.height=D(this.nextRow);this.image.resize({width:t,height:e})}getKey(t,e){return t.join(",")+e}getDashRanges(t,e,n){const r=[];let i=t.length%2==1?-t[t.length-1]*n:0,o=t[0]*n,a=!0;r.push({left:i,right:o,isDash:a,zeroLength:0===t[0]});let s=t[0];for(let l=1;l<t.length;l++){a=!a;const e=t[l];i=s*n,s+=e,o=s*n,r.push({left:i,right:o,isDash:a,zeroLength:0===e})}return r}addRoundDash(t,e,n){const r=e/2;for(let i=-n;i<=n;i++){const e=this.width*(this.nextRow+n+i);let o=0,a=t[o];for(let s=0;s<this.width;s++){s/a.right>1&&(a=t[++o]);const l=Math.abs(s-a.left),c=Math.abs(s-a.right),u=Math.min(l,c);let h;const d=i/n*(r+1);if(a.isDash){const t=r-Math.abs(d);h=Math.sqrt(u*u+t*t)}else h=r-Math.sqrt(u*u+d*d);this.image.data[e+s]=Math.max(0,Math.min(255,h+128))}}}addRegularDash(t,e){for(let s=t.length-1;s>=0;--s){const e=t[s],n=t[s+1];e.zeroLength?t.splice(s,1):n&&n.isDash===e.isDash&&(n.left=e.left,t.splice(s,1))}const n=t[0],r=t[t.length-1];n.isDash===r.isDash&&(n.left=r.left-this.width,r.right=n.right+this.width);const i=this.width*this.nextRow;let o=0,a=t[o];for(let s=0;s<this.width;s++){s/a.right>1&&(a=t[++o]);const n=Math.abs(s-a.left),r=Math.abs(s-a.right),l=Math.min(n,r);this.image.data[i+s]=Math.max(0,Math.min(255,(a.isDash?l:-l)+e+128))}}addDash(t,e){const n=this.getKey(t,e);if(this.positions[n])return this.positions[n];const r="round"===e,i=r?7:0,o=2*i+1;if(this.nextRow+o>this.height)return $("LineAtlas out of space"),null;0===t.length&&t.push(1);let a=0;for(let c=0;c<t.length;c++)t[c]<0&&($("Negative value is found in line dasharray, replacing values with 0"),t[c]=0),a+=t[c];if(0!==a){const n=this.width/a,o=this.getDashRanges(t,this.width,n);r?this.addRoundDash(o,n,i):this.addRegularDash(o,"square"===e?.5*n:0)}const s=this.nextRow+i;this.nextRow+=o;const l={tl:[s,i],br:[a,0]};return this.positions[n]=l,l}}Ni(gm,"LineAtlas");class ym{constructor(t){const e={},n=[];for(const a in t){const r=t[a],i=e[a]={};for(const t in r.glyphs){const e=r.glyphs[+t];if(!e||0===e.bitmap.width||0===e.bitmap.height)continue;const o=e.metrics.localGlyph?2:1,a={x:0,y:0,w:e.bitmap.width+2*o,h:e.bitmap.height+2*o};n.push(a),i[t]=a}}const{w:r,h:i}=nd(n),o=new wc({width:r||1,height:i||1});for(const a in t){const n=t[a];for(const t in n.glyphs){const r=n.glyphs[+t];if(!r||0===r.bitmap.width||0===r.bitmap.height)continue;const i=e[a][t],s=r.metrics.localGlyph?2:1;wc.copy(r.bitmap,o,{x:0,y:0},{x:i.x+s,y:i.y+s},r.bitmap)}}this.image=o,this.positions=e}}Ni(ym,"GlyphAtlas");class _m{constructor(t){this.tileID=new Ku(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.tileZoom=t.tileZoom,this.uid=t.uid,this.zoom=t.zoom,this.canonical=t.tileID.canonical,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.enableTerrain=!!t.enableTerrain,this.isSymbolTile=t.isSymbolTile,this.tileTransform=Fp(t.tileID.canonical,t.projection),this.projection=t.projection}parse(t,e,n,r,i){this.status="parsing",this.data=t,this.collisionBoxArray=new za;const o=new Af(Object.keys(t.layers).sort()),a=new pm(this.tileID,this.promoteId);a.bucketLayerIDs=[];const s={},l=new gm(256,256),c={featureIndex:a,iconDependencies:{},patternDependencies:{},glyphDependencies:{},lineAtlas:l,availableImages:n},u=e.familiesBySource[this.source];for(const b in u){const e=t.layers[b];if(!e)continue;let r=!1,i=!1;for(const t of u[b])"symbol"===t[0].type?r=!0:i=!0;if(!0===this.isSymbolTile&&!r)continue;if(!1===this.isSymbolTile&&!i)continue;1===e.version&&$(`Vector tile source "${this.source}" layer "${b}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const l=o.encode(b),h=[];for(let t=0;t<e.length;t++){const n=e.feature(t),r=a.getId(n,b);h.push({feature:n,id:r,index:t,sourceLayerIndex:l})}for(const t of u[b]){const e=t[0];void 0!==this.isSymbolTile&&"symbol"===e.type!==this.isSymbolTile||e.minzoom&&this.zoom<Math.floor(e.minzoom)||e.maxzoom&&this.zoom>=e.maxzoom||"none"!==e.visibility&&(vm(t,this.zoom,n),(s[e.id]=e.createBucket({index:a.bucketLayerIDs.length,layers:t,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:l,sourceID:this.source,enableTerrain:this.enableTerrain,projection:this.projection.spec,availableImages:n})).populate(h,c,this.tileID.canonical,this.tileTransform),a.bucketLayerIDs.push(t.map(t=>t.id)))}}let h,d,p,f;l.trim();const m={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},g=R(c.glyphDependencies,t=>Object.keys(t).map(Number));Object.keys(g).length?r.send("getGlyphs",{uid:this.uid,stacks:g},(t,e)=>{h||(h=t,d=e,v.call(this))},void 0,!1,m):d={};const y=Object.keys(c.iconDependencies);y.length?r.send("getImages",{icons:y,source:this.source,tileID:this.tileID,type:"icons"},(t,e)=>{h||(h=t,p=e,v.call(this))},void 0,!1,m):p={};const _=Object.keys(c.patternDependencies);function v(){if(h)return i(h);if(d&&p&&f){const t=new ym(d),e=new id(p,f);for(const r in s){const i=s[r];i instanceof gf?(vm(i.layers,this.zoom,n),Xd(i,d,t.positions,p,e.iconPositions,this.showCollisionBoxes,n,this.tileID.canonical,this.tileZoom,this.projection)):i.hasPattern&&(i instanceof ch||i instanceof uu||i instanceof Ru)&&(vm(i.layers,this.zoom,n),i.addFeatures(c,this.tileID.canonical,e.patternPositions,n,this.tileTransform))}this.status="done",i(null,{buckets:P(s).filter(t=>!t.isEmpty()),featureIndex:a,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,lineAtlas:l,imageAtlas:e,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?t.positions:null})}}_.length?r.send("getImages",{icons:_,source:this.source,tileID:this.tileID,type:"patterns"},(t,e)=>{h||(h=t,f=e,v.call(this))},void 0,!1,m):f={},v.call(this)}}function vm(t,e,n){const r=new No(e);for(const i of t)i.recalculate(r,n)}class bm{constructor(t){this.entries={},this.scheduler=t}request(t,e,n,r){const i=this.entries[t]=this.entries[t]||{callbacks:[]};if(i.result){const[t,n]=i.result;return this.scheduler?this.scheduler.add(()=>{r(t,n)},e):r(t,n),()=>{}}return i.callbacks.push(r),i.cancel||(i.cancel=n((n,r)=>{i.result=[n,r];for(const t of i.callbacks)this.scheduler?this.scheduler.add(()=>{t(n,r)},e):t(n,r);setTimeout(()=>delete this.entries[t],3e3)})),()=>{i.result||(i.callbacks=i.callbacks.filter(t=>t!==r),i.callbacks.length||(i.cancel(),delete this.entries[t]))}}}function xm(t,e,n){const r=JSON.stringify(t.request);return t.data&&(this.deduped.entries[r]={result:[null,t.data]}),this.deduped.request(r,{type:"parseTile",isSymbolTile:t.isSymbolTile,zoom:t.tileZoom},e=>{const r=ct(t.request,(t,r,i,o)=>{t?e(t):r&&e(null,{vectorTile:n?void 0:new ku(new Ih(r)),rawData:r,cacheControl:i,expires:o})});return()=>{r.cancel(),e()}},e)}t.ARRAY_TYPE=wl,t.AUTH_ERR_MSG=mt,t.Aabb=dc,t.Actor=class{constructor(t,n,r){this.target=t,this.parent=n,this.mapId=r,this.callbacks={},this.cancelCallbacks={},z(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=G()?t:e,this.scheduler=new kf}send(t,e,n,r,i=!1,o){const a=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(n.metadata=o,this.callbacks[a]=n);const s=W(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!n,targetMapId:r,mustQueue:i,sourceMapId:this.mapId,data:Ui(e,s)},s),{cancel:()=>{n&&delete this.callbacks[a],this.target.postMessage({id:a,type:"<cancel>",targetMapId:r,sourceMapId:this.mapId})}}}receive(t){const e=t.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){const t=this.cancelCallbacks[n];delete this.cancelCallbacks[n],t&&t.cancel()}else if(e.mustQueue||G()){const t=this.callbacks[n];this.cancelCallbacks[n]=this.scheduler.add(()=>this.processTask(n,e),t&&t.metadata||{type:"message"})}else this.processTask(n,e)}processTask(t,e){if("<response>"===e.type){const n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(Gi(e.error)):n(null,Gi(e.data)))}else{const n=W(this.globalScope)?void 0:[],r=e.hasCallback?(e,r)=>{delete this.cancelCallbacks[t],this.target.postMessage({id:t,type:"<response>",sourceMapId:this.mapId,error:e?Ui(e):null,data:Ui(r,n)},n)}:t=>{},i=Gi(e.data);if(this.parent[e.type])this.parent[e.type](e.sourceMapId,i,r);else if(this.parent.getWorkerSource){const t=e.type.split(".");this.parent.getWorkerSource(e.sourceMapId,t[0],i.source)[t[1]](i,r)}else r(new Error(`Could not find function ${e.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},t.CanonicalTileID=Xu,t.Color=Ce,t.ColorMode=im,t.CullFaceMode=sm,t.DEMData=Qf,t.DataConstantProperty=Xo,t.DedupedRequest=bm,t.DepthMode=em,t.EXTENT=As,t.Elevation=class{isDataAvailableAtPoint(t){const e=this._source();if(this.isUsingMockSource()||!e||t.y<0||t.y>1)return!1;const n=e.getSource().maxzoom,r=1<<n,i=Math.floor(t.x),o=Math.floor((t.x-i)*r),a=Math.floor(t.y*r),s=this.findDEMTileFor(new Ku(n,i,n,o,a));return!(!s||!s.dem)}getAtPointOrZero(t,e=0){return this.getAtPoint(t,e)||0}getAtPoint(t,e,n=!0){if(this.isUsingMockSource())return null;null==e&&(e=null);const r=this._source();if(!r)return e;if(t.y<0||t.y>1)return e;const i=r.getSource().maxzoom,o=1<<i,a=Math.floor(t.x),s=t.x-a,l=new Ku(i,a,i,Math.floor(s*o),Math.floor(t.y*o)),c=this.findDEMTileFor(l);if(!c||!c.dem)return e;const u=c.dem,h=1<<c.tileID.canonical.z,d=(s*h-c.tileID.canonical.x)*u.dim,p=(t.y*h-c.tileID.canonical.y)*u.dim,f=Math.floor(d),m=Math.floor(p);return(n?this.exaggeration():1)*On(On(u.get(f,m),u.get(f,m+1),p-m),On(u.get(f+1,m),u.get(f+1,m+1),p-m),d-f)}getAtTileOffset(t,e,n){const r=1<<t.canonical.z;return this.getAtPointOrZero(new Gs(t.wrap+(t.canonical.x+e/As)/r,(t.canonical.y+n/As)/r))}getAtTileOffsetFunc(t,e,n,r){return i=>{const o=this.getAtTileOffset(t,i.x,i.y),a=r.upVector(t.canonical,i.x,i.y);return Gl(a,a,o*r.upVectorScale(t.canonical,e,n).metersToTile),a}}getForTilePoints(t,e,n,r){if(this.isUsingMockSource())return!1;const i=dm.create(this,t,r);return!!i&&(e.forEach(t=>{t[2]=this.exaggeration()*i.getElevationAt(t[0],t[1],n)}),!0)}getMinMaxForTile(t){if(this.isUsingMockSource())return null;const e=this.findDEMTileFor(t);if(!e||!e.dem)return null;const n=e.dem.tree,r=e.tileID,i=1<<t.canonical.z-r.canonical.z;let o=t.canonical.x/i-r.canonical.x,a=t.canonical.y/i-r.canonical.y,s=0;for(let l=0;l<t.canonical.z-r.canonical.z&&!n.leaves[s];l++){o*=2,a*=2;const t=2*Math.floor(a)+Math.floor(o);s=n.childOffsets[s]+t,o%=1,a%=1}return{min:this.exaggeration()*n.minimums[s],max:this.exaggeration()*n.maximums[s]}}getMinElevationBelowMSL(){throw new Error("Pure virtual method called.")}raycast(t,e,n){throw new Error("Pure virtual method called.")}pointCoordinate(t){throw new Error("Pure virtual method called.")}_source(){throw new Error("Pure virtual method called.")}isUsingMockSource(){throw new Error("Pure virtual method called.")}exaggeration(){throw new Error("Pure virtual method called.")}findDEMTileFor(t){throw new Error("Pure virtual method called.")}get visibleDemTiles(){throw new Error("Getter must be implemented in subclass.")}},t.ErrorEvent=Wt,t.EvaluationParameters=No,t.Event=qt,t.Evented=Zt,t.FillExtrusionBucket=Ru,t.Frustum=hc,t.FrustumCorners=uc,t.GLOBE_METERS_TO_ECEF=cp,t.GLOBE_RADIUS=lp,t.GLOBE_SCALE_MATCH_LATITUDE=45,t.GLOBE_ZOOM_THRESHOLD_MAX=6,t.GLOBE_ZOOM_THRESHOLD_MIN=5,t.GlobeSharedBuffers=class{constructor(t){this._createGrid(t),this._createPoles(t)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(const t of this._poleSegments)t.destroy();for(const t of this._gridSegments)t.destroy();if(this._wireframeIndexBuffer){this._wireframeIndexBuffer.destroy();for(const t of this._wireframeSegments)t.destroy()}}_createGrid(t){const e=new sa,n=new Sa,r=65;for(let i=0;i<r;i++)for(let t=0;t<r;t++)e.emplaceBack(t,i);this._gridSegments=[];for(let i=0,o=0;i<hp.length;i++){const t=hp[i];for(let i=0;i<t;i++)for(let t=0;t<64;t++){const e=i*r+t;n.emplaceBack(e+1,e,e+r),n.emplaceBack(e+r,e+r+1,e+1)}const e=64*t*2;this._gridSegments.push(ks.simpleSegment(0,o,(t+1)*r,e)),o+=e}this._gridBuffer=t.createVertexBuffer(e,sp.members),this._gridIndexBuffer=t.createIndexBuffer(n,!0)}_createPoles(t){const e=new Sa;for(let i=0;i<=up;i++)e.emplaceBack(0,i+1,i+2);this._poleIndexBuffer=t.createIndexBuffer(e,!0);const n=new Oa,r=new Oa;this._poleSegments=[];for(let i=0,o=0;i<5;i++){const t=360/(1<<i);n.emplaceBack(0,-lp,0,.5,0),r.emplaceBack(0,-lp,0,.5,1);for(let e=0;e<=up;e++){const i=e/up,o=On(0,t,i),[a,s,l]=Ep(Lp,Rp,o,lp);n.emplaceBack(a,s,l,i,0),r.emplaceBack(a,s,l,i,1)}this._poleSegments.push(ks.simpleSegment(o,0,66,64)),o+=66}this._poleNorthVertexBuffer=t.createVertexBuffer(n,op,!1),this._poleSouthVertexBuffer=t.createVertexBuffer(r,op,!1)}getGridBuffers(t){return[this._gridBuffer,this._gridIndexBuffer,this._gridSegments[t]]}getPoleBuffers(t){return[this._poleNorthVertexBuffer,this._poleSouthVertexBuffer,this._poleIndexBuffer,this._poleSegments[t]]}getWirefameBuffers(t,e){if(!this._wireframeSegments){const e=new ka,n=up,r=n+1;this._wireframeSegments=[];for(let t=0,i=0;t<hp.length;t++){const o=hp[t];for(let t=0;t<o;t++)for(let i=0;i<n;i++){const n=t*r+i;e.emplaceBack(n,n+1),e.emplaceBack(n,n+r),e.emplaceBack(n,n+r+1)}const a=o*n*3;this._wireframeSegments.push(ks.simpleSegment(0,i,(o+1)*r,a)),i+=a}this._wireframeIndexBuffer=t.createIndexBuffer(e)}return[this._gridBuffer,this._wireframeIndexBuffer,this._wireframeSegments[e]]}},t.GlyphManager=Bd,t.ImagePosition=rd,t.LivePerformanceUtils=zt,t.LngLat=Ds,t.LngLatBounds=Is,t.LocalGlyphMode=Dd,t.MAX_MERCATOR_LATITUDE=Vs,t.MercatorCoordinate=Gs,t.ONE_EM=xh,t.OverscaledTileID=Ku,t.PerformanceMarkers=Bt,t.Properties=ta,t.RGBAImage=Sc,t.Ray=cc,t.RequestManager=class{constructor(t,e,n){this._transformRequestFn=t,this._customAccessToken=e,this._silenceAuthErrors=!!n,this._createSkuToken()}_createSkuToken(){const t=function(){let t="";for(let e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",h,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}}normalizeStyleURL(t,e){if(!gt(t))return t;const n=xt(t);return n.path=`/styles/v1${n.path}`,this._makeAPIURL(n,this._customAccessToken||e)}normalizeGlyphsURL(t,e){if(!gt(t))return t;const n=xt(t);return n.path=`/fonts/v1${n.path}`,this._makeAPIURL(n,this._customAccessToken||e)}normalizeSourceURL(t,e,n,r){if(!gt(t))return t;const i=xt(t);return i.path=`/v4/${i.authority}.json`,i.params.push("secure"),n&&i.params.push(`language=${n}`),r&&i.params.push(`worldview=${r}`),this._makeAPIURL(i,this._customAccessToken||e)}normalizeSpriteURL(t,e,n,r){const i=xt(t);return gt(t)?(i.path=`/styles/v1${i.path}/sprite${e}${n}`,this._makeAPIURL(i,this._customAccessToken||r)):(i.path+=`${e}${n}`,wt(i))}normalizeTileURL(t,e,n){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!gt(t))return t;const r=xt(t);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${e||n&&"raster"!==r.authority&&512===n?"@2x":""}${o.supported?".webp":"$1"}`),"raster"===r.authority?r.path=`/${i.RASTER_URL_PREFIX}${r.path}`:(r.path=r.path.replace(/^.+\/v4\//,"/"),r.path=`/${i.TILE_URL_VERSION}${r.path}`);const a=this._customAccessToken||function(t){for(const e of t){const t=e.match(/^access_token=(.*)$/);if(t)return t[1]}return null}(r.params)||i.ACCESS_TOKEN;return i.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&r.params.push(`sku=${this._skuToken}`),this._makeAPIURL(r,a)}canonicalizeTileURL(t,e){const n=xt(t);if(!n.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!n.path.match(/\.[\w]+$/))return t;let r="mapbox://";n.path.match(/^\/raster\/v1\//)?r+=`raster/${n.path.replace(`/${i.RASTER_URL_PREFIX}/`,"")}`:r+=`tiles/${n.path.replace(`/${i.TILE_URL_VERSION}/`,"")}`;let o=n.params;return e&&(o=o.filter(t=>!t.match(/^access_token=/))),o.length&&(r+=`?${o.join("&")}`),r}canonicalizeTileset(t,e){const n=!!e&&gt(e),r=[];for(const i of t.tiles||[])yt(i)?r.push(this.canonicalizeTileURL(i,n)):r.push(i);return r}_makeAPIURL(t,e){const n="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",r=xt(i.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"http"===t.protocol){const e=t.params.indexOf("secure");e>=0&&t.params.splice(e,1)}if("/"!==r.path&&(t.path=`${r.path}${t.path}`),!i.REQUIRE_ACCESS_TOKEN)return wt(t);if(e=e||i.ACCESS_TOKEN,!this._silenceAuthErrors){if(!e)throw new Error(`An API access token is required to use Mapbox GL. ${n}`);if("s"===e[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${n}`)}return t.params=t.params.filter(t=>-1===t.indexOf("access_token")),t.params.push(`access_token=${e||""}`),wt(t)}},t.ResourceType=ot,t.SegmentVector=ks,t.SourceCache=lm,t.StencilMode=rm,t.StructArrayLayout1ui2=Aa,t.StructArrayLayout2f1f2i16=ba,t.StructArrayLayout2i4=sa,t.StructArrayLayout2ui4=ka,t.StructArrayLayout3f12=wa,t.StructArrayLayout3ui6=Sa,t.StructArrayLayout4i8=ca,t.StructArrayLayout5f20=Oa,t.Texture=Of,t.Tile=Vf,t.Transitionable=Uo,t.Uniform1f=as,t.Uniform1i=class extends os{constructor(t){super(t),this.current=0}set(t,e,n){this.fetchUniformLocation(t,e)&&this.current!==n&&(this.current=n,this.gl.uniform1i(this.location,n))}},t.Uniform2f=class extends os{constructor(t){super(t),this.current=[0,0]}set(t,e,n){this.fetchUniformLocation(t,e)&&(n[0]===this.current[0]&&n[1]===this.current[1]||(this.current=n,this.gl.uniform2f(this.location,n[0],n[1])))}},t.Uniform3f=class extends os{constructor(t){super(t),this.current=[0,0,0]}set(t,e,n){this.fetchUniformLocation(t,e)&&(n[0]===this.current[0]&&n[1]===this.current[1]&&n[2]===this.current[2]||(this.current=n,this.gl.uniform3f(this.location,n[0],n[1],n[2])))}},t.Uniform4f=ss,t.UniformColor=ls,t.UniformMatrix2f=class extends os{constructor(t){super(t),this.current=hs}set(t,e,n){if(this.fetchUniformLocation(t,e))for(let r=0;r<4;r++)if(n[r]!==this.current[r]){this.current=n,this.gl.uniformMatrix2fv(this.location,!1,n);break}}},t.UniformMatrix3f=class extends os{constructor(t){super(t),this.current=us}set(t,e,n){if(this.fetchUniformLocation(t,e))for(let r=0;r<9;r++)if(n[r]!==this.current[r]){this.current=n,this.gl.uniformMatrix3fv(this.location,!1,n);break}}},t.UniformMatrix4f=class extends os{constructor(t){super(t),this.current=cs}set(t,e,n){if(this.fetchUniformLocation(t,e)){if(n[12]!==this.current[12]||n[0]!==this.current[0])return this.current=n,void this.gl.uniformMatrix4fv(this.location,!1,n);for(let t=1;t<16;t++)if(n[t]!==this.current[t]){this.current=n,this.gl.uniformMatrix4fv(this.location,!1,n);break}}}},t.UnwrappedTileID=Yu,t.ValidationError=Yr,t.VectorTileFeature=Au,t.VectorTileWorkerSource=class extends Zt{constructor(t,e,n,r,i){super(),this.actor=t,this.layerIndex=e,this.availableImages=n,this.loadVectorData=i||xm,this.loading={},this.loaded={},this.deduped=new bm(t.scheduler),this.isSpriteLoaded=r,this.scheduler=t.scheduler}loadTile(t,e){const n=t.uid,r=t&&t.request,i=r&&r.collectResourceTiming,o=this.loading[n]=new _m(t);o.abort=this.loadVectorData(t,(a,s)=>{const l=!this.loading[n];if(delete this.loading[n],l||a||!s)return o.status="done",l||(this.loaded[n]=o),e(a);const c=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl),o.vectorTile=s.vectorTile||new ku(new Ih(c));const h=()=>{o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,(t,n)=>{if(t||!n)return e(t);const o={};if(i){const t=jt(r);t.length>0&&(o.resourceTiming=JSON.parse(JSON.stringify(t)))}e(null,k({rawTileData:c.slice(0)},n,u,o))})};this.isSpriteLoaded?h():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(h,{type:"parseTile",isSymbolTile:t.isSymbolTile,zoom:t.tileZoom}):h()}),this.loaded=this.loaded||{},this.loaded[n]=o})}reloadTile(t,e){const n=this.loaded,r=t.uid,i=this;if(n&&n[r]){const o=n[r];o.showCollisionBoxes=t.showCollisionBoxes,o.enableTerrain=!!t.enableTerrain,o.projection=t.projection,o.tileTransform=Fp(t.tileID.canonical,t.projection);const a=(t,n)=>{const r=o.reloadCallback;r&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,this.availableImages,i.actor,r)),e(t,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(t,e){const n=t.uid,r=this.loading[n];r&&(r.abort&&r.abort(),delete this.loading[n]),e()}removeTile(t,e){const n=this.loaded,r=t.uid;n&&n[r]&&delete n[r],e()}},t.WritingMode=od,t.ZoomHistory=Hi,t.add=Fl,t.addDynamicAttributes=df,t.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8];return t[0]=a*u-s*c,t[1]=i*c-r*u,t[2]=r*s-i*a,t[3]=s*l-o*u,t[4]=n*u-i*l,t[5]=i*o-n*s,t[6]=o*c-a*l,t[7]=r*l-n*c,t[8]=n*a-r*o,t},t.asyncAll=O,t.bezier=w,t.bindAll=z,t.boundsAttributes=Nf,t.bufferConvexPolygon=function(t,e){const n=[];for(let r=0;r<t.length;r++){const i=C(r-1,-1,t.length-1),o=C(r+1,-1,t.length-1),a=t[r],s=t[o],l=t[i].sub(a).unit(),c=s.sub(a).unit(),u=c.angleWithSep(l.x,l.y),h=l.add(c).unit().mult(-1*e/Math.sin(u/2));n.push(a.add(h))}return n},t.cacheEntryPossiblyAdded=function(t){it++,it>tt&&(t.getActor().send("enforceCacheSizeLimit",Q),it=0)},t.calculateGlobeLabelMatrix=function(t,e){const{x:n,y:r}=t.point,i=Mp(n,r,t.worldSize/t._pixelsPerMercatorPixel,0,0);return Ol(i,i,Ip(_p(e)))},t.calculateGlobeMatrix=function(t){const{x:e,y:n}=t.point,{lng:r,lat:i}=t._center;return Mp(e,n,t.worldSize,r,i)},t.calculateGlobeMercatorMatrix=function(t){const e=t.pixelsPerMeter,n=e/js(1,t.center.lat),r=El(new Float64Array(16));return Pl(r,r,[t.point.x,t.point.y,0]),kl(r,r,[n,n,e]),Float32Array.from(r)},t.circumferenceAtLatitude=zs,t.clamp=T,t.clearTileCache=function(t){if(!et())return;const n=e.caches.delete(Y);t&&n.catch(t).then(()=>t())},t.clipLine=kd,t.clone=function(t){var e=new wl(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=F,t.collisionCircleLayout=bh,t.config=i,t.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},t.create=function(){var t=new wl(16);return wl!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=Sl,t.createExpression=Gr,t.createLayout=oa,t.createStyleLayer=function(t){return"custom"===t.type?new Sf(t):new Cf[t.type](t)},t.cross=Zl,t.degToRad=_,t.distance=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},t.div=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t},t.dot=Wl,t.earthRadius=Ms,t.ease=S,t.easeCubicInOut=x,t.ecefToLatLng=function([t,e,n]){const r=Math.hypot(t,e,n),i=Math.atan2(t,n),o=.5*Math.PI-Math.acos(-e/r);return new Ds(v(i),v(o))},t.emitValidationErrors=Li,t.endsWith=L,t.enforceCacheSizeLimit=function(t){nt(),K&&K.then(e=>{e.keys().then(n=>{for(let r=0;r<n.length-t;r++)e.delete(n[r])})})},t.evaluateSizeForFeature=Th,t.evaluateSizeForZoom=Eh,t.evaluateVariableOffset=Zd,t.evented=Lo,t.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},t.exactEquals$1=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},t.exported=Ut,t.exported$1=o,t.extend=k,t.extend$1=Yt,t.fillExtrusionHeightLift=Gu,t.filterObject=j,t.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},t.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,l=i+i,c=n*a,u=r*a,h=r*s,d=i*a,p=i*s,f=i*l,m=o*a,g=o*s,y=o*l;return t[0]=1-h-f,t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-c-f,t[6]=p+m,t[7]=0,t[8]=d+g,t[9]=p-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},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},t.fromScaling=Ml,t.furthestTileCorner=function(t){const e=Math.round((t+45+360)%360/90)%4;return b[e]},t.getAABBPointSquareDist=function(t,e,n){let r=0;for(let i=0;i<2;++i){const o=n?n[i]:0;t[i]>o&&(r+=(t[i]-o)*(t[i]-o)),e[i]<o&&(r+=(o-e[i])*(o-e[i]))}return r},t.getAnchorAlignment=yd,t.getAnchorJustification=Yd,t.getBounds=function(t){let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t)e=Math.min(e,o.x),n=Math.min(n,o.y),r=Math.max(r,o.x),i=Math.max(i,o.y);return{min:new f(e,n),max:new f(r,i)}},t.getColumn=X,t.getGridMatrix=function(t,e,n,r){const i=e.getNorth(),o=e.getSouth(),a=e.getWest(),s=e.getEast(),l=1<<t.z,c=s-a,u=i-o,h=c/up,d=-u/hp[n],p=[0,h,0,d,0,0,i,a,0];if(t.z>0){const t=180/r;Tl(p,p,[t/c+1,0,0,0,t/u+1,0,-.5*t/h,.5*t/d,1])}return p[2]=l,p[5]=t.x,p[8]=t.y,p},t.getImage=ft,t.getJSON=function(t,e){return lt(k(t,{type:"json"}),e)},t.getLatitudinalLod=function(t){const e=80.051129;t=T(t,-80.051129,e)/e*90;const n=Math.pow(Math.abs(Math.sin(_(t))),3);return Math.round(n*(hp.length-1))},t.getMapSessionAPI=Mt,t.getPerformanceMeasurement=jt,t.getProjection=sf,t.getRTLTextPluginStatus=Ro,t.getReferrer=st,t.getTilePoint=function(t,{x:e,y:n},r=0){return new f(((e-r)*t.scale-t.x)*As,(n*t.scale-t.y)*As)},t.getTileVec3=function(t,e,n=0){return jl(((e.x-n)*t.scale-t.x)*As,(e.y*t.scale-t.y)*As,$s(e.z,e.y))},t.getVideo=function(t,n){const r=e.document.createElement("video");r.muted=!0,r.onloadstart=function(){n(null,r)};for(let i=0;i<t.length;i++){const n=e.document.createElement("source");ut(t[i])||(r.crossOrigin="Anonymous"),n.src=t[i],r.appendChild(n)}return{cancel:()=>{}}},t.globeCenterToScreenPoint=function(t){const e=[0,0,0],n=El(new Float64Array(16));return Ol(n,t.pixelMatrix,t.globeMatrix),Xl(e,e,n),new f(e[0],e[1])},t.globeDenormalizeECEF=Ip,t.globeECEFOrigin=function(t,e){const n=[0,0,0];return Xl(n,n,Ap(_p(e.canonical))),Xl(n,n,t),n},t.globeNormalizeECEF=Ap,t.globePixelsToTileUnits=function(t,e){return As/(512*Math.pow(2,t))*Pp(_p(e))},t.globePoleMatrixForTile=function(t,e,n){const r=El(new Float64Array(16)),i=(e/(1<<t)-.5)*Math.PI*2;return Il(r,n.globeMatrix,i),Float32Array.from(r)},t.globeTileBounds=_p,t.globeTiltAtLngLat=Bp,t.globeToMercatorTransition=Dp,t.globeUseCustomAntiAliasing=function(t,e,n){const r=Dp(n.zoom),i=t.style.map._antialias,o=!!e.extStandardDerivatives,a=e.extStandardDerivativesForceOff||t.terrain&&t.terrain.exaggeration()>0;return 0===r&&!i&&!a&&o},t.identity=El,t.identity$1=oc,t.invert=Cl,t.isFullscreen=function(){return!!e.document.fullscreenElement||!!e.document.webkitFullscreenElement},t.isLngLatBehindGlobe=function(t,e){return Bp(t,e)>Math.PI/2*1.01},t.isMapAuthenticated=function(t){return Dt.has(t)},t.isMapboxURL=gt,t.isSafariWithAntialiasingBug=function(t){const e=t.navigator?t.navigator.userAgent:null;return!!W(t)&&e&&(e.match("Version/15.4")||e.match("Version/15.5")||e.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))},t.latFromMercatorY=Ns,t.latLngToECEF=Cp,t.len=tc,t.length=Rl,t.length$1=function(t){return Math.hypot(t[0],t[1],t[2],t[3])},t.lngFromMercatorX=Fs,t.loadVectorTile=xm,t.makeRequest=lt,t.mapValue=function(t,e,n,r,i){return T((t-e)/(n-e)*(i-r)+r,r,i)},t.mercatorScale=Us,t.mercatorXfromLng=Ls,t.mercatorYfromLat=Rs,t.mercatorZfromAltitude=js,t.mul=Bl,t.mul$1=Ql,t.multiply=Ol,t.multiply$1=Tl,t.multiply$2=$l,t.nextPowerOfTwo=D,t.normalize=ql,t.normalize$1=lc,t.normalize$2=nc,t.number=On,t.ortho=function(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*c,t[15]=1,t},t.pbf=Ih,t.perspective=function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},t.pick=function(t,e){const n={};for(let r=0;r<e.length;r++){const i=e[r];i in t&&(n[i]=t[i])}return n},t.plugin=Fo,t.pointGeometry=f,t.polygonContainsPoint=dl,t.polygonIntersectsBox=pl,t.polygonIntersectsPolygon=rl,t.polygonizeBounds=function(t,e,n=0,r=!0){const i=new f(n,n),o=t.sub(i),a=e.add(i),s=[o,new f(a.x,o.y),a,new f(o.x,a.y)];return r&&s.push(o.clone()),s},t.posAttributes=sp,t.postMapLoadEvent=Pt,t.postPerformanceEvent=At,t.postTurnstileEvent=Ct,t.potpack=nd,t.prevPowerOfTwo=function(t){return t<=1?1:Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},t.radToDeg=v,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.registerForPluginStateChange=function(t){return t({pluginStatus:Mo,pluginURL:Do}),Lo.on("pluginStateChange",t),t},t.removeAuthState=function(t){Dt.delete(t)},t.renderColorRamp=Ec,t.resample=qs,t.rotateX=Al,t.rotateX$1=ac,t.rotateY=Il,t.rotateY$1=sc,t.rotateZ=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=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+c*r,t[1]=a*i+u*r,t[2]=s*i+h*r,t[3]=l*i+d*r,t[4]=c*i-o*r,t[5]=u*i-a*r,t[6]=h*i-s*r,t[7]=d*i-l*r,t},t.rotateZ$1=function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=r*l+i*s,t[1]=i*l-r*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t},t.scale=kl,t.scale$1=ec,t.scale$2=Gl,t.scaleAndAdd=Hl,t.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},t.setCacheLimits=function(t,e){Q=t,tt=e},t.setColumn=function(t,e,n){t[4*e+0]=n[0],t[4*e+1]=n[1],t[4*e+2]=n[2],t[4*e+3]=n[3]},t.setRTLTextPlugin=function(t,e,n=!1){if(Mo===Po||Mo===ko||Mo===Ao)throw new Error("setRTLTextPlugin cannot be called multiple times.");Do=Ut.resolveURL(t),Mo=Po,Io=e,zo(),n||jo()},t.smoothstep=E,t.spec=Xt,t.squaredLength=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r},t.storeAuthState=function(t,e){e?Dt.add(t):Dt.delete(t)},t.sub=Jl,t.subtract=Nl,t.symbolSize=Ch,t.tileAABB=function(t,e,n,r,i,o,a,s,l){if("globe"===l.name)return wp(t,e,new Xu(n,r,i));const c=Fp({z:n,x:r,y:i},l);return new dc([(o+c.x/c.scale)*e,e*(c.y/c.scale),a],[(o+c.x2/c.scale)*e,e*(c.y2/c.scale),s])},t.tileCornersToBounds=Sp,t.tileTransform=Fp,t.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},t.transformMat4=Xl,t.transformMat4$1=rc,t.transformQuat=Yl,t.transitionTileAABBinECEF=bp,t.translate=Pl,t.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},t.triggerPluginCompletionEvent=Bo,t.uniqueId=I,t.updateGlobeVertexNormal=function(t,e,n,r,i){const o=5*e+2;t.float32[o+0]=n,t.float32[o+1]=r,t.float32[o+2]=i},t.validateCustomStyleLayer=function(t){const e=[],n=t.id;return void 0===n&&e.push({message:`layers.${n}: missing required property "id"`}),void 0===t.render&&e.push({message:`layers.${n}: missing required method "render"`}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:`layers.${n}: property "renderingMode" must be either "2d" or "3d"`}),e},t.validateFilter=(t=>zi(yi(t))),t.validateFog=(t=>zi(Pi(t))),t.validateLayer=(t=>zi(wi(t))),t.validateLight=(t=>zi(Ci(t))),t.validateSource=(t=>zi(Ei(t))),t.validateStyle=Mi,t.validateTerrain=(t=>zi(Oi(t))),t.values=P,t.vectorTile=yu,t.version=n,t.warnOnce=$,t.window=e,t.wrap=C}),r(["./shared"],function(t){function e(t){if("number"==typeof t||"boolean"==typeof t||"string"==typeof t||null==t)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(const r of t)n+=`${e(r)},`;return`${n}]`}let n="{";for(const r of Object.keys(t).sort())n+=`${r}:${e(t[r])},`;return`${n}}`}function n(n){let r="";for(const i of t.refProperties)r+=`/${e(n[i])}`;return r}class r{constructor(t){this.keyCache={},t&&this.replace(t)}replace(t){this._layerConfigs={},this._layers={},this.update(t,[])}update(e,r){for(const n of e)this._layerConfigs[n.id]=n,(this._layers[n.id]=t.createStyleLayer(n)).compileFilter(),this.keyCache[n.id]&&delete this.keyCache[n.id];for(const t of r)delete this.keyCache[t],delete this._layerConfigs[t],delete this._layers[t];this.familiesBySource={};const i=function(t,e){const r={};for(let o=0;o<t.length;o++){const i=e&&e[t[o].id]||n(t[o]);e&&(e[t[o].id]=i);let a=r[i];a||(a=r[i]=[]),a.push(t[o])}const i=[];for(const n in r)i.push(r[n]);return i}(t.values(this._layerConfigs),this.keyCache);for(const t of i){const e=t.map(t=>this._layers[t.id]),n=e[0];if("none"===n.visibility)continue;const r=n.source||"";let i=this.familiesBySource[r];i||(i=this.familiesBySource[r]={});const o=n.sourceLayer||"_geojsonTileLayer";let a=i[o];a||(a=i[o]=[]),a.push(e)}}}class i{loadTile(e,n){const{uid:r,encoding:i,rawImageData:o,padding:a,buildQuadTree:s}=e,l=t.window.ImageBitmap&&o instanceof t.window.ImageBitmap?this.getImageData(o,a):o;n(null,new t.DEMData(r,l,i,a<1,s))}getImageData(t,e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);const n=this.offscreenCanvasContext.getImageData(-e,-e,t.width+2*e,t.height+2*e);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),n}}var o=function t(e,n){var r,i=e&&e.type;if("FeatureCollection"===i)for(r=0;r<e.features.length;r++)t(e.features[r],n);else if("GeometryCollection"===i)for(r=0;r<e.geometries.length;r++)t(e.geometries[r],n);else if("Feature"===i)t(e.geometry,n);else if("Polygon"===i)a(e.coordinates,n);else if("MultiPolygon"===i)for(r=0;r<e.coordinates.length;r++)a(e.coordinates[r],n);return e};function a(t,e){if(0!==t.length){s(t[0],e);for(var n=1;n<t.length;n++)s(t[n],!e)}}function s(t,e){for(var n=0,r=0,i=0,o=t.length,a=o-1;i<o;a=i++){var s=(t[i][0]-t[a][0])*(t[a][1]+t[i][1]),l=n+s;r+=Math.abs(n)>=Math.abs(s)?n-l+s:s-l+n,n=l}n+r>=0!=!!e&&t.reverse()}const l=t.VectorTileFeature.prototype.toGeoJSON;class c{constructor(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}loadGeometry(){if(1===this._feature.type){const e=[];for(const n of this._feature.geometry)e.push([new t.pointGeometry(n[0],n[1])]);return e}{const e=[];for(const n of this._feature.geometry){const r=[];for(const e of n)r.push(new t.pointGeometry(e[0],e[1]));e.push(r)}return e}}toGeoJSON(t,e,n){return l.call(this,t,e,n)}}class u{constructor(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e}feature(t){return new c(this._features[t])}}var h={exports:{}},d=t.pointGeometry,p=t.vectorTile.VectorTileFeature,f=m;function m(t,e){this.options=e||{},this.features=t,this.length=t.length}function g(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}m.prototype.feature=function(t){return new g(this.features[t],this.options.extent)},g.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var n=t[e],r=[],i=0;i<n.length;i++)r.push(new d(n[i][0],n[i][1]));this.geometry.push(r)}return this.geometry},g.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 l=a[s];e=Math.min(e,l.x),n=Math.max(n,l.x),r=Math.min(r,l.y),i=Math.max(i,l.y)}return[e,r,n,i]},g.prototype.toGeoJSON=p.prototype.toGeoJSON;var y=t.pbf,_=f;function v(t){var e=new y;return function(t,e){for(var n in t.layers)e.writeMessage(3,b,t.layers[n])}(t,e),e.finish()}function b(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,x,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,C,o[n])}function x(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,w,t),e.writeVarintField(3,n.type),e.writeMessage(4,E,n)}function w(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 l=n.properties[s],c=o[s];if(null!==l){void 0===c&&(r.push(s),o[s]=c=r.length-1),e.writeVarint(c);var u=typeof l;"string"!==u&&"boolean"!==u&&"number"!==u&&(l=JSON.stringify(l));var h=u+":"+l,d=a[h];void 0===d&&(i.push(l),a[h]=d=i.length-1),e.writeVarint(d)}}}function S(t,e){return(e<<3)+(7&t)}function T(t){return t<<1^t>>31}function E(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s<a;s++){var l=n[s],c=1;1===r&&(c=l.length),e.writeVarint(S(1,c));for(var u=3===r?l.length-1:l.length,h=0;h<u;h++){1===h&&1!==r&&e.writeVarint(S(2,u-1));var d=l[h].x-i,p=l[h].y-o;e.writeVarint(T(d)),e.writeVarint(T(p)),i+=d,o+=p}3===r&&e.writeVarint(S(7,1))}}function C(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 O(t,e,n,r,i,o){if(i-r<=n)return;const a=r+i>>1;P(t,e,a,r,i,o%2),O(t,e,n,r,a-1,o+1),O(t,e,n,a+1,i,o+1)}function P(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);P(t,e,n,Math.max(r,Math.floor(n-s*c/a+u)),Math.min(i,Math.floor(n+(a-s)*c/a+u)),o)}const a=e[2*n+o];let s=r,l=i;for(k(t,e,r,n),e[2*i+o]>a&&k(t,e,r,i);s<l;){for(k(t,e,s,l),s++,l--;e[2*s+o]<a;)s++;for(;e[2*l+o]>a;)l--}e[2*r+o]===a?k(t,e,r,l):(l++,k(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function k(t,e,n,r){A(t,n,r),A(e,2*n,2*r),A(e,2*n+1,2*r+1)}function A(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function I(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}h.exports=v,h.exports.fromVectorTileJs=v,h.exports.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var r in t)n[r]=new _(t[r].features,e),n[r].name=r,n[r].version=e.version,n[r].extent=e.extent;return v({layers:n})},h.exports.GeoJSONWrapper=_;const M=t=>t[0],D=t=>t[1];class B{constructor(t,e=M,n=D,r=64,i=Float64Array){this.nodeSize=r,this.points=t;const o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new i(2*t.length);for(let l=0;l<t.length;l++)a[l]=l,s[2*l]=e(t[l]),s[2*l+1]=n(t[l]);O(a,s,r,0,a.length-1,0)}range(t,e,n,r){return function(t,e,n,r,i,o,a){const s=[0,t.length-1,0],l=[];let c,u;for(;s.length;){const h=s.pop(),d=s.pop(),p=s.pop();if(d-p<=a){for(let a=p;a<=d;a++)c=e[2*a],u=e[2*a+1],c>=n&&c<=i&&u>=r&&u<=o&&l.push(t[a]);continue}const f=Math.floor((p+d)/2);c=e[2*f],u=e[2*f+1],c>=n&&c<=i&&u>=r&&u<=o&&l.push(t[f]);const m=(h+1)%2;(0===h?n<=c:r<=u)&&(s.push(p),s.push(f-1),s.push(m)),(0===h?i>=c:o>=u)&&(s.push(f+1),s.push(d),s.push(m))}return l}(this.ids,this.coords,t,e,n,r,this.nodeSize)}within(t,e,n){return function(t,e,n,r,i,o){const a=[0,t.length-1,0],s=[],l=i*i;for(;a.length;){const c=a.pop(),u=a.pop(),h=a.pop();if(u-h<=o){for(let i=h;i<=u;i++)I(e[2*i],e[2*i+1],n,r)<=l&&s.push(t[i]);continue}const d=Math.floor((h+u)/2),p=e[2*d],f=e[2*d+1];I(p,f,n,r)<=l&&s.push(t[d]);const m=(c+1)%2;(0===c?n-i<=p:r-i<=f)&&(a.push(h),a.push(d-1),a.push(m)),(0===c?n+i>=p:r+i>=f)&&(a.push(d+1),a.push(u),a.push(m))}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}}const z={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},L=Math.fround||(R=new Float32Array(1),t=>(R[0]=+t,R[0]));var R;class j{constructor(t){this.options=q(Object.create(z),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:n,maxZoom:r,nodeSize:i}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;let a=[];for(let s=0;s<t.length;s++)t[s].geometry&&a.push(N(t[s],s));this.trees[r+1]=new B(a,W,Z,i,Float32Array),e&&console.timeEnd(o);for(let s=r;s>=n;s--){const t=+Date.now();a=this._cluster(a,s),this.trees[s]=new B(a,W,Z,i,Float32Array),e&&console.log("z%d: %d clusters in %dms",s,a.length,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,r,180,o],e),a=this.getClusters([-180,r,i,o],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],s=a.range(U(n),G(o),U(i),G(r)),l=[];for(const c of s){const t=a.points[c];l.push(t.numPoints?$(t):this.points[t.index])}return l}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.points[e];if(!o)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o.x,o.y,a),l=[];for(const c of s){const e=i.points[c];e.parentId===t&&l.push(e.numPoints?$(e):this.points[e.index])}if(0===l.length)throw new Error(r);return l}getLeaves(t,e,n){const r=[];return this._appendLeaves(r,t,e=e||10,n=n||0,0),r}getTile(t,e,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:a}=this.options,s=a/o,l=(n-s)/i,c=(n+1+s)/i,u={features:[]};return this._addTileFeatures(r.range((e-s)/i,l,(e+1+s)/i,c),r.points,e,n,i,u),0===e&&this._addTileFeatures(r.range(1-s/i,l,1,c),r.points,i,n,i,u),e===i-1&&this._addTileFeatures(r.range(0,l,s/i,c),r.points,-1,n,i,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,r,i){const o=this.getChildren(e);for(const a of o){const e=a.properties;if(e&&e.cluster?i+e.point_count<=r?i+=e.point_count:i=this._appendLeaves(t,e.cluster_id,n,r,i):i<r?i++:t.push(a),t.length===n)break}return i}_addTileFeatures(t,e,n,r,i,o){for(const a of t){const t=e[a],s=t.numPoints;let l,c,u;if(s)l=V(t),c=t.x,u=t.y;else{const e=this.points[t.index];l=e.properties,c=U(e.geometry.coordinates[0]),u=G(e.geometry.coordinates[1])}const h={type:1,geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(u*i-r))]],tags:l};let d;s?d=t.id:this.options.generateId?d=t.index:this.points[t.index].id&&(d=this.points[t.index].id),void 0!==d&&(h.id=d),o.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const n=[],{radius:r,extent:i,reduce:o,minPoints:a}=this.options,s=r/(i*Math.pow(2,e));for(let l=0;l<t.length;l++){const r=t[l];if(r.zoom<=e)continue;r.zoom=e;const i=this.trees[e+1],c=i.within(r.x,r.y,s),u=r.numPoints||1;let h=u;for(const t of c){const n=i.points[t];n.zoom>e&&(h+=n.numPoints||1)}if(h>u&&h>=a){let t=r.x*u,a=r.y*u,s=o&&u>1?this._map(r,!0):null;const d=(l<<5)+(e+1)+this.points.length;for(const n of c){const l=i.points[n];if(l.zoom<=e)continue;l.zoom=e;const c=l.numPoints||1;t+=l.x*c,a+=l.y*c,l.parentId=d,o&&(s||(s=this._map(r,!0)),o(s,this._map(l)))}r.parentId=d,n.push(F(t/h,a/h,d,h,s))}else if(n.push(r),h>1)for(const t of c){const r=i.points[t];r.zoom<=e||(r.zoom=e,n.push(r))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?q({},t.properties):t.properties;const n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?q({},r):r}}function F(t,e,n,r,i){return{x:L(t),y:L(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function N(t,e){const[n,r]=t.geometry.coordinates;return{x:L(U(n)),y:L(G(r)),zoom:1/0,index:e,parentId:-1}}function $(t){return{type:"Feature",id:t.id,properties:V(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),H(t.y)]}};var e}function V(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?Math.round(e/100)/10+"k":e;return q(q({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function U(t){return t/360+.5}function G(t){const 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 H(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function q(t,e){for(const n in e)t[n]=e[n];return t}function W(t){return t.x}function Z(t){return t.y}function X(t,e,n,r){for(var i,o=r,a=n-e>>1,s=n-e,l=t[e],c=t[e+1],u=t[n],h=t[n+1],d=e+3;d<n;d+=3){var p=Y(t[d],t[d+1],l,c,u,h);if(p>o)i=d,o=p;else if(p===o){var f=Math.abs(d-a);f<s&&(i=d,s=f)}}o>r&&(i-e>3&&X(t,e,i,r),t[i+2]=o,n-i>3&&X(t,i,n,r))}function Y(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((t-n)*a+(e-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=t-n)*a+(s=e-r)*s}function K(t,e,n,r){var i={id:void 0===t?null:t,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)J(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<e.length;r++)J(t,e[r]);else if("MultiPolygon"===n)for(r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)J(t,e[r][i])}(i),i}function J(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 Q(t,e,n,r){if(e.geometry){var i=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],l=e.id;if(n.promoteId?l=e.properties[n.promoteId]:n.generateId&&(l=r||0),"Point"===o)tt(i,s);else if("MultiPoint"===o)for(var c=0;c<i.length;c++)tt(i[c],s);else if("LineString"===o)et(i,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(c=0;c<i.length;c++)et(i[c],s=[],a,!1),t.push(K(l,"LineString",s,e.properties));return}nt(i,s,a,!1)}else if("Polygon"===o)nt(i,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(c=0;c<e.geometry.geometries.length;c++)Q(t,{id:l,geometry:e.geometry.geometries[c],properties:e.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(c=0;c<i.length;c++){var u=[];nt(i[c],u,a,!0),s.push(u)}}t.push(K(l,o,s,e.properties))}}function tt(t,e){e.push(rt(t[0])),e.push(it(t[1])),e.push(0)}function et(t,e,n,r){for(var i,o,a=0,s=0;s<t.length;s++){var l=rt(t[s][0]),c=it(t[s][1]);e.push(l),e.push(c),e.push(0),s>0&&(a+=r?(i*c-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-o,2))),i=l,o=c}var u=e.length-3;e[2]=1,X(e,0,u,n),e[u+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function nt(t,e,n,r){for(var i=0;i<t.length;i++){var o=[];et(t[i],o,n,r),e.push(o)}}function rt(t){return t/360+.5}function it(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 ot(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a<r)return t;if(a<n||o>=r)return null;for(var l=[],c=0;c<t.length;c++){var u=t[c],h=u.geometry,d=u.type,p=0===i?u.minX:u.minY,f=0===i?u.maxX:u.maxY;if(p>=n&&f<r)l.push(u);else if(!(f<n||p>=r)){var m=[];if("Point"===d||"MultiPoint"===d)at(h,m,n,r,i);else if("LineString"===d)st(h,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===d)ct(h,m,n,r,i,!1);else if("Polygon"===d)ct(h,m,n,r,i,!0);else if("MultiPolygon"===d)for(var g=0;g<h.length;g++){var y=[];ct(h[g],y,n,r,i,!0),y.length&&m.push(y)}if(m.length){if(s.lineMetrics&&"LineString"===d){for(g=0;g<m.length;g++)l.push(K(u.id,d,m[g],u.tags));continue}"LineString"!==d&&"MultiLineString"!==d||(1===m.length?(d="LineString",m=m[0]):d="MultiLineString"),"Point"!==d&&"MultiPoint"!==d||(d=3===m.length?"Point":"MultiPoint"),l.push(K(u.id,d,m,u.tags))}}}return l.length?l:null}function at(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 st(t,e,n,r,i,o,a){for(var s,l,c=lt(t),u=0===i?ht:dt,h=t.start,d=0;d<t.length-3;d+=3){var p=t[d],f=t[d+1],m=t[d+2],g=t[d+3],y=t[d+4],_=0===i?p:f,v=0===i?g:y,b=!1;a&&(s=Math.sqrt(Math.pow(p-g,2)+Math.pow(f-y,2))),_<n?v>n&&(l=u(c,p,f,g,y,n),a&&(c.start=h+s*l)):_>r?v<r&&(l=u(c,p,f,g,y,r),a&&(c.start=h+s*l)):ut(c,p,f,m),v<n&&_>=n&&(l=u(c,p,f,g,y,n),b=!0),v>r&&_<=r&&(l=u(c,p,f,g,y,r),b=!0),!o&&b&&(a&&(c.end=h+s*l),e.push(c),c=lt(t)),a&&(h+=s)}var x=t.length-3;p=t[x],f=t[x+1],m=t[x+2],(_=0===i?p:f)>=n&&_<=r&&ut(c,p,f,m),x=c.length-3,o&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&ut(c,c[0],c[1],c[2]),c.length&&e.push(c)}function lt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function ct(t,e,n,r,i,o){for(var a=0;a<t.length;a++)st(t[a],e,n,r,i,o,!1)}function ut(t,e,n,r){t.push(e),t.push(n),t.push(r)}function ht(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 dt(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 l=[],c=0;c<o.geometry[s].length;c++)l.push(ft(o.geometry[s][c],e));i.push(l)}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 mt(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 l=t.features[n],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(r=0;r<c.length;r+=2)l.geometry.push(gt(c[r],c[r+1],e,o,a,s));else for(r=0;r<c.length;r++){var h=[];for(i=0;i<c[r].length;i+=2)h.push(gt(c[r][i],c[r][i+1],e,o,a,s));l.geometry.push(h)}}return t.transformed=!0,t}function gt(t,e,n,r,i,o){return[Math.round(n*(t*r-i)),Math.round(n*(e*r-o))]}function yt(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++,_t(a,t[s],o,i);var l=t[s].minX,c=t[s].minY,u=t[s].maxX,h=t[s].maxY;l<a.minX&&(a.minX=l),c<a.minY&&(a.minY=c),u>a.maxX&&(a.maxX=u),h>a.maxY&&(a.maxY=h)}return a}function _t(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 l=0;l<i.length;l++){var c=i[l];for(s=0;s<c.length;s++)vt(a,c[s],t,n,!0,0===s)}if(a.length){var u=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var h in u={},e.tags)u[h]=e.tags[h];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var d={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:u};null!==e.id&&(d.id=e.id),t.features.push(d)}}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=[],l=0;l<e.length;l+=3)(0===r||e[l+2]>a)&&(n.numSimplified++,s.push(e[l]),s.push(e[l+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 bt(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");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)Q(n,t.features[r],e,r);else Q(n,"Feature"===t.type?t:{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=ot(t,1,-1-n,n,0,-1,2,e),o=ot(t,1,1-n,2+n,0,-1,2,e);return(i||o)&&(r=ot(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),r.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 xt(t,e,n){return 32*((1<<t)*n+e)+t}function wt(t,e){const n=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);const r=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!r)return e(null,null);const i=new u(r.features);let o=h.exports(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:i,rawData:o.buffer})}bt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},bt.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],l=this.options,c=l.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var u=1<<e,h=xt(e,n,r),d=this.tiles[h];if(!d&&(c>1&&console.time("creation"),d=this.tiles[h]=yt(t,e,n,r,l),this.tileCoords.push({z:e,x:n,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(d.source=t,i){if(e===l.maxZoom||e===i)continue;var f=1<<i-e;if(n!==Math.floor(o/f)||r!==Math.floor(a/f))continue}else if(e===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue;if(d.source=null,0!==t.length){c>1&&console.time("clipping");var m,g,y,_,v,b,x=.5*l.buffer/l.extent,w=.5-x,S=.5+x,T=1+x;m=g=y=_=null,v=ot(t,u,n-x,n+S,0,d.minX,d.maxX,l),b=ot(t,u,n+w,n+T,0,d.minX,d.maxX,l),t=null,v&&(m=ot(v,u,r-x,r+S,1,d.minY,d.maxY,l),g=ot(v,u,r+w,r+T,1,d.minY,d.maxY,l),v=null),b&&(y=ot(b,u,r-x,r+S,1,d.minY,d.maxY,l),_=ot(b,u,r+w,r+T,1,d.minY,d.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*r),s.push(g||[],e+1,2*n,2*r+1),s.push(y||[],e+1,2*n+1,2*r),s.push(_||[],e+1,2*n+1,2*r+1)}}},bt.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=xt(t,e=(e%a+a)%a,n);if(this.tiles[s])return mt(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var l,c=t,u=e,h=n;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[xt(c,u,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,h),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?mt(this.tiles[s],i):null):null};class St extends t.VectorTileWorkerSource{constructor(t,e,n,r,i){super(t,e,n,r,wt),i&&(this.loadGeoJSON=i)}loadData(e,n){const r=e&&e.request,i=r&&r.collectResourceTiming;this.loadGeoJSON(e,(a,s)=>{if(a||!s)return n(a);if("object"!=typeof s)return n(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`));{o(s,!0);try{if(e.filter){const n=t.createExpression(e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===n.result)throw new Error(n.value.map(t=>`${t.key}: ${t.message}`).join(", "));const r=s.features.filter(t=>n.value.evaluate({zoom:0},t));s={type:"FeatureCollection",features:r}}this._geoJSONIndex=e.cluster?new j(function({superclusterOptions:e,clusterProperties:n}){if(!n||!e)return e;const r={},i={},o={accumulated:null,zoom:0},a={properties:null},s=Object.keys(n);for(const l of s){const[e,o]=n[l],a=t.createExpression(o),s=t.createExpression("string"==typeof e?[e,["accumulated"],["get",l]]:e);r[l]=a.value,i[l]=s.value}return e.map=(t=>{a.properties=t;const e={};for(const n of s)e[n]=r[n].evaluate(o,a);return e}),e.reduce=((t,e)=>{a.properties=e;for(const n of s)o.accumulated=t[n],t[n]=i[n].evaluate(o,a)}),e}(e)).load(s.features):function(t,e){return new bt(t,e)}(s,e.geojsonVtOptions)}catch(a){return n(a)}this.loaded={};const l={};if(i){const n=t.getPerformanceMeasurement(r);n&&(l.resourceTiming={},l.resourceTiming[e.source]=JSON.parse(JSON.stringify(n)))}n(null,l)}})}reloadTile(t,e){const n=this.loaded;return n&&n[t.uid]?super.reloadTile(t,e):this.loadTile(t,e)}loadGeoJSON(e,n){if(e.request)t.getJSON(e.request,n);else{if("string"!=typeof e.data)return n(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`));try{return n(null,JSON.parse(e.data))}catch(t){return n(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}}getClusterChildren(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}}getClusterLeaves(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}}}class Tt{constructor(e){this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=t.getProjection({name:"mercator"}),this.workerSourceTypes={vector:t.VectorTileWorkerSource,geojson:St},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=((t,e)=>{if(this.workerSourceTypes[t])throw new Error(`Worker source with name "${t}" already registered.`);this.workerSourceTypes[t]=e}),this.self.registerRTLTextPlugin=(e=>{if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText})}clearCaches(t,e,n){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],n()}checkIfReady(t,e,n){n()}setReferrer(t,e){this.referrer=e}spriteLoaded(e,n){this.isSpriteLoaded[e]=n;for(const r in this.workerSources[e]){const i=this.workerSources[e][r];for(const e in i)i[e]instanceof t.VectorTileWorkerSource&&(i[e].isSpriteLoaded=n,i[e].fire(new t.Event("isSpriteLoaded")))}}setImages(t,e,n){this.availableImages[t]=e;for(const r in this.workerSources[t]){const n=this.workerSources[t][r];for(const t in n)n[t].availableImages=e}n()}enableTerrain(t,e,n){this.terrain=e,n()}setProjection(e,n){this.projections[e]=t.getProjection(n)}setLayers(t,e,n){this.getLayerIndex(t).replace(e),n()}updateLayers(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()}loadTile(e,n,r){const i=this.enableTerrain?t.extend({enableTerrain:this.terrain},n):n;i.projection=this.projections[e]||this.defaultProjection,this.getWorkerSource(e,n.type,n.source).loadTile(i,r)}loadDEMTile(e,n,r){const i=this.enableTerrain?t.extend({buildQuadTree:this.terrain},n):n;this.getDEMWorkerSource(e,n.source).loadTile(i,r)}reloadTile(e,n,r){const i=this.enableTerrain?t.extend({enableTerrain:this.terrain},n):n;i.projection=this.projections[e]||this.defaultProjection,this.getWorkerSource(e,n.type,n.source).reloadTile(i,r)}abortTile(t,e,n){this.getWorkerSource(t,e.type,e.source).abortTile(e,n)}removeTile(t,e,n){this.getWorkerSource(t,e.type,e.source).removeTile(e,n)}removeSource(t,e,n){if(!this.workerSources[t]||!this.workerSources[t][e.type]||!this.workerSources[t][e.type][e.source])return;const 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()}loadWorkerSource(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t.toString())}}syncRTLPluginState(e,n,r){try{t.plugin.setState(n);const e=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=e){this.self.importScripts(e);const n=t.plugin.isParsed();r(n?void 0:new Error(`RTL Text Plugin failed to import scripts from ${e}`),n)}}catch(t){r(t.toString())}}getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new r),e}getWorkerSource(t,e,n){if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][n]){const r={send:(e,n,r,i,o,a)=>{this.actor.send(e,n,r,t,o,a)},scheduler:this.actor.scheduler};this.workerSources[t][e][n]=new this.workerSourceTypes[e](r,this.getLayerIndex(t),this.getAvailableImages(t),this.isSpriteLoaded[t])}return this.workerSources[t][e][n]}getDEMWorkerSource(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new i),this.demWorkerSources[t][e]}enforceCacheSizeLimit(e,n){t.enforceCacheSizeLimit(n)}getWorkerPerformanceMetrics(t,e,n){n(void 0,void 0)}}return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new Tt(self)),Tt}),r(["./shared"],function(t){function e(t,n){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==n){if("object"!=typeof n)return!1;if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(!e(t[r],n[r]))return!1;return!0}return t===n}var n=r;function r(t){return!function(t){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":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?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var n=e.getImageData(0,0,1,1);return n&&n.width===t.width}()?(void 0===i[e=t&&t.failIfMajorPerformanceCaveat]&&(i[e]=function(t){var e,n=function(t){var e=document.createElement("canvas"),n=Object.create(r.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,e.getContext("webgl",n)||e.getContext("experimental-webgl",n)}(t);if(!n)return!1;try{e=n.createShader(n.VERTEX_SHADER)}catch(t){return!1}return!(!e||n.isContextLost())&&(n.shaderSource(e,"void main() {}
46"),n.compileShader(e),!0===n.getShaderParameter(e,n.COMPILE_STATUS))}(e)),i[e]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var e}(t)}var i={};function o(e,n,r){const i=t.window.document.createElement(e);return void 0!==n&&(i.className=n),r&&r.appendChild(i),i}function a(e,n,r){const i=t.window.document.createElementNS("http://www.w3.org/2000/svg",e);for(const t of Object.keys(n))i.setAttributeNS(null,t,n[t]);return r&&r.appendChild(i),i}r.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const s=t.window.document&&t.window.document.documentElement.style,l=s&&void 0!==s.userSelect?"userSelect":"WebkitUserSelect";let c;function u(){s&&l&&(c=s[l],s[l]="none")}function h(){s&&l&&(s[l]=c)}function d(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",d,!0)}function p(){t.window.addEventListener("click",d,!0),t.window.setTimeout(()=>{t.window.removeEventListener("click",d,!0)},0)}function f(t,e){const n=t.getBoundingClientRect();return y(t,n,e)}function m(t,e){const n=t.getBoundingClientRect(),r=[];for(let i=0;i<e.length;i++)r.push(y(t,n,e[i]));return r}function g(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button}function y(e,n,r){const i=e.offsetWidth===n.width?1:e.offsetWidth/n.width;return new t.pointGeometry((r.clientX-n.left)*i,(r.clientY-n.top)*i)}function _(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*o-i*r;return a?(t[0]=o*(a=1/a),t[1]=-r*a,t[2]=-i*a,t[3]=n*a,t):null}function v(t){const{userImage:e}=t;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}class b extends t.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:t,callback:e}of this.requestors)this._notify(t,e);this.requestors=[]}}hasImage(t){return!!this.getImage(t)}getImage(t){return this.images[t]}addImage(t,e){this._validate(t,e)&&(this.images[t]=e)}_validate(e,n){let r=!0;return this._validateStretch(n.stretchX,n.data&&n.data.width)||(this.fire(new t.ErrorEvent(new Error(`Image "${e}" has invalid "stretchX" value`))),r=!1),this._validateStretch(n.stretchY,n.data&&n.data.height)||(this.fire(new t.ErrorEvent(new Error(`Image "${e}" has invalid "stretchY" value`))),r=!1),this._validateContent(n.content,n)||(this.fire(new t.ErrorEvent(new Error(`Image "${e}" has invalid "content" value`))),r=!1),r}_validateStretch(t,e){if(!t)return!0;let n=0;for(const r of t){if(r[0]<n||r[1]<r[0]||e<r[1])return!1;n=r[1]}return!0}_validateContent(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))}updateImage(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0}removeImage(t){const e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(t,e){let n=!0;if(!this.isLoaded())for(const r of t)this.images[r]||(n=!1);this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})}_notify(e,n){const r={};for(const i of e){this.images[i]||this.fire(new t.Event("styleimagemissing",{id:i}));const e=this.images[i];e?r[i]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,hasRenderCallback:Boolean(e.userImage&&e.userImage.render)}:t.warnOnce(`Image "${i}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}n(null,r)}getPixelSize(){const{width:t,height:e}=this.atlasImage;return{width:t,height:e}}getPattern(e){const n=this.patterns[e],r=this.getImage(e);if(!r)return null;if(n&&n.position.version===r.version)return n.position;if(n)n.position.version=r.version;else{const n={w:r.data.width+2,h:r.data.height+2,x:0,y:0},i=new t.ImagePosition(n,r);this.patterns[e]={bin:n,position:i}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const n=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,n.RGBA),this.atlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const t in this.patterns)e.push(this.patterns[t].bin);const{w:n,h:r}=t.potpack(e),i=this.atlasImage;i.resize({width:n||1,height:r||1});for(const o in this.patterns){const{bin:e}=this.patterns[o],n=e.x+1,r=e.y+1,a=this.images[o].data,s=a.width,l=a.height;t.RGBAImage.copy(a,i,{x:0,y:0},{x:n,y:r},{width:s,height:l}),t.RGBAImage.copy(a,i,{x:0,y:l-1},{x:n,y:r-1},{width:s,height:1}),t.RGBAImage.copy(a,i,{x:0,y:0},{x:n,y:r+l},{width:s,height:1}),t.RGBAImage.copy(a,i,{x:s-1,y:0},{x:n-1,y:r},{width:1,height:l}),t.RGBAImage.copy(a,i,{x:0,y:0},{x:n+s,y:r},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}
vendor: 45,994 bytes, line 46
46dispatchRenderCallbacks(t){for(const e of t){if(this.callbackDispatchedThisFrame[e])continue;this.callbackDispatchedThisFrame[e]=!0;const t=this.images[e];v(t)&&this.updateImage(e,t)}}}const x=new t.Properties({anchor:new t.DataConstantProperty(t.spec.light.anchor),position:new class{constructor(){this.specification=t.spec.light.position}possiblyEvaluate(e,n){return function([e,n,r]){const i=t.degToRad(n+90),o=t.degToRad(r);return{x:e*Math.cos(i)*Math.sin(o),y:e*Math.sin(i)*Math.sin(o),z:e*Math.cos(o),azimuthal:n,polar:r}}(e.expression.evaluate(n))}interpolate(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),azimuthal:t.number(e.azimuthal,n.azimuthal,r),polar:t.number(e.polar,n.polar,r)}}},color:new t.DataConstantProperty(t.spec.light.color),intensity:new t.DataConstantProperty(t.spec.light.intensity)}),w="-transition";class S extends t.Evented{constructor(e){super(),this._transitionable=new t.Transitionable(x),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,n={}){if(!this._validate(t.validateLight,e,n))for(const r in e){const n=e[r];t.endsWith(r,w)?this._transitionable.setTransition(r.slice(0,-w.length),n):this._transitionable.setValue(r,n)}}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(e,n,r){return(!r||!1!==r.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:t.spec})))}}const T=new t.Properties({source:new t.DataConstantProperty(t.spec.terrain.source),exaggeration:new t.DataConstantProperty(t.spec.terrain.exaggeration)}),E="-transition";class C extends t.Evented{constructor(e,n){super(),this._transitionable=new t.Transitionable(T),this.set(e),this._transitioning=this._transitionable.untransitioned(),this.drapeRenderMode=n}get(){return this._transitionable.serialize()}set(e){for(const n in e){const r=e[n];t.endsWith(n,E)?this._transitionable.setTransition(n.slice(0,-E.length),r):this._transitionable.setValue(n,r)}}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}}function O(e,n,r,i){const o=t.smoothstep(45,65,r),[a,s]=P(e,i),l=t.length(n);let c=1-Math.min(1,Math.exp((l-a)/(s-a)*-6));return c*=c*c,c=Math.min(1,1.00747*c),c*o*e.alpha}function P(t,e){const n=.5/Math.tan(.5*e);return[t.range[0]+n,t.range[1]+n]}const k=new t.Properties({range:new t.DataConstantProperty(t.spec.fog.range),color:new t.DataConstantProperty(t.spec.fog.color),"high-color":new t.DataConstantProperty(t.spec.fog["high-color"]),"space-color":new t.DataConstantProperty(t.spec.fog["space-color"]),"horizon-blend":new t.DataConstantProperty(t.spec.fog["horizon-blend"]),"star-intensity":new t.DataConstantProperty(t.spec.fog["star-intensity"])}),A="-transition";class I extends t.Evented{constructor(e,n){super(),this._transitionable=new t.Transitionable(k),this.set(e),this._transitioning=this._transitionable.untransitioned(),this._transform=n}get state(){const e=this._transform,n="globe"===e.projection.name,r=t.globeToMercatorTransition(e.zoom),i=this.properties.get("range"),o=[.5,3];return{range:n?[t.number(o[0],i[0],r),t.number(o[1],i[1],r)]:i,horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(e,n={}){if(!this._validate(t.validateFog,e,n)){for(const n of Object.keys(t.spec.fog))e&&void 0===e[n]&&(e[n]=t.spec.fog[n].default);for(const n in e){const r=e[n];t.endsWith(n,A)?this._transitionable.setTransition(n.slice(0,-A.length),r):this._transitionable.setValue(n,r)}}}getOpacity(e){if(!this._transform.projection.supportsFog)return 0;const n=this.properties&&this.properties.get("color")||1;return("globe"===this._transform.projection.name?1:t.smoothstep(45,65,e))*n.a}getOpacityAtLatLng(e,n){return this._transform.projection.supportsFog?function(e,n,r){const i=t.MercatorCoordinate.fromLngLat(n),o=r.elevation?r.elevation.getAtPointOrZero(i):0,a=[i.x,i.y,o];return t.transformMat4(a,a,r.mercatorFogMatrix),O(e,a,r.pitch,r._fov)}(this.state,e,n):0}getFovAdjustedRange(t){return this._transform.projection.supportsFog?P(this.state,t):[0,1]}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(e,n,r){return(!r||!1!==r.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:t.spec})))}}class M{constructor(e,n){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t.uniqueId();const r=this.workerPool.acquire(this.id);for(let t=0;t<r.length;t++){const e=new M.Actor(r[t],n,this.id);e.name=`Worker ${t}`,this.actors.push(e)}this.ready=!1,this.broadcast("checkIfReady",null,()=>{this.ready=!0})}broadcast(e,n,r){t.asyncAll(this.actors,(t,r)=>{t.send(e,n,r)},r=r||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(t=>{t.remove()}),this.actors=[],this.workerPool.release(this.id)}}function D(e,n,r){return n*(t.EXTENT/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}M.Actor=t.Actor;class B{constructor(t,e,n,r){this.screenBounds=t,this.cameraPoint=e,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=n,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,r)}static createFromScreenPoints(e,n){let r,i;if(e instanceof t.pointGeometry||"number"==typeof e[0]){const o=t.pointGeometry.convert(e);r=[o],i=n.isPointAboveHorizon(o)}else{const o=t.pointGeometry.convert(e[0]),a=t.pointGeometry.convert(e[1]);r=[o,a],i=t.polygonizeBounds(o,a).every(t=>n.isPointAboveHorizon(t))}return new B(r,n.getCameraPoint(),i,n)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(e){return t.polygonizeBounds(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],e)}bufferedCameraGeometry(e){const n=this.screenBounds[0],r=1===this.screenBounds.length?this.screenBounds[0].add(new t.pointGeometry(1,1)):this.screenBounds[1],i=t.polygonizeBounds(n,r,0,!1);return this.cameraPoint.y>r.y&&(this.cameraPoint.x>n.x&&this.cameraPoint.x<r.x?i.splice(3,0,this.cameraPoint):this.cameraPoint.x>=r.x?i[2]=this.cameraPoint:this.cameraPoint.x<=n.x&&(i[3]=this.cameraPoint)),t.bufferConvexPolygon(i,e)}bufferedCameraGeometryGlobe(e){const n=this.screenBounds[0],r=1===this.screenBounds.length?this.screenBounds[0].add(new t.pointGeometry(1,1)):this.screenBounds[1],i=t.polygonizeBounds(n,r,e),o=this.cameraPoint.clone();switch(3*((o.y>n.y)+(o.y>r.y))+((o.x>n.x)+(o.x>r.x))){case 0:i[0]=o,i[4]=o.clone();break;case 1:i.splice(1,0,o);break;case 2:i[1]=o;break;case 3:i.splice(4,0,o);break;case 5:i.splice(2,0,o);break;case 6:i[3]=o;break;case 7:i.splice(3,0,o);break;case 8:i[2]=o}return i}containsTile(e,n,r,i=0){const o=e.queryPadding/n._pixelsPerMercatorPixel+1,a=r?this._bufferedCameraMercator(o,n):this._bufferedScreenMercator(o,n);let s=e.tileID.wrap+(a.unwrapped?i:0);const l=a.polygon.map(n=>t.getTilePoint(e.tileTransform,n,s));if(!t.polygonIntersectsBox(l,0,0,t.EXTENT,t.EXTENT))return;s=e.tileID.wrap+(this.screenGeometryMercator.unwrapped?i:0);const c=this.screenGeometryMercator.polygon.map(n=>t.getTileVec3(e.tileTransform,n,s)),u=c.map(e=>new t.pointGeometry(e[0],e[1])),h=n.getFreeCameraOptions().position||new t.MercatorCoordinate(0,0,0),d=t.getTileVec3(e.tileTransform,h,s),p=c.map(e=>{const n=t.sub(e,e,d);return t.normalize(n,n),new t.Ray(d,n)}),f=D(e,1,n.zoom)*n._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:u,tilespaceRays:p,bufferedTilespaceGeometry:l,bufferedTilespaceBounds:(m=t.getBounds(l),m.min.x=t.clamp(m.min.x,0,t.EXTENT),m.min.y=t.clamp(m.min.y,0,t.EXTENT),m.max.x=t.clamp(m.max.x,0,t.EXTENT),m.max.y=t.clamp(m.max.y,0,t.EXTENT),m),tile:e,tileID:e.tileID,pixelToTileUnitsFactor:f};var m}_bufferedScreenMercator(t,e){const n=R(t);if(this._screenRaycastCache[n])return this._screenRaycastCache[n];{let r;return r="globe"===e.projection.name?this._projectAndResample(this.bufferedScreenGeometry(t),e):{polygon:this.bufferedScreenGeometry(t).map(t=>e.pointCoordinate3D(t)),unwrapped:!0},this._screenRaycastCache[n]=r,r}}_bufferedCameraMercator(t,e){const n=R(t);if(this._cameraRaycastCache[n])return this._cameraRaycastCache[n];{let r;return r="globe"===e.projection.name?this._projectAndResample(this.bufferedCameraGeometryGlobe(t),e):{polygon:this.bufferedCameraGeometry(t).map(t=>e.pointCoordinate3D(t)),unwrapped:!0},this._cameraRaycastCache[n]=r,r}}_projectAndResample(e,n){const r=function(e,n){const r=t.multiply([],n.pixelMatrix,n.globeMatrix),i=[0,-t.GLOBE_RADIUS,0,1],o=[0,t.GLOBE_RADIUS,0,1],a=[0,0,0,1];t.transformMat4$1(i,i,r),t.transformMat4$1(o,o,r),t.transformMat4$1(a,a,r);const s=new t.pointGeometry(i[0]/i[3],i[1]/i[3]),l=new t.pointGeometry(o[0]/o[3],o[1]/o[3]),c=t.polygonContainsPoint(e,s)&&i[3]<a[3],u=t.polygonContainsPoint(e,l)&&o[3]<a[3];if(!c&&!u)return null;const h=function(t,e,n){for(let r=1;r<t.length;r++){const i=L(e.pointCoordinate3D(t[r-1]).x),o=L(e.pointCoordinate3D(t[r]).x);if(n<0){if(i<o)return{idx:r,t:-i/(o-1-i)}}else if(o<i)return{idx:r,t:(1-i)/(o+1-i)}}return null}(e,n,c?-1:1);if(!h)return null;const{idx:d,t:p}=h;let f=d>1?z(e.slice(0,d),n):[],m=d<e.length?z(e.slice(d),n):[];f=f.map(e=>new t.pointGeometry(L(e.x),e.y)),m=m.map(e=>new t.pointGeometry(L(e.x),e.y));const g=[...f];0===g.length&&g.push(m[m.length-1]);const y=t.number(g[g.length-1].y,(0===m.length?f[0]:m[0]).y,p);let _;return _=c?[new t.pointGeometry(0,y),new t.pointGeometry(0,0),new t.pointGeometry(1,0),new t.pointGeometry(1,y)]:[new t.pointGeometry(1,y),new t.pointGeometry(1,1),new t.pointGeometry(0,1),new t.pointGeometry(0,y)],g.push(..._),0===m.length?g.push(f[0]):g.push(...m),{polygon:g.map(e=>new t.MercatorCoordinate(e.x,e.y)),unwrapped:!1}}(e,n);if(r)return r;const i=function(e,n){let r=!1,i=-1/0,o=0;for(let t=0;t<e.length-1;t++)e[t].x>i&&(i=e[t].x,o=t);for(let t=0;t<e.length-1;t++){const n=(o+t)%(e.length-1),i=e[n],a=e[n+1];Math.abs(i.x-a.x)>.5&&(i.x<a.x?(i.x+=1,0===n&&(e[e.length-1].x+=1)):(a.x+=1,n+1===e.length-1&&(e[0].x+=1)),r=!0)}const a=t.mercatorXfromLng(n.center.lng);return r&&a<Math.abs(a-1)&&e.forEach(t=>{t.x-=1}),{polygon:e,unwrapped:r}}(z(e,n).map(e=>new t.pointGeometry(L(e.x),e.y)),n);return{polygon:i.polygon.map(e=>new t.MercatorCoordinate(e.x,e.y)),unwrapped:i.unwrapped}}}function z(e,n){return t.resample(e,t=>{const e=n.pointCoordinate3D(t);t.x=e.x,t.y=e.y},1/256)}function L(t){return t<0?1+t%1:t%1}function R(t){return 100*t|0}function j(e,n,r,i,o){const a=function(r,i){if(r)return o(r);if(i){e.url&&i.tiles&&e.tiles&&delete e.tiles;const r=t.pick(t.extend(i,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);i.vector_layers&&(r.vectorLayers=i.vector_layers,r.vectorLayerIds=r.vectorLayers.map(t=>t.id)),r.tiles=n.canonicalizeTileset(r,e.url),o(null,r)}};return e.url?t.getJSON(n.transformRequest(n.normalizeSourceURL(e.url,null,r,i),t.ResourceType.Source),a):t.exported.frame(()=>a(null,e))}class F{constructor(e,n,r){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=n||0,this.maxzoom=r||24}validateBounds(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]}contains(e){const n=Math.pow(2,e.z),r=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*n),i=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*n),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*n);return e.x>=r&&e.x<o&&e.y>=i&&e.y<a}}class N{constructor(t,e,n){this.context=t;const r=t.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||e.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const $={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class V{constructor(t,e,n,r){this.length=e.length,this.attributes=n,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.context=t;const 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||e.destroy()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){const e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,e){for(let n=0;n<this.attributes.length;n++){const r=e.attributes[this.attributes[n].name];void 0!==r&&t.enableVertexAttribArray(r)}}setVertexAttribPointers(t,e,n){for(let r=0;r<this.attributes.length;r++){const i=this.attributes[r],o=e.attributes[i.name];void 0!==o&&t.vertexAttribPointer(o,i.components,t[$[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class U{constructor(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(t){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class G extends U{getDefault(){return t.Color.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class H extends U{getDefault(){return 1}set(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)}}class q extends U{getDefault(){return 0}set(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)}}class W extends U{getDefault(){return[!0,!0,!0,!0]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class Z extends U{getDefault(){return!0}set(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)}}class X extends U{getDefault(){return 255}set(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)}}class Y extends U{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(t){const e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)}}class K extends U{getDefault(){const t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)}}class J extends U{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}}class Q extends U{getDefault(){return[0,1]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)}}class tt extends U{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}}class et extends U{getDefault(){return this.gl.LESS}set(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)}}class nt extends U{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}}class rt extends U{getDefault(){const t=this.gl;return[t.ONE,t.ZERO]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)}}class it extends U{getDefault(){return t.Color.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class ot extends U{getDefault(){return this.gl.FUNC_ADD}set(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)}}class at extends U{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}}class st extends U{getDefault(){return this.gl.BACK}set(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)}}class lt extends U{getDefault(){return this.gl.CCW}set(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)}}class ct extends U{getDefault(){return null}set(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)}}class ut extends U{getDefault(){return this.gl.TEXTURE0}set(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)}}class ht extends U{getDefault(){const t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class dt extends U{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}}class pt extends U{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class ft extends U{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}}class mt extends U{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class gt extends U{getDefault(){return null}set(t){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class yt extends U{constructor(t){super(t),this.vao=t.extVertexArrayObject}getDefault(){return null}set(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)}}class _t extends U{getDefault(){return 4}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}}class vt extends U{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}}class bt extends U{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}}class xt extends U{constructor(t,e){super(t),this.context=t,this.parent=e}getDefault(){return null}}class wt extends xt{setDirty(){this.dirty=!0}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}class St extends xt{attachment(){return this.gl.DEPTH_ATTACHMENT}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,this.attachment(),e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class Tt extends St{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}class Et{constructor(t,e,n,r){this.context=t,this.width=e,this.height=n;const i=this.framebuffer=t.gl.createFramebuffer();this.colorAttachment=new wt(t,i),r&&(this.depthAttachment=new St(t,i))}destroy(){const t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){const e=this.depthAttachment.get();e&&t.deleteRenderbuffer(e)}t.deleteFramebuffer(this.framebuffer)}}class Ct{constructor(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new G(this),this.clearDepth=new H(this),this.clearStencil=new q(this),this.colorMask=new W(this),this.depthMask=new Z(this),this.stencilMask=new X(this),this.stencilFunc=new Y(this),this.stencilOp=new K(this),this.stencilTest=new J(this),this.depthRange=new Q(this),this.depthTest=new tt(this),this.depthFunc=new et(this),this.blend=new nt(this),this.blendFunc=new rt(this),this.blendColor=new it(this),this.blendEquation=new ot(this),this.cullFace=new at(this),this.cullFaceSide=new st(this),this.frontFace=new lt(this),this.program=new ct(this),this.activeTexture=new ut(this),this.viewport=new ht(this),this.bindFramebuffer=new dt(this),this.bindRenderbuffer=new pt(this),this.bindTexture=new ft(this),this.bindVertexBuffer=new mt(this),this.bindElementBuffer=new gt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new yt(this),this.pixelStoreUnpack=new _t(this),this.pixelStoreUnpackPremultiplyAlpha=new vt(this),this.pixelStoreUnpackFlipY=new bt(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.extTextureFilterAnisotropicForceOff=!1,this.extStandardDerivativesForceOff=!1,this.extDebugRendererInfo=t.getExtension("WEBGL_debug_renderer_info"),this.extDebugRendererInfo&&(this.renderer=t.getParameter(this.extDebugRendererInfo.UNMASKED_RENDERER_WEBGL),this.vendor=t.getParameter(this.extDebugRendererInfo.UNMASKED_VENDOR_WEBGL)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extStandardDerivatives=t.getExtension("OES_standard_derivatives"),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(t,e){return new N(this,t,e)}createVertexBuffer(t,e,n){return new V(this,t,e,n)}createRenderbuffer(t,e,n){const r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,t,e,n),this.bindRenderbuffer.set(null),i}createFramebuffer(t,e,n){return new Et(this,t,e,n)}clear({color:t,depth:e,stencil:n}){const r=this.gl;let i=0;t&&(i|=r.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==e&&(i|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(e),this.depthMask.set(!0)),void 0!==n&&(i|=r.STENCIL_BUFFER_BIT,this.clearStencil.set(n),this.stencilMask.set(255)),r.clear(i)}setCullFace(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))}setDepthMode(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)}setStencilMode(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)}setColorMode(n){e(n.blendFunction,t.ColorMode.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(n.blendFunction),this.blendColor.set(n.blendColor)),this.colorMask.set(n.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class Ot extends t.Evented{constructor(e,n,r,i){super(),this.id=e,this.dispatcher=r,this.setEventedParent(i),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({type:"raster"},n),t.extend(this,t.pick(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=j(this._options,this.map._requestManager,null,null,(e,n)=>{this._tileJSONRequest=null,this._loaded=!0,e?this.fire(new t.ErrorEvent(e)):n&&(t.extend(this,n),n.bounds&&(this.tileBounds=new F(n.bounds,this.minzoom,this.maxzoom)),t.postTurnstileEvent(n.tiles),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return t.extend({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(e,n){const r=t.exported.devicePixelRatio>=2,i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),r,this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(i,t.ResourceType.Tile),(r,i,o,a)=>(delete e.request,e.aborted?(e.state="unloaded",n(null)):r?(e.state="errored",n(r)):i?(this.map._refreshExpiredTiles&&e.setExpiryData({cacheControl:o,expires:a}),e.setTexture(i,this.map.painter),e.state="loaded",t.cacheEntryPossiblyAdded(this.dispatcher),void n(null)):n(null)))}static loadTileData(t,e,n){t.setTexture(e,n)}static unloadTileData(t,e){t.texture&&e.saveTileTexture(t.texture)}abortTile(t,e){t.request&&(t.request.cancel(),delete t.request),e()}unloadTile(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()}hasTransition(){return!1}}let Pt;function kt(e,n,r,i,o,a,s,l){const c=[e,r,o,n,i,a,1,1,1],u=[s,l,1],h=t.adjoint([],c),[d,p,f]=t.transformMat3(u,u,t.transpose(h,h));return t.multiply$1(c,[d,0,0,0,p,0,0,0,f],c)}class At extends t.Evented{constructor(t,e,n,r){super(),this.id=t,this.dispatcher=n,this.coordinates=e.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=e,this._dirty=!1}load(e,n){this._loaded=n||!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._imageRequest=t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(n,r)=>{if(this._imageRequest=null,this._loaded=!0,n)this.fire(new t.ErrorEvent(n));else if(r){const{HTMLImageElement:n}=t.window;this.image=r instanceof n?t.exported.getImageData(r):r,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,e&&(this.coordinates=e),this._finishLoading()}})}loaded(){return this._loaded}updateImage(t){return this.image&&t.url?(this._imageRequest&&t.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=t.url,this.load(t.coordinates,this._loaded),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),this.texture&&this.texture.destroy()}setCoordinates(e){this.coordinates=e,this._boundsArray=void 0;const n=e.map(t.MercatorCoordinate.fromLngLat);return this.tileID=function(e){let n=1/0,r=1/0,i=-1/0,o=-1/0;for(const t of e)n=Math.min(n,t.x),r=Math.min(r,t.y),i=Math.max(i,t.x),o=Math.max(o,t.y);const a=Math.max(i-n,o-r),s=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),l=Math.pow(2,s);return new t.CanonicalTileID(s,Math.floor((n+i)/2*l),Math.floor((r+o)/2*l))}(n),this.minzoom=this.maxzoom=this.tileID.z,this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(e){for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture)}if(this._boundsArray)return;const n=t.tileTransform(this.tileID,this.map.transform.projection),[r,i,o,a]=this.coordinates.map(e=>{const r=n.projection.project(e[0],e[1]);return t.getTilePoint(n,r)._round()});this.perspectiveTransform=function(e,n,r,i,o,a,s,l,c,u){const h=kt(0,0,e,0,0,n,e,n),d=kt(r,i,o,a,s,l,c,u);return t.multiply$1(d,t.adjoint(h,h),d),[d[6]/d[8]*e/t.EXTENT,d[7]/d[8]*n/t.EXTENT]}(this.width,this.height,r.x,r.y,i.x,i.y,a.x,a.y,o.x,o.y);const s=this._boundsArray=new t.StructArrayLayout4i8;s.emplaceBack(r.x,r.y,0,0),s.emplaceBack(i.x,i.y,t.EXTENT,0),s.emplaceBack(a.x,a.y,0,t.EXTENT),s.emplaceBack(o.x,o.y,t.EXTENT,t.EXTENT),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=e.createVertexBuffer(s,t.boundsAttributes.members),this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const e=this.map.painter.context,n=e.gl;this._dirty&&(this.texture?this.texture.update(this.image):(this.texture=new t.Texture(e,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this._dirty=!1),this._prepareData(e)}loadTile(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))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const It={vector:class extends t.Evented{constructor(e,n,r,i){if(super(),this.id=e,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(n,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(i),this._tileWorkers={},this._deduped=new t.DedupedRequest}load(e){this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"}));const n=Array.isArray(this.map._language)?this.map._language.join():this.map._language,r=this.map._worldview;this._tileJSONRequest=j(this._options,this.map._requestManager,n,r,(i,o)=>{this._tileJSONRequest=null,this._loaded=!0,i?(n&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${n}`),r&&2!==r.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${r}`),this.fire(new t.ErrorEvent(i))):o&&(t.extend(this,o),o.bounds&&(this.tileBounds=new F(o.bounds,this.minzoom,this.maxzoom)),t.postTurnstileEvent(o.tiles,this.map._requestManager._customAccessToken),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"}))),e&&e(i)})}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>{const t=this.map.style._getSourceCaches(this.id);for(const e of t)e.clearTiles()})}setSourceProperty(t){t(),this.reload()}setTiles(t){return this._options.tiles=t,this.reload(),this}setUrl(t){return this.url=t,this._options.url=t,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return t.extend({},this._options)}loadTile(e,n){const r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),i={request:this.map._requestManager.transformRequest(r,t.ResourceType.Tile),data:void 0,uid:e.uid,tileID:e.tileID,tileZoom:e.tileZoom,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:e.isSymbolTile};if(i.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state)"loading"===e.state?e.reloadCallback=n:e.request=e.actor.send("reloadTile",i,o.bind(this));else if(e.actor=this._tileWorkers[r]=this._tileWorkers[r]||this.dispatcher.getActor(),this.dispatcher.ready)e.request=e.actor.send("loadTile",i,o.bind(this),void 0,!0);else{const n=t.loadVectorTile.call({deduped:this._deduped},i,(t,n)=>{t||!n?o.call(this,t):(i.data={cacheControl:n.cacheControl,expires:n.expires,rawData:n.rawData.slice(0)},e.actor&&e.actor.send("loadTile",i,o.bind(this),void 0,!0))},!0);e.request={cancel:n}}function o(r,i){return delete e.request,e.aborted?n(null):r&&404!==r.status?n(r):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),n(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id})}unloadTile(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}},raster:Ot,"raster-dem":class extends Ot{constructor(e,n,r,i){super(e,n,r,i),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}loadTile(e,n){const r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function i(t,r){t&&(e.state="errored",n(t)),r&&(e.dem=r,e.dem.onDeserialize(),e.needsHillshadePrepare=!0,e.needsDEMTextureUpload=!0,e.state="loaded",n(null))}e.request=t.getImage(this.map._requestManager.transformRequest(r,t.ResourceType.Tile),function(r,o,a,s){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(r)e.state="errored",n(r);else if(o){this.map._refreshExpiredTiles&&e.setExpiryData({cacheControl:a,expires:s});const n=t.window.ImageBitmap&&o instanceof t.window.ImageBitmap&&(null==Pt&&(Pt=t.window.OffscreenCanvas&&new t.window.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof t.window.createImageBitmap),Pt),r=1-(o.width-t.prevPowerOfTwo(o.width))/2;r<1||e.neighboringTiles||(e.neighboringTiles=this._getNeighboringTiles(e.tileID));const l=n?o:t.exported.getImageData(o,r),c={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:l,encoding:this.encoding,padding:r};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",c,i.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(e){const 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,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<r&&(l[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),l}unloadTile(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"}},geojson:class extends t.Evented{constructor(e,n,r,i){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._loaded=!1,this.actor=r.getActor(),this.setEventedParent(i),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const o=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:t.EXTENT,radius:(void 0!==n.clusterRadius?n.clusterRadius:50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions)}onAdd(t){this.map=t,this.setData(this._data)}setData(t){return this._data=t,this._updateWorkerData(),this}getClusterExpansionZoom(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this}getClusterChildren(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this}getClusterLeaves(t,e,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},r),this}_updateWorkerData(){if(this._pendingLoad)return void(this._coalesce=!0);this.fire(new t.Event("dataloading",{dataType:"source"})),this._loaded=!1;const e=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(e.request=this.map._requestManager.transformRequest(t.exported.resolveURL(n),t.ResourceType.Source),e.request.collectResourceTiming=this._collectResourceTiming):e.data=JSON.stringify(n),this._pendingLoad=this.actor.send(`${this.type}.loadData`,e,(e,n)=>{if(this._loaded=!0,this._pendingLoad=null,e)this.fire(new t.ErrorEvent(e));else{const e={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&n&&n.resourceTiming&&n.resourceTiming[this.id]&&(e.resourceTiming=n.resourceTiming[this.id]),this.fire(new t.Event("data",e)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)})}loaded(){return this._loaded}loadTile(e,n){const r=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(r,{type:this.type,uid:e.uid,tileID:e.tileID,tileZoom:e.tileZoom,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(t,i)=>(delete e.request,e.unloadVectorData(),e.aborted?n(null):t?n(t):(e.loadVectorData(i,this.map.painter,"reloadTile"===r),n(null))),void 0,"loadTile"===r)}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return t.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends At{constructor(t,e,n,r){super(t,e,n,r),this.roundZoom=!0,this.type="video",this.options=e}load(){this._loaded=!1;const e=this.options;this.urls=[];for(const n of e.urls)this.urls.push(this.map._requestManager.transformRequest(n,t.ResourceType.Source).url);t.getVideo(this.urls,(e,n)=>{this._loaded=!0,e?this.fire(new t.ErrorEvent(e)):n&&(this.video=n,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const n=this.video.seekable;e<n.start(0)||e>n.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const e=this.map.painter.context,n=e.gl;this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(e)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:At,canvas:class extends At{constructor(e,n,r,i){super(e,n,r,i),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(t=>!Array.isArray(t)||2!==t.length||t.some(t=>"number"!=typeof t))||this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,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.ValidationError(`sources.${e}`,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const n=this.map.painter.context;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(n,this.canvas,n.gl.RGBA,{premultiply:!0}),this._prepareData(n)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}},custom:class extends t.Evented{constructor(e,n,r,i){super(),this.id=e,this.type="custom",this._dataType="raster",this._dispatcher=r,this._implementation=n,this.setEventedParent(i),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new t.ErrorEvent(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new t.ErrorEvent(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new F(this._implementation.bounds,this.minzoom,this.maxzoom)),n.update=this._update.bind(this),n.clearTiles=this._clearTiles.bind(this),n.coveringTiles=this._coveringTiles.bind(this),t.extend(this,t.pick(n,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileC
46acheSize"]))}serialize(){return t.pick(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(e){this._map=e,this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(e),this.load()}onRemove(t){this._implementation.onRemove&&this._implementation.onRemove(t)}hasTile(t){if(this._implementation.hasTile){const{x:e,y:n,z:r}=t.canonical;return this._implementation.hasTile({x:e,y:n,z:r})}return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(e,n){const{x:r,y:i,z:o}=e.tileID.canonical,a=new t.window.AbortController;e.request=Promise.resolve(this._implementation.loadTile({x:r,y:i,z:o},{signal:a.signal})).then(function(r){return delete e.request,e.aborted?(e.state="unloaded",n(null)):void 0===r?(e.state="errored",n(null)):null===r?(this.loadTileData(e,{width:this.tileSize,height:this.tileSize,data:null}),e.state="loaded",n(null)):function(e){return e instanceof t.window.ImageData||e instanceof t.window.HTMLCanvasElement||e instanceof t.window.ImageBitmap||e instanceof t.window.HTMLImageElement}(r)?(this.loadTileData(e,r),e.state="loaded",void n(null)):(e.state="errored",n(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)))}.bind(this)).catch(t=>{20!==t.code&&(e.state="errored",n(t))}),e.request.cancel=(()=>a.abort())}loadTileData(t,e){Ot.loadTileData(t,e,this._map.painter)}unloadTileData(t){Ot.unloadTileData(t,this._map.painter)}unloadTile(t,e){if(this.unloadTileData(t),this._implementation.unloadTile){const{x:e,y:n,z:r}=t.tileID.canonical;this._implementation.unloadTile({x:e,y:n,z:r})}e()}abortTile(t,e){t.request&&t.request.cancel&&(t.request.cancel(),delete t.request),e()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(t=>({x:t.canonical.x,y:t.canonical.y,z:t.canonical.z}))}_clearTiles(){this._map.style._clearSource(this.id)}_update(){this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"}))}}},Mt=function(e,n,r,i){const o=new It[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};function Dt(e,n){const r=t.identity([]);return t.scale(r,r,[.5*e.width,.5*-e.height,1]),t.translate(r,r,[1,-1,0]),t.multiply(r,r,e.calculateProjMatrix(n.toUnwrapped())),Float32Array.from(r)}function Bt(t,e,n,r,i,o,a,s=!1){const l=t.tilesIn(r,a,s);l.sort(Lt);const c=[];for(const h of l)c.push({wrappedTileID:h.tile.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,n,t._state,h,i,o,Dt(t.transform,h.tile.tileID),s)});const u=function(t){const e={},n={};for(const r of t){const t=r.queryResults,i=r.wrappedTileID,o=n[i]=n[i]||{};for(const n in t){const r=t[n],i=o[n]=o[n]||{},a=e[n]=e[n]||[];for(const t of r)i[t.featureIndex]||(i[t.featureIndex]=!0,a.push(t))}}return e}(c);for(const h in u)u[h].forEach(e=>{const n=e.feature,r=n.layer;r&&"background"!==r.type&&"sky"!==r.type&&(n.source=r.source,r["source-layer"]&&(n.sourceLayer=r["source-layer"]),n.state=void 0!==n.id?t.getFeatureState(r["source-layer"],n.id):{})});return u}function zt(t,e){const n=t.getRenderableIds().map(e=>t.getTileByID(e)),r=[],i={};for(let o=0;o<n.length;o++){const t=n[o],a=t.tileID.canonical.key;i[a]||(i[a]=!0,t.querySourceFeatures(r,e))}return r}function Lt(t,e){const 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 Rt(){return null!=yo.workerClass?new yo.workerClass:new t.window.Worker(yo.workerUrl)}const jt="mapboxgl_preloaded_worker_pool";class Ft{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length<Ft.workerCount;)this.workers.push(new Rt);return this.active[t]=!0,this.workers.slice()}release(t){delete this.active[t],0===this.numActive()&&(this.workers.forEac
vendor: 73,859 bytes, line 46
46h(t=>{t.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[jt]}numActive(){return Object.keys(this.active).length}}let Nt;function $t(){return Nt||(Nt=new Ft),Nt}function Vt(e,n){const r={};for(const t in e)"ref"!==t&&(r[t]=e[t]);return t.refProperties.forEach(t=>{t in n&&(r[t]=n[t])}),r}function Ut(t){t=t.slice();const e=Object.create(null);for(let n=0;n<t.length;n++)e[t[n].id]=t[n];for(let n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=Vt(t[n],e[t[n].ref]));return t}Ft.workerCount=2;const Gt={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",setTerrain:"setTerrain",setFog:"setFog",setProjection:"setProjection"};function Ht(t,e,n){n.push({command:Gt.addSource,args:[t,e[t]]})}function qt(t,e,n){e.push({command:Gt.removeSource,args:[t]}),n[t]=!0}function Wt(t,e,n,r){qt(t,n,r),Ht(t,e,n)}function Zt(t,n,r){let i;for(i in t[r])if(t[r].hasOwnProperty(i)&&"data"!==i&&!e(t[r][i],n[r][i]))return!1;for(i in n[r])if(n[r].hasOwnProperty(i)&&"data"!==i&&!e(t[r][i],n[r][i]))return!1;return!0}function Xt(t,n,r,i,o,a){let s;for(s in n=n||{},t=t||{})t.hasOwnProperty(s)&&(e(t[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}));for(s in n)n.hasOwnProperty(s)&&!t.hasOwnProperty(s)&&(e(t[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}))}function Yt(t){return t.id}function Kt(t,e){return t[e.id]=e,t}class Jt{constructor(t,e){this.reset(t,e)}reset(t,e){this.points=t||[],this._distances=[0];for(let n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);let n=1,r=this._distances[n];const i=e*this.paddedLength+this.padding;for(;r<i&&n<this._distances.length;)r=this._distances[++n];const o=n-1,a=this._distances[o],s=r-a,l=s>0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))}}class Qt{constructor(t,e,n){const r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(e/n);for(let 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}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(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)}insertCircle(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)}_insertBoxCell(t,e,n,r,i,o){this.boxCells[i].push(o)}_insertCircleCell(t,e,n,r,i,o){this.circleCells[i].push(o)}_query(t,e,n,r,i,o){if(n<0||t>this.width||r<0||e>this.height)return!i&&[];const a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(let t=0;t<this.boxKeys.length;t++)a.push({key:this.boxKeys[t],x1:this.bboxes[4*t],y1:this.bboxes[4*t+1],x2:this.bboxes[4*t+2],y2:this.bboxes[4*t+3]});for(let t=0;t<this.circleKeys.length;t++){const e=this.circles[3*t],n=this.circles[3*t+1],r=this.circles[3*t+2];a.push({key:this.circleKeys[t],x1:e-r,y1:n-r,x2:e+r,y2:n+r})}return o?a.filter(o):a}return this._forEachCell(t,e,n,r,this._queryCell,a,{hitTest:i,seenUids:{box:{},circle:{}}},o),i?a.length>0:a}_queryCircle(t,e,n,r,i){const o=t-n,a=t+n,s=e-n,l=e+n;if(a<0||o>this.width||l<0||s>this.height)return!r&&[];const c=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,c,{hitTest:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}},i),r?c.length>0:c}query(t,e,n,r,i){return this._query(t,e,n,r,!1,i)}hitTest(t,e,n,r,i){return this._query(t,e,n,r,!0,i)}hitTestCircle(t,e,n,r){return this._queryCircle(t,e,n,!0,r)}_queryCell(t,e,n,r,i,o,a,s){const l=a.seenUids,c=this.boxCells[i];if(null!==c){const i=this.bboxes;for(const u of c)if(!l.box[u]){l.box[u]=!0;const c=4*u;if(t<=i[c+2]&&e<=i[c+3]&&n>=i[c+0]&&r>=i[c+1]&&(!s||s(this.boxKeys[u]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[u],x1:i[c],y1:i[c+1],x2:i[c+2],y2:i[c+3]})}}}const u=this.circleCells[i];if(null!==u){const i=this.circles;for(const c of u)if(!l.circle[c]){l.circle[c]=!0;const u=3*c;if(this._circleAndRectCollide(i[u],i[u+1],i[u+2],t,e,n,r)&&(!s||s(this.circleKeys[c]))){if(a.hitTest)return o.push(!0),!0;{const t=i[u],e=i[u+1],n=i[u+2];o.push({key:this.circleKeys[c],x1:t-n,y1:e-n,x2:t+n,y2:e+n})}}}}}_queryCellCircle(t,e,n,r,i,o,a,s){const l=a.circle,c=a.seenUids,u=this.boxCells[i];if(null!==u){const t=this.bboxes;for(const e of u)if(!c.box[e]){c.box[e]=!0;const n=4*e;if(this._circleAndRectCollide(l.x,l.y,l.radius,t[n+0],t[n+1],t[n+2],t[n+3])&&(!s||s(this.boxKeys[e])))return o.push(!0),!0}}const h=this.circleCells[i];if(null!==h){const t=this.circles;for(const e of h)if(!c.circle[e]){c.circle[e]=!0;const n=3*e;if(this._circlesCollide(t[n],t[n+1],t[n+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[e])))return o.push(!0),!0}}}_forEachCell(t,e,n,r,i,o,a,s){const l=this._convertToXCellCoord(t),c=this._convertToYCellCoord(e),u=this._convertToXCellCoord(n),h=this._convertToYCellCoord(r);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++)if(i.call(this,t,e,n,r,this.xCellCount*l+d,o,a,s))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,e,n,r,i,o){const a=r-t,s=i-e,l=n+o;return l*l>a*a+s*s}_circleAndRectCollide(t,e,n,r,i,o,a){const s=(o-r)/2,l=Math.abs(t-(r+s));if(l>s+n)return!1;const c=(a-i)/2,u=Math.abs(e-(i+c));if(u>c+n)return!1;if(l<=s||u<=c)return!0;const h=l-s,d=u-c;return h*h+d*d<=n*n}}const te=Math.tan(85*Math.PI/180);function ee(e,n,r,i,o,a,s){const l=t.create();if(r)if("globe"===a.name){const e=t.calculateGlobeLabelMatrix(o,n);t.multiply(l,l,e)}else{const e=_([],s);l[0]=e[0],l[1]=e[1],l[4]=e[2],l[5]=e[3],i||t.rotateZ(l,l,o.angle)}else t.multiply(l,o.labelPlaneMatrix,e);return l}function ne(t,e,n,r,i,o,a){const s=ee(t,e,n,r,i,o,a);return"globe"===o.name&&n||(s[2]=s[6]=s[10]=s[14]=0),s}function re(e,n,r,i,o,a,s){if(r){if("globe"===a.name){const l=ee(e,n,r,i,o,a,s);return t.invert(l,l),t.multiply(l,e,l),l}{const n=t.clone(e),r=t.identity([]);return r[0]=s[0],r[1]=s[1],r[4]=s[2],r[5]=s[3],t.multiply(n,n,r),i||t.rotateZ(n,n,-o.angle),n}}return o.glCoordMatrix}function ie(e,n,r=0){const i=[e.x,e.y,r,1];r?t.transformMat4$1(i,i,n):ye(i,i,n);const o=i[3];return{point:[i[0]/o,i[1]/o,i[2]/o],signedDistanceFromCamera:o}}function oe(e,n){const r=[e[0],e[1],e[2],1];t.transformMat4$1(r,r,n);const i=r[3];return{point:[r[0]/i,r[1]/i,r[2]/i],signedDistanceFromCamera:i}}function ae(t,e){return Math.min(.5+t/e*.5,1.5)}function se(t,e){const n=t[0]/t[3],r=t[1]/t[3];return n>=-e[0]&&n<=e[0]&&r>=-e[1]&&r<=e[1]}function le(e,n,r,i,o,a,s,l,c,u){const h=r.transform,d=i?e.textSizeData:e.iconSizeData,p=t.evaluateSizeForZoom(d,r.transform.zoom),f="globe"===h.projection.name,m=[256/r.width*2+1,256/r.height*2+1],g=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;g.clear();let y=null;f&&(y=i?e.text.globeExtVertexArray:e.icon.globeExtVertexArray);const _=e.lineVertexArray,v=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=r.transform.width/r.transform.height;let x=!1;for(let w=0;w<v.length;w++){const i=v.get(w);if(i.writingMode!==t.WritingMode.vertical||x||0!==w&&v.get(w-1).writingMode===t.WritingMode.horizontal||(x=!0),(i.hidden||i.writingMode===t.WritingMode.vertical)&&!x){ge(i.numGlyphs,g);continue}x=!1;const f=new t.pointGeometry(i.tileAnchorX,i.tileAnchorY),S=c?c(f):[0,0,0],T=h.projection.projectTilePoint(f.x,f.y,u.canonical),E=[T.x+S[0],T.y+S[1],T.z+S[2]],C=[...E,1];if(t.transformMat4$1(C,C,n),!se(C,m)){ge(i.numGlyphs,g);continue}const O=ae(r.transform.cameraToCenterDistance,C[3]),P=t.evaluateSizeForFeature(d,p,i),k=s?P/O:P*O,A=ie(new t.pointGeometry(E[0],E[1]),o,E[2]);if(A.signedDistanceFromCamera<=0){ge(i.numGlyphs,g);continue}let I={};const M=s?null:c,D=he(i,k,!1,l,n,o,a,e.glyphOffsetArray,_,g,y,A.point,f,I,b,M,h.projection,u,s);x=D.useVertical,M&&D.needsFlipping&&(I={}),(D.notEnoughRoom||x||D.needsFlipping&&he(i,k,!0,l,n,o,a,e.glyphOffsetArray,_,g,y,A.point,f,I,b,M,h.projection,u,s).notEnoughRoom)&&ge(i.numGlyphs,g)}i?(e.text.dynamicLayoutVertexBuffer.updateData(g),y&&e.text.globeExtVertexBuffer.updateData(y)):(e.icon.dynamicLayoutVertexBuffer.updateData(g),y&&e.icon.globeExtVertexBuffer.updateData(y))}function ce(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m){const g=s.glyphStartIndex+s.numGlyphs,y=s.lineStartIndex,_=s.lineStartIndex+s.lineLength,v=e.getoffsetX(s.glyphStartIndex),b=e.getoffsetX(g-1),x=fe(t*v,n,r,i,o,a,s.segment,y,_,l,c,u,h,d,!0,p,f,m);if(!x)return null;const w=fe(t*b,n,r,i,o,a,s.segment,y,_,l,c,u,h,d,!0,p,f,m);return w?{first:x,last:w}:null}function ue(e,n,r,i){return e.writingMode===t.WritingMode.horizontal&&Math.abs(r.y-n.y)>Math.abs(r.x-n.x)*i?{useVertical:!0}:e.writingMode===t.WritingMode.vertical?n.y<r.y?{needsFlipping:!0}:null:0!==e.flipState&&function(t,e,n){const r=(e.x-t.x)*n;return 0===r||Math.abs((e.y-t.y)/r)>te}(n,r,i)?1===e.flipState?{needsFlipping:!0}:null:n.x>r.x?{needsFlipping:!0}:null}function he(e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_,v){const b=n/24,x=e.lineOffsetX*b,w=e.lineOffsetY*b;let S=[];if(e.numGlyphs>1){const n=e.glyphStartIndex+e.numGlyphs,o=e.lineStartIndex,u=e.lineStartIndex+e.lineLength,h=ce(b,l,x,w,r,d,p,e,c,a,f,g,!1,y,_,v);if(!h)return{notEnoughRoom:!0};const T=oe(h.first.point,s).point,E=oe(h.last.point,s).point,C=new t.pointGeometry(T[0],T[1]),O=new t.pointGeometry(E[0],E[1]);if(i&&!r){const t=ue(e,C,O,m);if(e.flipState=t&&t.needsFlipping?1:2,t)return t}S=[h.first];for(let t=e.glyphStartIndex+1;t<n-1;t++){const n=fe(b*l.getoffsetX(t),x,w,r,d,p,e.segment,o,u,c,a,f,g,!1,!1,y,_,v);if(!n)return{notEnoughRoom:!0};S.push(n)}S.push(h.last)}else{if(i&&!r){const n=ie(p,o).point,r=e.lineStartIndex+e.segment+1,i=new t.pointGeometry(c.getx(r),c.gety(r)),a=ie(i,o),s=a.signedDistanceFromCamera>0?a.point:pe(p,i,n,1,o,void 0,y,_.canonical),l=ue(e,new t.pointGeometry(n[0],n[1]),new t.pointGeometry(s[0],s[1]),m);if(e.flipState=l&&l.needsFlipping?1:2,l)return l}const n=fe(b*l.getoffsetX(e.glyphStartIndex),x,w,r,d,p,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,a,f,g,!1,!1,y,_,v);if(!n)return{notEnoughRoom:!0};S=[n]}if(h)for(const T of S)t.updateGlobeVertexNormal(h,u.length+0,T.up[0],T.up[1],T.up[2]),t.updateGlobeVertexNormal(h,u.length+1,T.up[0],T.up[1],T.up[2]),t.updateGlobeVertexNormal(h,u.length+2,T.up[0],T.up[1],T.up[2]),t.updateGlobeVertexNormal(h,u.length+3,T.up[0],T.up[1],T.up[2]),t.addDynamicAttributes(u,T.point[0],T.point[1],T.point[2],T.angle);else for(const T of S)t.addDynamicAttributes(u,T.point[0],T.point[1],T.point[2],T.angle);return{}}function de(e,n,r,i,o){const a=i.projectTilePoint(e.x,e.y,n);if(!o)return ie(a,r,a.z);const s=o(e);return ie(new t.pointGeometry(a.x+s[0],a.y+s[1]),r,a.z+s[2])}function pe(e,n,r,i,o,a,s,l){const c=de(e.add(e.sub(n)._unit()),l,o,s,a).point,u=t.sub([],r,c);return t.scaleAndAdd([],r,u,i/t.length(u))}function fe(e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y,_){const v=i?e-n:e+n;let b=v>0?1:-1,x=0;i&&(b*=-1,x=Math.PI),b<0&&(x+=Math.PI);let w=b>0?l+s:l+s+1,S=o,T=o,E=0,C=0;const O=Math.abs(v),P=[],k=[];let A=a;const I=()=>{const e=w-b;return 0===E?a:new t.pointGeometry(u.getx(e),u.gety(e))},M=()=>{const t=I();return pe(t,A||t,T,O-E+1,h,p,g,y.canonical)};for(;E+C<=O;){if(w+=b,w<l||w>=c)return null;if(T=S,P.push(S),f&&k.push(A||I()),S=d[w],void 0===S){A=new t.pointGeometry(u.getx(w),u.gety(w));const e=de(A,y.canonical,h,g,p);S=e.signedDistanceFromCamera>0?d[w]=e.point:M()}else A=null;E+=C,C=t.distance(T,S)}A=A||new t.pointGeometry(u.getx(w),u.gety(w));const D=I();m&&p&&(d[w]=S=void 0===d[w]?S:M(),C=t.distance(T,S));const B=(O-E)/C,z=A.sub(D).mult(B)._add(D),L=t.sub([],S,T),R=t.scaleAndAdd([],T,L,B);let j=[0,0,1],F=L[0],N=L[1];if(_&&(j=g.upVector(y.canonical,z.x,z.y),0!==j[0]||0!==j[1]||1!==j[2])){const e=[1,0,0],n=[0,1,0];e[0]=j[2],e[1]=0,e[2]=-j[0],t.cross(n,j,e),t.normalize(e,e),t.normalize(n,n),F=t.dot(L,e),N=t.dot(L,n)}if(r){const e=t.cross([],j,L);t.normalize(e,e),t.scaleAndAdd(R,R,e,r*b)}const $=x+Math.atan2(N,F);return P.push(R),f&&k.push(z),{point:R,angle:$,path:P,tilePath:k,up:j}}const me=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ge(t,e){for(let n=0;n<t;n++){const t=e.length;e.resize(t+4),e.float32.set(me,4*t)}}function ye(t,e,n){const 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}const _e=100;class ve{constructor(t,e,n=new Qt(t.width+200,t.height+200,25),r=new Qt(t.width+200,t.height+200,25)){this.transform=t,this.grid=n,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+_e,this.screenBottomBoundary=t.height+_e,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200,this.fogState=e}placeCollisionBox(t,e,n,r,i,o,a,s){let l=n.projectedAnchorX,c=n.projectedAnchorY,u=n.projectedAnchorZ;const h=n.elevation,d=n.tileID;if(h&&d){const e=t.getProjection().upVector(d.canonical,n.tileAnchorX,n.tileAnchorY),r=t.getProjection().upVectorScale(d.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;l+=e[0]*h*r,c+=e[1]*h*r,u+=e[2]*h*r}const p=this.projectAndGetPerspectiveRatio(a,[l,c,u],n.tileID,"globe"===t.projection.name||!!h||this.transform.pitch>0,t.getProjection()),f=o*p.perspectiveRatio,m=(n.x1*e+r.x-n.padding)*f+p.point.x,g=(n.y1*e+r.y-n.padding)*f+p.point.y,y=(n.x2*e+r.x+n.padding)*f+p.point.x,_=(n.y2*e+r.y+n.padding)*f+p.point.y,v=p.perspectiveRatio<=.55||p.occluded;return!this.isInsideGrid(m,g,y,_)||!i&&this.grid.hitTest(m,g,y,_,s)||v?{box:[],offscreen:!1,occluded:p.occluded}:{box:[m,g,y,_],offscreen:this.isOffscreen(m,g,y,_),occluded:!1}}placeCollisionCircles(e,n,r,i,o,a,s,l,c,u,h,d,p,f,m){const g=[],y=this.transform.elevation,_=y?y.getAtTileOffsetFunc(m,this.transform.center.lat,this.transform.worldSize,e.getProjection()):t=>[0,0,0],v=new t.pointGeometry(r.tileAnchorX,r.tileAnchorY),b=e.getProjection().projectTilePoint(r.tileAnchorX,r.tileAnchorY,m.canonical),x=_(v),w=[b.x+x[0],b.y+x[1],b.z+x[2]],S="globe"===e.projection.name,T=this.projectAndGetPerspectiveRatio(s,[w[0],w[1],w[2]],m,S||!!y||this.transform.pitch>0,e.getProjection()),{perspectiveRatio:E}=T,C=(h?a/E:a*E)/t.ONE_EM,O=ie(new t.pointGeometry(w[0],w[1]),l,w[2]).point,P=T.signedDistanceFromCamera>0?ce(C,o,r.lineOffsetX*C,r.lineOffsetY*C,!1,O,v,r,i,l,{},y&&!h?_:null,h&&!!y,e.getProjection(),m,h):null;let k=!1,A=!1,I=!0;if(P&&!T.occluded){const e=.5*p*E+f,r=new t.pointGeometry(-100,-100),i=new t.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),o=new Jt,a=P.first,s=P.last;let l=[];for(let t=a.path.length-1;t>=1;t--)l.push(a.path[t]);for(let t=1;t<s.path.length;t++)l.push(s.path[t]);const h=2.5*e;if(c){const t=l.map(y&&!S?(t,e)=>{const n=_(e<a.path.length-1?a.tilePath[a.path.length-1-e]:s.tilePath[e-a.path.length+2]);return t[2]=n[2],oe(t,c)}:t=>oe(t,c));l=t.some(t=>t.signedDistanceFromCamera<=0)?[]:t.map(t=>t.point)}let m=[];if(l.length>0){const e=l.map(e=>new t.pointGeometry(e[0],e[1]));let n=1/0,o=-1/0,a=1/0,s=-1/0;for(let t=0;t<e.length;t++)n=Math.min(n,e[t].x),a=Math.min(a,e[t].y),o=Math.max(o,e[t].x),s=Math.max(s,e[t].y);m=n>=r.x&&o<=i.x&&a>=r.y&&s<=i.y?[e]:o<r.x||n>i.x||s<r.y||a>i.y?[]:t.clipLine([e],r.x,r.y,i.x,i.y)}for(const t of m){o.reset(t,.25*e);let r=0;r=o.length<=.5*e?1:Math.ceil(o.paddedLength/h)+1;for(let t=0;t<r;t++){const i=t/Math.max(r-1,1),a=o.lerp(i),s=a.x+_e,l=a.y+_e;g.push(s,l,e,0);const c=s-e,h=l-e,p=s+e,f=l+e;if(I=I&&this.isOffscreen(c,h,p,f),A=A||this.isInsideGrid(c,h,p,f),!n&&this.grid.hitTestCircle(s,l,e,d)&&(k=!0,!u))return{circles:[],offscreen:!1,collisionDetected:k,occluded:!1}}}}return{circles:!u&&k||!A?[]:g,offscreen:I,collisionDetected:k,occluded:T.occluded}}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const n=[];let r=1/0,i=1/0,o=-1/0,a=-1/0;for(const u of e){const e=new t.pointGeometry(u.x+_e,u.y+_e);r=Math.min(r,e.x),i=Math.min(i,e.y),o=Math.max(o,e.x),a=Math.max(a,e.y),n.push(e)}const s=this.grid.query(r,i,o,a).concat(this.ignoredGrid.query(r,i,o,a)),l={},c={};for(const u of s){const e=u.key;if(void 0===l[e.bucketInstanceId]&&(l[e.bucketInstanceId]={}),l[e.bucketInstanceId][e.featureIndex])continue;const r=[new t.pointGeometry(u.x1,u.y1),new t.pointGeometry(u.x2,u.y1),new t.pointGeometry(u.x2,u.y2),new t.pointGeometry(u.x1,u.y2)];t.polygonIntersectsPolygon(n,r)&&(l[e.bucketInstanceId][e.featureIndex]=!0,void 0===c[e.bucketInstanceId]&&(c[e.bucketInstanceId]=[]),c[e.bucketInstanceId].push(e.featureIndex))}return c}insertCollisionBox(t,e,n,r,i){(e?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:r,collisionGroupID:i},t[0],t[1],t[2],t[3])}insertCollisionCircles(t,e,n,r,i){const o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:n,featureIndex:r,collisionGroupID:i};for(let s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])}projectAndGetPerspectiveRatio(e,n,r,i,o){const a=[n[0],n[1],n[2],1];let s=!1;if(n[2]||this.transform.pitch>0){t.transformMat4$1(a,a,e);const i="globe"===o.name;this.fogState&&r&&!i&&(s=function(e,n,r,i,o,a){const s=a.calculateFogTileMatrix(o),l=[n,r,i];return t.transformMat4(l,l,s),O(e,l,a.pitch,a._fov)}(this.fogState,n[0],n[1],n[2],r.toUnwrapped(),this.transform)>.9)}else ye(a,a,e);return{point:new t.pointGeometry((a[0]/a[3]+1)/2*this.transform.width+_e,(-a[1]/a[3]+1)/2*this.transform.height+_e),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(o)/a[3]*.5,1.5),signedDistanceFromCamera:a[3],occluded:i&&a[2]>a[3]||s}}isOffscreen(t,e,n,r){return n<_e||t>=this.screenRightBoundary||r<_e||e>this.screenBottomBoundary}isInsideGrid(t,e,n,r){return n>=0&&t<this.gridRightBoundary&&r>=0&&e<this.gridBottomBoundary}getViewportMatrix(){const e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e}}function be(e,n,r){const i=n.createTileMatrix(e,e.worldSize,r.toUnwrapped());return t.multiply(new Float32Array(16),e.projMatrix,i)}function xe(t,e,n){if(e.projection.name===n.projection.name)return t.projMatrix;const r=n.clone();return r.setProjection(e.projection),be(r,e.getProjection(),t)}function we(t,e,n){return e.name===n.projection.name?t.projMatrix:be(n,e,t)}class Se{constructor(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}isHidden(){return 0===this.opacity&&!this.placed}}class Te{constructor(t,e,n,r,i,o=!1){this.text=new Se(t?t.text:null,e,n,i),this.icon=new Se(t?t.icon:null,e,r,i),this.clipped=o}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ee{constructor(t,e,n,r=!1){this.text=t,this.icon=e,this.skipFade=n,this.clipped=r}}class Ce{constructor(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]}}class Oe{constructor(t,e,n,r,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=n,this.bucketIndex=r,this.tileID=i}}class Pe{constructor(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}get(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){const e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:t=>t.collisionGroupID===e}}return this.collisionGroups[t]}}function ke(e,n,r,i,o){const{horizontalAlign:a,verticalAlign:s}=t.getAnchorAlignment(e),l=-(a-.5)*n,c=-(s-.5)*r,u=t.evaluateVariableOffset(e,i);return new t.pointGeometry(l+u[0]*o,c+u[1]*o)}function Ae(e,n,r,i,o){const a=new t.pointGeometry(e,n);return r&&a._rotate(i?o:-o),a}class Ie{constructor(t,e,n,r,i){this.transform=t.clone(),this.projection=t.projection.name,this.collisionIndex=new ve(this.transform,i),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new Pe(n),this.collisionCircleArrays={},this.prevPlacement=r,r&&(r.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(e,n,r,i){const o=r.getBucket(n),a=r.latestFeatureIndex;if(!o||!a||n.id!==o.layerIds[0])return;const s=o.layers[0].layout,l=r.collisionBoxArray,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/t.EXTENT,h=r.tileID.toUnwrapped();this.transform.setProjection(o.projection);const d=(p=r.tileID,f=o.getProjection(),m=this.transform,f.name===this.projection?m.calculateProjMatrix(p.toUnwrapped()):be(m,f,p));var p,f,m;const g="map"===s.get("text-pitch-alignment"),y="map"===s.get("text-rotation-alignment");n.compileFilter();const _=n.dynamicFilter(),v=n.dynamicFilterNeedsFeature(),b=this.transform.calculatePixelsToTileUnitsMatrix(r),x=ne(d,r.tileID.canonical,g,y,this.transform,o.getProjection(),b);let w=null;if(g){const e=re(d,r.tileID.canonical,g,y,this.transform,o.getProjection(),b);w=t.multiply([],this.transform.labelPlaneMatrix,e)}let S=null;_&&r.latestFeatureIndex&&(S={unwrappedTileID:h,dynamicFilter:_,dynamicFilterNeedsFeature:v,featureIndex:r.latestFeatureIndex}),this.retainedQueryData[o.bucketInstanceId]=new Oe(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);const T={bucket:o,layout:s,posMatrix:d,textLabelPlaneMatrix:x,labelToScreenMatrix:w,clippingData:S,scale:c,textPixelRatio:u,holdingForFade:r.holdingForFade(),collisionBoxArray:l,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:t.evaluateSizeForZoom(o.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(i)for(const t of o.sortKeyRanges){const{sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i}=t;e.push({sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i,parameters:T})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:T})}attemptAnchorPlacement(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y){const _=[h.textOffset0,h.textOffset1],v=ke(t,n,r,_,i),b=this.collisionIndex.placeCollisionBox(p,i,e,Ae(v.x,v.y,o,a,this.transform.angle),u,s,l,c.predicate);if(m){const t=p.getSymbolInstanceIconSize(y,this.transform.zoom,h.placedIconSymbolIndex);if(0===this.collisionIndex.placeCollisionBox(p,t,m,Ae(v.x,v.y,o,a,this.transform.angle),u,s,l,c.predicate).box.length)return}if(b.box.length>0){let e;return this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(e=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:_,width:n,height:r,anchor:t,textScale:i,prevAnchor:e},this.markUsedJustification(p,t,h,f),p.allowVerticalPlacement&&(this.markUsedOrientation(p,f,h),this.placedOrientations[h.crossTileID]=f),{shift:v,placedGlyphBoxes:b}}}placeLayerBucketPart(e,n,r,i){const{bucket:o,layout:a,posMatrix:s,textLabelPlaneMatrix:l,labelToScreenMatrix:c,clippingData:u,textPixelRatio:h,holdingForFade:d,collisionBoxArray:p,partiallyEvaluatedTextSize:f,partiallyEvaluatedIconSize:m,collisionGroup:g}=e.parameters,y=a.get("text-optional"),_=a.get("icon-optional"),v=a.get("text-allow-overlap"),b=a.get("icon-allow-overlap"),x="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),S="none"!==a.get("icon-text-fit"),T="viewport-y"===a.get("symbol-z-order");this.transform.setProjection(o.projection);let E=v&&(b||!o.hasIconData()||_),C=b&&(v||!o.hasTextData()||y);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p),r&&i&&o.updateCollisionDebugBuffers(this.transform.zoom,p);const O=(e,i,p)=>{if(u){const r={zoom:this.transform.zoom,pitch:this.transform.pitch};let i=null;if(u.dynamicFilterNeedsFeature){const t=this.retainedQueryData[o.bucketInstanceId];i=u.featureIndex.loadFeature({featureIndex:e.featureIndex,bucketIndex:t.bucketIndex,sourceLayerIndex:t.sourceLayerIndex,layoutVertexArrayOffset:0})}if(!(0,u.dynamicFilter)(r,i,this.retainedQueryData[o.bucketInstanceId].tileID.canonical,new t.pointGeometry(e.tileAnchorX,e.tileAnchorY),this.transform.calculateDistanceTileData(u.unwrappedTileID)))return this.placements[e.crossTileID]=new Ee(!1,!1,!1,!0),void(n[e.crossTileID]=!0)}if(n[e.crossTileID])return;if(d)return void(this.placements[e.crossTileID]=new Ee(!1,!1,!1));let T=!1,O=!1,P=!0,k=!1,A=!1,I=null,M={box:null,offscreen:null,occluded:null},D={box:null,offscreen:null,occluded:null},B=null,z=null,L=null,R=0,j=0,F=0;p.textFeatureIndex?R=p.textFeatureIndex:e.useRuntimeCollisionCircles&&(R=e.featureIndex),p.verticalTextFeatureIndex&&(j=p.verticalTextFeatureIndex);const N=t=>{t.tileID=this.retainedQueryData[o.bucketInstanceId].tileID,(this.transform.elevation||t.elevation)&&(t.elevation=this.transform.elevation?this.transform.elevation.getAtTileOffset(this.retainedQueryData[o.bucketInstanceId].tileID,t.tileAnchorX,t.tileAnchorY):0)},$=p.textBox;if($){N($);const n=n=>{let r=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!n&&this.prevPlacement){const t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,r=t,this.markUsedOrientation(o,r,e))}return r},r=(n,r)=>{if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&p.verticalTextBox){for(const e of o.writingModes)if(e===t.WritingMode.vertical?(M=r(),D=M):M=n(),M&&M.box&&M.box.length)break}else M=n()};if(a.get("text-variable-anchor")){let l=a.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[e.crossTileID]){const t=this.prevPlacement.variableOffsets[e.crossTileID];l.indexOf(t.anchor)>0&&(l=l.filter(e=>e!==t.anchor),l.unshift(t.anchor))}const c=(t,n,r)=>{const a=o.getSymbolInstanceTextSize(f,e,this.transform.zoom,i),c=(t.x2-t.x1)*a+2*t.padding,u=(t.y2-t.y1)*a+2*t.padding,d=S&&!b?n:null;d&&N(d);let p={box:[],offscreen:!1,occluded:!1};const y=v?2*l.length:l.length;for(let _=0;_<y;++_){const n=this.attemptAnchorPlacement(l[_%l.length],t,c,u,a,x,w,h,s,g,_>=l.length,e,i,o,r,d,f,m);if(n&&(p=n.placedGlyphBoxes,p&&p.box&&p.box.length)){T=!0,I=n.shift;break}}return p};r(()=>c($,p.iconBox,t.WritingMode.horizontal),()=>{const n=p.verticalTextBox;return n&&N(n),o.allowVerticalPlacement&&!(M&&M.box&&M.box.length)&&e.numVerticalGlyphVertices>0&&n?c(n,p.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null,occluded:null}}),M&&(T=M.box,P=M.offscreen,k=M.occluded);const u=n(M&&M.box);if(!T&&this.prevPlacement){const t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(o,t.anchor,e,u))}}else{const a=(n,r)=>{const a=o.getSymbolInstanceTextSize(f,e,this.transform.zoom,i),l=this.collisionIndex.placeCollisionBox(o,a,n,new t.pointGeometry(0,0),v,h,s,g.predicate);return l&&l.box&&l.box.length&&(this.markUsedOrientation(o,r,e),this.placedOrientations[e.crossTileID]=r),l};r(()=>a($,t.WritingMode.horizontal),()=>{const n=p.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?(N(n),a(n,t.WritingMode.vertical)):{box:null,offscreen:null,occluded:null}}),n(M&&M.box&&M.box.length)}}if(B=M,T=B&&B.box&&B.box.length>0,P=B&&B.offscreen,k=B&&B.occluded,e.useRuntimeCollisionCircles){const n=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex>=0?e.centerJustifiedTextSymbolIndex:e.verticalPlacedTextSymbolIndex),i=t.evaluateSizeForFeature(o.textSizeData,f,n),u=a.get("text-padding");z=this.collisionIndex.placeCollisionCircles(o,v,n,o.lineVertexArray,o.glyphOffsetArray,i,s,l,c,r,w,g.predicate,e.collisionCircleDiameter*i/t.ONE_EM,u,this.retainedQueryData[o.bucketInstanceId].tileID),T=v||z.circles.length>0&&!z.collisionDetected,P=P&&z.offscreen,k=z.occluded}if(p.iconFeatureIndex&&(F=p.iconFeatureIndex),p.iconBox){const n=n=>{N(n);const r=S&&I?Ae(I.x,I.y,x,w,this.transform.angle):new t.pointGeometry(0,0),i=o.getSymbolInstanceIconSize(m,this.transform.zoom,e.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(o,i,n,r,b,h,s,g.predicate)};D&&D.box&&D.box.length&&p.verticalIconBox?(L=n(p.verticalIconBox),O=L.box.length>0):(L=n(p.iconBox),O=L.box.length>0),P=P&&L.offscreen,A=L.occluded}const V=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,U=_||0===e.numIconVertices;if(V||U?U?V||(O=O&&T):T=O&&T:O=T=O&&T,T&&B&&B.box&&this.collisionIndex.insertCollisionBox(B.box,a.get("text-ignore-placement"),o.bucketInstanceId,D&&D.box&&j?j:R,g.ID),O&&L&&this.collisionIndex.insertCollisionBox(L.box,a.get("icon-ignore-placement"),o.bucketInstanceId,F,g.ID),z&&(T&&this.collisionIndex.insertCollisionCircles(z.circles,a.get("text-ignore-placement"),o.bucketInstanceId,R,g.ID),r)){const t=o.bucketInstanceId;let e=this.collisionCircleArrays[t];void 0===e&&(e=this.collisionCircleArrays[t]=new Ce);for(let n=0;n<z.circles.length;n+=4)e.circles.push(z.circles[n+0]),e.circles.push(z.circles[n+1]),e.circles.push(z.circles[n+2]),e.circles.push(z.collisionDetected?1:0)}const G="globe"!==o.projection.name;E=E&&(G||!k),C=C&&(G||!A),this.placements[e.crossTileID]=new Ee(T||E,O||C,P||o.justReloaded),n[e.crossTileID]=!0};if(T){const t=o.getSortedSymbolIndexes(this.transform.angle);for(let e=t.length-1;e>=0;--e){const n=t[e];O(o.symbolInstances.get(n),n,o.collisionArrays[n])}}else for(let t=e.symbolInstanceStart;t<e.symbolInstanceEnd;t++)O(o.symbolInstances.get(t),t,o.collisionArrays[t]);if(r&&o.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[o.bucketInstanceId];t.invert(e.invProjMatrix,s),e.viewportMatrix=this.collisionIndex.getViewportMatrix()}o.justReloaded=!1}markUsedJustification(e,n,r,i){let o;o=i===t.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:{left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(n)];const a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];for(const t of a)t>=0&&(e.text.placedSymbolArray.get(t).crossTileID=o>=0&&t!==o?0:r.crossTileID)}markUsedOrientation(e,n,r){const i=n===t.WritingMode.horizontal||n===t.WritingMode.horizontalOnly?n:0,o=n===t.WritingMode.vertical?n:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex].filter(t=>-1!==t);for(const t of a)e.text.placedSymbolArray.get(t).placedOrientation=i;-1!==r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const e=this.prevPlacement;let n=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;const r=e?e.symbolFadeChange(t):1,i=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(const s in this.placements){const t=this.placements[s],e=i[s];e?(this.opacities[s]=new Te(e,r,t.text,t.icon,null,t.clipped),n=n||t.text!==e.text.placed||t.icon!==e.icon.placed):(this.opacities[s]=new Te(null,r,t.text,t.icon,t.skipFade,t.clipped),n=n||t.text||t.icon)}for(const s in i){const t=i[s];if(!this.opacities[s]){const e=new Te(t,r,!1,!1);e.isHidden()||(this.opacities[s]=e,n=n||t.text.placed||t.icon.placed)}}for(const s in o)this.variableOffsets[s]||!this.opacities[s]||this.opacities[s].isHidden()||(this.variableOffsets[s]=o[s]);for(const s in a)this.placedOrientations[s]||!this.opacities[s]||this.opacities[s].isHidden()||(this.placedOrientations[s]=a[s]);n?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)}updateLayerOpacities(t,e){const n={};for(const r of e){const e=r.getBucket(t);e&&r.latestFeatureIndex&&t.id===e.layerIds[0]&&this.updateBucketOpacities(e,n,r.collisionBoxArray)}}updateBucketOpacities(e,n,r){e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const i=e.layers[0].layout,o=!!e.layers[0].dynamicFilter(),a=new Te(null,0,!1,!1,!0),s=i.get("text-allow-overlap"),l=i.get("icon-allow-overlap"),c=i.get("text-variable-anchor"),u="map"===i.get("text-rotation-alignment"),h="map"===i.get("text-pitch-alignment"),d="none"!==i.get("icon-text-fit"),p=new Te(null,0,s&&(l||!e.hasIconData()||i.get("icon-optional")),l&&(s||!e.hasTextData()||i.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);const f=(t,e,n)=>{for(let r=0;r<e/4;r++)t.opacityVertexArray.emplaceBack(n)};let m=0;for(let g=0;g<e.symbolInstances.length;g++){const r=e.symbolInstances.get(g),{numHorizontalGlyphVertices:i,numVerticalGlyphVertices:s,crossTileID:l}=r;let y=this.opacities[l];n[l]?y=a:y||(y=p,this.opacities[l]=y),n[l]=!0;const _=i>0||s>0,v=r.numIconVertices>0,b=this.placedOrientations[r.crossTileID],x=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(!_&&!v||y.isHidden()||m++,_){const t=Ne(y.text);f(e.text,i,x?$e:t),f(e.text,s,w?$e:t);const n=y.text.isHidden();[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex].forEach(t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=n||x?1:0)}),r.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).hidden=n||w?1:0);const o=this.variableOffsets[r.crossTileID];o&&this.markUsedJustification(e,o.anchor,r,b);const a=this.placedOrientations[r.crossTileID];a&&(this.markUsedJustification(e,"left",r,a),this.markUsedOrientation(e,a,r))}if(v){const t=Ne(y.icon);r.placedIconSymbolIndex>=0&&(f(e.icon,r.numIconVertices,x?$e:t),e.icon.placedSymbolArray.get(r.placedIconSymbolIndex).hidden=y.icon.isHidden()),r.verticalPlacedIconSymbolIndex>=0&&(f(e.icon,r.numVerticalIconVertices,w?$e:t),e.icon.placedSymbolArray.get(r.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const n=e.collisionArrays[g];if(n){let r=new t.pointGeometry(0,0),i=!0;if(n.textBox||n.verticalTextBox){if(c){const t=this.variableOffsets[l];t?(r=ke(t.anchor,t.width,t.height,t.textOffset,t.textScale),u&&r._rotate(h?this.transform.angle:-this.transform.angle)):i=!1}o&&(i=!y.clipped),n.textBox&&Me(e.textCollisionBox.collisionVertexArray,y.text.placed,!i||x,r.x,r.y),n.verticalTextBox&&Me(e.textCollisionBox.collisionVertexArray,y.text.placed,!i||w,r.x,r.y)}const a=i&&Boolean(!w&&n.verticalIconBox);n.iconBox&&Me(e.iconCollisionBox.collisionVertexArray,y.icon.placed,a,d?r.x:0,d?r.y:0),n.verticalIconBox&&Me(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!a,d?r.x:0,d?r.y:0)}}}if(e.fullyClipped=0===m,e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){const t=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=t.invProjMatrix,e.placementViewportMatrix=t.viewportMatrix,e.collisionCircleArray=t.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}}symbolFadeChange(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(t,e){const n=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*n>t}setStale(){this.stale=!0}}function Me(t,e,n,r,i){t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0)}const De=Math.pow(2,25),Be=Math.pow(2,24),ze=Math.pow(2,17),Le=Math.pow(2,16),Re=Math.pow(2,9),je=Math.pow(2,8),Fe=Math.pow(2,1);function Ne(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;const e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*De+e*Be+n*ze+e*Le+n*Re+e*je+n*Fe+e}const $e=0;class Ve{constructor(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,e,n,r,i){const o=this._bucketParts;for(;this._currentTileIndex<t.length;)if(e.getBucketParts(o,r,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,i())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort((t,e)=>t.sortKey-e.sortKey));this._currentPartIndex<o.length;){const t=o[this._currentPartIndex];if(e.placeLayerBucketPart(t,this._seenCrossTileIDs,n,0===t.symbolInstanceStart),this._currentPartIndex++,i())return!0}return!1}}class Ue{constructor(t,e,n,r,i,o,a,s){this.placement=new Ie(t,i,o,a,s),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=r,this._done=!1}isDone(){return this._done}continuePlacement(e,n,r){const i=t.exported.now(),o=()=>{const e=t.exported.now()-i;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const t=n[e[this._currentPlacementIndex]],i=this.placement.collisionIndex.transform.zoom;if("symbol"===t.type&&(!t.minzoom||t.minzoom<=i)&&(!t.maxzoom||t.maxzoom>i)){if(this._inProgressLayer||(this._inProgressLayer=new Ve(t)),this._inProgressLayer.continuePlacement(r[t.source],this.placement,this._showCollisionBoxes,t,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const Ge=512/t.EXTENT/2;class He{constructor(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(let r=0;r<e.length;r++){const n=e.get(r),i=n.key;this.indexedSymbolInstances[i]||(this.indexedSymbolInstances[i]=[]),this.indexedSymbolInstances[i].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}}getScaledCoordinates(e,n){const r=Ge/Math.pow(2,n.canonical.z-this.tileID.canonical.z);return{x:Math.floor((n.canonical.x*t.EXTENT+e.tileAnchorX)*r),y:Math.floor((n.canonical.y*t.EXTENT+e.tileAnchorY)*r)}}findMatches(t,e,n){const r=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z);for(let i=0;i<t.length;i++){const o=t.get(i);if(o.crossTileID)continue;const a=this.indexedSymbolInstances[o.key];if(!a)continue;const s=this.getScaledCoordinates(o,e);for(const t of a)if(Math.abs(t.coord.x-s.x)<=r&&Math.abs(t.coord.y-s.y)<=r&&!n[t.crossTileID]){n[t.crossTileID]=!0,o.crossTileID=t.crossTileID;break}}}}class qe{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class We{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const e=Math.round((t-this.lng)/360);if(0!==e)for(const n in this.indexes){const t=this.indexes[n],r={};for(const n in t){const i=t[n];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),r[i.tileID.key]=i}this.indexes[n]=r}this.lng=t}addBucket(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(let i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});const r=this.usedCrossTileIDs[t.overscaledZ];for(const i in this.indexes){const n=this.indexes[i];if(Number(i)>t.overscaledZ)for(const i in n){const o=n[i];o.tileID.isChildOf(t)&&o.findMatches(e.symbolInstances,t,r)}else{const o=n[t.scaledTo(Number(i)).key];o&&o.findMatches(e.symbolInstances,t,r)}}for(let i=0;i<e.symbolInstances.length;i++){const t=e.symbolInstances.get(i);t.crossTileID||(t.crossTileID=n.generate(),r[t.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new He(t,e.symbolInstances,e.bucketInstanceId),!0}removeBucketCrossTileIDs(t,e){for(const n in e.indexedSymbolInstances)for(const r of e.indexedSymbolInstances[n])delete this.usedCrossTileIDs[t][r.crossTileID]}removeStaleBuckets(t){let e=!1;for(const n in this.indexes){const r=this.indexes[n];for(const i in r)t[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],e=!0)}return e}}class Ze{constructor(){this.layerIndexes={},this.crossTileIDs=new qe,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(t,e,n,r){let i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new We);let o=!1;const a={};"globe"!==r.name&&i.handleWrapJump(n);for(const s of e){const e=s.getBucket(t);e&&t.id===e.layerIds[0]&&(e.bucketInstanceId||(e.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(s.tileID,e,this.crossTileIDs)&&(o=!0),a[e.bucketInstanceId]=!0)}return i.removeStaleBuckets(a)&&(o=!0),o}pruneUnusedLayers(t){const e={};t.forEach(t=>{e[t]=!0});for(const n in this.layerIndexes)e[n]||delete this.layerIndexes[n]}}const Xe=(e,n)=>t.emitValidationErrors(e,n&&n.filter(t=>"source.canvas"!==t.identifier)),Ye=t.pick(Gt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection"]),Ke=t.pick(Gt,["setCenter","setZoom","setBearing","setPitch"]),Je={version:8,layers:[],sources:{}},Qe={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class tn extends t.Evented{constructor(e,n={}){super(),this.map=e,this.dispatcher=new M($t(),this),this.imageManager=new b,this.imageManager.setEventedParent(this),this.glyphManager=new t.GlyphManager(e._requestManager,n.localFontFamily?t.LocalGlyphMode.all:n.localIdeographFontFamily?t.LocalGlyphMode.ideographs:t.LocalGlyphMode.none,n.localFontFamily||n.localIdeographFontFamily),this.crossTileSymbolIndex=new Ze,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());const r=this;this._rtlTextPluginCallback=tn.registerForPluginStateChange(e=>{r.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},(e,n)=>{if(t.triggerPluginCompletionEvent(e),n&&n.every(t=>t))for(const t in r._sourceCaches){const e=r._sourceCaches[t],n=e.getSource().type;"vector"!==n&&"geojson"!==n||e.reload()}})}),this.on("data",t=>{if("source"!==t.dataType||"metadata"!==t.sourceDataType)return;const e=this.getSource(t.sourceId);if(e&&e.vectorLayerIds)for(const n in this._layers){const t=this._layers[n];t.source===e.id&&this._validateLayer(t)}})}loadURL(e,n={}){this.fire(new t.Event("dataloading",{dataType:"style"}));const r="boolean"==typeof n.validate?n.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,n.accessToken);const i=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(i,(e,n)=>{this._request=null,e?this.fire(new t.ErrorEvent(e)):n&&this._load(n,r)})}loadJSON(e,n={}){this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.exported.frame(()=>{this._request=null,this._load(e,!1!==n.validate)})}loadEmpty(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(Je,!1)}_updateLayerCount(t,e){const n=e?1:-1;t.is3D()&&(this._num3DLayers+=n),"circle"===t.type&&(this._numCircleLayers+=n),"symbol"===t.type&&(this._numSymbolLayers+=n)}_load(e,n){if(n&&Xe(this,t.validateStyle(e)))return;this._loaded=!0,this.stylesheet=t.clone$1(e),this._updateMapProjection();for(const t in e.sources)this.addSource(t,e.sources[t],{validate:!1});this._changed=!1,e.sprite?this._loadSprite(e.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(e.glyphs);const r=Ut(this.stylesheet.layers);this._order=r.map(t=>t.id),this._layers={},this._serializedLayers={};for(let i of r)i=t.createStyleLayer(i),i.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=i,this._serializedLayers[i.id]=i.serialize(),this._updateLayerCount(i,!0);this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new S(this.stylesheet.light),this.stylesheet.terrain&&!this.terrainSetForDrapingOnly()&&this._createTerrain(this.stylesheet.terrain,1),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}terrainSetForDrapingOnly(){return!!this.terrain&&0===this.terrain.drapeRenderMode}setProjection(t){t?this.stylesheet.projection=t:delete this.stylesheet.projection,this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.stylesheet.projection)}_loadSprite(e){this._spriteRequest=function(e,n,r){let i,o,a;const s=t.exported.devicePixelRatio>1?"@2x":"";let l=t.getJSON(n.transformRequest(n.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(t,e)=>{l=null,a||(a=t,i=e,u())}),c=t.getImage(n.transformRequest(n.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(t,e)=>{c=null,a||(a=t,o=e,u())});function u(){if(a)r(a);else if(i&&o){const e=t.exported.getImageData(o),n={};for(const r in i){const{width:o,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:d,content:p}=i[r],f=new t.RGBAImage({width:o,height:a});t.RGBAImage.copy(e,f,{x:s,y:l},{x:0,y:0},{width:o,height:a}),n[r]={data:f,pixelRatio:u,sdf:c,stretchX:h,stretchY:d,content:p}}r(null,n)}}return{cancel(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(e,n)=>{if(this._spriteRequest=null,e)this.fire(new t.ErrorEvent(e));else if(n)for(const t in n)this.imageManager.addImage(t,n[t]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new t.Event("data",{dataType:"style"}))})}_validateLayer(e){const n=this.getSource(e.source);if(!n)return;const r=e.sourceLayer;r&&("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error(`Source layer "${r}" does not exist on source "${n.id}" as specified by style layer "${e.id}"`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const t in this._sourceCaches)if(!this._sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(t){const e=[];for(const n of t){const t=this._layers[n];"custom"!==t.type&&e.push(t.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.fog&&this.fog.hasTransition())return!0;for(const t in this._sourceCaches)if(this._sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(t){return!!this.terrain&&Qe[t.type]}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(e){if(!this._loaded)return;const n=this._changed;if(this._changed){const t=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(t.length||n.length)&&this._updateWorkerLayers(t,n);for(const e in this._updatedSources){const t=this._updatedSources[e];"reload"===t?this._reloadSource(e):"clear"===t&&this._clearSource(e)}this._updateTilesForChangedImages();for(const r in this._updatedPaintProps)this._layers[r].updateTransitions(e);this.light.updateTransitions(e),this.fog&&this.fog.updateTransitions(e),this._resetUpdates()}const r={};for(const t in this._sourceCaches){const e=this._sourceCaches[t];r[t]=e.used,e.used=!1}for(const t of this._order){const n=this._layers[t];if(n.recalculate(e,this._availableImages),!n.isHidden(e.zoom)){const t=this._getLayerSourceCache(n);t&&(t.used=!0)}const r=this.map.painter;if(r){const t=n.getProgramIds();if(!t)continue;const i=n.getProgramConfiguration(e.zoom);for(const e of t)r.useProgram(e,i)}}for(const i in r){const e=this._sourceCaches[i];r[i]!==e.used&&e.getSource().fire(new t.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:e.getSource().id}))}this.light.recalculate(e),this.terrain&&this.terrain.recalculate(e),this.fog&&this.fog.recalculate(e),this.z=e.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),n&&this.fire(new t.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const e in this._sourceCaches)this._sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateWorkerLayers(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(n){if(this._checkLoaded(),Xe(this,t.validateStyle(n)))return!1;(n=t.clone$1(n)).layers=Ut(n.layers);const r=function(t,n){if(!t)return[{command:Gt.setStyle,args:[n]}];let r=[];try{if(!e(t.version,n.version))return[{command:Gt.setStyle,args:[n]}];e(t.center,n.center)||r.push({command:Gt.setCenter,args:[n.center]}),e(t.zoom,n.zoom)||r.push({command:Gt.setZoom,args:[n.zoom]}),e(t.bearing,n.bearing)||r.push({command:Gt.setBearing,args:[n.bearing]}),e(t.pitch,n.pitch)||r.push({command:Gt.setPitch,args:[n.pitch]}),e(t.sprite,n.sprite)||r.push({command:Gt.setSprite,args:[n.sprite]}),e(t.glyphs,n.glyphs)||r.push({command:Gt.setGlyphs,args:[n.glyphs]}),e(t.transition,n.transition)||r.push({command:Gt.setTransition,args:[n.transition]}),e(t.light,n.light)||r.push({command:Gt.setLight,args:[n.light]}),e(t.fog,n.fog)||r.push({command:Gt.setFog,args:[n.fog]}),e(t.projection,n.projection)||r.push({command:Gt.setProjection,args:[n.projection]});const i={},o=[];!function(t,n,r,i){let o;for(o in n=n||{},t=t||{})t.hasOwnProperty(o)&&(n.hasOwnProperty(o)||qt(o,r,i));for(o in n)n.hasOwnProperty(o)&&(t.hasOwnProperty(o)?e(t[o],n[o])||("geojson"===t[o].type&&"geojson"===n[o].type&&Zt(t,n,o)?r.push({command:Gt.setGeoJSONSourceData,args:[o,n[o].data]}):Wt(o,n,r,i)):Ht(o,n,r))}(t.sources,n.sources,o,i);const a=[];t.layers&&t.layers.forEach(t=>{t.source&&i[t.source]?r.push({command:Gt.removeLayer,args:[t.id]}):a.push(t)});let s=t.terrain;s&&i[s.source]&&(r.push({command:Gt.setTerrain,args:[void 0]}),s=void 0),r=r.concat(o),e(s,n.terrain)||r.push({command:Gt.setTerrain,args:[n.terrain]}),function(t,n,r){n=n||[];const i=(t=t||[]).map(Yt),o=n.map(Yt),a=t.reduce(Kt,{}),s=n.reduce(Kt,{}),l=i.slice(),c=Object.create(null);let u,h,d,p,f,m,g;for(u=0,h=0;u<i.length;u++)d=i[u],s.hasOwnProperty(d)?h++:(r.push({command:Gt.removeLayer,args:[d]}),l.splice(l.indexOf(d,h),1));for(u=0,h=0;u<o.length;u++)d=o[o.length-1-u],l[l.length-1-u]!==d&&(a.hasOwnProperty(d)?(r.push({command:Gt.removeLayer,args:[d]}),l.splice(l.lastIndexOf(d,l.length-h),1)):h++,m=l[l.length-u],r.push({command:Gt.addLayer,args:[s[d],m]}),l.splice(l.length-u,0,d),c[d]=!0);for(u=0;u<o.length;u++)if(d=o[u],p=a[d],f=s[d],!c[d]&&!e(p,f))if(e(p.source,f.source)&&e(p["source-layer"],f["source-layer"])&&e(p.type,f.type)){for(g in Xt(p.layout,f.layout,r,d,null,Gt.setLayoutProperty),Xt(p.paint,f.paint,r,d,null,Gt.setPaintProperty),e(p.filter,f.filter)||r.push({command:Gt.setFilter,args:[d,f.filter]}),e(p.minzoom,f.minzoom)&&e(p.maxzoom,f.maxzoom)||r.push({command:Gt.setLayerZoomRange,args:[d,f.minzoom,f.maxzoom]}),p)p.hasOwnProperty(g)&&"layout"!==g&&"paint"!==g&&"filter"!==g&&"metadata"!==g&&"minzoom"!==g&&"maxzoom"!==g&&(0===g.indexOf("paint.")?Xt(p[g],f[g],r,d,g.slice(6),Gt.setPaintProperty):e(p[g],f[g])||r.push({command:Gt.setLayerProperty,args:[d,g,f[g]]}));for(g in f)f.hasOwnProperty(g)&&!p.hasOwnProperty(g)&&"layout"!==g&&"paint"!==g&&"filter"!==g&&"metadata"!==g&&"minzoom"!==g&&"maxzoom"!==g&&(0===g.indexOf("paint.")?Xt(p[g],f[g],r,d,g.slice(6),Gt.setPaintProperty):e(p[g],f[g])||r.push({command:Gt.setLayerProperty,args:[d,g,f[g]]}))}else r.push({command:Gt.removeLayer,args:[d]}),m=l[l.lastIndexOf(d)+1],r.push({command:Gt.addLayer,args:[f,m]})}(a,n.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:Gt.setStyle,args:[n]}]}return r}(this.serialize(),n).filter(t=>!(t.command in Ke));if(0===r.length)return!1;const i=r.filter(t=>!(t.command in Ye));if(i.length>0)throw new Error(`Unimplemented: ${i.map(t=>t.command).join(", ")}.`);return r.forEach(t=>{"setTransition"!==t.command&&"setProjection"!==t.command&&this[t.command].apply(this,t.args)}),this.stylesheet=n,this._updateMapProjection(),!0}addImage(e,n){return this.getImage(e)?this.fire(new t.ErrorEvent(new Error("An image with this name already exists."))):(this.imageManager.addImage(e,n),this._afterImageUpdated(e),this)}updateImage(t,e){this.imageManager.updateImage(t,e)}getImage(t){return this.imageManager.getImage(t)}removeImage(e){return this.getImage(e)?(this.imageManager.removeImage(e),this._afterImageUpdated(e),this):this.fire(new t.ErrorEvent(new Error("No image with this name exists.")))}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addSource(e,n,r={}){if(this._checkLoaded(),void 0!==this.getSource(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 only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(t.validateSource,`sources.${e}`,n,null,r))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const i=Mt(e,n,this.dispatcher,this);i.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(e),source:i.serialize(),sourceId:e}));const o=n=>{const r=(n?"symbol:":"other:")+e,o=this._sourceCaches[r]=new t.SourceCache(r,i,n);(n?this._symbolSourceCaches:this._otherSourceCaches)[e]=o,o.style=this,o.onAdd(this.map)};o(!1),"vector"!==n.type&&"geojson"!==n.type||o(!0),i.onAdd&&i.onAdd(this.map),this._changed=!0}removeSource(e){this._checkLoaded();const n=this.getSource(e);if(!n)throw new Error("There is no source with this ID");for(const i in this._layers)if(this._layers[i].source===e)return this.fire(new t.ErrorEvent(new Error(`Source "${e}" cannot be removed while layer "${i}" is using it.`)));if(this.terrain&&this.terrain.get().source===e)return this.fire(new t.ErrorEvent(new Error(`Source "${e}" cannot be removed while terrain is using it.`)));const r=this._getSourceCaches(e);for(const i of r)delete this._sourceCaches[i.id],delete this._updatedSources[i.id],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:i.getSource().id})),i.setEventedParent(null),i.clearTiles();return delete this._otherSourceCaches[e],delete this._symbolSourceCaches[e],n.setEventedParent(null),n.onRemove&&n.onRemove(this.map),this._changed=!0,this}setGeoJSONSourceData(t,e){this._checkLoaded(),this.getSource(t).setData(e),this._changed=!0}getSource(t){const e=this._getSourceCache(t);return e&&e.getSource()}_getSources(){const t=[];for(const e in this._otherSourceCaches){const n=this._getSourceCache(e);n&&t.push(n.getSource())}return t}addLayer(e,n,r={}){this._checkLoaded();const i=e.id;if(this.getLayer(i))return void this.fire(new t.ErrorEvent(new Error(`Layer with id "${i}" already exists on this map`)));let o;if("custom"===e.type){if(Xe(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateLayer,`layers.${i}`,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize(),this._updateLayerCount(o,!0)}const a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)return void this.fire(new t.ErrorEvent(new Error(`Layer with id "${n}" does not exist on this map.`)));this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o;const s=this._getLayerSourceCache(o);if(this._removedLayers[i]&&o.source&&s&&"custom"!==o.type){const t=this._removedLayers[i];delete this._removedLayers[i],t.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",s.pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(e,n){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.ErrorEvent(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===n)return;const r=this._order.indexOf(e);this._order.splice(r,1);const 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,this._updateDrapeFirstLayers())}removeLayer(e){this._checkLoaded();const n=this._layers[e];if(!n)return void this.fire(new t.ErrorEvent(new Error(`The layer '${e}' does not exist in the map's style and cannot be removed.`)));n.setEventedParent(null),this._updateLayerCount(n,!1);const 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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(t){return this._layers[t]}hasLayer(t){return t in this._layers}hasLayerType(t){for(const e in this._layers)if(this._layers[e].type===t)return!0;return!1}setLayerZoomRange(e,n,r){this._checkLoaded();const 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.`)))}setFilter(n,r,i={}){this._checkLoaded();const o=this.getLayer(n);if(o){if(!e(o.filter,r))return null==r?(o.filter=void 0,void this._updateLayer(o)):void(this._validate(t.validateFilter,`layers.${o.id}.filter`,r,{layerType:o.type},i)||(o.filter=t.clone$1(r),this._updateLayer(o)))}else this.fire(new t.ErrorEvent(new Error(`The layer '${n}' does not exist in the map's style and cannot be filtered.`)))}getFilter(e){const n=this.getLayer(e);return n&&t.clone$1(n.filter)}setLayoutProperty(n,r,i,o={}){this._checkLoaded();const a=this.getLayer(n);a?e(a.getLayoutProperty(r),i)||(a.setLayoutProperty(r,i,o),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error(`The layer '${n}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(e,n){const r=this.getLayer(e);if(r)return r.getLayoutProperty(n);this.fire(new t.ErrorEvent(new Error(`The layer '${e}' does not exist in the map's style.`)))}setPaintProperty(n,r,i,o={}){this._checkLoaded();const a=this.getLayer(n);a?e(a.getPaintProperty(r),i)||(a.setPaintProperty(r,i,o)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[n]=!0):this.fire(new t.ErrorEvent(new Error(`The layer '${n}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(t,e){const n=this.getLayer(t);return n&&n.getPaintProperty(e)}setFeatureState(e,n){this._checkLoaded();const r=e.source,i=e.sourceLayer,o=this.getSource(r);if(!o)return void this.fire(new t.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)));const a=o.type;if("geojson"===a&&i)return void this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===a&&!i)return void this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided.")));const s=this._getSourceCaches(r);for(const t of s)t.setFeatureState(i,e.id,n)}removeFeatureState(e,n){this._checkLoaded();const r=e.source,i=this.getSource(r);if(!i)return void this.fire(new t.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)));const o=i.type,a="vector"===o?e.sourceLayer:void 0;if("vector"===o&&!a)return void this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(n&&"string"!=typeof e.id&&"number"!=typeof e.id)return void this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const s=this._getSourceCaches(r);for(const t of s)t.removeFeatureState(a,e.id,n)}getFeatureState(e){this._checkLoaded();const n=e.source,r=e.sourceLayer,i=this.getSource(n);if(i){if("vector"!==i.type||r)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(n)[0].getFeatureState(r,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const e={};for(const t in this._sourceCaches){const n=this._sourceCaches[t].getSource();e[n.id]||(e[n.id]=n.serialize())}return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.getTerrain()||void 0,fog:this.stylesheet.fog,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,projection:this.stylesheet.projection,sources:e,layers:this._serializeLayers(this._order)},t=>void 0!==t)}_updateLayer(t){this._updatedLayers[t.id]=!0;const e=this._getLayerSourceCache(t);t.source&&!this._updatedSources[t.source]&&e&&"raster"!==e.getSource().type&&(this._updatedSources[t.source]="reload",e.pause()),this._changed=!0,t.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(t){const e=t=>"fill-extrusion"===this._layers[t].type,n={},r=[];for(let o=this._order.length-1;o>=0;o--){const i=this._order[o];if(e(i)){n[i]=o;for(const e of t){const t=e[i];if(t)for(const e of t)r.push(e)}}}r.sort((t,e)=>e.intersectionZ-t.intersectionZ);const i=[];for(let o=this._order.length-1;o>=0;o--){const a=this._order[o];if(e(a))for(let t=r.length-1;t>=0;t--){const e=r[t].feature;if(n[e.layer.id]<o)break;i.push(e),r.pop()}else for(const e of t){const t=e[a];if(t)for(const e of t)i.push(e.feature)}}return i}queryRenderedFeatures(e,n,r){n&&n.filter&&this._validate(t.validateFilter,"queryRenderedFeatures.filter",n.filter,null,n);const 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(const e of n.layers){const n=this._layers[e];if(!n)return this.fire(new t.ErrorEvent(new Error(`The layer '${e}' does not exist in the map's style and cannot be queried for features.`))),[];i[n.source]=!0}}const o=[];n.availableImages=this._availableImages;const a=n&&n.layers?n.layers.some(t=>{const e=this.getLayer(t);return e&&e.is3D()}):this.has3DLayers(),s=B.createFromScreenPoints(e,r);for(const t in this._sourceCaches){const e=this._sourceCaches[t].getSource().id;n.layers&&!i[e]||o.push(Bt(this._sourceCaches[t],this._layers,this._serializedLayers,s,n,r,a,!!this.map._showQueryGeometry))}return this.placement&&o.push(function(t,e,n,r,i,o,a){const s={},l=o.queryRenderedSymbols(r),c=[];for(const u of Object.keys(l).map(Number))c.push(a[u]);c.sort(Lt);for(const u of c){const n=u.featureIndex.lookupSymbolFeatures(l[u.bucketInstanceId],e,u.bucketIndex,u.sourceLayerIndex,i.filter,i.layers,i.availableImages,t);for(const t in n){const e=s[t]=s[t]||[],r=n[t];r.sort((t,e)=>{const n=u.featureSortOrder;if(n){const r=n.indexOf(t.featureIndex);return n.indexOf(e.featureIndex)-r}return e.featureIndex-t.featureIndex});for(const t of r)e.push(t)}}for(const u in s)s[u].forEach(e=>{const r=e.feature,i=n(t[u]).getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i});return s}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),s.screenGeometry,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(e,n){n&&n.filter&&this._validate(t.validateFilter,"querySourceFeatures.filter",n.filter,null,n);const r=this._getSourceCaches(e);let i=[];for(const t of r)i=i.concat(zt(t,n));return i}addSourceType(t,e,n){return tn.getSourceType(t)?n(new Error(`A source type called "${t}" already exists.`)):(tn.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},n):n(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const r=this.light.getLight();let i=!1;for(const a in t)if(!e(t[a],r[a])){i=!0;break}if(!i)return;const o=this._setTransitionParameters({duration:300,delay:0});this.light.setLight(t,n),this.light.updateTransitions(o)}getTerrain(){return this.terrain&&1===this.terrain.drapeRenderMode?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}setTerrain(n,r=1){if(this._checkLoaded(),!n)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);if(1===r){if("object"==typeof n.source){const e="terrain-dem-src";this.addSource(e,n.source),n=t.clone$1(n),n=t.extend(n,{source:e})}if(this._validate(t.validateTerrain,"terrain",n))return}if(!this.terrain||this.terrain&&r!==this.terrain.drapeRenderMode)this._createTerrain(n,r);else{const r=this.terrain,i=r.get();for(const e of Object.keys(t.spec.terrain))!n.hasOwnProperty(e)&&t.spec.terrain[e].default&&(n[e]=t.spec.terrain[e].default);for(const t in n)if(!e(n[t],i[t])){r.set(n),this.stylesheet.terrain=n;const t=this._setTransitionParameters({duration:0});r.updateTransitions(t);break}}this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(t){const e=this.fog=new I(t,this.map.transform);this.stylesheet.fog=t;const n=this._setTransitionParameters({duration:0});e.updateTransitions(n)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask(()=>{for(const t of this.map._markers)t._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(t){if(this._checkLoaded(),!t)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const n=this.fog,r=n.get();0===Object.keys(t).length&&n.set(t);for(const i in t)if(!e(t[i],r[i])){n.set(t),this.stylesheet.fog=t;const e=this._setTransitionParameters({duration:0});n.updateTransitions(e);break}}else this._createFog(t);this._markersNeedUpdate=!0}_setTransitionParameters(e){return{now:t.exported.now(),transition:t.extend(e,this.stylesheet.transition)}}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const t=this._order.filter(t=>this.isLayerDraped(this._layers[t])),e=this._order.filter(t=>!this.isLayerDraped(this._layers[t]));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...t),this._drapedFirstOrder.push(...e)}_createTerrain(t,e){const n=this.terrain=new C(t,e);this.stylesheet.terrain=t,this.dispatcher.broadcast("enableTerrain",!this.terrainSetForDrapingOnly()),this._force3DLayerUpdate();const r=this._setTransitionParameters({duration:0});n.updateTransitions(r)}_force3DLayerUpdate(){for(const t in this._layers){const e=this._layers[t];"fill-extrusion"===e.type&&this._updateLayer(e)}}_forceSymbolLayerUpdate(){for(const t in this._layers){const e=this._layers[t];"symbol"===e.type&&this._updateLayer(e)}}_validate(e,n,r,i,o={}){return(!o||!1!==o.validate)&&Xe(this,e.call(t.validateStyle,t.extend({key:n,style:this.serialize(),value:r,styleSpec:t.spec},i)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const t in this._layers)this._layers[t].setEventedParent(null);for(const t in this._sourceCaches)this._sourceCaches[t].clearTiles(),this._sourceCaches[t].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(t){const e=this._getSourceCaches(t);for(const n of e)n.clearTiles()}_reloadSource(t){const e=this._getSourceCaches(t);for(const n of e)n.resume(),n.reload()}_reloadSources(){for(const t of this._getSources())t.reload&&t.reload()}_updateSources(t){for(const e in this._sourceCaches)this._sourceCaches[e].update(t)}_generateCollisionBoxes(){for(const t in this._sourceCaches){const e=this._sourceCaches[t];e.resume(),e.reload()}}_updatePlacement(e,n,r,i,o=!1){let a=!1,s=!1;const l={};for(const t of this._order){const n=this._layers[t];if("symbol"!==n.type)continue;if(!l[n.source]){const t=this._getLayerSourceCache(n);if(!t)continue;l[n.source]=t.getRenderableIds(!0).map(e=>t.getTileByID(e)).sort((t,e)=>e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1))}const r=this.crossTileSymbolIndex.addLayer(n,l[n.source],e.center.lng,e.projection);a=a||r}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),o=o||this._layerOrderChanged||0===r,this._layerOrderChanged&&this.fire(new t.Event("neworder")),(o||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.exported.now(),e.zoom))&&(this.pauseablePlacement=new Ue(e,this._order,o,n,r,i,this.placement,this.fog&&e.projection.supportsFog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.exported.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const t of this._order){const e=this._layers[t];"symbol"===e.type&&this.placement.updateLayerOpacities(e,l[e.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.exported.now())}_releaseSymbolFadeTiles(){for(const t in this._sourceCaches)this._sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,e,n){this.imageManager.getImages(e.icons,n),this._updateTilesForChangedImages();const r=t=>{t&&t.setDependencies(e.tileID.key,e.type,e.icons)};r(this._otherSourceCaches[e.source]),r(this._symbolSourceCaches[e.source])}getGlyphs(t,e,n){this.glyphManager.getGlyphs(e.stacks,n)}getResource(e,n,r){return t.makeRequest(n,r)}_getSourceCache(t){return this._otherSourceCaches[t]}_getLayerSourceCache(t){return"symbol"===t.type?this._symbolSourceCaches[t.source]:this._otherSourceCaches[t.source]}_getSourceCaches(t){const e=[];return this._otherSourceCaches[t]&&e.push(this._otherSourceCaches[t]),this._symbolSourceCaches[t]&&e.push(this._symbolSourceCaches[t]),e}_isSourceCacheLoaded(e){const n=this._getSourceCaches(e);return 0===n.length?(this.fire(new t.ErrorEvent(new Error(`There is no source with ID '${e}'`))),!1):n.every(t=>t.loaded())}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}tn.getSourceType=function(t){return It[t]},tn.setSourceType=function(t,e){It[t]=e},tn.registerForPluginStateChange=t.registerForPluginStateChange;
46var en="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#define EXTENT 8192.0\n#define HALF_PI PI/2.0\n#define QUARTER_PI PI/4.0\n#define RAD_TO_DEG 180.0/PI\n#define DEG_TO_RAD PI/180.0\n#define GLOBE_RADIUS EXTENT/PI/2.0",nn="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",rn="\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix(\nmix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;}\n#else\nvec3 elevationVector(vec2 pos) { return vec3(0,0,1); }\n#endif\n#ifdef TERRAIN\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nuniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;\n#else\nuniform sampler2D u_dem;uniform sampler2D u_dem_prev;\n#endif\nuniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos));\n#ifdef TERRAIN_DEM_NEAREST_FILTER\nreturn u_exaggeration*tl;\n#endif\nfloat tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}float prevElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem_prev,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {float nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {return currentElevation(apos);}\n#endif\nhighp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nfloat tl=texture2D(u_dem,pos).a;float tr=texture2D(u_dem,pos+vec2(off.x,0.0)).a;float bl=texture2D(u_dem,pos+vec2(0.0,off.y)).a;float br=texture2D(u_dem,pos+off).a;\n#else\nvec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);
46vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack);\n#endif\nreturn vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;vec4 bounds=vec4(d,vec2(1.0)-d);h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",on="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",an="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump float u_fog_temporal_offset;varying vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif";let sn={},ln={};const cn=[];fn(en,cn),fn(rn,cn),fn(on,cn),fn(an,cn),sn=mn("",rn),ln=mn(an,on);const un=mn("\nhighp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}
46vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}highp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}","\nfloat wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;}\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) {\n#ifndef PROJECTED_POS_ON_VIEWPORT\nfloat tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz;\n#else\nreturn vec3(0.0);\n#endif\n}vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);}\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(\nunpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered."),hn=en,dn="\n#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";var pn={background:mn("uniform vec4 u_color;uniform float u_opacity;void main() {vec4 out_color=u_color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),backgroundPattern:mn("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 out_color=mix(color1,color2,u_mix);\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);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);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#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),circle:mn("varying vec3 v_data;varying float v_visibility;\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\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\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius
46/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\ngl_FragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec3 v_data;varying float v_visibility;\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\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\n#ifdef PROJECTION_GLOBE_VIEW\nreturn u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) );\n#else\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#endif\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void 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\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);vec4 world_center;mat3 surface_vectors;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1);\n#else \nsurface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1);\n#endif\nvec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radiu
46s,stroke_width,view_scale,surface_vectors);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center;\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nocclusion_world_center=world_center;occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}"),clippingMask:mn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:mn("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef FOG\nif (u_is_globe==0) {gl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);}\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 tilePos=floor(a_pos*0.5);vec3 pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#else\npos=vec3(tilePos+extrude,elevation(tilePos));\n#endif\ngl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),heatmapTexture:mn("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:mn("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}","attribute vec3 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:mn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos_2f;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:mn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;\n#endif\nvarying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0;\n#ifdef PROJECTION_GLOBE_VIEW\ngl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1
46);\n#else\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);\n#endif\n}"),fill:mn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nvec4 out_color=color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutline:mn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutlinePattern:mn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=mix(color1,color2,u_fade);\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}
46"),fillPattern:mn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 out_color=mix(color1,color2,u_fade);\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillExtrusion:mn("varying vec4 v_color;\n#ifdef RENDER_SHADOWS\nvarying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\nvoid main() {\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvec3 normal=v_normal;\n#endif\nfloat z;vec4 color;\n#ifdef ZERO_ROOF_RADIUS\nz=float(normal.z > 0.00001);color=mix(v_color,v_roof_color,z);\n#else\ncolor=v_color;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;\n#ifdef ZERO_ROOF_RADIUS\nconcave*=(1.0-z);\n#endif\nfloat x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);color.rgb=color.rgb*shade;\n#endif\n#ifdef RENDER_SHADOWS\n#ifdef ZERO_ROOF_RADIUS\nnormal=mix(normal,vec3(0.0,0.0,1.0),z);\n#endif\ncolor.xyz=shadowed_color_normal(color.xyz,normalize(normal),v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform float u_edge_radius;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec4 v_color;\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nv_normal=normal;\n#endif\nbase=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=0.0;float c_ele;vec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h);\n#else\nh=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);\n#ifdef RENDER_SHADOWS\nv_pos_light_view_0=u_light_matrix_0*vec4(pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1);v_depth=gl_Position.w;
46\n#endif\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);directional*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\nv_color.rgb+=clamp(color.rgb*directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_color*=u_opacity;\n#ifdef ZERO_ROOF_RADIUS\nv_roof_color=vec4(0.0,0.0,0.0,1.0);float roof_radiance=clamp(u_lightpos.z,0.0,1.0);roof_radiance=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roof_radiance);v_roof_color.rgb+=clamp(color.rgb*roof_radiance*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_roof_color*=u_opacity;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),fillExtrusionPattern:mn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 out_color=mix(color1,color2,u_fade);out_color=out_color*v_lighting;\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=z;vec3 p;float c_ele;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h);\n#else\np=vec3(pos_nx.xy,z);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0\n? pos_nx.xy\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}
46\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);directional*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\nv_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;\n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}"),hillshadePrepare:mn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nreturn texture2D(u_image,coord).a/4.0;\n#else\nvec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;\n#endif\n}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos);float f=getElevation(v_pos+vec2(epsilon.x,0));float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float h=getElevation(v_pos+vec2(0,epsilon.y));float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2(\n(c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(\nderiv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:mn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef FOG\ngl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos));\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),line:mn("uniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform sampler2D u_dash_image;uniform float u_mix;uniform vec3 u_scale;varying vec2 v_tex_a;varying vec2 v_tex_b;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform sampler2D u_gradient_image;\n#endif\nuniform float u_border_width;uniform vec4 u_border_color;float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash_from\n#pragma mapbox: define lowp vec4 dash_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash_from\n#pragma mapbox: initialize lowp vec4 dash_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\n#ifdef RENDER_LINE_DASH\nfloat sdfdist_a=texture2D(u_dash_image,v_tex_a).a;float sdfdist_b=texture2D(u_dash_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfwidth=min(dash_from.z*u_scale.y,dash_to.z*u_scale.z);
46float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/sdfwidth;alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);\n#endif\n#ifdef RENDER_LINE_GRADIENT\nhighp vec4 out_color=texture2D(u_gradient_image,v_uv.xy);\n#else\nvec4 out_color=color;\n#endif\n#ifdef RENDER_LINE_TRIM_OFFSET\nhighp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);}}\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\n#ifdef RENDER_LINE_ALPHA_DISCARD\nif (alpha < u_alpha_discard_threshold) {discard;}\n#endif\n#ifdef RENDER_LINE_BORDER\nfloat edgeBlur=(u_border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2);\n#ifdef RENDER_LINE_BORDER_AUTO\nfloat Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);}\n#else\nout_color.rgb=mix(u_border_color.rgb,out_color.rgb,smoothAlpha);\n#endif\n}\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define EXTRUDE_SCALE 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nattribute highp vec4 a_packed;\n#endif\n#ifdef RENDER_LINE_DASH\nattribute float a_linesofar;\n#endif\nuniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform vec2 u_texsize;uniform mediump vec3 u_scale;varying vec2 v_tex_a;varying vec2 v_tex_b;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform float u_image_height;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash_from\n#pragma mapbox: define lowp vec4 dash_to\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\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash_from\n#pragma mapbox: initialize lowp vec4 dash_to\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\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nfloat a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3];\n#ifdef RENDER_LINE_GRADIENT\nhighp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end);\n#else\nv_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end);\n#endif\n#endif\n#ifdef RENDER_LINE_DASH\nfloat tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;float scaleA=dash_from.z==0.0 ? 0.0 : tileZoomRatio/(dash_from.z*fromScale);float scaleB=dash_to.z==0.0 ? 0.0 : tileZoomRatio/(dash_to.z*toScale);float heightA=dash_from.y;float heightB=dash_to.y;v_tex_a=vec2(a_linesofar*scaleA/floorwidth,(-normal.y*heightA+dash_from.x+0.5)/u_texsize.y);v_tex_b=vec2(a_linesofar*scaleB/floorwidth,(-normal.y*heightB+dash_to.x+0.5)/u_texsize.y);\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}
46"),linePattern:mn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\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#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\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#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),raster:mn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(\ndot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef FOG\nout_color=fog_dither(fog_apply(out_color,v_fog_pos));\n#endif\ngl_FragColor=vec4(out_color*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {float w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,0,w);v_pos0=a_texture_pos/8192.0;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),symbolIcon:mn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;}"),symbolSDF:mn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\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\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\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_data0;varying vec3 v_data1;\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\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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/
46offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade);}"),symbolTextAndIcon:mn("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\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\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\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform vec2 u_texsize_icon;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec4 v_data0;varying vec4 v_data1;\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\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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade,is_s
46df);}"),terrainRaster:mn("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nvarying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nvoid main() {vec4 color=texture2D(u_image0,v_pos0);\n#ifdef RENDER_SHADOWS\ncolor.xyz=shadowed_color(color.xyz,v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nconst float skirtOffset=24575.0;const float wireframeOffset=0.00015;void main() {v_pos0=a_texture_pos/8192.0;float skirt=float(a_pos.x >=skirtOffset);float elevation=elevation(a_texture_pos)-skirt*u_skirt_height;\n#ifdef TERRAIN_WIREFRAME\nelevation+=u_skirt_height*u_skirt_height*wireframeOffset;\n#endif\nvec2 decodedPos=a_pos-vec2(skirt*skirtOffset,0.0);gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n#ifdef RENDER_SHADOWS\nvec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w;\n#endif\n}"),terrainDepth:mn("#ifdef GL_ES\nprecision highp float;\n#endif\nvarying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying float v_depth;void main() {float elevation=elevation(a_texture_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:mn("\nvarying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(e
46nd-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",nn),skyboxGradient:mn("varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",nn),skyboxCapture:mn
vendor: 3,851 bytes, line 46
46("\nvarying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;\n#ifdef GL_ES\nprecision highp float;\n#endif\n#define BETA_R                  vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M                  vec3(21e-6,21e-6,21e-6)\n#define MIE_G                   0.76\n#define DENSITY_HEIGHT_SCALE_R  8000.0\n#define DENSITY_HEIGHT_SCALE_M  1200.0\n#define PLANET_RADIUS           6360e3\n#define ATMOSPHERE_RADIUS       6420e3\n#define SAMPLE_STEPS            10\n#define DENSITY_STEPS           4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}","attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}"),globeRaster:
46mn("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifndef FOG\nuniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport;\n#endif\nvoid main() {vec4 color;\n#ifdef CUSTOM_ANTIALIASING\nvec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture2D(u_image0,v_pos0);color=vec4(raster.rgb*antialias,raster.a*antialias);\n#else\ncolor=texture2D(u_image0,v_pos0);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;\n#ifdef GLOBE_POLES\nattribute vec3 a_globe_pos;attribute vec2 a_uv;\n#else\nattribute vec2 a_pos;\n#endif\nvarying vec2 v_pos0;const float wireframeOffset=1e3;float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(QUARTER_PI+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}void main() {\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;vec2 uv=a_uv;\n#else\nfloat tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 latLng=u_grid_matrix*vec3(a_pos,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY);\n#endif\nv_pos0=uv;vec2 tile_pos=uv*EXTENT;\n#ifdef GLOBE_POLES\nvec3 up_vector=normalize(globe_pos)*u_tile_up_scale;\n#else\nvec3 up_vector=elevationVector(tile_pos);\n#endif\nfloat height=elevation(tile_pos);\n#ifdef TERRAIN_WIREFRAME\nheight+=wireframeOffset;\n#endif\nglobe_pos+=up_vector*height;\n#ifdef GLOBE_POLES\nvec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0);\n#else\nvec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);\n#endif\ngl_Position=u_proj_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n}"),globeAtmosphere:mn("uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec3 u_start_color;uniform vec4 u_color;uniform vec4 u_space_color;uniform vec4 u_high_color;uniform float u_star_intensity;uniform float u_star_size;uniform float u_star_density;uniform float u_horizon_angle;uniform mat4 u_rotation_matrix;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;highp float random(highp vec3 p) {p=fract(p*vec3(23.2342,97.1231,91.2342));p+=dot(p.zxy,p.yxz+123.1234);return fract(p.x*p.y);}float stars(vec3 p,float scale,vec2 offset) {vec2 uv_scale=(u_viewport/u_star_size)*scale;vec3 position=vec3(p.xy*uv_scale+offset*u_viewport,p.z);vec3 q=fract(position)-0.5;vec3 id=floor(position);float random_visibility=step(random(id),u_star_density);float circle=smoothstep(0.5+u_star_intensity,0.5,length(q));
46return circle*random_visibility;}void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir;\n#ifdef PROJECTION_GLOBE_VIEW\nglobe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {discard;return;}\n#endif\nhighp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ?\n0.0 : max(acos(dot(dir,horizon_dir)),0.0);float horizon_angle;\n#ifdef PROJECTION_GLOBE_VIEW\nhighp vec3 closest_point=globe_pos_dot_dir*dir;float closest_point_to_center=length(closest_point-u_globe_pos);float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ?\nPI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t);\n#else\nhorizon_angle=horizon_angle_mercator;\n#endif\nhorizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb;vec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c =mix(color_stop_2,c2,t);float a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);vec2 uv=gl_FragCoord.xy/u_viewport-0.5;float aspect_ratio=u_viewport.x/u_viewport.y;vec4 uv_dir=vec4(normalize(vec3(uv.x*aspect_ratio,uv.y,1.0)),1.0);uv_dir=u_rotation_matrix*uv_dir;vec3 n=abs(uv_dir.xyz);vec2 uv_remap=(n.x > n.y && n.x > n.z) ? uv_dir.yz/uv_dir.x:\n(n.y > n.x && n.y > n.z) ? uv_dir.zx/uv_dir.y:\nuv_dir.xy/uv_dir.z;uv_remap.x/=aspect_ratio;vec3 D=vec3(uv_remap,1.0);highp float star_field=0.0;if (u_star_intensity > 0.0) {star_field+=stars(D,1.2,vec2(0.0,0.0));star_field+=stars(D,1.0,vec2(1.0,0.0));star_field+=stars(D,0.8,vec2(0.0,1.0));star_field+=stars(D,0.6,vec2(1.0,1.0));star_field*=(1.0-pow(t,0.25+(1.0-u_high_color.a)*0.75));c+=star_field*alpha_2;}c=dither(c,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=vec4(c,a);}","attribute vec3 a_pos;attribute vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;void main() {v_ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix(\nmix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}")};function fn(t,e){const n=t.replace(/\s*\/\/[^\n]*\n/g,"\n").split("\n");for(let r of n)if(r=r.trim(),"#"===r[0]&&r.includes("if")&&!r.includes("endif")){r=r.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const t=r.split(" ");for(const n of t)e.includes(n)||e.push(n)}}function mn(t,e){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=e.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),i={},o=[...cn];return fn(t,o),fn(e,o),{fragmentSource:t=t.replace(n,(t,e,n,r,o)=>(i[o]=!0,"define"===e?`\n#ifndef HAS_UNIFORM_u_${o}\nvarying ${n} ${r} ${o};\n#else\nuniform ${n} ${r} u_${o};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${o}\n    ${n} ${r} ${o} = u_${o};\n#endif\n`)),vertexSource:e=e.replace(n,(t,e,n,r,o)=>{const a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return i[o]?"define"===e?`\n#ifndef HAS_UNIFORM_u_${o}\nuniform lowp float u_${o}_t;\nattribute ${n} ${a} a_${o};\nvarying ${n} ${r} ${o};\n#else\nuniform ${n} ${r} u_${o};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${o}\n    ${o} = a_${o};\n#else\n    ${n} ${r} ${o} = u_${o};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${o}\n    ${o} = unpack_mix_${s}(a_${o}, u_${o}_t);\n#else\n    ${n} ${r} ${o} = u_${o};\n#endif\n`:"define"===e?`\n#ifndef HAS_UNIFORM_u_${o}\nuniform lowp float u_${o}_t;\nattribute ${n} ${a} a_${o};\n#else\nuniform ${n} ${r} u_${o};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${o}\n    ${n} ${r} ${o} = a_${o};\n#else\n    ${n} ${r} ${o} = u_${o};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${o}\n    ${n} ${r} ${o} = unpack_mix_${s}(a_${o}, u_${o}_t);\n#else\n    ${n} ${r} ${o} = u_${o};\n#endif\n`}),staticAttributes:r,usedDefines:o}}class gn{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(t,e,n,r,i,o,a){this.context=t;let s=this.boundPaintVertexBuffers.length!==r.length;for(let c=0;!s&&c<r.length;c++)this.boundPaintVertexBuffers[c]!==r[c]&&(s=!0);let l=this.boundDynamicVertexBuffers.length!==a.length;for(let c=0;!l&&c<a.length;c++)this.boundDynamicVertexBuffers[c]!==a[c]&&(l=!0);if(!t.extVertexArrayObject||!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==n||s||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==o)this.freshBind(e,n,r,i,o,a);else{t.bindVertexArrayOES.set(this.vao);for(const t of a)t&&t.bind();i&&i.dynamicDraw&&i.bind()}}freshBind(t,e,n,r,i,o){let a;const s=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),a=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=i,this.boundDynamicVertexBuffers=o;else{a=l.currentNumAttributes||0;for(let t=s;t<a;t++)c.disableVertexAttribArray(t)}e.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i
vendor: 15,336 bytes, line 46
46);for(const u of n)u.enableAttributes(c,t),u.bind(),u.setVertexAttribPointers(c,t,i);for(const u of o)u&&(u.enableAttributes(c,t),u.bind(),u.setVertexAttribPointers(c,t,i));r&&r.bind(),l.currentNumAttributes=s}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function yn(e,n){const r=Math.pow(2,n.canonical.z),i=n.canonical.y;return[new t.MercatorCoordinate(0,i/r).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/r).toLngLat().lat]}function _n(e,n,r,i,o,a,s){const l=e.context,c=l.gl,u=r.fbo;if(!u)return;e.prepareDrawTile();const h=e.useProgram("hillshade");l.activeTexture.set(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,u.colorAttachment.get());const d=((t,e,n,r)=>{const i=n.paint.get("hillshade-shadow-color"),o=n.paint.get("hillshade-highlight-color"),a=n.paint.get("hillshade-accent-color");let s=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(s-=t.transform.angle);const l=!t.options.moving;return{u_matrix:r||t.transform.calculateProjMatrix(e.tileID.toUnwrapped(),l),u_image:0,u_latrange:yn(0,e.tileID),u_light:[n.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:o,u_accent:a}})(e,r,i,e.terrain?n.projMatrix:null);e.prepareDrawProgram(l,h,n.toUnwrapped());const{tileBoundsBuffer:p,tileBoundsIndexBuffer:f,tileBoundsSegments:m}=e.getTileBoundsBuffers(r);h.draw(l,c.TRIANGLES,o,a,s,t.CullFaceMode.disabled,d,i.id,p,f,m)}function vn(e,n,r){if(!n.needsDEMTextureUpload)return;const i=e.context,o=i.gl;i.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||e.getTileTexture(r.stride);const a=r.getPixels();n.demTexture?n.demTexture.update(a,{premultiply:!1}):n.demTexture=new t.Texture(i,a,o.RGBA,{premultiply:!1}),n.needsDEMTextureUpload=!1}function bn(e,n,r,i,o,a){const s=e.context,l=s.gl;if(!n.dem)return;const c=n.dem;if(s.activeTexture.set(l.TEXTURE1),vn(e,n,c),!n.demTexture)return;n.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);const u=c.dim;s.activeTexture.set(l.TEXTURE0);let h=n.fbo;if(!h){const e=new t.Texture(s,{width:u,height:u,data:null},l.RGBA);e.bind(l.LINEAR,l.CLAMP_TO_EDGE),h=n.fbo=s.createFramebuffer(u,u,!0),h.colorAttachment.set(e.texture)}s.bindFramebuffer.set(h.framebuffer),s.viewport.set([0,0,u,u]);const{tileBoundsBuffer:d,tileBoundsIndexBuffer:p,tileBoundsSegments:f}=e.getMercatorTileBoundsBuffers();e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,i,o,a,t.CullFaceMode.disabled,((e,n)=>{const r=n.stride,i=t.create();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:n.unpackVector}})(n.tileID,c),r.id,d,p,f),n.needsHillshadePrepare=!1}const xn=e=>({u_matrix:new t.UniformMatrix4f(e),u_image0:new t.Uniform1i(e),u_skirt_height:new t.Uniform1f(e)}),wn=(t,e)=>({u_matrix:t,u_image0:0,u_skirt_height:e}),Sn=(t,e,n,r,i,o,a,s,l,c,u,h,d,p)=>({u_proj_matrix:Float32Array.from(t),u_globe_matrix:e,u_normalize_matrix:Float32Array.from(r),u_merc_matrix:n,u_zoom_transition:i,u_merc_center:o,u_image0:0,u_frustum_tl:a,u_frustum_tr:s,u_frustum_br:l,u_frustum_bl:c,u_globe_pos:u,u_globe_radius:h,u_viewport:d,u_grid_matrix:p?Float32Array.from(p):new Float32Array(9)});function Tn(t,e){return null!=t&&null!=e&&!(!t.hasData()||!e.hasData())&&null!=t.demTexture&&null!=e.demTexture&&t.tileID.key!==e.tileID.key}const En=new class{constructor(){this.operations={}}newMorphing(t,e,n,r,i){if(t in this.operations){const e=this.operations[t];e.to.tileID.key!==n.tileID.key&&(e.queued=n)}else this.operations[t]={startTime:r,phase:0,duration:i,from:e,to:n,queued:null}}getMorphValuesForProxy(t){if(!(t in this.operations))return null;const e=this.operations[t];return{from:e.from,to:e.to,phase:e.phase}}update(t){for(const e in this.operations){const n=this.operations[e];for(n.phase=(t-n.startTime)/n.duration;n.phase>=1||!this._validOp(n);)if(!this._nextOp(n,t)){delete this.operations[e];break}}}_nextOp(t,e){return!!t.queued&&(t.from=t.to,t.to=t.queued,t.queued=null,t.phase=0,t.startTime=e,!0)}_validOp(t){return t.from.hasData()&&t.to.hasData()}},Cn={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function On(t,e){const n=1<<t.z;return!e&&(0===t.x||t.x===n-1)||0===t.y||t.y===n-1}const Pn=t=>({u_matrix:t});function kn(e,n,r,i,o){if(o>0){const a=t.exported.now(),s=(a-e.timeAdded)/o,l=n?(a-n.timeAdded)/o:-1,c=r.getSource(),u=i.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!n||Math.abs(n.tileID.overscaledZ-u)>Math.abs(e.tileID.overscaledZ-u),d=h&&e.refreshedUponExpiration?1:t.clamp(h?s:1-l,0,1);return e.refreshedUponExpiration&&s>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}class An extends t.SourceCache{constructor(t){const e={type:"raster-dem",maxzoom:t.transform.maxZoom},n=new M($t(),null),r=Mt("mock-dem",e,n,t.style);super("mock-dem",r,!1),r.setEventedParent(this),this._sourceLoaded=!0}_loadTile(t,e){t.state="loaded",e(null)}}class In extends t.SourceCache{constructor(t){const e=Mt("proxy",{type:"geojson",maxzoom:t.transform.maxZoom},new M($t(),null),t.style);super("proxy",e,!1),e.setEventedParent(this),this.map=this.getSource().map=t,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(e,n,r){if(e.freezeTileCoverage)return;this.transform=e;const i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((n,r)=>{if(n[r.key]="",!this._tiles[r.key]){const n=new t.Tile(r,this._source.tileSize*r.overscaleFactor(),e.tileZoom);n.state="loaded",this._tiles[r.key]=n}return n},{});for(const t in this._tiles)t in i||(this.freeFBO(t),this._tiles[t].unloadVectorData(),delete this._tiles[t])}freeFBO(t){const e=this.proxyCachedFBO[t];if(void 0!==e){const n=Object.values(e);this.renderCachePool.push(...n),delete this.proxyCachedFBO[t]}}deallocRenderCache(){this.renderCache.forEach(t=>t.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class Mn extends t.OverscaledTileID{constructor(t,e,n){super(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y),this.proxyTileKey=e,this.projMatrix=n}}class Dn extends t.Elevation{constructor(e,n){super(),this.painter=e,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[r,i,o]=function(e){const n=new t.StructArrayLayout4i8,r=new t.StructArrayLayout3ui6,i=131;n.reserve(17161),r.reserve(33800);const o=t.EXTENT/128,a=t.EXTENT+o/2,s=a+o;for(let c=-o;c<s;c+=o)for(let e=-o;e<s;e+=o){const r=e<0||e>a||c<0||c>a?24575:0,i=t.clamp(Math.round(e),0,t.EXTENT),o=t.clamp(Math.round(c),0,t.EXTENT);n.emplaceBack(i+r,o,i,o)}const l=(t,e)=>{const n=e*i+t;r.emplaceBack(n+1,n,n+i),r.emplaceBack(n+i,n+i+1,n+1)};for(let t=1;t<129;t++)for(let e=1;e<129;e++)l(e,t);return[0,129].forEach(t=>{for(let e=0;e<130;e++)l(e,t),l(t,e)}),[n,r,32768]}(),a=e.context;this.gridBuffer=a.createVertexBuffer(r,t.boundsAttributes.members),this.gridIndexBuffer=a.createIndexBuffer(i),this.gridSegments=t.SegmentVector.simpleSegment(0,0,r.length,i.length),this.gridNoSkirtSegments=t.SegmentVector.simpleSegment(0,0,r.length,o),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new In(n.map),this.orthoMatrix=t.create(),t.ortho(this.orthoMatrix,"globe"===this.painter.transform.projection.name?.015:0,t.EXTENT,0,t.EXTENT,0,1);const s=a.gl;this._overlapStencilMode=new t.StencilMode({func:s.GEQUAL,mask:255},0,255,s.KEEP,s.KEEP,s.REPLACE),this._previousZoom=e.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=n,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new An(n.map)}set style(t){t.on("data",this._onStyleDataEvent.bind(this)),t.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=t,this._checkRenderCacheEfficiency()}update(e,n,r){if(e&&e.terrain){this._style!==e&&(this.style=e),this.enabled=!0;const i=e.terrain.properties;this.sourceCache=0===e.terrain.drapeRenderMode?this._mockSourceCache:e._getSourceCache(i.get("source")),this._exaggeration=i.get("exaggeration");const o=()=>{this.sourceCache.used&&t.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const e=this.getScaledDemTileSize();this.sourceCache.update(n,e,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,o(),this._initializing=!0),o(),n.updateElevation(!r),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(n),this._emptyDEMTextureDirty=!0}else this._disable()}resetTileLookupCache(t){this._findCoveringTileCache[t]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_checkRenderCacheEfficiency(){const e=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||100!==e.efficiency&&t.warnOnce(`Terrain render cache efficiency is not optimal (${e.efficiency}%) and performance\n                may be affected negatively, consider placing all background, fill and line layers before layer\n                with id '${e.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(t){t.coord&&"source"===t.dataType?this._clearRenderCacheForTile(t.sourceCacheId,t.coord):"style"===t.dataType&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const t in this._style._sourceCaches)this._style._sourceCaches[t].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach(t=>t.fb.destroy()),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0)}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const t=2*this.proxySourceCache.getSource().tileSize;return[t,t]}set useVertexMorphing(t){this._useVertexMorphing=t}updateTileBinding(e){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const n=this.proxySourceCache,r=this.painter.transform;this._initializing&&(this._initializing=0===r._centerAltitude&&-1===this.getAtPointOrZero(t.MercatorCoordinate.fromLngLat(r.center),-1),this._emptyDEMTextureDirty=!this._initializing);const i=this.proxyCoords=n.getIds().map(t=>{const e=n.getTileByID(t).tileID;return e.projMatrix=r.calculateProjMatrix(e.toUnwrapped()),e});!function(e,n){const r=n.transform.pointCoordinate(n.transform.getCameraPoint()),i=new t.pointGeometry(r.x,r.y);e.sort((e,n)=>{if(n.overscaledZ-e.overscaledZ)return n.overscaledZ-e.overscaledZ;const r=new t.pointGeometry(e.canonical.x+(1<<e.canonical.z)*e.wrap,e.canonical.y),o=new t.pointGeometry(n.canonical.x+(1<<n.canonical.z)*n.wrap,n.canonical.y),a=i.mult(1<<e.canonical.z);return a.x-=.5,a.y-=.5,a.distSqr(r)-a.distSqr(o)})}(i,this.painter),this._previousZoom=r.zoom;const o=this.proxyToSource||{};this.proxyToSource={},i.forEach(t=>{this.proxyToSource[t.key]={}}),this.terrainTileForTile={};const a=this._style._sourceCaches;for(const t in a){const n=a[t];if(!n.used)continue;if(n!==this.sourceCache&&this.resetTileLookupCache(n.id),this._setupProxiedCoordsForOrtho(n,e[t],o),n.usedForTerrain)continue;const r=e[t];n.getSource().reparseOverscaled&&this._assignTerrainTiles(r)}this.proxiedCoords[n.id]=i.map(t=>new Mn(t,t.key,this.orthoMatrix)),this._assignTerrainTiles(i),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(o),this.renderingToTexture=!1,this._updateTimestamp=t.exported.now();const s={};this._visibleDemTiles=[];for(const t of this.proxyCoords){const e=this.terrainTileForTile[t.key];if(!e)continue;const n=e.tileID.key;n in s||(this._visibleDemTiles.push(e),s[n]=n)}}_assignTerrainTiles(t){this._initializing||t.forEach(t=>{if(this.terrainTileForTile[t.key])return;const e=this._findTileCoveringTileID(t,this.sourceCache);e&&(this.terrainTileForTile[t.key]=e)})}_prepareDEMTextures(){const t=this.painter.context,e=t.gl;for(const n in this.terrainTileForTile){const r=this.terrainTileForTile[n],i=r.dem;!i||r.demTexture&&!r.needsDEMTextureUpload||(t.activeTexture.set(e.TEXTURE1),vn(this.painter,r,i))}}_prepareDemTileUniforms(t,e,n,r){if(!e||null==e.demTexture)return!1;const i=t.tileID.canonical,o=Math.pow(2,e.tileID.canonical.z-i.z),a=r||"";return n[`u_dem_tl${a}`]=[i.x*o%1,i.y*o%1],n[`u_dem_scale${a}`]=o,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const e=this.painter.context,n=e.gl;if(!this._emptyDepthBufferTexture){const r=new t.RGBAImage({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new t.Texture(e,r,n.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let t=0;const e=this._visibleDemTiles.reduce((e,n)=>{if(!n.dem)return e;const r=n.dem.tree.minimums[0];return r>0&&t++,e+r},0);return t?e/t:0}_updateEmptyDEMTexture(){const e=this.painter.context,n=e.gl;e.activeTexture.set(n.TEXTURE2);const r=this._getLoadedAreaMinimum(),i=new t.RGBAImage({width:1,height:1},new Uint8Array(t.DEMData.pack(r,this.sourceCache.getSource().encoding)));this._emptyDEMTextureDirty=!1;let o=this._emptyDEMTexture;return o?o.update(i,{premultiply:!1}):o=this._emptyDEMTexture=new t.Texture(e,i,n.RGBA,{premultiply:!1}),o}setupElevationDraw(e,n,r){const i=this.painter.context,o=i.gl,a=(s=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:t.DEMData.getUnpackVector(s),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var s;a.u_dem_size=this.sourceCache.getSource().tileSize,a.u_exaggeration=this.exaggeration();let l=null,c=null,u=1;if(r&&r.morphing&&this._useVertexMorphing){const t=r.morphing.srcDemTile,n=r.morphing.dstDemTile;u=r.morphing.phase,t&&n&&(this._prepareDemTileUniforms(e,t,a,"_prev")&&(c=t),this._prepareDemTileUniforms(e,n,a)&&(l=n))}if(c&&l?(i.activeTexture.set(o.TEXTURE2),l.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE,o.NEAREST),i.activeTexture.set(o.TEXTURE4),c.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE,o.NEAREST),a.u_dem_lerp=u):(l=this.terrainTileForTile[e.tileID.key],i.activeTexture.set(o.TEXTURE2),(this._prepareDemTileUniforms(e,l,a)?l.demTexture:this.emptyDEMTexture).bind(o.NEAREST,o.CLAMP_TO_EDGE)),i.activeTexture.set(o.TEXTURE3),r&&r.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE),this._depthFBO&&(a.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.empty
46DepthBufferTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE),a.u_depth_size_inv=[1,1]),r&&r.useMeterToDem&&l){const e=(1<<l.tileID.canonical.z)*t.mercatorZfromAltitude(1,this.painter.transform.center.lat)*this.sourceCache.getSource().tileSize;a.u_meter_to_dem=e}if(r&&r.labelPlaneMatrixInv&&(a.u_label_plane_matrix_inv=r.labelPlaneMatrixInv),n.setTerrainUniformValues(i,a),"globe"===this.painter.transform.projection.name){const t=this.globeUniformValues(this.painter.transform,e.tileID.canonical,r&&r.useDenormalizedUpVectorScale);n.setGlobeUniformValues(i,t)}}globeUniformValues(e,n,r){const i=e.projection;return{u_tile_tl_up:i.upVector(n,0,0),u_tile_tr_up:i.upVector(n,t.EXTENT,0),u_tile_br_up:i.upVector(n,t.EXTENT,t.EXTENT),u_tile_bl_up:i.upVector(n,0,t.EXTENT),u_tile_up_scale:r?t.GLOBE_METERS_TO_ECEF:i.upVectorScale(n,e.center.lat,e.worldSize).metersToTile}}renderToBackBuffer(e){const n=this.painter,r=this.painter.context;0!==e.length&&(r.bindFramebuffer.set(null),r.viewport.set([0,0,n.width,n.height]),n.gpuTimingDeferredRenderStart(),this.renderingToTexture=!1,function(e,n,r,i,o){if("globe"===e.transform.projection.name)!function(e,n,r,i,o){const a=e.context,s=a.gl;let l,c;const u=e.options.showTerrainWireframe?2:0,h=e.transform,d=t.globeUseCustomAntiAliasing(e,a,h),p=(t,n)=>{if(c===t)return;const r=[Cn[t],"PROJECTION_GLOBE_VIEW"];d&&r.push("CUSTOM_ANTIALIASING"),n&&r.push(Cn[u]),l=e.useProgram("globeRaster",null,r),c=t},f=e.colorModeForRenderPass(),m=new t.DepthMode(s.LEQUAL,t.DepthMode.ReadWrite,e.depthRangeFor3D);En.update(o);const g=t.calculateGlobeMercatorMatrix(h),y=[t.mercatorXfromLng(h.center.lng),t.mercatorYfromLat(h.center.lat)],_=u?[!1,!0]:[!1],v=e.globeSharedBuffers,b=[h.width*t.exported.devicePixelRatio,h.height*t.exported.devicePixelRatio],x=Float32Array.from(h.globeMatrix),w={useDenormalizedUpVectorScale:!0};if(_.forEach(u=>{c=-1;const d=u?s.LINES:s.TRIANGLES;for(const c of i){const i=r.getTile(c),_=t.StencilMode.disabled,S=n.prevTerrainTileForTile[c.key],T=n.terrainTileForTile[c.key];Tn(S,T)&&En.newMorphing(c.key,S,T,o,250),a.activeTexture.set(s.TEXTURE0),i.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);const E=En.getMorphValuesForProxy(c.key),C=E?1:0;E&&t.extend$1(w,{morphing:{srcDemTile:E.from,dstDemTile:E.to,phase:t.easeCubicInOut(E.phase)}});const O=t.tileCornersToBounds(c.canonical),P=t.getLatitudinalLod(O.getCenter().lat),k=t.getGridMatrix(c.canonical,O,P,h.worldSize/h._pixelsPerMercatorPixel),A=t.globeNormalizeECEF(t.globeTileBounds(c.canonical)),I=Sn(h.projMatrix,x,g,A,t.globeToMercatorTransition(h.zoom),y,h.frustumCorners.TL,h.frustumCorners.TR,h.frustumCorners.BR,h.frustumCorners.BL,h.globeCenterInViewSpace,h.globeRadius,b,k);if(p(C,u),n.setupElevationDraw(i,l,w),e.prepareDrawProgram(a,l,c.toUnwrapped()),v){const[n,r,i]=u?v.getWirefameBuffers(e.context,P):v.getGridBuffers(P);l.draw(a,d,m,_,f,t.CullFaceMode.backCCW,I,"globe_raster",n,r,i)}}}),v){const o=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];d&&o.push("CUSTOM_ANTIALIASING"),l=e.useProgram("globeRaster",null,o);for(const c of i){const{x:i,y:o,z:u}=c.canonical,d=0===o,p=o===(1<<u)-1,[g,_,x,S]=v.getPoleBuffers(u);if(S&&(d||p)){const o=r.getTile(c);a.activeTexture.set(s.TEXTURE0),o.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);let v=t.globePoleMatrixForTile(u,i,h);const T=t.globeNormalizeECEF(t.globeTileBounds(c.canonical)),E=(e,n)=>e.draw(a,s.TRIANGLES,m,t.StencilMode.disabled,f,t.CullFaceMode.disabled,Sn(h.projMatrix,v,v,T,0,y,h.frustumCorners.TL,h.frustumCorners.TR,h.frustumCorners.BR,h.frustumCorners.BL,h.globeCenterInViewSpace,h.globeRadius,b),"globe_pole_raster",n,x,S);n.setupElevationDraw(o,l,w),e.prepareDrawProgram(a,l,c.toUnwrapped()),d&&E(l,g),p&&(v=t.scale(t.create(),v,[1,-1,1]),E(l,_))}}}}(e,n,r,i,o);else{const a=e.context,s=a.gl;let l,c;const u=e.options.showTerrainWireframe?2:0,h=(t,n)=>{if(c===t)return;const r=[Cn[t]];n&&r.push(Cn[u]),l=e.useProgram("terrainRaster",null,r),c=t},d=e.colorModeForRenderPass(),p=new t.DepthMode(s.LEQUAL,t.DepthMode.ReadWrite,e.depthRangeFor3D);En.update(o);const f=e.transform,m=6*Math.pow(1.5,22-f.zoom)*n.exaggeration();
vendor: 12,599 bytes, line 46
46(u?[!1,!0]:[!1]).forEach(u=>{c=-1;const g=u?s.LINES:s.TRIANGLES,[y,_]=u?n.getWirefameBuffer():[n.gridIndexBuffer,n.gridSegments];for(const c of i){const i=r.getTile(c),v=t.StencilMode.disabled,b=n.prevTerrainTileForTile[c.key],x=n.terrainTileForTile[c.key];Tn(b,x)&&En.newMorphing(c.key,b,x,o,250),a.activeTexture.set(s.TEXTURE0),i.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST);const w=En.getMorphValuesForProxy(c.key),S=w?1:0;let T;w&&(T={morphing:{srcDemTile:w.from,dstDemTile:w.to,phase:t.easeCubicInOut(w.phase)}});const E=wn(c.projMatrix,On(c.canonical,f.renderWorldCopies)?m/10:m);h(S,u),n.setupElevationDraw(i,l,T),e.prepareDrawProgram(a,l,c.toUnwrapped()),l.draw(a,g,p,v,d,t.CullFaceMode.backCCW,E,"terrain_raster",n.gridBuffer,y,_)}})}}(n,this,this.proxySourceCache,e,this._updateTimestamp),this.renderingToTexture=!0,n.gpuTimingDeferredRenderEnd(),e.splice(0,e.length))}renderBatch(e){if(0===this._drapedRenderBatches.length)return e+1;this.renderingToTexture=!0;const n=this.painter,r=this.painter.context,i=this.proxySourceCache,o=this.proxiedCoords[i.id],a=this._drapedRenderBatches.shift(),s=[],l=n.style.order;let c=0;for(const u of o){const o=i.getTileByID(u.proxyTileKey),h=i.proxyCachedFBO[u.key]?i.proxyCachedFBO[u.key][e]:void 0,d=void 0!==h?i.renderCache[h]:this.pool[c++],p=void 0!==h;if(o.texture=d.tex,p&&!d.dirty){s.push(o.tileID);continue}let f;r.bindFramebuffer.set(d.fb.framebuffer),this.renderedToTile=!1,d.dirty&&(r.clear({color:t.Color.transparent,stencil:0}),d.dirty=!1);for(let t=a.start;t<=a.end;++t){const e=n.style._layers[l[t]];if(e.isHidden(n.transform.zoom))continue;const i=n.style._getLayerSourceCache(e),o=i?this.proxyToSource[u.key][i.id]:[u];if(!o)continue;const a=o;r.viewport.set([0,0,d.fb.width,d.fb.height]),f!==(i?i.id:null)&&(this._setupStencil(d,o,e,i),f=i?i.id:null),n.renderLayer(n,i,e,a)}this.renderedToTile?(d.dirty=!0,s.push(o.tileID)):p||--c,5===c&&(c=0,this.renderToBackBuffer(s))}return this.renderToBackBuffer(s),this.renderingToTexture=!1,r.bindFramebuffer.set(null),r.viewport.set([0,0,n.width,n.height]),a.end+1}postRender(){}renderCacheEfficiency(t){const e=t.order.length;if(0===e)return{efficiency:100};let n,r=0,i=0,o=!1;for(let a=0;a<e;++a){const e=t._layers[t.order[a]];this._style.isLayerDraped(e)?(o&&++r,++i):o||(o=!0,n=e.id)}return 0===i?{efficiency:100}:{efficiency:100*(1-r/i),firstUndrapedLayer:n}}getMinElevationBelowMSL(){let t=0;return this._visibleDemTiles.filter(t=>t.dem).forEach(e=>{t=Math.min(t,e.dem.tree.minimums[0])}),0===t?t:(t-30)*this._exaggeration}raycast(t,e,n){if(!this._visibleDemTiles)return null;const r=this._visibleDemTiles.filter(t=>t.dem).map(r=>{const i=r.tileID,o=1<<i.overscaledZ,{x:a,y:s}=i.canonical,l=a/o,c=(a+1)/o,u=s/o,h=(s+1)/o;return{minx:l,miny:u,maxx:c,maxy:h,t:r.dem.tree.raycastRoot(l,u,c,h,t,e,n),tile:r}});r.sort((t,e)=>(null!==t.t?t.t:Number.MAX_VALUE)-(null!==e.t?e.t:Number.MAX_VALUE));for(const i of r){if(null==i.t)return null;const r=i.tile.dem.tree.raycast(i.minx,i.miny,i.maxx,i.maxy,t,e,n);if(null!=r)return r}return null}_createFBO(){const e=this.painter.context,n=e.gl,r=this.drapeBufferSize;e.activeTexture.set(n.TEXTURE0);const i=new t.Texture(e,{width:r[0],height:r[1],data:null},n.RGBA);i.bind(n.LINEAR,n.CLAMP_TO_EDGE);const o=e.createFramebuffer(r[0],r[1],!1);return o.colorAttachment.set(i.texture),o.depthAttachment=new Tt(e,o.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=e.createRenderbuffer(e.gl.DEPTH_STENCIL,r[0],r[1]),this._stencilRef=0,o.depthAttachment.set(this._sharedDepthStencil),e.clear({stencil:0})):o.depthAttachment.set(this._sharedDepthStencil),e.extTextureFilterAnisotropic&&!e.extTextureFilterAnisotropicForceOff&&n.texParameterf(n.TEXTURE_2D,e.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.extTextureFilterAnisotropicMax),{fb:o,tex:i,dirty:!1}}_initFBOPool(){for(;this.pool.length<Math.min(5,this.proxyCoords.length);)this.pool.push(this._createFBO())}_shouldDisableRenderCache(){if(this._style.light&&this._style.light.hasTransition())return!0;for(const t in this._style._sourceCaches)if(this._style._sourceCaches[t].hasTransition())return!0;return this._style.order.some(t=>{const e=this._style._layers[t],n=e.isHidden(this.painter.transform.zoom),r=e.getCrossfadeParameters(),i=!!r&&1!==r.t,o=e.hasTransition();return"custom"!==e.type&&!n&&(i||o)})}_clearRasterFadeFromRenderCache(){let t=!1;for(const e in this._style._sourceCaches)if(this._style._sourceCaches[e]._source instanceof Ot){t=!0;break}if(t)for(let e=0;e<this._style.order.length;++e){const t=this._style._layers[this._style.order[e]],n=t.isHidden(this.painter.transform.zoom),r=this._style._getLayerSourceCache(t);if("raster"!==t.type||n||!r)continue;const i=t.paint.get("raster-fade-duration");for(const e of this.proxyCoords){const t=this.proxyToSource[e.key][r.id];if(t)for(const e of t){const t=kn(r.getTile(e),r.findLoadedParent(e,0),r,this.painter.transform,i);(1!==t.opacity||0!==t.mix)&&this._clearRenderCacheForTile(r.id,e)}}}}_setupDrapedRenderBatches(){const t=this._style.order,e=t.length;if(0===e)return;const n=[];let r,i=0,o=this._style._layers[t[i]];for(;!this._style.isLayerDraped(o)&&o.isHidden(this.painter.transform.zoom)&&++i<e;)o=this._style._layers[t[i]];for(;i<e;++i){const e=this._style._layers[t[i]];e.isHidden(this.painter.transform.zoom)||(this._style.isLayerDraped(e)?void 0===r&&(r=i):void 0!==r&&(n.push({start:r,end:i-1}),r=void 0))}void 0!==r&&n.push({start:r,end:i-1}),this._drapedRenderBatches=n}_setupRenderCache(t){const e=this.proxySourceCache;if(this._shouldDisableRenderCache()||this._invalidateRenderCache){if(this._invalidateRenderCache=!1,e.renderCache.length>e.renderCachePool.length){const t=Object.values(e.proxyCachedFBO);e.proxyCachedFBO={};for(let n=0;n<t.length;++n){const r=Object.values(t[n]);e.renderCachePool.push(...r)}}return}this._clearRasterFadeFromRenderCache();const n=this.proxyCoords,r=this._tilesDirty;for(let o=n.length-1;o>=0;o--){const i=n[o];if(e.getTileByID(i.key),void 0!==e.proxyCachedFBO[i.key]){const n=t[i.key],o=this.proxyToSource[i.key];let a=0;for(const t in o){const e=o[t],i=n[t];if(!i||i.length!==e.length||e.some((e,n)=>e!==i[n]||r[t]&&r[t].hasOwnProperty(e.key))){a=-1;break}++a}for(const t in e.proxyCachedFBO[i.key])e.renderCache[e.proxyCachedFBO[i.key][t]].dirty=a<0||a!==Object.values(n).length}}const i=[...this._drapedRenderBatches];i.sort((t,e)=>e.end-e.start-(t.end-t.start));for(const o of i)for(const t of n){if(e.proxyCachedFBO[t.key])continue;let n=e.renderCachePool.pop();void 0===n&&e.renderCache.length<50&&(n=e.renderCache.length,e.renderCache.push(this._createFBO())),void 0!==n&&(e.proxyCachedFBO[t.key]={},e.proxyCachedFBO[t.key][o.start]=n,e.renderCache[n].dirty=!0)}this._tilesDirty={}}_setupStencil(t,e,n,r){if(!r||!this._sourceTilesOverlap[r.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const i=this.painter.context,o=i.gl;if(e.length<=1)return void(this._overlapStencilType=!1);let a;if(n.isTileClipped())a=e.length,this._overlapStencilMode.test={func:o.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(e[0].overscaledZ>e[e.length-1].overscaledZ))return void(this._overlapStencilType=!1);a=1,this._overlapStencilMode.test={func:o.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+a>255&&(i.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=a,this._overlapStencilMode.ref=this._stencilRef,n.isTileClipped()&&this._renderTileClippingMasks(e,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return"Clip"===this._overlapStencilType||"Mask"===this._overlapStencilType}stencilModeForRTTOverlap(e){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[e.key]),this._overlapStencilMode):t.StencilMode.disabled}_renderTileClippingMasks(e,n){const r=this.painter,i=this.painter.context,o=i.gl;r._tileClippingMaskIDs={},i.setColorMode(t.ColorMode.disabled),i.setDepthMode(t.DepthMode.disabled);const a=r.useProgram("clippingMask");for(const s of e){const e=r._tileClippingMaskIDs[s.key]=--n;a.draw(i,o.TRIANGLES,t.DepthMode.disabled,new t.StencilMode({func:o.ALWAYS,mask:0},e,255,o.KEEP,o.KEEP,o.REPLACE),t.ColorMode.disabled,t.CullFaceMode.disabled,Pn(s.projMatrix),"$clipping",r.tileExtentBuffer,r.quadTriangleIndexBuffer,r.tileExtentSegments)}}pointCoordinate(e){const n=this.painter.transform;if(e.x<0||e.x>n.width||e.y<0||e.y>n.height)return null;const r=[e.x,e.y,1,1];t.transformMat4$1(r,r,n.pixelMatrixInverse),t.scale$1(r,r,1/r[3]),r[0]/=n.worldSize,r[1]/=n.worldSize;const i=n._camera.position,o=t.mercatorZfromAltitude(1,n.center.lat),a=[i[0],i[1],i[2]/o,0],s=t.subtract([],r.slice(0,3),a);t.normalize(s,s);const l=this.raycast(a,s,this._exaggeration);return null!==l&&l?(t.scaleAndAdd(a,a,s,l),a[3]=a[2],a[2]*=o,a):null}drawDepth(){const e=this.painter,n=e.context,r=this.proxySourceCache,i=Math.ceil(e.width),o=Math.ceil(e.height);if(!this._depthFBO||this._depthFBO.width===i&&this._depthFBO.height===o||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const e=n.gl,r=n.createFramebuffer(i,o,!0);n.activeTexture.set(e.TEXTURE0);const a=new t.Texture(n,{width:i,height:o,data:null},e.RGBA);a.bind(e.NEAREST,e.CLAMP_TO_EDGE),r.colorAttachment.set(a.texture);const s=n.createRenderbuffer(n.gl.DEPTH_COMPONENT16,i,o);r.depthAttachment.set(s),this._depthFBO=r,this._depthTexture=a}n.bindFramebuffer.set(this._depthFBO.framebuffer),n.viewport.set([0,0,i,o]),function(e,n,r,i){if("globe"===e.transform.projection.name)return;const o=e.context,a=o.gl;o.clear({depth:1});const s=e.useProgram("terrainDepth"),l=new t.DepthMode(a.LESS,t.DepthMode.ReadWrite,e.depthRangeFor3D);for(const c of i){const e=r.getTile(c),i=wn(c.projMatrix,0);n.setupElevationDraw(e,s),s.draw(o,a.TRIANGLES,l,t.StencilMode.disabled,t.ColorMode.unblended,t.CullFaceMode.backCCW,i,"terrain_depth",n.gridBuffer,n.gridIndexBuffer,n.gridNoSkirtSegments)}}(e,this,r,this.proxyCoords)}_setupProxiedCoordsForOrtho(t,e,n){if(t.getSource()instanceof At)return this._setupProxiedCoordsForImageSource(t,e,n);this._findCoveringTileCache[t.id]=this._findCoveringTileCache[t.id]||{};const r=this.proxiedCoords[t.id]=[],i=this.proxyCoords;for(let a=0;a<i.length;a++){const e=i[a],o=this._findTileCoveringTileID(e,t);if(o){const i=this._createProxiedId(e,o,n[e.key]&&n[e.key][t.id]);r.push(i),this.proxyToSource[e.key][t.id]=[i]}}let o=!1;for(let a=0;a<e.length;a++){const i=t.getTile(e[a]);if(!i||!i.hasData())continue;const s=this._findTileCoveringTileID(i.tileID,this.proxySourceCache);if(s&&s.tileID.canonical.z!==i.tileID.canonical.z){const e=this.proxyToSource[s.tileID.key][t.id],a=this._createProxiedId(s.tileID,i,n[s.tileID.key]&&n[s.tileID.key][t.id]);e?e.splice(e.length-1,0,a):this.proxyToSource[s.tileID.key][t.id]=[a],r.push(a),o=!0}}this._sourceTilesOverlap[t.id]=o}_setupProxiedCoordsForImageSource(e,n,r){if(!e.getSource().loaded())return;const i=this.proxiedCoords[e.id]=[],o=this.proxyCoords,a=e.getSource(),s=new t.pointGeometry(a.tileID.x,a.tileID.y)._div(1<<a.tileID.z),l=a.coordinates.map(t.MercatorCoordinate.fromLngLat).reduce((t,e)=>(t.min.x=Math.min(t.min.x,e.x-s.x),t.min.y=Math.min(t.min.y,e.y-s.y),t.max.x=Math.max(t.max.x,e.x-s.x),t.max.y=Math.max(t.max.y,e.y-s.y),t),{min:new t.pointGeometry(Number.MAX_VALUE,Number.MAX_VALUE),max:new t.pointGeometry(-Number.MAX_VALUE,-Number.MAX_VALUE)}),c=(e,n)=>{const r=e.wrap+e.canonical.x/(1<<e.canonical.z),i=e.canonical.y/(1<<e.canonical.z),o=t.EXTENT/(1<<e.canonical.z),a=n.wrap+n.canonical.x/(1<<n.canonical.z),s=n.canonical.y/(1<<n.canonical.z);return r+o<a+l.min.x||r>a+l.max.x||i+o<s+l.min.y||i>s+l.max.y};for(let t=0;t<o.length;t++){const a=o[t];for(let t=0;t<n.length;t++){const o=e.getTile(n[t]);if(!o||!o.hasData())continue;if(c(a,o.tileID))continue;const s=this._createProxiedId(a,o,r[a.key]&&r[a.key][e.id]),l=this.proxyToSource[a.key][e.id];l?l.push(s):this.proxyToSource[a.key][e.id]=[s],i.push(s)}}}_createProxiedId(e,n,r){let i=this.orthoMatrix;if(r){const t=r.find(t=>t.key===n.tileID.key);if(t)return t}if(n.tileID.key!==e.key){const r=e.canonical.z-n.tileID.canonical.z;let o,a,s;i=t.create();const l=n.tileID.wrap-e.wrap<<e.overscaledZ;r>0?(o=t.EXTENT>>r,a=o*((n.tileID.canonical.x<<r)-e.canonical.x+l),s=o*((n.tileID.canonical.y<<r)-e.canonical.y)):(o=t.EXTENT<<-r,a=t.EXTENT*(n.tileID.canonical.x-(e.canonical.x+l<<-r)),s=t.EXTENT*(n.tileID.canonical.y-(e.canonical.y<<-r))),t.ortho(i,0,o,0,o,0,1),t.translate(i,i,[a,s,0])}return new Mn(n.tileID,e.key,i)}
46_findTileCoveringTileID(e,n){let r=n.getTile(e);if(r&&r.hasData())return r;const i=this._findCoveringTileCache[n.id],o=i[e.key];if(r=o?n.getTileByID(o):null,r&&r.hasData()||null===o)return r;let a=r?r.tileID:e,s=a.overscaledZ;const l=n.getSource().minzoom,c=[];if(!o){const i=n.getSource().maxzoom;if(e.canonical.z>=i){const r=e.canonical.z-i;n.getSource().reparseOverscaled?(s=Math.max(e.canonical.z+2,n.transform.tileZoom),a=new t.OverscaledTileID(s,e.wrap,i,e.canonical.x>>r,e.canonical.y>>r)):0!==r&&(s=i,a=new t.OverscaledTileID(s,e.wrap,i,e.canonical.x>>r,e.canonical.y>>r))}a.key!==e.key&&(c.push(a.key),r=n.getTile(a))}const u=t=>{c.forEach(e=>{i[e]=t}),c.length=0};for(s-=1;s>=l&&(!r||!r.hasData());s--){r&&u(r.tileID.key);const t=a.calculateScaledKey(s);if(r=n.getTileByID(t),r&&r.hasData())break;const e=i[t];if(null===e)break;void 0===e?c.push(t):r=n.getTileByID(e)}return u(r?r.tileID.key:null),r&&r.hasData()?r:null}findDEMTileFor(t){return this.enabled?this._findTileCoveringTileID(t,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(t,e){let n=this._tilesDirty[t];n||(n=this._tilesDirty[t]={}),n[e.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const e=function(e){let n=0;const r=new t.StructArrayLayout2ui4,i=131;for(let t=1;t<129;t++){for(let e=1;e<129;e++)n=t*i+e,r.emplaceBack(n,n+1),r.emplaceBack(n,n+i),r.emplaceBack(n+1,n+i),128===t&&r.emplaceBack(n+i,n+i+1);r.emplaceBack(n+1,n+1+i)}return r}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(e),this.wireframeSegments=t.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,e.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}class Bn{static cacheKey(t,e,n,r){let i=`${e}${r?r.cacheKey:""}`;for(const o of n)t.usedDefines.includes(o)&&(i+=`/${o}`);return i}constructor(e,n,r,i,o,a){const s=e.gl;this.program=s.createProgram();const l=function(t){const e=[];for(let n=0;n<t.length;n++){if(null===t[n])continue;const r=t[n].split(" ");e.push(r.pop())}return e}(r.staticAttributes),c=i?i.getBinderAttributes():[],u=l.concat(c);let h=i?i.defines():[];h=h.concat(a.map(t=>`#define ${t}`));const d=h.concat(e.extStandardDerivatives?"#extension GL_OES_standard_derivatives : enable\n".concat(dn):dn,dn,hn,un.fragmentSource,ln.fragmentSource,r.fragmentSource).join("\n"),p=h.concat("\n#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",hn,un.vertexSource,ln.vertexSource,sn.vertexSource,r.vertexSource).join("\n"),f=s.createShader(s.FRAGMENT_SHADER);if(s.isContextLost())return void(this.failedToCreate=!0);s.shaderSource(f,d),s.compileShader(f),s.attachShader(this.program,f);const m=s.createShader(s.VERTEX_SHADER);if(s.isContextLost())this.failedToCreate=!0;else{s.shaderSource(m,p),s.compileShader(m),s.attachShader(this.program,m),this.attributes={},this.numAttributes=u.length;for(let t=0;t<this.numAttributes;t++)u[t]&&(s.bindAttribLocation(this.program,t,u[t]),this.attributes[u[t]]=t);s.linkProgram(this.program),s.deleteShader(m),s.deleteShader(f),this.fixedUniforms=o(e),this.binderUniforms=i?i.getUniforms(e):[],a.includes("TERRAIN")&&(this.terrainUniforms=(e=>({u_dem:new t.Uniform1i(e),u_dem_prev:new t.Uniform1i(e),u_dem_unpack:new t.Uniform4f(e),u_dem_tl:new t.Uniform2f(e),u_dem_scale:new t.Uniform1f(e),u_dem_tl_prev:new t.Uniform2f(e),u_dem_scale_prev:new t.Uniform1f(e),u_dem_size:new t.Uniform1f(e),u_dem_lerp:new t.Uniform1f(e),u_exaggeration:new t.Uniform1f(e),u_depth:new t.Uniform1i(e),u_depth_size_inv:new t.Uniform2f(e),u_meter_to_dem:new t.Uniform1f(e),u_label_plane_matrix_inv:new t.UniformMatrix4f(e)}))(e)),a.includes("GLOBE")&&(this.globeUniforms=(e=>({u_tile_tl_up:new t.Uniform3f(e),u_tile_tr_up:new t.Uniform3f(e),u_tile_br_up:new t.Uniform3f(e),u_tile_bl_up:new t.Uniform3f(e),u_tile_up_scale:new t.Uniform1f(e)}))(e)),a.includes("FOG")&&(this.fogUniforms=(e=>({u_fog_matrix:new t.UniformMatrix4f(e),u_fog_range:new t.Uniform2f(e),u_fog_color:new t.Uniform4f(e),u_fog_horizon_blend:new t.Uniform1f(e),u_fog_temporal_offset:new t.Uniform1f(e),u_frustum_tl:new t.Uniform3f(e),u_frustum_tr:new t.Uniform3f(e),u_frustum_br:new t.Uniform3f(e),u_frustum_bl:new t.Uniform3f(e),u_globe_pos:new t.Uniform3f(e),u_globe_radius:new t.Uniform1f(e),u_globe_transition:new t.Uniform1f(e),u_is_globe:new t.Uniform1i(e),u_viewport:new t.Uniform2f(e)}))(e))}}setTerrainUniformValues(t,e){if(!this.terrainUniforms)return;const n=this.terrainUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)n[t]&&n[t].set(this.program,t,e[t])}}setGlobeUniformValues(t,e){if(!this.globeUniforms)return;const n=this.globeUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)n[t]&&n[t].set(this.program,t,e[t])}}setFogUniformValues(t,e){if(!this.fogUniforms)return;const n=this.fogUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)n[t].set(this.program,t,e[t])}}draw(t,e,n,r,i,o,a,s,l,c,u,h,d,p,f){const m=t.gl;if(this.failedToCreate)return;t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(r),t.setColorMode(i),t.setCullFace(o);for(const y of Object.keys(this.fixedUniforms))this.fixedUniforms[y].set(this.program,y,a[y]);p&&p.setUniforms(this.program,t,this.binderUniforms,h,{zoom:d});const g={[m.LINES]:2,[m.TRIANGLES]:3,[m.LINE_STRIP]:1}[e];for(const y of u.get()){const n=y.vaos||(y.vaos={});(n[s]||(n[s]=new gn)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,y.vertexOffset,f||[]),m.drawElements(e,y.primitiveLength*g,m.UNSIGNED_SHORT,y.primitiveOffset*g*2)}}}function zn(t,e,n){const r=1/D(n,1,e.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ
vendor: 121,546 bytes, line 46
46),o=n.tileSize*Math.pow(2,e.transform.tileZoom)/i,a=o*(n.tileID.canonical.x+n.tileID.wrap*i),s=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[r,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}const Ln=t.create(),Rn=(e,n,r,i,o,a,s,l,c,u,h)=>{const d=n.style.light,p=d.properties.get("position"),f=[p.x,p.y,p.z],m=t.create$1();"viewport"===d.properties.get("anchor")&&(t.fromRotation(m,-n.transform.angle),t.transformMat3(f,f,m));const g=d.properties.get("color"),y=n.transform,_={u_matrix:e,u_lightpos:f,u_lightintensity:d.properties.get("intensity"),u_lightcolor:[g.r,g.g,g.b],u_vertical_gradient:+r,u_opacity:i,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Ln,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:o,u_edge_radius:a};return"globe"===y.projection.name&&(_.u_tile_id=[s.canonical.x,s.canonical.y,1<<s.canonical.z],_.u_zoom_transition=c,_.u_inv_rot_matrix=h,_.u_merc_center=u,_.u_up_dir=y.projection.upVector(new t.CanonicalTileID(0,0,0),u[0]*t.EXTENT,u[1]*t.EXTENT),_.u_height_lift=l),_},jn=(e,n,r,i,o,a,s,l,c,u,h,d,p)=>{const f=Rn(e,n,r,i,o,a,s,u,h,d,p),m={u_height_factor:-Math.pow(2,s.overscaledZ)/c.tileSize/8};return t.extend(f,zn(l,n,c),m)},Fn=t=>({u_matrix:t}),Nn=(e,n,r,i)=>t.extend(Fn(e),zn(r,n,i)),$n=(t,e)=>({u_matrix:t,u_world:e}),Vn=(e,n,r,i,o)=>t.extend(Nn(e,n,r,i),{u_world:o}),Un=t.create(),Gn=(e,n,r,i,o,a)=>{const s=e.transform,l="globe"===s.projection.name;let c;if("map"===a.paint.get("circle-pitch-alignment"))if(l){const e=t.globePixelsToTileUnits(s.zoom,n.canonical)*s._pixelsPerMercatorPixel;c=Float32Array.from([e,0,0,e])}else c=s.calculatePixelsToTileUnitsMatrix(r);else c=new Float32Array([s.pixelsToGLUnits[0],0,0,s.pixelsToGLUnits[1]]);const u={u_camera_to_center_distance:s.cameraToCenterDistance,u_matrix:e.translatePosMatrix(n.projMatrix,r,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_device_pixel_ratio:t.exported.devicePixelRatio,u_extrude_scale:c,u_inv_rot_matrix:Un,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(l){u.u_inv_rot_matrix=i,u.u_merc_center=o,u.u_tile_id=[n.canonical.x,n.canonical.y,1<<n.canonical.z],u.u_zoom_transition=t.globeToMercatorTransition(s.zoom);const e=o[0]*t.EXTENT,r=o[1]*t.EXTENT;u.u_up_dir=s.projection.upVector(new t.CanonicalTileID(0,0,0),e,r)}return u},Hn=t=>{const e=[];return"map"===t.paint.get("circle-pitch-alignment")&&e.push("PITCH_WITH_MAP"),"map"===t.paint.get("circle-pitch-scale")&&e.push("SCALE_WITH_MAP"),e},qn=(e,n,r,i)=>{const o=t.EXTENT/r.tileSize;return{u_matrix:e,u_camera_to_center_distance:n.getCameraToCenterDistance(i),u_extrude_scale:[n.pixelsToGLUnits[0]/o,n.pixelsToGLUnits[1]/o]}},Wn=(t,e,n=1)=>({u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:n}),Zn=t.create(),Xn=(e,n,r,i,o,a,s)=>{const l=e.transform,c="globe"===l.projection.name,u=c?t.globePixelsToTileUnits(l.zoom,n.canonical)*l._pixelsPerMercatorPixel:D(r,1,a),h={u_matrix:n.projMatrix,u_extrude_scale:u,u_intensity:s,u_inv_rot_matrix:Zn,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(c){h.u_inv_rot_matrix=i,h.u_merc_center=o,h.u_tile_id=[n.canonical.x,n.canonical.y,1<<n.canonical.z],h.u_zoom_transition=t.globeToMercatorTransition(l.zoom);const e=o[0]*t.EXTENT,r=o[1]*t.EXTENT;h.u_up_dir=l.projection.upVector(new t.CanonicalTileID(0,0,0),e,r)}return h},Yn=(t,e,n,r,i,o,a,s)=>{const l=t.transform,c=l.calculatePixelsToTileUnitsMatrix(e),u={u_matrix:Qn(t,e,n,i),u_pixels_to_tile_units:c,u_device_pixel_ratio:a,u_units_to_pixels:[1/l.pixelsToGLUnits[0],1/l.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:o,u_texsize:[0,0],u_scale:[0,0,0],u_mix:0,u_alpha_discard_threshold:0,u_trim_offset:s};if(tr(n)){const n=Jn(e,t.transform);u.u_texsize=e.lineAtlasTexture.size,u.u_scale=[n,r.fromScale,r.toScale],u.u_mix=r.t}return u},Kn=(t,e,n,r,i,o)=>{const a=t.transform,s=Jn(e,a);return{u_matrix:Qn(t,e,n,i),u_texsize:e.imageAtlasTexture.size,u_pixels_to_tile_units:a.calculatePixelsToTileUnitsMatrix(e),u_device_pixel_ratio:o,u_image:0,u_scale:[s,r.fromScale,r.toScale],u_fade:r.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function Jn(t,e){return 1/D(t,1,e.tileZoom)}function Qn(t,e,n,r){return t.translatePosMatrix(r||e.tileID.projMatrix,e,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}function tr(t){const e=t.paint.get("line-dasharray").value;return e.value||"constant"!==e.kind}const er=(t,e,n,r,i,o)=>{return{u_matrix:t,u_tl_parent:e,u_scale_parent:n,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(s=i.paint.get("raster-saturation"),s>0?1-1/(1.001-s):-s),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:nr(i.paint.get("raster-hue-rotate")),u_perspective_transform:o};var a,s};function nr(t){t*=Math.PI/180;const 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]}const rr=t.create(),ir=(e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g)=>{const y=o.transform,_={u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:n?n.uSizeT:0,u_size:n?n.uSize:0,u_camera_to_center_distance:y.cameraToCenterDistance,u_rotate_symbol:+r,u_aspect_ratio:y.width/y.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+i,u_texsize:u,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:rr,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:rr,u_up_vector:[0,-1,0]};return"globe"===g.name&&(_.u_tile_id=[h.canonical.x,h.canonical.y,1<<h.canonical.z],_.u_zoom_transition=d,_.u_inv_rot_matrix=f,_.u_merc_center=p,_.u_camera_forward=y._camera.forward(),_.u_ecef_origin=t.globeECEFOrigin(y.globeMatrix,h.toUnwrapped()),_.u_tile_matrix=Float32Array.from(y.globeMatrix),_.u_up_vector=m),_},or=(e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,y)=>t.extend(ir(e,n,r,i,o,a,s,l,c,u,d,p,f,m,g,y),{u_gamma_scale:i?o.transform.cameraToCenterDistance*Math.cos(o.terrain?0:o.transform._pitch):1,u_device_pixel_ratio:t.exported.devicePixelRatio,u_is_halo:+h}),ar=(e,n,r,i,o,a,s,l,c,u,h,d,p,f,m,g)=>t.extend(or(e,n,r,i,o,a,s,l,!0,c,!0,h,d,p,f,m,g),{u_texsize_icon:u,u_texture_icon:1}),sr=(t,e,n)=>({u_matrix:t,u_opacity:e,u_color:n}),lr=(e,n,r,i,o,a)=>t.extend(function(t,e,n,r){const i=n.imageManager.getPattern(t.from.toString()),o=n.imageManager.getPattern(t.to.toString()),{width:a,height:s}=n.imageManager.getPixelSize(),l=Math.pow(2,r.tileID.overscaledZ),c=r.tileSize*Math.pow(2,n.transform.tileZoom)/l,u=c*(r.tileID.canonical.x+r.tileID.wrap*l),h=c*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[a,s],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/D(r,1,n.transform.tileZoom),u_pixel_coord_upper:[u>>16,h>>16],u_pixel_coord_lower:[65535&u,65535&h]}}(i,a,r,o),{u_matrix:e,u_opacity:n}),cr={fillExtrusion:e=>({u_matrix:new t.UniformMatrix4f(e),u_lightpos:new t.Uniform3f(e),u_lightintensity:new t.Uniform1f(e),u_lightcolor:new t.Uniform3f(e),u_vertical_gradient:new t.Uniform1f(e),u_opacity:new t.Uniform1f(e),u_edge_radius:new t.Uniform1f(e),u_ao:new t.Uniform2f(e),u_tile_id:new t.Uniform3f(e),u_zoom_transition:new t.Uniform1f(e),u_inv_rot_matrix:new t.UniformMatrix4f(e),u_merc_center:new t.Uniform2f(e),u_up_dir:new t.Uniform3f(e),u_height_lift:new t.Uniform1f(e)}),fillExtrusionPattern:e=>({u_matrix:new t.UniformMatrix4f(e),u_lightpos:new t.Uniform3f(e),u_lightintensity:new t.Uniform1f(e),u_lightcolor:new t.Uniform3f(e),u_vertical_gradient:new t.Uniform1f(e),u_height_factor:new t.Uniform1f(e),u_edge_radius:new t.Uniform1f(e),u_ao:new t.Uniform2f(e),u_tile_id:new t.Uniform3f(e),u_zoom_transition:new t.Uniform1f(e),u_inv_rot_matrix:new t.UniformMatrix4f(e),u_merc_center:new t.Uniform2f(e),u_up_dir:new t.Uniform3f(e),u_height_lift:new t.Uniform1f(e),u_image:new t.Uniform1i(e),u_texsize:new t.Uniform2f(e),u_pixel_coord_upper:new t.Uniform2f(e),u_pixel_coord_lower:new t.Uniform2f(e),u_scale:new t.Uniform3f(e),u_fade:new t.Uniform1f(e),u_opacity:new t.Uniform1f(e)}),fill:e=>({u_matrix:new t.UniformMatrix4f(e)}),fillPattern:e=>({u_matrix:new t.UniformMatrix4f(e),u_image:new t.Uniform1i(e),u_texsize:new t.Uniform2f(e),u_pixel_coord_upper:new t.Uniform2f(e),u_pixel_coord_lower:new t.Uniform2f(e),u_scale:new t.Uniform3f(e),u_fade:new t.Uniform1f(e)}),fillOutline:e=>({u_matrix:new t.UniformMatrix4f(e),u_world:new t.Uniform2f(e)}),fillOutlinePattern:e=>({u_matrix:new t.UniformMatrix4f(e),u_world:new t.Uniform2f(e),u_image:new t.Uniform1i(e),u_texsize:new t.Uniform2f(e),u_pixel_coord_upper:new t.Uniform2f(e),u_pixel_coord_lower:new t.Uniform2f(e),u_scale:new t.Uniform3f(e),u_fade:new t.Uniform1f(e)}),circle:e=>({u_camera_to_center_distance:new t.Uniform1f(e),u_extrude_scale:new t.UniformMatrix2f(e),u_device_pixel_ratio:new t.Uniform1f(e),u_matrix:new t.UniformMatrix4f(e),u_inv_rot_matrix:new t.UniformMatrix4f(e),u_merc_center:new t.Uniform2f(e),u_tile_id:new t.Uniform3f(e),u_zoom_transition:new t.Uniform1f(e),u_up_dir:new t.Uniform3f(e)}),collisionBox:e=>({u_matrix:new t.UniformMatrix4f(e),u_camera_to_center_distance:new t.Uniform1f(e),u_extrude_scale:new t.Uniform2f(e)}),collisionCircle:e=>({u_matrix:new t.UniformMatrix4f(e),u_inv_matrix:new t.UniformMatrix4f(e),u_camera_to_center_distance:new t.Uniform1f(e),u_viewport_size:new t.Uniform2f(e)}),debug:e=>({u_color:new t.UniformColor(e),u_matrix:new t.UniformMatrix4f(e),u_overlay:new t.Uniform1i(e),u_overlay_scale:new t.Uniform1f(e)}),clippingMask:e=>({u_matrix:new t.UniformMatrix4f(e)}),heatmap:e=>({u_extrude_scale:new t.Uniform1f(e),u_intensity:new t.Uniform1f(e),u_matrix:new t.UniformMatrix4f(e),u_inv_rot_matrix:new t.UniformMatrix4f(e),u_merc_center:new t.Uniform2f(e),u_tile_id:new t.Uniform3f(e),u_zoom_transition:new t.Uniform1f(e),u_up_dir:new t.Uniform3f(e)}),heatmapTexture:e=>({u_image:new t.Uniform1i(e),u_color_ramp:new t.Uniform1i(e),u_opacity:new t.Uniform1f(e)}),hillshade:e=>({u_matrix:new t.UniformMatrix4f(e),u_image:new t.Uniform1i(e),u_latrange:new t.Uniform2f(e),u_light:new t.Uniform2f(e),u_shadow:new t.UniformColor(e),u_highlight:new t.UniformColor(e),u_accent:new t.UniformColor(e)}),hillshadePrepare:e=>({u_matrix:new t.UniformMatrix4f(e),u_image:new t.Uniform1i(e),u_dimension:new t.Uniform2f(e),u_zoom:new t.Uniform1f(e),u_unpack:new t.Uniform4f(e)}),line:e=>({u_matrix:new t.UniformMatrix4f(e),u_pixels_to_tile_units:new t.UniformMatrix2f(e),u_device_pixel_ratio:new t.Uniform1f(e),u_units_to_pixels:new t.Uniform2f(e),u_dash_image:new t.Uniform1i(e),u_gradient_image:new t.Uniform1i(e),u_image_height:new t.Uniform1f(e),u_texsize:new t.Uniform2f(e),u_scale:new t.Uniform3f(e),u_mix:new t.Uniform1f(e),u_alpha_discard_threshold:new t.Uniform1f(e),u_trim_offset:new t.Uniform2f(e)}),linePattern:e=>({u_matrix:new t.UniformMatrix4f(e),u_texsize:new t.Uniform2f(e),u_pixels_to_tile_units:new t.UniformMatrix2f(e),u_device_pixel_ratio:new t.Uniform1f(e),u_image:new t.Uniform1i(e),u_units_to_pixels:new t.Uniform2f(e),u_scale:new t.Uniform3f(e),u_fade:new t.Uniform1f(e),u_alpha_discard_threshold:new t.Uniform1f(e)}),raster:e=>({u_matrix:new t.UniformMatrix4f(e),u_tl_parent:new t.Uniform2f(e),u_scale_parent:new t.Uniform1f(e),u_fade_t:new t.Uniform1f(e),u_opacity:new t.Uniform1f(e),u_image0:new t.Uniform1i(e),u_image1:new t.Uniform1i(e),u_brightness_low:new t.Uniform1f(e),u_brightness_high:new t.Uniform1f(e),u_saturation_factor:new t.Uniform1f(e),u_contrast_factor:new t.Uniform1f(e),u_spin_weights:new t.Uniform3f(e),u_perspective_transform:new t.Uniform2f(e)}),symbolIcon:e=>({u_is_size_zoom_constant:new t.Uniform1i(e),u_is_size_feature_constant:new t.Uniform1i(e),u_size_t:new t.Uniform1f(e),u_size:new t.Uniform1f(e),u_camera_to_center_distance:new t.Uniform1f(e),u_rotate_symbol:new t.Uniform1i(e),u_aspect_ratio:new t.Uniform1f(e),u_fade_change:new t.Uniform1f(e),u_matrix:new t.UniformMatrix4f(e),u_label_plane_matrix:new t.UniformMatrix4f(e),u_coord_matrix:new t.UniformMatrix4f(e),u_is_text:new t.Uniform1i(e),u_pitch_with_map:new t.Uniform1i(e),u_texsize:new t.Uniform2f(e),u_tile_id:new t.Uniform3f(e),u_zoom_transition:new t.Uniform1f(e),u_inv_rot_matrix:new t.UniformMatrix4f(e),u_merc_center:new t.Uniform2f(e),u_camera_forward:new t.Uniform3f(e),u_tile_matrix:new t.UniformMatrix4f(e),u_up_vector:new t.Uniform3f(e),u_ecef_origin:new t.Uniform3f(e),u_texture:new t.Uniform1i(e)}),symbolSDF:e=>({u_is_size_zoom_constant:new t.Uniform1i(e),u_is_size_feature_constant:new t.Uniform1i(e),u_size_t:new t.Uniform1f(e),u_size:new t.Uniform1f(e),u_camera_to_center_distance:new t.Uniform1f(e),u_rotate_symbol:new t.Uniform1i(e),u_aspect_ratio:new t.Uniform1f(e),u_fade_change:new t.Uniform1f(e),u_matrix:new t.UniformMatrix4f(e),u_label_plane_matrix:new t.UniformMatrix4f(e),u_coord_matrix:new t.UniformMatrix4f(e),u_is_text:new t.Uniform1i(e),u_pitch_with_map:new t.Uniform1i(e),u_texsize:new t.Uniform2f(e),u_texture:new t.Uniform1i(e),u_gamma_scale:new t.Uniform1f(e),u_device_pixel_ratio:new t.Uniform1f(e),u_tile_id:new t.Uniform3f(e),u_zoom_transition:new t.Uniform1f(e),u_inv_rot_matrix:new t.UniformMatrix4f(e),u_merc_center:new t.Uniform2f(e),u_camera_forward:new t.Uniform3f(e),u_tile_matrix:new t.UniformMatrix4f(e),u_up_vector:new t.Uniform3f(e),u_ecef_origin:new t.Uniform3f(e),u_is_halo:new t.Uniform1i(e)}),symbolTextAndIcon:e=>({u_is_size_zoom_constant:new t.Uniform1i(e),u_is_size_feature_constant:new t.Uniform1i(e),u_size_t:new t.Uniform1f(e),u_size:new t.Uniform1f(e),u_camera_to_center_distance:new t.Uniform1f(e),u_rotate_symbol:new t.Uniform1i(e),u_aspect_ratio:new t.Uniform1f(e),u_fade_change:new t.Uniform1f(e),u_matrix:new t.UniformMatrix4f(e),u_label_plane_matrix:new t.UniformMatrix4f(e),u_coord_matrix:new t.UniformMatrix4f(e),u_is_text:new t.Uniform1i(e),u_pitch_with_map:new t.Uniform1i(e),u_texsize:new t.Uniform2f(e),u_texsize_icon:new t.Uniform2f(e),u_texture:new t.Uniform1i(e),u_texture_icon:new t.Uniform1i(e),u_gamma_scale:new t.Uniform1f(e),u_device_pixel_ratio:new t.Uniform1f(e),u_is_halo:new t.Uniform1i(e)}),background:e=>({u_matrix:new t.UniformMatrix4f(e),u_opacity:new t.Uniform1f(e),u_color:new t.UniformColor(e)}),backgroundPattern:e=>({u_matrix:new t.UniformMatrix4f(e),u_opacity:new t.Uniform1f(e),u_image:new t.Uniform1i(e),u_pattern_tl_a:new t.Uniform2f(e),u_pattern_br_a:new t.Uniform2f(e),u_pattern_tl_b:new t.Uniform2f(e),u_pattern_br_b:new t.Uniform2f(e),u_texsize:new t.Uniform2f(e),u_mix:new t.Uniform1f(e),u_pattern_size_a:new t.Uniform2f(e),u_pattern_size_b:new t.Uniform2f(e),u_scale_a:new t.Uniform1f(e),u_scale_b:new t.Uniform1f(e),u_pixel_coord_upper:new t.Uniform2f(e),u_pixel_coord_lower:new t.Uniform2f(e),u_tile_units_to_pixels:new t.Uniform1f(e)}),terrainRaster:xn,terrainDepth:xn,skybox:e=>({u_matrix:new t.UniformMatrix4f(e),u_sun_direction:new t.Uniform3f(e),u_cubemap:new t.Uniform1i(e),u_opacity:new t.Uniform1f(e),u_temporal_offset:new t.Uniform1f(e)}),skyboxGradient:e=>({u_matrix:new t.UniformMatrix4f(e),u_color_ramp:new t.Uniform1i(e),u_center_direction:new t.Uniform3f(e),u_radius:new t.Uniform1f(e),u_opacity:new t.Uniform1f(e),u_temporal_offset:new t.Uniform1f(e)}),skyboxCapture:e=>({u_matrix_3f:new t.UniformMatrix3f(e),u_sun_direction:new t.Uniform3f(e),u_sun_intensity:new t.Uniform1f(e),u_color_tint_r:new t.Uniform4f(e),u_color_tint_m:new t.Uniform4f(e),u_luminance:new t.Uniform1f(e)}),globeRaster:e=>({u_proj_matrix:new t.UniformMatrix4f(e),u_globe_matrix:new t.UniformMatrix4f(e),u_normalize_matrix:new t.UniformMatrix4f(e),u_merc_matrix:new t.UniformMatrix4f(e),u_zoom_transition:new t.Uniform1f(e),u_merc_center:new t.Uniform2f(e),u_image0:new t.Uniform1i(e),u_grid_matrix:new t.UniformMatrix3f(e),u_frustum_tl:new t.Uniform3f(e),u_frustum_tr:new t.Uniform3f(e),u_frustum_br:new t.Uniform3f(e),u_frustum_bl:new t.Uniform3f(e),u_globe_pos:new t.Uniform3f(e),u_globe_radius:new t.Uniform1f(e),u_viewport:new t.Uniform2f(e)}),globeAtmosphere:e=>({u_frustum_tl:new t.Uniform3f(e),u_frustum_tr:new t.Uniform3f(e),u_frustum_br:new t.Uniform3f(e),u_frustum_bl:new t.Uniform3f(e),u_horizon:new t.Uniform1f(e),u_transition:new t.Uniform1f(e),u_fadeout_range:new t.Uniform1f(e),u_color:new t.Uniform4f(e),u_high_color:new t.Uniform4f(e),u_space_color:new t.Uniform4f(e),u_star_intensity:new t.Uniform1f(e),u_star_density:new t.Uniform1f(e),u_star_size:new t.Uniform1f(e),u_temporal_offset:new t.Uniform1f(e),u_horizon_angle:new t.Uniform1f(e),u_rotation_matrix:new t.UniformMatrix4f(e)})};let ur;function hr(e,n,r,i,o,a,s){const l=e.context,c=l.gl,u=e.transform,h=e.useProgram("collisionBox"),d=[];let p=0,f=0;for(let x=0;x<i.length;x++){const m=i[x],g=n.getTile(m),y=g.getBucket(r);if(!y)continue;const _=xe(m,y,u);let v=_;0===o[0]&&0===o[1]||(v=e.translatePosMatrix(_,g,o,a));const b=s?y.textCollisionBox:y.iconCollisionBox,w=y.collisionCircleArray;if(w.length>0){const e=t.create(),n=v;t.mul(e,y.placementInvProjMatrix,u.glCoordMatrix),t.mul(e,e,y.placementViewportMatrix),d.push({circleArray:w,circleOffset:f,transform:n,invTransform:e,projection:y.getProjection()}),p+=w.length/4,f=p}b&&(e.terrain&&e.terrain.setupElevationDraw(g,h),h.draw(l,c.LINES,t.DepthMode.disabled,t.StencilMode.disabled,e.colorModeForRenderPass(),t.CullFaceMode.disabled,qn(v,u,g,y.getProjection()),r.id,b.layoutVertexBuffer,b.indexBuffer,b.segments,null,u.zoom,null,[b.collisionVertexBuffer,b.collisionVertexBufferExt]))}if(!s||!d.length)return;const m=e.useProgram("collisionCircle"),g=new t.StructArrayLayout2f1f2i16;g.resize(4*p),g._trim();let y=0;for(const t of d)for(let e=0;e<t.circleArray.length/4;e++){const n=4*e,r=t.circleArray[n+0],i=t.circleArray[n+1],o=t.circleArray[n+2],a=t.circleArray[n+3];g.emplace(y++,r,i,o,a,0),g.emplace(y++,r,i,o,a,1),g.emplace(y++,r,i,o,a,2),g.emplace(y++,r,i,o,a,3)}(!ur||ur.length<2*p)&&(ur=function(e){const n=2*e,r=new t.StructArrayLayout3ui6;r.resize(n),r._trim();for(let t=0;t<n;t++){const e=6*t;r.uint16[e+0]=4*t+0,r.uint16[e+1]=4*t+1,r.uint16[e+2]=4*t+2,r.uint16[e+3]=4*t+2,r.uint16[e+4]=4*t+3,r.uint16[e+5]=4*t+0}return r}(p));const _=l.createIndexBuffer(ur,!0),v=l.createVertexBuffer(g,t.collisionCircleLayout.members,!0);for(const x of d){const n={u_matrix:x.transform,u_inv_matrix:x.invTransform,u_camera_to_center_distance:(b=u).getCameraToCenterDistance(x.projection),u_viewport_size:[b.width,b.height]};m.draw(l,c.TRIANGLES,t.DepthMode.disabled,t.StencilMode.disabled,e.colorModeForRenderPass(),t.CullFaceMode.disabled,n,r.id,v,_,t.SegmentVector.simpleSegment(0,2*x.circleOffset,x.circleArray.length,x.circleArray.length/2),null,u.zoom)}var b;v.destroy(),_.destroy()}const dr=t.create();function pr(e,n,r,i,o,a){const{horizontalAlign:s,verticalAlign:l}=t.getAnchorAlignment(e),c=-(s-.5)*n,u=-(l-.5)*r,h=t.evaluateVariableOffset(e,i);return new t.pointGeometry((c/o+h[0])*a,(u/o+h[1])*a)}function fr(e,n,r,i,o,a,s,l,c,u,h){const d=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,f=e.icon.dynamicLayoutVertexArray,m={},g=we(l,e.getProjection(),a),y=a.elevation,_=e.getProjection().upVectorScale(l.canonical,a.center.lat,a.worldSize);p.clear();for(let v=0;v<d.length;v++){const f=d.get(v),b=e.allowVerticalPlacement&&!f.placedOrientation,x=f.hidden||!f.crossTileID||b?null:i[f.crossTileID];if(x){const i=new t.pointGeometry(f.tileAnchorX,f.tileAnchorY),d=e.getProjection().upVector(l.canonical,i.x,i.y),v=y?y.getAtTileOffset(l,i.x,i.y):0,b=oe([f.projectedAnchorX+v*d[0]*_.metersToTile,f.projectedAnchorY+v*d[1]*_.metersToTile,f.projectedAnchorZ+v*d[2]*_.metersToTile],r?g:s),w=ae(a.getCameraToCenterDistance(e.getProjection()),b.signedDistanceFromCamera);let S=o.evaluateSizeForFeature(e.textSizeData,u,f)*w/t.ONE_EM;r&&(S*=e.tilePixelRatio/c);const{width:T,height:E,anchor:C,textOffset:O,textScale:P}=x,k=pr(C,T,E,O,P,S);let A;if(r){const t=i.add(k),{x:n,y:r,z:o}=e.getProjection().projectTilePoint(t.x,t.y,l.canonical);A=oe([n+v*d[0]*_.metersToTile,r+v*d[1]*_.metersToTile,o+v*d[2]*_.metersToTile],s).point}else{const t=n?k.rotate(-a.angle):k;A=[b.point[0]+t.x,b.point[1]+t.y,0]}const I=e.allowVerticalPlacement&&f.placedOrientation===t.WritingMode.vertical?Math.PI/2:0;for(let e=0;e<f.numGlyphs;e++)t.addDynamicAttributes(p,A[0],A[1],A[2],I);h&&f.associatedIconIndex>=0&&(m[f.associatedIconIndex]={shiftedAnchor:A,angle:I})}else ge(f.numGlyphs,p)}if(h){f.clear();const n=e.icon.placedSymbolArray;for(let e=0;e<n.length;e++){const r=n.get(e);if(r.hidden)ge(r.numGlyphs,f);else{const n=m[e];if(n)for(let e=0;e<r.numGlyphs;e++)t.addDynamicAttributes(f,n.shiftedAnchor[0],n.shiftedAnchor[1],n.shiftedAnchor[2],n.angle);else ge(r.numGlyphs,f)}}e.icon.dynamicLayoutVertexBuffer.updateData(f)}e.text.dynamicLayoutVertexBuffer.updateData(p)}function mr(t,e,n){return n.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function gr(e,n,r,i,o,a,s,l,c,u,h,d){const p=e.context,f=p.gl,m=e.transform,g="map"===l,y="map"===c,_=g&&"point"!==r.layout.get("symbol-placement"),v=g&&!y&&!_,b=void 0!==r.layout.get("symbol-sort-key").constantOr(1);let x=!1;const w=e.depthModeForSublayer(0,t.DepthMode.ReadOnly),S=[t.mercatorXfromLng(m.center.lng),t.mercatorYfromLat(m.center.lat)],T=r.layout.get("text-variable-anchor"),E="globe"===m.projection.name,C=[],O=[0,-1,0];let P=O;!E&&!m.mercatorFromTransition||g||(P=function(e){const n=e._camera.getWorldToCamera(e.worldSize,1),r=t.multiply([],n,e.globeMatrix);t.invert(r,r);const i=[0,0,0],o=[0,1,0,0];return t.transformMat4$1(o,o,r),i[0]=o[0],i[1]=o[1],i[2]=o[2],t.normalize(i,i),i}(m));for(const k of i){const i=n.getTile(k),l=i.getBucket(r);if(!l)continue;if("mercator"===l.projection.name&&E)continue;const c=o?l.text:l.icon;if(!c||l.fullyClipped||!c.segments.get().length)continue;const h=c.programConfigurations.get(r.id),d=o||l.sdfIcons,p=o?l.textSizeData:l.iconSizeData,w=y||0!==m.pitch,A=t.evaluateSizeForZoom(p,m.zoom);let I,M,D,B,z=[0,0],L=null;if(o){if(M=i.glyphAtlasTexture,D=f.LINEAR,I=i.glyphAtlasTexture.size,l.iconsInText){z=i.imageAtlasTexture.size,L=i.imageAtlasTexture;const t="composite"===p.kind||"camera"===p.kind;B=w||e.options.rotating||e.options.zooming||t?f.LINEAR:f.NEAREST}}else{const t=1!==r.layout.get("icon-size").constantOr(0)||l.iconsNeedLinear;M=i.imageAtlasTexture,D=d||e.options.rotating||e.options.zooming||t||w?f.LINEAR:f.NEAREST,I=i.imageAtlasTexture.size}const R="globe"===l.projection.name,j=R?P:O,F=R?t.globeToMercatorTransition(m.zoom):0,N=we(k,l.getProjection(),m),$=m.calculatePixelsToTileUnitsMatrix(i),V=ee(N,i.tileID.canonical,y,g,m,l.getProjection(),$),U=e.terrain&&y&&_?t.invert(t.create(),V):dr,G=re(N,i.tileID.canonical,y,g,m,l.getProjection(),$),H=T&&l.hasTextData(),q="none"!==r.layout.get("icon-text-fit")&&H&&l.hasIconData();if(_){const t=m.elevation,n=t?t.getAtTileOffsetFunc(k,m.center.lat,m.worldSize,l.getProjection()):t=>[0,0,0],r=ne(N,i.tileID.canonical,y,g,m,l.getProjection(),$);le(l,N,e,o,r,G,y,u,n,k)}const W=_||o&&T||q,Z=e.translatePosMatrix(N,i,a,s),X=W?dr:V,Y=e.translatePosMatrix(G,i,a,s,!0),K=l.getProjection().createInversionMatrix(m,k.canonical),J=[];e.terrainRenderModeElevated()&&y&&J.push("PITCH_WITH_MAP_TERRAIN"),R&&J.push("PROJECTION_GLOBE_VIEW"),W&&J.push("PROJECTED_POS_ON_VIEWPORT");const Q=d&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);let tt;tt=d?l.iconsInText?ar(p.kind,A,v,y,e,Z,X,Y,I,z,k,F,S,K,j,l.getProjection()):or(p.kind,A,v,y,e,Z,X,Y,o,I,!0,k,F,S,K,j,l.getProjection()):ir(p.kind,A,v,y,e,Z,X,Y,o,I,k,F,S,K,j,l.getProjection());const et={program:e.useProgram(mr(d,o,l),h,J),buffers:c,uniformValues:tt,atlasTexture:M,atlasTextureIcon:L,atlasInterpolation:D,atlasInterpolationIcon:B,isSDF:d,hasHalo:Q,tile:i,labelPlaneMatrixInv:U};if(b&&l.canOverlap){x=!0;const e=c.segments.get();for(const n of e)C.push({segments:new t.SegmentVector([n]),sortKey:n.sortKey,state:et})}else C.push({segments:c.segments,sortKey:0,state:et})}x&&C.sort((t,e)=>t.sortKey-e.sortKey);for(const t of C){const n=t.state;if(e.terrain&&e.terrain.setupElevationDraw(n.tile,n.program,{useDepthForOcclusion:!E,labelPlaneMatrixInv:n.labelPlaneMatrixInv}),p.activeTexture.set(f.TEXTURE0),n.atlasTexture.bind(n.atlasInterpolation,f.CLAMP_TO_EDGE),n.atlasTextureIcon&&(p.activeTexture.set(f.TEXTURE1),n.atlasTextureIcon&&n.atlasTextureIcon.bind(n.atlasInterpolationIcon,f.CLAMP_TO_EDGE)),n.isSDF){const i=n.uniformValues;n.hasHalo&&(i.u_is_halo=1,yr(n.buffers,t.segments,r,e,n.program,w,h,d,i)),i.u_is_halo=0}yr(n.buffers,t.segments,r,e,n.program,w,h,d,n.uniformValues)}}function yr(e,n,r,i,o,a,s,l,c){const u=i.context,h=[e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer,e.globeExtVertexBuffer];o.draw(u,u.gl.TRIANGLES,a,s,l,t.CullFaceMode.disabled,c,r.id,e.layoutVertexBuffer,e.indexBuffer,n,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),h)}function _r(e,n,r,i,o,a,s){const l=e.context.gl,c=r.paint.get("fill-pattern"),u=c&&c.constantOr(1),h=r.getCrossfadeParameters();let d,p,f,m,g;s?(p=u&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",d=l.LINES):(p=u?"fillPattern":"fill",d=l.TRIANGLES);for(const y of i){const i=n.getTile(y);if(u&&!i.patternsLoaded())continue;const _=i.getBucket(r);if(!_)continue;e.prepareDrawTile();const v=_.programConfigurations.get(r.id),b=e.useProgram(p,v);u&&(e.context.activeTexture.set(l.TEXTURE0),i.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),v.updatePaintBuffers(h));const x=c.constantOr(null);if(x&&i.imageAtlas){const t=i.imageAtlas,e=t.patternPositions[x.to.toString()],n=t.patternPositions[x.from.toString()];e&&n&&v.setConstantPatternPositions(e,n)}const w=e.translatePosMatrix(y.projMatrix,i,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(s){m=_.indexBuffer2,g=_.segments2;const t=e.terrain&&e.terrain.renderingToTexture?e.terrain.drapeBufferSize:[l.drawingBufferWidth,l.drawingBufferHeight];f="fillOutlinePattern"===p&&u?Vn(w,e,h,i,t):$n(w,t)}else m=_.indexBuffer,g=_.segments,f=u?Nn(w,e,h,i):Fn(w);e.prepareDrawProgram(e.context,b,y.toUnwrapped()),b.draw(e.context,d,o,e.stencilModeForClipping(y),a,t.CullFaceMode.disabled,f,r.id,_.layoutVertexBuffer,m,g,r.paint,e.transform.zoom,v)}}function vr(e,n,r,i,o,a,s){const l=e.context,c=l.gl,u=e.transform,h=r.paint.get("fill-extrusion-pattern"),d=h.constantOr(1),p=r.getCrossfadeParameters(),f=r.paint.get("fill-extrusion-opacity"),m=[r.paint.get("fill-extrusion-ambient-occlusion-intensity"),r.paint.get("fill-extrusion-ambient-occlusion-radius")],g=r.layout.get("fill-extrusion-edge-radius"),y="globe"===u.projection.name?t.fillExtrusionHeightLift():0,_="globe"===u.projection.name,v=_?t.globeToMercatorTransition(u.zoom):0,b=[t.mercatorXfromLng(u.center.lng),t.mercatorYfromLat(u.center.lat)],x=[];_&&(x.push("PROJECTION_GLOBE_VIEW"),e.style.terrainSetForDrapingOnly()&&x.push("TERRAIN")),m[0]>0&&x.push("FAUX_AO");for(const w of i){const i=n.getTile(w),S=i.getBucket(r);if(!S||S.projection.name!==u.projection.name)continue;const T=S.programConfigurations.get(r.id),E=e.useProgram(d?"fillExtrusionPattern":"fillExtrusion",T,x);if(e.terrain){const t=e.terrain;if(e.style.terrainSetForDrapingOnly())t.setupElevationDraw(i,E,{useMeterToDem:!0});else{if(!S.enableTerrain)continue;if(t.setupElevationDraw(i,E,{useMeterToDem:!0}),br(l,n,w,S,r,t),!S.centroidVertexBuffer){const t=E.attributes.a_centroid_pos;void 0!==t&&c.vertexAttrib2f(t,0,0)}}}d&&(e.context.activeTexture.set(c.TEXTURE0),i.imageAtlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE),T.updatePaintBuffers(p));const C=h.constantOr(null);if(C&&i.imageAtlas){const t=i.imageAtlas,e=t.patternPositions[C.to.toString()],n=t.patternPositions[C.from.toString()];e&&n&&T.setConstantPatternPositions(e,n)}const O=e.translatePosMatrix(w.projMatrix,i,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),P=u.projection.createInversionMatrix(u,w.canonical),k=r.paint.get("fill-extrusion-vertical-gradient"),A=d?jn(O,e,k,f,m,g,w,p,i,y,v,b,P):Rn(O,e,k,f,m,g,w,y,v,b,P);e.prepareDrawProgram(l,E,w.toUnwrapped());const I=[];e.terrain&&I.push(S.centroidVertexBuffer),_&&I.push(S.layoutVertexExtBuffer),E.draw(l,l.gl.TRIANGLES,o,a,s,t.CullFaceMode.backCCW,A,r.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,r.paint,e.transform.zoom,T,I)}}function br(e,n,r,i,o,a){const s=[e=>{let n=e.canonical.x-1,r=e.wrap;return n<0&&(n=(1<<e.canonical.z)-1,r--),new t.OverscaledTileID(e.overscaledZ,r,e.canonical.z,n,e.canonical.y)},e=>{let n=e.canonical.x+1,r=e.wrap;return n===1<<e.canonical.z&&(n=0,r++),new t.OverscaledTileID(e.overscaledZ,r,e.canonical.z,n,e.canonical.y)},e=>new t.OverscaledTileID(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,(0===e.canonical.y?1<<e.canonical.z:e.canonical.y)-1),e=>new t.OverscaledTileID(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y===(1<<e.canonical.z)-1?0:e.canonical.y+1)],l=t=>{const e=n.getSource().minzoom,r=t=>{const e=n.getTileByID(t);if(e&&e.hasData())return e.getBucket(o)},i=[0,-1,1];for(const n of i){if(t.overscaledZ+n<e)continue;const i=r(t.calculateScaledKey(t.overscaledZ+n));if(i)return i}},c=[0,0,0],u=(e,n)=>(c[0]=Math.min(e.min.y,n.min.y),c[1]=Math.max(e.max.y,n.max.y),c[2]=t.EXTENT-n.min.x>e.max.x?n.min.x-t.EXTENT:e.max.x,c),h=(e,n)=>(c[0]=Math.min(e.min.x,n.min.x),c[1]=Math.max(e.max.x,n.max.x),c[2]=t.EXTENT-n.min.y>e.max.y?n.min.y-t.EXTENT:e.max.y,c),d=[(t,e)=>u(t,e),(t,e)=>u(e,t),(t,e)=>h(t,e),(t,e)=>h(e,t)],p=new t.pointGeometry(0,0);let f,m,g;const y=(e,n,i,o,s)=>{const l=[[o?i:e,o?e:i,0],[o?i:n,o?n:i,0]],c=s<0?t.EXTENT+s:s,u=[o?c:(e+n)/2,o?(e+n)/2:c,0];return 0===i&&s<0||0!==i&&s>0?a.getForTilePoints(g,[u],!0,m):l.push(u),a.getForTilePoints(r,l,!0,f),Math.max(l[0][2],l[1][2],u[2])/a.exaggeration()};for(let _=0;_<4;_++){const e=(_<2?1:5)-_,n=i.borders[_];if(0===n.length)continue;const o=g=s[_](r),c=l(o);if(!(c&&c instanceof t.FillExtrusionBucket&&c.enableTerrain))continue;if(i.borderDoneWithNeighborZ[_]===c.canonical.z&&c.borderDoneWithNeighborZ[e]===i.canonical.z)continue;if(m=a.findDEMTileFor(o),!m||!m.dem)continue;if(!f){const t=a.findDEMTileFor(r);if(!t||!t.dem)return;f=t}const u=c.borders[e];let h=0;const v=c.borderDoneWithNeighborZ[e]!==i.canonical.z;if(i.canonical.z===c.canonical.z){for(let r=0;r<n.length;r++){const o=i.featuresOnBorder[n[r]],a=o.borders[_];let s;for(;h<u.length&&(s=c.featuresOnBorder[u[h]],!(s.borders[e][1]>a[0]+3));)v&&c.encodeCentroid(void 0,s,!1),h++;if(s&&h<u.length){const n=h;let r=0;for(;!(s.borders[e][0]>a[1]-3)&&(r++,++h!==u.length);)s=c.featuresOnBorder[u[h]];if(s=c.featuresOnBorder[u[n]],o.intersectsCount()>1||s.intersectsCount()>1||1!==r){1!==r&&(h=n),i.encodeCentroid(void 0,o,!1),v&&c.encodeCentroid(void 0,s,!1);continue}const l=d[_](o,s),f=_%2?t.EXTENT-1:0;p.x=y(l[0],Math.min(t.EXTENT-1,l[1]),f,_<2,l[2]),p.y=0,i.encodeCentroid(p,o,!1),v&&c.encodeCentroid(p,s,!1)}else i.encodeCentroid(void 0,o,!1)}i.borderDoneWithNeighborZ[_]=c.canonical.z,i.needsCentroidUpdate=!0,v&&(c.borderDoneWithNeighborZ[e]=i.canonical.z,c.needsCentroidUpdate=!0)}else{for(const t of n)i.encodeCentroid(void 0,i.featuresOnBorder[t],!1);if(v){for(const t of u)c.encodeCentroid(void 0,c.featuresOnBorder[t],!1);c.borderDoneWithNeighborZ[e]=i.canonical.z,c.needsCentroidUpdate=!0}i.borderDoneWithNeighborZ[_]=c.canonical.z,i.needsCentroidUpdate=!0}}(i.needsCentroidUpdate||!i.centroidVertexBuffer&&0!==i.centroidVertexArray.length)&&i.uploadCentroid(e)}const xr=new t.Color(1,0,0,1),wr=new t.Color(0,1,0,1),Sr=new t.Color(0,0,1,1),Tr=new t.Color(1,0,1,1),Er=new t.Color(0,1,1,1);function Cr(e,n,r){const i=e.context,o=e.transform,a=i.gl,s="globe"===o.projection.name,l=s?["PROJECTION_GLOBE_VIEW"]:null;let c=r.projMatrix;if(s&&t.globeToMercatorTransition(o.zoom)>0){const e=t.transitionTileAABBinECEF(r.canonical,o),n=t.globeDenormalizeECEF(e);c=t.multiply(new Float32Array(16),o.globeMatrix,n),t.multiply(c,o.projMatrix,c)}const u=e.useProgram("debug",null,l),h=n.getTileByID(r.key);e.terrain&&e.terrain.setupElevationDraw(h,u);const d=t.DepthMode.disabled,p=t.StencilMode.disabled,f=e.colorModeForRenderPass(),m="$debug";i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s?h._makeGlobeTileDebugBuffers(e.context,o):h._makeDebugTileBoundsBuffers(e.context,o.projection);const g=h._tileDebugBuffer||e.debugBuffer,y=h._tileDebugIndexBuffer||e.debugIndexBuffer,_=h._tileDebugSegments||e.debugSegments;u.draw(i,a.LINE_STRIP,d,p,f,t.CullFaceMode.disabled,Wn(c,t.Color.red),m,g,y,_,null,null,null,[h._globeTileDebugBorderBuffer]);const v=h.latestRawTileData,b=Math.floor((v&&v.byteLength||0)/1024),x=n.getTile(r).tileSize,w=512/Math.min(x,512)*(r.overscaledZ/o.zoom)*.5;let S=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(S+=` => ${r.overscaledZ}`),S+=` ${b}kb`,function(t,e){t.initDebugOverlayCanvas();const n=t.debugOverlayCanvas,r=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(n),t.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(e,S);const T=h._tileDebugTextBuffer||e.debugBuffer,E=h._tileDebugTextIndexBuffer||e.quadTriangleIndexBuffer,C=h._tileDebugTextSegments||e.debugSegments;u.draw(i,a.TRIANGLES,d,p,t.ColorMode.alphaBlended,t.CullFaceMode.disabled,Wn(c,t.Color.transparent,w),m,T,E,C,null,null,null,[h._globeTileDebugTextBuffer])}function Or(t,e,n,r){kr(t,0,e+n/2,t.transform.width,n,r)}function Pr(t,e,n,r){kr(t,e-n/2,0,n,t.transform.height,r)}function kr(e,n,r,i,o,a){const s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(n*t.exported.devicePixelRatio,r*t.exported.devicePixelRatio,i*t.exported.devicePixelRatio,o*t.exported.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}const Ar=t.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:Ir}=Ar;function Mr(t,e,n,r){t.emplaceBack(e,n,r)}class Dr{constructor(e){this.vertexArray=new t.StructArrayLayout3f12,this.indices=new t.StructArrayLayout3ui6,Mr(this.vertexArray,-1,-1,1),Mr(this.vertexArray,1,-1,1),Mr(this.vertexArray,-1,1,1),Mr(this.vertexArray,1,1,1),Mr(this.vertexArray,-1,-1,-1),Mr(this.vertexArray,1,-1,-1),Mr(this.vertexArray,-1,1,-1),Mr(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=e.createVertexBuffer(this.vertexArray,Ir),this.indexBuffer=e.createIndexBuffer(this.indices),this.segment=t.SegmentVector.simpleSegment(0,0,36,12)}}function Br(e,n,r,i,o,a){const s=e.gl,l=n.paint.get("sky-atmosphere-color"),c=n.paint.get("sky-atmosphere-halo-color"),u=n.paint.get("sky-atmosphere-sun-intensity"),h=((t,e,n,r,i)=>({u_matrix_3f:t,u_sun_direction:e,u_sun_intensity:n,u_color_tint_r:[r.r,r.g,r.b,r.a],u_color_tint_m:[i.r,i.g,i.b,i.a],u_luminance:5e-5}))(t.fromMat4(t.create$1(),i),o,u,l,c);s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+a,n.skyboxTexture,0),r.draw(e,s.TRIANGLES,t.DepthMode.disabled,t.StencilMode.disabled,t.ColorMode.unblended,t.CullFaceMode.frontCW,h,"skyboxCapture",n.skyboxGeometry.vertexBuffer,n.skyboxGeometry.indexBuffer,n.skyboxGeometry.segment)}const zr=t.createLayout([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class Lr{constructor(e){const n=new t.StructArrayLayout5f20;n.emplaceBack(-1,1,1,0,0),n.emplaceBack(1,1,1,1,0),n.emplaceBack(1,-1,1,1,1),n.emplaceBack(-1,-1,1,0,1);const r=new t.StructArrayLayout3ui6;r.emplaceBack(0,1,2),r.emplaceBack(2,3,0),this.vertexBuffer=e.createVertexBuffer(n,zr.members),this.indexBuffer=e.createIndexBuffer(r),this.segments=t.SegmentVector.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const Rr={symbol:function(e,n,r,i,o){if("translucent"!==e.renderPass)return;const a=t.StencilMode.disabled,s=e.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(e,n,r,i,o,a,s){const l=n.transform,c="map"===o,u="map"===a;for(const h of e){const e=i.getTile(h),n=e.getBucket(r);if(!n||!n.text||!n.text.segments.get().length)continue;const o=t.evaluateSizeForZoom(n.textSizeData,l.zoom),a=we(h,n.getProjection(),l),d=l.calculatePixelsToTileUnitsMatrix(e),p=ee(a,e.tileID.canonical,u,c,l,n.getProjection(),d),f="none"!==r.layout.get("icon-text-fit")&&n.hasIconData();if(o){const r=Math.pow(2,l.zoom-e.tileID.overscaledZ);fr(n,c,u,s,t.symbolSize,l,p,h,r,o,f)}}}(i,e,r,n,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&gr(e,n,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&gr(e,n,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),n.map.showCollisionBoxes&&(hr(e,n,r,i,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),hr(e,n,r,i,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))},circle:function(e,n,r,i){if("translucent"!==e.renderPass)return;const o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=void 0!==r.layout.get("circle-sort-key").constantOr(1);if(0===o.constantOr(1)&&(0===a.constantOr(1)||0===s.constantOr(1)))return;const c=e.context,u=c.gl,h=e.transform,d=e.depthModeForSublayer(0,t.DepthMode.ReadOnly),p=t.StencilMode.disabled,f=e.colorModeForRenderPass(),m="globe"===h.projection.name,g=[t.mercatorXfromLng(h.center.lng),t.mercatorYfromLat(h.center.lat)],y=[];for(let v=0;v<i.length;v++){const o=i[v],a=n.getTile(o),s=a.getBucket(r);if(!s||s.projection.name!==h.projection.name)continue;const c=s.programConfigurations.get(r.id),u=Hn(r);m&&u.push("PROJECTION_GLOBE_VIEW");const d=e.useProgram("circle",c,u),p=s.layoutVertexBuffer,f=s.globeExtVertexBuffer,_=s.indexBuffer,b=h.projection.createInversionMatrix(h,o.canonical),x={programConfiguration:c,program:d,layoutVertexBuffer:p,globeExtVertexBuffer:f,indexBuffer:_,uniformValues:Gn(e,o,a,b,g,r),tile:a};if(l){const e=s.segments.get();for(const n of e)y.push({segments:new t.SegmentVector([n]),sortKey:n.sortKey,state:x})}else y.push({segments:s.segments,sortKey:0,state:x})}l&&y.sort((t,e)=>t.sortKey-e.sortKey);const _={useDepthForOcclusion:!m};for(const v of y){const{programConfiguration:n,program:i,layoutVertexBuffer:o,globeExtVertexBuffer:a,indexBuffer:s,uniformValues:l,tile:m}=v.state,g=v.segments;e.terrain&&e.terrain.setupElevationDraw(m,i,_),e.prepareDrawProgram(c,i,m.tileID.toUnwrapped()),i.draw(c,u.TRIANGLES,d,p,f,t.CullFaceMode.disabled,l,r.id,o,s,g,r.paint,h.zoom,n,[a])}},heatmap:function(e,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){const o=e.context,a=o.gl,s=t.StencilMode.disabled,l=new t.ColorMode([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,n,r){const i=t.gl,o=e.width*r,a=e.height*r;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,o,a]);let s=n.heatmapFbo;if(!s||s&&(s.width!==o||s.height!==a)){s&&s.destroy();const e=i.createTexture();i.bindTexture(i.TEXTURE_2D,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),s=n.heatmapFbo=t.createFramebuffer(o,a,!1),function(t,e,n,r,i,o){const a=t.gl;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,i,o,0,a.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),r.colorAttachment.set(n)}(t,0,e,s,o,a)}else i.bindTexture(i.TEXTURE_2D,s.colorAttachment.get()),t.bindFramebuffer.set(s.framebuffer)}(o,e,r,"globe"===e.transform.projection.name?.5:.25),o.clear({color:t.Color.transparent});const c=e.transform,u="globe"===c.projection.name,h=u?["PROJECTION_GLOBE_VIEW"]:null,d=u?t.CullFaceMode.frontCCW:t.CullFaceMode.disabled,p=[t.mercatorXfromLng(c.center.lng),t.mercatorYfromLat(c.center.lat)];for(let f=0;f<i.length;f++){const m=i[f];if(n.hasRenderableParent(m))continue;const g=n.getTile(m),y=g.getBucket(r);if(!y||y.projection.name!==c.projection.name)continue;const _=y.programConfigurations.get(r.id),v=e.useProgram("heatmap",_,h),{zoom:b}=e.transform;e.terrain&&e.terrain.setupElevationDraw(g,v),e.prepareDrawProgram(o,v,m.toUnwrapped());const x=c.projection.createInversionMatrix(c,m.canonical);v.draw(o,a.TRIANGLES,t.DepthMode.disabled,s,l,d,Xn(e,m,g,x,p,b,r.paint.get("heatmap-intensity")),r.id,y.layoutVertexBuffer,y.indexBuffer,y.segments,r.paint,e.transform.zoom,_,u?[y.globeExtVertexBuffer]:null)}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,n){const r=e.context,i=r.gl,o=n.heatmapFbo;if(!o)return;r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1);let a=n.colorRampTexture;a||(a=n.colorRampTexture=new t.Texture(r,n.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,i.TRIANGLES,t.DepthMode.disabled,t.StencilMode.disabled,e.colorModeForRenderPass(),t.CullFaceMode.disabled,((t,e,n,r)=>({u_image:0,u_color_ramp:1,u_opacity:e.paint.get("heatmap-opacity")}))(0,n),n.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,n.paint,e.transform.zoom)}(e,r))},line:function(e,n,r,i){if("translucent"!==e.renderPass)return;const o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0===o.constantOr(1)||0===a.constantOr(1))return;const s=e.depthModeForSublayer(0,t.DepthMode.ReadOnly),l=e.colorModeForRenderPass(),c=e.terrain&&e.terrain.renderingToTexture?1:t.exported.devicePixelRatio,u=r.paint.get("line-dasharray"),h=u.constantOr(1),d=r.layout.get("line-cap"),p=r.paint.get("line-pattern"),f=p.constantOr(1),m=r.paint.get("line-gradient"),g=r.getCrossfadeParameters(),y=f?"linePattern":"line",_=e.context,v=_.gl,b=(t=>{const e=[];tr(t)&&e.push("RENDER_LINE_DASH"),t.paint.get("line-gradient")&&e.push("RENDER_LINE_GRADIENT");const n=t.paint.get("line-trim-offset");0===n[0]&&0===n[1]||e.push("RENDER_LINE_TRIM_OFFSET");const r=t.paint.get("line-pattern").constantOr(1),i=1!==t.paint.get("line-opacity").constantOr(1);return!r&&i&&e.push("RENDER_LINE_ALPHA_DISCARD"),e})(r);let x=b.includes("RENDER_LINE_ALPHA_DISCARD");e.terrain&&e.terrain.clipOrMaskOverlapStencilType()&&(x=!1);for(const w of i){const i=n.getTile(w);if(f&&!i.patternsLoaded())continue;const o=i.getBucket(r);if(!o)continue;e.prepareDrawTile();const a=o.programConfigurations.get(r.id),S=e.useProgram(y,a,b),T=p.constantOr(null);if(T&&i.imageAtlas){const t=i.imageAtlas,e=t.patternPositions[T.to.toString()],n=t.patternPositions[T.from.toString()];e&&n&&a.setConstantPatternPositions(e,n)}const E=u.constantOr(null),C=d.constantOr(null);if(!f&&E&&C&&i.lineAtlas){const t=i.lineAtlas,e=t.getDash(E.to,C),n=t.getDash(E.from,C);e&&n&&a.setConstantPatternPositions(e,n)}let[O,P]=r.paint.get("line-trim-offset");if("round"===C||"square"===C){const t=1;O!==P&&(0===O&&(O-=t),1===P&&(P+=t))}const k=e.terrain?w.projMatrix:null,A=f?Kn(e,i,r,g,k,c):Yn(e,i,r,g,k,o.lineClipsArray.length,c,[O,P]);if(m){const i=o.gradients[r.id];let a=i.texture;if(r.gradientVersion!==i.version){let s=256;if(r.stepInterpolant){const r=n.getSource().maxzoom,i=w.canonical.z===r?Math.ceil(1<<e.transform.maxZoom-w.canonical.z):1;s=t.clamp(t.nextPowerOfTwo(o.maxLineLength/t.EXTENT*1024*i),256,_.maxTextureSize)}i.gradient=t.renderColorRamp({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:s,image:i.gradient||void 0,clips:o.lineClipsArray}),i.texture?i.texture.update(i.gradient):i.texture=new t.Texture(_,i.gradient,v.RGBA),i.version=r.gradientVersion,a=i.texture}_.activeTexture.set(v.TEXTURE1),a.bind(r.stepInterpolant?v.NEAREST:v.LINEAR,v.CLAMP_TO_EDGE)}h&&(_.activeTexture.set(v.TEXTURE0),i.lineAtlasTexture.bind(v.LINEAR,v.REPEAT),a.updatePaintBuffers(g)),f&&(_.activeTexture.set(v.TEXTURE0),i.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),a.updatePaintBuffers(g)),e.prepareDrawProgram(_,S,w.toUnwrapped());const I=n=>{S.draw(_,v.TRIANGLES,s,n,l,t.CullFaceMode.disabled,A,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,r.paint,e.transform.zoom,a,[o.layoutVertexBuffer2])};if(x){const n=e.stencilModeForClipping(w).ref;0===n&&e.terrain&&_.clear({stencil:0});const r={func:v.EQUAL,mask:255};A.u_alpha_discard_threshold=.8,I(new t.StencilMode(r,n,255,v.KEEP,v.KEEP,v.INVERT)),A.u_alpha_discard_threshold=0,I(new t.StencilMode(r,n,255,v.KEEP,v.KEEP,v.KEEP))}else I(e.stencilModeForClipping(w))}x&&(e.resetStencilClippingMasks(),e.terrain&&_.clear({stencil:0}))},fill:function(e,n,r,i){const o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0===a.constantOr(1))return;const s=e.colorModeForRenderPass(),l=r.paint.get("fill-pattern"),c=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===c){const o=e.depthModeForSublayer(1,"opaque"===e.renderPass?t.DepthMode.ReadWrite:t.DepthMode.ReadOnly);_r(e,n,r,i,o,s,!1)}if("translucent"===e.renderPass&&r.paint.get("fill-antialias")){const o=e.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,t.DepthMode.ReadOnly);_r(e,n,r,i,o,s,!0)}},"fill-extrusion":function(e,n,r,i){const o=r.paint.get("fill-extrusion-opacity");if(0!==o&&"translucent"===e.renderPass){const a=new t.DepthMode(e.context.gl.LEQUAL,t.DepthMode.ReadWrite,e.depthRangeFor3D);if(1!==o||r.paint.get("fill-extrusion-pattern").constantOr(1))vr(e,n,r,i,a,t.StencilMode.disabled,t.ColorMode.disabled),vr(e,n,r,i,a,e.stencilModeFor3D(),e.colorModeForRenderPass()),e.resetStencilClippingMasks();else{const o=e.colorModeForRenderPass();vr(e,n,r,i,a,t.StencilMode.disabled,o)}}},hillshade:function(e,n,r,i){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;const o=e.context,a=e.depthModeForSublayer(0,t.DepthMode.ReadOnly),s=e.colorModeForRenderPass(),l=e.terrain&&e.terrain.renderingToTexture,[c,u]="translucent"!==e.renderPass||l?[{},i]:e.stencilConfigForOverlap(i);for(const h of u){const i=n.getTile(h);if(i.needsHillshadePrepare&&"offscreen"===e.renderPass)bn(e,i,r,a,t.StencilMode.disabled,s);else if("translucent"===e.renderPass){const t=l&&e.terrain?e.terrain.stencilModeForRTTOverlap(h):c[h.overscaledZ];_n(e,h,i,r,a,t,s)}}o.viewport.set([0,0,e.width,e.height]),e.resetStencilClippingMasks()},raster:function(e,n,r,i,o,a){if("translucent"!==e.renderPass)return;if(0===r.paint.get("raster-opacity"))return;if(!i.length)return;const s=e.context,l=s.gl,c=n.getSource(),u=e.useProgram("raster"),h=e.colorModeForRenderPass(),d=e.terrain&&e.terrain.renderingToTexture,[p,f]=c instanceof At||d?[{},i]:e.stencilConfigForOverlap(i),m=f[f.length-1].overscaledZ,g=!e.options.moving;for(const y of f){const i=d?t.DepthMode.disabled:e.depthModeForSublayer(y.overscaledZ-m,1===r.paint.get("raster-opacity")?t.DepthMode.ReadWrite:t.DepthMode.ReadOnly,l.LESS),o=y.toUnwrapped(),f=n.getTile(y);if(d&&(!f||!f.hasData()))continue;const _=d?y.projMatrix:e.transform.calculateProjMatrix(o,g),v=e.terrain&&d?e.terrain.stencilModeForRTTOverlap(y):p[y.overscaledZ],b=a?0:r.paint.get("raster-fade-duration");f.registerFadeDuration(b);const x=n.findLoadedParent(y,0),w=kn(f,x,n,e.transform,b);let S,T;e.terrain&&e.terrain.prepareDrawTile();const E="nearest"===r.paint.get("raster-resampling")?l.NEAREST:l.LINEAR;s.activeTexture.set(l.TEXTURE0),f.texture.bind(E,l.CLAMP_TO_EDGE),s.activeTexture.set(l.TEXTURE1),x?(x.texture.bind(E,l.CLAMP_TO_EDGE),S=Math.pow(2,x.tileID.overscaledZ-f.tileID.overscaledZ),T=[f.tileID.canonical.x*S%1,f.tileID.canonical.y*S%1]):f.texture.bind(E,l.CLAMP_TO_EDGE);const C=er(_,T||[0,0],S||1,w,r,c instanceof At?c.perspectiveTransform:[0,0]);if(e.prepareDrawProgram(s,u,o),c instanceof At)c.boundsBuffer&&c.boundsSegments&&u.draw(s,l.TRIANGLES,i,t.StencilMode.disabled,h,t.CullFaceMode.disabled,C,r.id,c.boundsBuffer,e.quadTriangleIndexBuffer,c.boundsSegments);else{const{tileBoundsBuffer:n,tileBoundsIndexBuffer:o,tileBoundsSegments:a}=e.getTileBoundsBuffers(f);u.draw(s,l.TRIANGLES,i,v,h,t.CullFaceMode.disabled,C,r.id,n,o,a)}}e.resetStencilClippingMasks()},background:function(e,n,r,i){const o=r.paint.get("background-color"),a=r.paint.get("background-opacity");if(0===a)return;const s=e.context,l=s.gl,c=e.transform,u=c.tileSize,h=r.paint.get("background-pattern");if(e.isPatternMissing(h))return;const d=!h&&1===o.a&&1===a&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==d)return;const p=t.StencilMode.disabled,f=e.depthModeForSublayer(0,"opaque"===d?t.DepthMode.ReadWrite:t.DepthMode.ReadOnly),m=e.colorModeForRenderPass(),g=e.useProgram(h?"backgroundPattern":"background");let y,_=i;_||(y=e.getBackgroundTiles(),_=Object.values(y).map(t=>t.tileID)),h&&(s.activeTexture.set(l.TEXTURE0),e.imageManager.bind(e.context));const v=r.getCrossfadeParameters();for(const b of _){const d=b.toUnwrapped(),_=i?b.projMatrix:e.transform.calculateProjMatrix(d);e.prepareDrawTile();const x=n?n.getTile(b):y?y[b.key]:new t.Tile(b,u,c.zoom,e),w=h?lr(_,a,e,h,{tileID:b,tileSize:u},v):sr(_,a,o);e.prepareDrawProgram(s,g,d);const{tileBoundsBuffer:S,tileBoundsIndexBuffer:T,tileBoundsSegments:E}=e.getTileBoundsBuffers(x);g.draw(s,l.TRIANGLES,f,p,m,t.CullFaceMode.disabled,w,r.id,S,T,E)}},sky:function(e,n,r){const i=e.transform,o="mercator"===i.projection.name||"globe"===i.projection.name?1:t.smoothstep(7,8,i.zoom),a=r.paint.get("sky-opacity")*o;if(0===a)return;const s=e.context,l=r.paint.get("sky-type"),c=new t.DepthMode(s.gl.LEQUAL,t.DepthMode.ReadOnly,[0,1]),u=e.frameCounter/1e3%1;"atmosphere"===l?"offscreen"===e.renderPass?r.needsSkyboxCapture(e)&&(function(e,n,r,i){const o=e.context,a=o.gl;let s=n.skyboxFbo;if(!s){s=n.skyboxFbo=o.createFramebuffer(32,32,!1),n.skyboxGeometry=new Dr(o),n.skyboxTexture=o.gl.createTexture(),a.bindTexture(a.TEXTURE_CUBE_MAP,n.skyboxTexture),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MAG_FILTER,a.LINEAR);for(let t=0;t<6;++t)a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,a.RGBA,32,32,0,a.RGBA,a.UNSIGNED_BYTE,null)}o.bindFramebuffer.set(s.framebuffer),o.viewport.set([0,0,32,32]);const l=n.getCenter(e,!0),c=e.useProgram("skyboxCapture"),u=new Float64Array(16);t.identity(u),t.rotateY(u,u,.5*-Math.PI),Br(o,n,c,u,l,0),t.identity(u),t.rotateY(u,u,.5*Math.PI),Br(o,n,c,u,l,1),t.identity(u),t.rotateX(u,u,.5*-Math.PI),Br(o,n,c,u,l,2),t.identity(u),t.rotateX(u,u,.5*Math.PI),Br(o,n,c,u,l,3),t.identity(u),Br(o,n,c,u,l,4),t.identity(u),t.rotateY(u,u,Math.PI),Br(o,n,c,u,l,5),o.viewport.set([0,0,e.width,e.height])}(e,r),r.markSkyboxValid(e)):"sky"===e.renderPass&&function(e,n,r,i,o){const a=e.context,s=a.gl,l=e.transform,c=e.useProgram("skybox");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_CUBE_MAP,n.skyboxTexture);const u=((t,e,n,r,i)=>({u_matrix:t,u_sun_direction:e,u_cubemap:0,u_opacity:r,u_temporal_offset:i}))(l.skyboxMatrix,n.getCenter(e,!1),0,i,o);e.prepareDrawProgram(a,c),c.draw(a,s.TRIANGLES,r,t.StencilMode.disabled,e.colorModeForRenderPass(),t.CullFaceMode.backCW,u,"skybox",n.skyboxGeometry.vertexBuffer,n.skyboxGeometry.indexBuffer,n.skyboxGeometry.segment)}(e,r,c,a,u):"gradient"===l&&"sky"===e.renderPass&&function(e,n,r,i,o){const a=e.context,s=a.gl,l=e.transform,c=e.useProgram("skyboxGradient");n.skyboxGeometry||(n.skyboxGeometry=new Dr(a)),a.activeTexture.set(s.TEXTURE0);let u=n.colorRampTexture;u||(u=n.colorRampTexture=new t.Texture(a,n.colorRamp,s.RGBA)),u.bind(s.LINEAR,s.CLAMP_TO_EDGE);const h=((e,n,r,i,o)=>({u_matrix:e,u_color_ramp:0,u_center_direction:n,u_radius:t.degToRad(r),u_opacity:i,u_temporal_offset:o}))(l.skyboxMatrix,n.getCenter(e,!1),n.paint.get("sky-gradient-radius"),i,o);e.prepareDrawProgram(a,c),c.draw(a,s.TRIANGLES,r,t.StencilMode.disabled,e.colorModeForRenderPass(),t.CullFaceMode.backCW,h,"skyboxGradient",n.skyboxGeometry.vertexBuffer,n.skyboxGeometry.indexBuffer,n.skyboxGeometry.segment)}(e,r,c,a,u)},debug:function(t,e,n){for(let r=0;r<n.length;r++)Cr(t,e,n[r])},custom:function(e,n,r){const i=e.context,o=r.implementation;if(e.transform.projection.unsupportedLayers&&e.transform.projection.unsupportedLayers.includes("custom"))t.warnOnce("Custom layers are not yet supported with non-mercator projections. Use mercator to enable custom layers.");else if("offscreen"===e.renderPass){const t=o.prerender;t&&(e.setCustomLayerDefaults(),i.setColorMode(e.colorModeForRenderPass()),t.call(o,i.gl,e.transform.customLayerMatrix()),i.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),i.setColorMode(e.colorModeForRenderPass()),i.setStencilMode(t.StencilMode.disabled);const n="3d"===o.renderingMode?new t.DepthMode(e.context.gl.LEQUAL,t.DepthMode.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,t.DepthMode.ReadOnly);i.setDepthMode(n),o.render(i.gl,e.transform.customLayerMatrix()),i.setDirty(),e.setBaseState(),i.bindFramebuffer.set(null)}}};class jr{constructor(e,n){this.context=new Ct(e),this.transform=n,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.setup(),this.numSublayers=t.SourceCache.maxUnderzooming+t.SourceCache.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ze,this.deferredRenderGpuTimeQueries=[],this.gpuTimers={},this.frameCounter=0,this._backgroundTiles={}}updateTerrain(t,e){const n=!!t&&!!t.terrain&&this.transform.projection.supportsTerrain;if(!(n||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new Dn(this,t));const r=this._terrain;this.transform.elevation=n?r:null,r.update(t,this.transform,e)}_updateFog(t){const e=t.fog;if(!e||"globe"===this.transform.projection.name||e.getOpacity(this.transform.pitch)<1||e.properties.get("horizon-blend")<.03)return void(this.transform.fogCullDistSq=null);const[n,r]=e.getFovAdjustedRange(this.transform._fov);if(n>r)return void(this.transform.fogCullDistSq=null);const i=n+.78*(r-n);this.transform.fogCullDistSq=i*i}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}resize(e,n){if(this.width=e*t.exported.devicePixelRatio,this.height=n*t.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const t of this.style.order)this.style._layers[t].resize()}setup(){const e=this.context,n=new t.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(n,t.posAttributes.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);const r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(r,t.posAttributes.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);const i=new t.StructArrayLayout2i4;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(-1,1),i.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(i,t.posAttributes.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);const o=new t.StructArrayLayout4i8;o.emplaceBack(0,0,0,0),o.emplaceBack(t.EXTENT,0,t.EXTENT,0),o.emplaceBack(0,t.EXTENT,0,t.EXTENT),o.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.mercatorBoundsBuffer=e.createVertexBuffer(o,t.boundsAttributes.members),this.mercatorBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);const a=new t.StructArrayLayout3ui6;a.emplaceBack(0,1,2),a.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(a);const s=new t.StructArrayLayout1ui2;for(const t of[0,1,3,2,0])s.emplaceBack(t);this.debugIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,new t.RGBAImage({width:1,height:1},Uint8Array.of(0,0,0,0)),e.gl.RGBA),this.identityMat=t.create();const l=this.context.gl;this.stencilClearMode=new t.StencilMode({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO),this.loadTimeStamps.push(t.window.performance.now()),this.atmosphereBuffer=new Lr(this.context)}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(t){return t._makeTileBoundsBuffers(this.context,this.transform.projection),t._tileBoundsBuffer?{tileBoundsBuffer:t._tileBoundsBuffer,tileBoundsIndexBuffer:t._tileBoundsIndexBuffer,tileBoundsSegments:t._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const e=this.context,n=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.useProgram("clippingMask").draw(e,n.TRIANGLES,t.DepthMode.disabled,this.stencilClearMode,t.ColorMode.disabled,t.CullFaceMode.disabled,Pn(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(e,n,r){if(!n||this.currentStencilSource===n.id||!e.isTileClipped()||!r||0===r.length)return;if(this._tileClippingMaskIDs&&!this.terrain){let t=!1;for(const e of r)if(void 0===this._tileClippingMaskIDs[e.key]){t=!0;break}if(!t)return}this.currentStencilSource=n.id;const i=this.context,o=i.gl;this.nextStencilID+r.length>256&&this.clearStencil(),i.setColorMode(t.ColorMode.disabled),i.setDepthMode(t.DepthMode.disabled);const a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const s of r){const e=n.getTile(s),r=this._tileClippingMaskIDs[s.key]=this.nextStencilID++,{tileBoundsBuffer:l,tileBoundsIndexBuffer:c,tileBoundsSegments:u}=this.getTileBoundsBuffers(e);a.draw(i,o.TRIANGLES,t.DepthMode.disabled,new t.StencilMode({func:o.ALWAYS,mask:0},r,255,o.KEEP,o.KEEP,o.REPLACE),t.ColorMode.disabled,t.CullFaceMode.disabled,Pn(s.projMatrix),"$clipping",l,c,u)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,n=this.context.gl;return new t.StencilMode({func:n.NOTEQUAL,mask:255},e,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(e){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(e);const n=this.context.gl;return new t.StencilMode({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(e){const n=this.context.gl,r=e.sort((t,e)=>e.overscaledZ-t.overscaledZ),i=r[r.length-1].overscaledZ,o=r[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();const e={};for(let r=0;r<o;r++)e[r+i]=new t.StencilMode({func:n.GEQUAL,mask:255},r+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=o,[e,r]}return[{[i]:t.StencilMode.disabled},r]}colorModeForRenderPass(){const e=this.context.gl;if(this._showOverdrawInspector){const n=1/8;return new t.ColorMode([e.CONSTANT_COLOR,e.ONE],new t.Color(n,n,n,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?t.ColorMode.unblended:t.ColorMode.alphaBlended}depthModeForSublayer(e,n,r){if(!this.opaquePassEnabledForLayer())return t.DepthMode.disabled;const i=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new t.DepthMode(r||this.context.gl.LEQUAL,n,[i,i])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,n){this.style=e,this.options=n,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.exported.now()),this.imageManager.beginFrame();const r=this.style.order,i=this.style._sourceCaches;for(const t in i){const e=i[t];e.used&&e.prepare(this.context)}const o={},a={},s={};for(const t in i){const e=i[t];o[t]=e.getVisibleCoordinates(),a[t]=o[t].slice().reverse(),s[t]=e.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let t=0;t<r.length;t++)if(this.style._layers[r[t]].is3D()){this.opaquePassCutoff=t;break}if(this.terrain&&(this.terrain.updateTileBinding(s),this.opaquePassCutoff=0),"globe"!==this.transform.projection.name||this.globeSharedBuffers||(this.globeSharedBuffers=new t.GlobeSharedBuffers(this.context)),t.isMapAuthenticated(this.context.gl)){this.renderPass="offscreen";for(const t of r){const n=this.style._layers[t],r=e._getLayerSourceCache(n);if(!n.hasOffscreenPass()||n.isHidden(this.transform.zoom))continue;const i=r?a[r.id]:void 0;("custom"===n.type||n.isSky()||i&&i.length)&&this.renderLayer(this,r,n,i)}if(this.depthRangeFor3D=[0,1-(e.order.length+2)*this.numSublayers*this.depthEpsilon],this.terrain&&(this.style.hasSymbolLayers()||this.style.hasCircleLayers())&&this.terrain.drawDepth(),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]),this.context.clear({color:n.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=n.showOverdrawInspector,this.renderPass="opaque",!this.terrain)for(this.currentLayer=r.length-1;this.currentLayer>=0;this.currentLayer--){const t=this.style._layers[r[this.currentLayer]],n=e._getLayerSourceCache(t);if(t.isSky())continue;const i=n?a[n.id]:void 0;this._renderTileClippingMasks(t,n,i),this.renderLayer(this,n,t,i)}if(this.style.fog&&this.transform.projection.supportsFog&&function(e,n){const r=e.context,i=r.gl,o=e.transform,a=new t.DepthMode(i.LEQUAL,t.DepthMode.ReadOnly,[0,1]),s=e.useProgram("globeAtmosphere",null,"globe"===o.projection.name?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"]),l=t.globeToMercatorTransition(o.zoom),c=n.properties.get("color").toArray01(),u=n.properties.get("high-color").toArray01(),h=n.properties.get("space-color").toArray01PremultipliedAlpha(),d=t.identity$1([]);t.rotateY$1(d,d,-t.degToRad(o._center.lng)),t.rotateX$1(d,d,t.degToRad(o._center.lat)),t.rotateZ$1(d,d,o.angle),t.rotateX$1(d,d,-o._pitch);const p=t.fromQuat(new Float32Array(16),d),f=t.mapValue(n.properties.get("star-intensity"),0,1,0,.25),m=5e-4,g=t.mapValue(n.properties.get("horizon-blend"),0,1,m,.25),y=t.globeUseCustomAntiAliasing(e,r,o)&&g===m?o.worldSize/(2*Math.PI*1.025)-1:o.globeRadius,_=e.frameCounter/1e3%1,v=t.length(o.globeCenterInViewSpace),b=Math.sqrt(Math.pow(v,2)-Math.pow(y,2)),x=Math.acos(b/v),w=((e,n,r,i,o,a,s,l,c,u,h,d,p,f)=>({u_frustum_tl:e,u_frustum_tr:n,u_frustum_br:r,u_frustum_bl:i,u_horizon:o,u_transition:a,u_fadeout_range:s,u_color:l,u_high_color:c,u_space_color:u,u_star_intensity:h,u_star_size:5*t.exported.devicePixelRatio,u_star_density:0,u_temporal_offset:d,u_horizon_angle:p,u_rotation_matrix:f}))(o.frustumCorners.TL,o.frustumCorners.TR,o.frustumCorners.BR,o.frustumCorners.BL,o.frustumCorners.horizon,l,g,c,u,h,f,_,x,p);e.prepareDrawProgram(r,s);const S=e.atmosphereBuffer;S&&s.draw(r,i.TRIANGLES,a,t.StencilMode.disabled,t.ColorMode.alphaBlended,t.CullFaceMode.backCW,w,"skybox",S.vertexBuffer,S.indexBuffer,S.segments)}(this,this.style.fog),this.renderPass="sky",(t.globeToMercatorTransition(this.transform.zoom)>0||"globe"!==this.transform.projection.name)&&this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer<r.length;this.currentLayer++){const t=this.style._layers[r[this.currentLayer]],n=e._getLayerSourceCache(t);t.isSky()&&this.renderLayer(this,n,t,n?a[n.id]:void 0)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<r.length;){const t=this.style._layers[r[this.currentLayer]],n=e._getLayerSourceCache(t);if(t.isSky()){++this.currentLayer;continue}if(this.terrain&&this.style.isLayerDraped(t)){if(t.isHidden(this.transform.zoom)){++this.currentLayer;continue}this.currentLayer=this.terrain.renderBatch(this.currentLayer);continue}const i=n?("symbol"===t.type?s:a)[n.id]:void 0;this._renderTileClippingMasks(t,n,n?o[n.id]:void 0),this.renderLayer(this,n,t,i),++this.currentLayer}if(this.terrain&&this.terrain.postRender(),this.options.showTileBoundaries||this.options.showQueryGeometry||this.options.showTileAABBs){let n=null;t.values(this.style._layers).forEach(t=>{const r=e._getLayerSourceCache(t);r&&!t.isHidden(this.transform.zoom)&&(!n||n.getSource().maxzoom<r.getSource().maxzoom)&&(n=r)}),n&&this.options.showTileBoundaries&&Rr.debug(this,n,n.getVisibleCoordinates())}this.options.showPadding&&function(t){const e=t.transform.padding;Or(t,t.transform.height-(e.top||0),3,xr),Or(t,e.bottom||0,3,wr),Pr(t,e.left||0,3,Sr),Pr(t,t.transform.width-(e.right||0),3,Tr);const n=t.transform.centerPoint;!function(t,e,n,r){kr(t,e-1,n-10,2,20,r),kr(t,e-10,n-1,20,2,r)}(t,n.x,t.transform.height-n.y,Er)}(this),this.context.setDefault(),this.frameCounter=(this.frameCounter+1)%Number.MAX_SAFE_INTEGER,this.tileLoaded&&this.options.speedIndexTiming&&(this.loadTimeStamps.push(t.window.performance.now()),this.saveCanvasCopy())}}renderLayer(t,e,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||"sky"===n.type||"custom"===n.type||r&&r.length)&&(this.id=n.id,this.gpuTimingStart(n),t.transform.projection.unsupportedLayers&&t.transform.projection.unsupportedLayers.includes(n.type)||Rr[n.type](t,e,n,r,this.style.placement.variableOffsets,this.options.isInitialLoad),this.gpuTimingEnd())}gpuTimingStart(t){if(!this.options.gpuTiming)return;const e=this.context.extTimerQuery;let n=this.gpuTimers[t.id];n||(n=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),n.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,n.query)}gpuTimingDeferredRenderStart(){if(this.options.gpuTimingDeferredRender){const t=this.context.extTimerQuery,e=t.createQueryEXT();this.deferredRenderGpuTimeQueries.push(e),t.beginQueryEXT(t.TIME_ELAPSED_EXT,e)}}gpuTimingDeferredRenderEnd(){if(!this.options.gpuTimingDeferredRender)return;const t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}collectGpuTimers(){const t=this.gpuTimers;return this.gpuTimers={},t}collectDeferredRenderGpuQueries(){const t=this.deferredRenderGpuTimeQueries;return this.deferredRenderGpuTimeQueries=[],t}queryGpuTimers(t){const e={};for(const n in t){const r=t[n],i=this.context.extTimerQuery,o=i.getQueryObjectEXT(r.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(r.query),e[n]=o}return e}queryGpuTimeDeferredRender(t){if(!this.options.gpuTimingDeferredRender)return 0;const e=this.context.extTimerQuery;let n=0;for(const r of t)n+=e.getQueryObjectEXT(r,e.QUERY_RESULT_EXT)/1e6,e.deleteQueryEXT(r);return n}translatePosMatrix(e,n,r,i,o){if(!r[0]&&!r[1])return e;const a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){const t=Math.sin(a),e=Math.cos(a);r=[r[0]*e-r[1]*t,r[0]*t+r[1]*e]}const s=[o?r[0]:D(n,r[0],this.transform.zoom),o?r[1]:D(n,r[1],this.transform.zoom),0],l=new Float32Array(16);return t.translate(l,e,s),l}saveTileTexture(t){const e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]}getTileTexture(t){const e=this._tileTextures[t];return e&&e.length>0?e.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const e=this.imageManager.getPattern(t.from.toString()),n=this.imageManager.getPattern(t.to.toString());return!e||!n}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}currentGlobalDefines(){const t=this.terrain&&this.terrain.renderingToTexture,e=this.style&&this.style.fog,n=[];return this.terrainRenderModeElevated()&&n.push("TERRAIN"),"globe"===this.transform.projection.name&&n.push("GLOBE"),e&&!t&&0!==e.getOpacity(this.transform.pitch)&&n.push("FOG"),t&&n.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&n.push("OVERDRAW_INSPECTOR"),n}useProgram(t,e,n){this.cache=this.cache||{};const r=n||[],i=this.currentGlobalDefines().concat(r),o=Bn.cacheKey(pn[t],t,i,e);return this.cache[o]||(this.cache[o]=new Bn(this.context,t,pn[t],e,cr[t],i)),this.cache[o]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.atmosphereBuffer&&this.atmosphereBuffer.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}prepareDrawProgram(e,n,r){if(this.terrain&&this.terrain.renderingToTexture)return;const i=this.style.fog;if(i){const o=i.getOpacity(this.transform.pitch),a=((e,n,r,i,o,a,s,l,c,u,h)=>{const d=e.transform,p=n.properties.get("color").toArray01();p[3]=i;const f=e.frameCounter/1e3%1;return{u_fog_matrix:r?d.calculateFogTileMatrix(r):e.identityMat,u_fog_range:n.getFovAdjustedRange(d._fov),u_fog_color:p,u_fog_horizon_blend:n.properties.get("horizon-blend"),u_fog_temporal_offset:f,u_frustum_tl:o,u_frustum_tr:a,u_frustum_br:s,u_frustum_bl:l,u_globe_pos:c,u_globe_radius:u,u_viewport:h,u_globe_transition:t.globeToMercatorTransition(d.zoom),u_is_globe:+("globe"===d.projection.name)}})(this,i,r,o,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*t.exported.devicePixelRatio,this.transform.height*t.exported.devicePixelRatio]);n.setFogUniformValues(e,a)}}setTileLoadedFlag(t){this.tileLoaded=t}saveCanvasCopy(){this.frameCopies.push(this.canvasCopy()),this.tileLoaded=!1}canvasCopy(){const t=this.context.gl,e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.copyTexImage2D(t.TEXTURE_2D,0,t.RGBA,0,0,t.drawingBufferWidth,t.drawingBufferHeight,0),e}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const t=this.style&&this.style.fog;return!!t&&0!==t.getOpacity(this.transform.pitch)}getBackgroundTiles(){const e=this._backgroundTiles,n=this._backgroundTiles={},r=this.transform.coveringTiles({tileSize:512});for(const i of r)n[i.key]=e[i.key]||new t.Tile(i,512,this.transform.tileZoom,this);return n}clearBackgroundTiles(){this._backgroundTiles={}}}class Fr{constructor(t=0,e=0,n=0,r=0){if(isNaN(t)||t<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=n,this.right=r}interpolate(e,n,r){return null!=n.top&&null!=e.top&&(this.top=t.number(e.top,n.top,r)),null!=n.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,n.bottom,r)),null!=n.left&&null!=e.left&&(this.left=t.number(e.left,n.left,r)),null!=n.right&&null!=e.right&&(this.right=t.number(e.right,n.right,r)),this}getCenter(e,n){const r=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+n-this.bottom)/2,0,n);return new t.pointGeometry(r,i)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new Fr(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Nr(e,n){const r=t.getColumn(e,3);t.fromQuat(e,n),t.setColumn(e,3,r)}function $r(e,n){const r=t.identity$1([]);return t.rotateZ$1(r,r,-n),t.rotateX$1(r,r,-e),r}function Vr(e,n){const r=[e[0],e[1],0],i=[n[0],n[1],0];if(t.length(r)>=1e-15){const e=t.normalize([],r);t.scale$2(i,e,t.dot(i,e)),n[0]=i[0],n[1]=i[1]}const o=t.cross([],n,e);if(t.len(o)<1e-15)return null;const a=Math.atan2(-o[1],o[0]);return $r(Math.atan2(Math.sqrt(e[0]*e[0]+e[1]*e[1]),-e[2]),a)}class Ur{constructor(t,e){this.position=t,this.orientation=e}get position(){return this._position}set position(e){if(e){const n=e instanceof t.MercatorCoordinate?e:new t.MercatorCoordinate(e[0],e[1],e[2]);this._renderWorldCopies&&(n.x=t.wrap(n.x,0,1)),this._position=n}else this._position=null}lookAtPoint(e,n){if(this.orientation=null,!this.position)return;const r=this._elevation?this._elevation.getAtPointOrZero(t.MercatorCoordinate.fromLngLat(e)):0,i=this.position,o=t.MercatorCoordinate.fromLngLat(e,r),a=[o.x-i.x,o.y-i.y,o.z-i.z];n||(n=[0,0,1]),n[2]=Math.abs(n[2]),this.orientation=Vr(a,n)}setPitchBearing(e,n){this.orientation=$r(t.degToRad(e),t.degToRad(-n))}}class Gr{constructor(e,n){this._transform=t.identity([]),this.orientation=n,this.position=e}get mercatorPosition(){const e=this.position;return new t.MercatorCoordinate(e[0],e[1],e[2])}get position(){const e=t.getColumn(this._transform,3);return[e[0],e[1],e[2]]}set position(e){var n;e&&t.setColumn(this._transform,3,[(n=e)[0],n[1],n[2],1])}get orientation(){return this._orientation}set orientation(e){this._orientation=e||t.identity$1([]),e&&Nr(this._transform,this._orientation)}getPitchBearing(){const t=this.forward(),e=this.right();return{bearing:Math.atan2(-e[1],e[0]),pitch:Math.atan2(Math.sqrt(t[0]*t[0]+t[1]*t[1]),-t[2])}}setPitchBearing(t,e){this._orientation=$r(t,e),Nr(this._transform,this._orientation)}forward(){const e=t.getColumn(this._transform,2);return[-e[0],-e[1],-e[2]]}up(){const e=t.getColumn(this._transform,1);return[-e[0],-e[1],-e[2]]}right(){const e=t.getColumn(this._transform,0);return[e[0],e[1],e[2]]}getCameraToWorld(e,n){const r=new Float64Array(16);return t.invert(r,this.getWorldToCamera(e,n)),r}getWorldToCameraPosition(e,n,r){const i=this.position;t.scale$2(i,i,-e);const o=new Float64Array(16);return t.fromScaling(o,[r,r,r]),t.translate(o,o,i),o[10]*=n,o}getWorldToCamera(e,n){const r=new Float64Array(16),i=new Float64Array(4),o=this.position;return t.conjugate(i,this._orientation),t.scale$2(o,o,-e),t.fromQuat(r,i),t.translate(r,r,o),r[1]*=-1,r[5]*=-1,r[9]*=-1,r[13]*=-1,r[8]*=n,r[9]*=n,r[10]*=n,r[11]*=n,r}getCameraToClipPerspective(e,n,r,i){const o=new Float64Array(16);return t.perspective(o,e,n,r,i),o}getDistanceToElevation(e){const n=0===e?0:t.mercatorZfromAltitude(e,this.position[1]),r=this.forward();return(n-this.position[2])/r[2]}clone(){return new Gr([...this.position],[...this.orientation])}}function Hr(e,n){const r=Wr(e.projection,e.zoom,e.width,e.height),i=function(e,n,r,i,o){const a=new t.LngLat(r.lng-180*Zr,r.lat),s=new t.LngLat(r.lng+180*Zr,r.lat),l=e.project(a.lng,a.lat),c=e.project(s.lng,s.lat),u=-Math.atan2(c.y-l.y,c.x-l.x),h=t.MercatorCoordinate.fromLngLat(r);h.y=t.clamp(h.y,-.999975,.999975);const d=h.toLngLat(),p=e.project(d.lng,d.lat),f=t.MercatorCoordinate.fromLngLat(d);f.x+=Zr;const m=f.toLngLat(),g=e.project(m.lng,m.lat),y=Yr(g.x-p.x,g.y-p.y,u),_=t.MercatorCoordinate.fromLngLat(d);_.y+=Zr;const v=_.toLngLat(),b=e.project(v.lng,v.lat),x=Yr(b.x-p.x,b.y-p.y,u),w=Math.abs(y.x)/Math.abs(x.y),S=t.identity([]);t.rotateZ(S,S,-u*(1-(o?0:i)));const T=t.identity([]);return t.scale(T,T,[1,1-(1-w)*i,1]),T[4]=-x.x/x.y*i,t.rotateZ(T,T,u),t.multiply(T,S,T),T}(e.projection,0,e.center,r,n),o=qr(e);return t.scale(i,i,[o,o,1]),i}function qr(e){const n=e.projection,r=Wr(e.projection,e.zoom,e.width,e.height),i=Xr(n,e.center),o=Xr(n,t.LngLat.convert(n.center));return Math.pow(2,i*r+(1-r)*o)}function Wr(e,n,r,i,o=1/0){const a=e.range;if(!a)return 0;const s=Math.min(o,Math.max(r,i)),l=Math.log(s/1024)/Math.LN2;return t.smoothstep(a[0]+l,a[1]+l,n)}const Zr=25e-6;function Xr(e,n){const r=t.clamp(n.lat,-t.MAX_MERCATOR_LATITUDE,t.MAX_MERCATOR_LATITUDE),i=new t.LngLat(n.lng-180*Zr,r),o=new t.LngLat(n.lng+180*Zr,r),a=e.project(i.lng,r),s=e.project(o.lng,r),l=t.MercatorCoordinate.fromLngLat(i),c=t.MercatorCoordinate.fromLngLat(o),u=s.x-a.x,h=s.y-a.y,d=c.x-l.x,p=c.y-l.y,f=Math.sqrt((d*d+p*p)/(u*u+h*h));return Math.log(f)/Math.LN2}function Yr(t,e,n){const r=Math.cos(n),i=Math.sin(n);return{x:t*r-e*i,y:t*i+e*r}}class Kr{constructor(e,n,r,i,o,a,s){this.tileSize=512,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setProjection(a),this.setMaxBounds(s),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new Fr,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._distanceTileDataCache={},this._camera=new Gr,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1}clone(){const t=new Kr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return t._elevation=this._elevation,t._centerAltitude=this._centerAltitude,t._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,t.tileSize=this.tileSize,t.mercatorFromTransition=this.mercatorFromTransition,t.width=this.width,t.height=this.height,t.cameraElevationReference=this.cameraElevationReference,t._center=this._center,t._setZoom(this.zoom),t._seaLevelZoom=this._seaLevelZoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._nearZ=this._nearZ,t._farZ=this._farZ,t._averageElevation=this._averageElevation,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._camera=this._camera.clone(),t._calcMatrices(),t.freezeTileCoverage=this.freezeTileCoverage,t.frustumCorners=this.frustumCorners,t}get elevation(){return this._elevation}set elevation(t){this._elevation!==t&&(this._elevation=t,this._updateCameraOnTerrain(),this._calcMatrices())}updateElevation(t){const e=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForExaggeration;(null==this._seaLevelZoom||e)&&this._updateCameraOnTerrain(),(t||e)&&this._constrainCameraAltitude(),this._calcMatrices()}getProjection(){return t.pick(this.projection,["name","center","parallels"])}setProjection(n){this.projectionOptions=n||{name:"mercator"};const r=this.projection?this.getProjection():void 0;this.projection=t.getProjection(this.projectionOptions);const i=!e(r,this.getProjection());return i&&this._calcMatrices(),this.mercatorFromTransition=!1,i}setMercatorFromTransition(){const e=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=t.getProjection({name:"mercator"});const n=e!==this.projection.name;return n&&this._calcMatrices(),n}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies&&!0===this.projection.supportsWorldCopies}set renderWorldCopies(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get cameraWorldSize(){const t=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(t))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return t.mercatorZfromAltitude(this.center.lat,this.cameraWorldSize)}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.pointGeometry(this.width,this.height)}get bearing(){return t.wrap(this.rotation,-180,180)}set bearing(t){this.rotation=t}get rotation(){return-this.angle/Math.PI*180}set rotation(e){const n=-e*Math.PI/180;var r;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=(r=new t.ARRAY_TYPE(4),t.ARRAY_TYPE!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r),function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);t[0]=r*l+o*s,t[1]=i*l+a*s,t[2]=r*-s+o*l,t[3]=i*-s+a*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const n=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get aspect(){return this.width/this.height}get fovX(){return this._fov}get fovY(){const t=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/t)}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=t.degToRad(e),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(t){this._averageElevation=t,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(t){const e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._setZoom(e),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(t){this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom}_updateCameraOnTerrain(){if(!this._elevation||!this._elevation.isDataAvailableAtPoint(this.locationCoordinate(this.center)))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const t=this._elevation;this._centerAltitude=t.getAtPointOrZero(this.locationCoordinate(this.center)),this._centerAltitudeValidForExaggeration=t.exaggeration(),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){void 0!==this._centerAltitudeValidForExaggeration&&(this._seaLevelZoom=this._zoomFromMercatorZ((this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize))}sampleAverageElevation(){if(!this._elevation)return 0;const e=this._elevation,n=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],r=this.horizonLineFromTop();let i=0,o=0;for(let a=0;a<n.length;a++){const s=new t.pointGeometry(n[a][0]*this.width,r+n[a][1]*(this.height-r)),l=e.pointCoordinate(s);if(!l)continue;const c=1/Math.hypot(l[0]-this._camera.position[0],l[1]-this._camera.position[1]);i+=l[3]*c,o+=c}return 0===o?NaN:i/o}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._terrainEnabled()&&("ground"===this.cameraElevationReference?this._updateCameraOnTerrain():this._updateZoomFromElevation()),this._constrain(),this._calcMatrices())}_updateZoomFromElevation(){if(null==this._seaLevelZoom||!this._elevation)return;const t=this._seaLevelZoom,e=this._elevation.getAtPointOrZero(this.locationCoordinate(this.center)),n=this.pixelsPerMeter/this.worldSize*e,r=this._mercatorZfromZoom(t),i=this._mercatorZfromZoom(this._maxZoom),o=Math.max(r-n,i);this._setZoom(this._zoomFromMercatorZ(o))}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}computeZoomRelativeTo(e){const n=this.rayIntersectionCoordinate(this.pointRayIntersection(this.centerPoint,e.toAltitude()));let r;r=e.z<this._camera.position[2]?[n.x,n.y,n.z]:[e.x,e.y,e.z];const i=t.length(t.sub([],this._camera.position,r));return t.clamp(this._zoomFromMercatorZ(i),this._minZoom,this._maxZoom)}setFreeCameraOptions(e){if(!this.height)return;if(!e.position&&!e.orientation)return;this._updateCameraState();let n=!1;if(e.orientation&&!t.exactEquals(e.orientation,this._camera.orientation)&&(n=this._setCameraOrientation(e.orientation)),e.position){const r=[e.position.x,e.position.y,e.position.z];t.exactEquals$1(r,this._camera.position)||(this._setCameraPosition(r),n=!0)}n&&(this._updateStateFromCamera(),this.recenterOnTerrain())}getFreeCameraOptions(){this._updateCameraState();const e=this._camera.position,n=new Ur;return n.position=new t.MercatorCoordinate(e[0],e[1],e[2]),n.orientation=this._camera.orientation,n._elevation=this.elevation,n._renderWorldCopies=this.renderWorldCopies,n}_setCameraOrientation(e){if(!t.length$1(e))return!1;t.normalize$1(e,e);const n=t.transformQuat([],[0,0,-1],e),r=t.transformQuat([],[0,-1,0],e);if(r[2]<0)return!1;const i=Vr(n,r);return!!i&&(this._camera.orientation=i,!0)}_setCameraPosition(e){const n=this.zoomScale(this.minZoom)*this.tileSize,r=this.zoomScale(this.maxZoom)*this.tileSize,i=this.cameraToCenterDistance;e[2]=t.clamp(e[2],i/r,i/n),this._camera.position=e}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}get fovAboveCenter(){return this._fov*(.5+this.centerOffset.y/this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,e,n){this._unmodified=!1,this._edgeInsets.interpolate(t,e,n),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)}getVisibleUnwrappedCoordinates(e){const n=[new t.UnwrappedTileID(0,e)];if(this.renderWorldCopies){const r=this.pointCoordinate(new t.pointGeometry(0,0)),i=this.pointCoordinate(new t.pointGeometry(this.width,0)),o=this.pointCoordinate(new t.pointGeometry(this.width,this.height)),a=this.pointCoordinate(new t.pointGeometry(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),l=Math.floor(Math.max(r.x,i.x,o.x,a.x)),c=1;for(let u=s-c;u<=l+c;u++)0!==u&&n.push(new t.UnwrappedTileID(u,e))}return n}coveringTiles(e){let n=this.coveringZoomLevel(e);const r=n,i=this.elevation&&!e.isTerrainDEM,o="mercator"===this.projection.name;if(void 0!==e.minzoom&&n<e.minzoom)return[];void 0!==e.maxzoom&&n>e.maxzoom&&(n=e.maxzoom);const a=this.locationCoordinate(this.center),s=this.center.lat,l=1<<n,c=[l*a.x,l*a.y,0],u="globe"===this.projection.name,h=!u,d=t.Frustum.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n,h),p=u?this._camera.mercatorPosition:this.pointCoordinate(this.getCameraPoint()),f=l*t.mercatorZfromAltitude(1,this.center.lat),m=this._camera.position[2]/t.mercatorZfromAltitude(1,this.center.lat),g=[l*p.x,l*p.y,m*(h?1:f)],y=this.cameraToCenterDistance/e.tileSize*(e.roundZoom?1:.502),_=this.pitch<=60&&this._edgeInsets.top<=this._edgeInsets.bottom&&!this._elevation&&!this.projection.isReprojectedInTileSpace?n:0,v=e.isTerrainDEM&&this._elevation?1e4*this._elevation.exaggeration():this._centerAltitude,b=e.isTerrainDEM?-v:this._elevation?this._elevation.getMinElevationBelowMSL():0,x=this.projection.isReprojectedInTileSpace?qr(this):1,w=e=>{const n=25e-6,r=new t.MercatorCoordinate(e.x+n,e.y,e.z),i=new t.MercatorCoordinate(e.x,e.y+n,e.z),o=e.toLngLat(),a=r.toLngLat(),s=i.toLngLat(),l=this.locationCoordinate(o),c=this.locationCoordinate(a),u=this.locationCoordinate(s),h=Math.hypot(c.x-l.x,c.y-l.y),d=Math.hypot(u.x-l.x,u.y-l.y);return Math.sqrt(h*d)*x/n},S=e=>{const n=v,r=b;return{aabb:t.tileAABB(this,l,0,0,0,e,r,n,this.projection),zoom:0,x:0,y:0,minZ:r,maxZ:n,wrap:e,fullyVisible:!1}},T=[];let E=[];const C=n,O=e.reparseOverscaled?r:n,P=t=>t*t,k=P((m-this._centerAltitude)*f),A=t=>{if(!this._elevation||!t.tileID||!o)return;const e=this._elevation.getMinMaxForTile(t.tileID),n=t.aabb;e?(n.min[2]=e.min,n.max[2]=e.max,n.center[2]=(n.min[2]+n.max[2])/2):(t.shouldSplit=I(t),t.shouldSplit||(n.min[2]=n.max[2]=n.center[2]=this._centerAltitude))},I=e=>{if(e.zoom<_)return!0;if(e.zoom===C)return!1;if(null!=e.shouldSplit)return e.shouldSplit;const n=e.aabb.distanceX(g),o=e.aabb.distanceY(g);let a=k,l=1;if(u){a=P(e.aabb.distanceZ(g));const n=Math.pow(2,e.zoom),r=t.latFromMercatorY((e.y+1)/n),i=t.latFromMercatorY(e.y/n),o=Math.min(Math.max(s,r),i),c=t.circumferenceAtLatitude(o)/t.circumferenceAtLatitude(s);if(l=o===s?1/Math.max(1,this._mercatorScaleRatio-.3):Math.min(1,c/this._mercatorScaleRatio),this.zoom<=t.GLOBE_ZOOM_THRESHOLD_MIN&&e.zoom===C-1&&c>=.9)return!0}else if(i&&(a=P(e.aabb.distanceZ(g)*f)),this.projection.isReprojectedInTileSpace&&r<=5){const n=Math.pow(2,e.zoom),r=w(new t.MercatorCoordinate((e.x+.5)/n,(e.y+.5)/n));l=r>.85?1:r}const c=n*n+o*o+a,h=P((1<<C-e.zoom)*y*l*((t,e)=>{if(e*P(.707)<t)return 1;const n=Math.sqrt(e/t);return n/(1.4144271570014144+(Math.pow(1.1,n-1.4144271570014144+1)-1)/(1.1-1)-1)})(Math.max(a,k),c));return c<h};if(this.renderWorldCopies)for(let t=1;t<=3;t++)T.push(S(-t)),T.push(S(t));for(T.push(S(0));T.length>0;){const r=T.pop(),a=r.x,s=r.y;let h=r.fullyVisible;if(!h){const t=r.aabb.intersects(d);if(0===t)continue;h=2===t}if(r.zoom!==C&&I(r))for(let e=0;e<4;e++){const n=(a<<1)+e%2,c=(s<<1)+(e>>1),d={aabb:o?r.aabb.quadrant(e):t.tileAABB(this,l,r.zoom+1,n,c,r.wrap,r.minZ,r.maxZ,this.projection),zoom:r.zoom+1,x:n,y:c,wrap:r.wrap,fullyVisible:h,tileID:void 0,shouldSplit:void 0,minZ:r.minZ,maxZ:r.maxZ};i&&!u&&(d.tileID=new t.OverscaledTileID(r.zoom+1===C?O:r.zoom+1,r.wrap,r.zoom+1,n,c),A(d)),T.push(d)}else{const i=r.zoom===C?O:r.zoom;if(e.minzoom&&e.minzoom>i)continue;const o=c[0]-(.5+a+(r.wrap<<r.zoom))*(1<<n-r.zoom),l=c[1]-.5-s,u=r.tileID?r.tileID:new t.OverscaledTileID(i,r.wrap,r.zoom,a,s);E.push({tileID:u,distanceSq:o*o+l*l})}}if(this.fogCullDistSq){const n=this.fogCullDistSq,r=this.horizonLineFromTop();E=E.filter(i=>{const o=[0,0,0,1],a=[t.EXTENT,t.EXTENT,0,1],s=this.calculateFogTileMatrix(i.tileID.toUnwrapped());t.transformMat4$1(o,o,s),t.transformMat4$1(a,a,s);const l=t.getAABBPointSquareDist(o,a);if(0===l)return!0;let c=!1;const u=this._elevation;if(u&&l>n&&0!==r){const n=this.calculateProjMatrix(i.tileID.toUnwrapped());let o;e.isTerrainDEM||(o=u.getMinMaxForTile(i.tileID)),o||(o={min:b,max:v});const a=t.furthestTileCorner(this.rotation),s=[a[0]*t.EXTENT,a[1]*t.EXTENT,o.max];t.transformMat4(s,s,n),c=(1-s[1])*this.height*.5<r}return l<n||c})}return E.sort((t,e)=>t.distanceSq-e.distanceSq).map(t=>t.tileID)}resize(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(e){const n=t.clamp(e.lat,-t.MAX_MERCATOR_LATITUDE,t.MAX_MERCATOR_LATITUDE),r=this.projection.project(e.lng,n);return new t.pointGeometry(r.x*this.worldSize,r.y*this.worldSize)}unproject(t){return this.projection.unproject(t.x/this.worldSize,t.y/this.worldSize)}get point(){return this.project(this.center)}setLocationAtPoint(e,n){let r,i;const o=this.centerPoint;if("globe"===this.projection.name){const t=this.worldSize;r=(n.x-o.x)/t,i=(n.y-o.y)/t}else{const t=this.pointCoordinate(n),e=this.pointCoordinate(o);r=t.x-e.x,i=t.y-e.y}const a=this.locationCoordinate(e);this.setLocation(new t.MercatorCoordinate(a.x-r,a.y-i))}setLocation(t){this.center=this.coordinateLocation(t),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(t){return this.projection.locationPoint(this,t)}locationPoint3D(t){return this.projection.locationPoint(this,t,!0)}pointLocation(t){return this.coordinateLocation(this.pointCoordinate(t))}pointLocation3D(t){return this.coordinateLocation(this.pointCoordinate3D(t))}locationCoordinate(e,n){const r=n?t.mercatorZfromAltitude(n,e.lat):void 0,i=this.projection.project(e.lng,e.lat);return new t.MercatorCoordinate(i.x,i.y,r)}coordinateLocation(t){return this.projection.unproject(t.x,t.y)}pointRayIntersection(e,n){const r=null!=n?n:this._centerAltitude,i=[e.x,e.y,0,1],o=[e.x,e.y,1,1];t.transformMat4$1(i,i,this.pixelMatrixInverse),t.transformMat4$1(o,o,this.pixelMatrixInverse);const a=o[3];t.scale$1(i,i,1/i[3]),t.scale$1(o,o,1/a);const s=i[2],l=o[2];return{p0:i,p1:o,t:s===l?0:(r-s)/(l-s)}}screenPointToMercatorRay(e){const n=[e.x,e.y,0,1],r=[e.x,e.y,1,1];return t.transformMat4$1(n,n,this.pixelMatrixInverse),t.transformMat4$1(r,r,this.pixelMatrixInverse),t.scale$1(n,n,1/n[3]),t.scale$1(r,r,1/r[3]),n[2]=t.mercatorZfromAltitude(n[2],this._center.lat)*this.worldSize,r[2]=t.mercatorZfromAltitude(r[2],this._center.lat)*this.worldSize,t.scale$1(n,n,1/this.worldSize),t.scale$1(r,r,1/this.worldSize),new t.Ray([n[0],n[1],n[2]],t.normalize([],t.sub([],r,n)))}rayIntersectionCoordinate(e){const{p0:n,p1:r,t:i}=e,o=t.mercatorZfromAltitude(n[2],this._center.lat),a=t.mercatorZfromAltitude(r[2],this._center.lat);return new t.MercatorCoordinate(t.number(n[0],r[0],i)/this.worldSize,t.number(n[1],r[1],i)/this.worldSize,t.number(o,a,i))}pointCoordinate(t,e=this._centerAltitude){return this.projection.pointCoordinate(this,t.x,t.y,e)}pointCoordinate3D(e){if(!this.elevation)return this.pointCoordinate(e);let n=this.projection.pointCoordinate3D(this,e.x,e.y);if(n)return new t.MercatorCoordinate(n[0],n[1],n[2]);let r=0,i=this.horizonLineFromTop();if(e.y>i)return this.pointCoordinate(e);const o=.02*i,a=e.clone();for(let s=0;s<10&&i-r>o;s++){a.y=t.number(r,i,.66);const e=this.projection.pointCoordinate3D(this,a.x,a.y);e?(i=a.y,n=e):r=a.y}return n?new t.MercatorCoordinate(n[0],n[1],n[2]):this.pointCoordinate(e)}isPointAboveHorizon(t){return this.projection.isPointAboveHorizon(this,t)}_coordinatePoint(e,n){const r=n&&this.elevation?this.elevation.getAtPointOrZero(e,this._centerAltitude):this._centerAltitude,i=[e.x*this.worldSize,e.y*this.worldSize,r+e.toAltitude(),1];return t.transformMat4$1(i,i,this.pixelMatrix),i[3]>0?new t.pointGeometry(i[0]/i[3],i[1]/i[3]):new t.pointGeometry(Number.MAX_VALUE,Number.MAX_VALUE)}_getGlobeBounds(){const{top:e,left:n}=this._edgeInsets,r=this.height-this._edgeInsets.bottom,i=this.width-this._edgeInsets.right,o=this.pointCoordinate3D(new t.pointGeometry(n,e)),a=this.pointCoordinate3D(new t.pointGeometry(i,e)),s=this.pointCoordinate3D(new t.pointGeometry(i,r)),l=this.pointCoordinate3D(new t.pointGeometry(n,r));let c=Math.min(o.x,l.x),u=Math.max(a.x,s.x),h=Math.min(o.y,a.y),d=Math.max(l.y,s.y);const p=Math.pow(2,-this.zoom)/16,f=(e,n,r,i)=>{const o=(e+r)/2,a=(n+i)/2,s=new t.pointGeometry(o,a),l=this.pointCoordinate3D(s),m=Math.max(0,c-l.x,h-l.y,l.x-u,l.y-d);c=Math.min(c,l.x),u=Math.max(u,l.x),h=Math.min(h,l.y),d=Math.max(d,l.y),m>p&&(f(e,n,o,a),f(o,a,r,i))};f(n,e,i,e),f(i,e,i,r),f(i,r,n,r),f(n,r,n,e);const m=new t.LngLat(t.lngFromMercatorX(u),t.latFromMercatorY(h)),g=new t.LngLat(t.lngFromMercatorX(c),t.latFromMercatorY(d));return new t.LngLatBounds(g,m)}_getBounds(e,n){if("globe"===this.projection.name)return this._getGlobeBounds();const r=new t.pointGeometry(this._edgeInsets.left,this._edgeInsets.top),i=new t.pointGeometry(this.width-this._edgeInsets.right,this._edgeInsets.top),o=new t.pointGeometry(this.width-this._edgeInsets.right,this.height-this._edgeInsets.bottom),a=new t.pointGeometry(this._edgeInsets.left,this.height-this._edgeInsets.bottom);let s=this.pointCoordinate(r,e),l=this.pointCoordinate(i,e);const c=this.pointCoordinate(o,n),u=this.pointCoordinate(a,n),h=(t,e)=>(e.y-t.y)/(e.x-t.x);return s.y>1&&l.y>=0?s=new t.MercatorCoordinate((1-u.y)/h(u,s)+u.x,1):s.y<0&&l.y<=1&&(s=new t.MercatorCoordinate(-u.y/h(u,s)+u.x,0)),l.y>1&&s.y>=0?l=new t.MercatorCoordinate((1-c.y)/h(c,l)+c.x,1):l.y<0&&s.y<=1&&(l=new t.MercatorCoordinate(-c.y/h(c,l)+c.x,0)),(new t.LngLatBounds).extend(this.coordinateLocation(s)).extend(this.coordinateLocation(l)).extend(this.coordinateLocation(u)).extend(this.coordinateLocation(c))}_getBounds3D(){const t=this.elevation;if(!t.visibleDemTiles.length||t.isUsingMockSource())return this._getBounds(0,0);const e=t.visibleDemTiles.reduce((t,e)=>{if(e.dem){const n=e.dem.tree;t.min=Math.min(t.min,n.minimums[0]),t.max=Math.max(t.max,n.maximums[0])}return t},{min:Number.MAX_VALUE,max:0});return this._getBounds(e.min*t.exaggeration(),e.max*t.exaggeration())}getBounds(){return this._terrainEnabled()?this._getBounds3D():this._getBounds(0,0)}horizonLineFromTop(t=!0){const e=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,n=this.height/2-e*(1-this._horizonShift);return t?Math.max(0,n):n}getMaxBounds(){return this.maxBounds}setMaxBounds(e){this.maxBounds=e,this.minLat=-t.MAX_MERCATOR_LATITUDE,this.maxLat=t.MAX_MERCATOR_LATITUDE,this.minLng=-180,this.maxLng=180,e&&(this.minLat=e.getSouth(),this.maxLat=e.getNorth(),this.minLng=e.getWest(),this.maxLng=e.getEast(),this.maxLng<this.minLng&&(this.maxLng+=360)),this.worldMinX=t.mercatorXfromLng(this.minLng)*this.tileSize,this.worldMaxX=t.mercatorXfromLng(this.maxLng)*this.tileSize,this.worldMinY=t.mercatorYfromLat(this.maxLat)*this.tileSize,this.worldMaxY=t.mercatorYfromLat(this.minLat)*this.tileSize,this._constrain()}calculatePosMatrix(t,e){return this.projection.createTileMatrix(this,e,t)}calculateDistanceTileData(e){const n=e.key,r=this._distanceTileDataCache;if(r[n])return r[n];const i=e.canonical,o=1/this.height,a=this.cameraWorldSize/this.zoomScale(i.z),s=(i.x+Math.pow(2,i.z)*e.wrap)*a,l=i.y*a,c=this.point,u=this.angle,h=Math.sin(-u),d=-Math.cos(-u);return r[n]={bearing:[h,d],center:[(c.x-s)*o,(c.y-l)*o],scale:a/t.EXTENT*o},r[n]}calculateFogTileMatrix(e){const n=e.key,r=this._fogTileMatrixCache;if(r[n])return r[n];const i=this.projection.createTileMatrix(this,this.cameraWorldSize,e);return t.multiply(i,this.worldToFogMatrix,i),r[n]=new Float32Array(i),r[n]}calculateProjMatrix(e,n=!1){const r=e.key,i=n?this._alignedProjMatrixCache:this._projMatrixCache;if(i[r])return i[r];const o=this.calculatePosMatrix(e,this.worldSize);return t.multiply(o,this.projection.isReprojectedInTileSpace?this.mercatorMatrix:n?this.alignedProjMatrix:this.projMatrix,o),i[r]=new Float32Array(o),i[r]}calculatePixelsToTileUnitsMatrix(e){const n=e.tileID.key,r=this._pixelsToTileUnitsCache;if(r[n])return r[n];const i=function(e,n){const{scale:r}=e.tileTransform,i=r*t.EXTENT/(e.tileSize*Math.pow(2,n.zoom-e.tileID.overscaledZ+e.tileID.canonical.z));return o=new Float32Array(4),l=(a=n.inverseAdjustmentMatrix)[1],c=a[2],u=a[3],d=(s=[i,i])[1],o[0]=a[0]*(h=s[0]),o[1]=l*h,o[2]=c*d,o[3]=u*d,o;var o,a,s,l,c,u,h,d}(e,this);return r[n]=i,r[n]}customLayerMatrix(){return this.mercatorMatrix.slice()}recenterOnTerrain(){if(!this._elevation||"globe"===this.projection.name)return;const e=this._elevation;this._updateCameraState();const n=t.mercatorZfromAltitude(1,this._center.lat)*this.worldSize,r=this._computeCameraPosition(n),i=this._camera.forward(),o=t.mercatorZfromAltitude(1,this._center.lat);r[2]/=o,i[2]/=o,t.normalize(i,i);const a=e.raycast(r,i,e.exaggeration());if(a){const e=t.scaleAndAdd([],r,i,a),n=new t.MercatorCoordinate(e[0],e[1],t.mercatorZfromAltitude(e[2],t.latFromMercatorY(e[1]))),s=(n.z+t.length([n.x-r[0],n.y-r[1],n.z-r[2]*o]))*this._pixelsPerMercatorPixel;this._seaLevelZoom=this._zoomFromMercatorZ(s),this._centerAltitude=n.toAltitude(),this._center=this.coordinateLocation(n),this._updateZoomFromElevation(),this._constrain(),this._calcMatrices()}}_constrainCameraAltitude(){if(!this._elevation)return;const e=this._elevation;this._updateCameraState();const n=t.mercatorZfromAltitude(1,this._center.lat)*this.worldSize,r=this._computeCameraPosition(n),i=e.getAtPointOrZero(new t.MercatorCoordinate(...r)),o=this._minimumHeightOverTerrain()*Math.cos(t.degToRad(this._maxPitch)),a=this._camera.position[2]-this.pixelsPerMeter/this.worldSize*i;if(a<o){const e=this.locationCoordinate(this._center,this._centerAltitude),n=[e.x-r[0],e.y-r[1],e.z-r[2]],i=t.length(n);n[2]-=(o-a)/this._pixelsPerMercatorPixel;const s=t.length(n);if(0===s)return;t.scale$2(n,n,i/s*this._pixelsPerMercatorPixel),this._camera.position=[e.x-n[0],e.y-n[1],e.z*this._pixelsPerMercatorPixel-n[2]],this._camera.orientation=Vr(n,this._camera.up()),this._updateStateFromCamera()}}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const e="globe"===this.projection.name||this.mercatorFromTransition;if(this.projection.isReprojectedInTileSpace||e){const n=this.center;return n.lat=t.clamp(n.lat,this.minLat,this.maxLat),(this.maxBounds||!this.renderWorldCopies&&!e)&&(n.lng=t.clamp(n.lng,this.minLng,this.maxLng)),this.center=n,void(this._constraining=!1)}const n=this._unmodified,{x:r,y:i}=this.point;let o=0,a=r,s=i;const l=this.width/2,c=this.height/2,u=this.worldMinY*this.scale,h=this.worldMaxY*this.scale;if(i-c<u&&(s=u+c),i+c>h&&(s=h-c),h-u<this.height&&(o=Math.max(o,this.height/(h-u)),s=(h+u)/2),this.maxBounds||!this._renderWorldCopies||!this.projection.wrap){const t=this.worldMinX*this.scale,e=this.worldMaxX*this.scale,n=this.worldSize/2-(t+e)/2;a=(r+n+this.worldSize)%this.worldSize-n,a-l<t&&(a=t+l),a+l>e&&(a=e-l),e-t<this.width&&(o=Math.max(o,this.width/(e-t)),a=(e+t)/2)}a===r&&s===i||(this.center=this.unproject(new t.pointGeometry(a,s))),o&&(this.zoom+=this.scaleZoom(o)),this._constrainCameraAltitude(),this._unmodified=n,this._constraining=!1}_minZoomForBounds(){let t=Math.max(0,this.scaleZoom(this.height/(this.worldMaxY-this.worldMinY)));return this.maxBounds&&(t=Math.max(t,this.scaleZoom(this.width/(this.worldMaxX-this.worldMinX)))),t}_maxCameraBoundsDistance(){return this._mercatorZfromZoom(this._minZoomForBounds())}_calcMatrices(){if(!this.height)return;const e=this.centerOffset,n=this.pixelsPerMeter;"globe"===this.projection.name&&(this._mercatorScaleRatio=t.mercatorZfromAltitude(1,this.center.lat)/t.mercatorZfromAltitude(1,t.GLOBE_SCALE_MATCH_LATITUDE));const r=Wr(this.projection,this.zoom,this.width,this.height,1024);this._pixelsPerMercatorPixel=this.projection.pixelSpaceConversion(this.center.lat,this.worldSize,r),this.cameraToCenterDistance=.5/Math.tan(.5*this._fov)*this.height*this._pixelsPerMercatorPixel,this._updateCameraState(),this._farZ=this.projection.farthestPixelDistance(this),this._nearZ=this.height/50;const i=this._camera.getWorldToCamera(this.worldSize,"meters"===this.projection.zAxisUnit?n:1),o=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,this._farZ);o[8]=2*-e.x/this.width,o[9]=2*e.y/this.height;let a=t.mul([],o,i);if(this.projection.isReprojectedInTileSpace){const e=this.locationCoordinate(this.center),n=t.identity([]);t.translate(n,n,[e.x*this.worldSize,e.y*this.worldSize,0]),t.multiply(n,n,Hr(this)),t.translate(n,n,[-e.x*this.worldSize,-e.y*this.worldSize,0]),t.multiply(a,a,n),this.inverseAdjustmentMatrix=function(t){const e=Hr(t,!0);return _([],[e[0],e[1],e[4],e[5]])}(this)}else this.inverseAdjustmentMatrix=[1,0,0,1];this.mercatorMatrix=t.scale([],a,[this.worldSize,this.worldSize,this.worldSize/n,1]),this.projMatrix=a,this.invProjMatrix=t.invert(new Float64Array(16),this.projMatrix);const s=t.invert([],o);this.frustumCorners=t.FrustumCorners.fromInvProjectionMatrix(s,this.horizonLineFromTop(),this.height);const l=new Float32Array(16);t.identity(l),t.scale(l,l,[1,-1,1]),t.rotateX(l,l,this._pitch),t.rotateZ(l,l,this.angle);const c=t.perspective(new Float32Array(16),this._fov,this.width/this.height,this._nearZ,this._farZ),u=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;c[8]=2*-e.x/this.width,c[9]=2*(e.y+u)/this.height,this.skyboxMatrix=t.multiply(l,c,l);const h=this.point,d=h.x,p=h.y,f=this.width%2/2,m=this.height%2/2,g=Math.cos(this.angle),y=Math.sin(this.angle),v=d-Math.round(d)+g*f+y*m,b=p-Math.round(p)+g*m+y*f,x=new Float64Array(a);if(t.translate(x,x,[v>.5?v-1:v,b>.5?b-1:b,0]),this.alignedProjMatrix=x,a=t.create(),t.scale(a,a,[this.width/2,-this.height/2,1]),t.translate(a,a,[1,-1,0]),this.labelPlaneMatrix=a,a=t.create(),t.scale(a,a,[1,-1,1]),t.translate(a,a,[-1,-1,0]),t.scale(a,a,[2/this.width,2/this.height,1]),this.glCoordMatrix=a,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),this._distanceTileDataCache={},a=t.invert(new Float64Array(16),this.pixelMatrix),!a)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=a,"globe"===this.projection.name||this.mercatorFromTransition){this.globeMatrix=t.calculateGlobeMatrix(this);const e=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=t.transformMat4(e,e,i),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=a;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const e=this.cameraWorldSize,n=this.cameraPixelsPerMeter,r=this._camera.position,i=1/this.height/this._pixelsPerMercatorPixel,o=[e,e,n];t.scale$2(o,o,i),t.scale$2(r,r,-1),t.multiply$2(r,r,o);const a=t.create();t.translate(a,a,r),t.scale(a,a,o),this.mercatorFogMatrix=a,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(e,n,i)}_computeCameraPosition(t){const e=(t=t||this.pixelsPerMeter)/this.pixelsPerMeter,n=this._camera.forward(),r=this.point,i=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*e-t/this.worldSize*this._centerAltitude;return[r.x/this.worldSize-n[0]*i,r.y/this.worldSize-n[1]*i,t/this.worldSize*this._centerAltitude-n[2]*i]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(e){const n=this._maxCameraBoundsDistance()*Math.cos(this._pitch),r=this._camera.position[2],i=e[2];let o=1;this.projection.wrap&&(this.center=this.center.wrap()),i>0&&(o=Math.min((n-r)/i,1)),this._camera.position=t.scaleAndAdd([],this._camera.position,e,o),this._updateStateFromCamera()}_updateStateFromCamera(){const e=this._camera.position,n=this._camera.forward(),{pitch:r,bearing:i}=this._camera.getPitchBearing(),o=t.mercatorZfromAltitude(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,a=this._mercatorZfromZoom(this._maxZoom)*Math.cos(t.degToRad(this._maxPitch)),s=Math.max((e[2]-o)/Math.cos(r),a),l=this._zoomFromMercatorZ(s);t.scaleAndAdd(e,e,n,s),this._pitch=t.clamp(r,t.degToRad(this.minPitch),t.degToRad(this.maxPitch)),this.angle=t.wrap(i,-Math.PI,Math.PI),this._setZoom(t.clamp(l,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new t.MercatorCoordinate(e[0],e[1],e[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(t){return Math.pow(2,t)*this.tileSize}_mercatorZfromZoom(t){return this.cameraToCenterDistance/this._worldSizeFromZoom(t)}_minimumHeightOverTerrain(){const t=Math.min((null!=this._seaLevelZoom?this._seaLevelZoom:this._zoom)+2,this._maxZoom);return this._mercatorZfromZoom(t)}_zoomFromMercatorZ(t){return this.scaleZoom(this.cameraToCenterDistance/(t*this.tileSize))}zoomFromMercatorZAdjusted(t){const e=e=>{const n=this.getCameraToCenterDistance(this.projection,e);return this.scaleZoom(n/(t*this.tileSize))};let n,r=e(this.zoom),i=Math.abs(r-e(r));for(;n!==i;)r=e(r),n=i,i=Math.abs(r-e(r));return r}_terrainEnabled(){return!(!this._elevation||!this.projection.supportsTerrain&&(t.warnOnce("Terrain is not yet supported with alternate projections. Use mercator or globe to enable terrain."),1))}anyCornerOffEdge(e,n){const 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);if(o<this.horizonLineFromTop(!1))return!0;if("mercator"!==this.projection.name)return!1;const s=[new t.pointGeometry(r,o),new t.pointGeometry(i,a),new t.pointGeometry(r,a),new t.pointGeometry(i,o)],l=this.renderWorldCopies?-3:0,c=this.renderWorldCopies?4:1;for(const t of s){const e=this.pointRayIntersection(t);if(e.t<0)return!0;const n=this.rayIntersectionCoordinate(e);if(n.x<l||n.y<0||n.x>c||n.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+t.radToDeg(this.fovAboveCenter)>88||this.anyCornerOffEdge(new t.pointGeometry(0,0),new t.pointGeometry(this.width,this.height))}zoomDeltaToMovement(e,n){const r=t.length(t.sub([],this._camera.position,e)),i=this._zoomFromMercatorZ(r)+n;return r-this._mercatorZfromZoom(i)}getCameraPoint(){if("globe"===this.projection.name){const e=function(e,n){const r=[e[0],e[1],e[2],1];t.transformMat4$1(r,r,n);const i=Math.max(r[3],1e-6);return[r[0]/i,r[1]/i,r[2]/i,i]}([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new t.pointGeometry(e[0],e[1])}{const e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.pointGeometry(0,e))}}getCameraToCenterDistance(t,e=this.zoom){const n=Wr(t,e,this.width,this.height,1024),r=t.pixelSpaceConversion(this.center.lat,this.worldSize,n);return.5/Math.tan(.5*this._fov)*this.height*r}getWorldToCameraMatrix(){const e=this._camera.getWorldToCamera(this.worldSize,"meters"===this.projection.zAxisUnit?this.pixelsPerMeter:1);return"globe"===this.projection.name&&t.multiply(e,e,this.globeMatrix),e}}function Jr(t,e){let n=!1,r=null;const i=()=>{r=null,n&&(t(),r=setTimeout(i,e),n=!1)};return()=>(n=!0,r||i(),r)}class Qr{constructor(e){this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Jr(this._updateHashUnthrottled.bind(this),300)}addTo(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),e.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),t.window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const e=this._map;if(!e)return"";const n=ti(e);if(this._hashName){const e=this._hashName;let r=!1;const i=t.window.location.hash.slice(1).split("&").map(t=>{const i=t.split("=")[0];return i===e?(r=!0,`${i}=${n}`):t}).filter(t=>t);return r||i.push(`${e}=${n}`),`#${i.join("&")}`}return`#${n}`}_getCurrentHash(){const e=t.window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map(t=>t.split("=")).forEach(e=>{e[0]===this._hashName&&(t=e)}),(t&&t[1]||"").split("/")}return e.split("/")}_onHashChange(){const t=this._map;if(!t)return!1;const e=this._getCurrentHash();if(e.length>=3&&!e.some(t=>isNaN(t))){const n=t.dragRotate.isEnabled()&&t.touchZoomRotate.isEnabled()?+(e[3]||0):t.getBearing();return t.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:n,pitch:+(e[4]||0)}),!0}return!1}_updateHashUnthrottled(){const e=t.window.location.href.replace(/(#.+)?$/,this.getHashString());t.window.history.replaceState(t.window.history.state,null,e)}}function ti(t,e){const n=t.getCenter(),r=Math.round(100*t.getZoom())/100,i=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,i),a=Math.round(n.lng*o)/o,s=Math.round(n.lat*o)/o,l=t.getBearing(),c=t.getPitch();let u=e?`/${a}/${s}/${r}`:`${r}/${s}/${a}`;return(l||c)&&(u+="/"+Math.round(10*l)/10),c&&(u+=`/${Math.round(c)}`),u}const ei={linearity:.3,easing:t.bezier(0,0,.3,1)},ni=t.extend({deceleration:2500,maxSpeed:1400},ei),ri=t.extend({deceleration:20,maxSpeed:1400},ei),ii=t.extend({deceleration:1e3,maxSpeed:360},ei),oi=t.extend({deceleration:1e3,maxSpeed:90},ei);class ai{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.exported.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,n=t.exported.now();for(;e.length>0&&n-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new t.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:t}of this._inertiaBuffer)n.zoom+=t.zoomDelta||0,n.bearing+=t.bearingDelta||0,n.pitch+=t.pitchDelta||0,t.panDelta&&n.pan._add(t.panDelta),t.around&&(n.around=t.around),t.pinchAround&&(n.pinchAround=t.pinchAround);const r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(n.pan.mag()){const o=li(n.pan.mag(),r,t.extend({},ni,e||{}));i.offset=n.pan.mult(o.amount/n.pan.mag()),i.center=this._map.transform.center,si(i,o)}if(n.zoom){const t=li(n.zoom,r,ri);i.zoom=this._map.transform.zoom+t.amount,si(i,t)}if(n.bearing){const e=li(n.bearing,r,ii);i.bearing=this._map.transform.bearing+t.clamp(e.amount,-179,179),si(i,e)}if(n.pitch){const t=li(n.pitch,r,oi);i.pitch=this._map.transform.pitch+t.amount,si(i,t)}if(i.zoom||i.bearing){const t=void 0===n.pinchAround?n.around:n.pinchAround;i.around=t?this._map.unproject(t):this._map.getCenter()}return this.clear(),i.noMoveStart=!0,i}}function si(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function li(e,n,r){const{maxSpeed:i,linearity:o,deceleration:a}=r,s=t.clamp(e*o/(n/1e3),-i,i),l=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*l,amount:s*(l/2)}}class ci extends t.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,n,r,i={}){const o=f(n.getCanvasContainer(),r),a=n.unproject(o);super(e,t.extend({point:o,lngLat:a,originalEvent:r},i)),this._defaultPrevented=!1,this.target=n}}class ui extends t.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,n,r){const i="touchend"===e?r.changedTouches:r.touches,o=m(n.getCanvasContainer(),i),a=o.map(t=>n.unproject(t)),s=o.reduce((t,e,n,r)=>t.add(e.div(r.length)),new t.pointGeometry(0,0));super(e,{points:o,point:s,lngLats:a,lngLat:n.unproject(s),originalEvent:r}),this._defaultPrevented=!1}}class hi extends t.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,e,n){super(t,{originalEvent:n}),this._defaultPrevented=!1}}class di{constructor(t,e){this._map=t,this._clickTolerance=e.clickTolerance}reset(){this._mousedownPos=void 0}wheel(t){return this._firePreventable(new hi(t.type,this._map,t))}mousedown(t,e){return this._mousedownPos=e,this._firePreventable(new ci(t.type,this._map,t))}mouseup(t){this._map.fire(new ci(t.type,this._map,t))}preclick(e){const n=t.extend({},e);n.type="preclick",this._map.fire(new ci(n.type,this._map,n))}click(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||(this.preclick(t),this._map.fire(new ci(t.type,this._map,t)))}dblclick(t){return this._firePreventable(new ci(t.type,this._map,t))}mouseover(t){this._map.fire(new ci(t.type,this._map,t))}mouseout(t){this._map.fire(new ci(t.type,this._map,t))}touchstart(t){return this._firePreventable(new ui(t.type,this._map,t))}touchmove(t){this._map.fire(new ui(t.type,this._map,t))}touchend(t){this._map.fire(new ui(t.type,this._map,t))}touchcancel(t){this._map.fire(new ui(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class pi{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(t){this._map.fire(new ci(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ci("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new ci(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class fi{constructor(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(u(),this._startPos=this._lastPos=e,this._active=!0)}mousemoveWindow(t,e){if(!this._active)return;const n=e,r=this._startPos,i=this._lastPos;if(!r||!i||i.equals(n)||!this._box&&n.dist(r)<this._clickTolerance)return;this._lastPos=n,this._box||(this._box=o("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));const a=Math.min(r.x,n.x),s=Math.max(r.x,n.x),l=Math.min(r.y,n.y),c=Math.max(r.y,n.y);this._map._requestDomTask(()=>{this._box&&(this._box.style.transform=`translate(${a}px,${l}px)`,this._box.style.width=s-a+"px",this._box.style.height=c-l+"px")})}mouseupWindow(e,n){if(!this._active)return;const r=this._startPos,i=n;if(r&&0===e.button){if(this.reset(),p(),r.x!==i.x||r.y!==i.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:t=>t.fitScreenCoordinates(r,i,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",e)}}keydown(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),h(),delete this._startPos,delete this._lastPos}_fireEvent(e,n){return this._map.fire(new t.Event(e,{originalEvent:n}))}}function mi(t,e){const n={};for(let r=0;r<t.length;r++)n[t[r].identifier]=e[r];return n}class gi{constructor(t){this.reset(),this.numTouches=t.numTouches}reset(){this.centroid=void 0,this.startTime=0,this.touches={},this.aborted=!1}touchstart(e,n,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){const n=new t.pointGeometry(0,0);for(const t of e)n._add(t);return n.div(e.length)}(n),this.touches=mi(r,n)))}touchmove(t,e,n){if(this.aborted||!this.centroid)return;const r=mi(n,e);for(const i in this.touches){const t=this.touches[i],e=r[i];(!e||e.dist(t)>30)&&(this.aborted=!0)}}touchend(t,e,n){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){const t=!this.aborted&&this.centroid;if(this.reset(),t)return t}}}class yi{constructor(t){this.singleTap=new gi(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(t,e,n){this.singleTap.touchstart(t,e,n)}touchmove(t,e,n){this.singleTap.touchmove(t,e,n)}touchend(t,e,n){const r=this.singleTap.touchend(t,e,n);if(r){const e=t.timeStamp-this.lastTime<500,n=!this.lastTap||this.lastTap.dist(r)<30;if(e&&n||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}class _i{constructor(){this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,e,n){this._zoomIn.touchstart(t,e,n),this._zoomOut.touchstart(t,e,n)}touchmove(t,e,n){this._zoomIn.touchmove(t,e,n),this._zoomOut.touchmove(t,e,n)}touchend(t,e,n){const r=this._zoomIn.touchend(t,e,n),i=this._zoomOut.touchend(t,e,n);return r?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:e=>e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(r)},{originalEvent:t})}):i?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:e=>e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(i)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const vi={0:1,2:2};class bi{constructor(t){this.reset(),this._clickTolerance=t.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(t,e){return!1}_move(t,e){return{}}mousedown(t,e){if(this._lastPoint)return;const n=g(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}mousemoveWindow(t,e){const n=this._lastPoint;if(n)if(t.preventDefault(),null!=this._eventButton&&function(t,e){const n=vi[e];return void 0===t.buttons||(t.buttons&n)!==n}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(n,e)}mouseupWindow(t){this._lastPoint&&g(t)===this._eventButton&&(this._moved&&p(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xi extends bi{mousedown(t,e){super.mousedown(t,e),this._lastPoint&&(this._active=!0)}_correctButton(t,e){return 0===e&&!t.ctrlKey}_move(t,e){return{around:e,panDelta:e.sub(t)}}}class wi extends bi{_correctButton(t,e){return 0===e&&t.ctrlKey||2===e}_move(t,e){const n=.8*(e.x-t.x);if(n)return this._active=!0,{bearingDelta:n}}contextmenu(t){t.preventDefault()}}class Si extends bi{_correctButton(t,e){return 0===e&&t.ctrlKey||2===e}
vendor: 4,546 bytes, line 46
46_move(t,e){const n=-.5*(e.y-t.y);if(n)return this._active=!0,{pitchDelta:n}}contextmenu(t){t.preventDefault()}}class Ti{constructor(e,n){this._map=e,this._el=e.getCanvasContainer(),this._minTouches=1,this._clickTolerance=n.clickTolerance||1,this.reset(),t.bindAll(["_addTouchPanBlocker","_showTouchPanBlockerAlert"],this)}reset(){this._active=!1,this._touches={},this._sum=new t.pointGeometry(0,0)}touchstart(t,e,n){return this._calculateTransform(t,e,n)}touchmove(e,n,r){if(this._active&&!(r.length<this._minTouches)){if(this._map._cooperativeGestures&&!this._map.isMoving()){if(1===r.length&&!t.isFullscreen())return void this._showTouchPanBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}return e.cancelable&&e.preventDefault(),this._calculateTransform(e,n,r)}}touchend(t,e,n){this._calculateTransform(t,e,n),this._active&&n.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,n,r){r.length>0&&(this._active=!0);const i=mi(r,n),o=new t.pointGeometry(0,0),a=new t.pointGeometry(0,0);let s=0;for(const t in i){const e=i[t],n=this._touches[t];n&&(o._add(e),a._add(e.sub(n)),s++,i[t]=e)}if(this._touches=i,s<this._minTouches||!a.mag())return;const l=a.div(s);return this._sum._add(l),this._sum.mag()<this._clickTolerance?void 0:{around:o.div(s),panDelta:l}}enable(){this._enabled=!0,this._map._cooperativeGestures&&(this._addTouchPanBlocker(),this._el.classList.add("mapboxgl-touch-pan-blocker-override","mapboxgl-scrollable-page"))}disable(){this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove(),this._el.classList.remove("mapboxgl-touch-pan-blocker-override","mapboxgl-scrollable-page")),this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}_addTouchPanBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=o("div","mapboxgl-touch-pan-blocker",this._map._container),this._alertContainer.textContent=this._map._getUIString("TouchPanBlocker.Message"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showTouchPanBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")},500)}}class Ei{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(t){}_move(t,e,n){return{}}touchstart(t,e,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([e[0],e[1]]))}touchmove(t,e,n){const r=this._firstTwoTouches;if(!r)return;t.preventDefault();const[i,o]=r,a=Ci(n,e,i),s=Ci(n,e,o);if(!a||!s)return;const l=this._aroundCenter?null:a.add(s).div(2);return this._move([a,s],l,t)}touchend(t,e,n){if(!this._firstTwoTouches)return;const[r,i]=this._firstTwoTouches,o=Ci(n,e,r),a=Ci(n,e,i);o&&a||(this._active&&p(),this.reset())}touchcancel(){this.reset()}enable(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Ci(t,e,n){for(let r=0;r<t.length;r++)if(t[r].identifier===n)return e[r]}function Oi(t,e){return Math.log(t/e)/Math.LN2}class Pi extends Ei{reset(){super.reset(),this._distance=0,this._startDistance=0}_start(t){this._startDistance=this._distance=t[0].dist(t[1])}_move(t,e){const n=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(Oi(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Oi(this._distance,n),pinchAround:e}}}function ki(t,e){return 180*t.angleWith(e)/Math.PI}class Ai extends Ei{reset(){super.reset(),this._minDiameter=0,this._startVector=void 0,this._vector=void 0}_start(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])}_move(t,e){const n=this._vector;if(this._vector=t[0].sub(t[1]),n&&(this._active||!this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:ki(this._vector,n),pinchAround:e}}_isBelowThreshold(t){this._minDiameter=Math.min(this._minDiameter,t.mag());const e=25/(Math.PI*this._minDiameter)*360,n=this._startVector;if(!n)return!1;const r=ki(t,n);return Math.abs(r)<e}}function Ii(t){return Math.abs(t.y)>Math.abs(t.x)}
vendor: 18,762 bytes, line 46
46class Mi extends Ei{constructor(t){super(),this._map=t}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(t){this._lastPoints=t,Ii(t[0].sub(t[1]))&&(this._valid=!1)}_move(e,n,r){const i=this._lastPoints;if(!i)return;const o=e[0].sub(i[0]),a=e[1].sub(i[1]);return this._map._cooperativeGestures&&!t.isFullscreen()&&r.touches.length<3||(this._valid=this.gestureBeginsVertically(o,a,r.timeStamp),!this._valid)?void 0:(this._lastPoints=e,this._active=!0,{pitchDelta:(o.y+a.y)/2*-.5})}gestureBeginsVertically(t,e,n){if(void 0!==this._valid)return this._valid;const r=t.mag()>=2,i=e.mag()>=2;if(!r&&!i)return;if(!r||!i)return null==this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;const o=t.y>0==e.y>0;return Ii(t)&&Ii(e)&&o}}const Di={panStep:100,bearingStep:15,pitchStep:10};class Bi{constructor(){const t=Di;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let 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:(t.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,r=0),{cameraAnimation:a=>{const s=a.getZoom();a.easeTo({duration:300,easeId:"keyboardHandler",easing:zi,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+n*this._bearingStep,pitch:a.getPitch()+r*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:a.getCenter()},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function zi(t){return t*(2-t)}const Li=4.000244140625;class Ri{constructor(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,t.bindAll(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around,this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(e){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(e.ctrlKey||e.metaKey||this.isZooming()||t.isFullscreen()))return void this._showBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let n=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const r=t.exported.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%Li==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._active||this._start(e)),e.preventDefault()}_onTimeout(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)}_start(t){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const e=f(this._el,t);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:e,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const e=this._map.transform;"wheel"===this._type&&e.projection.wrap&&(e._center.lng>=180||e._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const n=()=>e._terrainEnabled()&&this._aroundCoord?e.computeZoomRelativeTo(this._aroundCoord):e.zoom;if(0!==this._delta){const t="wheel"===this._type&&Math.abs(this._delta)>Li?this._wheelZoomRate:this._defaultZoomRate;let r=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==r&&(r=1/r);const i=n(),o=Math.pow(2,i),a="number"==typeof this._targetZoom?e.zoomScale(this._targetZoom):o;this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(a*r))),"wheel"===this._type&&(this._startZoom=i,this._easing=this._smoothOutEasing(200)),this._delta=0}const r="number"==typeof this._targetZoom?this._targetZoom:n(),i=this._startZoom,o=this._easing;let a,s=!1;if("wheel"===this._type&&i&&o){const e=Math.min((t.exported.now()-this._lastWheelEventTime)/200,1),n=o(e);a=t.number(i,r,n),e<1?this._frameId||(this._frameId=!0):s=!0}else a=r,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:a-n(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let n=t.ease;if(this._prevEase){const e=this._prevEase,r=(t.exported.now()-e.start)/e.duration,i=e.easing(r+.01)-e.easing(r),o=.27/Math.sqrt(i*i+1e-4)*.01,a=Math.sqrt(.0729-o*o);n=t.bezier(o,a,.25,1)}return this._prevEase={start:t.exported.now(),duration:e,easing:n},n}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=o("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(t.window.navigator.userAgent)?this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")},200)}}class ji{constructor(t,e){this._clickZoom=t,this._tapZoom=e}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Fi{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(t,e){return t.preventDefault(),{cameraAnimation:n=>{n.easeTo({duration:300,zoom:n.getZoom()+(t.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ni{constructor(){this._tap=new yi({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(t,e,n){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(t,e,n))}touchmove(t,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;const r=e[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,n)}touchend(t,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(t,e,n)&&(this._tapTime=t.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class $i{constructor(t,e,n){this._el=t,this._mousePan=e,this._touchPan=n}enable(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Vi{constructor(t,e,n){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Ui{constructor(t,e,n,r){this._el=t,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Gi=t=>t.zoom||t.drag||t.pitch||t.rotate;class Hi extends t.Event{}class qi{constructor(){this.constants=[1,1,.01],this.radius=0}setup(e,n){const r=t.sub([],n,e);this.radius=t.length(r[2]<0?t.div([],r,this.constants):[r[0],r[1],0])}projectRay(e){t.div(e,e,this.constants),t.normalize(e,e),t.mul$1(e,e,this.constants);const n=t.scale$2([],e,this.radius);if(n[2]>0){const e=t.scale$2([],[0,0,1],t.dot(n,[0,0,1])),r=t.scale$2([],t.normalize([],[n[0],n[1],0]),this.radius),i=t.add([],n,t.scale$2([],t.sub([],t.add([],r,e),n),2));n[0]=i[0],n[1]=i[1]}return n}}function Wi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}class Zi{constructor(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ai(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new qi,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll(["handleEvent","handleWindowEvent"],this);const r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[t.window,"blur",void 0]];for(const[i,o,a]of this._listeners)i.addEventListener(o,i===t.window.document?this.handleWindowEvent:this.handleEvent,a)}destroy(){for(const[e,n,r]of this._listeners)e.removeEventListener(n,e===t.window.document?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(t){const e=this._map,n=e.getCanvasContainer();this._add("mapEvent",new di(e,t));const r=e.boxZoom=new fi(e,t);this._add("boxZoom",r);const i=new _i,o=new Fi;e.doubleClickZoom=new ji(o,i),this._add("tapZoom",i),this._add("clickZoom",o);const a=new Ni;this._add("tapDragZoom",a);const s=e.touchPitch=new Mi(e);this._add("touchPitch",s);const l=new wi(t),c=new Si(t);e.dragRotate=new Vi(t,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);const u=new xi(t),h=new Ti(e,t);e.dragPan=new $i(n,u,h),this._add("mousePan",u),this._add("touchPan",h,["touchZoom","touchRotate"]);const d=new Ai,p=new Pi;e.touchZoomRotate=new Ui(n,p,d,a),this._add("touchRotate",d,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]),this._add("blockableMapEvent",new pi(e));const f=e.scrollZoom=new Ri(e,this);this._add("scrollZoom",f,["mousePan"]);const m=e.keyboard=new Bi;this._add("keyboard",m);for(const g of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])t.interactive&&t[g]&&e[g].enable(t[g])}_add(t,e,n){this._handlers.push({handlerName:t,handler:e,allowed:n}),this._handlersById[t]=e}stop(t){if(!this._updatingCamera){for(const{handler:t}of this._handlers)t.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Gi(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,e,n){for(const r in t)if(r!==n&&(!e||e.indexOf(r)<0))return!0;return!1}handleWindowEvent(t){this.handleEvent(t,`${t.type}Window`)}_getMapTouches(t){const e=[];for(const n of t)this._el.contains(n.target)&&e.push(n);return e}handleEvent(t,e){this._updatingCamera=!0;const n="renderFrame"===t.type,r=n?void 0:t,i={needsRenderFrame:!1},o={},a={},s=t.touches?this._getMapTouches(t.touches):void 0,l=s?m(this._el,s):n?void 0:f(this._el,t);for(const{handlerName:h,handler:d,allowed:p}of this._handlers){if(!d.isEnabled())continue;let n;this._blockedByActive(a,p,h)?d.reset():d[e||t.type]&&(n=d[e||t.type](t,l,s),this.mergeHandlerResult(i,o,n,h,r),n&&n.needsRenderFrame&&this._triggerRenderFrame()),(n||d.isActive())&&(a[h]=d)}const c={};for(const h in this._previousActiveHandlers)a[h]||(c[h]=r);this._previousActiveHandlers=a,(Object.keys(c).length||Wi(i))&&(this._changes.push([i,o,c]),this._triggerRenderFrame()),(Object.keys(a).length||Wi(i))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:u}=i;u&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],u(this._map))}mergeHandlerResult(e,n,r,i,o){if(!r)return;t.extend(e,r);const a={handlerName:i,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(n.zoom=a),void 0!==r.panDelta&&(n.drag=a),void 0!==r.pitchDelta&&(n.pitch=a),void 0!==r.bearingDelta&&(n.rotate=a)}_applyChanges(){const e={},n={},r={};for(const[i,o,a]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new t.pointGeometry(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(e.around=i.around),void 0!==i.aroundCoord&&(e.aroundCoord=i.aroundCoord),void 0!==i.pinchAround&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),t.extend(n,o),t.extend(r,a);this._updateMapTransform(e,n,r),this._changes=[]}_updateMapTransform(e,n,r){const i=this._map,o=i.transform,a=t=>[t.x,t.y,t.z];if((t=>{const e=this._eventsInProgress.drag;return e&&!this._handlersById[e.handlerName].isActive()})()&&!Wi(e)){const t=o.zoom;o.cameraElevationReference="sea",o.recenterOnTerrain(),o.cameraElevationReference="ground",t!==o.zoom&&this._map._update(!0)}if(!Wi(e))return void this._fireEvents(n,r,!0);let{panDelta:s,zoomDelta:l,bearingDelta:c,pitchDelta:u,around:h,aroundCoord:d,pinchAround:p}=e;void 0!==p&&(h=p),(t=>n.drag&&!this._eventsInProgress.drag)()&&h&&(this._dragOrigin=a(o.pointCoordinate3D(h)),this._trackingEllipsoid.setup(o._camera.position,this._dragOrigin)),o.cameraElevationReference="sea",i._stop(!0),h=h||i.transform.centerPoint,c&&(o.bearing+=c),u&&(o.pitch+=u),o._updateCameraState();const f=[0,0,0];if(s)if("mercator"===o.projection.name){const t=this._trackingEllipsoid.projectRay(o.screenPointToMercatorRay(h).dir),e=this._trackingEllipsoid.projectRay(o.screenPointToMercatorRay(h.sub(s)).dir);f[0]=e[0]-t[0],f[1]=e[1]-t[1]}else{const e=o.pointCoordinate(h);if("globe"===o.projection.name){s=s.rotate(-o.angle);const n=o._pixelsPerMercatorPixel/o.worldSize;f[0]=-s.x*t.mercatorScale(t.latFromMercatorY(e.y))*n,f[1]=-s.y*t.mercatorScale(o.center.lat)*n}else{const t=o.pointCoordinate(h.sub(s));e&&t&&(f[0]=t.x-e.x,f[1]=t.y-e.y)}}const m=o.zoom,g=[0,0,0];if(l){const e=a(d||o.pointCoordinate3D(h)),n={dir:t.normalize([],t.sub([],e,o._camera.position))};if(n.dir[2]<0){const r=o.zoomDeltaToMovement(e,l);t.scale$2(g,n.dir,r)}}const y=t.add(f,f,g);o._translateCameraConstrained(y),l&&Math.abs(o.zoom-m)>1e-4&&o.recenterOnTerrain(),o.cameraElevationReference="ground",this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(n,r,!0)}_fireEvents(e,n,r){const i=Gi(this._eventsInProgress),o=Gi(e),a={};for(const t in e){const{originalEvent:n}=e[t];this._eventsInProgress[t]||(a[`${t}start`]=n),this._eventsInProgress[t]=e[t]}!i&&o&&this._fireEvent("movestart",o.originalEvent);for(const t in a)this._fireEvent(t,a[t]);o&&this._fireEvent("move",o.originalEvent);for(const t in e){const{originalEvent:n}=e[t];this._fireEvent(t,n)}const s={};let l;for(const t in this._eventsInProgress){const{handlerName:e,originalEvent:r}=this._eventsInProgress[t];this._handlersById[e].isActive()||(delete this._eventsInProgress[t],l=n[e]||r,s[`${t}end`]=l)}for(const t in s)this._fireEvent(t,s[t]);const c=Gi(this._eventsInProgress);if(r&&(i||o)&&!c){this._updatingCamera=!0;const e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),n=t=>0!==t&&-this._bearingSnap<t&&t<this._bearingSnap;e?(n(e.bearing||this._map.getBearing())&&(e.bearing=0),this._map.easeTo(e,{originalEvent:l})):(this._map.fire(new t.Event("moveend",{originalEvent:l})),n(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(e,n){this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(t=>{this._frameId=void 0,this.handleEvent(new Hi("renderFrame",{timeStamp:t})),this._applyChanges()})}
vendor: 13,358 bytes, line 46
46_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const Xi="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class Yi extends t.Evented{constructor(e,n){super(),this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}getCenter(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(t,e){return this.jumpTo({center:t},e)}panBy(e,n,r){return e=t.pointGeometry.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},n),r)}panTo(e,n,r){return this.easeTo(t.extend({center:e},n),r)}getZoom(){return this.transform.zoom}setZoom(t,e){return this.jumpTo({zoom:t},e),this}zoomTo(e,n,r){return this.easeTo(t.extend({zoom:e},n),r)}zoomIn(t,e){return this.zoomTo(this.getZoom()+1,t,e),this}zoomOut(t,e){return this.zoomTo(this.getZoom()-1,t,e),this}getBearing(){return this.transform.bearing}setBearing(t,e){return this.jumpTo({bearing:t},e),this}getPadding(){return this.transform.padding}setPadding(t,e){return this.jumpTo({padding:t},e),this}rotateTo(e,n,r){return this.easeTo(t.extend({bearing:e},n),r)}resetNorth(e,n){return this.rotateTo(0,t.extend({duration:1e3},e),n),this}resetNorthPitch(e,n){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),n),this}snapToNorth(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this}getPitch(){return this.transform.pitch}setPitch(t,e){return this.jumpTo({pitch:t},e),this}cameraForBounds(e,n){e=t.LngLatBounds.convert(e);const r=n&&n.bearing||0,i=e.getNorthWest(),o=e.getSouthEast();return this._cameraForBounds(this.transform,i,o,r,n)}_extendCameraOptions(e){const n={top:0,bottom:0,right:0,left:0};if("number"==typeof(e=t.extend({padding:n,offset:[0,0],maxZoom:this.transform.maxZoom},e)).padding){const t=e.padding;e.padding={top:t,bottom:t,right:t,left:t}}return e.padding=t.extend(n,e.padding),e}_minimumAABBFrustumDistance(t,e){const n=e.max[0]-e.min[0],r=e.max[1]-e.min[1];return n/r>t.aspect?n/(2*Math.tan(.5*t.fovX)*t.aspect):r/(2*Math.tan(.5*t.fovY)*t.aspect)}_cameraForBoundsOnGlobe(e,n,r,i,o){const a=e.clone(),s=this._extendCameraOptions(o);a.bearing=i;const l=t.LngLat.convert(n),c=t.LngLat.convert(r),u=.5*(l.lat+c.lat),h=.5*(l.lng+c.lng),d=t.latLngToECEF(u,h),p=t.normalize([],d),f=t.normalize([],t.cross([],p,[0,1,0])),m=t.cross([],f,p),g=[f[0],f[1],f[2],0,m[0],m[1],m[2],0,p[0],p[1],p[2],0,0,0,0,1],y=[d,t.latLngToECEF(l.lat,l.lng),t.latLngToECEF(c.lat,l.lng),t.latLngToECEF(c.lat,c.lng),t.latLngToECEF(l.lat,c.lng),t.latLngToECEF(u,l.lng),t.latLngToECEF(u,c.lng),t.latLngToECEF(l.lat,h),t.latLngToECEF(c.lat,h)];let _=t.Aabb.fromPoints(y.map(e=>[t.dot(f,e),t.dot(m,e),t.dot(p,e)]));const v=t.transformMat4([],_.center,g);0===t.squaredLength(v)&&t.set(v,0,0,1),t.normalize(v,v),t.scale$2(v,v,t.GLOBE_RADIUS),a.center=t.ecefToLatLng(v);const b=a.getWorldToCameraMatrix(),x=t.invert(new Float64Array(16),b);_=t.Aabb.applyTransform(_,t.multiply([],b,g)),t.transformMat4(v,v,b);const w=.5*(_.max[2]-_.min[2]),S=this._minimumAABBFrustumDistance(a,_),T=t.scale$2([],[0,0,1],w),E=t.add(T,v,T),C=S+(0===a.pitch?0:t.distance(v,E)),O=a.globeCenterInViewSpace,P=t.sub([],v,[O[0],O[1],O[2]]);t.normalize(P,P),t.scale$2(P,P,C);const k=t.add([],v,P);t.transformMat4(k,k,x);const A=t.earthRadius/t.GLOBE_RADIUS,I=t.length(k),M=t.mercatorZfromAltitude(I*A-t.earthRadius,0),D=Math.min(a.zoomFromMercatorZAdjusted(M),s.maxZoom);return D>.5*(t.GLOBE_ZOOM_THRESHOLD_MIN+t.GLOBE_ZOOM_THRESHOLD_MAX)?(a.setProjection({name:"mercator"}),a.zoom=D,this._cameraForBounds(a,n,r,i,o)):{center:a.center,zoom:D,bearing:i}}queryTerrainElevation(e,n){const r=this.transform.elevation;return r?(n=t.extend({},{exaggerated:!0},n),r.getAtPoint(t.MercatorCoordinate.fromLngLat(e),null,n.exaggerated)):null}_cameraForBounds(e,n,r,i,o){if("globe"===e.projection.name)return this._cameraForBoundsOnGlobe(e,n,r,i,o);const a=e.clone(),s=this._extendCameraOptions(o),l=a.padding;a.bearing=i;const c=t.LngLat.convert(n),u=t.LngLat.convert(r),h=new t.LngLat(c.lng,u.lat),d=new t.LngLat(u.lng,c.lat),p=a.project(c),f=a.project(u),m=this.queryTerrainElevation(c),g=this.queryTerrainElevation(u),y=this.queryTerrainElevation(h),_=this.queryTerrainElevation(d),v=[[p.x,p.y,Math.min(m||0,g||0,y||0,_||0)],[f.x,f.y,Math.max(m||0,g||0,y||0,_||0)]];let b=t.Aabb.fromPoints(v);const x=a.getWorldToCameraMatrix(),w=t.invert(new Float64Array(16),x);b=t.Aabb.applyTransform(b,x);const S=t.sub([],b.max,b.min),T=l.left||0,E=l.right||0,C=l.bottom||0,O=l.top||0,{left:P,right:k,top:A,bottom:I}=s.padding,M=.5*(T+E),D=.5*(O+C),B=Math.min(a.scaleZoom(a.scale*Math.min((a.width-(T+E+P+k))/S[0],(a.height-(C+O+I+A))/S[1])),s.maxZoom),z=a.scale/a.zoomScale(B);b=new t.Aabb([b.min[0]-(P+M)*z,b.min[1]-(I+D)*z,b.min[2]],[b.max[0]+(k+M)*z,b.max[1]+(A+D)*z,b.max[2]]);const L=.5*S[2],R=this._minimumAABBFrustumDistance(a,b),j=[0,0,1,0];t.transformMat4$1(j,j,x),t.normalize$2(j,j);const F=t.scale$2([],j,R+L),N=t.add([],b.center,F),$=("number"==typeof s.offset.x&&"number"==typeof s.offset.y?new t.pointGeometry(s.offset.x,s.offset.y):t.pointGeometry.convert(s.offset)).rotate(-t.degToRad(i));b.center[0]-=$.x*z,b.center[1]+=$.y*z,t.transformMat4(b.center,b.center,w),t.transformMat4(N,N,w);const V=[b.center[0],b.center[1],N[2]*a.pixelsPerMeter];t.scale$2(V,V,1/a.worldSize);const U=t.lngFromMercatorX(V[0]),G=t.latFromMercatorY(V[1]),H=Math.min(a._zoomFromMercatorZ(V[2]),s.maxZoom),q=new t.LngLat(U,G);return a.mercatorFromTransition&&H<.5*(t.GLOBE_ZOOM_THRESHOLD_MIN+t.GLOBE_ZOOM_THRESHOLD_MAX)?(a.setProjection({name:"globe"}),a.zoom=H,this._cameraForBounds(a,n,r,i,o)):{center:q,zoom:H,bearing:i}}fitBounds(t,e,n){const r=this.cameraForBounds(t,e);return this._fitInternal(r,e,n)}fitScreenCoordinates(e,n,r,i,o){const a=t.pointGeometry.convert(e),s=t.pointGeometry.convert(n),l=new t.pointGeometry(Math.min(a.x,s.x),Math.min(a.y,s.y)),c=new t.pointGeometry(Math.max(a.x,s.x),Math.max(a.y,s.y));if("mercator"===this.transform.projection.name&&this.transform.anyCornerOffEdge(a,s))return this;const u=this.transform.pointLocation3D(l),h=this.transform.pointLocation3D(c),d=this.transform.pointLocation3D(new t.pointGeometry(l.x,c.y)),p=this.transform.pointLocation3D(new t.pointGeometry(c.x,l.y)),f=[Math.min(u.lng,h.lng,d.lng,p.lng),Math.min(u.lat,h.lat,d.lat,p.lat)],m=[Math.max(u.lng,h.lng,d.lng,p.lng),Math.max(u.lat,h.lat,d.lat,p.lat)],g=this._cameraForBounds(this.transform,f,m,r,i);return this._fitInternal(g,i,o)}_fitInternal(e,n,r){return e?(delete(n=t.extend(e,n)).padding,n.linear?this.easeTo(n,r):this.flyTo(n,r)):this}jumpTo(e,n){this.stop();const r=e.preloadOnly?this.transform.clone():this.transform;let 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=t.LngLat.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),null==e.padding||r.isPaddingEqual(e.padding)||(r.padding=e.padding),e.preloadOnly?(this._preloadTiles(r),this):(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)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||t.warnOnce(Xi),this.transform.getFreeCameraOptions()}setFreeCameraOptions(e,n){const r=this.transform;if(!r.projection.supportsFreeCamera)return t.warnOnce(Xi),this;this.stop();const i=r.zoom,o=r.pitch,a=r.bearing;r.setFreeCameraOptions(e);const s=i!==r.zoom,l=o!==r.pitch,c=a!==r.bearing;return this.fire(new t.Event("movestart",n)).fire(new t.Event("move",n)),s&&this.fire(new t.Event("zoomstart",n)).fire(new t.Event("zoom",n)).fire(new t.Event("zoomend",n)),c&&this.fire(new t.Event("rotatestart",n)).fire(new t.Event("rotate",n)).fire(new t.Event("rotateend",n)),l&&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)),this}easeTo(e,n){this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.exported.prefersReducedMotion)&&(e.duration=0);const r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in e?+e.zoom:i,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:a,h="padding"in e?e.padding:r.padding,d=t.pointGeometry.convert(e.offset);let p,f,m;if("globe"===r.projection.name){const n=t.MercatorCoordinate.fromLngLat(r.center),i=d.rotate(-r.angle);n.x+=i.x/r.worldSize,n.y+=i.y/r.worldSize;const o=n.toLngLat(),a=t.LngLat.convert(e.center||o);this._normalizeCenter(a),p=r.centerPoint.add(i),f=new t.pointGeometry(n.x,n.y).mult(r.worldSize),m=new t.pointGeometry(t.mercatorXfromLng(a.lng),t.mercatorYfromLat(a.lat)).mult(r.worldSize).sub(f)}else{p=r.centerPoint.add(d);const n=r.pointLocation(p),i=t.LngLat.convert(e.center||n);this._normalizeCenter(i),f=r.project(n),m=r.project(i).sub(f)}const g=r.zoomScale(l-i);let y,_;e.around&&(y=t.LngLat.convert(e.around),_=r.locationPoint(y));const v=this._zooming||l!==i,b=this._rotating||o!==c,x=this._pitching||u!==a,w=!r.isPaddingEqual(h),S=r=>S=>{if(v&&(r.zoom=t.number(i,l,S)),b&&(r.bearing=t.number(o,c,S)),x&&(r.pitch=t.number(a,u,S)),w&&(r.interpolatePadding(s,h,S),p=r.centerPoint.add(d)),y)r.setLocationAtPoint(y,_);else{const t=r.zoomScale(r.zoom-i),e=l>i?Math.min(2,g):Math.max(.5,g),n=Math.pow(e,1-S),o=r.unproject(f.add(m.mult(S*n)).mult(t));r.setLocationAtPoint(r.renderWorldCopies?o.wrap():o,p)}return e.preloadOnly||this._fireMoveEvents(n),r};if(e.preloadOnly){const t=this._emulate(S,e.duration,r);return this._preloadTiles(t),this}const T={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=v,this._rotating=b,this._pitching=x,this._padding=w,this._easeId=e.easeId,this._prepareEase(n,e.noMoveStart,T),this._ease(S(r),t=>{r.recenterOnTerrain(),this._afterEase(n,t)},e),this}_prepareEase(e,n,r={}){this._moving=!0,this.transform.cameraElevationReference="sea",n||r.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.Event("pitchstart",e))}_fireMoveEvents(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))}_afterEase(e,n){if(this._easeId&&n&&this._easeId===n)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}flyTo(e,n){if(!e.essential&&t.exported.prefersReducedMotion){const r=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(r,n)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);const r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in e?t.clamp(+e.zoom,r.minZoom,r.maxZoom):i,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:a,h="padding"in e?e.padding:r.padding,d=r.zoomScale(l-i),p=t.pointGeometry.convert(e.offset);let f=r.centerPoint.add(p);const m=r.pointLocation(f),g=t.LngLat.convert(e.center||m);this._normalizeCenter(g);const y=r.project(m),_=r.project(g).sub(y);let v=e.curve;const b=Math.max(r.width,r.height),x=b/d,w=_.mag();if("minZoom"in e){const n=t.clamp(Math.min(e.minZoom,i,l),r.minZoom,r.maxZoom),o=b/r.zoomScale(n-i);v=Math.sqrt(o/w*2)}const S=v*v;function T(t){const e=(x*x-b*b+(t?-1:1)*S*S*w*w)/(2*(t?x:b)*S*w);return Math.log(Math.sqrt(e*e+1)-e)}function E(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}const O=T(0);let P=function(t){return C(O)/C(O+v*t)},k=function(t){return b*((C(O)*(E(e=O+v*t)/C(e))-E(O))/S)/w;var e},A=(T(1)-O)/v;if(Math.abs(w)<1e-6||!isFinite(A)){if(Math.abs(b-x)<1e-6)return this.easeTo(e,n);const t=x<b?-1:1;A=Math.abs(Math.log(x/b))/v,k=function(){return 0},P=function(e){return Math.exp(t*v*e)}}e.duration="duration"in e?+e.duration:1e3*A/("screenSpeed"in e?+e.screenSpeed/v:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0);const I=o!==c,M=u!==a,D=!r.isPaddingEqual(h),B=r=>d=>{const m=d*A,v=1/P(m);r.zoom=1===d?l:i+r.scaleZoom(v),I&&(r.bearing=t.number(o,c,d)),M&&(r.pitch=t.number(a,u,d)),D&&(r.interpolatePadding(s,h,d),f=r.centerPoint.add(p));const b=1===d?g:r.unproject(y.add(_.mult(k(m))).mult(v));return r.setLocationAtPoint(r.renderWorldCopies?b.wrap():b,f),r._updateCameraOnTerrain(),e.preloadOnly||this._fireMoveEvents(n),r};if(e.preloadOnly){const t=this._emulate(B,e.duration,r);return this._preloadTiles(t),this}
vendor: 13,632 bytes, line 46
46return this._zooming=!0,this._rotating=I,this._pitching=M,this._padding=D,this._prepareEase(n,!1),this._ease(B(r),()=>this._afterEase(n),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const t=this._onEaseEnd;this._onEaseEnd=void 0,t.call(this,e)}if(!t){const t=this.handlers;t&&t.stop(!1)}return this}_ease(e,n,r){!1===r.animate||0===r.duration?(e(1),n()):(this._easeStart=t.exported.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const e=Math.min((t.exported.now()-this._easeStart)/this._easeOptions.duration,1),n=this._onEaseFrame;n&&n(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(e,n){e=t.wrap(e,-180,180);const r=Math.abs(e-n);return Math.abs(e-360-n)<r&&(e-=360),Math.abs(e+360-n)<r&&(e+=360),e}_normalizeCenter(t){const e=this.transform;if(!e.renderWorldCopies||e.maxBounds)return;const n=t.lng-e.center.lng;t.lng+=n>180?-360:n<-180?360:0}_emulate(t,e,n){const r=Math.ceil(15*e/1e3),i=[],o=t(n.clone());for(let a=0;a<=r;a++){const t=o(a/r);i.push(t.clone())}return i}}class Ki{constructor(e={}){this.options=e,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(t){const e=this.options&&this.options.compact;return this._map=t,this._container=o("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o("button","mapboxgl-ctrl-attrib-button",this._container),o("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),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}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(t,e){const n=this._map._getUIString(`AttributionControl.${e}`);t.setAttribute("aria-label",n),t.removeAttribute("title"),t.firstElementChild&&t.firstElementChild.setAttribute("title",n)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));const n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){const r=n.reduce((t,e,r)=>(e.value&&(t+=`${e.key}=${e.value}${r<n.length-1?"&":""}`),t),"?");e.href=`${t.config.FEEDBACK_URL}/${r}#${ti(this._map,!0)}`,e.rel="noopener nofollow",this._setElementTitle(e,"MapFeedback")}}_updateData(t){!t||"metadata"!==t.sourceDataType&&"visibility"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())}_updateAttributions(){if(!this._map.style)return;let t=[];if(this._map.style.stylesheet){const t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}const e=this._map.style._sourceCaches;for(const r in e){const n=e[r];if(n.used){const e=n.getSource();e.attribution&&t.indexOf(e.attribution)<0&&t.push(e.attribution)}}t.sort((t,e)=>t.length-e.length),t=t.filter((e,n)=>{for(let r=n+1;r<t.length;r++)if(t[r].indexOf(e)>=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=[...this.options.customAttribution,...t]:t.unshift(this.options.customAttribution));const n=t.join(" | ");n!==this._attribHTML&&(this._attribHTML=n,t.length?(this._innerContainer.innerHTML=n,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class Ji{constructor(){t.bindAll(["_updateLogo","_updateCompact"],this)}onAdd(t){this._map=t,this._container=o("div","mapboxgl-ctrl");const e=o("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const t=this._map.style._sourceCaches;if(0===Object.entries(t).length)return!0;for(const e in t){const n=t[e].getSource();if(n.hasOwnProperty("mapbox_logo")&&!n.mapbox_logo)return!1}return!0}_updateCompact(){const t=this._container.children;if(t.length){const e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}}}class Qi{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e}remove(t){const e=this._currentlyRunning,n=e?this._queue.concat(e):this._queue;for(const r of n)if(r.id===t)return void(r.cancelled=!0)}run(t=0){const e=this._currentlyRunning=this._queue;this._queue=[];for(const n of e)if(!n.cancelled&&(n.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function to(e,n,r){if(e=new t.LngLat(e.lng,e.lat),n){const i=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=360*Math.ceil(Math.abs(e.lng-r.center.lng)/360),s=r.locationPoint(e).distSqr(n),l=n.x<0||n.y<0||n.x>r.width||n.y>r.height;r.locationPoint(i).distSqr(n)<s&&(l||Math.abs(i.lng-r.center.lng)<a)?e=i:r.locationPoint(o).distSqr(n)<s&&(l||Math.abs(o.lng-r.center.lng)<a)&&(e=o)}for(;Math.abs(e.lng-r.center.lng)>180;){const t=r.locationPoint(e);if(t.x>=0&&t.y>=0&&t.x<=r.width&&t.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e}const eo={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%)"};class no extends t.Evented{constructor(e,n){if(super(),(e instanceof t.window.HTMLElement||n)&&(e=t.extend({element:e},n)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment||"auto",this._updateMoving=(()=>this._update(!0)),this._occludedOpacity=e&&e.occludedOpacity||.2,e&&e.element)this._element=e.element,this._offset=t.pointGeometry.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=o("div");const n=41,r=27,i=a("svg",{display:"block",height:n*this._scale+"px",width:r*this._scale+"px",viewBox:`0 0 ${r} ${n}`},this._element),s=a("radialGradient",{id:"shadowGradient"},a("defs",{},i));a("stop",{offset:"10%","stop-opacity":.4},s),a("stop",{offset:"100%","stop-opacity":.05},s),a("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},i),a("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},i),a("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},i),a("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},i),this._offset=t.pointGeometry.convert(e&&e.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",t=>{t.preventDefault()}),this._element.addEventListener("mousedown",t=>{t.preventDefault()});const r=this._element.classList;for(const t in eo)r.remove(`mapboxgl-marker-anchor-${t}`);r.add(`mapboxgl-marker-anchor-${this._anchor}`),this._popup=null}addTo(t){return t===this._map||(this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._updateMoving),t.on("moveend",this._update),t.on("remove",this._clearFadeTimer),t._addMarker(this),this.setDraggable(this._draggable),this._update(),t.on("click",this._onMapClick)),this}remove(){const t=this._map;return t&&(t.off("click",this._onMapClick),t.off("move",this._updateMoving),t.off("moveend",this._update),t.off("mousedown",this._addDragHandler),t.off("touchstart",this._addDragHandler),t.off("mouseup",this._onUp),t.off("touchend",this._onUp),t.off("mousemove",this._onMove),t.off("touchmove",this._onMove),t.off("remove",this._clearFadeTimer),t._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const e=38.1,n=13.5,r=Math.sqrt(Math.pow(n,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-e],"bottom-left":[r,-1*(e-n+r)],"bottom-right":[-r,-1*(e-n+r)],left:[n,-1*(e-n)],right:[-n,-1*(e-n)]}:this._offset}this._popup=t,t._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(t){const e=t.code,n=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==n&&13!==n||this.togglePopup()}_onMapClick(t){const e=t.originalEvent.target,n=this._element;this._popup&&(e===n||n.contains(e))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const t=this._popup;return t?(t.isOpen()?(t.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(t.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const t=this._map,e=this._pos;if(!t||!e)return!1;const n=t.unproject(e),r=t.getFreeCameraOptions();if(!r.position)return!1;const i=r.position.toLngLat();return i.distanceTo(n)<.9*i.distanceTo(this._lngLat)}_evaluateOpacity(){const e=this._map;if(!e)return;const n=this._pos;if(!n||n.x<0||n.x>e.transform.width||n.y<0||n.y>e.transform.height)return void this._clearFadeTimer();const r=e.unproject(n);let i;e._showingGlobe()&&t.isLngLatBehindGlobe(e.transform,this._lngLat)?i=0:(i=1-e._queryFogOpacity(r),e.transform._terrainEnabled()&&e.getTerrain()&&this._behindTerrain()&&(i*=this._occludedOpacity)),this._element.style.opacity=`${i}`,this._element.style.pointerEvents=i>0?"auto":"none",this._popup&&this._popup._setOpacity(i),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const t=this._pos;if(!t||!this._map)return;const e=this._offset.mult(this._scale);this._element.style.transform=`\n            translate(${t.x}px,${t.y}px)\n            ${eo[this._anchor]}\n            ${this._calculateXYTransform()} ${this._calculateZTransform()}\n            translate(${e.x}px,${e.y}px)\n        `}_calculateXYTransform(){const e=this._pos,n=this._map,r=this.getPitchAlignment();
46if(!n||!e||"map"!==r)return"";if(!n._showingGlobe()){const t=n.getPitch();return t?`rotateX(${t}deg)`:""}const i=t.radToDeg(t.globeTiltAtLngLat(n.transform,this._lngLat)),o=e.sub(t.globeCenterToScreenPoint(n.transform)),a=Math.abs(o.x)+Math.abs(o.y);if(0===a)return"";const s=i/a;return`rotateX(${-o.y*s}deg) rotateY(${o.x*s}deg)`}_calculateZTransform(){const e=this._pos,n=this._map;if(!n||!e)return"";let r=0;const i=this.getRotationAlignment();if("map"===i)if(n._showingGlobe()){const e=n.project(new t.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),i=n.project(new t.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(e);r=t.radToDeg(Math.atan2(i.y,i.x))-90}else r=-n.getBearing();else if("horizon"===i){const i=t.smoothstep(4,6,n.getZoom()),o=t.globeCenterToScreenPoint(n.transform);o.y+=i*n.transform.height;const a=e.sub(o),s=t.radToDeg(Math.atan2(a.y,a.x));r=(s>90?s-270:s+90)*(1-i)}return r+=this._rotation,r?`rotateZ(${r}deg)`:""}_update(e){t.window.cancelAnimationFrame(this._updateFrameId);const n=this._map;n&&(n.transform.renderWorldCopies&&
vendor: 5,291 bytes, line 46
46(this._lngLat=to(this._lngLat,this._pos,n.transform)),this._pos=n.project(this._lngLat),!0===e?this._updateFrameId=t.window.requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),n._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(n._showingGlobe()||n.getTerrain()||n.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(e){return this._offset=t.pointGeometry.convert(e),this._update(),this}_onMove(e){const n=this._map;if(!n)return;const r=this._pointerdownPos,i=this._positionDelta;if(r&&i){if(!this._isDragging){const t=this._clickTolerance||n._clickTolerance;if(e.point.dist(r)<t)return;this._isDragging=!0}this._pos=e.point.sub(i),this._lngLat=n.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const e=this._map;e&&(e.off("mousemove",this._onMove),e.off("touchmove",this._onMove)),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"}_addDragHandler(t){const e=this._map,n=this._pos;e&&n&&this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(n),this._pointerdownPos=t.point,this._state="pending",e.on("mousemove",this._onMove),e.on("touchmove",this._onMove),e.once("mouseup",this._onUp),e.once("touchend",this._onUp))}setDraggable(t){this._draggable=!!t;const e=this._map;return e&&(t?(e.on("mousedown",this._addDragHandler),e.on("touchstart",this._addDragHandler)):(e.off("mousedown",this._addDragHandler),e.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return"auto"===this._rotationAlignment||"horizon"===this._rotationAlignment&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t||"auto",this._update(),this}getPitchAlignment(){return"auto"===this._pitchAlignment?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(t){return this._occludedOpacity=t||.2,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const ro={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},io=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function oo(e=new t.pointGeometry(0,0),n="bottom"){if("number"==typeof e){const r=Math.round(Math.sqrt(.5*Math.pow(e,2)));switch(n){case"top":return new t.pointGeometry(0,e);case"top-left":return new t.pointGeometry(r,r);case"top-right":return new t.pointGeometry(-r,r);case"bottom":return new t.pointGeometry(0,-e);case"bottom-left":return new t.pointGeometry(r,-r);case"bottom-right":return new t.pointGeometry(-r,-r);case"left":return new t.pointGeometry(e,0);case"right":return new t.pointGeometry(-e,0)}return new t.pointGeometry(0,0)}return e instanceof t.pointGeometry||Array.isArray(e)?t.pointGeometry.convert(e):t.pointGeometry.convert(e[n]||[0,0])}class ao{constructor(t){this.jumpTo(t)}getValue(e){if(e<=this._startTime)return this._start;if(e>=this._endTime)return this._end;const n=t.easeCubicInOut((e-this._startTime)/(this._endTime-this._startTime));return this._start*(1-n)+this._end*n}isEasing(t){return t>=this._startTime&&t<=this._endTime}jumpTo(t){this._startTime=-1/0,this._endTime=-1/0,this._start=t,this._end=t}easeTo(t,e,n){this._start=this.getValue(e),this._end=t,this._startTime=e,this._endTime=e+n}}const so={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use ⌘ + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},lo={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileC
vendor: 9,552 bytes, line 46
46acheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0};function co(t){t.parentNode&&t.parentNode.removeChild(t)}const uo={showCompass:!0,showZoom:!0,visualizePitch:!1};class ho{constructor(e,n,r=!1){this._clickTolerance=10,this.element=n,this.mouseRotate=new wi({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,r&&(this.mousePitch=new Si({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),n.addEventListener("mousedown",this.mousedown),n.addEventListener("touchstart",this.touchstart,{passive:!1}),n.addEventListener("touchmove",this.touchmove),n.addEventListener("touchend",this.touchend),n.addEventListener("touchcancel",this.reset)}down(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),u()}move(t,e){const n=this.map,r=this.mouseRotate.mousemoveWindow(t,e),i=r&&r.bearingDelta;if(i&&n.setBearing(n.getBearing()+i),this.mousePitch){const r=this.mousePitch.mousemoveWindow(t,e),i=r&&r.pitchDelta;i&&n.setPitch(n.getPitch()+i)}}off(){const t=this.element;t.removeEventListener("mousedown",this.mousedown),t.removeEventListener("touchstart",this.touchstart,{passive:!1}),t.removeEventListener("touchmove",this.touchmove),t.removeEventListener("touchend",this.touchend),t.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){h(),t.window.removeEventListener("mousemove",this.mousemove),t.window.removeEventListener("mouseup",this.mouseup)}mousedown(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:()=>e.preventDefault()}),f(this.element,e)),t.window.addEventListener("mousemove",this.mousemove),t.window.addEventListener("mouseup",this.mouseup)}mousemove(t){this.move(t,f(this.element,t))}mouseup(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()}touchstart(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=m(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>t.preventDefault()},this._startPos))}touchmove(t){1!==t.targetTouches.length?this.reset():(this._lastPos=m(this.element,t.targetTouches)[0],this.move({preventDefault:()=>t.preventDefault()},this._lastPos))}touchend(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}const po={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},fo={maxWidth:100,unit:"metric"};function mo(t,e,n){const r=go(e),i=r/e,o={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"}[n];this._map._requestDomTask(()=>{this._container.style.width=t*i+"px",this._container.innerHTML=`${r}&nbsp;${o}`})}function go(t){const e=Math.pow(10,`${Math.floor(t)}`.length-1);let n=t/e;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:function(t){const e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(n),e*n}const yo={version:t.version,supported:n,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:class extends Yi{constructor(e){if(t.LivePerformanceUtils.mark(t.PerformanceMarkers.create),null!=(e=t.extend({},lo,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(e.antialias&&t.isSafariWithAntialiasingBug(t.window)&&(e.antialias=!1,t.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Kr(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies),e),this._interactive=e.interactive,this._minTileCacheSize=e.minTileCacheSize,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._optimizeForTerrain=e.optimizeForTerrain,this._language=this._parseLanguage(e.language),this._worldview=e.worldview,this._renderTaskQueue=new Qi,this._domRenderTaskQueue=new Qi,this._controls=[],this._markers=[],this._popups=[],this._mapId=t.uniqueId(),this._locale=t.extend({},so,e.locale),this._clickTolerance=e.clickTolerance,this._cooperativeGestures=e.cooperativeGestures,this._performanceMetricsCollection=e.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new ao(0),this._interactionRange=[1/0,-1/0],this._useExplicitProjection=!1,this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken,e.testMode),this._silenceAuthErrors=!!e.testMode,"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(`Container '${e.container}' not found.`)}else{if(!(e.container instanceof t.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(this._container.childNodes.length>0&&t.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1),t.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1)),this.handlers=new Zi(this,e),this._localFontFamily=e.localFontFamily,this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),e.projection&&this.setProjection(e.projection),this._hash=e.hash&&new Qr("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),e.attributionControl&&this.addControl(new Ki({customAttribution:e.customAttribution})),this._logoControl=new Ji,this.addControl(this._logoControl,e.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.Event(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.Event(`${e.dataType}dataloading`,e))})}_getMapId(){return this._mapId}addControl(e,n){if(void 0===n&&(n=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=e.onAdd(this);this._controls.push(e);const i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this}hasControl(t){return this._controls.indexOf(t)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(e){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const n=!this._moving;return n&&this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)),this.fire(new t.Event("resize",e)),n&&this.fire(new t.Event("moveend",e)),this}getBounds(){return"globe"===this.transform.projection.name&&t.warnOnce('Globe projection does not support getBounds API, this API may behave unex
46pectedly when viewing the poles."'),this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()<e?this.setZoom(e):this.fire(new t.Event("zoomstart")).fire(new t.Event("zoom")).fire(new t.Event("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e?this.setZoom(e):this.fire(new t.Event("zoomstart")).fire(new t.Event("zoom")).fire(new t.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()<e?this.setPitch(e):this.fire(new t.Event("pitchstart")).fire(new t.Event("pitch")).fire(new t.Event("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=null==e?85:e)>85)throw new Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e?this.setPitch(e):this.fire(new t.Event("pitchstart")).fire(new t.Event("pitch")).fire(new t.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(t){return this.transform.renderWorldCopies=t,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(e){return"auto"===e?t.window.navigator.language:Array.isArray(e)?0===e.length?void 0:e.map(e=>"auto"===e?t.window.navigator.language:e):e}setLanguage(t){const e=this._parseLanguage(t);if(!this.style||e===this._language)return this;this._language=e,this.style._reloadSources();for(const n of this._controls)n._setLanguage&&n._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(t){return this.style&&t!==this._worldview?(this._worldview=t,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return"globe"===this.transform.projection.name}setProjection(t){return this._lazyInitEmptyStyle(),t?"string"==typeof t&&(t={name:t}):t=null,this._useExplicitProjection=!!t,this._prioritizeAndUpdateProjection(t,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if("globe"!==this.getProjection().name)return;const e=this.transform,n=e.projection.name;let r;"globe"===n&&e.zoom>=t.GLOBE_ZOOM_THRESHOLD_MAX?(e.setMercatorFromTransition(),r=!0):"mercator"===n&&e.zoom<t.GLOBE_ZOOM_THRESHOLD_MAX&&(e.setProjection({name:"globe"}),r=!0),r&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate())}_prioritizeAndUpdateProjection(t,e){return this._updateProjection(t||e||{name:"mercator"})}_updateProjection(e){let n;if(n="globe"===e.name&&this.transform.zoom>=t.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(e),this.style.applyProjectionUpdate(),n){this.painter.clearBackgroundTiles();for(const t in this.style._sourceCaches)this.style._sourceCaches[t].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(e){return this.transform.locationPoint3D(t.LngLat.convert(e))}unproject(e){return this.transform.pointLocation3D(t.pointGeometry.convert(e))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}
vendor: 9,154 bytes, line 46
46_createDelegatedListener(t,e,n){if("mouseenter"===t||"mouseover"===t){let r=!1;const i=i=>{const o=e.filter(t=>this.getLayer(t)),a=o.length?this.queryRenderedFeatures(i.point,{layers:o}):[];a.length?r||(r=!0,n.call(this,new ci(t,this,i.originalEvent,{features:a}))):r=!1},o=()=>{r=!1};return{layers:new Set(e),listener:n,delegates:{mousemove:i,mouseout:o}}}if("mouseleave"===t||"mouseout"===t){let r=!1;const i=i=>{const o=e.filter(t=>this.getLayer(t));(o.length?this.queryRenderedFeatures(i.point,{layers:o}):[]).length?r=!0:r&&(r=!1,n.call(this,new ci(t,this,i.originalEvent)))},o=e=>{r&&(r=!1,n.call(this,new ci(t,this,e.originalEvent)))};return{layers:new Set(e),listener:n,delegates:{mousemove:i,mouseout:o}}}{const r=t=>{const r=e.filter(t=>this.getLayer(t)),i=r.length?this.queryRenderedFeatures(t.point,{layers:r}):[];i.length&&(t.features=i,n.call(this,t),delete t.features)};return{layers:new Set(e),listener:n,delegates:{[t]:r}}}}on(t,e,n){if(void 0===n)return super.on(t,e);Array.isArray(e)||(e=[e]);const r=this._createDelegatedListener(t,e,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(r);for(const i in r.delegates)this.on(i,r.delegates[i]);return this}once(t,e,n){if(void 0===n)return super.once(t,e);Array.isArray(e)||(e=[e]);const r=this._createDelegatedListener(t,e,n);for(const i in r.delegates)this.once(i,r.delegates[i]);return this}off(t,e,n){if(void 0===n)return super.off(t,e);e=new Set(Array.isArray(e)?e:[e]);const r=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},i=this._delegatedListeners?this._delegatedListeners[t]:void 0;return i&&(t=>{for(let i=0;i<t.length;i++){const o=t[i];if(o.listener===n&&r(o.layers,e)){for(const t in o.delegates)this.off(t,o.delegates[t]);return t.splice(i,1),this}}})(i),this}queryRenderedFeatures(e,n){return this.style?(void 0!==n||void 0===e||e instanceof t.pointGeometry||Array.isArray(e)||(n=e,e=void 0),this.style.queryRenderedFeatures(e=e||[[0,0],[this.transform.width,this.transform.height]],n=n||{},this.transform)):[]}querySourceFeatures(t,e){return this.style.querySourceFeatures(t,e)}setStyle(e,n){return!1!==(n=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},n)).diff&&n.localIdeographFontFamily===this._localIdeographFontFamily&&n.localFontFamily===this._localFontFamily&&this.style&&e?(this._diffStyle(e,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._localFontFamily=n.localFontFamily,this._updateStyle(e,n))}_getUIString(t){const e=this._locale[t];if(null==e)throw new Error(`Missing UI string '${t}'`);return e}_updateStyle(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),t&&(this.style=new tn(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t)),this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new tn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,n){if("string"==typeof e){const r=this._requestManager.normalizeStyleURL(e),i=this._requestManager.transformRequest(r,t.ResourceType.Style);t.getJSON(i,(e,r)=>{e?this.fire(new t.ErrorEvent(e)):r&&this._updateDiff(r,n)})}else"object"==typeof e&&this._updateDiff(e,n)}_updateDiff(e,n){try{this.style.setState(e)&&this._update(!0)}catch(r){t.warnOnce(`Unable to perform style diff: ${r.message||r.error||r}.  Rebuilding the style from scratch.`),this._updateStyle(e,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(t.warnOnce("There is no style added to the map."),!1)}addSource(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)}isSourceLoaded(t){return!!this.style&&this.style._isSourceCacheLoaded(t)}areTilesLoaded(){const t=this.style&&this.style._sourceCaches;for(const e in t){const n=t[e]._tiles;for(const t in n){const e=n[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}}return!0}addSourceType(t,e,n){this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,n)}removeSource(t){return this.style.removeSource(t),this._updateTerrain(),this._update(!0)}getSource(t){return this.style.getSource(t)}addImage(e,n,{pixelRatio:r=1,sdf:i=!1,stretchX:o,stretchY:a,content:s}={}){if(this._lazyInitEmptyStyle(),n instanceof t.window.HTMLImageElement||t.window.ImageBitmap&&n instanceof t.window.ImageBitmap){const{width:l,height:c,data:u}=t.exported.getImageData(n);this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},u),pixelRatio:r,stretchX:o,stretchY:a,content:s,sdf:i,version:0})}else if(void 0===n.width||void 0===n.height)this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:l,height:c}=n,u=n;this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},new Uint8Array(u.data)),pixelRatio:r,stretchX:o,stretchY:a,content:s,sdf:i,version:0,userImage:u}),u.onAdd&&u.onAdd(this,e)}}updateImage(e,n){const r=this.style.getImage(e);if(!r)return void this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const i=n instanceof t.window.HTMLImageElement||t.window.ImageBitmap&&n instanceof t.window.ImageBitmap?t.exported.getImageData(n):n,{width:o,height:a}=i;void 0!==o&&void 0!==a?o===r.data.width&&a===r.data.height?(r.data.replace(i.data,!(n instanceof t.window.HTMLImageElement||t.window.ImageBitmap&&n instanceof t.window.ImageBitmap)),this.style.updateImage(e,r)):this.fire(new t.ErrorEvent(new Error(`The width and height of the updated image (${o}, ${a})\n                must be that same as the previous version of the image\n                (${r.data.width}, ${r.data.height})`))):this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(t){this.style.removeImage(t)}loadImage(e,n){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),(e,r)=>{n(e,r instanceof t.window.HTMLImageElement?t.exported.getImageData(r):r)})}listImages(){return this.style.listImages()}addLayer(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)}moveLayer(t,e){return this.style.moveLayer(t,e),this._update(!0)}removeLayer(t){return this.style.removeLayer(t),this._update(!0)}getLayer(t){return this.style.getLayer(t)}setLayerZoomRange(t,e,n){return this.style.setLayerZoomRange(t,e,n),this._update(!0)}setFilter(t,e,n={}){return this.style.setFilter(t,e,n),this._update(!0)}getFilter(t){return this.style.getFilter(t)}setPaintProperty(t,e,n,r={}){return this.style.setPaintProperty(t,e,n,r),this._update(!0)}getPaintProperty(t,e){return this.style.getPaintProperty(t,e)}setLayoutProperty(t,e,n,r={}){return this.style.setLayoutProperty(t,e,n,r),this._update(!0)}getLayoutProperty(t,e){return this.style.getLayoutProperty(t,e)}setLight(t,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(t){return this._lazyInitEmptyStyle(),!t&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(t),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(t){return this._lazyInitEmptyStyle(),this.style.setFog(t),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(e){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(t.LngLat.convert(e),this.transform):0}setFeatureState(t,e){return this.style.setFeatureState(t,e),this._update()}removeFeatureState(t,e){return this.style.removeFeatureState(t,e),this._update()}getFeatureState(t){return this.style.getFeatureState(t)}_updateContainerDimensions(){if(!this._container)return;const e=this._container.getBoundingClientRect().width||400,n=this._container.getBoundingClientRect().height||300;let r,i,o,a=this._container;for(;a&&(!i||!o);){const e=t.window.getComputedStyle(a).transform;e&&"none"!==e&&(r=e.match(/matrix.*\((.+)\)/)[1].split(", "),r[0]&&"0"!==r[0]&&"1"!==r[0]&&(i=r[0]),r[3]&&"0"!==r[3]&&"1"!==r[3]&&(o=r[3])),a=a.parentElement}this._containerWidth=i?Math.abs(e/i):e,this._containerHeight=o?Math.abs(n/o):n}_detectMissingCSS(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described 
46in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=o("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();const e=this._canvasContainer=o("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=o("canvas","mapboxgl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const n=this._controlContainer=o("div","mapboxgl-control-container",t),r=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(t=>{r[t]=o("div",`mapboxgl-ctrl-${t}`,n)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,n){const r=t.exported.devicePixelRatio||1;this._canvas.width=r*Math.ceil(e),this._canvas.height=r*Math.ceil(n),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${n}px`}_addMarker(t){this._markers.push(t)}_removeMarker(t){const e=this._markers.indexOf(t);-1!==e&&this._markers.splice(e,1)}_addPopup(t){this._popups.push(t)}_removePopup(t){const e=this._popups.indexOf(t);-1!==e&&this._popups.splice(e,1)}_setupPainter(){const e=t.extend({},n.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",e)||this._canvas.getContext("experimental-webgl",e);r?(t.storeAuthState(r,!0),this.painter=new jr(r,this.transform),this.on("data",t=>{"source"===t.dataType&&this.painter.setTileLoadedFlag(!0)}),t.exported$1.testSupport(r)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))}_contextRestored(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))}_onMapScroll(t){if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(t){return this._update(),this._renderTaskQueue.add(t)}_cancelRenderFrame(t){this._renderTaskQueue.remove(t)}_requestDomTask(t){!this.loaded()||this.loaded()&&!this.isMoving()?t():this._domRenderTaskQueue.add(t)}_render(e){let n;const r=this.painter.context.extTimerQuery,i=t.exported.now();if(this.listens("gpu-timing-frame")&&(n=r.createQueryEXT(),r.beginQueryEXT(r.TIME_ELAPSED_EXT,n)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],t.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],t.window.performance.now())),this._renderTaskQueue.run(e),this._domRenderTaskQueue.run(e),this._removed)return;this._updateProjectionTransition();let o=!1;const a=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const e=this.transform.zoom,n=this.transform.pitch,r=t.exported.now();this.style.zoomHistory.update(e,r);const i=new t.EvaluationParameters(e,{now:r,fadeDuration:a,pitch:n,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),s=i.crossFadingFactor();1===s&&s===this._crossFadingFactor||(o=!0,this._crossFadingFactor=s),this.style.update(i)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let s=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),s=this._updateAverageElevation(i),this.style._updateSources(this.transform),this._forceMar
vendor: 5,270 bytes, line 46
46kerAndPopupUpdate()):s=this._updateAverageElevation(i),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,a,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:a,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||o)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),n){const e=t.exported.now()-i;r.endQueryEXT(r.TIME_ELAPSED_EXT,n),setTimeout(()=>{const o=r.getQueryObjectEXT(n,r.QUERY_RESULT_EXT)/1e6;r.deleteQueryEXT(n),this.fire(new t.Event("gpu-timing-frame",{cpuTime:e,gpuTime:o})),t.window.performance.mark("frame-gpu",{startTime:i,detail:{gpuTime:o}})},50)}if(this.listens("gpu-timing-layer")){const e=this.painter.collectGpuTimers();setTimeout(()=>{const n=this.painter.queryGpuTimers(e);this.fire(new t.Event("gpu-timing-layer",{layerTimes:n}))},50)}if(this.listens("gpu-timing-deferred-render")){const e=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const n=this.painter.queryGpuTimeDeferredRender(e);this.fire(new t.Event("gpu-timing-deferred-render",{gpuTime:n}))},50)}const l=this._sourcesDirty||this._styleDirty||this._placementDirty||s;if(l||this._repaint)this.triggerRepaint();else{const e=!this.isMoving()&&this.loaded();if(e&&(s=this._updateAverageElevation(i,!0)),s)this.triggerRepaint();else if(this._triggerFrame(!1),e&&(this.fire(new t.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const e=this._calculateSpeedIndex();this.fire(new t.Event("speedindexcompleted",{speedIndex:e})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||l||(this._fullyLoaded=!0,t.LivePerformanceUtils.mark(t.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&t.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.painter.transform.projection,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(t){for(const e of this._markers)t&&!this.getRenderWorldCopies()&&(e._lngLat=e._lngLat.wrap()),e._update();for(const e of this._popups)!t||this.getRenderWorldCopies()||e._trackPointer||(e._lngLat=e._lngLat.wrap()),e._update()}_updateAverageElevation(t,e=!1){const n=t=>(this.transform.averageElevation=t,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&n(0);if((e||t-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(t)){const e=this.transform.averageElevation;let r=this.transform.sampleAverageElevation(),i=!1;this.transform.elevation&&(i=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(r)?r=0:this._averageElevationLastSampledAt=t;const o=Math.abs(e-r);if(o>1){if(this._isInitialLoad||i)return this._averageElevation.jumpTo(r),n(r);this._averageElevation.easeTo(r,t,300)}else if(o>1e-4)return this._averageElevation.jumpTo(r),n(r)}return!!this._averageElevation.isEasing(t)&&n(this._averageElevation.getValue(t))}_authenticate(){t.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,e=>{if(e&&(e.message===t.AUTH_ERR_MSG||401===e.status)){const e=this.painter.context.gl;t.storeAuthState(e,!1),this._logoControl instanceof Ji&&this._logoControl._updateLogo(),e&&e.clear(e.DEPTH_BUFFER_BIT|e.COLOR_BUFFER_BIT|e.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new t.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),t.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){this.painter.updateTerrain(this.style,this.isMoving()||this.isRotating()||this.isZooming())}_calculateSpeedIndex(){const t=this.painter.canvasCopy(),e=this.painter.getCanvasCopiesAndTimestamps();e.timeStamps.push(performance.now());const n=this.painter.context.gl,r=n.createFramebuffer();function i(t){n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,t,0);const e=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);return n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,e),e}return n.bindFramebuffer(n.FRAMEBUFFER,r),this._canvasPixelComparison(i(t),e.canvasCopies.map(i),e.t
vendor: 4,983 bytes, line 46
46imeStamps)}_canvasPixelComparison(t,e,n){let r=n[1]-n[0];const i=t.length/4;for(let o=0;o<e.length;o++){const a=e[o];let s=0;for(let e=0;e<a.length;e+=4)a[e]===t[e]&&a[e+1]===t[e+1]&&a[e+2]===t[e+2]&&a[e+3]===t[e+3]&&(s+=1);r+=(n[o+2]-n[o+1])*(1-s/i)}return r}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("orientationchange",this._onWindowResize,!1),t.window.removeEventListener("webkitfullscreenchange",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e&&e.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),co(this._canvasContainer),co(this._controlContainer),co(this._missingCSSCanary),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),t.removeAuthState(this.painter.context.gl),this._removed=!0,this.fire(new t.Event("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(e){this._renderNextFrame=this._renderNextFrame||e,this.style&&!this._frame&&(this._frame=t.exported.frame(t=>{const e=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,e&&this._render(t)}))}_preloadTiles(e){const n=this.style?Object.values(this.style._sourceCaches):[];return t.asyncAll(n,(t,n)=>t._preloadTiles(e,n),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(t){this._trackResize&&this.resize({originalEvent:t})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(t){this._showTerrainWireframe!==t&&(this._showTerrainWireframe=t,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(t){this._speedIndexTiming!==t&&(this._speedIndexTiming=t,this._update())}get showPadding(){return!!this._showPadding}set showPadding(t){this._showPadding!==t&&(this._showPadding=t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())}get repaint(){return!!this._repaint}set repaint(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(t){this._vertices=t,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(t){this._showTileAABBs!==t&&(this._showTileAABBs=t,t&&this._update())}_setCacheLimits(e,n){t.setCacheLimits(e,n)}get version(){return t.version}},NavigationControl:class{constructor(e){this.options=t.extend({},uo,e),this._container=o("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",t=>{this._map&&this._map.zoomIn({},{originalEvent:t})}),o("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",t=>{this._map&&this._map.zoomOut({},{originalEvent:t})}),o("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",t=>{const e=this._map;e&&(this.options.visualizePitch?e.resetNorthPitch({},{originalEvent:t}):e.resetNorth({},{originalEvent:t}))}),this._compassIcon=o("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const t=this._map;if(!t)return;const e=t.getZoom(),n=e===t.getMaxZoom(),r=e===t.getMinZoom();this._zoomInButton.disabled=n,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",n.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())}_rotateCompassArrow(){const t=this._map;if(!t)return;const e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(t.transform.pitch*(Math.PI/180)
46),.5)}) rotateX(${t.transform.pitch}deg) rotateZ(${t.transform.angle*(180/Math.PI)}deg)`:`rotate(${t.transform.angle*(180/Math.PI)}deg)`;t._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=e)})}onAdd(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),t.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&t.on("pitch",this._rotateCompassArrow),t.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ho(t,this._compass,this.options.visualizePitch)),this._container}onRemove(){const t=this._map;t&&(this._container.remove(),this.options.showZoom&&t.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&t.off("pitch",this._rotateCompassArrow),t.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(t,e){const n=o("button",t,this._container);return n.type="button",n.addEventListener("click",e),n}_setButtonTitle(t,e){if(!this._map)return;const n=this._map._getUIString(`NavigationControl.${e}`);t.setAttribute("aria-label",n),t.firstElementChild&&t.firstElementChild.setAttribute("title",n)}},GeolocateControl:class extends t.Evented{constructor(e){super(),this.options=t.extend({geolocation:t.window.navigator.geolocation},po,e),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Jr(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(t){return this._map=t,this._container=o("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(e){const n=(t=!!this.options.geolocation)=>{this._supportsGeolocation=t,e(t)};void 0!==this._supportsGeolocation?e(this._supportsGeolocation):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(t=>n("denied"!==t.state)).catch(()=>n()):n()}_isOutOfMapMaxBounds(t){const e=this._map.getMaxBounds(),n=t.coords;return!!e&&(n.longitude<e.getWest()||n.longitude>e.getEast()||n.latitude<e.getSouth()||n.latitude>e.getNorth())}_setErrorState(){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")}}_onSuccess(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();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()}}_updateCamera(e){const n=new t.LngLat(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,i=this._map.getBearing(),o=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})}_updateMarker(e){if(e){const n=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const e=this._map.transform,n=t.mercatorZfromAltitude(1,e._center.lat)*e.worldSize,r=Math.ceil(2*this._accuracy*n);this._circleElement.style.width=`${r}px`,this._circleElement.style.height=`${r}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&"number"==typeof this._heading?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(e){if(this._map){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"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&this._noTimeout)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(e){if(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=o("button","mapboxgl-ctrl-geolocate",this._container),o("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
46se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o("div","mapboxgl-user-location"),this._dotElement.appendChild(o("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(o("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new no({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=o("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new no({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",e=>{e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new t.Event("trackuserlocationend")))})}_onDeviceOrientation(t){this._userLocationDotMarker&&(t.webkitCompassHeading?this._heading=t.webkitCompassHeading:!0===t.absolute&&(this._heading=-1*t.alpha),this._updateMarkerRotationThrottled())}trigger(){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._numberOfWatches--,this._noTimeout=!1,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")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(t={maximumAge:6e5,timeout:0},this._noTimeout=!0):(t=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,t),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const e=()=>{t.window.addEventListener("ondeviceorientationabsolute"in t.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};void 0!==t.window.DeviceMotionEvent&&"function"==typeof t.window.DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(t=>{"granted"===t&&e()}).catch(console.error):e()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),t.window.removeEventListener("deviceorientation",this._onDeviceOrientation),t.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","fal
46se"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Ki,ScaleControl:class{constructor(e){this.options=t.extend({},fo,e),function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"narrow",unit:"meter"}),!0}catch(t){return!1}}()||(this._setScale=mo.bind(this)),t.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const t=this.options.maxWidth||100,e=this._map,n=e._containerHeight/2,r=e._containerWidth/2-t/2,i=e.unproject([r,n]),o=e.unproject([r+t,n]),a=i.distanceTo(o);if("imperial"===this.options.unit){const e=3.2808*a;e>5280?this._setScale(t,e/5280,"mile"):this._setScale(t,e,"foot")}else"nautical"===this.options.unit?this._setScale(t,a/1852,"nautical-mile"):a>=1e3?this._setScale(t,a/1e3,"kilometer"):this._setScale(t,a,"meter")}_setScale(t,e,n){const r=go(e),i=r/e;this._map._requestDomTask(()=>{this._container.style.width=t*i+"px",this._container.innerHTML="nautical-mile"!==n?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"narrow",unit:n}).format(r):`${r}&nbsp;nm`})}onAdd(t){return this._map=t,this._language=t.getLanguage(),this._container=o("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(t){this._language=t,this._update()}setUnit(t){this.options.unit=t,this._update()}},FullscreenControl:class{constructor(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in t.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=o("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!t.window.document.fullscreenEnabled&&!t.window.document.webkitFullscreenEnabled)}_setupUI(){const e=this._fullscreenButton=o("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",t)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(t.window.document.fullscreenElement||t.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends t.Evented{constructor(e){super(),this.options=t.extend(Object.create(ro),e),t.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(e&&e.className?e.className.trim().split(/\s+/):[])}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&e.on("preclick",this._onClose),this.options.closeOnMove&&e.on("move",this._onClose),e.on("remove",this.remove),this._update(),e._addPopup(this),this._focusFirstElement(),this._trackPointer?(e.on("mousemove",this._onMouseEvent),e.on("mouseup",this._onMouseEvent),e._canvasContainer.classList.add("mapboxgl-track-pointer")):e.on("move",this._update),this.fire(new t.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const e=this._map;return e&&(e.off("move",this._update),e.off("move",this._onClose),e.off("preclick",this._onClose),e.off("click",this._onClose),e.off("remove",this.remove),e.off("mousemove",this._onMouseEvent),e.off("mouseup",this._onMouseEvent),e.off("drag",this._onMouseEvent),e._canvasContainer&&e._canvasContainer.classList.remove("mapboxgl-track-pointer"),e._removePopup(this),this._map=void 0),this.fire(new t.Event("close")),this}getLngLat(){return this._lngLat}
vendor: 3,856 bytes, line 46
46setLngLat(e){this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update();const n=this._map;return n&&(n.on("move",this._update),n.off("mousemove",this._onMouseEvent),n._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const t=this._map;return t&&(t.off("move",this._update),t.on("mousemove",this._onMouseEvent),t.on("drag",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(t.window.document.createTextNode(e))}setHTML(e){const n=t.window.document.createDocumentFragment(),r=t.window.document.createElement("body");let i;for(r.innerHTML=e;i=r.firstChild,i;)n.appendChild(i);return this.setDOMContent(n)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(t){return this.options.maxWidth=t,this._update(),this}setDOMContent(t){let e=this._content;if(e)for(;e.hasChildNodes();)e.firstChild&&e.removeChild(e.firstChild);else e=this._content=o("div","mapboxgl-popup-content",this._container||void 0);if(e.appendChild(t),this.options.closeButton){const t=this._closeButton=o("button","mapboxgl-popup-close-button",e);t.type="button",t.setAttribute("aria-label","Close popup"),t.setAttribute("aria-hidden","true"),t.innerHTML="&#215;",t.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(t){return this._classList.add(t),this._updateClassList(),this}removeClassName(t){return this._classList.delete(t),this._updateClassList(),this}setOffset(t){return this.options.offset=t,this._update(),this}toggleClassName(t){let e;return this._classList.delete(t)?e=!1:(this._classList.add(t),e=!0),this._updateClassList(),e}_onMouseEvent(t){this._update(t.point)}_getAnchor(t){if(this.options.anchor)return this.options.anchor;const e=this._map,n=this._container,r=this._pos;if(!e||!n||!r)return"bottom";const i=n.offsetWidth,o=n.offsetHeight,a=r.x<i/2,s=r.x>e.transform.width-i/2;if(r.y+t<o)return a?"top-left":s?"top-right":"top";if(r.y>e.transform.height-o){if(a)return"bottom-left";if(s)return"bottom-right"}return a?"left":s?"right":"bottom"}_updateClassList(){const t=this._container;if(!t)return;const e=[...this._classList];e.push("mapboxgl-popup"),this._anchor&&e.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&e.push("mapboxgl-popup-track-pointer"),t.className=e.join(" ")}_update(e){const n=this._map,r=this._content;if(!n||!this._lngLat&&!this._trackPointer||!r)return;let i=this._container;if(i||(i=this._container=o("div","mapboxgl-popup",n.getContainer()),this._tip=o("div","mapboxgl-popup-tip",i),i.appendChild(r)),this.options.maxWidth&&i.style.maxWidth!==this.options.maxWidth&&(i.style.maxWidth=this.options.maxWidth),n.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=to(this._lngLat,this._pos,n.transform)),!this._trackPointer||e){const t=this._pos=this._trackPointer&&e?e:n.project(this._lngLat),r=oo(this.options.offset),i=this._anchor=this._getAnchor(r.y),o=oo(this.options.offset,i),a=t.add(o).round();n._requestDomTask(()=>{this._container&&i&&(this._container.style.transform=`${eo[i]} translate(${a.x}px,${a.y}px)`)})}if(!this._marker&&n._showingGlobe()){const e=t.isLngLatBehindGlobe(n.transform,this._lngLat)?0:1;this._setOpacity(e)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const t=this._container.querySelector(io);t&&t.focus()}_onClose(){this.remove()}_setOpacity(t){this._container&&(this._container.style.opacity=`${t}`),this._content&&(this._content.style.pointerEvents=t?"auto":"none")}},Marker:no,Style:tn,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.pointGeometry,MercatorCoordinate:t.MercatorCoordinate,FreeCameraOptions:Ur,Evented:t.
vendor: 6,561 bytes, lines 46-71
46Evented,config:t.config,prewarm:function(){$t().acquire(jt)},clearPrewarmedResources:function(){const t=Nt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(jt),Nt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Ft.workerCount},set workerCount(t){Ft.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage(e){t.clearTileCache(e)},workerUrl:"",workerClass:null,setNow:t.exported.setNow,restoreNow:t.exported.restoreNow};return yo});var i=n;return i})},e1b7:function(t,e,n){n("522e"),t.exports=n("584a").Object.freeze},e4ae:function(t,e,n){var r=n("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e683:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},e692:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},e6f3:function(t,e,n){var r=n("07e3"),i=n("36c3"),o=n("5b4e")(!1),a=n("5559")("IE_PROTO");t.exports=function(t,e){var n,s=i(t),l=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);while(e.length>l)r(s,n=e[l++])&&(~o(c,n)||c.push(n));return c}},e829:function(t,e,n){n("2f37"),t.exports=n("584a").Date.now},e853:function(t,e,n){var r=n("d3f4"),i=n("1169"),o=n("2b4c")("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},e9c6:function(t,e,n){n("87a4"),t.exports=Math.pow(2,-52)},ebd6:function(t,e,n){var r=n("cb7c"),i=n("d8e8"),o=n("2b4c")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},ebfd:function(t,e,n){var r=n("62a0")("meta"),i=n("f772"),o=n("07e3"),a=n("d9f6").f,s=0,l=Object.isExtensible||function(){return!0},c=!n("294c")(function(){return l(Object.preventExtensions({}))}),u=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[r].i},d=function(t,e){if(!o(t,r)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[r].w},p=function(t){return c&&f.NEED&&l(t)&&!o(t,r)&&u(t),t},f=t.exports={KEY:r,NEED:!1,fastKey:h,getWeak:d,onFreeze:p}},f0bd:function(t,e,n){"use strict";(function(t){
47/**!
48 * @fileOverview Kickass library to create and place poppers near their reference elements.
49 * @version 1.16.1
50 * @license
51 * Copyright (c) 2016 Federico Zivolo and contributors
52 *
53 * Permission is hereby granted, free of charge, to any person obtaining a copy
54 * of this software and associated documentation files (the "Software"), to deal
55 * in the Software without restriction, including without limitation the rights
56 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
57 * copies of the Software, and to permit persons to whom the Software is
58 * furnished to do so, subject to the following conditions:
59 *
60 * The above copyright notice and this permission notice shall be included in all
61 * copies or substantial portions of the Software.
62 *
63 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
64 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
66 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
67 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
68 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
69 * SOFTWARE.
70 */
71var n="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,r=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(n&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();function i(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}function o(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},r))}}var a=n&&window.Promise,s=a?i:o;function l(t){var e={};return t&&"[object Function]"===e.toString.call(t)}function c(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView,r=n.getComputedStyle(t,null);return e?r[e]:r}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function h(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=c(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:h(u(t))}function d(t){return t&&t.referenceNode?t.referenceNode:t}var p=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function m(t){return 11===t?p:10===t?f:p||f}function g(t){if(!t)return document.documentElement;var e=m(10)?document.body:null,n=t.offsetParent||null;while(n===e&&t.nextElementSibling)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===c(n,"position")?g(n):n:t?t.ownerDocument.documentElement:document.documentElement}function y(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||g(t.firstElementChild)===t)}function _(t){return null!==t.parentNode?_(t.parentNode):t}function v(t,e){if(!t||!t.nodeType||!e||!e.nodeType)return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||r.contains(i))return y(a)?a:g(a);var s=_(t);return s.host?v(s.host,e):v(t,_(e).host)}function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var i=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||i;return o[n]}return t[n]}function x(t,e){var n=arguments.length>
vendor: 15,480 bytes, line 71
712&&void 0!==arguments[2]&&arguments[2],r=b(e,"top"),i=b(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}function w(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+r+"Width"])}function S(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],m(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function T(t){var e=t.body,n=t.documentElement,r=m(10)&&getComputedStyle(n);return{height:S("Height",e,n,r),width:S("Width",e,n,r)}}var E=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},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}}(),O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},P=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 k(t){return P({},t,{right:t.left+t.width,bottom:t.top+t.height})}function A(t){var e={};try{if(m(10)){e=t.getBoundingClientRect();var n=b(t,"top"),r=b(t,"left");e.top+=n,e.left+=r,e.bottom+=n,e.right+=r}else e=t.getBoundingClientRect()}catch(d){}var i={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?T(t.ownerDocument):{},a=o.width||t.clientWidth||i.width,s=o.height||t.clientHeight||i.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var h=c(t);l-=w(h,"x"),u-=w(h,"y"),i.width-=l,i.height-=u}return k(i)}function I(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=m(10),i="HTML"===e.nodeName,o=A(t),a=A(e),s=h(t),l=c(e),u=parseFloat(l.borderTopWidth),d=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var p=k({top:o.top-a.top-u,left:o.left-a.left-d,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!r&&i){var f=parseFloat(l.marginTop),g=parseFloat(l.marginLeft);p.top-=u-f,p.bottom-=u-f,p.left-=d-g,p.right-=d-g,p.marginTop=f,p.marginLeft=g}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(p=x(p,e)),p}function M(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=I(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:b(n),s=e?0:b(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return k(l)}function D(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===c(t,"position"))return!0;var n=u(t);return!!n&&D(n)}function B(t){if(!t||!t.parentElement||m())return document.documentElement;var e=t.parentElement;while(e&&"none"===c(e,"transform"))e=e.parentElement;return e||document.documentElement}function z(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?B(t):v(t,d(e));if("viewport"===r)o=M(a,i);else{var s=void 0;"scrollParent"===r?(s=h(u(e)),"BODY"===s.nodeName&&(s=t.ownerDocument.documentElement)):s="window"===r?t.ownerDocument.documentElement:r;var l=I(s,a,i);if("HTML"!==s.nodeName||D(a))o=l;else{var c=T(t.ownerDocument),p=c.height,f=c.width;o.top+=l.top-l.marginTop,o.bottom=p+l.top,o.left+=l.left-l.marginLeft,o.right=f+l.left}}n=n||0;var m="number"===typeof n;return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function L(t){var e=t.width,n=t.height;return e*n}function R(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=z(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map(function(t){return P({key:t},s[t],{area:L(s[t])})}).sort(function(t,e){return e.area-t.area}),c=l.filter(function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight}),u=c.length>0?c[0].key:l[0].key,h=t.split("-")[1];return u+(h?"-"+h:"")}function j(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?B(e):v(e,d(n));return I(n,i,r)}function F(t){var e=t.ownerDocument.defaultView,n=e.getComputedStyle(t),r=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),i=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),o={width:t.offsetWidth+i,height:t.offsetHeight+r};return o}function N(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function $(t,e,n){n=n.split("-")[0];var r=F(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=e[a]+e[l]/2-r[l]/2,i[s]=n===s?e[s]-r[c]:e[N(s)],i}function V(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function U(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var r=V(t,function(t){return t[e]===n});return t.indexOf(r)}function G(t,e,n){var r=void 0===n?t:t.slice(0,U(t,"name",n));return r.forEach(function(t){t["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t["function"]||t.fn;t.enabled&&l(n)&&(e.offsets.popper=k(e.offsets.popper),e.offsets.reference=k(e.offsets.reference),e=n(e,t))}),e}function H(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=R(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=$(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=G(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function q(t,e){return t.some(function(t){var n=t.name,r=t.enabled;return r&&n===e})}function W(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length;r++){var i=e[r],o=i?""+i+n:t;if("undefined"!==typeof document.body.style[o])return o}return null}function Z(){return this.state.isDestroyed=!0,q(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[W("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function X(t){var e=t.ownerDocument;return e?e.defaultView:window}function Y(t,e,n,r){var i="BODY"===t.nodeName,o=i?t.ownerDocument.defaultView:t;o.addEventListener(e,n,{passive:!0}),i||Y(h(o.parentNode),e,n,r),r.push(o)}function K(t,e,n,r){n.updateBound=r,X(t).addEventListener("resize",n.updateBound,{passive:!0});var i=h(t);return Y(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function J(){this.state.eventsEnabled||(this.state=K(this.reference,this.options,this.state,this.scheduleUpdate))}function Q(t,e){return X(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function tt(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=Q(this.reference,this.state))}function et(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function nt(t,e){Object.keys(e).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&et(e[n])&&(r="px"),t.style[n]=e[n]+r})}function rt(t,e){Object.keys(e).forEach(function(n){var r=e[n];!1!==r?t.setAttribute(n,e[n]):t.removeAttribute(n)})}function it(t){return nt(t.instance.popper,t.styles),rt(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&nt(t.arrowElement,t.arrowStyles),t}function ot(t,e,n,r,i){var o=j(i,e,t,n.positionFixed),a=R(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),nt(e,{position:n.positionFixed?"fixed":"absolute"}),n}function at(t,e){var n=t.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(t){return t},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(t.placement),h=-1!==t.placement.indexOf("-"),d=l%2===c%2,p=l%2===1&&c%2===1,f=e?u||h||d?o:a:s,m=e?o:s;return{left:f(p&&!h&&e?r.left-1:r.left),top:m(r.top),bottom:m(r.bottom),right:f(r.right)}}var st=n&&/Firefox/i.test(navigator.userAgent);function lt(t,e){var n=e.x,r=e.y,i=t.offsets.popper,o=V(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:e.gpuAcceleration,s=g(t.instance.popper),l=A(s),c={position:i.position},u=at(t,window.devicePixelRatio<2||!st),h="bottom"===n?"top":"bottom",d="right"===r?"left":"right",p=W("transform"),f=void 0,m=void 0;if(m="bottom"===h?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===d?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&p)c[p]="translate3d("+f+"px, "+m+"px, 0)",c[h]=0,c[d]=0,c.willChange="transform";else{var y="bottom"===h?-1:1,_="right"===d?-1:1;c[h]=m*y,c[d]=f*_,c.willChange=h+", "+d}var v={"x-placement":t.placement};return t.attributes=P({},v,t.attributes),t.styles=P({},c,t.styles),t.arrowStyles=P({},t.offsets.arrow,t.arrowStyles),t}function ct(t,e,n){var r=V(t,function(t){var n=t.name;return n===e}),i=!!r&&t.some(function(t){return t.name===n&&t.enabled&&t.order<r.order});if(!i){var o="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}function ut(t,e){var n;if(!ct(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"===typeof r){if(r=t.instance.popper.querySelector(r),!r)return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),u=l?"height":"width",h=l?"Top":"Left",d=h.toLowerCase(),p=l?"left":"top",f=l?"bottom":"right",m=F(r)[u];s[f]-m<a[d]&&(t.offsets.popper[d]-=a[d]-(s[f]-m)),s[d]+m>a[f]&&(t.offsets.popper[d]+=s[d]+m-a[f]),t.offsets.popper=k(t.offsets.popper);var g=s[d]+s[u]/2-m/2,y=c(t.instance.popper),_=parseFloat(y["margin"+h]),v=parseFloat(y["border"+h+"Width"]),b=g-t.offsets.popper[d]-_-v;return b=Math.max(Math.min(a[u]-m,b),0),t.arrowElement=r,t.offsets.arrow=(n={},O(n,d,Math.round(b)),O(n,p,""),n),t}function ht(t){return"end"===t?"start":"start"===t?"end":t}var dt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],pt=dt.slice(3);function ft(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=pt.indexOf(t),r=pt.slice(n+1).concat(pt.slice(0,n));return e?r.reverse():r}var mt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function gt(t,e){if(q(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=z(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=N(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case mt.FLIP:a=[r,i];break;case mt.CLOCKWISE:a=ft(r);break;case mt.COUNTERCLOCKWISE:a=ft(r,!0);break;default:a=e.behavior}return a.forEach(function(s,l){if(r!==s||a.length===l+1)return t;r=t.placement.split("-")[0],i=N(r);var c=t.offsets.popper,u=t.offsets.reference,h=Math.floor,d="left"===r&&h(c.right)>h(u.left)||"right"===r&&h(c.left)<h(u.right)||"top"===r&&h(c.bottom)>h(u.top)||"bottom"===r&&h(c.top)<h(u.bottom),p=h(c.left)<h(n.left),f=h(c.right)>h(n.right),m=h(c.top)<h(n.top),g=h(c.bottom)>h(n.bottom),y="left"===r&&p||"right"===r&&f||"top"===r&&m||"bottom"===r&&g,_=-1!==["top","bottom"].indexOf(r),v=!!e.flipVariations&&(_&&"start"===o&&p||_&&"end"===o&&f||!_&&"start"===o&&m||!_&&"end"===o&&g),b=!!e.flipVariationsByContent&&(_&&"start"===o&&f||_&&"end"===o&&p||!_&&"start"===o&&g||!_&&"end"===o&&m),x=v||b;(d||y||x)&&(t.flipped=!0,(d||y)&&(r=a[l+1]),x&&(o=ht(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=P({},t.offsets.popper,$(t.instance.popper,t.offsets.reference,t.placement)),t=G(t.instance.modifiers,t,"flip"))}),t}function yt(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(t.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(t.offsets.popper[l]=o(r[s])),t}function _t(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}var l=k(s);return l[e]/100*o}if("vh"===a||"vw"===a){var c=void 0;return c="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),c/100*o}return o}function vt(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map(function(t){return t.trim()}),s=a.indexOf(V(a,function(t){return-1!==t.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return c=c.map(function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)},[]).map(function(t){return _t(t,i,e,n)})}),c.forEach(function(t,e){t.forEach(function(n,r){et(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))})}),i}function bt(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=et(+n)?[+n,0]:vt(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t}function xt(t,e){var n=e.boundariesElement||g(t.instance.popper);t.instance.reference===n&&(n=g(n));var r=W("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=z(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=a,i[r]=s,e.boundaries=l;var c=e.priority,u=t.offsets.popper,h={primary:function(t){var n=u[t];return u[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(u[t],l[t])),O({},t,n)},secondary:function(t){var n="right"===t?"left":"top",r=u[n];return u[t]>
vendor: 4,319 bytes, line 71
71l[t]&&!e.escapeWithReference&&(r=Math.min(u[n],l[t]-("right"===t?u.width:u.height))),O({},n,r)}};return c.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";u=P({},u,h[e](t))}),t.offsets.popper=u,t}function wt(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:O({},l,o[l]),end:O({},l,o[l]+o[c]-a[c])};t.offsets.popper=P({},a,u[r])}return t}function St(t){if(!ct(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=V(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function Tt(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),t.placement=N(e),t.offsets.popper=k(i),t}var Et={shift:{order:100,enabled:!0,fn:wt},offset:{order:200,enabled:!0,fn:bt,offset:0},preventOverflow:{order:300,enabled:!0,fn:xt,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:yt},arrow:{order:500,enabled:!0,fn:ut,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:gt,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Tt},hide:{order:800,enabled:!0,fn:St},computeStyle:{order:850,enabled:!0,fn:lt,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:it,onLoad:ot,gpuAcceleration:void 0}},Ct={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Et},Ot=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};E(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=s(this.update.bind(this)),this.options=P({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(P({},t.Defaults.modifiers,i.modifiers)).forEach(function(e){r.options.modifiers[e]=P({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return P({name:t},r.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&l(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return C(t,[{key:"update",value:function(){return H.call(this)}},{key:"destroy",value:function(){return Z.call(this)}},{key:"enableEventListeners",value:function(){return J.call(this)}},{key:"disableEventListeners",value:function(){return tt.call(this)}}]),t}();Ot.Utils=("undefined"!==typeof window?window:t).PopperUtils,Ot.placements=dt,Ot.Defaults=Ct,e["a"]=Ot}).call(this,n("c8ba"))},f228:function(t,e,n){var r=n("40c3"),i=n("4517");t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f499:function(t,e,n){t.exports=n("a21f")},f605:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},f6b4:function(t,e,n){"use strict";var r=n("c532");function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},f772:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},f921:function(t,e,n){n("014b"),n("c207"),n("69d3"),n("765d"),t.exp
71orts=n("584a").Symbol},f9e3:function(t,e,n){},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},fe1e:function(t,e,n){n("7075")("Map")}}]);
72//# sourceMappingURL=chunk-vendors.6ec4df9e.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.