function printStackTrace(n){n=n||{guess:!0};var r=n.e||null,u=!!n.guess,t=new printStackTrace.implementation,i=t.run(r);return u?t.guessAnonymousFunctions(i):i}(function(){var n=window.onerror;window.onerror=function(t,i,r){var u=new XMLHttpRequest,e=window.cr.baseUrl+"/Error/LogJavascriptError",o=encodeURIComponent(printStackTrace().join("\n")),s=navigator.userAgent,f;return u!=null&&(f="Message="+t+"&Line="+r+"&Url="+i+"&UserAgent="+s+"&Stacktrace="+o,u.open("POST",e,!0),u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.send(f)),n(t,i,r)}})();printStackTrace.implementation=function(){};printStackTrace.implementation.prototype={run:function(n,t){return n=n||this.createException(),t=t||this.mode(n),t==="other"?this.other(arguments.callee):this[t](n)},createException:function(){try{this.undef()}catch(n){return n}},mode:function(n){return n.arguments&&n.stack?"chrome":n.stack&&n.sourceURL?"safari":typeof n.message=="string"&&typeof window!="undefined"&&window.opera?n.stacktrace?n.message.indexOf("\n")>-1&&n.message.split("\n").length>n.stacktrace.split("\n").length?"opera9":n.stack?n.stacktrace.indexOf("called from line")<0?"opera10b":"opera11":"opera10a":"opera9":n.stack?"firefox":"other"},instrumentFunction:function(n,t,i){n=n||window;var r=n[t];n[t]=function(){return i.call(this,printStackTrace().slice(4)),n[t]._instrumented.apply(this,arguments)};n[t]._instrumented=r},deinstrumentFunction:function(n,t){n[t].constructor===Function&&n[t]._instrumented&&n[t]._instrumented.constructor===Function&&(n[t]=n[t]._instrumented)},chrome:function(n){var t=(n.stack+"\n").replace(/^\S[^\(]+?[\n$]/gm,"").replace(/^\s+(at eval )?at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}()@$1$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm,"{anonymous}()@$1").split("\n");return t.pop(),t},safari:function(n){return n.stack.replace(/\[native code\]\n/m,"").replace(/^@/gm,"{anonymous}()@").split("\n")},firefox:function(n){return n.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^[\(@]/gm,"{anonymous}()@").split("\n")},opera11:function(n){for(var t,e,r,u=n.stacktrace.split("\n"),f=[],i=0,o=u.length;i<o;i+=2)t=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/.exec(u[i]),t&&(e=t[4]+":"+t[1]+":"+t[2],r=t[3]||"global code",r=r.replace(/<anonymous function: (\S+)>/,"$1").replace(/<anonymous function>/,"{anonymous}"),f.push(r+"@"+e+" -- "+u[i+1].replace(/^\s+/,"")));return f},opera10b:function(n){for(var t,f,r=n.stacktrace.split("\n"),u=[],i=0,e=r.length;i<e;i++)t=/^(.*)@(.+):(\d+)$/.exec(r[i]),t&&(f=t[1]?t[1]+"()":"global code",u.push(f+"@"+t[2]+":"+t[3]));return u},opera10a:function(n){for(var t,f,r=n.stacktrace.split("\n"),u=[],i=0,e=r.length;i<e;i+=2)t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i.exec(r[i]),t&&(f=t[3]||"{anonymous}",u.push(f+"()@"+t[2]+":"+t[1]+" -- "+r[i+1].replace(/^\s+/,"")));return u},opera9:function(n){for(var i,r=n.message.split("\n"),u=[],t=2,f=r.length;t<f;t+=2)i=/Line (\d+).*script (?:in )?(\S+)/i.exec(r[t]),i&&u.push("{anonymous}()@"+i[2]+":"+i[1]+" -- "+r[t+1].replace(/^\s+/,""));return u},other:function(n){for(var i="{anonymous}",t=[],r,u;n&&n.arguments&&t.length<10;)r=/function\s*([\w\-$]+)?\s*\(/i.test(n.toString())?RegExp.$1||i:i,u=Array.prototype.slice.call(n.arguments||[]),t[t.length]=r+"("+this.stringifyArguments(u)+")",n=n.caller;return t},stringifyArguments:function(n){for(var t,r=[],u=Array.prototype.slice,i=0;i<n.length;++i)t=n[i],t===undefined?r[i]="undefined":t===null?r[i]="null":t.constructor&&(t.constructor===Array?r[i]=t.length<3?"["+this.stringifyArguments(t)+"]":"["+this.stringifyArguments(u.call(t,0,1))+"..."+this.stringifyArguments(u.call(t,-1))+"]":t.constructor===Object?r[i]="#object":t.constructor===Function?r[i]="#function":t.constructor===String?r[i]='"'+t+'"':t.constructor===Number&&(r[i]=t));return r.join(",")},sourceCache:{},ajax:function(n){var t=this.createXMLHTTPObject();if(t)try{return t.open("GET",n,!1),t.send(null),t.responseText}catch(i){}return""},createXMLHTTPObject:function(){for(var i,t=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=0;n<t.length;n++)try{return i=t[n](),this.createXMLHTTPObject=t[n],i}catch(r){}},isSameDomain:function(n){return typeof location!="undefined"&&n.indexOf(location.hostname)!==-1},getSource:function(n){return n in this.sourceCache||(this.sourceCache[n]=this.ajax(n).split("\n")),this.sourceCache[n]},guessAnonymousFunctions:function(n){for(var i,o,t=0;t<n.length;++t){var u=n[t],f=/\{anonymous\}\(.*\)@(.*)/.exec(u);if(f&&(i=/^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/.exec(f[1]),i)){var r=i[1],e=i[2],s=i[3]||0;r&&this.isSameDomain(r)&&e&&(o=this.guessAnonymousFunction(r,e,s),n[t]=u.replace("{anonymous}",o))}}return n},guessAnonymousFunction:function(n,t){var i;try{i=this.findFunctionName(this.getSource(n),t)}catch(r){i="getSource failed with url: "+n+", exception: "+r.toString()}return i},findFunctionName:function(n,t){for(var u="",r,o=Math.min(t,20),i,f,e=0;e<o;++e)if(r=n[t-e-1],f=r.indexOf("//"),f>=0&&(r=r.substr(0,f)),r&&((u=r+u,i=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/.exec(u),i&&i[1])||(i=/function\s+([^(]*?)\s*\(([^)]*)\)/.exec(u),i&&i[1])||(i=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/.exec(u),i&&i[1])))return i[1];return"(?)"}},function(n,t){function r(){var n=".community-button,.community-switch-left,.community-switch-right,.community-icon",i="ui-state-hover";t("body").on("mouseenter",n,function(){t(this).hasClass("ui-state-disabled")||t(this).addClass(i)}).on("mouseleave",n,function(){t(this).removeClass(i)}).on("mouseup",n,function(){t(this).removeClass(i)}).on("click",n,function(){t(this).removeClass(i)})}function u(){t("body").on("keydown",":text",function(n){if(n.keyCode===13)return n.preventDefault(),!1})}var i=n.ui={};i.styleButton=function(n){n.addClass("community-button").addClass("ui-state-default").addClass("ui-corner-all")};t(document).ready(function(){r();u();atlas?t("#CanLoadMap").val(!0):t("#CanLoadMap").val(!1)})}(window.cr||{},jQuery),function(n,t){if(n.timeout){var f=(n.timeout-5)*6e4,r=5,s=(new Date).getTime(),i=null,e=null,o=t("#timeoutDialog");o.dialog({resizable:!1,autoOpen:!1,modal:!0,draggable:!1,closeOnEscape:!1,dialogClass:"no-close",height:200,width:350});function h(){t.get("RefreshTimeout");r=5}function u(){if(r==0)window.location=n.baseUrl;else{i=null;o.dialog("open");var f=r+" minutes";r===1&&(f="1 minute");t("#timeoutTime").text(f);r--;e=setTimeout(u,6e4)}}t("#btnTimeoutRefresh").click(function(){o.dialog("close");clearTimeout(e);e=null;i=setTimeout(u,f);h()});t('input[type="text"], textarea').keyup(function(){var n=(new Date).getTime();n-s>=3e5&&(i!==null&&clearTimeout(i),i=setTimeout(u,f),h(),s=n)});i=setTimeout(u,f)}}(window.cr||{},jQuery),function(n){n.fn.extend({counter:function(t){var u={type:"char",count:"down",goal:140,text:!0,target:!1,append:!0,translation:"",msg:""},f="",i="",e=!1,t=n.extend({},u,t),r={init:function(i){var e=i.attr("id"),o=e+"_count",u;r.isLimitless();u=n("<div/>").attr("id",e+"_counter").html("<span id="+o+"/> "+r.setMsg());t.target&&n(t.target).length?t.append?n(t.target).append(u):n(t.target).prepend(u):t.append?u.insertAfter(i):u.insertBefore(i);f=n("#"+o);r.bind(i)},bind:function(n){n.bind("keypress.counter keydown.counter keyup.counter blur.counter focus.counter change.counter paste.counter",r.updateCounter);n.bind("keydown.counter",r.doStopTyping);n.trigger("keydown")},isLimitless:function(){if(t.goal==="sky")return t.count="up",e=!0},setMsg:function(){if(t.msg!=="")return t.msg;if(t.text===!1)return"";if(e)return t.msg!==""?t.msg:"";this.text=t.translation||"character word left max";this.text=this.text.split(" ");this.chars="s ( )".split(" ");this.msg=null;switch(t.type){case"char":t.count===u.count&&t.text?this.msg=this.text[0]+this.chars[1]+this.chars[0]+this.chars[2]+" "+this.text[2]:t.count==="up"&&t.text&&(this.msg=this.text[0]+this.chars[0]+" "+this.chars[1]+t.goal+" "+this.text[3]+this.chars[2]);break;case"word":t.count===u.count&&t.text?this.msg=this.text[1]+this.chars[1]+this.chars[0]+this.chars[2]+" "+this.text[2]:t.count==="up"&&t.text&&(this.msg=this.text[1]+this.chars[1]+this.chars[0]+this.chars[2]+" "+this.chars[1]+t.goal+" "+this.text[3]+this.chars[2])}return this.msg},getWords:function(t){return t!==""?n.trim(t).replace(/\s+/g," ").split(" ").length:0},updateCounter:function(){var e=n(this);(i<0||i>t.goal)&&r.passedGoal(e);t.type===u.type?t.count===u.count?(i=t.goal-e.val().length,i<=0?f.text("0"):f.text(i)):t.count==="up"&&(i=e.val().length,f.text(i)):t.type==="word"&&(t.count===u.count?(i=r.getWords(e.val()),i<=t.goal?(i=t.goal-i,f.text(i)):f.text("0")):t.count==="up"&&(i=r.getWords(e.val()),f.text(i)));return},doStopTyping:function(n){var i=[46,8,9,35,36,37,38,39,40,32];if(r.isGoalReached(n)&&n.keyCode!==i[0]&&n.keyCode!==i[1]&&n.keyCode!==i[2]&&n.keyCode!==i[3]&&n.keyCode!==i[4]&&n.keyCode!==i[5]&&n.keyCode!==i[6]&&n.keyCode!==i[7]&&n.keyCode!==i[8])return t.type===u.type?!1:n.keyCode!==i[9]&&n.keyCode!==i[1]&&t.type!=u.type?!0:!1},isGoalReached:function(n,r){return e?!1:t.count===u.count?(r=0,i<=r?!0:!1):(r=t.goal,i>=r?!0:!1)},wordStrip:function(t,i){var r=i.replace(/\s+/g," ").split(" ").length;return i=n.trim(i),t<=0||t===r?i:(i=n.trim(i).split(" "),i.splice(t,r,""),n.trim(i.join(" ")))},passedGoal:function(n){var i=n.val();t.type==="word"&&n.val(r.wordStrip(t.goal,i));t.type==="char"&&n.val(i.substring(0,t.goal));t.type==="down"&&f.val("0");t.type==="up"&&f.val(t.goal)}};return this.each(function(){r.init(n(this))})}})}(jQuery),function(n,t){typeof exports=="object"&&typeof module!="undefined"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(n=n||self,t(n.atlas=n.atlas||{}))}(this,function(n){"use strict";function kst(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs");}function dst(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n["default"]:n}function nu(n,t){return t={exports:{}},n(t,t.exports),t.exports}function gst(n){return n&&n["default"]||n}function u(n,t){function i(){this.constructor=n}va(n,t);n.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}function tht(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u}function du(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})}function gu(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e}function e(n){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&n[t],r=0;if(i)return i.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.");}function ki(n,t){var i=typeof Symbol=="function"&&n[Symbol.iterator],r,u,f,e;if(!i)return n;r=i.call(n);f=[];try{while((t===void 0||t-->0)&&!(u=r.next()).done)f.push(u.value)}catch(o){e={error:o}}finally{try{u&&!u.done&&(i=r["return"])&&i.call(r)}finally{if(e)throw e.error;}}return f}function dt(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(ki(arguments[t]));return n}function oht(){this.__data__=[];this.size=0}function sht(n,t){return n===t||n!==n&&t!==t}function hht(n,t){for(var i=n.length;i--;)if(ee(n[i][0],t))return i;return-1}function aht(n){var t=this.__data__,i=gh(t,n),r;return i<0?!1:(r=t.length-1,i==r?t.pop():lht.call(t,i,1),--this.size,!0)}function vht(n){var t=this.__data__,i=gh(t,n);return i<0?undefined:t[i][1]}function yht(n){return gh(this.__data__,n)>-1}function pht(n,t){var i=this.__data__,r=gh(i,n);return r<0?(++this.size,i.push([n,t])):i[r][1]=t,this}function oe(n){var i=-1,r=n==null?0:n.length,t;for(this.clear();++i<r;)t=n[i],this.set(t[0],t[1])}function wht(){this.__data__=new yo;this.size=0}function bht(n){var t=this.__data__,i=t["delete"](n);return this.size=t.size,i}function kht(n){return this.__data__.get(n)}function dht(n){return this.__data__.has(n)}function ect(n){var r=uct.call(n,po),u=n[po],t,i;try{n[po]=undefined;t=!0}catch(f){}return i=fct.call(n),t&&(r?n[po]=u:delete n[po]),i}function cct(n){return hct.call(n)}function yct(n){return n==null?n===undefined?vct:act:ik&&ik in Object(n)?oct(n):lct(n)}function pct(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function gct(n){if(!iu(n))return!1;var t=nf(n);return t==bct||t==kct||t==wct||t==dct}function tlt(n){return!!rk&&rk in n}function flt(n){if(n!=null){try{return ult.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function alt(n){if(!iu(n)||ilt(n))return!1;var t=ya(n)?llt:elt;return t.test(tf(n))}function vlt(n,t){return n==null?undefined:n[t]}function ylt(n,t){var i=fk(n,t);return uk(i)?i:undefined}function blt(){this.__data__=bo?bo(null):{};this.size=0}function klt(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function iat(n){var t=this.__data__,i;return bo?(i=t[n],i===glt?undefined:i):tat.call(t,n)?t[n]:undefined}function eat(n){var t=this.__data__;return bo?t[n]!==undefined:fat.call(t,n)}function oat(n,t){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=bo&&t===undefined?sk:t,this}function se(n){var i=-1,r=n==null?0:n.length,t;for(this.clear();++i<r;)t=n[i],this.set(t[0],t[1])}function sat(){this.size=0;this.__data__={hash:new wa,map:new(wo||yo),string:new wa}}function hat(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function cat(n,t){var i=n.__data__;return lk(t)?i[typeof t=="string"?"string":"hash"]:i.map}function lat(n){var t=ko(this,n)["delete"](n);return this.size-=t?1:0,t}function aat(n){return ko(this,n).get(n)}function vat(n){return ko(this,n).has(n)}function yat(n,t){var i=ko(this,n),r=i.size;return i.set(n,t),this.size+=i.size==r?0:1,this}function he(n){var i=-1,r=n==null?0:n.length,t;for(this.clear();++i<r;)t=n[i],this.set(t[0],t[1])}function pat(n,t){var i=this.__data__,r;if(i instanceof yo){if(r=i.__data__,!wo||r.length<wk-1)return r.push([n,t]),this.size=++i.size,this;i=this.__data__=new ba(r)}return i.set(n,t),this.size=i.size,this}function ce(n){var t=this.__data__=new yo(n);this.size=t.size}function wat(n,t){for(var i=-1,r=n==null?0:n.length;++i<r;)if(t(n[i],i,n)===!1)break;return n}function dat(n,t,i){t=="__proto__"&&nc?nc(n,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[t]=i}function tvt(n,t,i){var r=n[t];nvt.call(n,t)&&ee(r,i)&&(i!==undefined||t in n)||ka(n,t,i)}function ivt(n,t,i,r){var s=!i,e,o,u,f;for(i||(i={}),e=-1,o=t.length;++e<o;)u=t[e],f=r?r(i[u],n[u],u,i,n):undefined,f===undefined&&(f=n[u]),s?ka(i,u,f):da(i,u,f);return i}function rvt(n,t){for(var i=-1,r=Array(n);++i<n;)r[i]=t(i);return r}function uvt(n){return n!=null&&typeof n=="object"}function fvt(n){return tr(n)&&nf(n)==dk}function cvt(){return!1}function yvt(n,t){var i=typeof n;return t=t==null?avt:t,!!t&&(i=="number"||i!="symbol"&&vvt.test(n))&&n>-1&&n%1==0&&n<t}function pvt(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=td}function wvt(n){return tr(n)&&id(n.length)&&!!ut[nf(n)]}function bvt(n){return function(t){return n(t)}}function nyt(n,t){var r=uf(n),u=!r&&ga(n),f=!r&&!u&&go(n),o=!r&&!u&&!f&&iv(n),s=r||u||f||o,e=s?kk(n.length,String):[],h=e.length;for(var i in n)!(t||gvt.call(n,i))||s&&(i=="length"||f&&(i=="offset"||i=="parent")||o&&(i=="buffer"||i=="byteLength"||i=="byteOffset")||nv(i,h))||e.push(i);return e}function tyt(n){var t=n&&n.constructor,i=typeof t=="function"&&t.prototype||fd;return n===i}function iyt(n,t){return function(i){return n(t(i))}}function oyt(n){var i,t;if(!tc(n))return uyt(n);i=[];for(t in Object(n))eyt.call(n,t)&&t!="constructor"&&i.push(t);return i}function syt(n){return n!=null&&id(n.length)&&!ya(n)}function hyt(n){return ns(n)?rv(n):od(n)}function cyt(n,t){return n&&ae(t,ic(t),n)}function lyt(n){var t=[],i;if(n!=null)for(i in Object(n))t.push(i);return t}function pyt(n){var r,i,t;if(!iu(n))return ayt(n);r=tc(n);i=[];for(t in n)t=="constructor"&&(r||!yyt.call(n,t))||i.push(t);return i}function wyt(n){return ns(n)?rv(n,!0):hd(n)}function byt(n,t){return n&&ae(t,ts(t),n)}function kyt(n,t){var i=-1,r=n.length;for(t||(t=Array(r));++i<r;)t[i]=n[i];return t}function dyt(n,t){for(var i=-1,f=n==null?0:n.length,e=0,u=[],r;++i<f;)r=n[i],t(r,i,n)&&(u[e++]=r);return u}function gyt(){return[]}function rpt(n,t){return ae(n,ev(n),t)}function upt(n,t){for(var i=-1,r=t.length,u=n.length;++i<r;)n[u+i]=t[i];return n}function spt(n,t){return ae(n,wd(n),t)}function hpt(n,t,i){var r=t(n);return uf(n)?r:pd(r,i(n))}function cpt(n){return sv(n,ic,ev)}function lpt(n){return sv(n,ts,wd)}function uwt(n){var i=n.length,t=new n.constructor(i);return i&&typeof n[0]=="string"&&rwt.call(n,"index")&&(t.index=n.index,t.input=n.input),t}function owt(n){var t=new n.constructor(n.byteLength);return new uc(t).set(new uc(n)),t}function swt(n,t){var i=t?fc(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}function hwt(n){var t=new n.constructor(n.source,rg.exec(n));return t.lastIndex=n.lastIndex,t}function lwt(n){return fg?Object(fg.call(n)):{}}function awt(n,t){var i=t?fc(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}function lbt(n,t,i){var r=n.constructor;switch(t){case nbt:return fc(n);case vwt:case ywt:return new r(+n);case tbt:return ig(n,i);case ibt:case rbt:case ubt:case fbt:case ebt:case obt:case sbt:case hbt:case cbt:return og(n,i);case pwt:return new r;case wwt:case dwt:return new r(n);case bwt:return cwt(n);case kwt:return new r;case gwt:return eg(n)}}function pbt(n){return typeof n.constructor=="function"&&!tc(n)?ybt(ov(n)):{}}function wbt(n){return tr(n)&&is(n)==hg}function nkt(n){return tr(n)&&is(n)==gbt}function ec(n,t,i,r,u,f){var e,s=t&ukt,h=t&fkt,p=t&ekt,c,o,l,a,y,v;if(i&&(e=u?i(n,r,u,f):i(n)),e!==undefined)return e;if(!iu(n))return n;if(c=uf(n),c){if(e=fwt(n),!s)return fv(n,e)}else{if(o=is(n),l=o==vg||o==okt,go(n))return uv(n,s);if(o==yg||o==ag||l&&!u){if(e=h||l?{}:vv(n),!s)return h?bd(n,cd(e,n)):yd(n,sd(e,n))}else{if(!tt[o])return u?n:{};e=abt(n,o,s)}}return(f||(f=new le),a=f.get(n),a)?a:(f.set(n,e),rkt(n)?n.forEach(function(r){e.add(ec(r,t,i,r,n,f))}):dbt(n)&&n.forEach(function(r,u){e.set(u,ec(r,t,i,u,n,f))}),y=p?h?apt:rc:h?keysIn:ic,v=c?undefined:y(n),bat(v||n,function(r,u){v&&(u=r,r=n[u]);da(e,u,ec(r,t,i,u,n,f))}),e)}function ckt(n){return pg(n,skt|hkt)}function bkt(n){return this.__data__.set(n,wkt),this}function kkt(n){return this.__data__.has(n)}function oc(n){var t=-1,i=n==null?0:n.length;for(this.__data__=new ba;++t<i;)this.add(n[t])}function dkt(n,t){for(var i=-1,r=n==null?0:n.length;++i<r;)if(t(n[i],i,n))return!0;return!1}function gkt(n,t){return n.has(t)}function rdt(n,t,i,r,u,f){var y=i&tdt,c=n.length,p=t.length,l,e,s,v;if(c!=p&&!(y&&p>c))return!1;if(l=f.get(n),l&&f.get(t))return l==t;var o=-1,h=!0,a=i&idt?new kg:undefined;for(f.set(n,t),f.set(t,n);++o<c;){if(e=n[o],s=t[o],r&&(v=y?r(s,e,o,t,n,f):r(e,s,o,n,t,f)),v!==undefined){if(v)continue;h=!1;break}if(a){if(!dg(t,function(n,t){if(!ndt(a,t)&&(e===n||u(e,n,i,r,f)))return a.push(t)})){h=!1;break}}else if(!(e===s||u(e,s,i,r,f))){h=!1;break}}return f["delete"](n),f["delete"](t),h}function udt(n){var i=-1,t=Array(n.size);return n.forEach(function(n,r){t[++i]=[r,n]}),t}function fdt(n){var i=-1,t=Array(n.size);return n.forEach(function(n){t[++i]=n}),t}function gdt(n,t,i,r,u,f,e){var o,h,s,c;switch(i){case ddt:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer;t=t.buffer;case kdt:return n.byteLength!=t.byteLength||!f(new uc(n),new uc(t))?!1:!0;case hdt:case cdt:case vdt:return ee(+n,+t);case ldt:return n.name==t.name&&n.message==t.message;case ydt:case wdt:return n==t+"";case adt:o=gg;case pdt:return(h=r&odt,o||(o=edt),n.size!=t.size&&!h)?!1:(s=e.get(n),s)?s==t:(r|=sdt,e.set(n,t),c=yv(o(n),o(t),r,u,f,e),e["delete"](n),c);case bdt:if(pv)return pv.call(n)==pv.call(t)}return!1}function ugt(n,t,i,r,u,f){var v=i&tgt,p=rc(n),w=p.length,d=rc(t),g=d.length,o,e,b,s,y,h,c,k,l,a;if(w!=g&&!v)return!1;for(o=w;o--;)if(e=p[o],!(v?e in t:rgt.call(t,e)))return!1;if(b=f.get(n),b&&f.get(t))return b==t;for(s=!0,f.set(n,t),f.set(t,n),y=v;++o<w;){if(e=p[o],h=n[e],c=t[e],r&&(k=v?r(c,h,e,t,n,f):r(h,c,e,n,t,f)),!(k===undefined?h===c||u(h,c,i,r,f):k)){s=!1;break}y||(y=e=="constructor")}return s&&!y&&(l=n.constructor,a=t.constructor,l!=a&&"constructor"in n&&"constructor"in t&&!(typeof l=="function"&&l instanceof l&&typeof a=="function"&&a instanceof a)&&(s=!1)),f["delete"](n),f["delete"](t),s}function sgt(n,t,i,r,u,f){var s=uf(n),p=uf(t),e=s?rn:is(n),o=p?rn:is(t),l,a,v,y;e=e==tn?sc:e;o=o==tn?sc:o;var h=e==sc,w=o==sc,c=e==o;if(c&&go(n)){if(!go(t))return!1;s=!0;h=!1}return c&&!h?(f||(f=new le),s||iv(n)?yv(n,t,i,r,u,f):ngt(n,t,e,i,r,u,f)):!(i&egt)&&(l=h&&un.call(n,"__wrapped__"),a=w&&un.call(t,"__wrapped__"),l||a)?(v=l?n.value():n,y=a?t.value():t,f||(f=new le),u(v,y,i,r,f)):c?(f||(f=new le),fgt(n,t,i,r,u,f)):!1}function en(n,t,i,r,u){return n===t?!0:n==null||t==null||!tr(n)&&!tr(t)?n!==n&&t!==t:fn(n,t,i,r,en,u)}function hgt(n,t){return on(n,t)}function ni(n){return n*vgt}function rs(n){return n*hn}function wv(n,t,i){return Math.min(Math.max(n,t),i)}function ln(n,t){var r=ni(t[1]-n[1]),u=ni(t[0]-n[0]),i=Math.pow(Math.sin(r/2),2)+Math.cos(ni(n[1]))*Math.cos(ni(t[1]))*Math.pow(Math.sin(u/2),2),f=2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i));return Math.round(hc*f*100)/100}function bv(n){if(n)switch(n.toLowerCase()){case"feet":case"foot":case"ft":return a.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return a.kilometers;case"miles":case"mile":case"mi":return a.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return a.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return a.yards;case"meters":case"metres":case"m":default:return a.meters}return a.meters}function an(n){if(n)switch(n.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return v.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return v.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return v.knotsPerSecond;case"standardgravity":case"g":return v.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return v.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return v.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return v.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return v.kilometersPerHourSecond;case"meterspersecondsquared":case"metrespersecondsquared":case"meterpersecondsquared":case"metrepersecondsquared":case"m/s^2":case"m/s2":default:return v.metersPerSecondSquared}return v.metersPerSecondSquared}function vn(n){if(n)switch(n){case"acres":case"ac":return it.acres;case"hectares":case"ha":return it.hectares;case"squareFeet":case"ft^2":case"ft2":return it.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return it.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return it.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return it.squareMiles;case"squareMeters":case"squareMetres":case"squareMeter":case"squareMetre":case"m^2":case"m2":default:return it.squareMeters}return it.squareMeters}function yn(n){if(n)switch(n.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return g.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return g.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return g.knots;case"mach":case"m":return g.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return g.kilometersPerHour;case"meterspersecond":case"metrespersecond":case"mps":case"ms":case"m/s":default:return g.metersPerSecond}return g.metersPerSecond}function pn(n){if(n)switch(n.toLowerCase()){case"milliseconds":case"ms":return d.ms;case"minutes":case"minute":case"mins":case"min":return d.minutes;case"hours":case"hour":case"hr":case"h":return d.hours;case"days":case"day":case"d":return d.days;case"seconds":case"second":case"secs":case"sec":case"s":default:return d.seconds}return d.seconds}function wn(n){var i=0,t,r;if(n&&n.length>0)for(i=Math.abs(bn(n[0])),t=1,r=n.length;t<r;t++)i-=Math.abs(bn(n[t]));return i}function bn(n){var r=0,t,i;if(n.length>=3){var u=void 0,f=void 0,e=void 0;for(t=0,i=n.length;t<i;t++)t===i-2?(u=i-2,f=i-1,e=0):t===i-1?(u=i-1,f=0,e=1):(u=t,f=t+1,e=t+2),r+=(ni(n[e][0])-ni(n[u][0]))*Math.sin(ni(n[f][1]));r=r*hc*hc/2}return r}function kn(n,t,i){return(n[0]-i[0])*(t[1]-i[1])-(n[1]-i[1])*(t[0]-i[0])}function ygt(n,t,i){var r,c,s;if(i.length>=2){var h=Infinity,u=void 0,f=null,e=us(i,22),o=void 0;for(r=0,c=e.length-1;r<c;r++)o=pgt(t,e[r],e[r+1]),u=gt.getDistance(t,o),u<h&&(h=u,f=o);if(f)return s=gv([f],22)[0],new ir(new hr(s),{distance:ai(n,s)})}else if(i.length===1)return new ir(new hr(i[0]),{distance:ai(n,i[0])});return null}function pgt(n,t,i){if(t[0]===i[0]&&t[1]===i[1])return t;var e=n[0]-t[0],o=n[1]-t[1],r=i[0]-t[0],u=i[1]-t[1],s=r*r+u*u,h=r*e+u*o,f=h/s;return f<0?t:f>1?i:[t[0]+r*f,t[1]+u*f]}function oi(n,t){if(!isNaN(n)&&typeof t=="number"&&t>=0){var i=void 0;i=t<cn.length?cn[t]:Math.pow(10,t);n=Math.round(n*i)/i}return n}function wgt(n){var i=st(c.getWest(n)),u=st(c.getEast(n)),t=vt(c.getNorth(n)),r=vt(c.getSouth(n)),f=c.getCenter(n),e=[[i,t],[i,r],[f[0],r],[u,r],[u,t],[f[0],t],[i,t]];return new lc([e])}function ru(n,t,i,r){switch(bv(t)){case a.meters:n/=1e3;break;case a.feet:n/=3280.8399;break;case a.miles:n/=.62137119;break;case a.yards:n/=1093.6133;break;case a.nauticalMiles:n/=.5399568}switch(bv(i)){case a.meters:n*=1e3;break;case a.feet:n*=3280.8399;break;case a.miles:n*=.62137119;break;case a.yards:n*=1093.6133;break;case a.nauticalMiles:n*=.5399568}if(typeof r=="number"&&r>=0){var u=Math.pow(10,r);n=Math.round(n*u)/u}return n}function bgt(n,t,i,r){var u,s,c,e,h,l,v,o,y,p,w,b,a,k,f;if(!n||n.length<=2)return u;for(typeof t!="number"&&(t=.5),(typeof i!="number"||i<=0)&&(i=15),s=n.length,u=n.slice(0),r?(fi.areEqual(u[0],u[s-1])&&(u.pop(),s--),u.unshift(n[s-1]),u.push(n[0]),u.push(n[1]),s++):(u.unshift(n[0]),u.push(n[s-1])),c=[],c.push([1,0,0,0]),f=1;f<i-1;f++)e=f/i,h=e*e,l=e*h,c.push([2*l-3*h+1,-2*l+3*h,l-2*h+e,l-h]);for(c.push([0,1,0,0]),v=[],f=1;f<s;f++)for(y=t*(u[f+1][0]-u[f-1][0]),p=t*(u[f+1][1]-u[f-1][1]),w=t*(u[f+2][0]-u[f][0]),b=t*(u[f+2][1]-u[f][1]),e=0;e<i;e++)o=c[e],k=o[0]*u[f][0]+o[1]*u[f+1][0]+o[2]*y+o[3]*w,a=o[0]*u[f][1]+o[1]*u[f+1][1]+o[2]*p+o[3]*b,a=wv(a,-85,85),v.push([k,a]);return v}function ye(n,t,i,r){r=r||"meters";n=ui(n);var s=dn(r),u=ni(n[1]),h=ni(n[0]),e=ni(t),f=i/s,o=Math.asin(Math.sin(u)*Math.cos(f)+Math.cos(u)*Math.sin(f)*Math.cos(e)),c=h+Math.atan2(Math.sin(e)*Math.sin(f)*Math.cos(u),Math.cos(f)-Math.sin(u)*Math.sin(o)),l=wv(vt(rs(o)),-85,85),a=st(rs(c));return[a,l]}function ai(n,t,i){n=ui(n);t=ui(t);var r=ln(n,t);return i==="meters"?r:ru(r,"meters",i||"meters")}function dn(n){var t=bv(n);return ru(hc,a.meters,t)}function kgt(n,t){var i,p,s,r,o;for((!t||t<=0)&&(t=15),Array.isArray(n)?i=n:n.type&&n.type==="LineString"&&(i=n.coordinates),p=i.length-1,s=[],r=0;r<p;r++){var u=ni(i[r][1]),h=ni(i[r][0]),f=ni(i[r+1][1]),c=ni(i[r+1][0]),e=2*Math.asin(Math.sqrt(Math.pow(Math.sin((u-f)/2),2)+Math.cos(u)*Math.cos(f)*Math.pow(Math.sin((h-c)/2),2)));for(o=0;o<=t;o++){var w=o/t,l=Math.sin((1-w)*e)/Math.sin(e),a=Math.sin(w*e)/Math.sin(e),b=l*Math.cos(u)*Math.cos(h)+a*Math.cos(f)*Math.cos(c),k=l*Math.cos(u)*Math.sin(h)+a*Math.cos(f)*Math.sin(c),d=l*Math.sin(u)+a*Math.sin(f),v=Math.atan2(d,Math.sqrt(Math.pow(b,2)+Math.pow(k,2))),y=Math.atan2(k,b);v=wv(rs(v),-85,85);y=rs(y);s.push([y,v])}}return s}function uu(n,t){if(n=ui(n),t=ui(t),n&&n.length>=2&&t&&t.length>=2){var r=ni(n[1]),i=ni(t[1]),u=ni(t[0]-n[0]),f=Math.sin(u)*Math.cos(i),e=Math.cos(r)*Math.sin(i)-Math.sin(r)*Math.cos(i)*Math.cos(u);return(rs(Math.atan2(f,e))+360)%360}return NaN}function kv(n,t){var u=0,i,r,f;for(Array.isArray(n)?i=n:n.type&&n.type==="LineString"&&(i=n.coordinates),r=0,f=i.length-1;r<f;r++)u+=ln(i[r],i[r+1]);return ru(u,"meters",t||"meters")}function gn(n,t,i){var f,e,r,o,u,s;if(i=i||"meters",f=0,Array.isArray(n)?r=n:n.type&&n.type==="LineString"&&(r=n.coordinates),r.length>=2){for(o=r.length,u=1;u<o;u++){if(e=ai(r[u-1],r[u],i),f+e>=t)return s=uu(r[u-1],r[u]),ye(r[u-1],s,t-f,i);f+=e}return t>=f?r[o-1]:r[0]}return null}function ntt(n,t,i,r,u){var e,o,f;for(r=r||"meters",u=u?u:0,n=ui(n),e=[],o=360/i,f=0;f<=i;f++)e.push(ye(n,(f*o+u)%360,t,r));return e}function dv(n,t,i){i=typeof i=="undefined"?.5:i;n=ui(n);t=ui(t);var r=ai(n,t,"kilometers"),u=uu(n,t);return ye(n,u,r*i,"kilometers")}function vt(n){return n>90?(n=(n+90)%360,n>180?270-n:n-90):n<-90?(n=(n-90)%360,n<-180?-90-(n+180):n+90):n}function st(n){return n>180?(n+180)%360-180:n<-180?(n-180)%360+180:n}function ttt(n,t,i){var u,f,e,r,o;if(i===0)return Object.assign({},n);for(t=ui(t),u=[],r=0,o=n.length;r<o;r++)f=ai(t,n[r]),e=uu(t,n[r]),u.push(ye(t,e+i,f));return u}function dgt(n,t){n=ui(n);t=ui(t);var i=ki(us([n,t],21),2),r=i[0],u=i[1],f=u[0]-r[0],e=r[1]-u[1];return(5/2*Math.PI-Math.atan2(e,f))*hn%360}function gv(n,t){for(var r=512*Math.pow(2,t),u=[],f,e,i=0,o=n.length;i<o;i++)f=n[i][0]/r-.5,e=.5-n[i][1]/r,u.push([360*f,90-360*Math.atan(Math.exp(-e*2*Math.PI))/Math.PI]);return u}function us(n,t){for(var u=512*Math.pow(2,t),f=[],e,o,r,i=0,s=n.length;i<s;i++)r=Math.sin(n[i][1]*Math.PI/180),e=(n[i][0]+180)/360,o=.5-Math.log((1+r)/(1-r))/(4*Math.PI),f.push([Math.round(e*u),Math.round(o*u)]);return f}function ny(n,t,i,r){switch(an(t)){case v.kilometersPerHourSecond:n/=3.6;break;case v.milesPerHourSecond:n/=2.236936292054;break;case v.knotsPerSecond:n/=1.943844492441;break;case v.standardGravity:n/=.1019716212978;break;case v.kilometersPerSecondSquared:n/=.001;break;case v.milesPerSecondSquared:n/=.000621371192;break;case v.feetPerSecondSquared:n/=3.280839895012;break;case v.yardsPerSecondSquared:n/=1.093613298338}switch(an(i)){case v.kilometersPerHourSecond:n*=3.6;break;case v.milesPerHourSecond:n*=2.236936292054;break;case v.knotsPerSecond:n*=1.943844492441;break;case v.standardGravity:n*=.1019716212978;break;case v.kilometersPerSecondSquared:n*=.001;break;case v.milesPerSecondSquared:n*=.000621371192;break;case v.feetPerSecondSquared:n*=3.280839895012;break;case v.yardsPerSecondSquared:n*=1.093613298338}return oi(n,r)}function itt(n,t,i,r){switch(vn(t)){case it.acres:n*=4046.8564224;break;case it.hectares:n*=1e4;break;case it.squareFeet:n*=.09290304;break;case it.squareKilometers:n*=1e6;break;case it.squareMiles:n*=259e4;break;case it.squareYards:n*=.83612736}switch(vn(i)){case it.acres:n/=4046.8564224;break;case it.hectares:n/=1e4;break;case it.squareFeet:n/=.09290304;break;case it.squareKilometers:n/=1e6;break;case it.squareMiles:n/=259e4;break;case it.squareYards:n/=.83612736}return oi(n,r)}function fs(n,t,i,r){switch(yn(t)){case g.feetPerSecond:n*=1.09728;break;case g.milesPerHour:n*=1.6093;break;case g.knots:n*=1.852;break;case g.metersPerSecond:n*=3.6;break;case g.mach:n*=1234.8}switch(yn(i)){case g.feetPerSecond:n/=1.09728;break;case g.milesPerHour:n/=1.6093;break;case g.knots:n/=1.852;break;case g.metersPerSecond:n/=3.6;break;case g.mach:n/=1234.8}return oi(n,r)}function es(n,t,i,r){switch(pn(t)){case d.ms:n/=1e3;break;case d.hours:n*=3600;break;case d.minutes:n*=60;break;case d.days:n*=86400}switch(pn(i)){case d.ms:n*=1e3;break;case d.hours:n/=3600;break;case d.minutes:n/=60;break;case d.days:n/=86400}return oi(n,r)}function rtt(n,t,i,r,u,f,e,o){var h=ru(t,u,a.meters),s=es(i,f,d.seconds),c=fs(n,r,g.metersPerSecond);return ny(2*(h-c*s)/(s*s),v.metersPerSecondSquared,e,o)}function utt(n,t,i,r,u,f,e){var o=fs(n,r,g.metersPerSecond),s=fs(t,r,g.metersPerSecond),h=es(i,u,d.seconds);return ny((s-o)/h,v.metersPerSecondSquared,f,e)}function ggt(n,t,i,r,u,f,e){var o,h,s,c,l;return typeof i=="string"&&n.type==="Feature"&&n.geometry.type==="Point"&&t.type==="Feature"&&t.geometry.type==="Point"&&(o=ett(n.properties[i],t.properties[i],d.seconds),!isNaN(o))?(h=0,r&&typeof r=="string"&&(s=n.properties[r],c=t.properties[r],typeof s=="number"&&(h=s,typeof c=="number")))?utt(s,c,o,u,d.seconds,f,e):(l=ai(n.geometry.coordinates,t.geometry.coordinates,a.meters),rtt(h,l,o,u,a.meters,d.seconds,f,e)):NaN}function ftt(n,t,i){var r,e,o,u,f,s;if(n){r=0;n=n instanceof yt?n.toJson():n;switch(n.type){case"Feature":if(e=n,e.geometry)return ftt(e.geometry,t,i);break;case"Polygon":o=n;o.coordinates&&(r=wn(o.coordinates));break;case"MultiPolygon":if(u=n,u.coordinates)for(f=0,s=u.coordinates.length;f<s;f++)r+=wn(u.coordinates[f])}return itt(r,it.squareMeters,t,i)}return 0}function nnt(n,t,i,r,u,f){var e=ui(n),o=ui(t),s,h;return e&&o?(s=es(i,r,d.seconds),h=ai(e,o,a.meters),fs(h/s,g.metersPerSecond,u,f)):0}function tnt(n,t,i,r,u){var f,e;return typeof i=="string"&&n.type==="Feature"&&n.geometry.type==="Point"&&t.type==="Feature"&&t.geometry.type==="Point"&&(f=this.getTimespan(n.properties[i],t.properties[i],d.seconds),!isNaN(f))?(e=this.getDistanceTo(n.geometry.coordinates,t.geometry.coordinates,a.meters),this.convertSpeed(e/f,g.metersPerSecond,r,u)):NaN}function ett(n,t,i,r){var u=ty(n),f=ty(t);return u!=null&&f!=null?es(f.getTime()-u.getTime(),d.ms,i,r):NaN}function int(n,t,i,r,u,f,e,o){t=this.convertTimespan(t,u,d.seconds);i=this.convertSpeed(i,f,g.metersPerSecond);var s=i*t;return typeof r=="number"&&(s+=.5*this.convertAcceleration(r,e,v.metersPerSecondSquared)*t*t),this.convertDistance(s,a.meters,n,o)}function ty(n){var t,i;if(Object.prototype.toString.call(n)==="[object Date]")return n;if(typeof n=="string"){if(t=Date.parse(n),!isNaN(t))return new Date(t);if(n.indexOf("Date(")>=0)return n=n.replace("/Date(","").replace(")/",""),i=0,i=n.indexOf("+")>0?parseInt(n.substr(0,n.indexOf("+")),10):n.indexOf("-")>0?parseInt(n.substr(0,n.indexOf("-")),10):parseInt(n,10),new Date(i)}else if(typeof n=="number")return new Date(n);return null}function rnt(n){var s,c,u=of(n).map(function(n){return[st(n[0]),vt(n[1])]}),t,f,r,h,i,o;u.sort(function(n,t){return n[0]===t[0]?n[1]-t[1]:n[0]-t[0]});t=[];try{for(f=e(u),r=f.next();!r.done;r=f.next()){for(h=r.value;t.length>=2&&kn(t[t.length-2],t[t.length-1],h)<=0;)t.pop();t.push(h)}}catch(l){s={error:l}}finally{try{r&&!r.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error;}}for(i=[],o=u.length-1;o>=0;o--){while(i.length>=2&&kn(i[i.length-2],i[i.length-1],u[o])<=0)i.pop();i.push(u[o])}return new lc([t.concat(i)])}function of(n){var t=[],r=null,u=null,e,f,s,i,h,o;if(Array.isArray(n)&&n.length>0)if(Array.isArray(n[0])&&typeof n[0][0]=="number")t=n;else for(f=n.length,i=0;i<f;i++)t=t.concat(of(n[i]));else if(n.type)switch(n.type){case"Point":t=[n.coordinates];break;case"LineString":t=n.coordinates;break;case"Polygon":r=n.coordinates;break;case"MultiPoint":t=n.coordinates;break;case"MultiLineString":r=n.coordinates;break;case"MultiPolygon":u=n.coordinates;break;case"Feature":e=n;t=yt._isCircle(e)?yt._getCirclePositions(e):of(e.geometry);break;case"FeatureCollection":t=of(n.features);break;case"GeometryCollection":t=of(n.geometries)}else if(n instanceof yt)return of(n.toJson());if(r)for(f=r.length,i=0;i<f;i++)t=t.concat(r[i]);else if(u)for(s=u.length,i=0;i<s;i++)for(h=u[i].length,o=0;o<h;o++)t=t.concat(u[i][o]);return t}function ui(n){if(Array.isArray(n)&&typeof n[0]=="number")return n;if(n.type){if(n.type==="Point")return n.coordinates;if(n.type==="Feature"&&n.geometry.type==="Point")return n.geometry.coordinates}else if(n instanceof yt&&n.getType()==="Point")return n.getCoordinates();return null}function unt(n,t){var i,r;if(t<2)return[];var u=[],f=kv(n,a.meters),e=f/(t-1);for(i=0;i<t;i++)r=gn(n,e*i,a.meters),r!=null&&u.push(r);return u}function ott(n,t,i){var f,o,r,e,u,s,h;if(i=i||"meters",f=0,Array.isArray(n)?r=n:n.type&&n.type==="LineString"&&(r=n.coordinates),r.length>=2){for(e=r.length,u=1;u<e;u++){if(o=ai(r[u-1],r[u],i),f+o>=t)return s=uu(r[u-1],r[u]),h=ye(r[u-1],s,t-f,i),new ir(new hr(h),{heading:s});f+=o}return t>=f?new ir(new hr(r[e-1]),{heading:uu(r[e-2],r[e-1])}):new ir(new hr(r[0]),{heading:uu(r[0],r[1])})}return null}function fnt(n,t){var i,r;if(t<=0)return[];var u=[],f=kv(n,a.meters),e=f/(t-1);for(i=0;i<t;i++)r=ott(n,e*i,a.meters),r!=null&&u.push(r);return u}function cc(n,t,i,r){var v=ui(n),y=us([v],22)[0],e=null,f,l=Infinity,h,a,c,s,u,o;t=t instanceof yt?t.toJson():t;switch(t.type){case"Feature":return cc(n,t.geometry,i);case"Point":f=[[t.coordinates]];break;case"MultiPoint":for(h=void 0,a=t.coordinates,u=0,o=a.length;u<o;u++)h=ai(v,a[u]),h<l&&(l=h,e=new ir(new hr(a[u]),{distance:h}));break;case"LineString":f=[t.coordinates];break;case"Polygon":case"MultiLineString":f=t.coordinates;break;case"MultiPolygon":if(c=t.coordinates,c.length>0)for(f=c[0],u=1,o=c.length;u<o;u++)f=f.concat(c[u])}if(f)for(s=void 0,u=0,o=f.length;u<o;u++)s=ygt(v,y,f[u]),s&&s.properties.distance<l&&(l=s.properties.distance,e=s);return e&&(e.properties.distance=ru(e.properties.distance,"meters",i,r)),e}function ent(n,t){return agt(n,t,!0)}function dnt(n,t){return t=typeof t=="function"?t:undefined,pg(n,bnt|knt,t)}function ati(n){var i,t;return!tr(n)||nf(n)!=oti?!1:(i=ov(n),i===null)?!0:(t=cti.call(i,"constructor")&&i.constructor,typeof t=="function"&&t instanceof t&&ltt.call(t)==lti)}function vti(n){return tr(n)&&n.nodeType===1&&!fy(n)}function yti(n,t,i){(i===undefined||ee(n[t],i))&&(i!==undefined||t in n)||ka(n,t,i)}function pti(n){return function(t,i,r){for(var s=-1,f=Object(t),e=r(t),o=e.length,u;o--;)if(u=e[n?o:++s],i(f[u],u,f)===!1)break;return t}}function dti(n){return tr(n)&&ns(n)}function gti(n,t){if(t!=="constructor"||typeof n[t]!="function")return t=="__proto__"?void 0:n[t]}function nii(n){return ae(n,ts(n))}function tii(n,t,i,r,u,f,e){var h=dc(n,i),o=dc(t,i),v=e.get(o),s,c;if(v){kc(n,i,v);return}if(s=f?f(h,o,i+"",n,t,e):undefined,c=s===undefined,c){var l=uf(o),a=!l&&go(o),y=!l&&!a&&iv(o);s=o;l||a||y?uf(h)?s=h:vtt(h)?s=fv(h):a?(c=!1,s=uv(o,!0)):y?(c=!1,s=og(o,!0)):s=[]:fy(o)||ga(o)?(s=h,ga(h)?s=ytt(h):(!iu(h)||ya(h))&&(s=vv(o))):c=!1}c&&(e.set(o,s),u(s,o,r,f,e),e["delete"](o));kc(n,i,s)}function wtt(n,t,i,r,u){n!==t&&kti(t,function(f,e){if(u||(u=new le),iu(f))ptt(n,t,e,i,wtt,r,u);else{var o=r?r(dc(n,e),f,e+"",n,t,u):undefined;o===undefined&&(o=f);kc(n,e,o)}},ts)}function iii(n){return n}function rii(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}function uii(n,t,i){return t=sy(t===undefined?n.length-1:t,0),function(){for(var f=arguments,r=-1,e=sy(f.length-t,0),o=Array(e),u;++r<e;)o[r]=f[t+r];for(r=-1,u=Array(t+1);++r<t;)u[r]=f[r];return u[t]=i(o),ktt(n,this,u)}}function fii(n){return function(){return n}}function aii(n){var t=0,i=0;return function(){var r=lii(),u=cii-(r-i);if(i=r,u>0){if(++t>=hii)return arguments[0]}else t=0;return n.apply(undefined,arguments)}}function wii(n,t){return pii(dtt(n,t,oy),n+"")}function bii(n,t,i){if(!iu(i))return!1;var r=typeof t;return(r=="number"?ns(i)&&nv(t,i.length):r=="string"&&t in i)?ee(i[t],n):!1}function kii(n){return gtt(function(t,i){var f=-1,r=i.length,u=r>1?i[r-1]:undefined,o=r>2?i[2]:undefined,e;for(u=n.length>3&&typeof u=="function"?(r--,u):undefined,o&&nit(i[0],i[1],o)&&(u=r<3?undefined:u,r=1),t=Object(t);++f<r;)e=i[f],e&&n(t,e,f,u);return t})}function pit(){return Object.assign({},pe)}function wit(){return rri}function ly(){return fit}function bit(){return eit}function kit(){return oit}function dit(){return wi.workerCount}function git(){return wi.maxParallelImageRequests}function nrt(){return rit}function trt(){return uit}function irt(){return pe.authType===n.AuthenticationType.subscriptionKey?pe.subscriptionKey:undefined}function uri(){return nl}function rrt(){return nl}function fri(){return dh.getFullVersion()}function ay(n){return iri.isIE()?!1:wi.supported({failIfMajorPerformanceCaveat:n})}function urt(n){pe=(new iit).merge(pe,n);cy=!0}function frt(n){fit=n;sit=!0}function ert(n){eit=n;hit=!0}function ort(n){oit=n;cit=!0}function srt(n){n>0&&(wi.workerCount=n,lit=!0)}function hrt(n){n>0&&(wi.maxParallelImageRequests=n,ait=!0)}function crt(n){rit=gc.getCode(n);vit=!0}function lrt(n){uit=n;yit=!0}function art(n){pe.setSubscriptionKey(n);cy=!0}function vrt(n){nl=n;hy=!0}function eri(n){nl=n;hy=!0}function ori(n,t,i){(i||!bs[n.toLowerCase()])&&(bs[n.toLowerCase()]=t)}function yrt(n,t){if(t=Math.abs(t||1),typeof n=="string"&&bs[n.toLowerCase()]){for(var r=bs[n.toLowerCase()],f=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,u=r,i=f.exec(r);i;)u=u.replace(i[0],parseFloat(i[1])*t+""),i=f.exec(r);return u.replace("{scale}",t+"")}throw new Error("Invalid templateName.");}function sri(){return Object.keys(bs)}function hri(){wi.prewarm()}function cri(){wi.clearPrewarmedResources()}function vy(){return cy}function prt(){return sit}function wrt(){return hit}function brt(){return cit}function krt(){return lit}function drt(){return ait}function grt(){return vit}function nut(){return yit}function tut(){return hy}function lri(){return bi.domain}function ari(){return ly()}function be(){return typeof globalThis!==fu&&globalThis?globalThis:typeof self!==fu&&self?self:typeof window!==fu&&window?window:typeof global!==fu&&global?global:null}function by(n){throw new TypeError(n);}function ky(n){function r(){}var i=pri,t;return i?i(n):n==null?{}:(t=typeof n,t!==br&&t!==ks&&by("Object prototype may only be an Object:"+n),r[di]=n,new r)}function k(n,t){function i(){this.constructor=n}typeof t!==ks&&t!==null&&by("Class extends value "+String(t)+" is not a constructor or null");dy(n,t);n[di]=t===null?ky(t):(i[di]=t[di],new i)}function eu(n,t){return n&&fl[kr].hasOwnProperty.call(n,t)}function eut(n){return n&&(n===fl[kr]||n===Array[kr])}function ip(n){return eut(n)||n===Function[kr]}function lf(n){if(n){if(nh)return nh(n);var t=n[dri]||n[kr]||(n[il]?n[il][kr]:null);if(t)return t}return null}function el(n,t){var i=[],f=fl.getOwnPropertyNames,r,u;if(f)i=f(n);else for(r in n)typeof r=="string"&&eu(n,r)&&i.push(r);if(i&&i.length>0)for(u=0;u<i.length;u++)t(i[u])}function rp(n,t,i){return t!==il&&typeof n[t]===rl&&(i||eu(n,t))}function ol(n){throw new TypeError("DynamicProto: "+n);}function gri(n){var t={};return el(n,function(i){!t[i]&&rp(n,i,!1)&&(t[i]=n[i])}),t}function up(n,t){for(var i=n.length-1;i>=0;i--)if(n[i]===t)return!0;return!1}function nui(n,t,i,r){function o(n,t,i){var u=t[i],f;return u[gy]&&r&&(f=n[ul]||{},f[gs]!==!1&&(u=(f[t[ke]]||{})[i]||u)),function(){return u.apply(n,arguments)}}var f={},u,e;for(el(i,function(n){f[n]=o(t,i,n)}),u=lf(n),e=[];u&&!ip(u)&&!up(e,u);)el(u,function(n){!f[n]&&rp(u,n,!nh)&&(f[n]=o(t,u,n))}),e.push(u),u=lf(u);return f}function tui(n,t,i,r){var f=null,e,s;if(n&&eu(i,ke)&&(e=n[ul]||{},f=(e[i[ke]]||{})[t],f||ol("Missing ["+t+"] "+rl),!f[np]&&e[gs]!==!1)){for(var o=!eu(n,t),u=lf(n),h=[];o&&u&&!ip(u)&&!up(h,u);){if(s=u[t],s){o=s===r;break}h.push(u);u=lf(u)}try{o&&(n[t]=f);f[np]=1}catch(c){e[gs]=!1}}return f}function iui(n,t,i){var r=t[n];return r===i&&(r=lf(t)[n]),typeof r!==rl&&ol("["+n+"] is not a "+rl),r}function rui(n,t,i,r,u){function e(n,t){var i=function(){var r=tui(this,t,n,i)||iui(t,n,i);return r.apply(this,arguments)};return i[gy]=1,i}if(!eut(n)){var f=i[ul]=i[ul]||{},o=f[t]=f[t]||{};f[gs]!==!1&&(f[gs]=!!u);el(i,function(t){rp(i,t,!1)&&i[t]!==r[t]&&(o[t]=i[t],delete i[t],eu(n,t)&&(!n[t]||n[t][gy])||(n[t]=e(n,t)))})}}function uui(n,t){if(nh)for(var r=[],i=lf(t);i&&!ip(i)&&!up(r,i);){if(i===n)return!0;r.push(i);i=lf(i)}return!1}function fp(n,t){return eu(n,kr)?n.name||t||rut:((n||{})[il]||{}).name||t||rut}function lt(n,t,i,r){var u,f,s,e,h,c,o;eu(n,kr)||ol("theClass is an invalid class definition.");u=n[kr];uui(u,t)||ol("["+fp(n)+"] is not in class hierarchy of ["+fp(t)+"]");f=null;eu(u,ke)?f=u[ke]:(f=kri+fp(n,"_")+"$"+fut,fut++,u[ke]=f);s=lt[iut];e=!!s[tp];e&&r&&r[tp]!==undefined&&(e=!!r[tp]);h=gri(t);c=nui(u,t,h,e);i(t,c);o=!!nh&&!!s[uut];o&&r&&(o=!!r[uut]);rui(u,f,t,h,o!==!1)}function ep(n){return py.toString.call(n)}function si(n){return n===undefined||typeof n===fu}function r(n){return n===null||si(n)}function fui(n){return!r(n)}function yut(n,t){return n&&tl.call(n,t)}function de(n){return typeof n===br}function y(n){return typeof n===ks}function sl(n,t,i,u){u===void 0&&(u=!1);var f=!1;if(!r(n))try{r(n[cut])?r(n[hut])||(n[hut](sut+t,i),f=!0):(n[cut](t,i,u),f=!0)}catch(e){}return f}function put(n,t,i,u){if(u===void 0&&(u=!1),!r(n))try{r(n[aut])?r(n[lut])||n[lut](sut+t,i):n[aut](t,i,u)}catch(f){}}function eui(n){var t=n,i=/([^\w\d_$])/g;return i.test(n)&&(t=n.replace(i,"_")),t}function bt(n,t){if(n)for(var i in n)tl.call(n,i)&&t.call(n,i,n[i])}function oui(n,t){var r,u,f,i;if(n&&t){if(r=t.length,u=n.length,n===t)return!0;if(u>=r){for(f=u-1,i=r-1;i>=0;i--){if(n[f]!=t[i])return!1;f--}return!0}}return!1}function ti(n,t){return n&&t?n.indexOf(t)!==-1:!1}function sui(n){return ep(n)==="[object Date]"}function af(n){return ep(n)==="[object Array]"}function wut(n){return ep(n)==="[object Error]"}function h(n){return typeof n=="string"}function but(n){return typeof n=="number"}function ge(n){if(sui(n)){var t=function(n){var t=String(n);return t.length===1&&(t="0"+t),t};return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}function l(n,t,i){for(var u=n.length,r=0;r<u;r++)if(r in n&&t.call(i||n,n[r],r,n)===-1)break}function op(n,t,i){for(var f=n.length,u=i||0,r=Math.max(u>=0?u:f-Math.abs(u),0);r<f;r++)if(r in n&&n[r]===t)return r;return-1}function hl(n,t,i){for(var u=n.length,e=i||n,f=new Array(u),r=0;r<u;r++)r in n&&(f[r]=t.call(e,n[r],n));return f}function hui(n,t){var u=n.length,i=0,r;if(arguments.length>=3)r=arguments[2];else{while(i<u&&!(i in n))i++;r=n[i++]}while(i<u)i in n&&(r=t(r,n[i],i,n)),i++;return r}function hi(n){return typeof n!="string"?n:n.replace(/^\s+|\s+$/g,"")}function no(n){var u=typeof n,i,r,f,t;u!==ks&&(u!==br||n===null)&&by("objKeys called on non-object");i=[];for(r in n)n&&tl.call(n,r)&&i.push(r);if(kut)for(f=cl.length,t=0;t<f;t++)n&&tl.call(n,cl[t])&&i.push(cl[t]);return i}function ll(n,t,i,r){if(vut)try{var u={enumerable:!0,configurable:!0};return i&&(u.get=i),r&&(u.set=r),vut(n,t,u),!0}catch(f){}return!1}function lr(){var n=Date;return n.now?n.now():(new n).getTime()}function b(n){return wut(n)?n.name:""}function p(n,t,i,r,u){var f=i;return n&&(f=n[t],f!==i&&(!u||u(f))&&(!r||r(i))&&(f=i,n[t]=f)),f}function ii(n,t,i){var u;return n?(u=n[t],!u&&r(u)&&(u=si(i)?{}:i,n[t]=u)):u=si(i)?{}:i,u}function dut(n){return!n}function sp(n){return!!n}function dr(n){throw new Error(n);}function cui(n,t,i){var r,u;if(n&&t&&n!==t&&de(n)&&de(t)){r=function(r){if(h(r)){var u=t[r];y(u)?(!i||i(r,!0,t,n))&&(n[r]=function(n){return function(){var i=arguments;return t[n].apply(t,i)}}(r)):(!i||i(r,!1,t,n))&&(yut(n,r)&&delete n[r],ll(n,r,function(){return t[r]},function(n){t[r]=n})||(n[r]=u))}};for(u in t)r(u)}return n}function lui(n){return function(){function t(){var t=this;n&&bt(n,function(n,i){t[n]=i})}return t}()}function gut(n){return n&&(n=we(wy?wy({},n):n)),n}function ei(n){var t=be();return t&&t[n]?t[n]:n===nft&&al()?window:null}function al(){return Boolean(typeof window===br&&window)}function th(){return al()?window:ei(nft)}function ift(){return Boolean(typeof document===br&&document)}function ar(){return ift()?document:ei(aui)}function tfi(){return Boolean(typeof navigator===br&&navigator)}function vr(){return tfi()?navigator:ei(vui)}function ifi(){return Boolean(typeof history===br&&history)}function rfi(){return ifi()?history:ei(yui)}function vf(n){if(n&&nfi){var t=ei("__mockLocation");if(t)return t}return typeof location===br&&location?location:ei(pui)}function ufi(){return typeof console!==fu?console:ei(wui)}function ou(){return ei(bui)}function to(){return Boolean(typeof JSON===br&&JSON||ei(tft)!==null)}function rr(){return to()?JSON||ei(tft):null}function ffi(){return ei(kui)}function efi(){return ei(dui)}function ofi(){var n=vr();return n&&n.product?n.product===gui:!1}function vp(){var n=vr(),t;return n&&(n.userAgent!==ap||lp===null)&&(ap=n.userAgent,t=(ap||"").toLowerCase(),lp=ti(t,hp)||ti(t,cp)),lp}function rft(n){var i,t,r;return(n===void 0&&(n=null),n||(i=vr()||{},n=i?(i.userAgent||"").toLowerCase():""),t=(n||"").toLowerCase(),ti(t,hp))?parseInt(t.split(hp)[1]):ti(t,cp)&&(r=parseInt(t.split(cp)[1]),r)?r+4:null}function s(n){var i=Object[di].toString.call(n),t="";return i==="[object Error]"?t="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":to()&&(t=rr().stringify(n)),i+t}function uft(n){return n?'"'+n.replace(/\"/g,"")+'"':""}function vl(n,t){return(n||{}).logger||new fft(t)}function ih(n,t,i,r,u){var e,f,o,s;if(n&&(e=n,y(e.getPerfMgr)&&(e=e.getPerfMgr()),e)){f=void 0;o=e.getCtx(yp);try{if(f=e.create(t(),r,u),f)return o&&f.setCtx&&(f.setCtx(yl.ParentContextKey,o),o.getCtx&&o.setCtx&&(s=o.getCtx(yl.ChildrenContextKey),s||(s=[],o.setCtx(yl.ChildrenContextKey,s)),s.push(f))),e.setCtx(yp,f),i(f)}catch(h){f&&f.setCtx&&f.setCtx("exception",h)}finally{f&&e.fire(f);e.setCtx(yp,o)}}return i()}function pp(n,t){var e=[],i,r,u,f;if(n&&n.length>0)for(i=null,r=0;r<n.length;r++)u=n[r],u&&y(u.processTelemetry)&&(f=new eft(u,t),e.push(f),i&&i.setNext(f),i=f);return e.length>0?e[0]:null}function afi(n,t,i){var r=[],u=i?!1:!0,f;if(n)while(n)f=n.getPlugin(),(u||f===i)&&(u=!0,r.push(f)),n=n.getNext();return u||r.push(i),pp(r,t)}function vfi(n,t,i){var r=n,u=!1;return i&&n&&(r=[],l(n,function(n){(u||n===i)&&(u=!0,r.push(n))})),i&&!u&&(r||(r=[]),r.push(i)),pp(r,t)}function bp(n,t){for(var f=[],r=null,u=n.getNext(),i;u;)i=u.getPlugin(),i&&(r&&y(r[hft])&&y(i[wp])&&r[hft](i),y(i[cft])&&i[cft]()||f.push(i),r=i,u=u.getNext());l(f,function(i){i.initialize(n.getCfg(),n.core(),t,n.getNext())})}function lft(n){return n.sort(function(n,t){var i=0,r=y(t[wp]);return y(n[wp])?i=r?n[sft]-t[sft]:1:r&&(i=-1),i})}function bfi(n,t){var i=fh[su]||bl[su];return i||(i=fh[su]=fh(n,t),bl[su]=i),i}function kl(n){return n?n.isEnabled():!0}function kfi(n){var t=n.cookieCfg=n.cookieCfg||{},i;return p(t,"domain",n.cookieDomain,fui,r),p(t,"path",n.cookiePath||"/",null,r),r(t[nw])&&(i=void 0,si(n[yft])||(i=!n[yft]),si(n[pft])||(i=!n[pft]),t[nw]=i),t}function iw(n,t){var i,r;return n?i=n.getCookieMgr():t&&(r=t.cookieCfg,i=r[su]?r[su]:fh(t)),i||(i=bfi(t,(n||{}).logger)),i}function fh(n,t){var u=kfi(n||bl),e=u.path||"/",o=u.domain,f=u[nw]!==!1,i={isEnabled:function(){var n=f&&kft(t),r=bl[su];return n&&r&&i!==r&&(n=kl(r)),n},setEnabled:function(n){f=n!==!1},set:function(n,t,f,s,h){var l,k,w,a,b,d;if(kl(i)){var c={},v=hi(t||ur),y=v.indexOf(";");y!==-1&&(v=hi(t.substring(0,y)),c=dft(t.substring(y+1)));p(c,"domain",s||o,sp,si);r(f)||(l=vp(),si(c[gp])&&(k=lr(),w=k+f*1e3,w>0&&(a=new Date,a.setTime(w),p(c,gp,gft(a,l?aft:vft)||gft(a,l?aft:vft)||ur,sp))),l||p(c,"max-age",ur+f,null,si));b=vf();b&&b.protocol==="https:"&&(p(c,"secure",null,null,si),tw===null&&(tw=!gfi((vr()||{}).userAgent)),tw&&p(c,"SameSite","None",null,si));p(c,"path",h||e,null,si);d=u.setCookie||tet;d(n,net(v,c))}},get:function(n){var t=ur;return kl(i)&&(t=(u.getCookie||dfi)(n)),t},del:function(n,t){kl(i)&&i.purge(n,t)},purge:function(n,i){var f,e,r;kft(t)&&(f=(r={},r.path=i?i:"/",r[gp]="Thu, 01 Jan 1970 00:00:01 GMT",r),vp()||(f["max-age"]="0"),e=u.delCookie||tet,e(n,net(ur,f)))}};return i[su]=i,i}function kft(n){if(wl===null){wl=!1;try{var u=uh||{};wl=u[dp]!==undefined}catch(r){n&&n.throwInternal(i.WARNING,t.CannotAccessCookie,"Cannot access document.cookie - "+b(r),{exception:s(r)})}}return wl}function dft(n){var t={},i;return n&&n.length&&(i=hi(n).split(";"),l(i,function(n){if(n=hi(n||ur),n){var i=n.indexOf("=");i===-1?t[n]=null:t[hi(n.substring(0,i))]=hi(n.substring(i+1))}})),t}function gft(n,t){return y(n[t])?n[t]():null}function net(n,t){var i=n||ur;return bt(t,function(n,t){i+="; "+n+(r(t)?ur:"="+t)}),i}function dfi(n){var i=ur,t;return uh&&(t=uh[dp]||ur,wft!==t&&(bft=dft(t),wft=t),i=hi(bft[n]||ur)),i}function tet(n,t){uh&&(uh[dp]=n+"="+t)}function gfi(n){return h(n)?ti(n,"CPU iPhone OS 12")||ti(n,"iPad; CPU OS 12")?!0:ti(n,"Macintosh; Intel Mac OS X 10_14")&&ti(n,"Version/")&&ti(n,"Safari")?!0:ti(n,"Macintosh; Intel Mac OS X 10_14")&&oui(n,"AppleWebKit/605.1.15 (KHTML, like Gecko)")?!0:ti(n,"Chrome/5")||ti(n,"Chrome/6")?!0:ti(n,"UnrealEngine")&&!ti(n,"Chrome")?!0:ti(n,"UCBrowser/12")||ti(n,"UCBrowser/11")?!0:!1:!1}function uei(n){n<0&&(n>>>=0);eh=123456789+n&yf;oh=987654321-n&yf;uet=!0}function fei(){try{var n=lr()&2147483647;uei((Math.random()*ret^n)+n)}catch(t){}}function dl(n){var t,i=ffi()||efi();return i&&i.getRandomValues?t=i.getRandomValues(new Uint32Array(1))[0]&yf:vp()?(uet||fei(),t=eei()&yf):t=Math.floor(ret*Math.random()|0),n||(t>>>=0),t}function eei(n){oh=36969*(oh&65535)+(oh>>16)&yf;eh=18e3*(eh&65535)+(eh>>16)&yf;var t=(oh<<16)+(eh&65535)>>>0&yf|0;return n||(t>>>=0),t}function fo(n,t){var i=!1,r=th(),u;return r&&(i=sl(r,n,t),i=sl(r.body,n,t)||i),u=ar(),u&&(i=gl.Attach(u,n,t)||i),i}function fet(n){n===void 0&&(n=22);for(var t=dl()>>>0,i=0,r="";r.length<n;)i++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t&63),t>>>=6,i===5&&(t=(dl()<<2&4294967295|t&3)>>>0,i=0);return r}function hu(){for(var u,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",t,r=0;r<4;r++)t=dl(),i+=n[t&15]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];return u=n[8+(dl()&3)|0],i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+u+i.substr(16,3)+i.substr(19,12)}function rw(n,t){if(n)for(var i=0;i<n.length;i++)if(t(n[i],i))break}function uw(n,t,i,r,u){u>=0&&u<=2&&rw(n,function(n,f){var o=n.cbks,s=o[oet[u]],h,e;if(s){t.ctx=function(){return r[f]=r[f]||{}};try{s.apply(t.inst,i)}catch(c){h=t.err;try{e=o[oet[2]];e&&(t.err=c,e.apply(t.inst,i))}catch(l){}finally{t.err=h}}}})}function hei(n){return function(){function e(n,t){return rw(t,function(t){n.push(t)}),n}function c(n,u){i=e([],i);i[n]=u;r=e([t],i)}var o=this,i=arguments,u=n.h,t={name:n.n,inst:o,ctx:null,set:c},f=[],r=e([t],i),s;uw(u,t,r,f,0);s=n.f;try{t.rslt=s.apply(o,i)}catch(h){t.err=h;uw(u,t,r,f,3);throw h;}return uw(u,t,r,f,1),t.rslt}}function cei(n){if(n){if(fw)return fw(n);var t=n[oei]||n[di]||n[sei];if(t)return t}return null}function set(n,t,i){var r=null;return n&&(yut(n,t)?r=n:i&&(r=set(cei(n),t,!1))),r}function lei(n,t,i){return n?ew(n[di],t,i,!1):null}function ew(n,t,i,r){var f,e,u,o,s;return(r===void 0&&(r=!0),n&&t&&i&&(f=set(n,t,r),f&&(e=f[t],typeof e===ks)))?(u=e[eet],u||(u={i:0,n:t,f:e,h:[]},o=hei(u),o[eet]=u,f[t]=o),s={id:u.i,cbks:i,rm:function(){var n=this.id;rw(u.h,function(t,i){if(t.id===n)return u.h.splice(i,1),1})}},u.i++,u.h.push(s),s):null}function het(n,t,i){var e=t.length,r=aei(n,t),f,u;if(r.length!==e){for(f=0,u=r;i[u]!==undefined;)f++,u=r.substring(0,147)+pei(f);r=u}return r}function aei(n,r){var u;return r&&(r=hi(r.toString()),r.length>150&&(u=r.substring(0,150),n.throwInternal(i.WARNING,t.NameTooLong,"name is too long.  It has been truncated to 150 characters.",{name:r},!0))),u||r}function ci(n,r,u){u===void 0&&(u=1024);var f;return r&&(u=u?u:1024,r=hi(r),r.toString().length>u&&(f=r.toString().substring(0,u),n.throwInternal(i.WARNING,t.StringValueTooLong,"string value is too long. It has been truncated to "+u+" characters.",{value:r},!0))),f||r}function na(n,i){return aet(n,i,2048,t.UrlTooLong)}function cet(n,r){var u;return r&&r.length>32768&&(u=r.substring(0,32768),n.throwInternal(i.WARNING,t.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:r},!0)),u||r}function vei(n,r){var f,u;return r&&(u=""+r,u.length>32768&&(f=u.substring(0,32768),n.throwInternal(i.WARNING,t.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:r},!0))),f||r}function pf(n,r){if(r){var u={};bt(r,function(r,f){if(de(f)&&to())try{f=rr().stringify(f)}catch(e){n.throwInternal(i.WARNING,t.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:e},!0)}f=ci(n,f,8192);r=het(n,r,u);u[r]=f});r=u}return r}function wf(n,t){if(t){var i={};bt(t,function(t,r){t=het(n,t,i);i[t]=r});t=i}return t}function yei(n,i){return i?aet(n,i,128,t.IdTooLong).toString():i}function aet(n,t,r,u){var f;return t&&(t=hi(t),t.length>r&&(f=t.substring(0,r),n.throwInternal(i.WARNING,u,"input is too long, it has been truncated to "+r+" characters.",{data:t},!0))),f||t}function pei(n){var t="00"+n;return t.substr(t.length-3)}function sh(n){var t=null,i;return y(Event)?t=new Event(n):(i=ar(),i&&i.createEvent&&(t=i.createEvent("Event"),t.initEvent(n,!0,!0))),t}function yr(n,t){return(t===void 0&&(t=!1),n===undefined||n===null)?t:n.toString().toLowerCase()==="true"}function cu(n){(isNaN(n)||n<0)&&(n=0);n=Math.round(n);var t=""+n%1e3,i=""+Math.floor(n/1e3)%60,r=""+Math.floor(n/6e4)%60,u=""+Math.floor(n/36e5)%24,f=Math.floor(n/864e5);return t=t.length===1?"00"+t:t.length===2?"0"+t:t,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,u=u.length<2?"0"+u:u,(f>0?f+".":"")+u+":"+r+":"+i+"."+t}function vet(){var n=vr();return"sendBeacon"in n&&n.sendBeacon}function wei(n,t){var i=null;return l(n,function(n){if(n.identifier===t)return i=n,-1}),i}function bei(n,t,i,r,u){return!u&&h(n)&&(n==="Script error."||n==="Script error")}function sw(){return wet()?ta(bf.LocalStorage):null}function ta(n){var t,i,u;try{if(r(be()))return null;if(t=new Date,i=ei(n===bf.LocalStorage?"localStorage":"sessionStorage"),i.setItem(t.toString(),t.toString()),u=i.getItem(t.toString())!==t.toString(),i.removeItem(t.toString()),!u)return i}catch(f){}return null}function hw(){return ia()?ta(bf.SessionStorage):null}function dei(){lu=!1;au=!1}function wet(){return lu===undefined&&(lu=!!ta(bf.LocalStorage)),lu}function gei(n,r){var u=sw();if(u!==null)try{return u.getItem(r)}catch(f){lu=!1;n.throwInternal(i.WARNING,t.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+b(f),{exception:s(f)})}return null}function noi(n,r,u){var f=sw();if(f!==null)try{return f.setItem(r,u),!0}catch(e){lu=!1;n.throwInternal(i.WARNING,t.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+b(e),{exception:s(e)})}return!1}function toi(n,r){var u=sw();if(u!==null)try{return u.removeItem(r),!0}catch(f){lu=!1;n.throwInternal(i.WARNING,t.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+b(f),{exception:s(f)})}return!1}function ia(){return au===undefined&&(au=!!ta(bf.SessionStorage)),au}function cw(n,r){var u=hw();if(u!==null)try{return u.getItem(r)}catch(f){au=!1;n.throwInternal(i.WARNING,t.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+b(f),{exception:s(f)})}return null}function lw(n,r,u){var f=hw();if(f!==null)try{return f.setItem(r,u),!0}catch(e){au=!1;n.throwInternal(i.WARNING,t.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+b(e),{exception:s(e)})}return!1}function ioi(n,r){var u=hw();if(u!==null)try{return u.removeItem(r),!0}catch(f){au=!1;n.throwInternal(i.WARNING,t.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+b(f),{exception:s(f)})}return!1}function aw(n){var t=ket,i=roi,r=i[t];return bet.createElement?i[t]||(r=i[t]=bet.createElement("a")):r={host:eoi(n,!0)},r.href=n,t++,t>=i.length&&(t=0),ket=t,r}function uoi(n){var t,i=aw(n);return i&&(t=i.href),t}function foi(n,t){return n?n.toUpperCase()+" "+t:t}function eoi(n,t){var r=det(n,t)||"",i;return r&&(i=r.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i),i!=null&&i.length>3&&h(i[2])&&i[2].length>0)?i[2]+(i[3]||""):r}function det(n,t){var u=null,i,f,r;return n&&(i=n.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i),i!=null&&i.length>2&&h(i[2])&&i[2].length>0&&(u=i[2]||"",t&&i.length>2&&(f=(i[1]||"").toLowerCase(),r=i[3]||"",f==="http"&&r===":80"?r="":f==="https"&&r===":443"&&(r=""),u+=r))),u}function vw(n){return get.indexOf(n.toLowerCase())!==-1}function ooi(n,t,i,r){var o,e=r,s=r,u,f;return t&&t.length>0?(u=aw(t),o=u.host,e||(u.pathname!=null?(f=u.pathname.length===0?"/":u.pathname,f.charAt(0)!=="/"&&(f="/"+f),s=u.pathname,e=ci(n,i?i+" "+f:f)):e=ci(n,t))):(o=r,e=r),{target:o,name:e,data:s}}function ra(){var n=ou(),t;return n&&n.now&&n.timing&&(t=n.now()+n.timing.navigationStart,t>0)?t:lr()}function li(n,t){var i=null;return n===0||t===0||r(n)||r(t)||(i=t-n),i}function soi(n){var i,t,r;return n?(i=n.split(not),t=hui(i,function(n,t){var i=t.split(tot),r,u;return i.length===2&&(r=i[0].toLowerCase(),u=i[1],n[r]=u),n},{}),no(t).length>0&&(t.endpointsuffix&&(r=t.location?t.location+".":"",t.ingestionendpoint=t.ingestionendpoint||"https://"+r+"dc."+t.endpointsuffix),t.ingestionendpoint=t.ingestionendpoint||kei),t):{}}function ww(n,t){var i=n;return i&&!h(i)&&(JSON&&JSON.stringify?(i=JSON.stringify(n),t&&(!i||i==="{}")&&(i=y(n.toString)?n.toString():""+n)):i=""+n+" - (Missing JSON.stringify)"),i||""}function fot(n,t){var i=n;return n&&(i&&!h(i)&&(i=n[pw]||n[uot]||i),i&&!h(i)&&(i=ww(i,!0)),n.filename&&(i=i+" @"+(n.filename||"")+":"+(n.lineno||"?")+":"+(n.colno||"?"))),t&&t!=="String"&&t!=="Object"&&t!=="Error"&&(i||"").indexOf(t)===-1&&(i=t+": "+i),i||""}function boi(n){return de(n)?"hasFullStack"in n&&"typeName"in n:!1}function koi(n){return de(n)?"ver"in n&&"exceptions"in n&&"properties"in n:!1}function eot(n){return n&&n.src&&h(n.src)&&n.obj&&af(n.obj)}function oo(n){var t=n||"",i;return h(t)||(t=h(t[gi])?t[gi]:""+t),i=t.split("\n"),{src:t,obj:i}}function doi(n){for(var r,u=[],i=n.split("\n"),t=0;t<i.length;t++)r=i[t],i[t+1]&&(r+="@"+i[t+1],t++),u.push(r);return{src:n,obj:u}}function oot(n){var t=null,i;if(n)try{n[gi]?t=oo(n[gi]):n[eo]&&n[eo][gi]?t=oo(n[eo][gi]):n.exception&&n.exception[gi]?t=oo(n.exception[gi]):eot(n)?t=n:eot(n[yw])?t=n[yw]:window.opera&&n[pw]?t=doi(n.message):h(n)?t=oo(n):(i=n[pw]||n[uot]||"",h(n[rot])&&(i&&(i+="\n"),i+=" from "+n[rot]),i&&(t=oo(i)))}catch(r){t=oo(r)}return t||{src:"",obj:null}}function goi(n){var t="";return n&&(n.obj?l(n.obj,function(n){t+=n+"\n"}):t=n.src||""),t}function nsi(n){var t,u=n.obj,s,f,e,a,v,y;if(u&&u.length>0&&(t=[],s=0,f=0,l(u,function(n){var r=n.toString(),i;kw.regex.test(r)&&(i=new kw(r,s++),f+=i.sizeInBytes,t.push(i))}),e=32768,f>e))for(var i=0,r=t.length-1,h=0,o=i,c=r;i<r;){if(a=t[i].sizeInBytes,v=t[r].sizeInBytes,h+=a+v,h>e){y=c-o+1;t.splice(o,y);break}o=i;c=r;i++;r--}return t}function ua(n){var t="",r,i;if(n&&(t=n.typeName||n.name||"",!t))try{r=/function (.{1,200})\(/;i=r.exec(n.constructor.toString());t=i&&i.length>1?i[1]:""}catch(u){}return t}function bw(n){if(n)try{if(!h(n)){var i=ua(n),t=ww(n,!1);return(t&&t!=="{}"||(n[eo]&&(n=n[eo],i=ua(n)),t=ww(n,!0)),t.indexOf(i)!==0&&i!=="String")?i+":"+t:t}}catch(r){}return""+(n||"")}function pu(n){var t="ai."+n+".";return function(n){return t+n}}function ah(n,t){n&&n.dispatchEvent&&t&&n.dispatchEvent(t)}function asi(n){if(n&&n.reason){var t=n.reason;return!h(t)&&y(t.toString)?t.toString():s(t)}return n||""}function pt(n,t,i){return p(n,t,i,sp)}function oa(n){try{return n.responseText}catch(t){}return null}function kot(n){return typeof n!="string"||!n||n.match(/,|;|=| |\|/)?!1:!0}function lo(n,t){n&&n[t]&&no(n[t]).length===0&&delete n[t]}function dot(n,t,i){var r=0,u=n[t],f=n[i];return u&&f&&(r=li(u,f)),r}function ie(n,t,i,r,u){var f=0,e=dot(i,r,u);return e&&(f=ku(n,t,cu(e))),f}function ku(n,t,i){var r="ajaxPerf",u=0,f;return n&&t&&i&&(f=n[r]=n[r]||{},f[t]=i,u=1),u}function khi(n,t){var u=n.perfTiming,i=t[yi]||{},r=0,k="name",f="Start",e="End",c="domainLookup",a="connect",v="redirect",y="request",p="response",d="duration",g="startTime",et=c+f,ot=c+e,st=a+f,nt=a+e,tt=y+f,ht=y+e,ct=p+f,w=p+e,lt=v+f,at=v=e,it="transferSize",rt="encodedBodySize",ut="decodedBodySize",ft="serverTiming",o,b,s;u?(r|=ie(i,v,u,lt,at),r|=ie(i,c,u,et,ot),r|=ie(i,a,u,st,nt),r|=ie(i,y,u,tt,ht),r|=ie(i,p,u,ct,w),r|=ie(i,"networkConnect",u,g,nt),r|=ie(i,"sentRequest",u,tt,w),o=u[d],o||(o=dot(u,g,w)||0),r|=ku(i,d,o),r|=ku(i,"perfTotal",o),b=u[ft],b&&(s={},l(b,function(n,t){var r=eui(n[k]||""+t),i=s[r]||{};bt(n,function(n,t){(n!==k&&h(t)||but(t))&&(i[n]&&(t=i[n]+";"+t),(t||!h(t))&&(i[n]=t))});s[r]=i}),r|=ku(i,ft,s)),r|=ku(i,it,u[it]),r|=ku(i,rt,u[rt]),r|=ku(i,ut,u[ut])):n.perfMark&&(r|=ku(i,"missing",n.perfAttempts));r&&(t[yi]=i)}function ghi(){var n=be();return!n||r(n.Request)||r(n.Request[di])||r(n[yh])?null:n[yh]}function nci(n){var i=!1,u,f,e,o;if(typeof XMLHttpRequest===fu||r(XMLHttpRequest)||(u=XMLHttpRequest[di],i=!r(u)&&!r(u.open)&&!r(u.send)&&!r(u.abort)),f=rft(),f&&f<9&&(i=!1),i)try{e=new XMLHttpRequest;e[pi]={};o=XMLHttpRequest[di].open;XMLHttpRequest[di].open=o}catch(h){i=!1;ph(n,t.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:s(h)})}return i}function ca(n){var t="";try{r(n)||r(n[pi])||r(n[pi].requestUrl)||(t+="(url: '"+n[pi].requestUrl+"')")}catch(i){}return t}function ph(n,t,r,u,f){n[vh]()[ist](i.CRITICAL,t,r,u,f)}function la(n,t,r,u,f){n[vh]()[ist](i.WARNING,t,r,u,f)}function wh(n,t,i){return function(r){ph(n,t,i,{ajaxDiagnosticsMessage:ca(r.inst),exception:s(r.err)})}}function ao(n,t){return n&&t?n.indexOf(t):-1}function ost(n,t,i){i===void 0&&(i={});var r={type:"Feature"};return(i.id===0||i.id)&&(r.id=i.id),i.bbox&&(r.bbox=i.bbox),r.properties=t||{},r.geometry=n,r}function kci(n,t,i){var f,e,r,u,o;for(i===void 0&&(i={}),f=0,e=n;f<e.length;f++){if(r=e[f],r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(u=0;u<r[r.length-1].length;u++)if(r[r.length-1][u]!==r[0][u])throw new Error("First and last Position are not equivalent.");}return o={type:"Polygon",coordinates:n},ost(o,t,i)}function dci(n,t,i){i===void 0&&(i={});var r={type:"MultiPolygon",coordinates:n};return ost(r,t,i)}function sst(n){return n.type==="Feature"?n.geometry:n}function gci(n,t,i){i===void 0&&(i={});var u=sst(n),f=sst(t),r=hst.intersection(u.coordinates,f.coordinates);return r.length===0?null:r.length===1?kci(r[0],i.properties):dci(r,i.properties)}function fb(n){this.message=n}function eli(n){var u=String(n).replace(/=+$/,"");if(u.length%4==1)throw new fb("'atob' failed: The string to be decoded is not correctly encoded.");for(var i=0,r,t,e=0,f="";t=u.charAt(e++);~t&&(r=i%4?r*64+t:t,i++%4)?f+=String.fromCharCode(255&r>>(-2*i&6)):0)t=fli.indexOf(t);return f}function oli(n){return decodeURIComponent(eb(n).replace(/(.)/g,function(n,t){var i=t.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}function bh(n){this.message=n}var ue=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},wi=nu(function(n){(function(t,i){n.exports=i()})(ue,function(){function r(r,u){if(n)if(t){var e="var sharedChunk = {}; ("+n+")(sharedChunk); ("+t+")(sharedChunk);",f={};n(f);i=u(f);typeof window!="undefined"&&(i.workerUrl=window.URL.createObjectURL(new Blob([e],{type:"text/javascript"})))}else t=u;else n=u}var n,t,i;return r(["exports"],function(n){function tc(n,t){return t={exports:{}},n(t,t.exports),t.exports}function ae(n,t,i,r){this.cx=3*n;this.bx=3*(i-n)-this.cx;this.ax=1-this.cx-this.bx;this.cy=3*t;this.by=3*(r-t)-this.cy;this.ay=1-this.cy-this.by;this.p1x=n;this.p1y=r;this.p2x=i;this.p2y=r}function ve(n,t){this.x=n;this.y=t}function vv(n,t){var i,u,r;if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(i=0;i<n.length;i++)if(!vv(n[i],t[i]))return!1;return!0}if(typeof n=="object"&&n!==null&&t!==null){if(!(typeof t=="object")||(u=Object.keys(n),u.length!==Object.keys(t).length))return!1;for(r in n)if(!vv(n[r],t[r]))return!1;return!0}return n===t}function eut(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,i=t*n;return 4*(n<.5?i:3*(n-t)+i-.75)}function ab(n,t,i,r){var u=new cb(n,t,i,r);return function(n){return u.solve(n)}}function af(n,t,i){return Math.min(i,Math.max(t,n))}function yb(n,t,i){var r=i-t,u=((n-t)%r+r)%r+t;return u===t?i:u}function out(n,t,i){if(!n.length)return i(null,[]);var f=n.length,r=new Array(n.length),u=null;n.forEach(function(n,e){t(n,function(n,t){n&&(u=n);r[e]=t;--f==0&&i(u,r)})})}function sut(n){var t=[];for(var i in n)t.push(n[i]);return t}function hut(n,t){var i=[];for(var r in n)r in t||i.push(r);return i}function ri(n){for(var e=[],i=arguments.length-1,t,r,u,f;i-->0;)e[i]=arguments[i+1];for(t=0,r=e;t<r.length;t+=1){u=r[t];for(f in u)n[f]=u[f]}return n}function cut(n,t){for(var i,u={},r=0;r<t.length;r++)i=t[r],i in n&&(u[i]=n[i]);return u}function wb(){return pb++}function bb(){function n(t){return t?(t^Math.random()*16>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,n)}return n()}function lut(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function kb(n){return n?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(n):!1}function db(n,t){n.forEach(function(n){t[n]&&(t[n]=t[n].bind(t))})}function yv(n,t){return n.indexOf(t,n.length-t.length)!==-1}function pv(n,t,i){var u={};for(var r in n)u[r]=t.call(i||this,n[r],r,n);return u}function gb(n,t,i){var u={};for(var r in n)t.call(i||this,n[r],r,n)&&(u[r]=n[r]);return u}function kr(n){return Array.isArray(n)?n.map(kr):typeof n=="object"&&n?pv(n,kr):n}function aut(n,t){for(var i=0;i<n.length;i++)if(t.indexOf(n[i])>=0)return!0;return!1}function gt(n){wv[n]||(typeof console!="undefined"&&console.warn(n),wv[n]=!0)}function wu(n,t,i){return(i.y-n.y)*(t.x-n.x)>(t.y-n.y)*(i.x-n.x)}function vut(n){for(var u=0,t=0,f=n.length,e=f-1,i=void 0,r=void 0;t<f;e=t++)i=n[t],r=n[e],u+=(r.x-i.x)*(i.y+r.y);return u}function yut(n){var r=n[0],t=n[1],i=n[2];return t+=90,t*=Math.PI/180,i*=Math.PI/180,{x:r*Math.cos(t)*Math.sin(i),y:r*Math.sin(t)*Math.sin(i),z:r*Math.cos(i)}}function ic(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function bv(n){var t={},i;return n.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(n,i,r,u){var f=r||u;return t[i]=f?f.toLowerCase():!0,""}),t["max-age"]&&(i=parseInt(t["max-age"],10),isNaN(i)?delete t["max-age"]:t["max-age"]=i),t}function nk(n){if(rc==null){var t=n.navigator?n.navigator.userAgent:null;rc=!!n.safari||!!(t&&(/\b(iPad|iPhone|iPod)\b/.test(t)||!!t.match("Safari")&&!t.match("Chrome")))}return rc}function tk(n){try{var t=e[n];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(i){return!1}}function put(n){return e.btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(n,t){return String.fromCharCode(Number("0x"+t))}))}function wut(n){return decodeURIComponent(e.atob(n).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function gut(n){!dv&&pe&&(ik?rk(n):hs=n)}function rk(n){var t=n.createTexture();n.bindTexture(n.TEXTURE_2D,t);try{if(n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,pe),n.isContextLost())return;fc.supported=!0}catch(i){}n.deleteTexture(t);dv=!0}function nft(){for(var n="",t=0;t<10;t++)n+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(Math.random()*62)];var i=["1",gv,n].join(""),r=Date.now()+432e5;return{token:i,tokenExpiresAt:r}}function dr(n){return n.indexOf("mapbox:")===0}function cs(n){return uk.test(n)}function tft(n){return n.indexOf("sku=")>0&&cs(n)}function ift(n){for(var u,r,t=0,i=n;t<i.length;t+=1)if(u=i[t],r=u.match(/^access_token=(.*)$/),r)return r[1];return null}function bu(n){var t=n.match(fk);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function ec(n){var t=n.params.length?"?"+n.params.join("&"):"";return n.protocol+"://"+n.authority+n.path+t}function ek(n){var t;if(!n||(t=n.split("."),!t||t.length!==3))return null;try{return JSON.parse(wut(t[1]))}catch(i){return null}}function oc(){e.caches&&!nu&&(nu=e.caches.open(hk))}function sft(n,t){if(sc===undefined)try{new Response(new ReadableStream);sc=!0}catch(i){sc=!1}sc?t(n.body):n.blob().then(t)}function hft(n,t,i){var r,u,f;(oc(),nu)&&((r={status:t.status,statusText:t.statusText,headers:new e.Headers},t.headers.forEach(function(n,t){return r.headers.set(t,n)}),u=bv(t.headers.get("Cache-Control")||""),u["no-store"])||(u["max-age"]&&r.headers.set("Expires",new Date(i+u["max-age"]*1e3).toUTCString()),f=new Date(r.headers.get("Expires")).getTime()-i,f<oft)||sft(t,function(t){var i=new e.Response(t,r);(oc(),nu)&&nu.then(function(t){return t.put(ak(n.url),i)}).catch(function(n){return gt(n.message)})}))}function ak(n){var t=n.indexOf("?");return t<0?n:n.slice(0,t)}function cft(n,t){if(oc(),!nu)return t(null);var i=ak(n.url);nu.then(function(n){n.match(i).then(function(r){var u=lft(r);n.delete(i);u&&n.put(i,r.clone());t(null,r,u)}).catch(t)}).catch(t)}function lft(n){if(!n)return!1;var t=new Date(n.headers.get("Expires")||0),i=bv(n.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}function aft(n){hc++;hc>lk&&(n.getActor().send("enforceCacheSizeLimit",ck),hc=0)}function vft(n){(oc(),nu)&&nu.then(function(t){t.keys().then(function(i){for(var r=0;r<i.length-n;r++)t.delete(i[r])})})}function yft(n){var t=e.caches.delete(hk);n&&t.catch(n).then(function(){return n()})}function pft(n,t){ck=n;lk=t}function vk(){return ty==null&&(ty=e.OffscreenCanvas&&new e.OffscreenCanvas(1,1).getContext("2d")&&typeof e.createImageBitmap=="function"),ty}function bft(n,t){var o=new e.AbortController,i=new e.Request(n.url,{method:n.method||"GET",body:n.body,credentials:n.credentials,headers:n.headers,referrer:ry(),signal:o.signal}),s=!1,r=!1,h=tft(i.url),u,f;return n.type==="json"&&i.headers.set("Accept","application/json"),u=function(u,o,s){if(!r){if(u&&u.message!=="SecurityError"&&gt(u),o&&s)return f(o);var c=Date.now();e.fetch(i).then(function(i){if(i.ok){var r=h?i.clone():null;return f(i,r,c)}return t(new yk(i.statusText,i.status,n.url))}).catch(function(n){n.code!==20&&t(new Error(n.message))})}},f=function(u,f,e){(n.type==="arrayBuffer"?u.arrayBuffer():n.type==="json"?u.json():u.text()).then(function(n){r||(f&&e&&hft(i,f,e),s=!0,t(null,n,u.headers.get("Cache-Control"),u.headers.get("Expires")))}).catch(function(n){r||t(new Error(n.message))})},h?cft(i,u):u(null,null),{cancel:function(){r=!0;s||o.abort()}}}function kft(n,t){var i=new e.XMLHttpRequest,r;i.open(n.method||"GET",n.url,!0);n.type==="arrayBuffer"&&(i.responseType="arraybuffer");for(r in n.headers)i.setRequestHeader(r,n.headers[r]);return n.type==="json"&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials=n.credentials==="include",i.onerror=function(){t(new Error(i.statusText))},i.onload=function(){if((i.status>=200&&i.status<300||i.status===0)&&i.response!==null){var r=i.response;if(n.type==="json")try{r=JSON.parse(i.response)}catch(u){return t(u)}t(null,r,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new yk(i.statusText,i.status,n.url))},i.send(n.body),{cancel:function(){return i.abort()}}}function net(n){var t=e.document.createElement("a");return t.href=n,t.protocol===e.document.location.protocol&&t.host===e.document.location.host}function tet(n,t,i,r){var u=new e.Image,f=e.URL,o;u.onload=function(){t(null,u);f.revokeObjectURL(u.src);u.onload=null;e.requestAnimationFrame(function(){u.src=fy})};u.onerror=function(){return t(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."))};o=new e.Blob([new Uint8Array(n)],{type:"image/png"});u.cacheControl=i;u.expires=r;u.src=n.byteLength?f.createObjectURL(o):fy}function iet(n,t){var i=new e.Blob([new Uint8Array(n)],{type:"image/png"});e.createImageBitmap(i).then(function(n){t(null,n)}).catch(function(n){t(new Error("Could not load image because of "+n.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}function bk(n,t,i){var r=i[n]&&i[n].indexOf(t)!==-1;r||(i[n]=i[n]||[],i[n].push(t))}function oy(n,t,i){if(i&&i[n]){var r=i[n].indexOf(t);r!==-1&&i[n].splice(r,1)}}function kk(n){var i=n.key,t=n.value;return t?[new u(i,t,"constants have been deprecated as of v8")]:[]}function we(n){for(var e=[],i=arguments.length-1,t,r,u,f;i-->0;)e[i]=arguments[i+1];for(t=0,r=e;t<r.length;t+=1){u=r[t];for(f in u)n[f]=u[f]}return n}function ft(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function vf(n){var t,i;if(Array.isArray(n))return n.map(vf);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){t={};for(i in n)t[i]=vf(n[i]);return t}return ft(n)}function bi(n,t){return{kind:"array",itemType:n,N:t}}function g(n){if(n.kind==="array"){var t=g(n.itemType);return typeof n.N=="number"?"array<"+t+", "+n.N+">":n.itemType.kind==="value"?"array":"array<"+t+">"}return n.kind}function ps(n,t){var i,r,u;if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!ps(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value")for(i=0,r=dk;i<r.length;i+=1)if(u=r[i],!ps(u,t))return null}return"Expected "+g(n)+" but found "+g(t)+" instead."}function hy(n,t){return t.some(function(t){return t.kind===n.kind})}function ws(n,t){return t.some(function(t){return t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n})}function nd(n,t,i,r){if(!(typeof n=="number"&&n>=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof i=="number"&&i>=0&&i<=255)){var u=typeof r=="number"?[n,t,i,r]:[n,t,i];return"Invalid rgba value ["+u.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return(typeof r=="undefined"||typeof r=="number"&&r>=0&&r<=1)?null:"Invalid rgba value ["+[n,t,i,r].join(", ")+"]: 'a' must be between 0 and 1."}function pc(n){var t,i,r,u;if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof y||n instanceof de||n instanceof lt||n instanceof ui)return!0;if(Array.isArray(n)){for(t=0,i=n;t<i.length;t+=1)if(r=i[t],!pc(r))return!1;return!0}if(typeof n=="object"){for(u in n)if(!pc(n[u]))return!1;return!0}return!1}function et(n){var e,t,r,u,o,f;if(n===null)return as;if(typeof n=="string")return a;if(typeof n=="boolean")return c;if(typeof n=="number")return i;if(n instanceof y)return sr;if(n instanceof de)return vc;if(n instanceof lt)return vs;if(n instanceof ui)return ys;if(Array.isArray(n)){for(e=n.length,r=0,u=n;r<u.length;r+=1)if(o=u[r],f=et(o),t)if(t===f)continue;else{t=l;break}else t=f;return bi(t||l,e)}return ke}function bs(n){var t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof y||n instanceof lt||n instanceof ui?n.toString():JSON.stringify(n)}function uet(n){return Array.isArray(n)?"("+n.map(g).join(", ")+")":"("+g(n.type)+"...)"}function cy(n,t){n[0]=Math.min(n[0],t[0]);n[1]=Math.min(n[1],t[1]);n[2]=Math.max(n[2],t[0]);n[3]=Math.max(n[3],t[1])}function fet(n){return(180+n)/360}function eet(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function bc(n,t){return n[0]<=t[0]?!1:n[2]>=t[2]?!1:n[1]<=t[1]?!1:n[3]>=t[3]?!1:!0}function oet(n,t){var r=fet(n[0]),u=eet(n[1]),i=Math.pow(2,t.z);return[Math.round(r*i*fu),Math.round(u*i*fu)]}function set(n,t,i){var r=n[0]-t[0],u=n[1]-t[1],f=n[0]-i[0],e=n[1]-i[1];return r*e-f*u==0&&r*f<=0&&u*e<=0}function het(n,t,i){return t[1]>n[1]!=i[1]>n[1]&&n[0]<(i[0]-t[0])*(n[1]-t[1])/(i[1]-t[1])+t[0]}function ly(n,t){for(var r,i,e,u=!1,f=0,o=t.length;f<o;f++)for(r=t[f],i=0,e=r.length;i<e-1;i++){if(set(n,r[i],r[i+1]))return!1;het(n,r[i],r[i+1])&&(u=!u)}return u}function cet(n,t){for(var i=0;i<t.length;i++)if(ly(n,t[i]))return!0;return!1}function aet(n,t){return n[0]*t[1]-n[1]*t[0]}function rd(n,t,i,r){var s=n[0]-i[0],h=n[1]-i[1],c=t[0]-i[0],l=t[1]-i[1],u=r[0]-i[0],f=r[1]-i[1],e=s*f-u*h,o=c*f-u*l;return e>0&&o<0||e<0&&o>0?!0:!1}function vet(n,t,i,r){var u=[t[0]-n[0],t[1]-n[1]],f=[r[0]-i[0],r[1]-i[1]];return aet(f,u)===0?!1:rd(n,t,i,r)&&rd(i,r,n,t)?!0:!1}function yet(n,t,i){for(var f,r,u=0,e=i;u<e.length;u+=1)for(f=e[u],r=0;r<f.length-1;++r)if(vet(n,t,f[r],f[r+1]))return!0;return!1}function ud(n,t){for(var i,r=0;r<n.length;++r)if(!ly(n[r],t))return!1;for(i=0;i<n.length-1;++i)if(yet(n[i],n[i+1],t))return!1;return!0}function pet(n,t){for(var i=0;i<t.length;i++)if(ud(n,t[i]))return!0;return!1}function ay(n,t,i){for(var f,u,e,o=[],r=0;r<n.length;r++){for(f=[],u=0;u<n[r].length;u++)e=oet(n[r][u],i),cy(t,e),f.push(e);o.push(f)}return o}function fd(n,t,i){for(var f,u=[],r=0;r<n.length;r++)f=ay(n[r],t,i),u.push(f);return u}function ed(n,t,i,r){if(n[0]<i[0]||n[0]>i[2]){var u=r*.5,f=n[0]-i[0]>u?-r:i[0]-n[0]>u?r:0;f===0&&(f=n[0]-i[2]>u?-r:i[2]-n[0]>u?r:0);n[0]+=f}cy(t,n)}function wet(n){n[0]=n[1]=Infinity;n[2]=n[3]=-Infinity}function od(n,t,i,r){for(var a,u,e,o,s,v=Math.pow(2,r.z)*fu,h=[r.x*fu,r.y*fu],c=[],f=0,l=n;f<l.length;f+=1)for(a=l[f],u=0,e=a;u<e.length;u+=1)o=e[u],s=[o.x+h[0],o.y+h[1]],ed(s,t,i,v),c.push(s);return c}function sd(n,t,i,r){for(var k,h,u,c,l,a,f,v,d,e,y,g,p=Math.pow(2,r.z)*fu,w=[r.x*fu,r.y*fu],o=[],s=0,b=n;s<b.length;s+=1){for(k=b[s],h=[],u=0,c=k;u<c.length;u+=1)l=c[u],a=[l.x+w[0],l.y+w[1]],cy(t,a),h.push(a);o.push(h)}if(t[2]-t[0]<=p/2)for(wet(t),f=0,v=o;f<v.length;f+=1)for(d=v[f],e=0,y=d;e<y.length;e+=1)g=y[e],ed(g,t,i,p);return o}function bet(n,t){var r=[Infinity,Infinity,-Infinity,-Infinity],i=[Infinity,Infinity,-Infinity,-Infinity],u=n.canonicalID(),h,c,f,o,l,a,v,e,s,y;if(t.type==="Polygon"){if(h=ay(t.coordinates,i,u),c=od(n.geometry(),r,i,u),!bc(r,i))return!1;for(f=0,o=c;f<o.length;f+=1)if(l=o[f],!ly(l,h))return!1}if(t.type==="MultiPolygon"){if(a=fd(t.coordinates,i,u),v=od(n.geometry(),r,i,u),!bc(r,i))return!1;for(e=0,s=v;e<s.length;e+=1)if(y=s[e],!cet(y,a))return!1}return!0}function ket(n,t){var r=[Infinity,Infinity,-Infinity,-Infinity],i=[Infinity,Infinity,-Infinity,-Infinity],u=n.canonicalID(),h,c,f,o,l,a,v,e,s,y;if(t.type==="Polygon"){if(h=ay(t.coordinates,i,u),c=sd(n.geometry(),r,i,u),!bc(r,i))return!1;for(f=0,o=c;f<o.length;f+=1)if(l=o[f],!ud(l,h))return!1}if(t.type==="MultiPolygon"){if(a=fd(t.coordinates,i,u),v=sd(n.geometry(),r,i,u),!bc(r,i))return!1;for(e=0,s=v;e<s.length;e+=1)if(y=s[e],!pet(y,a))return!1}return!0}function kc(n){if(n instanceof wt&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof di)return!1;var t=!0;return n.eachChild(function(n){t&&!kc(n)&&(t=!1)}),t}function ks(n){if(n instanceof wt&&n.name==="feature-state")return!1;var t=!0;return n.eachChild(function(n){t&&!ks(n)&&(t=!1)}),t}function dc(n,t){if(n instanceof wt&&t.indexOf(n.name)>=0)return!1;var i=!0;return n.eachChild(function(n){i&&!dc(n,t)&&(i=!1)}),i}function vy(n){if(n instanceof eu)return vy(n.boundExpression);if(n instanceof wt&&n.name==="error"||n instanceof uu||n instanceof di)return!1;var i=n instanceof yi||n instanceof ni,t=!0;return(n.eachChild(function(n){t=i?t&&vy(n):t&&n instanceof ki}),!t)?!1:kc(n)&&dc(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function gc(n,t){for(var e=n.length-1,r=0,u=e,i=0,f,o;r<=u;)if(i=Math.floor((r+u)/2),f=n[i],o=n[i+1],f<=t){if(i===e||t<o)return i;r=i+1}else if(f>t)u=i-1;else throw new at("Input is not a number.");return 0}function ot(n,t,i){return n*(1-i)+t*i}function det(n,t,i){return new y(ot(n.r,t.r,i),ot(n.g,t.g,i),ot(n.b,t.b,i),ot(n.a,t.a,i))}function get(n,t,i){return n.map(function(n,r){return ot(n,t[r],i)})}function yy(n){return n>not?Math.pow(n,1/3):n/vd+ad}function py(n){return n>ge?n*n*n:vd*(n-ad)}function wy(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function by(n){return n/=255,n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function yd(n){var t=by(n.r),i=by(n.g),r=by(n.b),f=yy((.4124564*t+.3575761*i+.1804375*r)/hd),u=yy((.2126729*t+.7151522*i+.072175*r)/cd),e=yy((.0193339*t+.119192*i+.9503041*r)/ld);return{l:116*u-16,a:500*(f-u),b:200*(u-e),alpha:n.a}}function pd(n){var t=(n.l+16)/116,i=isNaN(n.a)?t:t+n.a/500,r=isNaN(n.b)?t:t-n.b/200;return t=cd*py(t),i=hd*py(i),r=ld*py(r),new y(wy(3.2404542*i-1.5371385*t-.4985314*r),wy(-.969266*i+1.8760108*t+.041556*r),wy(.0556434*i-.2040259*t+1.0572252*r),n.alpha)}function rot(n,t,i){return{l:ot(n.l,t.l,i),a:ot(n.a,t.a,i),b:ot(n.b,t.b,i),alpha:ot(n.alpha,t.alpha,i)}}function uot(n){var t=yd(n),f=t.l,i=t.a,r=t.b,u=Math.atan2(r,i)*iot;return{h:u<0?u+360:u,c:Math.sqrt(i*i+r*r),l:f,alpha:n.a}}function fot(n){var t=n.h*tot,i=n.c,r=n.l;return pd({l:r,a:Math.cos(t)*i,b:Math.sin(t)*i,alpha:n.alpha})}function eot(n,t,i){var r=t-n;return n+i*(r>180||r<-180?r-360*Math.round(r/360):r)}function oot(n,t,i){return{h:eot(n.h,t.h,i),c:ot(n.c,t.c,i),l:ot(n.l,t.l,i),alpha:ot(n.alpha,t.alpha,i)}}function ky(n,t,i,r){var u=r-i,f=n-i;return u===0?0:t===1?f/u:(Math.pow(t,f)-1)/(Math.pow(t,u)-1)}function bd(n,t){return n==="=="||n==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function sot(n,t,i){return t===i}function hot(n,t,i){return t!==i}function cot(n,t,i){return t<i}function lot(n,t,i){return t>i}function aot(n,t,i){return t<=i}function vot(n,t,i){return t>=i}function kd(n,t,i,r){return r.compare(t,i)===0}function yot(n,t,i,r){return!kd(n,t,i,r)}function pot(n,t,i,r){return r.compare(t,i)<0}function wot(n,t,i,r){return r.compare(t,i)>0}function bot(n,t,i,r){return r.compare(t,i)<=0}function kot(n,t,i,r){return r.compare(t,i)>=0}function no(n,t,i){var r=n!=="=="&&n!=="!=";return function(){function u(n,t,i){this.type=c;this.lhs=n;this.rhs=t;this.collator=i;this.hasUntypedArgument=n.type.kind==="value"||t.type.kind==="value"}return u.parse=function(n,t){var e,i,f,o;if(n.length!==3&&n.length!==4)return t.error("Expected two or three arguments.");if(e=n[0],i=t.parse(n[1],1,l),!i)return null;if(!bd(e,i.type))return t.concat(1).error('"'+e+"\" comparisons are not supported for type '"+g(i.type)+"'.");if(f=t.parse(n[2],2,l),!f)return null;if(!bd(e,f.type))return t.concat(2).error('"'+e+"\" comparisons are not supported for type '"+g(f.type)+"'.");if(i.type.kind!==f.type.kind&&i.type.kind!=="value"&&f.type.kind!=="value")return t.error("Cannot compare types '"+g(i.type)+"' and '"+g(f.type)+"'.");if(r&&(i.type.kind==="value"&&f.type.kind!=="value"?i=new ni(f.type,[i]):i.type.kind!=="value"&&f.type.kind==="value"&&(f=new ni(i.type,[f]))),o=null,n.length===4){if(i.type.kind!=="string"&&f.type.kind!=="string"&&i.type.kind!=="value"&&f.type.kind!=="value")return t.error("Cannot use collator to compare non-string types.");if(o=t.parse(n[3],3,vc),!o)return null}return new u(i,f,o)},u.prototype.evaluate=function(u){var f=this.lhs.evaluate(u),e=this.rhs.evaluate(u),o,s,h,c;if(r&&this.hasUntypedArgument&&(o=et(f),s=et(e),o.kind!==s.kind||!(o.kind==="string"||o.kind==="number")))throw new at('Expected arguments for "'+n+'" to be (string, string) or (number, number), but found ('+o.kind+", "+s.kind+") instead.");return this.collator&&!r&&this.hasUntypedArgument&&(h=et(f),c=et(e),h.kind!=="string"||c.kind!=="string")?t(u,f,e):this.collator?i(u,f,e,this.collator.evaluate(u)):t(u,f,e)},u.prototype.eachChild=function(n){n(this.lhs);n(this.rhs);this.collator&&n(this.collator)},u.prototype.outputDefined=function(){return!0},u.prototype.serialize=function(){var t=[n];return this.eachChild(function(n){t.push(n.serialize())}),t},u}()}function dd(n,t){var r=t[0],u=t[1],f=t[2],o=t[3],i,e;if(r=r.evaluate(n),u=u.evaluate(n),f=f.evaluate(n),i=o?o.evaluate(n):1,e=nd(r,u,f,i),e)throw new at(e);return new y(r/255*i,u/255*i,f/255*i,i)}function gd(n,t){return n in t}function dy(n,t){var i=t[n];return typeof i=="undefined"?null:i}function ust(n,t,i,r){while(i<=r){var u=i+r>>1;if(t[u]===n)return!0;t[u]>n?r=u-1:i=u+1}return!1}function wf(n){return{type:n}}function gy(n){return{result:"success",value:n}}function to(n){return{result:"error",value:n}}function io(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function ng(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function np(n){return!!n.expression&&n.expression.interpolated}function k(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function tl(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function fst(n){return n}function tg(n,t){var tt=t.type==="color",a=n.stops&&typeof n.stops[0][0]=="object",it=a||n.property!==undefined,rt=a||!it,i=n.type||(np(t)?"exponential":"interval"),r,e,v,o,p,w,u,b,s,h,f,c,l,k,d,g,nt;if(tt&&(n=we({},n),n.stops&&(n.stops=n.stops.map(function(n){return[n[0],y.parse(n[1])]})),n.default=n.default?y.parse(n.default):y.parse(t.default)),n.colorSpace&&n.colorSpace!=="rgb"&&!wd[n.colorSpace])throw new Error("Unknown color space: "+n.colorSpace);if(i==="exponential")r=ig;else if(i==="interval")r=ost;else if(i==="categorical"){for(r=est,e=Object.create(null),o=0,p=n.stops;o<p.length;o+=1)w=p[o],e[w[0]]=w[1];v=typeof n.stops[0][0]}else if(i==="identity")r=sst;else throw new Error('Unknown function type "'+i+'"');if(a){for(u={},b=[],s=0;s<n.stops.length;s++)h=n.stops[s],f=h[0].zoom,u[f]===undefined&&(u[f]={zoom:f,type:n.type,property:n.property,"default":n.default,stops:[]},b.push(f)),u[f].stops.push([h[0].value,h[1]]);for(c=[],l=0,k=b;l<k.length;l+=1)d=k[l],c.push([u[d].zoom,tg(u[d],t)]);return g={name:"linear"},{kind:"composite",interpolationType:g,interpolationFactor:bt.interpolationFactor.bind(undefined,g),zoomStops:c.map(function(n){return n[0]}),evaluate:function(i,r){var u=i.zoom;return ig({stops:c,base:n.base},t,u).evaluate(u,r)}}}return rt?(nt=i==="exponential"?{name:"exponential",base:n.base!==undefined?n.base:1}:null,{kind:"camera",interpolationType:nt,interpolationFactor:bt.interpolationFactor.bind(undefined,nt),zoomStops:n.stops.map(function(n){return n[0]}),evaluate:function(i){var u=i.zoom;return r(n,t,u,e,v)}}):{kind:"source",evaluate:function(i,u){var f=u&&u.properties?u.properties[n.property]:undefined;return f===undefined?nh(n.default,t.default):r(n,t,f,e,v)}}}function nh(n,t,i){return n!==undefined?n:t!==undefined?t:i!==undefined?i:void 0}function est(n,t,i,r,u){var f=typeof i===u?r[i]:undefined;return nh(f,n.default,t.default)}function ost(n,t,i){var r,u;return k(i)!=="number"?nh(n.default,t.default):(r=n.stops.length,r===1)?n.stops[0][1]:i<=n.stops[0][0]?n.stops[0][1]:i>=n.stops[r-1][0]?n.stops[r-1][1]:(u=gc(n.stops.map(function(n){return n[0]}),i),n.stops[u][1])}function ig(n,t,i){var c=n.base!==undefined?n.base:1,u,r;if(k(i)!=="number")return nh(n.default,t.default);if((u=n.stops.length,u===1)||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[u-1][0])return n.stops[u-1][1];var f=gc(n.stops.map(function(n){return n[0]}),i),e=hst(i,c,n.stops[f][0],n.stops[f+1][0]),o=n.stops[f][1],h=n.stops[f+1][1],s=nl[t.type]||fst;return(n.colorSpace&&n.colorSpace!=="rgb"&&(r=wd[n.colorSpace],s=function(n,t){return r.reverse(r.interpolate(r.forward(n),r.forward(t),e))}),typeof o.evaluate=="function")?{evaluate:function(){for(var n=[],t=arguments.length,i,r;t--;)n[t]=arguments[t];return(i=o.evaluate.apply(undefined,n),r=h.evaluate.apply(undefined,n),i===undefined||r===undefined)?undefined:s(i,r,e)}}:s(o,h,e)}function sst(n,t,i){return t.type==="color"?i=y.parse(i):t.type==="formatted"?i=lt.fromString(i.toString()):t.type==="resolvedImage"?i=ui.fromString(i.toString()):k(i)===t.type||t.type==="enum"&&t.values[i]||(i=undefined),nh(i,n.default,t.default)}function hst(n,t,i,r){var u=r-i,f=n-i;return u===0?0:t===1?f/u:(Math.pow(t,f)-1)/(Math.pow(t,u)-1)}function il(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in pf}function rl(n,t){var i=new ou(pf,[],t?lst(t):undefined),r=i.parse(n,undefined,undefined,undefined,t&&t.type==="string"?{typeAnnotation:"coerce"}:undefined);return r?gy(new ro(r,t)):to(i.errors)}function rg(n,t){var r,u,f,i,e;if(n=rl(n,t),n.result==="error")return n;if(r=n.value.expression,u=kc(r),!u&&!io(t))return to([new ir("","data expressions not supported")]);if(f=dc(r,["zoom"]),!f&&!ng(t))return to([new ir("","zoom expressions not supported")]);if(i=ul(r),i||f){if(i instanceof ir)return to([i]);if(i instanceof bt&&!np(t))return to([new ir("",'"interpolate" expressions cannot be used with this property')])}else return to([new ir("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);return i?(e=i instanceof bt?i.interpolation:undefined,gy(u?new rf("camera",n.value,i.labels,e):new rf("composite",n.value,i.labels,e))):gy(u?new bf("constant",n.value):new bf("source",n.value))}function cst(n,t){var i,r;if(tl(n))return new uo(n,t);if(il(n)){if(i=rg(n,t),i.result==="error")throw new Error(i.value.map(function(n){return n.key+": "+n.message}).join(", "));return i.value}return r=n,typeof n=="string"&&t.type==="color"&&(r=y.parse(n)),{kind:"constant",evaluate:function(){return r}}}function ul(n){var t=null,i,r,u;if(n instanceof su)t=ul(n.result);else if(n instanceof lr){for(i=0,r=n.args;i<r.length;i+=1)if(u=r[i],t=ul(u),t)break}else(n instanceof cr||n instanceof bt)&&n.input instanceof wt&&n.input.name==="zoom"&&(t=n);return t instanceof ir?t:(n.eachChild(function(n){var i=ul(n);i instanceof ir?t=i:!t&&i?t=new ir("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new ir("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t)}function lst(n){var t={color:sr,string:a,number:i,"enum":a,boolean:c,formatted:vs,resolvedImage:ys};return n.type==="array"?bi(t[n.value]||l,n.length):t[n.type]}function ast(n){return n.type==="color"&&tl(n.default)?new y(0,0,0,0):n.type==="color"?y.parse(n.default)||null:n.default===undefined?null:n.default}function rr(n){var f=n.key,t=n.value,i=n.valueSpec||{},o=n.objectElementValidators||{},a=n.style,v=n.styleSpec,s=[],l=k(t),r,e;if(l!=="object")return[new u(f,t,"object expected, "+l+" found")];for(r in t){var c=r.split(".")[0],y=i[c]||i["*"],h=void 0;if(o[c])h=o[c];else if(i[c])h=ur;else if(o["*"])h=o["*"];else if(i["*"])h=ur;else{s.push(new u(f,t[r],'unknown property "'+r+'"'));continue}s=s.concat(h({key:(f?f+".":f)+r,value:t[r],valueSpec:y,style:a,styleSpec:v,object:t,objectKey:r},t))}for(e in i)o[e]||i[e].required&&i[e]["default"]===undefined&&t[e]===undefined&&s.push(new u(f,t,'missing required property "'+e+'"'));return s}function ug(n){var t=n.value,i=n.valueSpec,h=n.style,s=n.styleSpec,f=n.key,c=n.arrayElementValidator||ur,e,o,r;if(k(t)!=="array")return[new u(f,t,"array expected, "+k(t)+" found")];if(i.length&&t.length!==i.length)return[new u(f,t,"array length "+i.length+" expected, length "+t.length+" found")];if(i["min-length"]&&t.length<i["min-length"])return[new u(f,t,"array length at least "+i["min-length"]+" expected, length "+t.length+" found")];for(e={type:i.value,values:i.values},s.$version<7&&(e.function=i.function),k(i.value)==="object"&&(e=i.value),o=[],r=0;r<t.length;r++)o=o.concat(c({array:t,arrayIndex:r,value:t[r],valueSpec:e,style:h,styleSpec:s,key:f+"["+r+"]"}));return o}function fg(n){var f=n.key,t=n.value,i=n.valueSpec,r=k(t);return(r==="number"&&t!==t&&(r="NaN"),r!=="number")?[new u(f,t,"number expected, "+r+" found")]:"minimum"in i&&t<i.minimum?[new u(f,t,t+" is less than the minimum value "+i.minimum)]:"maximum"in i&&t>i.maximum?[new u(f,t,t+" is greater than the maximum value "+i.maximum)]:[]}function eg(n){function v(n){if(t==="identity")return[new u(n.key,n.value,'identity function may not have a "stops" property')];var i=[],r=n.value;return i=i.concat(ug({key:n.key,value:r,valueSpec:n.valueSpec,style:n.style,styleSpec:n.styleSpec,arrayElementValidator:y})),k(r)==="array"&&r.length===0&&i.push(new u(n.key,r,"array must have at least one stop")),i}function y(n){var r=[],t=n.value,i=n.key;if(k(t)!=="array")return[new u(i,t,"array expected, "+k(t)+" found")];if(t.length!==2)return[new u(i,t,"array length 2 expected, length "+t.length+" found")];if(c){if(k(t[0])!=="object")return[new u(i,t,"object expected, "+k(t[0])+" found")];if(t[0].zoom===undefined)return[new u(i,t,"object stop key must have zoom")];if(t[0].value===undefined)return[new u(i,t,"object stop key must have value")];if(e&&e>ft(t[0].zoom))return[new u(i,t[0].zoom,"stop zoom values must appear in ascending order")];ft(t[0].zoom)!==e&&(e=ft(t[0].zoom),f=undefined,s={});r=r.concat(rr({key:i+"[0]",value:t[0],valueSpec:{zoom:{}},style:n.style,styleSpec:n.styleSpec,objectElementValidators:{zoom:fg,value:l}}))}else r=r.concat(l({key:i+"[0]",value:t[0],valueSpec:{},style:n.style,styleSpec:n.styleSpec},t));return il(vf(t[1]))?r.concat([new u(i+"[1]",t[1],"expressions are not allowed in function stops.")]):r.concat(ur({key:i+"[1]",value:t[1],valueSpec:o,style:n.style,styleSpec:n.styleSpec}))}function l(n,i){var e=k(n.value),h=ft(n.value),c=n.value!==null?n.value:i,l;if(r){if(e!==r)return[new u(n.key,c,e+" stop domain type must match previous stop domain type "+r)]}else r=e;return e!=="number"&&e!=="string"&&e!=="boolean"?[new u(n.key,c,"stop domain value must be a number, string, or boolean")]:e!=="number"&&t!=="categorical"?(l="number expected, "+e+" found",io(o)&&t===undefined&&(l+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new u(n.key,c,l)]):t==="categorical"&&e==="number"&&(!isFinite(h)||Math.floor(h)!==h)?[new u(n.key,c,"integer expected, found "+h)]:t!=="categorical"&&e==="number"&&f!==undefined&&h<f?[new u(n.key,c,"stop domain values must appear in ascending order")]:(f=h,t==="categorical"&&h in s)?[new u(n.key,c,"stop domain values must be unique")]:(s[h]=!0,[])}function p(n){return ur({key:n.key,value:n.value,valueSpec:o,style:n.style,styleSpec:n.styleSpec})}var o=n.valueSpec,t=ft(n.value.type),r,s={},f,e,h=t!=="categorical"&&n.value.property===undefined,a=!h,c=k(n.value.stops)==="array"&&k(n.value.stops[0])==="array"&&k(n.value.stops[0][0])==="object",i=rr({key:n.key,value:n.value,valueSpec:n.styleSpec.function,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:v,"default":p}});return t==="identity"&&h&&i.push(new u(n.key,n.value,'missing required property "property"')),t==="identity"||n.value.stops||i.push(new u(n.key,n.value,'missing required property "stops"')),t==="exponential"&&n.valueSpec.expression&&!np(n.valueSpec)&&i.push(new u(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(a&&!io(n.valueSpec)?i.push(new u(n.key,n.value,"property functions not supported")):h&&!ng(n.valueSpec)&&i.push(new u(n.key,n.value,"zoom functions not supported"))),(t==="categorical"||c)&&n.value.property===undefined&&i.push(new u(n.key,n.value,'"property" property is required')),i}function fo(n){var i=(n.expressionContext==="property"?rg:rl)(vf(n.value),n.valueSpec),t;if(i.result==="error")return i.value.map(function(t){return new u(""+n.key+t.key,n.value,t.message)});if(t=i.value.expression||i.value._styleExpression.expression,n.expressionContext==="property"&&n.propertyKey==="text-font"&&!t.outputDefined())return[new u(n.key,n.value,'Invalid data expression for "'+n.propertyKey+'". Output values must be contained as literals within the expression.')];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!ks(t))return[new u(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!ks(t))return[new u(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!dc(t,["zoom","feature-state"]))return[new u(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!kc(t))return[new u(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function vst(n){var t=n.value,r=n.key,i=k(t);return i!=="boolean"?[new u(r,t,"boolean expected, "+i+" found")]:[]}function yst(n){var i=n.key,t=n.value,r=k(t);return r!=="string"?[new u(i,t,"color expected, "+r+" found")]:gk(t)===null?[new u(i,t,'color expected, "'+t+'" found')]:[]}function fl(n){var f=n.key,t=n.value,i=n.valueSpec,r=[];return Array.isArray(i.values)?i.values.indexOf(ft(t))===-1&&r.push(new u(f,t,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(t)+" found")):Object.keys(i.values).indexOf(ft(t))===-1&&r.push(new u(f,t,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(t)+" found")),r}function tp(n){var t,i,r;if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(t=0,i=n.slice(1);t<i.length;t+=1)if(r=i[t],!tp(r)&&typeof r!="boolean")return!1;return!0;default:return!0}}function el(n){var t,i;if(n===null||n===undefined)return{filter:function(){return!0},needGeometry:!1};if(tp(n)||(n=ol(n)),t=rl(n,og),t.result==="error")throw new Error(t.value.map(function(n){return n.key+": "+n.message}).join(", "));else return i=sg(n),{filter:function(n,i,r){return t.value.evaluate(n,i,{},r)},needGeometry:i}}function pst(n,t){return n<t?-1:n>t?1:0}function sg(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(var t=1;t<n.length;t++)if(sg(n[t]))return!0;return!1}function ol(n){var t;return n?(t=n[0],n.length<=1)?t!=="any":t==="=="?ip(n[1],n[2],"=="):t==="!="?sl(ip(n[1],n[2],"==")):t==="<"||t===">"||t==="<="||t===">="?ip(n[1],n[2],t):t==="any"?wst(n.slice(1)):t==="all"?["all"].concat(n.slice(1).map(ol)):t==="none"?["all"].concat(n.slice(1).map(ol).map(sl)):t==="in"?hg(n[1],n.slice(2)):t==="!in"?sl(hg(n[1],n.slice(2))):t==="has"?cg(n[1]):t==="!has"?sl(cg(n[1])):t==="within"?n:!0:!0}function ip(n,t,i){switch(n){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,n,t]}}function wst(n){return["any"].concat(n.map(ol))}function hg(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(n){return typeof n!=typeof t[0]})?["filter-in-large",n,["literal",t.sort(pst)]]:["filter-in-small",n,["literal",t]]}}function cg(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function sl(n){return["!",n]}function rp(n){return tp(vf(n.value))?fo(we({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):lg(n)}function lg(n){var t=n.value,f=n.key,s,r,i,e,o;if(k(t)!=="array")return[new u(f,t,"array expected, "+k(t)+" found")];if(s=n.styleSpec,i=[],t.length<1)return[new u(f,t,"filter array must have at least 1 element")];i=i.concat(fl({key:f+"[0]",value:t[0],valueSpec:s.filter_operator,style:n.style,styleSpec:n.styleSpec}));switch(ft(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&ft(t[1])==="$type"&&i.push(new u(f,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":t.length!==3&&i.push(new u(f,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":for(t.length>=2&&(r=k(t[1]),r!=="string"&&i.push(new u(f+"[1]",t[1],"string expected, "+r+" found"))),e=2;e<t.length;e++)r=k(t[e]),ft(t[1])==="$type"?i=i.concat(fl({key:f+"["+e+"]",value:t[e],valueSpec:s.geometry_type,style:n.style,styleSpec:n.styleSpec})):r!=="string"&&r!=="number"&&r!=="boolean"&&i.push(new u(f+"["+e+"]",t[e],"string, number, or boolean expected, "+r+" found"));break;case"any":case"all":case"none":for(o=1;o<t.length;o++)i=i.concat(lg({key:f+"["+o+"]",value:t[o],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":r=k(t[1]);t.length!==2?i.push(new u(f,t,'filter array for "'+t[0]+'" operator must have 2 elements')):r!=="string"&&i.push(new u(f+"[1]",t[1],"string expected, "+r+" found"));break;case"within":r=k(t[1]);t.length!==2?i.push(new u(f,t,'filter array for "'+t[0]+'" operator must have 2 elements')):r!=="object"&&i.push(new u(f+"[1]",t[1],"object expected, "+r+" found"))}return i}function ag(n,t){var f=n.key,o=n.style,s=n.styleSpec,i=n.value,r=n.objectKey,h=s[t+"_"+n.layerType],c,e,a,l;return h?(c=r.match(/^(.*)-transition$/),t==="paint"&&c&&h[c[1]]&&h[c[1]].transition)?ur({key:f,value:i,valueSpec:s.transition,style:o,styleSpec:s}):(e=n.valueSpec||h[r],!e)?[new u(f,i,'unknown property "'+r+'"')]:k(i)==="string"&&io(e)&&!e.tokens&&(a=/^{([^}]+)}$/.exec(i))?[new u(f,i,'"'+r+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(a[1])+" }`.")]:(l=[],n.layerType==="symbol"&&(r==="text-field"&&o&&!o.glyphs&&l.push(new u(f,i,'use of "text-field" requires a style "glyphs" property')),r==="text-font"&&tl(vf(i))&&ft(i.type)==="identity"&&l.push(new u(f,i,'"text-font" does not support identity functions'))),l.concat(ur({key:n.key,value:i,valueSpec:e,style:o,styleSpec:s,expressionContext:"property",propertyType:t,propertyKey:r}))):[]}function vg(n){return ag(n,"paint")}function yg(n){return ag(n,"layout")}function pg(n){var i=[],t=n.value,r=n.key,s=n.style,v=n.styleSpec,f,l,y,h,a,c,o,e;if(t.type||t.ref||i.push(new u(r,t,'either "type" or "ref" is required')),f=ft(t.type),l=ft(t.ref),t.id)for(y=ft(t.id),h=0;h<n.arrayIndex;h++)a=s.layers[h],ft(a.id)===y&&i.push(new u(r,t.id,'duplicate layer id "'+t.id+'", previously used at line '+a.id.__line__));return"ref"in t?(["type","source","source-layer","filter","layout"].forEach(function(n){n in t&&i.push(new u(r,t[n],'"'+n+'" is prohibited for ref layers'))}),s.layers.forEach(function(n){ft(n.id)===l&&(c=n)}),c?c.ref?i.push(new u(r,t.ref,"ref cannot reference another ref layer")):f=ft(c.type):i.push(new u(r,t.ref,'ref layer "'+l+'" not found'))):f!=="background"&&(t.source?(o=s.sources&&s.sources[t.source],e=o&&ft(o.type),o?e==="vector"&&f==="raster"?i.push(new u(r,t.source,'layer "'+t.id+'" requires a raster source')):e==="raster"&&f!=="raster"?i.push(new u(r,t.source,'layer "'+t.id+'" requires a vector source')):e!=="vector"||t["source-layer"]?e==="raster-dem"&&f!=="hillshade"?i.push(new u(r,t.source,"raster-dem source can only be used with layer type 'hillshade'.")):f==="line"&&t.paint&&t.paint["line-gradient"]&&(e!=="geojson"||!o.lineMetrics)&&i.push(new u(r,t,'layer "'+t.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):i.push(new u(r,t,'layer "'+t.id+'" must specify a "source-layer"')):i.push(new u(r,t.source,'source "'+t.source+'" not found'))):i.push(new u(r,t,'missing required property "source"'))),i=i.concat(rr({key:r,value:t,valueSpec:v.layer,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return ur({key:r+".type",value:t.type,valueSpec:v.layer.type,style:n.style,styleSpec:n.styleSpec,object:t,objectKey:"type"})},filter:rp,layout:function(n){return rr({layer:t,key:n.key,value:n.value,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{"*":function(n){return yg(we({layerType:f},n))}}})},paint:function(n){return rr({layer:t,key:n.key,value:n.value,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{"*":function(n){return vg(we({layerType:f},n))}}})}}}))}function eo(n){var t=n.value,r=n.key,i=k(t);return i!=="string"?[new u(r,t,"string expected, "+i+" found")]:[]}function wg(n){var t=n.value,i=n.key,r=n.styleSpec,o=n.style,s,f,e;if(!t.type)return[new u(i,t,'"type" is required')];s=ft(t.type);switch(s){case"vector":case"raster":case"raster-dem":return rr({key:i,value:t,valueSpec:r["source_"+s.replace("-","_")],style:n.style,styleSpec:r,objectElementValidators:up});case"geojson":if(f=rr({key:i,value:t,valueSpec:r.source_geojson,style:o,styleSpec:r,objectElementValidators:up}),t.cluster)for(e in t.clusterProperties){var c=t.clusterProperties[e],h=c[0],l=c[1],a=typeof h=="string"?[h,["accumulated"],["get",e]]:h;f.push.apply(f,fo({key:i+"."+e+".map",value:l,expressionContext:"cluster-map"}));f.push.apply(f,fo({key:i+"."+e+".reduce",value:a,expressionContext:"cluster-reduce"}))}return f;case"video":return rr({key:i,value:t,valueSpec:r.source_video,style:o,styleSpec:r});case"image":return rr({key:i,value:t,valueSpec:r.source_image,style:o,styleSpec:r});case"canvas":return[new u(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return fl({key:i+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:o,styleSpec:r})}}function bst(n){var u=n.key,t=n.value,i,r;if(k(t)==="string")return eo({key:u,value:t});i=[];for(r in t)i.push.apply(i,eo({key:u+"."+r,value:t[r]}));return i}function bg(n){var i=n.value,f=n.styleSpec,e=f.light,s=n.style,r=[],h=k(i),t,o;if(i===undefined)return r;if(h!=="object")return r.concat([new u("light",i,"object expected, "+h+" found")]);for(t in i)o=t.match(/^(.*)-transition$/),r=o&&e[o[1]]&&e[o[1]].transition?r.concat(ur({key:t,value:i[t],valueSpec:f.transition,style:s,styleSpec:f})):e[t]?r.concat(ur({key:t,value:i[t],valueSpec:e[t],style:s,styleSpec:f})):r.concat([new u(t,i[t],'unknown property "'+t+'"')]);return r}function kst(n){return eo(n).length===0?[]:fo(n)}function dst(n){return eo(n).length===0?[]:fo(n)}function ur(n){var i=n.value,t=n.valueSpec,r=n.styleSpec;return t.expression&&tl(ft(i))?eg(n):t.expression&&il(vf(i))?fo(n):t.type&&fp[t.type]?fp[t.type](n):rr(we({},n,{valueSpec:t.type?r[t.type]:t}))}function gst(n){var i=n.value,r=n.key,t=eo(n);return t.length?t:(i.indexOf("{fontstack}")===-1&&t.push(new u(r,i,'"glyphs" url must include a "{fontstack}" token')),i.indexOf("{range}")===-1&&t.push(new u(r,i,'"glyphs" url must include a "{range}" token')),t)}function kf(n,i){i===void 0&&(i=t);var r=[];return r=r.concat(ur({key:"",value:n,valueSpec:i.$root,styleSpec:i,style:n,objectElementValidators:{glyphs:gst,"*":function(){return[]}}})),n.constants&&(r=r.concat(kk({key:"constants",value:n.constants,style:n,styleSpec:i}))),kg(r)}function kg(n){return[].concat(n).sort(function(n,t){return n.line-t.line})}function oo(n){return function(){for(var i=[],t=arguments.length;t--;)i[t]=arguments[t];return kg(n.apply(this,i))}}function dg(n,t){var u=!1,i,r,f;if(t&&t.length)for(i=0,r=t;i<r.length;i+=1)f=r[i],n.fire(new sy(new Error(f.message))),u=!0;return u}function ar(n,t,i){var f=this.cells=[],r,u,e,o,l,s,h,c;if(n instanceof ArrayBuffer){for(this.arrayBuffer=n,r=new Int32Array(this.arrayBuffer),n=r[0],t=r[1],i=r[2],this.d=t+2*i,u=0;u<this.d*this.d;u++)e=r[lu+u],o=r[lu+u+1],f.push(e===o?null:r.subarray(e,o));l=r[lu+f.length];s=r[lu+f.length+1];this.keys=r.subarray(l,s);this.bboxes=r.subarray(s);this.insert=this._insertReadonly}else{for(this.d=t+2*i,h=0;h<this.d*this.d;h++)f.push([]);this.keys=[];this.bboxes=[]}this.n=t;this.extent=n;this.padding=i;this.scale=t/n;this.uid=0;c=i/t*n;this.min=-c;this.max=n+c}function f(n,t,i){i===void 0&&(i={});Object.defineProperty(t,"_classRegistryKey",{value:n,writeable:!1});ih[n]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}}function tn(n){return n&&typeof ArrayBuffer!="undefined"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}function rn(n){return nn&&n instanceof nn}function rh(n,t){var o,s,e,h,l,f,i,r,u,c;if(n===null||n===undefined||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp)return n;if(tn(n)||rn(n))return t&&t.push(n),n;if(ArrayBuffer.isView(n))return o=n,t&&t.push(o.buffer),o;if(n instanceof gg)return t&&t.push(n.data.buffer),n;if(Array.isArray(n)){for(s=[],e=0,h=n;e<h.length;e+=1)l=h[e],s.push(rh(l,t));return s}if(typeof n=="object"){if(f=n.constructor,i=f._classRegistryKey,!i)throw new Error("can't serialize object of unregistered class");if(r=f.serialize?f.serialize(n,t):{},!f.serialize){for(u in n)n.hasOwnProperty(u)&&(ih[i].omit.indexOf(u)>=0||(c=n[u],r[u]=ih[i].shallow.indexOf(u)>=0?c:rh(c,t)));n instanceof Error&&(r.message=n.message)}if(r.$name)throw new Error("$name property is reserved for worker serialization logic.");return i!=="Object"&&(r.$name=i),r}throw new Error("can't serialize object of type "+typeof n);}function uh(n){var f,r,e,t,o;if(n===null||n===undefined||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp||tn(n)||rn(n)||ArrayBuffer.isView(n)||n instanceof gg)return n;if(Array.isArray(n))return n.map(uh);if(typeof n=="object"){var u=n.$name||"Object",s=ih[u],i=s.klass;if(!i)throw new Error("can't deserialize unregistered class "+u);if(i.deserialize)return i.deserialize(n);for(f=Object.create(i.prototype),r=0,e=Object.keys(n);r<e.length;r+=1)(t=e[r],t!=="$name")&&(o=n[t],f[t]=ih[u].shallow.indexOf(t)>=0?o:uh(o));return f}throw new Error("can't deserialize object of type "+typeof n);}function ep(n){for(var r,t=0,i=n;t<i.length;t+=1)if(r=i[t],op(r.charCodeAt(0)))return!0;return!1}function rht(n){for(var r,t=0,i=n;t<i.length;t+=1)if(r=i[t],!uht(r.charCodeAt(0)))return!1;return!0}function uht(n){return r.Arabic(n)?!1:r["Arabic Supplement"](n)?!1:r["Arabic Extended-A"](n)?!1:r["Arabic Presentation Forms-A"](n)?!1:r["Arabic Presentation Forms-B"](n)?!1:!0}function fht(n){return n<11904?!1:r["Bopomofo Extended"](n)?!0:r.Bopomofo(n)?!0:r["CJK Compatibility Forms"](n)?!0:r["CJK Compatibility Ideographs"](n)?!0:r["CJK Compatibility"](n)?!0:r["CJK Radicals Supplement"](n)?!0:r["CJK Strokes"](n)?!0:r["CJK Symbols and Punctuation"](n)?!0:r["CJK Unified Ideographs Extension A"](n)?!0:r["CJK Unified Ideographs"](n)?!0:r["Enclosed CJK Letters and Months"](n)?!0:r["Halfwidth and Fullwidth Forms"](n)?!0:r.Hiragana(n)?!0:r["Ideographic Description Characters"](n)?!0:r["Kangxi Radicals"](n)?!0:r["Katakana Phonetic Extensions"](n)?!0:r.Katakana(n)?!0:r["Vertical Forms"](n)?!0:r["Yi Radicals"](n)?!0:r["Yi Syllables"](n)?!0:!1}function op(n){return n===746||n===747?!0:n<4352?!1:r["Bopomofo Extended"](n)?!0:r.Bopomofo(n)?!0:r["CJK Compatibility Forms"](n)&&!(n>=65097&&n<=65103)?!0:r["CJK Compatibility Ideographs"](n)?!0:r["CJK Compatibility"](n)?!0:r["CJK Radicals Supplement"](n)?!0:r["CJK Strokes"](n)?!0:r["CJK Symbols and Punctuation"](n)&&!(n>=12296&&n<=12305)&&!(n>=12308&&n<=12319)&&n!==12336?!0:r["CJK Unified Ideographs Extension A"](n)?!0:r["CJK Unified Ideographs"](n)?!0:r["Enclosed CJK Letters and Months"](n)?!0:r["Hangul Compatibility Jamo"](n)?!0:r["Hangul Jamo Extended-A"](n)?!0:r["Hangul Jamo Extended-B"](n)?!0:r["Hangul Jamo"](n)?!0:r["Hangul Syllables"](n)?!0:r.Hiragana(n)?!0:r["Ideographic Description Characters"](n)?!0:r.Kanbun(n)?!0:r["Kangxi Radicals"](n)?!0:r["Katakana Phonetic Extensions"](n)?!0:r.Katakana(n)&&n!==12540?!0:r["Halfwidth and Fullwidth Forms"](n)&&n!==65288&&n!==65289&&n!==65293&&!(n>=65306&&n<=65310)&&n!==65339&&n!==65341&&n!==65343&&!(n>=65371&&n<=65503)&&n!==65507&&!(n>=65512&&n<=65519)?!0:r["Small Form Variants"](n)&&!(n>=65112&&n<=65118)&&!(n>=65123&&n<=65126)?!0:r["Unified Canadian Aboriginal Syllabics"](n)?!0:r["Unified Canadian Aboriginal Syllabics Extended"](n)?!0:r["Vertical Forms"](n)?!0:r["Yijing Hexagram Symbols"](n)?!0:r["Yi Syllables"](n)?!0:r["Yi Radicals"](n)?!0:!1}function eht(n){return r["Latin-1 Supplement"](n)&&(n===167||n===169||n===174||n===177||n===188||n===189||n===190||n===215||n===247)?!0:r["General Punctuation"](n)&&(n===8214||n===8224||n===8225||n===8240||n===8241||n===8251||n===8252||n===8258||n===8263||n===8264||n===8265||n===8273)?!0:r["Letterlike Symbols"](n)?!0:r["Number Forms"](n)?!0:r["Miscellaneous Technical"](n)&&(n>=8960&&n<=8967||n>=8972&&n<=8991||n>=8996&&n<=9e3||n===9003||n>=9085&&n<=9114||n>=9150&&n<=9165||n===9167||n>=9169&&n<=9179||n>=9186&&n<=9215)?!0:r["Control Pictures"](n)&&n!==9251?!0:r["Optical Character Recognition"](n)?!0:r["Enclosed Alphanumerics"](n)?!0:r["Geometric Shapes"](n)?!0:r["Miscellaneous Symbols"](n)&&!(n>=9754&&n<=9759)?!0:r["Miscellaneous Symbols and Arrows"](n)&&(n>=11026&&n<=11055||n>=11088&&n<=11097||n>=11192&&n<=11243)?!0:r["CJK Symbols and Punctuation"](n)?!0:r.Katakana(n)?!0:r["Private Use Area"](n)?!0:r["CJK Compatibility Forms"](n)?!0:r["Small Form Variants"](n)?!0:r["Halfwidth and Fullwidth Forms"](n)?!0:n===8734||n===8756||n===8757||n>=9984&&n<=10087||n>=10102&&n<=10131||n===65532||n===65533?!0:!1}function un(n){return!(op(n)||eht(n))}function oht(n){return r.Arabic(n)||r["Arabic Supplement"](n)||r["Arabic Extended-A"](n)||r["Arabic Presentation Forms-A"](n)||r["Arabic Presentation Forms-B"](n)}function fn(n){return n>=1424&&n<=2303||r["Arabic Presentation Forms-A"](n)||r["Arabic Presentation Forms-B"](n)}function sht(n,t){return!t&&fn(n)?!1:n>=2304&&n<=3583||n>=3840&&n<=4255||r.Khmer(n)?!1:!0}function hht(n){for(var r,t=0,i=n;t<i.length;t+=1)if(r=i[t],fn(r.charCodeAt(0)))return!0;return!1}function cht(n,t){for(var u,i=0,r=n;i<r.length;i+=1)if(u=r[i],!sht(u.charCodeAt(0),t))return!1;return!0}function hp(){cp.fire(new ac("pluginStateChange",{pluginStatus:ci,pluginURL:uf}))}function vt(n,t){t===void 0&&(t=1);var i=0,r=0,u=n.map(function(n){var u=bht(n.type),e=i=sn(i,Math.max(t,u)),f=n.components||1;return r=Math.max(r,u),i+=u*f,{name:n.name,type:n.type,components:f,offset:e}}),f=sn(i,Math.max(r,t));return{members:u,size:f,alignment:t}}function bht(n){return yht[n].BYTES_PER_ELEMENT}function sn(n,t){return Math.ceil(n/t)*t}function hn(n,t){return n=af(Math.floor(n),0,255),t=af(Math.floor(t),0,255),256*n+t}function an(n){var t=+n;return!isNaN(t)&&t<=ln?t:hh(String(n))}function nw(n,t,i,r){while(i<r){for(var e=n[i+r>>1],f=i-1,u=r+1;;){do f++;while(n[f]<e);do u--;while(n[u]>e);if(f>=u)break;ca(n,f,u);ca(t,3*f,3*u);ca(t,3*f+1,3*u+1);ca(t,3*f+2,3*u+2)}u-i<r-u?(nw(n,t,i,u),i=u+1):(nw(n,t,u+1,r),r=u)}}function ca(n,t,i){var r=n[t];n[t]=n[i];n[i]=r}function tw(n){return[hn(255*n.r,255*n.g),hn(255*n.b,255*n.a)]}function oct(n,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"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"]}[n]||[n.replace(t+"-","").replace(/-/g,"_")]}function sct(n){var t={"line-pattern":{source:au,composite:au},"fill-pattern":{source:au,composite:au},"fill-extrusion-pattern":{source:au,composite:au}};return t[n]}function pn(n,t,i){var u={color:{source:vo,composite:oa},number:{source:sh,composite:vo}},r=sct(n);return r&&r[i]||u[t][i]}function ie(n){for(var f,i,s=rt/n.extent,r=n.loadGeometry(),u=0;u<r.length;u++)for(f=r[u],i=0;i<f.length;i++){var t=f[i],e=Math.round(t.x*s),o=Math.round(t.y*s);t.x=af(e,wn,iw);t.y=af(o,wn,iw);(e<t.x||e>t.x+1||o<t.y||o>t.y+1)&&gt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function re(n,t){return{type:n.type,id:n.id,properties:n.properties,geometry:t?ie(n):[]}}function aa(n,t,i,r,u){n.emplaceBack(t*2+(r+1)/2,i*2+(u+1)/2)}function bn(n,t){for(var r,i=0;i<n.length;i++)if(po(t,n[i]))return!0;for(r=0;r<t.length;r++)if(po(n,t[r]))return!0;return rw(n,t)?!0:!1}function hct(n,t,i){return po(n,t)?!0:uw(t,n,i)?!0:!1}function kn(n,t){var i,e,r,u,f;if(n.length===1)return gn(t,n[0]);for(i=0;i<t.length;i++)for(e=t[i],r=0;r<e.length;r++)if(po(n,e[r]))return!0;for(u=0;u<n.length;u++)if(gn(t,n[u]))return!0;for(f=0;f<t.length;f++)if(rw(n,t[f]))return!0;return!1}function cct(n,t,i){for(var u,f,r=0;r<t.length;r++){if(u=t[r],n.length>=3)for(f=0;f<u.length;f++)if(po(n,u[f]))return!0;if(lct(n,u,i))return!0}return!1}function lct(n,t,i){var r,u;if(n.length>1){if(rw(n,t))return!0;for(r=0;r<t.length;r++)if(uw(t[r],n,i))return!0}for(u=0;u<n.length;u++)if(uw(n[u],t,i))return!0;return!1}function rw(n,t){var i,u,f,r,e,o;if(n.length===0||t.length===0)return!1;for(i=0;i<n.length-1;i++)for(u=n[i],f=n[i+1],r=0;r<t.length-1;r++)if(e=t[r],o=t[r+1],act(u,f,e,o))return!0;return!1}function act(n,t,i,r){return wu(n,i,r)!==wu(t,i,r)&&wu(n,t,i)!==wu(n,t,r)}function uw(n,t,i){var u=i*i,r,f,e;if(t.length===1)return n.distSqr(t[0])<u;for(r=1;r<t.length;r++)if(f=t[r-1],e=t[r],dn(n,f,e)<u)return!0;return!1}function dn(n,t,i){var u=t.distSqr(i),r;return u===0?n.distSqr(t):(r=((n.x-t.x)*(i.x-t.x)+(n.y-t.y)*(i.y-t.y))/u,r<0)?n.distSqr(t):r>1?n.distSqr(i):n.distSqr(i.sub(t)._mult(r)._add(t))}function gn(n,t){for(var f,s,e=!1,r,i,u,o=0;o<n.length;o++)for(r=n[o],f=0,s=r.length-1;f<r.length;s=f++)i=r[f],u=r[s],i.y>t.y!=u.y>t.y&&t.x<(u.x-i.x)*(t.y-i.y)/(u.y-i.y)+i.x&&(e=!e);return e}function po(n,t){for(var i,r,u=!1,f=0,e=n.length-1;f<n.length;e=f++)i=n[f],r=n[e],i.y>t.y!=r.y>t.y&&t.x<(r.x-i.x)*(t.y-i.y)/(r.y-i.y)+i.x&&(u=!u);return u}function vct(n,t,i,r,u){for(var f,l,s,a,v,e,y,p,o=0,c=n;o<c.length;o+=1)if(f=c[o],t<=f.x&&i<=f.y&&r>=f.x&&u>=f.y)return!0;if(l=[new h(t,i),new h(t,u),new h(r,u),new h(r,i)],n.length>2)for(s=0,a=l;s<a.length;s+=1)if(v=a[s],po(n,v))return!0;for(e=0;e<n.length-1;e++)if(y=n[e],p=n[e+1],yct(y,p,l))return!0;return!1}function yct(n,t,i){var r=i[0],u=i[2],f;return n.x<r.x&&t.x<r.x||n.x>u.x&&t.x>u.x||n.y<r.y&&t.y<r.y||n.y>u.y&&t.y>u.y?!1:(f=wu(n,t,i[0]),f!==wu(n,t,i[1])||f!==wu(n,t,i[2])||f!==wu(n,t,i[3]))}function ch(n,t,i){var r=t.paint.get(n).value;return r.kind==="constant"?r.value:i.programConfigurations.get(t.id).getMaxValue(n)}function va(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function ya(n,t,i,r,u){var e,o,f,s;if(!t[0]&&!t[1])return n;for(e=h.convert(t)._mult(u),i==="viewport"&&e._rotate(-r),o=[],f=0;f<n.length;f++)s=n[f],o.push(s.sub(e));return o}function kct(){var n=new ai(4);return ai!=Float32Array&&(n[1]=0,n[2]=0),n[0]=1,n[3]=1,n}function dct(n,t,i){var f=t[0],e=t[1],o=t[2],s=t[3],r=Math.sin(i),u=Math.cos(i);return n[0]=f*u+o*r,n[1]=e*u+s*r,n[2]=f*-r+o*u,n[3]=e*-r+s*u,n}function gct(){var n=new ai(9);return ai!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function nlt(n,t){var i=Math.sin(t),r=Math.cos(t);return n[0]=r,n[1]=i,n[2]=0,n[3]=-i,n[4]=r,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function tlt(){var n=new ai(16);return ai!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n}function ilt(n){var t=new ai(16);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function fw(n){return n[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]=0,n[13]=0,n[14]=0,n[15]=1,n}function rlt(n,t){var r=t[0],u=t[1],f=t[2],e=t[3],o=t[4],s=t[5],h=t[6],c=t[7],l=t[8],a=t[9],v=t[10],y=t[11],p=t[12],w=t[13],b=t[14],k=t[15],d=r*s-u*o,g=r*h-f*o,nt=r*c-e*o,tt=u*h-f*s,it=u*c-e*s,rt=f*c-e*h,ut=l*w-a*p,ft=l*b-v*p,et=l*k-y*p,ot=a*b-v*w,st=a*k-y*w,ht=v*k-y*b,i=d*ht-g*st+nt*ot+tt*et-it*ft+rt*ut;return i?(i=1/i,n[0]=(s*ht-h*st+c*ot)*i,n[1]=(f*st-u*ht-e*ot)*i,n[2]=(w*rt-b*it+k*tt)*i,n[3]=(v*it-a*rt-y*tt)*i,n[4]=(h*et-o*ht-c*ft)*i,n[5]=(r*ht-f*et+e*ft)*i,n[6]=(b*nt-p*rt-k*g)*i,n[7]=(l*rt-v*nt+y*g)*i,n[8]=(o*st-s*et+c*ut)*i,n[9]=(u*et-r*st-e*ut)*i,n[10]=(p*it-w*nt+k*d)*i,n[11]=(a*nt-l*it-y*d)*i,n[12]=(s*ft-o*ot-h*ut)*i,n[13]=(r*ot-u*ft+f*ut)*i,n[14]=(w*g-p*tt-b*d)*i,n[15]=(l*tt-a*g+v*d)*i,n):null}function ntt(n,t,i){var o=t[0],s=t[1],h=t[2],c=t[3],l=t[4],a=t[5],v=t[6],y=t[7],p=t[8],w=t[9],b=t[10],k=t[11],d=t[12],g=t[13],nt=t[14],tt=t[15],r=i[0],u=i[1],f=i[2],e=i[3];return n[0]=r*o+u*l+f*p+e*d,n[1]=r*s+u*a+f*w+e*g,n[2]=r*h+u*v+f*b+e*nt,n[3]=r*c+u*y+f*k+e*tt,r=i[4],u=i[5],f=i[6],e=i[7],n[4]=r*o+u*l+f*p+e*d,n[5]=r*s+u*a+f*w+e*g,n[6]=r*h+u*v+f*b+e*nt,n[7]=r*c+u*y+f*k+e*tt,r=i[8],u=i[9],f=i[10],e=i[11],n[8]=r*o+u*l+f*p+e*d,n[9]=r*s+u*a+f*w+e*g,n[10]=r*h+u*v+f*b+e*nt,n[11]=r*c+u*y+f*k+e*tt,r=i[12],u=i[13],f=i[14],e=i[15],n[12]=r*o+u*l+f*p+e*d,n[13]=r*s+u*a+f*w+e*g,n[14]=r*h+u*v+f*b+e*nt,n[15]=r*c+u*y+f*k+e*tt,n}function ult(n,t,i){var r=i[0],u=i[1],f=i[2],e,o,s,h,c,l,a,v,y,p,w,b;return t===n?(n[12]=t[0]*r+t[4]*u+t[8]*f+t[12],n[13]=t[1]*r+t[5]*u+t[9]*f+t[13],n[14]=t[2]*r+t[6]*u+t[10]*f+t[14],n[15]=t[3]*r+t[7]*u+t[11]*f+t[15]):(e=t[0],o=t[1],s=t[2],h=t[3],c=t[4],l=t[5],a=t[6],v=t[7],y=t[8],p=t[9],w=t[10],b=t[11],n[0]=e,n[1]=o,n[2]=s,n[3]=h,n[4]=c,n[5]=l,n[6]=a,n[7]=v,n[8]=y,n[9]=p,n[10]=w,n[11]=b,n[12]=e*r+c*u+y*f+t[12],n[13]=o*r+l*u+p*f+t[13],n[14]=s*r+a*u+w*f+t[14],n[15]=h*r+v*u+b*f+t[15]),n}function flt(n,t,i){var r=i[0],u=i[1],f=i[2];return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3]*r,n[4]=t[4]*u,n[5]=t[5]*u,n[6]=t[6]*u,n[7]=t[7]*u,n[8]=t[8]*f,n[9]=t[9]*f,n[10]=t[10]*f,n[11]=t[11]*f,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function elt(n,t,i){var r=Math.sin(i),u=Math.cos(i),f=t[4],e=t[5],o=t[6],s=t[7],h=t[8],c=t[9],l=t[10],a=t[11];return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[4]=f*u+h*r,n[5]=e*u+c*r,n[6]=o*u+l*r,n[7]=s*u+a*r,n[8]=h*u-f*r,n[9]=c*u-e*r,n[10]=l*u-o*r,n[11]=a*u-s*r,n}function olt(n,t,i){var r=Math.sin(i),u=Math.cos(i),f=t[0],e=t[1],o=t[2],s=t[3],h=t[4],c=t[5],l=t[6],a=t[7];return t!==n&&(n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=f*u+h*r,n[1]=e*u+c*r,n[2]=o*u+l*r,n[3]=s*u+a*r,n[4]=h*u-f*r,n[5]=c*u-e*r,n[6]=l*u-o*r,n[7]=a*u-s*r,n}function slt(n,t,i,r,u){var e=1/Math.tan(t/2),f;return n[0]=e/i,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,u!=null&&u!==Infinity?(f=1/(r-u),n[10]=(u+r)*f,n[14]=2*u*r*f):(n[10]=-1,n[14]=-2*r),n}function hlt(n,t,i,r,u,f,e){var o=1/(t-i),s=1/(r-u),h=1/(f-e);return n[0]=-2*o,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*s,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=2*h,n[11]=0,n[12]=(t+i)*o,n[13]=(u+r)*s,n[14]=(e+f)*h,n[15]=1,n}function clt(){var n=new ai(3);return ai!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function llt(n){var t=new ai(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function alt(n,t,i){return n[0]=t[0]+i[0],n[1]=t[1]+i[1],n[2]=t[2]+i[2],n}function vlt(n,t,i){return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],n}function ylt(n,t,i){return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n}function plt(n,t){var r=t[0],u=t[1],f=t[2],i=r*r+u*u+f*f;return i>0&&(i=1/Math.sqrt(i)),n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n}function wlt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function blt(n,t,i){var r=t[0],u=t[1],f=t[2],e=i[0],o=i[1],s=i[2];return n[0]=u*s-f*o,n[1]=f*e-r*s,n[2]=r*o-u*e,n}function klt(n,t,i){var r=t[0],u=t[1],f=t[2];return n[0]=r*i[0]+u*i[3]+f*i[6],n[1]=r*i[1]+u*i[4]+f*i[7],n[2]=r*i[2]+u*i[5]+f*i[8],n}function glt(){var n=new ai(4);return ai!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0,n[3]=0),n}function nat(n,t,i){return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=t[3]*i,n}function tat(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function pa(n,t,i){var r=t[0],u=t[1],f=t[2],e=t[3];return n[0]=i[0]*r+i[4]*u+i[8]*f+i[12]*e,n[1]=i[1]*r+i[5]*u+i[9]*f+i[13]*e,n[2]=i[2]*r+i[6]*u+i[10]*f+i[14]*e,n[3]=i[3]*r+i[7]*u+i[11]*f+i[15]*e,n}function rat(){var n=new ai(2);return ai!=Float32Array&&(n[0]=0,n[1]=0),n}function uat(n){var t=n[0],i=n[1];return t*t+i*i}function rtt(n,t){var i=pa([],[n.x,n.y,0,1],t);return new h(i[0]/i[3],i[1]/i[3])}function oat(n,t){return n.map(function(n){return rtt(n,t)})}function ow(n,t,i,r){var u=t.width,f=t.height;if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==u*f*i)throw new RangeError("mismatched image size");}else r=new Uint8Array(u*f*i);return n.width=u,n.height=f,n.data=r,n}function utt(n,t,i){var r=t.width,u=t.height,f;(r!==n.width||u!==n.height)&&(f=ow({},{width:r,height:u},i),sw(n,f,{x:0,y:0},{x:0,y:0},{width:Math.min(n.width,r),height:Math.min(n.height,u)},i),n.width=r,n.height=u,n.data=f.data)}function sw(n,t,i,r,u,f){var s,h,e,c,l,o;if(u.width===0||u.height===0)return t;if(u.width>n.width||u.height>n.height||i.x>n.width-u.width||i.y>n.height-u.height)throw new RangeError("out of range source coordinates for image copy");if(u.width>t.width||u.height>t.height||r.x>t.width-u.width||r.y>t.height-u.height)throw new RangeError("out of range destination coordinates for image copy");for(s=n.data,h=t.data,e=0;e<u.height;e++)for(c=((i.y+e)*n.width+i.x)*f,l=((r.y+e)*t.width+r.x)*f,o=0;o<u.width*f;o++)h[l+o]=s[c+o];return t}function ott(n){var h={},t=n.resolution||256,c=n.clips?n.clips.length:1,i=n.image||new kt({width:t,height:c}),l=function(t,r,u){h[n.evaluationKey]=u;var f=n.expression.evaluate(h);i.data[t+r+0]=Math.floor(f.r*255/f.a);i.data[t+r+1]=Math.floor(f.g*255/f.a);i.data[t+r+2]=Math.floor(f.b*255/f.a);i.data[t+r+3]=Math.floor(f.a*255)},r,e,a,u,o,f,s;if(n.clips)for(u=0,o=0;u<c;++u,o+=t*4)for(f=0,s=0;f<t;f++,s+=4){var v=f/(t-1),y=n.clips[u],p=y.start,w=y.end,b=p*(1-v)+w*v;l(o,s,b)}else for(r=0,e=0;r<t;r++,e+=4)a=r/(t-1),l(0,e,a);return i}function wa(n,t,i){var u,f,c,l,e,o,s,h;i=i||2;var v=t&&t.length,y=v?t[0]*i:n.length,r=stt(n,0,y,i,!0),a=[];if(!r||r.next===r.prev)return a;if(v&&(r=dat(n,t,r,i)),n.length>80*i){for(u=c=n[0],f=l=n[1],h=i;h<y;h+=i)e=n[h],o=n[h+1],e<u&&(u=e),o<f&&(f=o),e>c&&(c=e),o>l&&(l=o);s=Math.max(c-u,l-f);s=s!==0?1/s:0}return lh(r,a,i,u,f,s),a}function stt(n,t,i,r,u){var f,e;if(u===aw(n,t,i,r)>0)for(f=t;f<i;f+=r)e=ltt(f,n[f],n[f+1],e);else for(f=i-r;f>=t;f-=r)e=ltt(f,n[f],n[f+1],e);return e&&ba(e,e.next)&&(vh(e),e=e.next),e}function sf(n,t){if(!n)return n;t||(t=n);var i=n,r;do if(r=!1,!i.steiner&&(ba(i,i.next)||it(i.prev,i,i.next)===0)){if(vh(i),i=t=i.prev,i===i.next)break;r=!0}else i=i.next;while(r||i!==t);return t}function lh(n,t,i,r,u,f,e){if(n){!e&&f&&rvt(n,r,u,f);for(var s=n,h,o;n.prev!==n.next;){if(h=n.prev,o=n.next,f?wat(n,r,u,f):pat(n)){t.push(h.i/i);t.push(n.i/i);t.push(o.i/i);vh(n);n=o.next;s=o.next;continue}if(n=o,n===s){e?e===1?(n=bat(sf(n),t,i),lh(n,t,i,r,u,f,2)):e===2&&kat(n,t,i,r,u,f):lh(sf(n),t,i,r,u,f,1);break}}}}function pat(n){var i=n.prev,r=n,u=n.next,t;if(it(i,r,u)>=0)return!1;for(t=n.next.next;t!==n.prev;){if(wo(i.x,i.y,r.x,r.y,u.x,u.y,t.x,t.y)&&it(t.prev,t,t.next)>=0)return!1;t=t.next}return!0}function wat(n,t,i,r){var o=n.prev,s=n,u=n.next;if(it(o,s,u)>=0)return!1;for(var l=o.x<s.x?o.x<u.x?o.x:u.x:s.x<u.x?s.x:u.x,a=o.y<s.y?o.y<u.y?o.y:u.y:s.y<u.y?s.y:u.y,v=o.x>s.x?o.x>u.x?o.x:u.x:s.x>u.x?s.x:u.x,y=o.y>s.y?o.y>u.y?o.y:u.y:s.y>u.y?s.y:u.y,h=cw(l,a,t,i,r),c=cw(v,y,t,i,r),f=n.prevZ,e=n.nextZ;f&&f.z>=h&&e&&e.z<=c;){if(f!==n.prev&&f!==n.next&&wo(o.x,o.y,s.x,s.y,u.x,u.y,f.x,f.y)&&it(f.prev,f,f.next)>=0||(f=f.prevZ,e!==n.prev&&e!==n.next&&wo(o.x,o.y,s.x,s.y,u.x,u.y,e.x,e.y)&&it(e.prev,e,e.next)>=0))return!1;e=e.nextZ}while(f&&f.z>=h){if(f!==n.prev&&f!==n.next&&wo(o.x,o.y,s.x,s.y,u.x,u.y,f.x,f.y)&&it(f.prev,f,f.next)>=0)return!1;f=f.prevZ}while(e&&e.z<=c){if(e!==n.prev&&e!==n.next&&wo(o.x,o.y,s.x,s.y,u.x,u.y,e.x,e.y)&&it(e.prev,e,e.next)>=0)return!1;e=e.nextZ}return!0}function bat(n,t,i){var r=n,f,u;do f=r.prev,u=r.next.next,!ba(f,u)&&htt(f,r,r.next,u)&&ah(f,u)&&ah(u,f)&&(t.push(f.i/i),t.push(r.i/i),t.push(u.i/i),vh(r),vh(r.next),r=n=u),r=r.next;while(r!==n);return sf(r)}function kat(n,t,i,r,u,f){var e=n,o,s;do{for(o=e.next.next;o!==e.prev;){if(e.i!==o.i&&evt(e,o)){s=ctt(e,o);e=sf(e,e.next);s=sf(s,s.next);lh(e,t,i,r,u,f);lh(s,t,i,r,u,f);return}o=o.next}e=e.next}while(e!==n)}function dat(n,t,i,r){for(var e=[],s,h,f,u=0,o=t.length;u<o;u++)s=t[u]*r,h=u<o-1?t[u+1]*r:n.length,f=stt(n,s,h,r,!1),f===f.next&&(f.steiner=!0),e.push(fvt(f));for(e.sort(gat),u=0;u<e.length;u++)i=nvt(e[u],i),i=sf(i,i.next);return i}function gat(n,t){return n.x-t.x}function nvt(n,t){var i=tvt(n,t),r,u;return i?(r=ctt(i,n),u=sf(i,i.next),sf(r,r.next),t===i?u:t):t}function tvt(n,t){var i=t,f=n.x,u=n.y,e=-Infinity,r,o;do{if(u<=i.y&&u>=i.next.y&&i.next.y!==i.y&&(o=i.x+(u-i.y)*(i.next.x-i.x)/(i.next.y-i.y),o<=f&&o>e)){if(e=o,o===f){if(u===i.y)return i;if(u===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}i=i.next}while(i!==t);if(!r)return null;if(f===e)return r;var a=r,l=r.x,h=r.y,c=Infinity,s;i=r;do f>=i.x&&i.x>=l&&f!==i.x&&wo(u<h?f:e,u,l,h,u<h?e:f,u,i.x,i.y)&&(s=Math.abs(u-i.y)/(f-i.x),ah(i,n)&&(s<c||s===c&&(i.x>r.x||i.x===r.x&&ivt(r,i)))&&(r=i,c=s)),i=i.next;while(i!==a);return r}function ivt(n,t){return it(n.prev,n,t.prev)<0&&it(t.next,n,n.next)<0}function rvt(n,t,i,r){var u=n;do u.z===null&&(u.z=cw(u.x,u.y,t,i,r)),u.prevZ=u.prev,u.nextZ=u.next,u=u.next;while(u!==n);u.prevZ.nextZ=null;u.prevZ=null;uvt(u)}function uvt(n){var o,i,t,r,u,s,f,e,h=1;do{for(i=n,n=null,u=null,s=0;i;){for(s++,t=i,f=0,o=0;o<h;o++)if(f++,t=t.nextZ,!t)break;for(e=h;f>0||e>0&&t;)f!==0&&(e===0||!t||i.z<=t.z)?(r=i,i=i.nextZ,f--):(r=t,t=t.nextZ,e--),u?u.nextZ=r:n=r,r.prevZ=u,u=r;i=t}u.nextZ=null;h*=2}while(s>1);return n}function cw(n,t,i,r,u){return n=32767*(n-i)*u,t=32767*(t-r)*u,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n|t<<1}function fvt(n){var t=n,i=n;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==n);return i}function wo(n,t,i,r,u,f,e,o){return(u-e)*(t-o)-(n-e)*(f-o)>=0&&(n-e)*(r-o)-(i-e)*(t-o)>=0&&(i-e)*(f-o)-(u-e)*(r-o)>=0}function evt(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!ovt(n,t)&&(ah(n,t)&&ah(t,n)&&svt(n,t)&&(it(n.prev,n,t.prev)||it(n,t.prev,t))||ba(n,t)&&it(n.prev,n,n.next)>0&&it(t.prev,t,t.next)>0)}function it(n,t,i){return(t.y-n.y)*(i.x-t.x)-(t.x-n.x)*(i.y-t.y)}function ba(n,t){return n.x===t.x&&n.y===t.y}function htt(n,t,i,r){var u=da(it(n,t,i)),f=da(it(n,t,r)),e=da(it(i,r,n)),o=da(it(i,r,t));return u!==f&&e!==o?!0:u===0&&ka(n,i,t)?!0:f===0&&ka(n,r,t)?!0:e===0&&ka(i,n,r)?!0:o===0&&ka(i,t,r)?!0:!1}function ka(n,t,i){return t.x<=Math.max(n.x,i.x)&&t.x>=Math.min(n.x,i.x)&&t.y<=Math.max(n.y,i.y)&&t.y>=Math.min(n.y,i.y)}function da(n){return n>0?1:n<0?-1:0}function ovt(n,t){var i=n;do{if(i.i!==n.i&&i.next.i!==n.i&&i.i!==t.i&&i.next.i!==t.i&&htt(i,i.next,n,t))return!0;i=i.next}while(i!==n);return!1}function ah(n,t){return it(n.prev,n,n.next)<0?it(n,t,n.next)>=0&&it(n,n.prev,t)>=0:it(n,t,n.prev)<0||it(n,n.next,t)<0}function svt(n,t){var i=n,r=!1,f=(n.x+t.x)/2,u=(n.y+t.y)/2;do i.y>u!=i.next.y>u&&i.next.y!==i.y&&f<(i.next.x-i.x)*(u-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next;while(i!==n);return r}function ctt(n,t){var r=new lw(n.i,n.x,n.y),i=new lw(t.i,t.x,t.y),u=n.next,f=t.prev;return n.next=t,t.prev=n,r.next=u,u.prev=r,i.next=r,r.prev=i,f.next=i,i.prev=f,i}function ltt(n,t,i,r){var u=new lw(n,t,i);return r?(u.next=r.next,u.prev=r,r.next.prev=u,r.next=u):(u.prev=u,u.next=u),u}function vh(n){n.next.prev=n.prev;n.prev.next=n.next;n.prevZ&&(n.prevZ.nextZ=n.nextZ);n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function lw(n,t,i){this.i=n;this.x=t;this.y=i;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=!1}function aw(n,t,i,r){for(var e=0,u=t,f=i-r;u<i;u+=r)e+=(n[f]-n[u])*(n[u+1]+n[f+1]),f=u;return e}function hvt(n,t,i,r,u){att(n,t,i||0,r||n.length-1,u||cvt)}function att(n,t,i,r,u){while(r>i){if(r-i>600){var e=r-i+1,c=t-i+1,l=Math.log(e),s=.5*Math.exp(2*l/3),a=.5*Math.sqrt(l*s*(e-s)/e)*(c-e/2<0?-1:1),v=Math.max(i,Math.floor(t-c*s/e+a)),y=Math.min(r,Math.floor(t+(e-c)*s/e+a));att(n,t,v,y,u)}var h=n[t],o=i,f=r;for(yh(n,i,t),u(n[r],h)>0&&yh(n,i,r);o<f;){for(yh(n,o,f),o++,f--;u(n[o],h)<0;)o++;while(u(n[f],h)>0)f--}u(n[i],h)===0?yh(n,i,f):(f++,yh(n,f,r));f<=t&&(i=f+1);t<=f&&(r=f-1)}}function yh(n,t,i){var r=n[t];n[t]=n[i];n[i]=r}function cvt(n,t){return n<t?-1:n>t?1:0}function vw(n,t){var s=n.length,i,f,o,u,e,r;if(s<=1)return[n];for(i=[],u=0;u<s;u++)(e=vut(n[u]),e!==0)&&(n[u].area=Math.abs(e),o===undefined&&(o=e<0),o===e<0?(f&&i.push(f),f=[n[u]]):f.push(n[u]));if(f&&i.push(f),t>1)for(r=0;r<i.length;r++)i[r].length<=t||(hvt(i[r],t,1,i[r].length-1,lvt),i[r]=i[r].slice(0,t));return i}function lvt(n,t){return t.area-n.area}function yw(n,t,i){for(var h,e,r,o=i.patternDependencies,u=!1,f=0,s=t;f<s.length;f+=1)h=s[f],e=h.paint.get(n+"-pattern"),e.isConstant()||(u=!0),r=e.constantOr(null),r&&(u=!0,o[r.to]=!0,o[r.from]=!0);return u}function pw(n,t,i,r,u){for(var h=u.patternDependencies,c=0,l=t;c<l.length;c+=1){var a=l[c],v=a.paint.get(n+"-pattern"),s=v.value;if(s.kind!=="constant"){var f=s.evaluate({zoom:r-1},i,{},u.availableImages),e=s.evaluate({zoom:r},i,{},u.availableImages),o=s.evaluate({zoom:r+1},i,{},u.availableImages);f=f&&f.name?f.name:f;e=e&&e.name?e.name:e;o=o&&o.name?o.name:o;h[f]=!0;h[e]=!0;h[o]=!0;i.patterns[a.id]={min:f,mid:e,max:o}}}return i}function bo(n,t,i,r,u){this.properties={};this.extent=i;this.type=0;this._pbf=n;this._geometry=-1;this._keys=r;this._values=u;n.readFields(kvt,this,t)}function kvt(n,t,i){n==1?t.id=i.readVarint():n==2?dvt(i,t):n==3?t.type=i.readVarint():n==4&&(t._geometry=i.pos)}function dvt(n,t){for(var u=n.readVarint()+n.pos,i,r;n.pos<u;)i=t._keys[n.readVarint()],r=t._values[n.readVarint()],t.properties[i]=r}function gvt(n){var e=n.length,r,t,f,i,u;if(e<=1)return[n];for(r=[],i=0;i<e;i++)(u=nyt(n[i]),u!==0)&&(f===undefined&&(f=u<0),f===u<0?(t&&r.push(t),t=[n[i]]):t.push(n[i]));return t&&r.push(t),r}function nyt(n){for(var u=0,t=0,f=n.length,e=f-1,i,r;t<f;e=t++)i=n[t],r=n[e],u+=(r.x-i.x)*(i.y+r.y);return u}function ptt(n,t){this.version=1;this.name=null;this.extent=4096;this.length=0;this._pbf=n;this._keys=[];this._values=[];this._features=[];n.readFields(tyt,this,t);this.length=this._features.length}function tyt(n,t,i){n===15?t.version=i.readVarint():n===1?t.name=i.readString():n===5?t.extent=i.readVarint():n===2?t._features.push(i.pos):n===3?t._keys.push(i.readString()):n===4&&t._values.push(iyt(i))}function iyt(n){for(var i=null,r=n.readVarint()+n.pos,t;n.pos<r;)t=n.readVarint()>>3,i=t===1?n.readString():t===2?n.readFloat():t===3?n.readDouble():t===4?n.readVarint64():t===5?n.readVarint():t===6?n.readSVarint():t===7?n.readBoolean():null;return i}function ryt(n,t){this.layers=n.readFields(uyt,{},t)}function uyt(n,t,i){if(n===3){var r=new ww(i,i.readVarint()+i.pos);r.length&&(t[r.name]=r)}}function ph(n,t,i,r,u,f,e,o){n.emplaceBack(t,i,Math.floor(r*bw)*2+e,u*bw*2,f*bw*2,Math.round(o))}function cyt(n,t){return n.x===t.x&&(n.x<0||n.x>rt)||n.y===t.y&&(n.y<0||n.y>rt)}function lyt(n){return n.every(function(n){return n.x<0})||n.every(function(n){return n.x>rt})||n.every(function(n){return n.y<0})||n.every(function(n){return n.y>rt})}function wh(n,t){return n.x*t.x+n.y*t.y}function btt(n,t){var i,r,u,s,h,c,nt;if(n.length===1){for(i=0,r=t[i++];!u||r.equals(u);)if(u=t[i++],!u)return Infinity;for(;i<t.length;i++){var l=t[i],tt=n[0],f=u.sub(r),e=l.sub(r),a=tt.sub(r),v=wh(f,f),o=wh(f,e),y=wh(e,e),p=wh(a,f),w=wh(a,e),b=v*y-o*o,k=(y*p-o*w)/b,d=(v*w-o*p)/b,it=1-k-d,g=r.z*it+u.z*k+l.z*d;if(isFinite(g))return g}return Infinity}for(s=Infinity,h=0,c=t;h<c.length;h+=1)nt=c[h],s=Math.min(s,nt.z);return s}function pyt(n,t,i){var u=Infinity,f,e,o,r;for(kn(i,t)&&(u=btt(i,t[0])),f=0;f<t.length;f++)for(e=t[f],o=n[f],r=0;r<e.length-1;r++){var s=e[r],c=e[r+1],l=o[r],a=o[r+1],h=[s,c,a,l,s];bn(i,h)&&(u=Math.min(u,btt(i,h)))}return u===Infinity?!1:u}function wyt(n,t,i,r){for(var u,s,a,v=[],y=[],rt=r[8]*t,ut=r[9]*t,ft=r[10]*t,et=r[11]*t,ot=r[8]*i,st=r[9]*i,ht=r[10]*i,ct=r[11]*i,o=0,p=n;o<p.length;o+=1){var lt=p[o],w=[],b=[];for(u=0,s=lt;u<s.length;u+=1){var k=s[u],f=k.x,e=k.y,d=r[0]*f+r[4]*e+r[12],g=r[1]*f+r[5]*e+r[13],nt=r[2]*f+r[6]*e+r[14],tt=r[3]*f+r[7]*e+r[15],at=d+rt,vt=g+ut,yt=nt+ft,c=tt+et,pt=d+ot,wt=g+st,bt=nt+ht,l=tt+ct,it=new h(at/c,vt/c);it.z=yt/c;w.push(it);a=new h(pt/l,wt/l);a.z=bt/l;b.push(a)}v.push(w);y.push(b)}return[v,y]}function byt(n,t,i,r){for(var e,u,o=[],f=0,s=n;f<s.length;f+=1)e=s[f],u=[e.x,e.y,r,1],pa(u,u,t),o.push(new h(u[0]/u[3],u[1]/u[3]));return o}function rit(n,t){return t>0?t+2*n:n}function spt(n,t){for(var r,e,i,c=[],l=new h(0,0),f=0;f<n.length;f++){for(r=n[f],e=[],i=0;i<r.length;i++){var a=r[i-1],o=r[i],v=r[i+1],y=i===0?l:o.sub(a)._unit()._perp(),s=i===r.length-1?l:v.sub(o)._unit()._perp(),u=y._add(s)._unit(),p=u.x*s.x+u.y*s.y;u._mult(1/p);e.push(u._mult(t)._add(o))}c.push(e)}return c}function vpt(n,t,i){var r=t.layout.get("text-transform").evaluate(i,{});return r==="uppercase"?n=n.toLocaleUpperCase():r==="lowercase"&&(n=n.toLocaleLowerCase()),pi.applyArabicShaping&&(n=pi.applyArabicShaping(n)),n}function ypt(n,t,i){return n.sections.forEach(function(n){n.text=vpt(n.text,t,i)}),n}function ppt(n){function y(i){t.push(n[i]);h++}function p(n,i,r){var f=u[n];return delete u[n],u[i]=f,t[f].geometry[0].pop(),t[f].geometry[0]=t[f].geometry[0].concat(r[0]),f}function w(n,i,r){var u=f[i];return delete f[i],f[n]=u,t[u].geometry[0].shift(),t[u].geometry[0]=r[0].concat(t[u].geometry[0]),u}function c(n,t,i){var r=i?t[0][t[0].length-1]:t[0][0];return n+":"+r.x+":"+r.y}for(var i,r,a,v,f={},u={},t=[],h=0,e=0;e<n.length;e++){var l=n[e],o=l.geometry,s=l.text?l.text.toString():null;if(!s){y(e);continue}i=c(s,o);r=c(s,o,!0);i in u&&r in f&&u[i]!==f[r]?(a=w(i,r,o),v=p(i,r,t[a].geometry),delete f[i],delete u[r],u[c(s,t[v].geometry,!0)]=v,t[a].geometry=null):i in u?p(i,r,o):r in f?w(i,r,o):(y(e),f[i]=h-1,u[r]=h-1)}return t.filter(function(n){return n.geometry})}function wpt(n){for(var i="",t=0;t<n.length;t++){var r=n.charCodeAt(t+1)||null,u=n.charCodeAt(t-1)||null,f=(!r||!un(r)||go[n[t+1]])&&(!u||!un(u)||go[n[t-1]]);i+=f&&go[n[t]]?go[n[t]]:n[t]}return i}function p(n){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(n)?n:new Uint8Array(n||0);this.pos=0;this.type=0;this.length=this.buf.length}function gpt(n,t,i){var f=i.buf,u,r;if((r=f[i.pos++],u=(r&112)>>4,r<128)||(r=f[i.pos++],u|=(r&127)<<3,r<128)||(r=f[i.pos++],u|=(r&127)<<10,r<128)||(r=f[i.pos++],u|=(r&127)<<17,r<128)||(r=f[i.pos++],u|=(r&127)<<24,r<128)||(r=f[i.pos++],u|=(r&1)<<31,r<128))return ns(n,u,t);throw new Error("Expected varint not more than 10 bytes");}function yu(n){return n.type===p.Bytes?n.readVarint()+n.pos:n.pos+1}function ns(n,t,i){return i?t*4294967296+(n>>>0):(t>>>0)*4294967296+(n>>>0)}function nwt(n,t){var i,r;if(n>=0?(i=n%4294967296|0,r=n/4294967296|0):(i=~(-n%4294967296),r=~(-n/4294967296),i^4294967295?i=i+1|0:(i=0,r=r+1|0)),n>=18446744073709552000||n<-18446744073709552000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10);twt(i,r,t);iwt(r,t)}function twt(n,t,i){i.buf[i.pos++]=n&127|128;n>>>=7;i.buf[i.pos++]=n&127|128;n>>>=7;i.buf[i.pos++]=n&127|128;n>>>=7;i.buf[i.pos++]=n&127|128;n>>>=7;i.buf[i.pos]=n&127}function iwt(n,t){var i=(n&7)<<4;(t.buf[t.pos++]|=i|((n>>>=3)?128:0),n)&&(t.buf[t.pos++]=n&127|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=n&127|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=n&127|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=n&127|((n>>>=7)?128:0),n)&&(t.buf[t.pos++]=n&127)}function oit(n,t,i){var u=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7)),r;for(i.realloc(u),r=i.pos-1;r>=n;r--)i.buf[r+u]=i.buf[r]}function rwt(n,t){for(var i=0;i<n.length;i++)t.writeVarint(n[i])}function uwt(n,t){for(var i=0;i<n.length;i++)t.writeSVarint(n[i])}function fwt(n,t){for(var i=0;i<n.length;i++)t.writeFloat(n[i])}function ewt(n,t){for(var i=0;i<n.length;i++)t.writeDouble(n[i])}function owt(n,t){for(var i=0;i<n.length;i++)t.writeBoolean(n[i])}function swt(n,t){for(var i=0;i<n.length;i++)t.writeFixed32(n[i])}function hwt(n,t){for(var i=0;i<n.length;i++)t.writeSFixed32(n[i])}function cwt(n,t){for(var i=0;i<n.length;i++)t.writeFixed64(n[i])}function lwt(n,t){for(var i=0;i<n.length;i++)t.writeSFixed64(n[i])}function tv(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16)+n[t+3]*16777216}function ts(n,t,i){n[i]=t;n[i+1]=t>>>8;n[i+2]=t>>>16;n[i+3]=t>>>24}function sit(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16)+(n[t+3]<<24)}function awt(n,t,i){for(var h="",u=t,f,s,c;u<i;){var e=n[u],r=null,o=e>239?4:e>223?3:e>191?2:1;if(u+o>i)break;o===1?e<128&&(r=e):o===2?(f=n[u+1],(f&192)==128&&(r=(e&31)<<6|f&63,r<=127&&(r=null))):o===3?(f=n[u+1],s=n[u+2],(f&192)==128&&(s&192)==128&&(r=(e&15)<<12|(f&63)<<6|s&63,(r<=2047||r>=55296&&r<=57343)&&(r=null))):o===4&&(f=n[u+1],s=n[u+2],c=n[u+3],(f&192)==128&&(s&192)==128&&(c&192)==128&&(r=(e&15)<<18|(f&63)<<12|(s&63)<<6|c&63,(r<=65535||r>=1114112)&&(r=null)));r===null?(r=65533,o=1):r>65535&&(r-=65536,h+=String.fromCharCode(r>>>10&1023|55296),r=56320|r&1023);h+=String.fromCharCode(r);u+=o}return h}function vwt(n,t,i){return eit.decode(n.subarray(t,i))}function ywt(n,t,i){for(var f=0,r,u;f<t.length;f++){if(r=t.charCodeAt(f),r>55295&&r<57344)if(u)if(r<56320){n[i++]=239;n[i++]=191;n[i++]=189;u=r;continue}else r=u-55296<<10|r-56320|65536,u=null;else{r>56319||f+1===t.length?(n[i++]=239,n[i++]=191,n[i++]=189):u=r;continue}else u&&(n[i++]=239,n[i++]=191,n[i++]=189,u=null);r<128?n[i++]=r:(r<2048?n[i++]=r>>6|192:(r<65536?n[i++]=r>>12|224:(n[i++]=r>>18|240,n[i++]=r>>12&63|128),n[i++]=r>>6&63|128),n[i++]=r&63|128)}return i}function pwt(n,t,i){n===1&&i.readMessage(wwt,t)}function wwt(n,t,i){if(n===3){var r=i.readMessage(bwt,{}),e=r.id,o=r.bitmap,u=r.width,f=r.height,s=r.left,h=r.top,c=r.advance;t.push({id:e,bitmap:new of({width:u+2*iv,height:f+2*iv},o),metrics:{width:u,height:f,left:s,top:h,advance:c}})}}function bwt(n,t,i){n===1?t.id=i.readVarint():n===2?t.bitmap=i.readBytes():n===3?t.width=i.readVarint():n===4?t.height=i.readVarint():n===5?t.left=i.readSVarint():n===6?t.top=i.readSVarint():n===7&&(t.advance=i.readVarint())}function kwt(n){return new nv(n).readFields(pwt,[])}function hit(n){for(var f,s,a,t,u,i,y,h=0,c=0,l=0,v=n;l<v.length;l+=1)f=v[l],h+=f.w*f.h,c=Math.max(c,f.w);n.sort(function(n,t){return t.h-n.h});var p=Math.max(Math.ceil(Math.sqrt(h/.95)),c),r=[{x:0,y:0,w:p,h:Infinity}],e=0,o=0;for(s=0,a=n;s<a.length;s+=1)for(t=a[s],u=r.length-1;u>=0;u--)if(i=r[u],!(t.w>i.w)&&!(t.h>i.h)){t.x=i.x;t.y=i.y;o=Math.max(o,t.y+t.h);e=Math.max(e,t.x+t.w);t.w===i.w&&t.h===i.h?(y=r.pop(),u<r.length&&(r[u]=y)):t.h===i.h?(i.x+=t.w,i.w-=t.w):t.w===i.w?(i.y+=t.h,i.h-=t.h):(r.push({x:i.x+t.w,y:i.y,w:i.w-t.w,h:t.h}),i.y+=t.h,i.h-=t.h);break}return{w:e,h:o,fill:h/(e*o)||0}}function dwt(n){for(var r,t=0,i=n;t<i.length;t+=1)if(r=i[t],r.positionedGlyphs.length!==0)return!1;return!0}function gwt(n,t){for(var f,r=[],e=n.text,i=0,u=0,o=t;u<o.length;u+=1)f=o[u],r.push(n.substring(i,f)),i=f;return i<e.length&&r.push(n.substring(i,e.length)),r}function uv(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){var w=pt.fromFeature(n,u),b,tt,it,ct,g,rt,ut,k,ft,lt,nt,et,ot,d,st,ht;if(l===hi.vertical&&w.verticalizePunctuation(),tt=pi.processBidirectionalText,it=pi.processStyledBidirectionalText,tt&&w.sections.length===1)for(b=[],ct=tt(w.toString(),gw(w,h,f,t,r,v,y)),g=0,rt=ct;g<rt.length;g+=1){for(ut=rt[g],k=new pt,k.text=ut,k.sections=w.sections,ft=0;ft<ut.length;ft++)k.sectionIndex.push(0);b.push(k)}else if(it)for(b=[],lt=it(w.text,w.sectionIndex,gw(w,h,f,t,r,v,y)),nt=0,et=lt;nt<et.length;nt+=1)ot=et[nt],d=new pt,d.text=ot[0],d.sectionIndex=ot[1],d.sections=w.sections,b.push(d);else b=gwt(w,gw(w,h,f,t,r,v,y));return(st=[],ht={positionedLines:st,text:w.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:l,iconsInText:!1,verticalizable:!1},ibt(ht,t,i,r,b,e,o,s,l,h,a,p),dwt(st))?!1:ht}function ait(n,t,i,r,u,f){var e,o,s;return t.imageName?(s=r[t.imageName],!s)?0:s.displaySize[0]*t.scale*ht/f+u:(e=i[t.fontStack],o=e&&e[n],!o)?0:o.metrics.advance*t.scale+u}function nbt(n,t,i,r,u,f){for(var s,h,o=0,e=0;e<n.length();e++)s=n.getSection(e),o+=ait(n.getCharCode(e),s,r,u,t,f);return h=Math.max(1,Math.ceil(o/i)),o/h}function vit(n,t,i,r){var u=Math.pow(n-t,2);return r?n<t?u/2:u*2:u+Math.abs(i)*i}function tbt(n,t,i){var r=0;return n===10&&(r-=1e4),i&&(r+=150),(n===40||n===65288)&&(r+=50),(t===41||t===65289)&&(r+=50),r}function yit(n,t,i,r,u,f){for(var h=null,e=vit(t,i,u,f),o=0,c=r;o<c.length;o+=1){var s=c[o],a=t-s.x,l=vit(a,i,u,f)+s.badness;l<=e&&(h=s,e=l)}return{index:n,x:t,priorBreak:h,badness:e}}function pit(n){return n?pit(n.priorBreak).concat(n.index):[]}function gw(n,t,i,r,u,f,e){var o,l,s,a;if(f!=="point")return[];if(!n)return[];var h=[],v=nbt(n,t,i,r,u,e),y=n.text.indexOf("​")>=0,c=0;for(o=0;o<n.length();o++)l=n.getSection(o),s=n.getCharCode(o),or[s]||(c+=ait(s,l,r,u,t,e)),o<n.length()-1&&(a=fht(s),(ii[s]||a||l.imageName)&&h.push(yit(o+1,c,v,h,tbt(s,n.getCharCode(o+1),a&&y),!1)));return pit(yit(n.length(),c,v,h,0,!0))}function nb(n){var t=.5,i=.5;switch(n){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(n){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function ibt(n,t,i,r,u,f,e,o,s,h,c,l){for(var v,k,d,g,pt,ut,wt,bt,ot,y,ui,st,fi,kt,b=0,nt=rs,tt=0,ct=0,gt=o==="right"?1:o==="left"?0:.5,lt=0,at=0,ni=u;at<ni.length;at+=1){v=ni[at];v.trim();var it=v.getMaxScale(),ti=(it-1)*ht,vt={positionedGlyphs:[],lineOffset:0};if(n.positionedLines[lt]=vt,k=vt.positionedGlyphs,d=0,!v.length()){nt+=f;++lt;continue}for(g=0;g<v.length();g++){var a=v.getSection(g),ii=v.getSectionIndex(g),p=v.getCharCode(g),ft=0,w=null,et=null,yt=null,ri=ht,rt=!(s===hi.horizontal||!c&&!op(p)||c&&(or[p]||oht(p)));if(a.imageName){if(ot=r[a.imageName],!ot)continue;yt=a.imageName;n.iconsInText=n.iconsInText||!0;et=ot.paddedRect;y=ot.displaySize;a.scale=a.scale*ht/l;w={width:y[0],height:y[1],left:si,top:-dw,advance:rt?y[1]:y[0]};ui=ht-y[1]*a.scale;ft=ti+ui;ri=w.advance;st=rt?y[0]*a.scale-ht*it:y[1]*a.scale-ht*it;st>0&&st>d&&(d=st)}else{if(pt=i[a.fontStack],ut=pt&&pt[p],ut&&ut.rect)et=ut.rect,w=ut.metrics;else{if(wt=t[a.fontStack],bt=wt&&wt[p],!bt)continue;w=bt.metrics}ft=(it-a.scale)*ht}rt?(n.verticalizable=!0,k.push({glyph:p,imageName:yt,x:b,y:nt+ft,vertical:rt,scale:a.scale,fontStack:a.fontStack,sectionIndex:ii,metrics:w,rect:et}),b+=ri*a.scale+h):(k.push({glyph:p,imageName:yt,x:b,y:nt+ft,vertical:rt,scale:a.scale,fontStack:a.fontStack,sectionIndex:ii,metrics:w,rect:et}),b+=w.advance*a.scale+h)}k.length!==0&&(fi=b-h,tt=Math.max(fi,tt),rbt(k,0,k.length-1,gt,d));b=0;kt=f*it+d;vt.lineOffset=Math.max(d,ti);nt+=kt;ct=Math.max(kt,ct);++lt}var dt=nt-rs,ei=nb(e),oi=ei.horizontalAlign,ci=ei.verticalAlign;ubt(n.positionedLines,gt,oi,ci,tt,ct,f,dt,u.length);n.top+=-ci*dt;n.bottom=n.top+dt;n.left+=-oi*tt;n.right=n.left+tt}function rbt(n,t,i,r,u){var f;if(r||u){var e=n[i],o=e.metrics.advance*e.scale,s=(n[i].x+o)*r;for(f=t;f<=i;f++)n[f].x-=s,n[f].y+=u}}function ubt(n,t,i,r,u,f,e,o,s){var w=(t-i)*u,y=0,h,l,p,c,a,v;for(y=f!==e?-o*r-rs:(-r*s+.5)*e,h=0,l=n;h<l.length;h+=1)for(p=l[h],c=0,a=p.positionedGlyphs;c<a.length;c+=1)v=a[c],v.x+=w,v.y+=y}function fbt(n,t,i){var r=nb(i),e=r.horizontalAlign,o=r.verticalAlign,s=t[0],h=t[1],u=s-n.displaySize[0]*e,c=u+n.displaySize[0],f=h-n.displaySize[1]*o,l=f+n.displaySize[1];return{image:n,top:f,bottom:l,left:u,right:c}}function wit(n,t,i,r,u,f){var e=n.image,b,o,s,l,a,h,v,y,c,p,w;return e.content&&(o=e.content,s=e.pixelRatio||1,b=[o[0]/s,o[1]/s,e.displaySize[0]-o[2]/s,e.displaySize[1]-o[3]/s]),l=t.left*f,a=t.right*f,i==="width"||i==="both"?(c=u[0]+l-r[3],v=u[0]+a+r[1]):(c=u[0]+(l+a-e.displaySize[0])/2,v=c+e.displaySize[0]),p=t.top*f,w=t.bottom*f,i==="height"||i==="both"?(h=u[1]+p-r[0],y=u[1]+w+r[2]):(h=u[1]+(p+w-e.displaySize[1])/2,y=h+e.displaySize[1]),{image:e,top:h,right:v,bottom:y,left:c,collisionPadding:b}}function tb(n,t){var i=t.expression,s,f,e,o,c,l;if(i.kind==="constant")return s=i.evaluate(new w(n+1)),{kind:"constant",layoutSize:s};if(i.kind==="source")return{kind:"source"};for(var r=i.zoomStops,h=i.interpolationType,u=0;u<r.length&&r[u]<=n;)u++;for(u=Math.max(0,u-1),f=u;f<r.length&&r[f]<n+1;)f++;return(f=Math.min(r.length-1,f),e=r[u],o=r[f],i.kind==="composite")?{kind:"composite",minZoom:e,maxZoom:o,interpolationType:h}:(c=i.evaluate(new w(e)),l=i.evaluate(new w(o)),{kind:"camera",minZoom:e,maxZoom:o,minSize:c,maxSize:l,interpolationType:h})}function bit(n,t,i){var u=t.uSize,f=t.uSizeT,r=i.lowerSize,e=i.upperSize;return n.kind==="source"?r/tr:n.kind==="composite"?ot(r/tr,e/tr,f):u}function kit(n,t){var r=0,i=0;if(n.kind==="constant")i=n.layoutSize;else if(n.kind!=="source"){var u=n.interpolationType,e=n.minZoom,o=n.maxZoom,f=u?af(bt.interpolationFactor(u,t,e,o),0,1):0;n.kind==="camera"?i=ot(n.minSize,n.maxSize,f):r=f}return{uSizeT:r,uSize:i}}function git(n,t,i,r,u){var s,h,o;if(t.segment===undefined)return!0;for(var a=t,f=t.segment+1,e=0;e>-i/2;){if(f--,f<0)return!1;e-=n[f].dist(a);a=n[f]}for(e+=n[f].dist(n[f+1]),f++,s=[],h=0;e<i/2;){var v=n[f-1],c=n[f],l=n[f+1];if(!l)return!1;for(o=v.angleTo(c)-c.angleTo(l),o=Math.abs((o+3*Math.PI)%(Math.PI*2)-Math.PI),s.push({distance:e,angleDelta:o}),h+=o;e-s[0].distance>r;)h-=s.shift().angleDelta;if(h>u)return!1;f++;e+=c.dist(l)}return!0}function nrt(n){for(var i=0,t=0;t<n.length-1;t++)i+=n[t].dist(n[t+1]);return i}function trt(n,t,i){return n?3/5*t*i:0}function irt(n,t){return Math.max(n?n.right-n.left:0,t?t.right-t.left:0)}function ebt(n,t,i,r,u,f){for(var a=trt(i,u,f),p=irt(i,r)*f,h=0,v=nrt(n)/2,e=0;e<n.length-1;e++){var o=n[e],s=n[e+1],c=o.dist(s);if(h+c>v){var y=(v-h)/c,w=ot(o.x,s.x,y),b=ot(o.y,s.y,y),l=new ue(w,b,s.angleTo(o),e);return(l._round(),!a||git(n,l,p,a,t))?l:void 0}h+=c}}function obt(n,t,i,r,u,f,e,o,s){var y=trt(r,f,e),c=irt(r,u),h=c*e,l=n[0].x===0||n[0].x===s||n[0].y===0||n[0].y===s,a,v;return t-h<t/4&&(t=h+t/4),a=f*2,v=l?t/2*o%t:(c/2+a)*e*o%t,rrt(n,v,t,y,i,h,l,!1,s)}function rrt(n,t,i,r,u,f,e,o,s){for(var p,d=f/2,nt=nrt(n),l=0,h=t-i,a=[],c=0;c<n.length-1;c++){for(var v=n[c],y=n[c+1],w=v.dist(y),tt=y.angleTo(v);h+i<l+w;){h+=i;var g=(h-l)/w,b=ot(v.x,y.x,g),k=ot(v.y,y.y,g);b>=0&&b<s&&k>=0&&k<s&&h-d>=0&&h+d<=nt&&(p=new ue(b,k,tt,c),p._round(),(!r||git(n,p,f,r,u))&&a.push(p))}l+=w}return o||a.length||e||(a=rrt(n,l/2,i,r,u,f,e,!0,s)),a}function urt(n,t,i,r,u){for(var c,o,s,f,e,a=[],l=0;l<n.length;l++)for(c=n[l],o=void 0,s=0;s<c.length-1;s++){if(f=c[s],e=c[s+1],f.x<t&&e.x<t)continue;else f.x<t?f=new h(t,f.y+(e.y-f.y)*((t-f.x)/(e.x-f.x)))._round():e.x<t&&(e=new h(t,f.y+(e.y-f.y)*((t-f.x)/(e.x-f.x)))._round());if(f.y<i&&e.y<i)continue;else f.y<i?f=new h(f.x+(e.x-f.x)*((i-f.y)/(e.y-f.y)),i)._round():e.y<i&&(e=new h(f.x+(e.x-f.x)*((i-f.y)/(e.y-f.y)),i)._round());if(f.x>=r&&e.x>=r)continue;else f.x>=r?f=new h(r,f.y+(e.y-f.y)*((r-f.x)/(e.x-f.x)))._round():e.x>=r&&(e=new h(r,f.y+(e.y-f.y)*((r-f.x)/(e.x-f.x)))._round());if(f.y>=u&&e.y>=u)continue;else f.y>=u?f=new h(f.x+(e.x-f.x)*((u-f.y)/(e.y-f.y)),u)._round():e.y>=u&&(e=new h(f.x+(e.x-f.x)*((u-f.y)/(e.y-f.y)),u)._round());o&&f.equals(o[o.length-1])||(o=[f],a.push(o));o.push(e)}return a}function frt(n,t,i,r){var tt=[],f=n.image,e=f.pixelRatio,it=f.paddedRect.w-2*fe,rt=f.paddedRect.h-2*fe,ut=n.right-n.left,ft=n.bottom-n.top,a=f.stretchX||[[0,it]],v=f.stretchY||[[0,rt]],ht=function(n,t){return n+t[1]-t[0]},o=a.reduce(ht,0),s=v.reduce(ht,0),ct=it-o,lt=rt-s,y=0,p=o,w=0,b=s,et=0,k=ct,ot=0,d=lt,u,st,g,nt,c,at,vt,l,yt,pt;if(f.content&&r&&(u=f.content,y=fv(a,0,u[0]),w=fv(v,0,u[1]),p=fv(a,u[0],u[2]),b=fv(v,u[1],u[3]),et=u[0]-y,ot=u[1]-w,k=u[2]-u[0]-p,d=u[3]-u[1]-b),st=function(r,u,c,l){var g=ev(r.stretch-y,p,ut,n.left),pt=ov(r.fixed-et,k,r.stretch,o),nt=ev(u.stretch-w,b,ft,n.top),wt=ov(u.fixed-ot,d,u.stretch,s),tt=ev(c.stretch-y,p,ut,n.left),bt=ov(c.fixed-et,k,c.stretch,o),it=ev(l.stretch-w,b,ft,n.top),kt=ov(l.fixed-ot,d,l.stretch,s),rt=new h(g,nt),st=new h(tt,nt),ht=new h(tt,it),ct=new h(g,it),dt=new h(pt/e,wt/e),gt=new h(bt/e,kt/e),v=t*Math.PI/180;if(v){var lt=Math.sin(v),at=Math.cos(v),a=[at,-lt,lt,at];rt._matMult(a);st._matMult(a);ct._matMult(a);ht._matMult(a)}var vt=r.stretch+r.fixed,ni=c.stretch+c.fixed,yt=u.stretch+u.fixed,ti=l.stretch+l.fixed,ii={x:f.paddedRect.x+fe+vt,y:f.paddedRect.y+fe+yt,w:ni-vt,h:ti-yt},ri=k/e/ut,ui=d/e/ft;return{tl:rt,tr:st,bl:ct,br:ht,tex:ii,writingMode:undefined,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:dt,pixelOffsetBR:gt,minFontScaleX:ri,minFontScaleY:ui,isSDF:i}},r&&(f.stretchX||f.stretchY))for(g=ert(a,ct,o),nt=ert(v,lt,s),c=0;c<g.length-1;c++)for(at=g[c],vt=g[c+1],l=0;l<nt.length-1;l++)yt=nt[l],pt=nt[l+1],tt.push(st(at,yt,vt,pt));else tt.push(st({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:it+1},{fixed:0,stretch:rt+1}));return tt}function fv(n,t,i){for(var u,f=0,r=0,e=n;r<e.length;r+=1)u=e[r],f+=Math.max(t,Math.min(i,u[1]))-Math.max(t,Math.min(i,u[0]));return f}function ert(n,t,i){for(var r=[{fixed:-fe,stretch:0}],f=0,o=n;f<o.length;f+=1){var s=o[f],e=s[0],h=s[1],u=r[r.length-1];r.push({fixed:e-u.stretch,stretch:u.stretch});r.push({fixed:e-u.stretch,stretch:u.stretch+(h-e)})}return r.push({fixed:t+fe,stretch:i}),r}function ev(n,t,i,r){return n/t*i+r}function ov(n,t,i,r){return n-t*i/r}function sbt(n,t,i,r,u,f,e,o){for(var nt,l,tt,s,bt,kt,ut,d=r.layout.get("text-rotate").evaluate(f,{})*Math.PI/180,at=[],g=0,vt=t.positionedLines;g<vt.length;g+=1)for(nt=vt[g],l=0,tt=nt.positionedGlyphs;l<tt.length;l+=1)if(s=tt[l],s.rect){var it=s.rect||{},rt=dw+1,yt=!0,a=1,pt=0,wt=(u||o)&&s.vertical,c=s.metrics.advance*s.scale/2;o&&t.verticalizable&&(bt=(s.scale-1)*ht,kt=(ht-s.metrics.width*s.scale)/2,pt=nt.lineOffset/2-(s.imageName?-kt:bt));s.imageName&&(ut=e[s.imageName],yt=ut.sdf,a=ut.pixelRatio,rt=si/a);var ui=u?[s.x+c,s.y]:[0,0],v=u?[0,0]:[s.x+c+i[0],s.y+i[1]-pt],dt=[0,0];wt&&(dt=v,v=[0,0]);var ft=(s.metrics.left-rt)*s.scale-c+v[0],et=(-s.metrics.top-rt)*s.scale+v[1],gt=ft+it.w*s.scale/a,ni=et+it.h*s.scale/a,ot=new h(ft,et),st=new h(gt,et),ct=new h(ft,ni),lt=new h(gt,ni);if(wt){var y=new h(-c,c-rs),p=-Math.PI/2,ti=ht/2-c,fi=s.imageName?ti:0,w=new h(5-rs-ti,-fi),b=new(Function.prototype.bind.apply(h,[null].concat(dt)));ot._rotateAround(p,y)._add(w)._add(b);st._rotateAround(p,y)._add(w)._add(b);ct._rotateAround(p,y)._add(w)._add(b);lt._rotateAround(p,y)._add(w)._add(b)}if(d){var ii=Math.sin(d),ri=Math.cos(d),k=[ri,-ii,ii,ri];ot._matMult(k);st._matMult(k);ct._matMult(k);lt._matMult(k)}var ei=new h(0,0),oi=new h(0,0);at.push({tl:ot,tr:st,bl:ct,br:lt,tex:it,writingMode:t.writingMode,glyphOffset:ui,sectionIndex:s.sectionIndex,isSDF:yt,pixelOffsetTL:ei,pixelOffsetBR:oi,minFontScaleX:0,minFontScaleY:0})}return at}function hbt(n,t){return n<t?-1:n>t?1:0}function cbt(n,t,i){var e,f,p,w,s,b,u;t===void 0&&(t=1);i===void 0&&(i=!1);var c=Infinity,l=Infinity,a=-Infinity,v=-Infinity,k=n[0];for(e=0;e<k.length;e++)f=k[e],(!e||f.x<c)&&(c=f.x),(!e||f.y<l)&&(l=f.y),(!e||f.x>a)&&(a=f.x),(!e||f.y>v)&&(v=f.y);var d=a-c,g=v-l,y=Math.min(d,g),r=y/2,o=new ee([],lbt);if(y===0)return new h(c,l);for(p=c;p<a;p+=y)for(w=l;w<v;w+=y)o.push(new fs(p+r,w+r,r,n));for(s=vbt(n),b=o.length;o.length;)(u=o.pop(),(u.d>s.d||!s.d)&&(s=u,i&&console.log("found best %d after %d probes",Math.round(1e4*u.d)/1e4,b)),u.max-s.d<=t)||(r=u.h/2,o.push(new fs(u.p.x-r,u.p.y-r,r,n)),o.push(new fs(u.p.x+r,u.p.y-r,r,n)),o.push(new fs(u.p.x-r,u.p.y+r,r,n)),o.push(new fs(u.p.x+r,u.p.y+r,r,n)),b+=4);return i&&(console.log("num probes: "+b),console.log("best distance: "+s.d)),s.p}function lbt(n,t){return t.max-n.max}function fs(n,t,i,r){this.p=new h(n,t);this.h=i;this.d=abt(this.p,r);this.max=this.d+this.h*Math.SQRT2}function abt(n,t){for(var u,i,r,f=!1,e=Infinity,o=0;o<t.length;o++){u=t[o];for(var s=0,h=u.length,c=h-1;s<h;c=s++)i=u[s],r=u[c],i.y>n.y!=r.y>n.y&&n.x<(r.x-i.x)*(n.y-i.y)/(r.y-i.y)+i.x&&(f=!f),e=Math.min(e,dn(n,i,r))}return(f?1:-1)*Math.sqrt(e)}function vbt(n){for(var r=0,o=0,s=0,u=n[0],f=0,h=u.length,c=h-1;f<h;c=f++){var t=u[f],i=u[c],e=t.x*i.y-i.x*t.y;o+=(t.x+i.x)*e;s+=(t.y+i.y)*e;r+=e*3}return new fs(o/r,s/r,0,n)}function ort(n,t){function i(n,t){var i=0,r=0,u;t<0&&(t=0);u=t/Math.sqrt(2);switch(n){case"top-right":case"top-left":r=u-oe;break;case"bottom-right":case"bottom-left":r=-u+oe;break;case"bottom":r=-t+oe;break;case"top":r=t-oe}switch(n){case"top-right":case"bottom-right":i=-u;break;case"top-left":case"bottom-left":i=u;break;case"left":i=t;break;case"right":i=-t}return[i,r]}function r(n,t,i){var r=0,u=0;t=Math.abs(t);i=Math.abs(i);switch(n){case"top-right":case"top-left":case"top":u=i-oe;break;case"bottom-right":case"bottom-left":case"bottom":u=-i+oe}switch(n){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,u]}return t[1]!==sv?r(n,t[0],t[1]):i(n,t[0])}function ybt(n,t,i,r,u,f,e){var y,l,v;n.createArrays();y=512*n.overscaling;n.tilePixelRatio=rt/y;n.compareText={};n.iconsNeedLinear=!1;var o=n.layers[0].layout,h=n.layers[0]._unevaluatedLayout._values,s={};if(n.textSizeData.kind==="composite"){var p=n.textSizeData,k=p.minZoom,d=p.maxZoom;s.compositeTextSizes=[h["text-size"].possiblyEvaluate(new w(k),e),h["text-size"].possiblyEvaluate(new w(d),e)]}if(n.iconSizeData.kind==="composite"){var b=n.iconSizeData,g=b.minZoom,nt=b.maxZoom;s.compositeIconSizes=[h["icon-size"].possiblyEvaluate(new w(g),e),h["icon-size"].possiblyEvaluate(new w(nt),e)]}s.layoutTextSize=h["text-size"].possiblyEvaluate(new w(n.zoom+1),e);s.layoutIconSize=h["icon-size"].possiblyEvaluate(new w(n.zoom+1),e);s.textMaxSize=h["text-size"].possiblyEvaluate(new w(18));var c=o.get("text-line-height")*ht,a=o.get("text-rotation-alignment")==="map"&&o.get("symbol-placement")!=="point",tt=o.get("text-keep-upright"),it=o.get("text-size"),ut=function(){var f=v[l],rt=o.get("text-font").evaluate(f,{},e).join(","),ut=it.evaluate(f,{},e),k=s.layoutTextSize.evaluate(f,{},e),ni=s.layoutIconSize.evaluate(f,{},e),h={horizontal:{},vertical:undefined},p=f.text,w=[0,0],yt,pt,wt,ot,nt,st,bt,ct,kt,b,lt;if(p){var at=p.toString(),ti=o.get("text-letter-spacing").evaluate(f,{},e)*ht,ft=rht(at)?ti:0,d=o.get("text-anchor").evaluate(f,{},e),vt=o.get("text-variable-anchor");vt||(yt=o.get("text-radial-offset").evaluate(f,{},e),w=yt?ort(d,[yt*ht,sv]):o.get("text-offset").evaluate(f,{},e).map(function(n){return n*ht}));var y=a?"center":o.get("text-justify").evaluate(f,{},e),g=o.get("symbol-placement"),et=g==="point"?o.get("text-max-width").evaluate(f,{},e)*ht:0,dt=function(){n.allowVerticalPlacement&&ep(at)&&(h.vertical=uv(p,t,i,u,rt,et,c,d,"left",ft,w,hi.vertical,!0,g,k,ut))};if(!a&&vt){for(pt=y==="auto"?vt.map(function(n){return ib(n)}):[y],wt=!1,ot=0;ot<pt.length;ot++)(nt=pt[ot],h.horizontal[nt])||(wt?h.horizontal[nt]=h.horizontal[0]:(st=uv(p,t,i,u,rt,et,c,"center",nt,ft,w,hi.horizontal,!1,g,k,ut),st&&(h.horizontal[nt]=st,wt=st.positionedLines.length===1)));dt()}else y==="auto"&&(y=ib(d)),bt=uv(p,t,i,u,rt,et,c,d,y,ft,w,hi.horizontal,!1,g,k,ut),bt&&(h.horizontal[y]=bt),dt(),ep(at)&&a&&tt&&(h.vertical=uv(p,t,i,u,rt,et,c,d,y,ft,w,hi.vertical,!1,g,k,ut))}ct=void 0;kt=!1;f.icon&&f.icon.name&&(b=r[f.icon.name],b&&(ct=fbt(u[f.icon.name],o.get("icon-offset").evaluate(f,{},e),o.get("icon-anchor").evaluate(f,{},e)),kt=b.sdf,n.sdfIcons===undefined?n.sdfIcons=b.sdf:n.sdfIcons!==b.sdf&&gt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),b.pixelRatio!==n.pixelRatio?n.iconsNeedLinear=!0:o.get("icon-rotate").constantOr(1)!==0&&(n.iconsNeedLinear=!0)));lt=hrt(h.horizontal)||h.vertical;n.iconsInText=lt?lt.iconsInText:!1;(lt||ct)&&pbt(n,f,h,ct,r,s,k,ni,w,kt,e)};for(l=0,v=n.features;l<v.length;l+=1)ut();f&&n.generateCollisionDebugBuffers()}function ib(n){switch(n){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function pbt(n,t,i,r,u,f,e,o,s,h,c){var ft=f.textMaxSize.evaluate(t,{}),a,p,ht,ct,ei,w,lt,at,vt,b,yt,k,pt,d,wt,bt,kt,g,dt,nt,tt,gt,oi,it,ni,ut;ft===undefined&&(ft=e);var l=n.layers[0].layout,et=l.get("icon-offset").evaluate(t,{},c),v=hrt(i.horizontal),y=24,ot=e/y,si=n.tilePixelRatio*ot,ti=n.tilePixelRatio*ft/y,hi=n.tilePixelRatio*o,ii=n.tilePixelRatio*l.get("symbol-spacing"),ci=l.get("text-padding")*n.tilePixelRatio,li=l.get("icon-padding")*n.tilePixelRatio,ri=l.get("text-max-angle")/180*Math.PI,ai=l.get("text-rotation-alignment")==="map"&&l.get("symbol-placement")!=="point",vi=l.get("icon-rotation-alignment")==="map"&&l.get("symbol-placement")!=="point",ui=l.get("symbol-placement"),yi=ii/2,st=l.get("icon-text-fit"),fi;if(r&&st!=="none"&&(n.allowVerticalPlacement&&i.vertical&&(fi=wit(r,i.vertical,st,l.get("icon-text-fit-padding"),et,ot)),v&&(r=wit(r,v,st,l.get("icon-text-fit-padding"),et,ot))),a=function(o,l){l.x<0||l.x>=rt||l.y<0||l.y>=rt||wbt(n,l,o,i,r,u,fi,n.layers[0],n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,si,ci,ai,s,hi,li,vi,et,t,f,h,c,e)},ui==="line")for(p=0,ht=urt(t.geometry,0,0,rt,rt);p<ht.length;p+=1)for(ct=ht[p],ei=obt(ct,ii,ri,i.vertical||v,r,y,ti,n.overscaling,rt),w=0,lt=ei;w<lt.length;w+=1)at=lt[w],vt=v,vt&&bbt(n,vt.text,yi,at)||a(ct,at);else if(ui==="line-center")for(b=0,yt=t.geometry;b<yt.length;b+=1)k=yt[b],k.length>1&&(pt=ebt(k,ri,i.vertical||v,r,y,ti),pt&&a(k,pt));else if(t.type==="Polygon")for(d=0,wt=vw(t.geometry,0);d<wt.length;d+=1)bt=wt[d],kt=cbt(bt,16),a(bt[0],new ue(kt.x,kt.y,0));else if(t.type==="LineString")for(g=0,dt=t.geometry;g<dt.length;g+=1)nt=dt[g],a(nt,new ue(nt[0].x,nt[0].y,0));else if(t.type==="Point")for(tt=0,gt=t.geometry;tt<gt.length;tt+=1)for(oi=gt[tt],it=0,ni=oi;it<ni.length;it+=1)ut=ni[it],a([ut],new ue(ut.x,ut.y,0))}function srt(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){var k=sbt(t,i,o,u,f,e,r,n.allowVerticalPlacement),d=n.textSizeData,p=null,w,b,g;for(d.kind==="source"?(p=[tr*u.layout.get("text-size").evaluate(e,{})],p[0]>pu&&gt(n.layerIds[0]+': Value for "text-size" is >= '+es+'. Reduce your "text-size".')):d.kind==="composite"&&(p=[tr*v.compositeTextSizes[0].evaluate(e,{},y),tr*v.compositeTextSizes[1].evaluate(e,{},y)],(p[0]>pu||p[1]>pu)&&gt(n.layerIds[0]+': Value for "text-size" is >= '+es+'. Reduce your "text-size".')),n.addSymbols(n.text,k,p,o,f,e,h,t,s.lineStartIndex,s.lineLength,a,y),w=0,b=c;w<b.length;w+=1)g=b[w],l[g]=n.text.placedSymbolArray.length-1;return k.length*4}function hrt(n){for(var t in n)return n[t];return null}function wbt(n,t,i,r,u,f,e,o,s,h,c,l,a,y,p,w,b,k,d,g,nt,tt,it,rt,ut){var wt,ct=n.addToLineVertexArray(t,i),st,lt,at,vt,oi=0,si=0,ci=0,li=0,bt=-1,kt=-1,et={},ai=hh(""),dt=0,ni=0,ri,ot,ui,yt,wi,fi,ei;if(o._unevaluatedLayout.getValue("text-radial-offset")===undefined?(wt=o.layout.get("text-offset").evaluate(nt,{},rt).map(function(n){return n*ht}),dt=wt[0],ni=wt[1]):(dt=o.layout.get("text-radial-offset").evaluate(nt,{},rt)*ht,ni=sv),n.allowVerticalPlacement&&r.vertical){var bi=o.layout.get("text-rotate").evaluate(nt,{},rt),vi=bi+90,ki=r.vertical;at=new kh(s,t,h,c,l,ki,a,y,p,vi);e&&(vt=new kh(s,t,h,c,l,e,b,k,p,vi))}if(u){var ti=o.layout.get("icon-rotate").evaluate(nt,{}),yi=o.layout.get("icon-text-fit")!=="none",pi=frt(u,ti,it,yi),ii=e?frt(e,ti,it,yi):undefined;lt=new kh(s,t,h,c,l,u,b,k,!1,ti);oi=pi.length*4;ri=n.iconSizeData;ot=null;ri.kind==="source"?(ot=[tr*o.layout.get("icon-size").evaluate(nt,{})],ot[0]>pu&&gt(n.layerIds[0]+': Value for "icon-size" is >= '+es+'. Reduce your "icon-size".')):ri.kind==="composite"&&(ot=[tr*tt.compositeIconSizes[0].evaluate(nt,{},rt),tr*tt.compositeIconSizes[1].evaluate(nt,{},rt)],(ot[0]>pu||ot[1]>pu)&&gt(n.layerIds[0]+': Value for "icon-size" is >= '+es+'. Reduce your "icon-size".'));n.addSymbols(n.icon,pi,ot,g,d,nt,!1,t,ct.lineStartIndex,ct.lineLength,-1,rt);bt=n.icon.placedSymbolArray.length-1;ii&&(si=ii.length*4,n.addSymbols(n.icon,ii,ot,g,d,nt,hi.vertical,t,ct.lineStartIndex,ct.lineLength,-1,rt),kt=n.icon.placedSymbolArray.length-1)}for(ui in r.horizontal)if(yt=r.horizontal[ui],st||(ai=hh(yt.text),wi=o.layout.get("text-rotate").evaluate(nt,{},rt),st=new kh(s,t,h,c,l,yt,a,y,p,wi)),fi=yt.positionedLines.length===1,ci+=srt(n,t,yt,f,o,p,nt,w,ct,r.vertical?hi.horizontal:hi.horizontalOnly,fi?Object.keys(r.horizontal):[ui],et,bt,tt,rt),fi)break;r.vertical&&(li+=srt(n,t,r.vertical,f,o,p,nt,w,ct,hi.vertical,["vertical"],et,kt,tt,rt));var di=st?st.boxStartIndex:n.collisionBoxArray.length,gi=st?st.boxEndIndex:n.collisionBoxArray.length,nr=at?at.boxStartIndex:n.collisionBoxArray.length,ir=at?at.boxEndIndex:n.collisionBoxArray.length,rr=lt?lt.boxStartIndex:n.collisionBoxArray.length,ur=lt?lt.boxEndIndex:n.collisionBoxArray.length,fr=vt?vt.boxStartIndex:n.collisionBoxArray.length,er=vt?vt.boxEndIndex:n.collisionBoxArray.length,ft=-1,pt=function(n,t){return n&&n.circleDiameter?Math.max(n.circleDiameter,t):t};ft=pt(st,ft);ft=pt(at,ft);ft=pt(lt,ft);ft=pt(vt,ft);ei=ft>-1?1:0;ei&&(ft*=ut/ht);n.glyphOffsetArray.length>=v.MAX_GLYPHS&&gt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");nt.sortKey!==undefined&&n.addToSortKeyRanges(n.symbolInstances.length,nt.sortKey);n.symbolInstances.emplaceBack(t.x,t.y,et.right>=0?et.right:-1,et.center>=0?et.center:-1,et.left>=0?et.left:-1,et.vertical||-1,bt,kt,ai,di,gi,nr,ir,rr,ur,fr,er,h,ci,li,oi,si,ei,0,a,dt,ni,ft)}function bbt(n,t,i,r){var u=n.compareText,e,f;if(t in u){for(e=u[t],f=e.length-1;f>=0;f--)if(r.dist(e[f])<i)return!0}else u[t]=[];return u[t].push(r),!1}function hv(n,t,i,r,u,f,e,o,s,h,c,l,a){var v=o?Math.min(pu,Math.round(o[0])):0,y=o?Math.min(pu,Math.round(o[1])):0;n.emplaceBack(t,i,Math.round(r*32),Math.round(u*32),f,e,(v<<1)+(s?1:0),y,h*16,c*16,l*256,a*256)}function rb(n,t,i){n.emplaceBack(t.x,t.y,i);n.emplaceBack(t.x,t.y,i);n.emplaceBack(t.x,t.y,i);n.emplaceBack(t.x,t.y,i)}function kbt(n){for(var r,t=0,i=n.sections;t<i.length;t+=1)if(r=i[t],hht(r.text))return!0;return!1}function dbt(n,t){return t.replace(/{([^{}]+)}/g,function(t,i){return i in n?String(n[i]):""})}function skt(n){var t=[],i=n.id;return i===undefined&&t.push({message:"layers."+i+': missing required property "id"'}),n.render===undefined&&t.push({message:"layers."+i+': missing required method "render"'}),n.renderingMode&&n.renderingMode!=="2d"&&n.renderingMode!=="3d"&&t.push({message:"layers."+i+': property "renderingMode" must be either "2d" or "3d"'}),t}function hkt(n){return n.type==="custom"?new art(n):new vrt[n.type](n)}function ckt(n,t,i){t=Math.pow(2,i)-t-1;var r=krt(n*256,t*256,i),u=krt((n+1)*256,(t+1)*256,i);return r[0]+","+r[1]+","+u[0]+","+u[1]}function krt(n,t,i){var r=12756274*Math.PI/256/Math.pow(2,i),u=n*r-6378137*Math.PI,f=t*r-6378137*Math.PI;return[u,f]}function drt(n){return eb*Math.cos(n*Math.PI/180)}function grt(n){return(180+n)/360}function nut(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function tut(n,t){return n/drt(t)}function lkt(n){return n*360-180}function ob(n){var t=180-n*360;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function akt(n,t){return n*drt(ob(t))}function vkt(n){return 1/Math.cos(n*Math.PI/180)}function dh(n,t,i,r,u){n*=2;n<0&&(n=n*-1-1);var f=1<<i;return(f*f*n+f*u+r).toString(36)+i.toString(36)+t.toString(36)}function ykt(n,t,i){for(var f="",r,u=n;u>0;u--)r=1<<u-1,f+=(t&r?1:0)+(i&r?2:0);return f}function pkt(n,t){var r={},f,i,u;if(!t)return r;for(f=function(){var n=u[i],f=n.layerIds.map(function(n){return t.getLayer(n)}).filter(Boolean),e,o,s;if(f.length!==0)for(n.layers=f,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map(function(n){return f.filter(function(t){return t.id===n})[0]})),e=0,o=f;e<o.length;e+=1)s=o[e],r[s.id]=n},i=0,u=n;i<u.length;i+=1)f();return r}function iut(n,t,i,r,u){return pv(n,function(n,f){var e=t instanceof co?t.get(f):null;return e&&e.evaluate?e.evaluate(i,r,u):e})}function rut(n){for(var t,i=Infinity,r=Infinity,u=-Infinity,f=-Infinity,e=0,o=n;e<o.length;e+=1)t=o[e],i=Math.min(i,t.x),r=Math.min(r,t.y),u=Math.max(u,t.x),f=Math.max(f,t.y);return{minX:i,minY:r,maxX:u,maxY:f}}function wkt(n,t){return t-n}var hb="1.14.0-rc3",cb=ae,h,e,lb,vb,pb,wv,rc,gv,vi,uk,fk,ny,gr,sc,hc,ty,iy,fy,lc,ls,pk,ey,wk,ir,be,dk,de,yc,lt,ui,ki,at,wc,ni,hr,iu,td,yi,id,ru,wt,uu,fu,di,eu,ou,cr,lr,su,ku,du,hu,gu,nf,cu,tf,pf,ro,bf,rf,uo,og,up,fp,df,lu,hl,cl,r,gf,so,vr,ll,fh,ho,fi,co,o,s,eh,ne,lo,ei,ao,yl,pl,wl,vo,au,bl,kl,dl,gl,oh,na,ta,vu,ia,ra,sh,ua,fa,yo,ea,oa,ap,sa,vp,yp,pp,wp,bp,kp,dp,gp,ff,ln,ef,pr,oi,yt,li,ti,wi,er,ttt,itt,dlt,iat,ew,of,kt,ftt,ett,vtt,gi,ww,wtt,nr,iit,go,iv,dw,is,hi,rs,pt,or,ii,ue,tr,dit,fe,kh,ee,oe,sv,es,pu,crt,lrt,se,os,v,art,vrt,lv,ce,nt,fb,b,eb,hf,cf,sb,tt,wr,gh,nc,av,le,br,uut,ut;ae.prototype.sampleCurveX=function(n){return((this.ax*n+this.bx)*n+this.cx)*n};ae.prototype.sampleCurveY=function(n){return((this.ay*n+this.by)*n+this.cy)*n};ae.prototype.sampleCurveDerivativeX=function(n){return(3*this.ax*n+2*this.bx)*n+this.cx};ae.prototype.solveCurveX=function(n,t){var r,u,i,f,e,o;for(typeof t=="undefined"&&(t=1e-6),i=n,e=0;e<8;e++){if(f=this.sampleCurveX(i)-n,Math.abs(f)<t)return i;if(o=this.sampleCurveDerivativeX(i),Math.abs(o)<1e-6)break;i=i-f/o}if(r=0,u=1,i=n,i<r)return r;if(i>u)return u;while(r<u){if(f=this.sampleCurveX(i),Math.abs(f-n)<t)return i;n>f?r=i:u=i;i=(u-r)*.5+r}return i};ae.prototype.solve=function(n,t){return this.sampleCurveY(this.solveCurveX(n,t))};h=ve;ve.prototype={clone:function(){return new ve(this.x,this.y)},add:function(n){return this.clone()._add(n)},sub:function(n){return this.clone()._sub(n)},multByPoint:function(n){return this.clone()._multByPoint(n)},divByPoint:function(n){return this.clone()._divByPoint(n)},mult:function(n){return this.clone()._mult(n)},div:function(n){return this.clone()._div(n)},rotate:function(n){return this.clone()._rotate(n)},rotateAround:function(n,t){return this.clone()._rotateAround(n,t)},matMult:function(n){return this.clone()._matMult(n)},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(n){return this.x===n.x&&this.y===n.y},dist:function(n){return Math.sqrt(this.distSqr(n))},distSqr:function(n){var t=n.x-this.x,i=n.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(n){return Math.atan2(this.y-n.y,this.x-n.x)},angleWith:function(n){return this.angleWithSep(n.x,n.y)},angleWithSep:function(n,t){return Math.atan2(this.x*t-this.y*n,this.x*n+this.y*t)},_matMult:function(n){var t=n[0]*this.x+n[1]*this.y,i=n[2]*this.x+n[3]*this.y;return this.x=t,this.y=i,this},_add:function(n){return this.x+=n.x,this.y+=n.y,this},_sub:function(n){return this.x-=n.x,this.y-=n.y,this},_mult:function(n){return this.x*=n,this.y*=n,this},_div:function(n){return this.x/=n,this.y/=n,this},_multByPoint:function(n){return this.x*=n.x,this.y*=n.y,this},_divByPoint:function(n){return this.x/=n.x,this.y/=n.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var n=this.y;return this.y=this.x,this.x=-n,this},_rotate:function(n){var t=Math.cos(n),i=Math.sin(n),r=t*this.x-i*this.y,u=i*this.x+t*this.y;return this.x=r,this.y=u,this},_rotateAround:function(n,t){var i=Math.cos(n),r=Math.sin(n),u=t.x+i*(this.x-t.x)-r*(this.y-t.y),f=t.y+r*(this.x-t.x)+i*(this.y-t.y);return this.x=u,this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}};ve.convert=function(n){return n instanceof ve?n:Array.isArray(n)?new ve(n[0],n[1]):n};e=typeof self!="undefined"?self:{};lb=Math.pow(2,53)-1;vb=ab(.25,.1,.25,1);pb=1;wv={};rc=null;var but=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now.bind(Date),kut=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,dut=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame,uc,kv,ye={now:but,frame:function(n){var t=kut(n);return{cancel:function(){return dut(t)}}},getImageData:function(n,t){t===void 0&&(t=0);var i=e.document.createElement("canvas"),r=i.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return i.width=n.width,i.height=n.height,r.drawImage(n,0,0,n.width,n.height),r.getImageData(-t,-t,n.width+2*t,n.height+2*t)},resolveURL:function(n){return uc||(uc=e.document.createElement("a")),uc.href=n,uc.href},hardwareConcurrency:e.navigator&&e.navigator.hardwareConcurrency||4,get devicePixelRatio(){return e.devicePixelRatio},get prefersReducedMotion(){return e.matchMedia?(kv==null&&(kv=e.matchMedia("(prefers-reduced-motion: reduce)")),kv.matches):!1}},ct={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},fc={supported:!1,testSupport:gut},hs,dv=!1,pe,ik=!1;e.document&&(pe=e.document.createElement("img"),pe.onload=function(){hs&&rk(hs);hs=null;ik=!0},pe.onerror=function(){dv=!0;hs=null},pe.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");gv="01";vi=function(n,t){this._transformRequestFn=n;this._customAccessToken=t;this._createSkuToken()};vi.prototype._createSkuToken=function(){var n=nft();this._skuToken=n.token;this._skuTokenExpiresAt=n.tokenExpiresAt};vi.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt};vi.prototype.transformRequest=function(n,t){return this._transformRequestFn?this._transformRequestFn(n,t)||{url:n}:{url:n}};vi.prototype.normalizeStyleURL=function(n,t){if(!dr(n))return n;var i=bu(n);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)};vi.prototype.normalizeGlyphsURL=function(n,t){if(!dr(n))return n;var i=bu(n);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)};vi.prototype.normalizeSourceURL=function(n,t){if(!dr(n))return n;var i=bu(n);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||t)};vi.prototype.normalizeSpriteURL=function(n,t,i,r){var u=bu(n);return dr(n)?(u.path="/styles/v1"+u.path+"/sprite"+t+i,this._makeAPIURL(u,this._customAccessToken||r)):(u.path+=""+t+i,ec(u))};vi.prototype.normalizeTileURL=function(n,t){var r;if(this._isSkuTokenExpired()&&this._createSkuToken(),n&&!dr(n))return n;var i=bu(n),u=ye.devicePixelRatio>=2||t===512?"@2x":"",f=fc.supported?".webp":"$1";return i.path=i.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+u+f),i.path=i.path.replace(/^.+\/v4\//,"/"),i.path="/v4"+i.path,r=this._customAccessToken||ift(i.params)||ct.ACCESS_TOKEN,ct.REQUIRE_ACCESS_TOKEN&&r&&this._skuToken&&i.params.push("sku="+this._skuToken),this._makeAPIURL(i,r)};vi.prototype.canonicalizeTileURL=function(n,t){var r=bu(n),u,i;return!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/)?n:(u="mapbox://tiles/",u+=r.path.replace("/v4/",""),i=r.params,t&&(i=i.filter(function(n){return!n.match(/^access_token=/)})),i.length&&(u+="?"+i.join("&")),u)};vi.prototype.canonicalizeTileset=function(n,t){for(var i,e=t?dr(t):!1,r=[],u=0,f=n.tiles||[];u<f.length;u+=1)i=f[u],cs(i)?r.push(this.canonicalizeTileURL(i,e)):r.push(i);return r};vi.prototype._makeAPIURL=function(n,t){var u="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",i=bu(ct.API_URL),r;if(n.protocol=i.protocol,n.authority=i.authority,n.protocol==="http"&&(r=n.params.indexOf("secure"),r>=0&&n.params.splice(r,1)),i.path!=="/"&&(n.path=""+i.path+n.path),!ct.REQUIRE_ACCESS_TOKEN)return ec(n);if(t=t||ct.ACCESS_TOKEN,!t)throw new Error("An API access token is required to use Mapbox GL. "+u);if(t[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+u);return n.params=n.params.filter(function(n){return n.indexOf("access_token")===-1}),n.params.push("access_token="+t),ec(n)};uk=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;fk=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;ny="mapbox.eventData";gr=function(n){this.type=n;this.anonId=null;this.eventData={};this.queue=[];this.pendingRequest=null};gr.prototype.getStorageKey=function(n){var t=ek(ct.ACCESS_TOKEN),i="";return i=t&&t.u?put(t.u):ct.ACCESS_TOKEN||"",n?ny+"."+n+":"+i:ny+":"+i};gr.prototype.fetchEventData=function(){var i=tk("localStorage"),r=this.getStorageKey(),u=this.getStorageKey("uuid"),n,t;if(i)try{n=e.localStorage.getItem(r);n&&(this.eventData=JSON.parse(n));t=e.localStorage.getItem(u);t&&(this.anonId=t)}catch(f){gt("Unable to read from LocalStorage")}};gr.prototype.saveEventData=function(){var n=tk("localStorage"),t=this.getStorageKey(),i=this.getStorageKey("uuid");if(n)try{e.localStorage.setItem(i,this.anonId);Object.keys(this.eventData).length>=1&&e.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(r){gt("Unable to write to LocalStorage")}};gr.prototype.processRequests=function(){};gr.prototype.postEvent=function(n,t,i,r){var u=this,f;if(ct.EVENTS_URL){f=bu(ct.EVENTS_URL);f.params.push("access_token="+(r||ct.ACCESS_TOKEN||""));var e={event:this.type,created:new Date(n).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:hb,skuId:gv,userId:this.anonId},o=t?ri(e,t):e,s={url:ec(f),headers:{"Content-Type":"text/plain"},body:JSON.stringify([o])};this.pendingRequest=gft(s,function(n){u.pendingRequest=null;i(n);u.saveEventData();u.processRequests(r)})}};gr.prototype.queueRequest=function(n,t){this.queue.push(n);this.processRequests(t)};var rft=function(n){function t(){n.call(this,"map.load");this.success={};this.skuToken=""}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(n,t,i,r){this.skuToken=i;(ct.EVENTS_URL&&r||ct.ACCESS_TOKEN&&Array.isArray(n)&&n.some(function(n){return dr(n)||cs(n)}))&&this.queueRequest({id:t,timestamp:Date.now()},r)},t.prototype.processRequests=function(n){var r=this;if(!this.pendingRequest&&this.queue.length!==0){var i=this.queue.shift(),t=i.id,u=i.timestamp;t&&this.success[t]||(this.anonId||this.fetchEventData(),kb(this.anonId)||(this.anonId=bb()),this.postEvent(u,{skuToken:this.skuToken},function(n){n||t&&(r.success[t]=!0)},n))}},t}(gr),uft=function(n){function t(t){n.call(this,"appUserTurnstile");this._customAccessToken=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(n,t){ct.EVENTS_URL&&ct.ACCESS_TOKEN&&Array.isArray(n)&&n.some(function(n){return dr(n)||cs(n)})&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(n){var r=this,i;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var u=ek(ct.ACCESS_TOKEN),f=u?u.u:ct.ACCESS_TOKEN,t=f!==this.eventData.tokenU;if(kb(this.anonId)||(this.anonId=bb(),t=!0),i=this.queue.shift(),this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(i),e=(i-this.eventData.lastSuccess)/864e5;t=t||e>=1||e<-1||o.getDate()!==s.getDate()}else t=!0;if(!t)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},function(n){n||(r.eventData.lastSuccess=i,r.eventData.tokenU=f)},n)}},t}(gr),ok=new uft,fft=ok.postTurnstileEvent.bind(ok),sk=new rft,eft=sk.postMapLoadEvent.bind(sk),hk="mapbox-tiles",ck=500,lk=50,oft=42e4,nu;hc=Infinity;iy={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(iy);var yk=function(n){function t(t,i,r){i===401&&cs(r)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes");n.call(this,t);this.status=i;this.url=r;this.name=this.constructor.name;this.message=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error),ry=ic()?function(){return self.worker&&self.worker.referrer}:function(){return(e.location.protocol==="blob:"?e.parent:e).location.href},wft=function(n){return/^file:/.test(n)||/^file:/.test(ry())&&!/^\w+:/.test(n)};var cc=function(n,t){if(!wft(n.url)){if(e.fetch&&e.Request&&e.AbortController&&e.Request.prototype.hasOwnProperty("signal"))return bft(n,t);if(ic()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",n,t,undefined,!0)}return kft(n,t)},dft=function(n,t){return cc(ri(n,{type:"json"}),t)},uy=function(n,t){return cc(ri(n,{type:"arrayBuffer"}),t)},gft=function(n,t){return cc(ri(n,{method:"POST"}),t)};fy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";pk=function(){lc=[];ls=0};pk();ey=function(n,t){var i;if(fc.supported&&(n.headers||(n.headers={}),n.headers.accept="image/webp,*/*"),ls>=ct.MAX_PARALLEL_IMAGE_REQUESTS)return i={requestParameters:n,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}},lc.push(i),i;ls++;var r=!1,u=function(){if(!r)for(r=!0,ls--;lc.length&&ls<ct.MAX_PARALLEL_IMAGE_REQUESTS;){var n=lc.shift(),t=n.requestParameters,i=n.callback,u=n.cancelled;u||(n.cancel=ey(t,i).cancel)}},f=uy(n,function(n,i,r,f){u();n?t(n):i&&(vk()?iet(i,t):tet(i,t,r,f))});return{cancel:function(){f.cancel();u()}}};wk=function(n,t){var i=e.document.createElement("video"),r,u;for(i.muted=!0,i.onloadstart=function(){t(null,i)},r=0;r<n.length;r++)u=e.document.createElement("source"),net(n[r])||(i.crossOrigin="Anonymous"),u.src=n[r],i.appendChild(u);return{cancel:function(){}}};var ac=function(n,t){t===void 0&&(t={});ri(this,t);this.type=n},sy=function(n){function t(t,i){i===void 0&&(i={});n.call(this,"error",ri({error:t},i))}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(ac),tu=function(){};tu.prototype.on=function(n,t){return this._listeners=this._listeners||{},bk(n,t,this._listeners),this};tu.prototype.off=function(n,t){return oy(n,t,this._listeners),oy(n,t,this._oneTimeListeners),this};tu.prototype.once=function(n,t){return this._oneTimeListeners=this._oneTimeListeners||{},bk(n,t,this._oneTimeListeners),this};tu.prototype.fire=function(n,t){var i,h,r,f,c,l,u,e,o,s;if(typeof n=="string"&&(n=new ac(n,t||{})),i=n.type,this.listens(i)){for(n.target=this,h=this._listeners&&this._listeners[i]?this._listeners[i].slice():[],r=0,f=h;r<f.length;r+=1)c=f[r],c.call(this,n);for(l=this._oneTimeListeners&&this._oneTimeListeners[i]?this._oneTimeListeners[i].slice():[],u=0,e=l;u<e.length;u+=1)o=e[u],oy(i,o,this._oneTimeListeners),o.call(this,n);s=this._eventedParent;s&&(ri(n,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),s.fire(n))}else n instanceof sy&&console.error(n.error);return this};tu.prototype.listens=function(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)};tu.prototype.setEventedParent=function(n,t){return this._eventedParent=n,this._eventedParentData=t,this};var t={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number","default":0,period:360,units:"degrees"},pitch:{type:"number","default":0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,"default":[-180,-85.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":!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,"default":[-180,-85.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":!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,"default":[-180,-85.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":!1},"*":{type:"*"}},source_geojson:{type:{required:!0,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":.375},cluster:{type:"boolean","default":!1},clusterRadius:{type:"number","default":50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean","default":!1},generateId:{type:"boolean","default":!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,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:!1,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"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},"default":"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},"default":"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number","default":2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number","default":1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,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:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number","default":250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean","default":!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},"default":"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean","default":!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean","default":!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean","default":!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["icon-image"],expression:{interpolated:!1,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:!0,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:!1,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:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number","default":0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number","default":2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean","default":!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,"default":[0,0],requires:["icon-image"],expression:{interpolated:!0,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:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted","default":"",tokens:!0,expression:{interpolated:!1,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:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number","default":16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number","default":10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number","default":1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number","default":0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},"default":"center",requires:["text-field"],expression:{interpolated:!1,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:!0,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:!1,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:!1,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:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number","default":0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number","default":2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean","default":!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},"default":"none",requires:["text-field"],expression:{interpolated:!1,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:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean","default":!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean","default":!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean","default":!1,requires:["text-field","icon-image"],expression:{interpolated:!1,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_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:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum","default":"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array","default":[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant","default":"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant","default":.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean","default":!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number","default":0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number","default":0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean","default":!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number","default":1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number","default":0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number","default":5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number","default":0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},"default":"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},"default":"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number","default":30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number","default":1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number","default":1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color","default":"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color","default":"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number","default":0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number","default":0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number","default":0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number","default":0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},"default":"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number","default":300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number","default":335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number","default":.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color","default":"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,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"}}},u=function(n,t,i,r){this.message=(n?n+": ":"")+i;r&&(this.identifier=r);t!==null&&t!==undefined&&t.__line__&&(this.line=t.__line__)};ir=function(n){function t(t,i){n.call(this,i);this.message=i;this.key=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error);be=function(n,t){var i,r;for(t===void 0&&(t=[]),this.parent=n,this.bindings={},i=0,r=t;i<r.length;i+=1){var u=r[i],f=u[0],e=u[1];this.bindings[f]=e}};be.prototype.concat=function(n){return new be(this,n)};be.prototype.get=function(n){if(this.bindings[n])return this.bindings[n];if(this.parent)return this.parent.get(n);throw new Error(n+" not found in scope.");};be.prototype.has=function(n){return this.bindings[n]?!0:this.parent?this.parent.has(n):!1};var as={kind:"null"},i={kind:"number"},a={kind:"string"},c={kind:"boolean"},sr={kind:"color"},ke={kind:"object"},l={kind:"value"},vc={kind:"collator"},vs={kind:"formatted"},ys={kind:"resolvedImage"};dk=[as,i,a,c,sr,vs,ke,bi(l),ys];var ret=tc(function(n,t){function i(n){return n=Math.round(n),n<0?0:n>255?255:n}function o(n){return n<0?0:n>1?1:n}function u(n){return n[n.length-1]==="%"?i(parseFloat(n)/100*255):i(parseInt(n))}function r(n){return n[n.length-1]==="%"?o(parseFloat(n)/100):o(parseFloat(n))}function f(n,t,i){return(i<0?i+=1:i>1&&(i-=1),i*6<1)?n+(t-n)*i*6:i*2<1?t:i*3<2?n+(t-n)*(2/3-i)*6:n}function s(n){var o=n.replace(/ /g,"").toLowerCase(),t,h,v;if(o in e)return e[o].slice();if(o[0]==="#")return o.length===4?(t=parseInt(o.substr(1),16),!(t>=0&&t<=4095))?null:[(t&3840)>>4|(t&3840)>>8,t&240|(t&240)>>4,t&15|(t&15)<<4,1]:o.length===7?(t=parseInt(o.substr(1),16),!(t>=0&&t<=16777215))?null:[(t&16711680)>>16,(t&65280)>>8,t&255,1]:null;if(h=o.indexOf("("),v=o.indexOf(")"),h!==-1&&v+1===o.length){var b=o.substr(0,h),s=o.substr(h+1,v-(h+1)).split(","),l=1;switch(b){case"rgba":if(s.length!==4)return null;l=r(s.pop());case"rgb":return s.length!==3?null:[u(s[0]),u(s[1]),u(s[2]),l];case"hsla":if(s.length!==4)return null;l=r(s.pop());case"hsl":if(s.length!==3)return null;var y=(parseFloat(s[0])%360+360)%360/360,p=r(s[1]),c=r(s[2]),a=c<=.5?c*(p+1):c+p-c*p,w=c*2-a;return[i(f(w,a,y+1/3)*255),i(f(w,a,y)*255),i(f(w,a,y-1/3)*255),l];default:return null}}return null}var e={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{t.parseCSSColor=s}catch(h){}}),gk=ret.parseCSSColor,y=function(n,t,i,r){r===void 0&&(r=1);this.r=n;this.g=t;this.b=i;this.a=r};y.parse=function(n){if(!n)return undefined;if(n instanceof y)return n;if(typeof n!="string")return undefined;var t=gk(n);return t?new y(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):undefined};y.prototype.toString=function(){var n=this.toArray(),t=n[0],i=n[1],r=n[2],u=n[3];return"rgba("+Math.round(t)+","+Math.round(i)+","+Math.round(r)+","+u+")"};y.prototype.toArray=function(){var t=this,i=t.r,r=t.g,u=t.b,n=t.a;return n===0?[0,0,0,0]:[i*255/n,r*255/n,u*255/n,n]};y.black=new y(0,0,0,1);y.white=new y(1,1,1,1);y.transparent=new y(0,0,0,0);y.red=new y(1,0,0,1);de=function(n,t,i){this.sensitivity=n?t?"variant":"case":t?"accent":"base";this.locale=i;this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};de.prototype.compare=function(n,t){return this.collator.compare(n,t)};de.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};yc=function(n,t,i,r,u){this.text=n;this.image=t;this.scale=i;this.fontStack=r;this.textColor=u};lt=function(n){this.sections=n};lt.fromString=function(n){return new lt([new yc(n,null,null,null,null)])};lt.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(n){return n.text.length!==0||n.image&&n.image.name.length!==0})};lt.factory=function(n){return n instanceof lt?n:lt.fromString(n)};lt.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(n){return n.text}).join("")};lt.prototype.serialize=function(){for(var n,t,i=["format"],r=0,u=this.sections;r<u.length;r+=1){if(n=u[r],n.image){i.push(["image",n.image.name]);continue}i.push(n.text);t={};n.fontStack&&(t["text-font"]=["literal",n.fontStack.split(",")]);n.scale&&(t["font-scale"]=n.scale);n.textColor&&(t["text-color"]=["rgba"].concat(n.textColor.toArray()));i.push(t)}return i};ui=function(n){this.name=n.name;this.available=n.available};ui.prototype.toString=function(){return this.name};ui.fromString=function(n){return n?new ui({name:n,available:!1}):null};ui.prototype.serialize=function(){return["image",this.name]};ki=function(n,t){this.type=n;this.value=t};ki.parse=function(n,t){if(n.length!==2)return t.error("'literal' expression requires exactly one argument, but found "+(n.length-1)+" instead.");if(!pc(n[1]))return t.error("invalid value");var u=n[1],r=et(u),i=t.expectedType;return r.kind==="array"&&r.N===0&&i&&i.kind==="array"&&(typeof i.N!="number"||i.N===0)&&(r=i),new ki(r,u)};ki.prototype.evaluate=function(){return this.value};ki.prototype.eachChild=function(){};ki.prototype.outputDefined=function(){return!0};ki.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof y?["rgba"].concat(this.value.toArray()):this.value instanceof lt?this.value.serialize():this.value};at=function(n){this.name="ExpressionEvaluationError";this.message=n};at.prototype.toJSON=function(){return this.message};wc={string:a,number:i,boolean:c,object:ke};ni=function(n,t){this.type=n;this.args=t};ni.parse=function(n,t){var i,u,f,e,r,h,o,s;if(n.length<2)return t.error("Expected at least one argument.");if(i=1,f=n[0],f==="array"){if(n.length>2){if(r=n[1],typeof r!="string"||!(r in wc)||r==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);e=wc[r];i++}else e=l;if(n.length>3){if(n[2]!==null&&(typeof n[2]!="number"||n[2]<0||n[2]!==Math.floor(n[2])))return t.error('The length argument to "array" must be a positive integer literal',2);h=n[2];i++}u=bi(e,h)}else u=wc[f];for(o=[];i<n.length;i++){if(s=t.parse(n[i],i,l),!s)return null;o.push(s)}return new ni(u,o)};ni.prototype.evaluate=function(n){for(var i,r,t=0;t<this.args.length;t++)if(i=this.args[t].evaluate(n),r=ps(this.type,et(i)),r){if(t===this.args.length-1)throw new at("Expected value to be of type "+g(this.type)+", but found "+g(et(i))+" instead.");}else return i;return null};ni.prototype.eachChild=function(n){this.args.forEach(n)};ni.prototype.outputDefined=function(){return this.args.every(function(n){return n.outputDefined()})};ni.prototype.serialize=function(){var t=this.type,i=[t.kind],n,r;return t.kind==="array"&&(n=t.itemType,(n.kind==="string"||n.kind==="number"||n.kind==="boolean")&&(i.push(n.kind),r=t.N,(typeof r=="number"||this.args.length>1)&&i.push(r))),i.concat(this.args.map(function(n){return n.serialize()}))};hr=function(n){this.type=vs;this.sections=n};hr.parse=function(n,t){var p,u,o,f,r,s,h,c,v,y,e;if(n.length<2)return t.error("Expected at least one argument.");if(p=n[1],!Array.isArray(p)&&typeof p=="object")return t.error("First argument must be an image or text section.");for(u=[],o=!1,f=1;f<=n.length-1;++f)if(r=n[f],o&&typeof r=="object"&&!Array.isArray(r)){if((o=!1,s=null,r["font-scale"]&&(s=t.parse(r["font-scale"],1,i),!s))||(h=null,r["text-font"]&&(h=t.parse(r["text-font"],1,bi(a)),!h))||(c=null,r["text-color"]&&(c=t.parse(r["text-color"],1,sr),!c)))return null;v=u[u.length-1];v.scale=s;v.font=h;v.textColor=c}else{if(y=t.parse(n[f],1,l),!y)return null;if(e=y.type.kind,e!=="string"&&e!=="value"&&e!=="null"&&e!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0;u.push({content:y,scale:null,font:null,textColor:null})}return new hr(u)};hr.prototype.evaluate=function(n){var t=function(t){var i=t.content.evaluate(n);return et(i)===ys?new yc("",i,null,null,null):new yc(bs(i),null,t.scale?t.scale.evaluate(n):null,t.font?t.font.evaluate(n).join(","):null,t.textColor?t.textColor.evaluate(n):null)};return new lt(this.sections.map(t))};hr.prototype.eachChild=function(n){for(var t,i=0,r=this.sections;i<r.length;i+=1)t=r[i],n(t.content),t.scale&&n(t.scale),t.font&&n(t.font),t.textColor&&n(t.textColor)};hr.prototype.outputDefined=function(){return!1};hr.prototype.serialize=function(){for(var n,t,i=["format"],r=0,u=this.sections;r<u.length;r+=1)n=u[r],i.push(n.content.serialize()),t={},n.scale&&(t["font-scale"]=n.scale.serialize()),n.font&&(t["text-font"]=n.font.serialize()),n.textColor&&(t["text-color"]=n.textColor.serialize()),i.push(t);return i};iu=function(n){this.type=ys;this.input=n};iu.parse=function(n,t){if(n.length!==2)return t.error("Expected two arguments.");var i=t.parse(n[1],1,a);return i?new iu(i):t.error("No image name provided.")};iu.prototype.evaluate=function(n){var i=this.input.evaluate(n),t=ui.fromString(i);return t&&n.availableImages&&(t.available=n.availableImages.indexOf(i)>-1),t};iu.prototype.eachChild=function(n){n(this.input)};iu.prototype.outputDefined=function(){return!1};iu.prototype.serialize=function(){return["image",this.input.serialize()]};td={"to-boolean":c,"to-color":sr,"to-number":i,"to-string":a};yi=function(n,t){this.type=n;this.args=t};yi.parse=function(n,t){var r,e,u,i,f;if(n.length<2)return t.error("Expected at least one argument.");if(r=n[0],(r==="to-boolean"||r==="to-string")&&n.length!==2)return t.error("Expected one argument.");for(e=td[r],u=[],i=1;i<n.length;i++){if(f=t.parse(n[i],i,l),!f)return null;u.push(f)}return new yi(e,u)};yi.prototype.evaluate=function(n){var t,r,u,e,c,o,i,f,s,l,h;if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(n));if(this.type.kind==="color"){for(u=0,e=this.args;u<e.length;u+=1){if(c=e[u],t=c.evaluate(n),r=null,t instanceof y)return t;if(typeof t=="string"){if(o=n.parseColor(t),o)return o}else if(Array.isArray(t)&&(r=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":nd(t[0],t[1],t[2],t[3]),!r))return new y(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new at(r||"Could not parse color from value '"+(typeof t=="string"?t:String(JSON.stringify(t)))+"'");}else if(this.type.kind==="number"){for(i=null,f=0,s=this.args;f<s.length;f+=1){if(l=s[f],i=l.evaluate(n),i===null)return 0;if(h=Number(i),!isNaN(h))return h}throw new at("Could not convert "+JSON.stringify(i)+" to number.");}else return this.type.kind==="formatted"?lt.fromString(bs(this.args[0].evaluate(n))):this.type.kind==="resolvedImage"?ui.fromString(bs(this.args[0].evaluate(n))):bs(this.args[0].evaluate(n))};yi.prototype.eachChild=function(n){this.args.forEach(n)};yi.prototype.outputDefined=function(){return this.args.every(function(n){return n.outputDefined()})};yi.prototype.serialize=function(){if(this.type.kind==="formatted")return new hr([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new iu(this.args[0]).serialize();var n=["to-"+this.type.kind];return this.eachChild(function(t){n.push(t.serialize())}),n};id=["Unknown","Point","LineString","Polygon"];ru=function(){this.globals=null;this.feature=null;this.featureState=null;this.formattedSection=null;this._parseColorCache={};this.availableImages=null;this.canonical=null};ru.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null};ru.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?id[this.feature.type]:this.feature.type:null};ru.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null};ru.prototype.canonicalID=function(){return this.canonical};ru.prototype.properties=function(){return this.feature&&this.feature.properties||{}};ru.prototype.parseColor=function(n){var t=this._parseColorCache[n];return t||(t=this._parseColorCache[n]=y.parse(n)),t};wt=function(n,t,i,r){this.name=n;this.type=t;this._evaluate=i;this.args=r};wt.prototype.evaluate=function(n){return this._evaluate(n,this.args)};wt.prototype.eachChild=function(n){this.args.forEach(n)};wt.prototype.outputDefined=function(){return!1};wt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(n){return n.serialize()}))};wt.parse=function(n,t){var w,l=n[0],r=wt.definitions[l],h,a,u,v,o,e,nt,tt,c,p;if(!r)return t.error('Unknown expression "'+l+'". If you wanted a literal array, use ["literal", [...]].',0);var it=Array.isArray(r)?r[0]:r.type,b=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=b.filter(function(t){var i=t[0];return!Array.isArray(i)||i.length===n.length-1}),f=null;for(h=0,a=s;h<a.length;h+=1){var k=a[h],i=k[0],rt=k[1];for(f=new ou(t.registry,t.path,null,t.scope),u=[],v=!1,o=1;o<n.length;o++){var ut=n[o],ft=Array.isArray(i)?i[o-1]:i.type,d=f.parse(ut,1+u.length,ft);if(!d){v=!0;break}u.push(d)}if(!v){if(Array.isArray(i)&&i.length!==u.length){f.error("Expected "+i.length+" arguments, but found "+u.length+" instead.");continue}for(e=0;e<u.length;e++)nt=Array.isArray(i)?i[e]:i.type,tt=u[e],f.concat(e+1).checkSubtype(nt,tt.type);if(f.errors.length===0)return new wt(l,it,rt,u)}}if(s.length===1)(w=t.errors).push.apply(w,f.errors);else{var et=s.length?s:b,ot=et.map(function(n){var t=n[0];return uet(t)}).join(" | "),y=[];for(c=1;c<n.length;c++){if(p=t.parse(n[c],1+y.length),!p)return null;y.push(g(p.type))}t.error("Expected arguments of type "+ot+", but found ("+y.join(", ")+") instead.")}return null};wt.register=function(n,t){wt.definitions=t;for(var i in t)n[i]=wt};uu=function(n,t,i){this.type=vc;this.locale=i;this.caseSensitive=n;this.diacriticSensitive=t};uu.parse=function(n,t){var i,u,f,r;return n.length!==2?t.error("Expected one argument."):(i=n[1],typeof i!="object"||Array.isArray(i))?t.error("Collator options argument must be an object."):(u=t.parse(i["case-sensitive"]===undefined?!1:i["case-sensitive"],1,c),!u)?null:(f=t.parse(i["diacritic-sensitive"]===undefined?!1:i["diacritic-sensitive"],1,c),!f)?null:(r=null,i.locale&&(r=t.parse(i.locale,1,a),!r))?null:new uu(u,f,r)};uu.prototype.evaluate=function(n){return new de(this.caseSensitive.evaluate(n),this.diacriticSensitive.evaluate(n),this.locale?this.locale.evaluate(n):null)};uu.prototype.eachChild=function(n){n(this.caseSensitive);n(this.diacriticSensitive);this.locale&&n(this.locale)};uu.prototype.outputDefined=function(){return!1};uu.prototype.serialize=function(){var n={};return n["case-sensitive"]=this.caseSensitive.serialize(),n["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(n.locale=this.locale.serialize()),["collator",n]};fu=8192;di=function(n,t){this.type=c;this.geojson=n;this.geometries=t};di.parse=function(n,t){var i,r,u,f;if(n.length!==2)return t.error("'within' expression requires exactly one argument, but found "+(n.length-1)+" instead.");if(pc(n[1]))if(i=n[1],i.type==="FeatureCollection"){for(r=0;r<i.features.length;++r)if(u=i.features[r].geometry.type,u==="Polygon"||u==="MultiPolygon")return new di(i,i.features[r].geometry)}else if(i.type==="Feature"){if(f=i.geometry.type,f==="Polygon"||f==="MultiPolygon")return new di(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new di(i,i);return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")};di.prototype.evaluate=function(n){if(n.geometry()!=null&&n.canonicalID()!=null){if(n.geometryType()==="Point")return bet(n,this.geometries);if(n.geometryType()==="LineString")return ket(n,this.geometries)}return!1};di.prototype.eachChild=function(){};di.prototype.outputDefined=function(){return!0};di.prototype.serialize=function(){return["within",this.geojson]};eu=function(n,t){this.type=t.type;this.name=n;this.boundExpression=t};eu.parse=function(n,t){if(n.length!==2||typeof n[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");var i=n[1];return t.scope.has(i)?new eu(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)};eu.prototype.evaluate=function(n){return this.boundExpression.evaluate(n)};eu.prototype.eachChild=function(){};eu.prototype.outputDefined=function(){return!1};eu.prototype.serialize=function(){return["var",this.name]};ou=function(n,t,i,r,u){t===void 0&&(t=[]);r===void 0&&(r=new be);u===void 0&&(u=[]);this.registry=n;this.path=t;this.key=t.map(function(n){return"["+n+"]"}).join("");this.scope=r;this.errors=u;this.expectedType=i};ou.prototype.parse=function(n,t,i,r,u){return(u===void 0&&(u={}),t)?this.concat(t,i,r)._parse(n,u):this._parse(n,u)};ou.prototype._parse=function(n,t){function o(n,t,i){return i==="assert"?new ni(t,[n]):i==="coerce"?new yi(t,[n]):n}var u,e,i,r,f,s;if((n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number")&&(n=["literal",n]),Array.isArray(n)){if(n.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');if(u=n[0],typeof u!="string")return this.error("Expression name must be a string, but found "+typeof u+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;if(e=this.registry[u],e){if(i=e.parse(n,this),!i)return null;if(this.expectedType)if(r=this.expectedType,f=i.type,(r.kind==="string"||r.kind==="number"||r.kind==="boolean"||r.kind==="object"||r.kind==="array")&&f.kind==="value")i=o(i,r,t.typeAnnotation||"assert");else if((r.kind==="color"||r.kind==="formatted"||r.kind==="resolvedImage")&&(f.kind==="value"||f.kind==="string"))i=o(i,r,t.typeAnnotation||"coerce");else if(this.checkSubtype(r,f))return null;if(!(i instanceof ki)&&i.type.kind!=="resolvedImage"&&vy(i)){s=new ru;try{i=new ki(i.type,i.evaluate(s))}catch(h){return this.error(h.message),null}}return i}return this.error('Unknown expression "'+u+'". If you wanted a literal array, use ["literal", [...]].',0)}return typeof n=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof n=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof n+" instead.")};ou.prototype.concat=function(n,t,i){var r=typeof n=="number"?this.path.concat(n):this.path,u=i?this.scope.concat(i):this.scope;return new ou(this.registry,r,t||null,u,this.errors)};ou.prototype.error=function(n){for(var i=[],t=arguments.length-1,r;t-->0;)i[t]=arguments[t+1];r=""+this.key+i.map(function(n){return"["+n+"]"}).join("");this.errors.push(new ir(r,n))};ou.prototype.checkSubtype=function(n,t){var i=ps(n,t);return i&&this.error(i),i};cr=function(n,t,i){var r,u;for(this.type=n,this.input=t,this.labels=[],this.outputs=[],r=0,u=i;r<u.length;r+=1){var f=u[r],e=f[0],o=f[1];this.labels.push(e);this.outputs.push(o)}};cr.parse=function(n,t){var o,u,f,r,e;if(n.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(n.length-1)+".");if((n.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(n[1],1,i),!o)return null;for(u=[],f=null,t.expectedType&&t.expectedType.kind!=="value"&&(f=t.expectedType),r=1;r<n.length;r+=2){var s=r===1?-Infinity:n[r],c=n[r+1],h=r,l=r+1;if(typeof s!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(u.length&&u[u.length-1][0]>=s)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',h);if(e=t.parse(c,l,f),!e)return null;f=f||e.type;u.push([s,e])}return new cr(f,o,u)};cr.prototype.evaluate=function(n){var t=this.labels,i=this.outputs,r,u,f;return t.length===1?i[0].evaluate(n):(r=this.input.evaluate(n),r<=t[0])?i[0].evaluate(n):(u=t.length,r>=t[u-1])?i[u-1].evaluate(n):(f=gc(t,r),i[f].evaluate(n))};cr.prototype.eachChild=function(n){var t,i,r;for(n(this.input),t=0,i=this.outputs;t<i.length;t+=1)r=i[t],n(r)};cr.prototype.outputDefined=function(){return this.outputs.every(function(n){return n.outputDefined()})};cr.prototype.serialize=function(){for(var t=["step",this.input.serialize()],n=0;n<this.labels.length;n++)n>0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t};var nl=Object.freeze({__proto__:null,number:ot,color:det,array:get}),hd=.95047,cd=1,ld=1.08883,ad=4/29,ge=6/29,vd=3*ge*ge,not=ge*ge*ge,tot=Math.PI/180,iot=180/Math.PI;var ds={forward:yd,reverse:pd,interpolate:rot},gs={forward:uot,reverse:fot,interpolate:oot},wd=Object.freeze({__proto__:null,lab:ds,hcl:gs}),bt=function(n,t,i,r,u){var f,e;for(this.type=n,this.operator=t,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[],f=0,e=u;f<e.length;f+=1){var o=e[f],s=o[0],h=o[1];this.labels.push(s);this.outputs.push(h)}};bt.interpolationFactor=function(n,t,i,r){var f=0,u,e;return n.name==="exponential"?f=ky(t,n.base,i,r):n.name==="linear"?f=ky(t,1,i,r):n.name==="cubic-bezier"&&(u=n.controlPoints,e=new cb(u[0],u[1],u[2],u[3]),f=e.solve(ky(t,1,i,r))),f};bt.parse=function(n,t){var c=n[0],u=n[1],o=n[2],l=n.slice(3),a,s,e,r,f,h;if(!Array.isArray(u)||u.length===0)return t.error("Expected an interpolation type expression.",1);if(u[0]==="linear")u={name:"linear"};else if(u[0]==="exponential"){if(a=u[1],typeof a!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:a}}else if(u[0]==="cubic-bezier"){if(s=u.slice(1),s.length!==4||s.some(function(n){return typeof n!="number"||n<0||n>1}))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:s}}else return t.error("Unknown interpolation type "+String(u[0]),1,0);if(n.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(n.length-1)+".");if((n.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,i),!o)return null;for(e=[],r=null,c==="interpolate-hcl"||c==="interpolate-lab"?r=sr:t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType),f=0;f<l.length;f+=2){var v=l[f],p=l[f+1],y=f+3,w=f+4;if(typeof v!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',y);if(e.length&&e[e.length-1][0]>=v)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',y);if(h=t.parse(p,w,r),!h)return null;r=r||h.type;e.push([v,h])}return r.kind!=="number"&&r.kind!=="color"&&!(r.kind==="array"&&r.itemType.kind==="number"&&typeof r.N=="number")?t.error("Type "+g(r)+" is not interpolatable."):new bt(r,c,u,o,e)};bt.prototype.evaluate=function(n){var t=this.labels,r=this.outputs,i,f;if(t.length===1||(i=this.input.evaluate(n),i<=t[0]))return r[0].evaluate(n);if(f=t.length,i>=t[f-1])return r[f-1].evaluate(n);var u=gc(t,i),h=t[u],c=t[u+1],e=bt.interpolationFactor(this.interpolation,i,h,c),o=r[u].evaluate(n),s=r[u+1].evaluate(n);return this.operator==="interpolate"?nl[this.type.kind.toLowerCase()](o,s,e):this.operator==="interpolate-hcl"?gs.reverse(gs.interpolate(gs.forward(o),gs.forward(s),e)):ds.reverse(ds.interpolate(ds.forward(o),ds.forward(s),e))};bt.prototype.eachChild=function(n){var t,i,r;for(n(this.input),t=0,i=this.outputs;t<i.length;t+=1)r=i[t],n(r)};bt.prototype.outputDefined=function(){return this.outputs.every(function(n){return n.outputDefined()})};bt.prototype.serialize=function(){var i,t,n;for(i=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints),t=[this.operator,i,this.input.serialize()],n=0;n<this.labels.length;n++)t.push(this.labels[n],this.outputs[n].serialize());return t};lr=function(n,t){this.type=n;this.args=t};lr.parse=function(n,t){var i,r,u,f,o,s,e,h;if(n.length<2)return t.error("Expectected at least one argument.");for(i=null,r=t.expectedType,r&&r.kind!=="value"&&(i=r),u=[],f=0,o=n.slice(1);f<o.length;f+=1){if(s=o[f],e=t.parse(s,1+u.length,i,undefined,{typeAnnotation:"omit"}),!e)return null;i=i||e.type;u.push(e)}return h=r&&u.some(function(n){return ps(r,n.type)}),h?new lr(l,u):new lr(i,u)};lr.prototype.evaluate=function(n){for(var e,t=null,u=0,i,r=0,f=this.args;r<f.length;r+=1)if(e=f[r],u++,t=e.evaluate(n),t&&t instanceof ui&&!t.available&&(i||(i=t.name),t=null,u===this.args.length&&(t=i)),t!==null)break;return t};lr.prototype.eachChild=function(n){this.args.forEach(n)};lr.prototype.outputDefined=function(){return this.args.every(function(n){return n.outputDefined()})};lr.prototype.serialize=function(){var n=["coalesce"];return this.eachChild(function(t){n.push(t.serialize())}),n};su=function(n,t){this.type=t.type;this.bindings=[].concat(n);this.result=t};su.prototype.evaluate=function(n){return this.result.evaluate(n)};su.prototype.eachChild=function(n){for(var r,t=0,i=this.bindings;t<i.length;t+=1)r=i[t],n(r[1]);n(this.result)};su.parse=function(n,t){var u,i,r,f,e;if(n.length<4)return t.error("Expected at least 3 arguments, but found "+(n.length-1)+" instead.");for(u=[],i=1;i<n.length-1;i+=2){if(r=n[i],typeof r!="string")return t.error("Expected string, but found "+typeof r+" instead.",i);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",i);if(f=t.parse(n[i+1],i+1),!f)return null;u.push([r,f])}return(e=t.parse(n[n.length-1],n.length-1,t.expectedType,u),!e)?null:new su(u,e)};su.prototype.outputDefined=function(){return this.result.outputDefined()};su.prototype.serialize=function(){for(var n=["let"],t=0,i=this.bindings;t<i.length;t+=1){var r=i[t],u=r[0],f=r[1];n.push(u,f.serialize())}return n.push(this.result.serialize()),n};ku=function(n,t,i){this.type=n;this.index=t;this.input=i};ku.parse=function(n,t){var u,r,f;return n.length!==3?t.error("Expected 2 arguments, but found "+(n.length-1)+" instead."):(u=t.parse(n[1],1,i),r=t.parse(n[2],2,bi(t.expectedType||l)),!u||!r)?null:(f=r.type,new ku(f.itemType,u,r))};ku.prototype.evaluate=function(n){var t=this.index.evaluate(n),i=this.input.evaluate(n);if(t<0)throw new at("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new at("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new at("Array index must be an integer, but found "+t+" instead.");return i[t]};ku.prototype.eachChild=function(n){n(this.index);n(this.input)};ku.prototype.outputDefined=function(){return!1};ku.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};du=function(n,t){this.type=c;this.needle=n;this.haystack=t};du.parse=function(n,t){if(n.length!==3)return t.error("Expected 2 arguments, but found "+(n.length-1)+" instead.");var r=t.parse(n[1],1,l),u=t.parse(n[2],2,l);return!r||!u?null:hy(r.type,[c,a,i,as,l])?new du(r,u):t.error("Expected first argument to be of type boolean, string, number or null, but found "+g(r.type)+" instead")};du.prototype.evaluate=function(n){var i=this.needle.evaluate(n),t=this.haystack.evaluate(n);if(!t)return!1;if(!ws(i,["boolean","string","number","null"]))throw new at("Expected first argument to be of type boolean, string, number or null, but found "+g(et(i))+" instead.");if(!ws(t,["string","array"]))throw new at("Expected second argument to be of type array or string, but found "+g(et(t))+" instead.");return t.indexOf(i)>=0};du.prototype.eachChild=function(n){n(this.needle);n(this.haystack)};du.prototype.outputDefined=function(){return!0};du.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};hu=function(n,t,r){this.type=i;this.needle=n;this.haystack=t;this.fromIndex=r};hu.parse=function(n,t){var r,u,f;return n.length<=2||n.length>=5?t.error("Expected 3 or 4 arguments, but found "+(n.length-1)+" instead."):(r=t.parse(n[1],1,l),u=t.parse(n[2],2,l),!r||!u)?null:hy(r.type,[c,a,i,as,l])?n.length===4?(f=t.parse(n[3],3,i),!f)?null:new hu(r,u,f):new hu(r,u):t.error("Expected first argument to be of type boolean, string, number or null, but found "+g(r.type)+" instead")};hu.prototype.evaluate=function(n){var t=this.needle.evaluate(n),i=this.haystack.evaluate(n),r;if(!ws(t,["boolean","string","number","null"]))throw new at("Expected first argument to be of type boolean, string, number or null, but found "+g(et(t))+" instead.");if(!ws(i,["string","array"]))throw new at("Expected second argument to be of type array or string, but found "+g(et(i))+" instead.");return this.fromIndex?(r=this.fromIndex.evaluate(n),i.indexOf(t,r)):i.indexOf(t)};hu.prototype.eachChild=function(n){n(this.needle);n(this.haystack);this.fromIndex&&n(this.fromIndex)};hu.prototype.outputDefined=function(){return!1};hu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==undefined){var n=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),n]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};gu=function(n,t,i,r,u,f){this.inputType=n;this.type=t;this.input=i;this.cases=r;this.outputs=u;this.otherwise=f};gu.parse=function(n,t){var o,f,h,c,r,e,w,u,a,y,i,v,s,p;if(n.length<5)return t.error("Expected at least 4 arguments, but found only "+(n.length-1)+".");if(n.length%2!=1)return t.error("Expected an even number of arguments.");for(t.expectedType&&t.expectedType.kind!=="value"&&(f=t.expectedType),h={},c=[],r=2;r<n.length-1;r+=2){if(e=n[r],w=n[r+1],Array.isArray(e)||(e=[e]),u=t.concat(r),e.length===0)return u.error("Expected at least one branch label.");for(a=0,y=e;a<y.length;a+=1){if(i=y[a],typeof i!="number"&&typeof i!="string")return u.error("Branch labels must be numbers or strings.");if(typeof i=="number"&&Math.abs(i)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof i=="number"&&Math.floor(i)!==i)return u.error("Numeric branch labels must be integer values.");if(o){if(u.checkSubtype(o,et(i)))return null}else o=et(i);if(typeof h[String(i)]!="undefined")return u.error("Branch labels must be unique.");h[String(i)]=c.length}if(v=t.parse(w,r,f),!v)return null;f=f||v.type;c.push(v)}return(s=t.parse(n[1],1,l),!s)?null:(p=t.parse(n[n.length-1],n.length-1,f),!p)?null:s.type.kind!=="value"&&t.concat(1).checkSubtype(o,s.type)?null:new gu(o,f,s,h,c,p)};gu.prototype.evaluate=function(n){var t=this.input.evaluate(n),i=et(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise;return i.evaluate(n)};gu.prototype.eachChild=function(n){n(this.input);this.outputs.forEach(n);n(this.otherwise)};gu.prototype.outputDefined=function(){return this.outputs.every(function(n){return n.outputDefined()})&&this.otherwise.outputDefined()};gu.prototype.serialize=function(){for(var n,f,e,r,o,a=this,t=["match",this.input.serialize()],v=Object.keys(this.cases).sort(),i=[],h={},u=0,c=v;u<c.length;u+=1)n=c[u],f=h[this.cases[n]],f===undefined?(h[this.cases[n]]=i.length,i.push([this.cases[n],[n]])):i[f][1].push(n);for(e=function(n){return a.inputType.kind==="number"?Number(n):n},r=0,o=i;r<o.length;r+=1){var l=o[r],f=l[0],s=l[1];s.length===1?t.push(e(s[0])):t.push(s.map(e));t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};nf=function(n,t,i){this.type=n;this.branches=t;this.otherwise=i};nf.parse=function(n,t){var r,f,i,e,u,o;if(n.length<4)return t.error("Expected at least 3 arguments, but found only "+(n.length-1)+".");if(n.length%2!=0)return t.error("Expected an odd number of arguments.");for(t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType),f=[],i=1;i<n.length-1;i+=2){if((e=t.parse(n[i],i,c),!e)||(u=t.parse(n[i+1],i+1,r),!u))return null;f.push([e,u]);r=r||u.type}return(o=t.parse(n[n.length-1],n.length-1,r),!o)?null:new nf(r,f,o)};nf.prototype.evaluate=function(n){for(var t=0,i=this.branches;t<i.length;t+=1){var r=i[t],u=r[0],f=r[1];if(u.evaluate(n))return f.evaluate(n)}return this.otherwise.evaluate(n)};nf.prototype.eachChild=function(n){for(var t=0,i=this.branches;t<i.length;t+=1){var r=i[t],u=r[0],f=r[1];n(u);n(f)}n(this.otherwise)};nf.prototype.outputDefined=function(){return this.branches.every(function(n){var i=n[0],t=n[1];return t.outputDefined()})&&this.otherwise.outputDefined()};nf.prototype.serialize=function(){var n=["case"];return this.eachChild(function(t){n.push(t.serialize())}),n};cu=function(n,t,i,r){this.type=n;this.input=t;this.beginIndex=i;this.endIndex=r};cu.parse=function(n,t){var r,u,f;return n.length<=2||n.length>=5?t.error("Expected 3 or 4 arguments, but found "+(n.length-1)+" instead."):(r=t.parse(n[1],1,l),u=t.parse(n[2],2,i),!r||!u)?null:hy(r.type,[bi(l),a,l])?n.length===4?(f=t.parse(n[3],3,i),!f)?null:new cu(r.type,r,u,f):new cu(r.type,r,u):t.error("Expected first argument to be of type array or string, but found "+g(r.type)+" instead")};cu.prototype.evaluate=function(n){var t=this.input.evaluate(n),i=this.beginIndex.evaluate(n),r;if(!ws(t,["string","array"]))throw new at("Expected first argument to be of type array or string, but found "+g(et(t))+" instead.");return this.endIndex?(r=this.endIndex.evaluate(n),t.slice(i,r)):t.slice(i)};cu.prototype.eachChild=function(n){n(this.input);n(this.beginIndex);this.endIndex&&n(this.endIndex)};cu.prototype.outputDefined=function(){return!1};cu.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==undefined){var n=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),n]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var dot=no("==",sot,kd),got=no("!=",hot,yot),nst=no("<",cot,pot),tst=no(">",lot,wot),ist=no("<=",aot,bot),rst=no(">=",vot,kot),yf=function(n,t,i,r,u){this.type=a;this.number=n;this.locale=t;this.currency=i;this.minFractionDigits=r;this.maxFractionDigits=u};yf.parse=function(n,t){var s,r,u,f,e,o;return n.length!==3?t.error("Expected two arguments."):(s=t.parse(n[1],1,i),!s)?null:(r=n[2],typeof r!="object"||Array.isArray(r))?t.error("NumberFormat options argument must be an object."):(u=null,r.locale&&(u=t.parse(r.locale,1,a),!u))?null:(f=null,r.currency&&(f=t.parse(r.currency,1,a),!f))?null:(e=null,r["min-fraction-digits"]&&(e=t.parse(r["min-fraction-digits"],1,i),!e))?null:(o=null,r["max-fraction-digits"]&&(o=t.parse(r["max-fraction-digits"],1,i),!o))?null:new yf(s,u,f,e,o)};yf.prototype.evaluate=function(n){return new Intl.NumberFormat(this.locale?this.locale.evaluate(n):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(n):undefined,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(n):undefined,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(n):undefined}).format(this.number.evaluate(n))};yf.prototype.eachChild=function(n){n(this.number);this.locale&&n(this.locale);this.currency&&n(this.currency);this.minFractionDigits&&n(this.minFractionDigits);this.maxFractionDigits&&n(this.maxFractionDigits)};yf.prototype.outputDefined=function(){return!1};yf.prototype.serialize=function(){var n={};return this.locale&&(n.locale=this.locale.serialize()),this.currency&&(n.currency=this.currency.serialize()),this.minFractionDigits&&(n["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(n["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),n]};tf=function(n){this.type=i;this.input=n};tf.parse=function(n,t){if(n.length!==2)return t.error("Expected 1 argument, but found "+(n.length-1)+" instead.");var i=t.parse(n[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?t.error("Expected argument of type string or array, but found "+g(i.type)+" instead."):new tf(i):null};tf.prototype.evaluate=function(n){var t=this.input.evaluate(n);if(typeof t=="string"||Array.isArray(t))return t.length;throw new at("Expected value to be of type string or array, but found "+g(et(t))+" instead.");};tf.prototype.eachChild=function(n){n(this.input)};tf.prototype.outputDefined=function(){return!1};tf.prototype.serialize=function(){var n=["length"];return this.eachChild(function(t){n.push(t.serialize())}),n};pf={"==":dot,"!=":got,">":tst,"<":nst,">=":rst,"<=":ist,array:ni,at:ku,boolean:ni,"case":nf,coalesce:lr,collator:uu,format:hr,image:iu,"in":du,"index-of":hu,interpolate:bt,"interpolate-hcl":bt,"interpolate-lab":bt,length:tf,"let":su,literal:ki,match:gu,number:ni,"number-format":yf,object:ni,slice:cu,step:cr,string:ni,"to-boolean":yi,"to-color":yi,"to-number":yi,"to-string":yi,"var":eu,within:di};wt.register(pf,{error:[{kind:"error"},[a],function(n,t){var i=t[0];throw new at(i.evaluate(n));}],"typeof":[a,[l],function(n,t){var i=t[0];return g(et(i.evaluate(n)))}],"to-rgba":[bi(i,4),[sr],function(n,t){var i=t[0];return i.evaluate(n).toArray()}],rgb:[sr,[i,i,i],dd],rgba:[sr,[i,i,i,i],dd],has:{type:c,overloads:[[[a],function(n,t){var i=t[0];return gd(i.evaluate(n),n.properties())}],[[a,ke],function(n,t){var i=t[0],r=t[1];return gd(i.evaluate(n),r.evaluate(n))}]]},get:{type:l,overloads:[[[a],function(n,t){var i=t[0];return dy(i.evaluate(n),n.properties())}],[[a,ke],function(n,t){var i=t[0],r=t[1];return dy(i.evaluate(n),r.evaluate(n))}]]},"feature-state":[l,[a],function(n,t){var i=t[0];return dy(i.evaluate(n),n.featureState||{})}],properties:[ke,[],function(n){return n.properties()}],"geometry-type":[a,[],function(n){return n.geometryType()}],id:[l,[],function(n){return n.id()}],zoom:[i,[],function(n){return n.globals.zoom}],"heatmap-density":[i,[],function(n){return n.globals.heatmapDensity||0}],"line-progress":[i,[],function(n){return n.globals.lineProgress||0}],accumulated:[l,[],function(n){return n.globals.accumulated===undefined?null:n.globals.accumulated}],"+":[i,wf(i),function(n,t){for(var f,r=0,i=0,u=t;i<u.length;i+=1)f=u[i],r+=f.evaluate(n);return r}],"*":[i,wf(i),function(n,t){for(var f,r=1,i=0,u=t;i<u.length;i+=1)f=u[i],r*=f.evaluate(n);return r}],"-":{type:i,overloads:[[[i,i],function(n,t){var i=t[0],r=t[1];return i.evaluate(n)-r.evaluate(n)}],[[i],function(n,t){var i=t[0];return-i.evaluate(n)}]]},"/":[i,[i,i],function(n,t){var i=t[0],r=t[1];return i.evaluate(n)/r.evaluate(n)}],"%":[i,[i,i],function(n,t){var i=t[0],r=t[1];return i.evaluate(n)%r.evaluate(n)}],ln2:[i,[],function(){return Math.LN2}],pi:[i,[],function(){return Math.PI}],e:[i,[],function(){return Math.E}],"^":[i,[i,i],function(n,t){var i=t[0],r=t[1];return Math.pow(i.evaluate(n),r.evaluate(n))}],sqrt:[i,[i],function(n,t){var i=t[0];return Math.sqrt(i.evaluate(n))}],log10:[i,[i],function(n,t){var i=t[0];return Math.log(i.evaluate(n))/Math.LN10}],ln:[i,[i],function(n,t){var i=t[0];return Math.log(i.evaluate(n))}],log2:[i,[i],function(n,t){var i=t[0];return Math.log(i.evaluate(n))/Math.LN2}],sin:[i,[i],function(n,t){var i=t[0];return Math.sin(i.evaluate(n))}],cos:[i,[i],function(n,t){var i=t[0];return Math.cos(i.evaluate(n))}],tan:[i,[i],function(n,t){var i=t[0];return Math.tan(i.evaluate(n))}],asin:[i,[i],function(n,t){var i=t[0];return Math.asin(i.evaluate(n))}],acos:[i,[i],function(n,t){var i=t[0];return Math.acos(i.evaluate(n))}],atan:[i,[i],function(n,t){var i=t[0];return Math.atan(i.evaluate(n))}],min:[i,wf(i),function(n,t){return Math.min.apply(Math,t.map(function(t){return t.evaluate(n)}))}],max:[i,wf(i),function(n,t){return Math.max.apply(Math,t.map(function(t){return t.evaluate(n)}))}],abs:[i,[i],function(n,t){var i=t[0];return Math.abs(i.evaluate(n))}],round:[i,[i],function(n,t){var r=t[0],i=r.evaluate(n);return i<0?-Math.round(-i):Math.round(i)}],floor:[i,[i],function(n,t){var i=t[0];return Math.floor(i.evaluate(n))}],ceil:[i,[i],function(n,t){var i=t[0];return Math.ceil(i.evaluate(n))}],"filter-==":[c,[a,l],function(n,t){var i=t[0],r=t[1];return n.properties()[i.value]===r.value}],"filter-id-==":[c,[l],function(n,t){var i=t[0];return n.id()===i.value}],"filter-type-==":[c,[a],function(n,t){var i=t[0];return n.geometryType()===i.value}],"filter-<":[c,[a,l],function(n,t){var u=t[0],f=t[1],i=n.properties()[u.value],r=f.value;return typeof i==typeof r&&i<r}],"filter-id-<":[c,[l],function(n,t){var u=t[0],i=n.id(),r=u.value;return typeof i==typeof r&&i<r}],"filter->":[c,[a,l],function(n,t){var u=t[0],f=t[1],i=n.properties()[u.value],r=f.value;return typeof i==typeof r&&i>r}],"filter-id->":[c,[l],function(n,t){var u=t[0],i=n.id(),r=u.value;return typeof i==typeof r&&i>r}],"filter-<=":[c,[a,l],function(n,t){var u=t[0],f=t[1],i=n.properties()[u.value],r=f.value;return typeof i==typeof r&&i<=r}],"filter-id-<=":[c,[l],function(n,t){var u=t[0],i=n.id(),r=u.value;return typeof i==typeof r&&i<=r}],"filter->=":[c,[a,l],function(n,t){var u=t[0],f=t[1],i=n.properties()[u.value],r=f.value;return typeof i==typeof r&&i>=r}],"filter-id->=":[c,[l],function(n,t){var u=t[0],i=n.id(),r=u.value;return typeof i==typeof r&&i>=r}],"filter-has":[c,[l],function(n,t){var i=t[0];return i.value in n.properties()}],"filter-has-id":[c,[],function(n){return n.id()!==null&&n.id()!==undefined}],"filter-type-in":[c,[bi(a)],function(n,t){var i=t[0];return i.value.indexOf(n.geometryType())>=0}],"filter-id-in":[c,[bi(l)],function(n,t){var i=t[0];return i.value.indexOf(n.id())>=0}],"filter-in-small":[c,[a,bi(l)],function(n,t){var i=t[0],r=t[1];return r.value.indexOf(n.properties()[i.value])>=0}],"filter-in-large":[c,[a,bi(l)],function(n,t){var r=t[0],i=t[1];return ust(n.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:c,overloads:[[[c,c],function(n,t){var i=t[0],r=t[1];return i.evaluate(n)&&r.evaluate(n)}],[wf(c),function(n,t){for(var u,i=0,r=t;i<r.length;i+=1)if(u=r[i],!u.evaluate(n))return!1;return!0}]]},any:{type:c,overloads:[[[c,c],function(n,t){var i=t[0],r=t[1];return i.evaluate(n)||r.evaluate(n)}],[wf(c),function(n,t){for(var u,i=0,r=t;i<r.length;i+=1)if(u=r[i],u.evaluate(n))return!0;return!1}]]},"!":[c,[c],function(n,t){var i=t[0];return!i.evaluate(n)}],"is-supported-script":[c,[a],function(n,t){var r=t[0],i=n.globals&&n.globals.isSupportedScript;return i?i(r.evaluate(n)):!0}],upcase:[a,[a],function(n,t){var i=t[0];return i.evaluate(n).toUpperCase()}],downcase:[a,[a],function(n,t){var i=t[0];return i.evaluate(n).toLowerCase()}],concat:[a,wf(l),function(n,t){return t.map(function(t){return bs(t.evaluate(n))}).join("")}],"resolved-locale":[a,[vc],function(n,t){var i=t[0];return i.evaluate(n).resolvedLocale()}]});ro=function(n,t){this.expression=n;this._warningHistory={};this._evaluator=new ru;this._defaultValue=t?ast(t):null;this._enumValues=t&&t.type==="enum"?t.values:null};ro.prototype.evaluateWithoutErrorHandling=function(n,t,i,r,u,f){return this._evaluator.globals=n,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=f,this.expression.evaluate(this._evaluator)};ro.prototype.evaluate=function(n,t,i,r,u,f){this._evaluator.globals=n;this._evaluator.feature=t||null;this._evaluator.featureState=i||null;this._evaluator.canonical=r;this._evaluator.availableImages=u||null;this._evaluator.formattedSection=f||null;try{var e=this.expression.evaluate(this._evaluator);if(e===null||e===undefined||typeof e=="number"&&e!==e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new at("Expected value to be one of "+Object.keys(this._enumValues).map(function(n){return JSON.stringify(n)}).join(", ")+", but found "+JSON.stringify(e)+" instead.");return e}catch(o){return this._warningHistory[o.message]||(this._warningHistory[o.message]=!0,typeof console!="undefined"&&console.warn(o.message)),this._defaultValue}};bf=function(n,t){this.kind=n;this._styleExpression=t;this.isStateDependent=n!=="constant"&&!ks(t.expression)};bf.prototype.evaluateWithoutErrorHandling=function(n,t,i,r,u,f){return this._styleExpression.evaluateWithoutErrorHandling(n,t,i,r,u,f)};bf.prototype.evaluate=function(n,t,i,r,u,f){return this._styleExpression.evaluate(n,t,i,r,u,f)};rf=function(n,t,i,r){this.kind=n;this.zoomStops=i;this._styleExpression=t;this.isStateDependent=n!=="camera"&&!ks(t.expression);this.interpolationType=r};rf.prototype.evaluateWithoutErrorHandling=function(n,t,i,r,u,f){return this._styleExpression.evaluateWithoutErrorHandling(n,t,i,r,u,f)};rf.prototype.evaluate=function(n,t,i,r,u,f){return this._styleExpression.evaluate(n,t,i,r,u,f)};rf.prototype.interpolationFactor=function(n,t,i){return this.interpolationType?bt.interpolationFactor(this.interpolationType,n,t,i):0};uo=function(n,t){this._parameters=n;this._specification=t;we(this,tg(this._parameters,this._specification))};uo.deserialize=function(n){return new uo(n._parameters,n._specification)};uo.serialize=function(n){return{_parameters:n._parameters,_specification:n._specification}};og={type:"boolean","default":!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};up={promoteId:bst};fp={"*":function(){return[]},array:ug,boolean:vst,number:fg,color:yst,constants:kk,"enum":fl,filter:rp,"function":eg,layer:pg,object:rr,source:wg,light:bg,string:eo,formatted:kst,resolvedImage:dst};kf.source=oo(wg);kf.light=oo(bg);kf.layer=oo(pg);kf.filter=oo(rp);kf.paintProperty=oo(vg);kf.layoutProperty=oo(yg);var th=kf,nht=th.light,tht=th.paintProperty,iht=th.layoutProperty;df=ar;lu=3;ar.prototype.insert=function(n,t,i,r,u){this._forEachCell(t,i,r,u,this._insertCell,this.uid++);this.keys.push(n);this.bboxes.push(t);this.bboxes.push(i);this.bboxes.push(r);this.bboxes.push(u)};ar.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer.";};ar.prototype._insertCell=function(n,t,i,r,u,f){this.cells[u].push(f)};ar.prototype.query=function(n,t,i,r,u){var e=this.min,o=this.max,f,s;return n<=e&&t<=e&&o<=i&&o<=r&&!u?Array.prototype.slice.call(this.keys):(f=[],s={},this._forEachCell(n,t,i,r,this._queryCell,f,s,u),f)};ar.prototype._queryCell=function(n,t,i,r,u,f,e,o){var a=this.cells[u],v,s,l,c,h;if(a!==null)for(v=this.keys,s=this.bboxes,l=0;l<a.length;l++)c=a[l],e[c]===undefined&&(h=c*4,(o?o(s[h+0],s[h+1],s[h+2],s[h+3]):n<=s[h+2]&&t<=s[h+3]&&i>=s[h+0]&&r>=s[h+1])?(e[c]=!0,f.push(v[c])):e[c]=!1)};ar.prototype._forEachCell=function(n,t,i,r,u,f,e,o){for(var s,c,l=this._convertToCellCoord(n),a=this._convertToCellCoord(t),v=this._convertToCellCoord(i),y=this._convertToCellCoord(r),h=l;h<=v;h++)for(s=a;s<=y;s++)if((c=this.d*s+h,!o||o(this._convertFromCellCoord(h),this._convertFromCellCoord(s),this._convertFromCellCoord(h+1),this._convertFromCellCoord(s+1)))&&u.call(this,n,t,i,r,c,f,e,o))return};ar.prototype._convertFromCellCoord=function(n){return(n-this.padding)/this.scale};ar.prototype._convertToCellCoord=function(n){return Math.max(0,Math.min(this.d-1,Math.floor(n*this.scale)+this.padding))};ar.prototype.toArrayBuffer=function(){var u,n,t,i,f;if(this.arrayBuffer)return this.arrayBuffer;var r=this.cells,e=lu+this.cells.length+1+1,o=0;for(u=0;u<this.cells.length;u++)o+=this.cells[u].length;for(n=new Int32Array(e+o+this.keys.length+this.bboxes.length),n[0]=this.extent,n[1]=this.n,n[2]=this.padding,t=e,i=0;i<r.length;i++)f=r[i],n[lu+i]=t,n.set(f,t),t+=f.length;return n[lu+r.length]=t,n.set(this.keys,t),t+=this.keys.length,n[lu+r.length+1]=t,n.set(this.bboxes,t),t+=this.bboxes.length,n.buffer};var gg=e.ImageData,nn=e.ImageBitmap,ih={};f("Object",Object);df.serialize=function(n,t){var i=n.toArrayBuffer();return t&&t.push(i),{buffer:i}};df.deserialize=function(n){return new df(n.buffer)};f("Grid",df);f("Color",y);f("Error",Error);f("ResolvedImage",ui);f("StylePropertyFunction",uo);f("StyleExpression",ro,{omit:["_evaluator"]});f("ZoomDependentExpression",rf);f("ZoomConstantExpression",bf);f("CompoundExpression",wt,{omit:["_evaluate"]});for(hl in pf)pf[hl]._classRegistryKey||f("Expression_"+hl,pf[hl]);cl=function(){this.first=!0};cl.prototype.update=function(n,t){var i=Math.floor(n);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=n,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),n!==this.lastZoom)?(this.lastZoom=n,this.lastFloorZoom=i,!0):!1};r={"Latin-1 Supplement":function(n){return n>=128&&n<=255},Arabic:function(n){return n>=1536&&n<=1791},"Arabic Supplement":function(n){return n>=1872&&n<=1919},"Arabic Extended-A":function(n){return n>=2208&&n<=2303},"Hangul Jamo":function(n){return n>=4352&&n<=4607},"Unified Canadian Aboriginal Syllabics":function(n){return n>=5120&&n<=5759},Khmer:function(n){return n>=6016&&n<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(n){return n>=6320&&n<=6399},"General Punctuation":function(n){return n>=8192&&n<=8303},"Letterlike Symbols":function(n){return n>=8448&&n<=8527},"Number Forms":function(n){return n>=8528&&n<=8591},"Miscellaneous Technical":function(n){return n>=8960&&n<=9215},"Control Pictures":function(n){return n>=9216&&n<=9279},"Optical Character Recognition":function(n){return n>=9280&&n<=9311},"Enclosed Alphanumerics":function(n){return n>=9312&&n<=9471},"Geometric Shapes":function(n){return n>=9632&&n<=9727},"Miscellaneous Symbols":function(n){return n>=9728&&n<=9983},"Miscellaneous Symbols and Arrows":function(n){return n>=11008&&n<=11263},"CJK Radicals Supplement":function(n){return n>=11904&&n<=12031},"Kangxi Radicals":function(n){return n>=12032&&n<=12255},"Ideographic Description Characters":function(n){return n>=12272&&n<=12287},"CJK Symbols and Punctuation":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},"Hangul Compatibility Jamo":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},"Bopomofo Extended":function(n){return n>=12704&&n<=12735},"CJK Strokes":function(n){return n>=12736&&n<=12783},"Katakana Phonetic Extensions":function(n){return n>=12784&&n<=12799},"Enclosed CJK Letters and Months":function(n){return n>=12800&&n<=13055},"CJK Compatibility":function(n){return n>=13056&&n<=13311},"CJK Unified Ideographs Extension A":function(n){return n>=13312&&n<=19903},"Yijing Hexagram Symbols":function(n){return n>=19904&&n<=19967},"CJK Unified Ideographs":function(n){return n>=19968&&n<=40959},"Yi Syllables":function(n){return n>=40960&&n<=42127},"Yi Radicals":function(n){return n>=42128&&n<=42191},"Hangul Jamo Extended-A":function(n){return n>=43360&&n<=43391},"Hangul Syllables":function(n){return n>=44032&&n<=55215},"Hangul Jamo Extended-B":function(n){return n>=55216&&n<=55295},"Private Use Area":function(n){return n>=57344&&n<=63743},"CJK Compatibility Ideographs":function(n){return n>=63744&&n<=64255},"Arabic Presentation Forms-A":function(n){return n>=64336&&n<=65023},"Vertical Forms":function(n){return n>=65040&&n<=65055},"CJK Compatibility Forms":function(n){return n>=65072&&n<=65103},"Small Form Variants":function(n){return n>=65104&&n<=65135},"Arabic Presentation Forms-B":function(n){return n>=65136&&n<=65279},"Halfwidth and Fullwidth Forms":function(n){return n>=65280&&n<=65519}};var fr={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},sp=null,ci=fr.unavailable,uf=null,en=function(n){n&&typeof n=="string"&&n.indexOf("NetworkError")>-1&&(ci=fr.error);sp&&sp(n)};var cp=new tu,lp=function(){return ci},lht=function(n){n({pluginStatus:ci,pluginURL:uf});cp.on("pluginStateChange",n);return n},aht=function(n,t,i){if(i===void 0&&(i=!1),ci===fr.deferred||ci===fr.loading||ci===fr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");uf=ye.resolveURL(n);ci=fr.deferred;sp=t;hp();i||on()},on=function(){if(ci!==fr.deferred||!uf)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ci=fr.loading;hp();uf&&uy({url:uf},function(n){n?en(n):(ci=fr.loaded,hp())})},pi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ci===fr.loaded||pi.applyArabicShaping!=null},isLoading:function(){return ci===fr.loading},setState:function(n){ci=n.pluginStatus;uf=n.pluginURL},isParsed:function(){return pi.applyArabicShaping!=null&&pi.processBidirectionalText!=null&&pi.processStyledBidirectionalText!=null},getPluginURL:function(){return uf}},vht=function(){pi.isLoading()||pi.isLoaded()||lp()!=="deferred"||on()},w=function(n,t){this.zoom=n;t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new cl,this.transition={})};w.prototype.isSupportedScript=function(n){return cht(n,pi.isLoaded())};w.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};w.prototype.getCrossfadeParameters=function(){var n=this.zoom,t=n-Math.floor(n),i=this.crossFadingFactor();return n>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}};gf=function(n,t){this.property=n;this.value=t;this.expression=cst(t===undefined?n.specification.default:t,n.specification)};gf.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"};gf.prototype.possiblyEvaluate=function(n,t,i){return this.property.possiblyEvaluate(this,n,t,i)};so=function(n){this.property=n;this.value=new gf(n,undefined)};so.prototype.transitioned=function(n,t){return new ll(this.property,this.value,t,ri({},n.transition,this.transition),n.now)};so.prototype.untransitioned=function(){return new ll(this.property,this.value,null,{},0)};vr=function(n){this._properties=n;this._values=Object.create(n.defaultTransitionablePropertyValues)};vr.prototype.getValue=function(n){return kr(this._values[n].value.value)};vr.prototype.setValue=function(n,t){this._values.hasOwnProperty(n)||(this._values[n]=new so(this._values[n].property));this._values[n].value=new gf(this._values[n].property,t===null?undefined:kr(t))};vr.prototype.getTransition=function(n){return kr(this._values[n].transition)};vr.prototype.setTransition=function(n,t){this._values.hasOwnProperty(n)||(this._values[n]=new so(this._values[n].property));this._values[n].transition=kr(t)||undefined};vr.prototype.serialize=function(){for(var n,r,u,t={},i=0,f=Object.keys(this._values);i<f.length;i+=1)n=f[i],r=this.getValue(n),r!==undefined&&(t[n]=r),u=this.getTransition(n),u!==undefined&&(t[n+"-transition"]=u);return t};vr.prototype.transitioned=function(n,t){for(var i,u=new fh(this._properties),r=0,f=Object.keys(this._values);r<f.length;r+=1)i=f[r],u._values[i]=this._values[i].transitioned(n,t._values[i]);return u};vr.prototype.untransitioned=function(){for(var t,i=new fh(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1)t=r[n],i._values[t]=this._values[t].untransitioned();return i};ll=function(n,t,i,r,u){this.property=n;this.value=t;this.begin=u+r.delay||0;this.end=this.begin+r.duration||0;n.specification.transition&&(r.delay||r.duration)&&(this.prior=i)};ll.prototype.possiblyEvaluate=function(n,t,i){var u=n.now||0,r=this.value.possiblyEvaluate(n,t,i),f=this.prior,e;return f?u>this.end?(this.prior=null,r):this.value.isDataDriven()?(this.prior=null,r):u<this.begin?f.possiblyEvaluate(n,t,i):(e=(u-this.begin)/(this.end-this.begin),this.property.interpolate(f.possiblyEvaluate(n,t,i),r,eut(e))):r};fh=function(n){this._properties=n;this._values=Object.create(n.defaultTransitioningPropertyValues)};fh.prototype.possiblyEvaluate=function(n,t,i){for(var u,f=new co(this._properties),r=0,e=Object.keys(this._values);r<e.length;r+=1)u=e[r],f._values[u]=this._values[u].possiblyEvaluate(n,t,i);return f};fh.prototype.hasTransition=function(){for(var i,n=0,t=Object.keys(this._values);n<t.length;n+=1)if(i=t[n],this._values[i].prior)return!0;return!1};ho=function(n){this._properties=n;this._values=Object.create(n.defaultPropertyValues)};ho.prototype.getValue=function(n){return kr(this._values[n].value)};ho.prototype.setValue=function(n,t){this._values[n]=new gf(this._values[n].property,t===null?undefined:kr(t))};ho.prototype.serialize=function(){for(var t,i,r={},n=0,u=Object.keys(this._values);n<u.length;n+=1)t=u[n],i=this.getValue(t),i!==undefined&&(r[t]=i);return r};ho.prototype.possiblyEvaluate=function(n,t,i){for(var u,f=new co(this._properties),r=0,e=Object.keys(this._values);r<e.length;r+=1)u=e[r],f._values[u]=this._values[u].possiblyEvaluate(n,t,i);return f};fi=function(n,t,i){this.property=n;this.value=t;this.parameters=i};fi.prototype.isConstant=function(){return this.value.kind==="constant"};fi.prototype.constantOr=function(n){return this.value.kind==="constant"?this.value.value:n};fi.prototype.evaluate=function(n,t,i,r){return this.property.evaluate(this.value,this.parameters,n,t,i,r)};co=function(n){this._properties=n;this._values=Object.create(n.defaultPossiblyEvaluatedValues)};co.prototype.get=function(n){return this._values[n]};o=function(n){this.specification=n};o.prototype.possiblyEvaluate=function(n,t){return n.expression.evaluate(t)};o.prototype.interpolate=function(n,t,i){var r=nl[this.specification.type];return r?r(n,t,i):n};s=function(n,t){this.specification=n;this.overrides=t};s.prototype.possiblyEvaluate=function(n,t,i,r){return n.expression.kind==="constant"||n.expression.kind==="camera"?new fi(this,{kind:"constant",value:n.expression.evaluate(t,null,{},i,r)},t):new fi(this,n.expression,t)};s.prototype.interpolate=function(n,t,i){if(n.value.kind!=="constant"||t.value.kind!=="constant")return n;if(n.value.value===undefined||t.value.value===undefined)return new fi(this,{kind:"constant",value:undefined},n.parameters);var r=nl[this.specification.type];return r?new fi(this,{kind:"constant",value:r(n.value.value,t.value.value,i)},n.parameters):n};s.prototype.evaluate=function(n,t,i,r,u,f){return n.kind==="constant"?n.value:n.evaluate(t,i,r,u,f)};eh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(n,t,i,r){var e;if(n.value===undefined)return new fi(this,{kind:"constant",value:undefined},t);if(n.expression.kind==="constant"){var u=n.expression.evaluate(t,null,{},i,r),o=n.property.specification.type==="resolvedImage",f=o&&typeof u!="string"?u.name:u,s=this._calculate(f,f,f,t);return new fi(this,{kind:"constant",value:s},t)}return n.expression.kind==="camera"?(e=this._calculate(n.expression.evaluate({zoom:t.zoom-1}),n.expression.evaluate({zoom:t.zoom}),n.expression.evaluate({zoom:t.zoom+1}),t),new fi(this,{kind:"constant",value:e},t)):new fi(this,n.expression,t)},t.prototype.evaluate=function(n,t,i,r,u,f){if(n.kind==="source"){var e=n.evaluate(t,i,r,u,f);return this._calculate(e,e,e,t)}return n.kind==="composite"?this._calculate(n.evaluate({zoom:Math.floor(t.zoom)-1},i,r),n.evaluate({zoom:Math.floor(t.zoom)},i,r),n.evaluate({zoom:Math.floor(t.zoom)+1},i,r),t):n.value},t.prototype._calculate=function(n,t,i,r){var u=r.zoom;return u>r.zoomHistory.lastIntegerZoom?{from:n,to:t}:{from:i,to:t}},t.prototype.interpolate=function(n){return n},t}(s);ne=function(n){this.specification=n};ne.prototype.possiblyEvaluate=function(n,t,i,r){if(n.value===undefined)return undefined;if(n.expression.kind==="constant"){var u=n.expression.evaluate(t,null,{},i,r);return this._calculate(u,u,u,t)}return this._calculate(n.expression.evaluate(new w(Math.floor(t.zoom-1),t)),n.expression.evaluate(new w(Math.floor(t.zoom),t)),n.expression.evaluate(new w(Math.floor(t.zoom+1),t)),t)};ne.prototype._calculate=function(n,t,i,r){var u=r.zoom;return u>r.zoomHistory.lastIntegerZoom?{from:n,to:t}:{from:i,to:t}};ne.prototype.interpolate=function(n){return n};lo=function(n){this.specification=n};lo.prototype.possiblyEvaluate=function(n,t,i,r){return!!n.expression.evaluate(t,null,{},i,r)};lo.prototype.interpolate=function(){return!1};ei=function(n){var t,i,r,u;this.properties=n;this.defaultPropertyValues={};this.defaultTransitionablePropertyValues={};this.defaultTransitioningPropertyValues={};this.defaultPossiblyEvaluatedValues={};this.overridableProperties=[];for(t in n)i=n[t],i.specification.overridable&&this.overridableProperties.push(t),r=this.defaultPropertyValues[t]=new gf(i,undefined),u=this.defaultTransitionablePropertyValues[t]=new so(i),this.defaultTransitioningPropertyValues[t]=u.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})};f("DataDrivenProperty",s);f("DataConstantProperty",o);f("CrossFadedDataDrivenProperty",eh);f("CrossFadedProperty",ne);f("ColorRampProperty",lo);var al="-transition",yr=function(n){function i(t,i){var r,u;if((n.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},t.type!=="custom")&&(t=t,this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),i.layout&&(this._unevaluatedLayout=new ho(i.layout)),i.paint)){this._transitionablePaint=new vr(i.paint);for(r in t.paint)this.setPaintProperty(r,t.paint[r],{validate:!1});for(u in t.layout)this.setLayoutProperty(u,t.layout[u],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned();this.paint=new co(i.paint)}}return n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i,i.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},i.prototype.getLayoutProperty=function(n){return n==="visibility"?this.visibility:this._unevaluatedLayout.getValue(n)},i.prototype.setLayoutProperty=function(n,t,i){if(i===void 0&&(i={}),t!==null&&t!==undefined){var r="layers."+this.id+".layout."+n;if(this._validate(iht,r,n,t,i))return}if(n==="visibility"){this.visibility=t;return}this._unevaluatedLayout.setValue(n,t)},i.prototype.getPaintProperty=function(n){return yv(n,al)?this._transitionablePaint.getTransition(n.slice(0,-al.length)):this._transitionablePaint.getValue(n)},i.prototype.setPaintProperty=function(n,t,i){var f,u,e;if(i===void 0&&(i={}),t!==null&&t!==undefined&&(f="layers."+this.id+".paint."+n,this._validate(tht,f,n,t,i)))return!1;if(yv(n,al))return this._transitionablePaint.setTransition(n.slice(0,-al.length),t||undefined),!1;var r=this._transitionablePaint._values[n],o=r.property.specification["property-type"]==="cross-faded-data-driven",s=r.value.isDataDriven(),h=r.value;return this._transitionablePaint.setValue(n,t),this._handleSpecialPaintPropertyUpdate(n),u=this._transitionablePaint._values[n].value,e=u.isDataDriven(),e||s||o||this._handleOverridablePaintPropertyUpdate(n,h,u)},i.prototype._handleSpecialPaintPropertyUpdate=function(){},i.prototype._handleOverridablePaintPropertyUpdate=function(){return!1},i.prototype.isHidden=function(n){return this.minzoom&&n<this.minzoom?!0:this.maxzoom&&n>=this.maxzoom?!0:this.visibility==="none"},i.prototype.updateTransitions=function(n){this._transitioningPaint=this._transitionablePaint.transitioned(n,this._transitioningPaint)},i.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},i.prototype.recalculate=function(n,t){n.getCrossfadeParameters&&(this._crossfadeParameters=n.getCrossfadeParameters());this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(n,undefined,t));this.paint=this._transitioningPaint.possiblyEvaluate(n,undefined,t)},i.prototype.serialize=function(){var n={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&&(n.layout=n.layout||{},n.layout.visibility=this.visibility),gb(n,function(n,t){return n!==undefined&&!(t==="layout"&&!Object.keys(n).length)&&!(t==="paint"&&!Object.keys(n).length)})},i.prototype._validate=function(n,i,r,u,f){return(f===void 0&&(f={}),f&&f.validate===!1)?!1:dg(this,n.call(th,{key:i,layerType:this.type,objectKey:r,value:u,styleSpec:t,style:{glyphs:!0,sprite:!0}}))},i.prototype.is3D=function(){return!1},i.prototype.isTileClipped=function(){return!1},i.prototype.hasOffscreenPass=function(){return!1},i.prototype.resize=function(){},i.prototype.isStateDependent=function(){var t,n;for(t in this.paint._values)if((n=this.paint.get(t),n instanceof fi&&io(n.property.specification))&&(n.value.kind==="source"||n.value.kind==="composite")&&n.value.isStateDependent)return!0;return!1},i}(tu),yht={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},vl=function(n,t){this._structArray=n;this._pos1=t*this.size;this._pos2=this._pos1/2;this._pos4=this._pos1/4;this._pos8=this._pos1/8},pht=128,wht=5,d=function(){this.isTransferred=!1;this.capacity=-1;this.resize(0)};d.serialize=function(n,t){return n._trim(),t&&(n.isTransferred=!0,t.push(n.arrayBuffer)),{length:n.length,arrayBuffer:n.arrayBuffer}};d.deserialize=function(n){var t=Object.create(this.prototype);return t.arrayBuffer=n.arrayBuffer,t.length=n.length,t.capacity=n.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t};d.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())};d.prototype.clear=function(){this.length=0};d.prototype.resize=function(n){this.reserve(n);this.length=n};d.prototype.reserve=function(n){if(n>this.capacity){this.capacity=Math.max(n,Math.floor(this.capacity*wht),pht);this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews();t&&this.uint8.set(t)}};d.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout");};ao=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t){var i=this.length;return this.resize(i+1),this.emplace(i,n,t)},t.prototype.emplace=function(n,t,i){var r=n*2;return this.int16[r+0]=t,this.int16[r+1]=i,n},t}(d);ao.prototype.bytesPerElement=4;f("StructArrayLayout2i4",ao);yl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r){var u=this.length;return this.resize(u+1),this.emplace(u,n,t,i,r)},t.prototype.emplace=function(n,t,i,r,u){var f=n*4;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=r,this.int16[f+3]=u,n},t}(d);yl.prototype.bytesPerElement=8;f("StructArrayLayout4i8",yl);pl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f){var e=this.length;return this.resize(e+1),this.emplace(e,n,t,i,r,u,f)},t.prototype.emplace=function(n,t,i,r,u,f,e){var o=n*6;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=r,this.int16[o+3]=u,this.int16[o+4]=f,this.int16[o+5]=e,n},t}(d);pl.prototype.bytesPerElement=12;f("StructArrayLayout2i4i12",pl);wl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f){var e=this.length;return this.resize(e+1),this.emplace(e,n,t,i,r,u,f)},t.prototype.emplace=function(n,t,i,r,u,f,e){var s=n*4,o=n*8;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[o+4]=r,this.uint8[o+5]=u,this.uint8[o+6]=f,this.uint8[o+7]=e,n},t}(d);wl.prototype.bytesPerElement=8;f("StructArrayLayout2i4ub8",wl);vo=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t){var i=this.length;return this.resize(i+1),this.emplace(i,n,t)},t.prototype.emplace=function(n,t,i){var r=n*2;return this.float32[r+0]=t,this.float32[r+1]=i,n},t}(d);vo.prototype.bytesPerElement=8;f("StructArrayLayout2f8",vo);au=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f,e,o,s,h){var c=this.length;return this.resize(c+1),this.emplace(c,n,t,i,r,u,f,e,o,s,h)},t.prototype.emplace=function(n,t,i,r,u,f,e,o,s,h,c){var l=n*10;return this.uint16[l+0]=t,this.uint16[l+1]=i,this.uint16[l+2]=r,this.uint16[l+3]=u,this.uint16[l+4]=f,this.uint16[l+5]=e,this.uint16[l+6]=o,this.uint16[l+7]=s,this.uint16[l+8]=h,this.uint16[l+9]=c,n},t}(d);au.prototype.bytesPerElement=20;f("StructArrayLayout10ui20",au);bl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f,e,o,s,h,c,l){var a=this.length;return this.resize(a+1),this.emplace(a,n,t,i,r,u,f,e,o,s,h,c,l)},t.prototype.emplace=function(n,t,i,r,u,f,e,o,s,h,c,l,a){var v=n*12;return this.int16[v+0]=t,this.int16[v+1]=i,this.int16[v+2]=r,this.int16[v+3]=u,this.uint16[v+4]=f,this.uint16[v+5]=e,this.uint16[v+6]=o,this.uint16[v+7]=s,this.int16[v+8]=h,this.int16[v+9]=c,this.int16[v+10]=l,this.int16[v+11]=a,n},t}(d);bl.prototype.bytesPerElement=24;f("StructArrayLayout4i4ui4i24",bl);kl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,n,t,i)},t.prototype.emplace=function(n,t,i,r){var u=n*3;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=r,n},t}(d);kl.prototype.bytesPerElement=12;f("StructArrayLayout3f12",kl);dl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n){var t=this.length;return this.resize(t+1),this.emplace(t,n)},t.prototype.emplace=function(n,t){var i=n*1;return this.uint32[i+0]=t,n},t}(d);dl.prototype.bytesPerElement=4;f("StructArrayLayout1ul4",dl);gl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer);this.uint32=new Uint32Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f,e,o,s){var h=this.length;return this.resize(h+1),this.emplace(h,n,t,i,r,u,f,e,o,s)},t.prototype.emplace=function(n,t,i,r,u,f,e,o,s,h){var c=n*10,l=n*5;return this.int16[c+0]=t,this.int16[c+1]=i,this.int16[c+2]=r,this.int16[c+3]=u,this.int16[c+4]=f,this.int16[c+5]=e,this.uint32[l+3]=o,this.uint16[c+8]=s,this.uint16[c+9]=h,n},t}(d);gl.prototype.bytesPerElement=20;f("StructArrayLayout6i1ul2ui20",gl);oh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f){var e=this.length;return this.resize(e+1),this.emplace(e,n,t,i,r,u,f)},t.prototype.emplace=function(n,t,i,r,u,f,e){var o=n*6;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=r,this.int16[o+3]=u,this.int16[o+4]=f,this.int16[o+5]=e,n},t}(d);oh.prototype.bytesPerElement=12;f("StructArrayLayout2i2i2i12",oh);na=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u){var f=this.length;return this.resize(f+1),this.emplace(f,n,t,i,r,u)},t.prototype.emplace=function(n,t,i,r,u,f){var e=n*4,o=n*8;return this.float32[e+0]=t,this.float32[e+1]=i,this.float32[e+2]=r,this.int16[o+6]=u,this.int16[o+7]=f,n},t}(d);na.prototype.bytesPerElement=16;f("StructArrayLayout2f1f2i16",na);ta=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r){var u=this.length;return this.resize(u+1),this.emplace(u,n,t,i,r)},t.prototype.emplace=function(n,t,i,r,u){var f=n*12,e=n*3;return this.uint8[f+0]=t,this.uint8[f+1]=i,this.float32[e+1]=r,this.float32[e+2]=u,n},t}(d);ta.prototype.bytesPerElement=12;f("StructArrayLayout2ub2f12",ta);vu=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,n,t,i)},t.prototype.emplace=function(n,t,i,r){var u=n*3;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=r,n},t}(d);vu.prototype.bytesPerElement=6;f("StructArrayLayout3ui6",vu);ia=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer);this.uint32=new Uint32Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){var b=this.length;return this.resize(b+1),this.emplace(b,n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w)},t.prototype.emplace=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){var k=n*24,d=n*12,g=n*48;return this.int16[k+0]=t,this.int16[k+1]=i,this.uint16[k+2]=r,this.uint16[k+3]=u,this.uint32[d+2]=f,this.uint32[d+3]=e,this.uint32[d+4]=o,this.uint16[k+10]=s,this.uint16[k+11]=h,this.uint16[k+12]=c,this.float32[d+7]=l,this.float32[d+8]=a,this.uint8[g+36]=v,this.uint8[g+37]=y,this.uint8[g+38]=p,this.uint32[d+10]=w,this.int16[k+22]=b,n},t}(d);ia.prototype.bytesPerElement=48;f("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ia);ra=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer);this.uint32=new Uint32Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et){var ot=this.length;return this.resize(ot+1),this.emplace(ot,n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et)},t.prototype.emplace=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot){var st=n*34,ht=n*17;return this.int16[st+0]=t,this.int16[st+1]=i,this.int16[st+2]=r,this.int16[st+3]=u,this.int16[st+4]=f,this.int16[st+5]=e,this.int16[st+6]=o,this.int16[st+7]=s,this.uint16[st+8]=h,this.uint16[st+9]=c,this.uint16[st+10]=l,this.uint16[st+11]=a,this.uint16[st+12]=v,this.uint16[st+13]=y,this.uint16[st+14]=p,this.uint16[st+15]=w,this.uint16[st+16]=b,this.uint16[st+17]=k,this.uint16[st+18]=d,this.uint16[st+19]=g,this.uint16[st+20]=nt,this.uint16[st+21]=tt,this.uint16[st+22]=it,this.uint32[ht+12]=rt,this.float32[ht+13]=ut,this.float32[ht+14]=ft,this.float32[ht+15]=et,this.float32[ht+16]=ot,n},t}(d);ra.prototype.bytesPerElement=68;f("StructArrayLayout8i15ui1ul4f68",ra);sh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n){var t=this.length;return this.resize(t+1),this.emplace(t,n)},t.prototype.emplace=function(n,t){var i=n*1;return this.float32[i+0]=t,n},t}(d);sh.prototype.bytesPerElement=4;f("StructArrayLayout1f4",sh);ua=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,n,t,i)},t.prototype.emplace=function(n,t,i,r){var u=n*3;return this.int16[u+0]=t,this.int16[u+1]=i,this.int16[u+2]=r,n},t}(d);ua.prototype.bytesPerElement=6;f("StructArrayLayout3i6",ua);fa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.uint32=new Uint32Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,n,t,i)},t.prototype.emplace=function(n,t,i,r){var f=n*2,u=n*4;return this.uint32[f+0]=t,this.uint16[u+2]=i,this.uint16[u+3]=r,n},t}(d);fa.prototype.bytesPerElement=8;f("StructArrayLayout1ul2ui8",fa);yo=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t){var i=this.length;return this.resize(i+1),this.emplace(i,n,t)},t.prototype.emplace=function(n,t,i){var r=n*2;return this.uint16[r+0]=t,this.uint16[r+1]=i,n},t}(d);yo.prototype.bytesPerElement=4;f("StructArrayLayout2ui4",yo);ea=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n){var t=this.length;return this.resize(t+1),this.emplace(t,n)},t.prototype.emplace=function(n,t){var i=n*1;return this.uint16[i+0]=t,n},t}(d);ea.prototype.bytesPerElement=2;f("StructArrayLayout1ui2",ea);oa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(n,t,i,r){var u=this.length;return this.resize(u+1),this.emplace(u,n,t,i,r)},t.prototype.emplace=function(n,t,i,r,u){var f=n*4;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=r,this.float32[f+3]=u,n},t}(d);oa.prototype.bytesPerElement=16;f("StructArrayLayout4f16",oa);ap=function(n){function i(){n.apply(this,arguments)}n&&(i.__proto__=n);i.prototype=Object.create(n&&n.prototype);i.prototype.constructor=i;var t={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return t.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},t.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},t.x1.get=function(){return this._structArray.int16[this._pos2+2]},t.y1.get=function(){return this._structArray.int16[this._pos2+3]},t.x2.get=function(){return this._structArray.int16[this._pos2+4]},t.y2.get=function(){return this._structArray.int16[this._pos2+5]},t.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},t.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},t.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},t.anchorPoint.get=function(){return new h(this.anchorPointX,this.anchorPointY)},Object.defineProperties(i.prototype,t),i}(vl);ap.prototype.size=20;sa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return new ap(this,n)},t}(gl);f("CollisionBoxArray",sa);vp=function(n){function i(){n.apply(this,arguments)}n&&(i.__proto__=n);i.prototype=Object.create(n&&n.prototype);i.prototype.constructor=i;var t={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return t.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},t.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},t.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},t.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},t.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},t.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},t.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},t.segment.get=function(){return this._structArray.uint16[this._pos2+10]},t.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},t.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},t.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},t.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},t.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},t.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},t.placedOrientation.set=function(n){this._structArray.uint8[this._pos1+37]=n},t.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},t.hidden.set=function(n){this._structArray.uint8[this._pos1+38]=n},t.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},t.crossTileID.set=function(n){this._structArray.uint32[this._pos4+10]=n},t.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(i.prototype,t),i}(vl);vp.prototype.size=48;yp=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return new vp(this,n)},t}(ia);f("PlacedSymbolArray",yp);pp=function(n){function i(){n.apply(this,arguments)}n&&(i.__proto__=n);i.prototype=Object.create(n&&n.prototype);i.prototype.constructor=i;var t={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return t.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},t.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},t.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},t.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},t.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},t.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},t.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},t.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},t.key.get=function(){return this._structArray.uint16[this._pos2+8]},t.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},t.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},t.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},t.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},t.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},t.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},t.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},t.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},t.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},t.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},t.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},t.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},t.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},t.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},t.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},t.crossTileID.set=function(n){this._structArray.uint32[this._pos4+12]=n},t.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},t.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},t.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},t.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(i.prototype,t),i}(vl);pp.prototype.size=68;wp=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return new pp(this,n)},t}(ra);f("SymbolInstanceArray",wp);bp=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(n){return this.float32[n*1+0]},t}(sh);f("GlyphOffsetArray",bp);kp=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getx=function(n){return this.int16[n*3+0]},t.prototype.gety=function(n){return this.int16[n*3+1]},t.prototype.gettileUnitDistanceFromAnchor=function(n){return this.int16[n*3+2]},t}(ua);f("SymbolLineVertexArray",kp);dp=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n);t.prototype=Object.create(n&&n.prototype);t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,i),t}(vl);dp.prototype.size=8;gp=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return new dp(this,n)},t}(fa);f("FeatureIndexArray",gp);var kht=vt([{name:"a_pos",components:2,type:"Int16"}],4),dht=kht.members,st=function(n){n===void 0&&(n=[]);this.segments=n};st.prototype.prepareSegment=function(n,t,i,r){var u=this.segments[this.segments.length-1];return n>st.MAX_VERTEX_ARRAY_LENGTH&&gt("Max vertices per segment is "+st.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+n),(!u||u.vertexLength+n>st.MAX_VERTEX_ARRAY_LENGTH||u.sortKey!==r)&&(u={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},r!==undefined&&(u.sortKey=r),this.segments.push(u)),u};st.prototype.get=function(){return this.segments};st.prototype.destroy=function(){for(var i,r,n=0,t=this.segments;n<t.length;n+=1){i=t[n];for(r in i.vaos)i.vaos[r].destroy()}};st.simpleSegment=function(n,t,i,r){return new st([{vertexOffset:n,primitiveOffset:t,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])};st.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1;f("SegmentVector",st);var ha=vt([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),cn=tc(function(n){function t(n,t){var o,h,r,s,f,e,i,u;for(o=n.length&3,h=n.length-o,r=t,f=3432918353,e=461845907,u=0;u<h;)i=n.charCodeAt(u)&255|(n.charCodeAt(++u)&255)<<8|(n.charCodeAt(++u)&255)<<16|(n.charCodeAt(++u)&255)<<24,++u,i=(i&65535)*f+(((i>>>16)*f&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(i&65535)*e+(((i>>>16)*e&65535)<<16)&4294967295,r^=i,r=r<<13|r>>>19,s=(r&65535)*5+(((r>>>16)*5&65535)<<16)&4294967295,r=(s&65535)+27492+(((s>>>16)+58964&65535)<<16);i=0;switch(o){case 3:i^=(n.charCodeAt(u+2)&255)<<16;case 2:i^=(n.charCodeAt(u+1)&255)<<8;case 1:i^=n.charCodeAt(u)&255;i=(i&65535)*f+(((i>>>16)*f&65535)<<16)&4294967295;i=i<<15|i>>>17;i=(i&65535)*e+(((i>>>16)*e&65535)<<16)&4294967295;r^=i}return r^=n.length,r^=r>>>16,r=(r&65535)*2246822507+(((r>>>16)*2246822507&65535)<<16)&4294967295,r^=r>>>13,r=(r&65535)*3266489909+(((r>>>16)*3266489909&65535)<<16)&4294967295,r^=r>>>16,r>>>0}n.exports=t}),ght=tc(function(n){function t(n,t){for(var f=n.length,i=t^f,u=0,r;f>=4;)r=n.charCodeAt(u)&255|(n.charCodeAt(++u)&255)<<8|(n.charCodeAt(++u)&255)<<16|(n.charCodeAt(++u)&255)<<24,r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16),r^=r>>>24,r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16),i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16)^r,f-=4,++u;switch(f){case 3:i^=(n.charCodeAt(u+2)&255)<<16;case 2:i^=(n.charCodeAt(u+1)&255)<<8;case 1:i^=n.charCodeAt(u)&255;i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16)}return i^=i>>>13,i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16),i^=i>>>15,i>>>0}n.exports=t}),hh=cn,nct=cn,tct=ght;hh.murmur3=nct;hh.murmur2=tct;ff=function(){this.ids=[];this.positions=[];this.indexed=!1};ff.prototype.add=function(n,t,i,r){this.ids.push(an(n));this.positions.push(t,i,r)};ff.prototype.getPositions=function(n){for(var f=an(n),t=0,r=this.ids.length-1,i,u;t<r;)i=t+r>>1,this.ids[i]>=f?r=i:t=i+1;for(u=[];this.ids[t]===f;){var e=this.positions[3*t],o=this.positions[3*t+1],s=this.positions[3*t+2];u.push({index:e,start:o,end:s});t++}return u};ff.serialize=function(n,t){var i=new Float64Array(n.ids),r=new Uint32Array(n.positions);return nw(i,r,0,i.length-1),t&&t.push(i.buffer,r.buffer),{ids:i,positions:r}};ff.deserialize=function(n){var t=new ff;return t.ids=n.ids,t.positions=n.positions,t.indexed=!0,t};ln=Math.pow(2,53)-1;f("FeaturePositionMap",ff);var te=function(n,t){this.gl=n.gl;this.location=t},ict=function(n){function t(t,i){n.call(this,t,i);this.current=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){this.current!==n&&(this.current=n,this.gl.uniform1i(this.location,n))},t}(te),la=function(n){function t(t,i){n.call(this,t,i);this.current=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){this.current!==n&&(this.current=n,this.gl.uniform1f(this.location,n))},t}(te),rct=function(n){function t(t,i){n.call(this,t,i);this.current=[0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){(n[0]!==this.current[0]||n[1]!==this.current[1])&&(this.current=n,this.gl.uniform2f(this.location,n[0],n[1]))},t}(te),uct=function(n){function t(t,i){n.call(this,t,i);this.current=[0,0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){(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}(te),vn=function(n){function t(t,i){n.call(this,t,i);this.current=[0,0,0,0]}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){(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]))},t}(te),yn=function(n){function t(t,i){n.call(this,t,i);this.current=y.transparent}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){(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))},t}(te),fct=new Float32Array(16),ect=function(n){function t(t,i){n.call(this,t,i);this.current=fct}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){if(n[12]!==this.current[12]||n[0]!==this.current[0]){this.current=n;this.gl.uniformMatrix4fv(this.location,!1,n);return}for(var t=1;t<16;t++)if(n[t]!==this.current[t]){this.current=n;this.gl.uniformMatrix4fv(this.location,!1,n);break}},t}(te);ef=function(n,t,i){this.value=n;this.uniformNames=t.map(function(n){return"u_"+n});this.type=i};ef.prototype.setUniform=function(n,t,i){n.set(i.constantOr(this.value))};ef.prototype.getBinding=function(n,t){return this.type==="color"?new yn(n,t):new la(n,t)};pr=function(n,t){this.uniformNames=t.map(function(n){return"u_"+n});this.patternFrom=null;this.patternTo=null;this.pixelRatioFrom=1;this.pixelRatioTo=1};pr.prototype.setConstantPatternPositions=function(n,t){this.pixelRatioFrom=t.pixelRatio;this.pixelRatioTo=n.pixelRatio;this.patternFrom=t.tlbr;this.patternTo=n.tlbr};pr.prototype.setUniform=function(n,t,i,r){var u=r==="u_pattern_to"?this.patternTo:r==="u_pattern_from"?this.patternFrom:r==="u_pixel_ratio_to"?this.pixelRatioTo:r==="u_pixel_ratio_from"?this.pixelRatioFrom:null;u&&n.set(u)};pr.prototype.getBinding=function(n,t,i){return i.substr(0,9)==="u_pattern"?new vn(n,t):new la(n,t)};oi=function(n,t,i,r){this.expression=n;this.type=i;this.maxValue=0;this.paintVertexAttributes=t.map(function(n){return{name:"a_"+n,type:"Float32",components:i==="color"?2:1,offset:0}});this.paintVertexArray=new r};oi.prototype.populatePaintArray=function(n,t,i,r,u){var f=this.paintVertexArray.length,e=this.expression.evaluate(new w(0),t,{},r,[],u);this.paintVertexArray.resize(n);this._setPaintValue(f,n,e)};oi.prototype.updatePaintArray=function(n,t,i,r){var u=this.expression.evaluate({zoom:0},i,r);this._setPaintValue(n,t,u)};oi.prototype._setPaintValue=function(n,t,i){var f,r,u;if(this.type==="color")for(f=tw(i),r=n;r<t;r++)this.paintVertexArray.emplace(r,f[0],f[1]);else{for(u=n;u<t;u++)this.paintVertexArray.emplace(u,i);this.maxValue=Math.max(this.maxValue,Math.abs(i))}};oi.prototype.upload=function(n){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=n.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))};oi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};yt=function(n,t,i,r,u,f){this.expression=n;this.uniformNames=t.map(function(n){return"u_"+n+"_t"});this.type=i;this.useIntegerZoom=r;this.zoom=u;this.maxValue=0;this.paintVertexAttributes=t.map(function(n){return{name:"a_"+n,type:"Float32",components:i==="color"?4:2,offset:0}});this.paintVertexArray=new f};yt.prototype.populatePaintArray=function(n,t,i,r,u){var f=this.expression.evaluate(new w(this.zoom),t,{},r,[],u),e=this.expression.evaluate(new w(this.zoom+1),t,{},r,[],u),o=this.paintVertexArray.length;this.paintVertexArray.resize(n);this._setPaintValue(o,n,f,e)};yt.prototype.updatePaintArray=function(n,t,i,r){var u=this.expression.evaluate({zoom:this.zoom},i,r),f=this.expression.evaluate({zoom:this.zoom+1},i,r);this._setPaintValue(n,t,u,f)};yt.prototype._setPaintValue=function(n,t,i,r){var e,o,u,f;if(this.type==="color")for(e=tw(i),o=tw(r),u=n;u<t;u++)this.paintVertexArray.emplace(u,e[0],e[1],o[0],o[1]);else{for(f=n;f<t;f++)this.paintVertexArray.emplace(f,i,r);this.maxValue=Math.max(this.maxValue,Math.abs(i),Math.abs(r))}};yt.prototype.upload=function(n){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=n.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))};yt.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};yt.prototype.setUniform=function(n,t){var i=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,r=af(this.expression.interpolationFactor(i,this.zoom,this.zoom+1),0,1);n.set(r)};yt.prototype.getBinding=function(n,t){return new la(n,t)};li=function(n,t,i,r,u,f){this.expression=n;this.type=t;this.useIntegerZoom=i;this.zoom=r;this.layerId=f;this.zoomInPaintVertexArray=new u;this.zoomOutPaintVertexArray=new u};li.prototype.populatePaintArray=function(n,t,i){var r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(n);this.zoomOutPaintVertexArray.resize(n);this._setPaintValues(r,n,t.patterns&&t.patterns[this.layerId],i)};li.prototype.updatePaintArray=function(n,t,i,r,u){this._setPaintValues(n,t,i.patterns&&i.patterns[this.layerId],u)};li.prototype._setPaintValues=function(n,t,i,r){var o;if(r&&i){var s=i.min,h=i.mid,c=i.max,f=r[s],u=r[h],e=r[c];if(f&&u&&e)for(o=n;o<t;o++)this.zoomInPaintVertexArray.emplace(o,u.tl[0],u.tl[1],u.br[0],u.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1],u.pixelRatio,f.pixelRatio),this.zoomOutPaintVertexArray.emplace(o,u.tl[0],u.tl[1],u.br[0],u.br[1],e.tl[0],e.tl[1],e.br[0],e.br[1],u.pixelRatio,e.pixelRatio)}};li.prototype.upload=function(n){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=n.createVertexBuffer(this.zoomInPaintVertexArray,ha.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=n.createVertexBuffer(this.zoomOutPaintVertexArray,ha.members,this.expression.isStateDependent))};li.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy();this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};ti=function(n,t,i){var o,r,u,c,v;this.binders={};this._buffers=[];o=[];for(r in n.paint._values)if(i(r)&&(u=n.paint.get(r),u instanceof fi&&io(u.property.specification))){var s=oct(r,n.type),f=u.value,e=u.property.specification.type,l=u.property.useIntegerZoom,a=u.property.specification["property-type"],h=a==="cross-faded"||a==="cross-faded-data-driven";f.kind==="constant"?(this.binders[r]=h?new pr(f.value,s):new ef(f.value,s,e),o.push("/u_"+r)):f.kind==="source"||h?(c=pn(r,e,"source"),this.binders[r]=h?new li(f,e,l,t,c,n.id):new oi(f,s,e,c),o.push("/a_"+r)):(v=pn(r,e,"composite"),this.binders[r]=new yt(f,s,e,l,t,v),o.push("/z_"+r))}this.cacheKey=o.sort().join("")};ti.prototype.getMaxValue=function(n){var t=this.binders[n];return t instanceof oi||t instanceof yt?t.maxValue:0};ti.prototype.populatePaintArrays=function(n,t,i,r,u){var e,f;for(e in this.binders)f=this.binders[e],(f instanceof oi||f instanceof yt||f instanceof li)&&f.populatePaintArray(n,t,i,r,u)};ti.prototype.setConstantPatternPositions=function(n,t){var r,i;for(r in this.binders)i=this.binders[r],i instanceof pr&&i.setConstantPatternPositions(n,t)};ti.prototype.updatePaintArrays=function(n,t,i,r,u){var l=!1,s,a,e,h,o,v,c,f,y;for(s in n)for(a=t.getPositions(s),e=0,h=a;e<h.length;e+=1){o=h[e];v=i.feature(o.index);for(c in this.binders)f=this.binders[c],(f instanceof oi||f instanceof yt||f instanceof li)&&f.expression.isStateDependent===!0&&(y=r.paint.get(c),f.expression=y.value,f.updatePaintArray(o.start,o.end,v,n[s],u),l=!0)}return l};ti.prototype.defines=function(){var t=[],i,n;for(i in this.binders)n=this.binders[i],(n instanceof ef||n instanceof pr)&&t.push.apply(t,n.uniformNames.map(function(n){return"#define HAS_UNIFORM_"+n}));return t};ti.prototype.getBinderAttributes=function(){var r=[],u,n,t,i;for(u in this.binders)if(n=this.binders[u],n instanceof oi||n instanceof yt)for(t=0;t<n.paintVertexAttributes.length;t++)r.push(n.paintVertexAttributes[t].name);else if(n instanceof li)for(i=0;i<ha.members.length;i++)r.push(ha.members[i].name);return r};ti.prototype.getBinderUniforms=function(){var r=[],u,n,t,i,f;for(u in this.binders)if(n=this.binders[u],n instanceof ef||n instanceof pr||n instanceof yt)for(t=0,i=n.uniformNames;t<i.length;t+=1)f=i[t],r.push(f);return r};ti.prototype.getPaintVertexBuffers=function(){return this._buffers};ti.prototype.getUniforms=function(n,t){var o=[],f,i,u,e,r,s;for(f in this.binders)if(i=this.binders[f],i instanceof ef||i instanceof pr||i instanceof yt)for(u=0,e=i.uniformNames;u<e.length;u+=1)r=e[u],t[r]&&(s=i.getBinding(n,t[r],r),o.push({name:r,property:f,binding:s}));return o};ti.prototype.setUniforms=function(n,t,i,r){for(var u=0,f=t;u<f.length;u+=1){var e=f[u],s=e.name,o=e.property,h=e.binding;this.binders[o].setUniform(h,r,i.get(o),s)}};ti.prototype.updatePaintBuffers=function(n){var r,t,i;this._buffers=[];for(r in this.binders)t=this.binders[r],n&&t instanceof li?(i=n.fromScale===2?t.zoomInPaintVertexBuffer:t.zoomOutPaintVertexBuffer,i&&this._buffers.push(i)):(t instanceof oi||t instanceof yt)&&t.paintVertexBuffer&&this._buffers.push(t.paintVertexBuffer)};ti.prototype.upload=function(n){var i,t;for(i in this.binders)t=this.binders[i],(t instanceof oi||t instanceof yt||t instanceof li)&&t.upload(n);this.updatePaintBuffers()};ti.prototype.destroy=function(){var t,n;for(t in this.binders)n=this.binders[t],(n instanceof oi||n instanceof yt||n instanceof li)&&n.destroy()};wi=function(n,t,i){var r,u,f;for(i===void 0&&(i=function(){return!0}),this.programConfigurations={},r=0,u=n;r<u.length;r+=1)f=u[r],this.programConfigurations[f.id]=new ti(f,t,i);this.needsUpload=!1;this._featureMap=new ff;this._bufferOffset=0};wi.prototype.populatePaintArrays=function(n,t,i,r,u,f){for(var e in this.programConfigurations)this.programConfigurations[e].populatePaintArrays(n,t,r,u,f);t.id!==undefined&&this._featureMap.add(t.id,i,this._bufferOffset,n);this._bufferOffset=n;this.needsUpload=!0};wi.prototype.updatePaintArrays=function(n,t,i,r){for(var e,u=0,f=i;u<f.length;u+=1)e=f[u],this.needsUpload=this.programConfigurations[e.id].updatePaintArrays(n,this._featureMap,t,e,r)||this.needsUpload};wi.prototype.get=function(n){return this.programConfigurations[n]};wi.prototype.upload=function(n){if(this.needsUpload){for(var t in this.programConfigurations)this.programConfigurations[t].upload(n);this.needsUpload=!1}};wi.prototype.destroy=function(){for(var n in this.programConfigurations)this.programConfigurations[n].destroy()};f("ConstantBinder",ef);f("CrossFadedConstantBinder",pr);f("SourceExpressionBinder",oi);f("CrossFadedCompositeBinder",li);f("CompositeExpressionBinder",yt);f("ProgramConfiguration",ti,{omit:["_buffers"]});f("ProgramConfigurationSet",wi);var rt=8192,iw=Math.pow(2,14)-1,wn=-iw-1;er=function(n){this.zoom=n.zoom;this.overscaling=n.overscaling;this.layers=n.layers;this.layerIds=this.layers.map(function(n){return n.id});this.index=n.index;this.hasPattern=!1;this.layoutVertexArray=new ao;this.indexArray=new vu;this.segments=new st;this.programConfigurations=new wi(n.layers,n.zoom);this.stateDependentLayerIds=this.layers.filter(function(n){return n.isStateDependent()}).map(function(n){return n.id})};er.prototype.populate=function(n,t,i){var y=this.layers[0],s=[],r=null,u,h,b,k,o,l;for(y.type==="circle"&&(r=y.layout.get("circle-sort-key")),u=0,h=n;u<h.length;u+=1){var f=h[u],e=f.feature,nt=f.id,tt=f.index,it=f.sourceLayerIndex,p=this.layers[0]._featureFilter.needGeometry,c=re(e,p);this.layers[0]._featureFilter.filter(new w(this.zoom),c,i)&&(b=r?r.evaluate(c,{},i):undefined,k={id:nt,properties:e.properties,type:e.type,sourceLayerIndex:it,index:tt,geometry:p?c.geometry:ie(e),patterns:{},sortKey:b},s.push(k))}for(r&&s.sort(function(n,t){return n.sortKey-t.sortKey}),o=0,l=s;o<l.length;o+=1){var d=l[o],a=d,g=a.geometry,v=a.index,rt=a.sourceLayerIndex,ut=n[v].feature;this.addFeature(d,g,v,i);t.featureIndex.insert(ut,g,v,rt,this.index)}};er.prototype.update=function(n,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(n,t,this.stateDependentLayers,i)};er.prototype.isEmpty=function(){return this.layoutVertexArray.length===0};er.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload};er.prototype.upload=function(n){this.uploaded||(this.layoutVertexBuffer=n.createVertexBuffer(this.layoutVertexArray,dht),this.indexBuffer=n.createIndexBuffer(this.indexArray));this.programConfigurations.upload(n);this.uploaded=!0};er.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())};er.prototype.addFeature=function(n,t,i,r){for(var a,s,l,h,u,o=0,c=t;o<c.length;o+=1)for(a=c[o],s=0,l=a;s<l.length;s+=1){var v=l[s],f=v.x,e=v.y;f<0||f>=rt||e<0||e>=rt||(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,n.sortKey),u=h.vertexLength,aa(this.layoutVertexArray,f,e,-1,-1),aa(this.layoutVertexArray,f,e,1,-1),aa(this.layoutVertexArray,f,e,1,1),aa(this.layoutVertexArray,f,e,-1,1),this.indexArray.emplaceBack(u,u+1,u+2),this.indexArray.emplaceBack(u,u+3,u+2),h.vertexLength+=4,h.primitiveLength+=2)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,n,i,{},r)};f("CircleBucket",er,{omit:["layers"]});var pct=new ei({"circle-sort-key":new s(t.layout_circle["circle-sort-key"])}),wct=new ei({"circle-radius":new s(t.paint_circle["circle-radius"]),"circle-color":new s(t.paint_circle["circle-color"]),"circle-blur":new s(t.paint_circle["circle-blur"]),"circle-opacity":new s(t.paint_circle["circle-opacity"]),"circle-translate":new o(t.paint_circle["circle-translate"]),"circle-translate-anchor":new o(t.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new o(t.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new o(t.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new s(t.paint_circle["circle-stroke-width"]),"circle-stroke-color":new s(t.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new s(t.paint_circle["circle-stroke-opacity"])}),bct={paint:wct,layout:pct},ai=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=arguments,i=0,n=arguments.length;n--;)i+=t[n]*t[n];return Math.sqrt(i)});ttt=ntt;itt=vlt;dlt=function(){var n=clt();return function(t,i,r,u,f,e){var o,s;for(i||(i=3),r||(r=0),s=u?Math.min(u*i+r,t.length):t.length,o=r;o<s;o+=i)n[0]=t[o],n[1]=t[o+1],n[2]=t[o+2],f(n,n,e),t[o]=n[0],t[o+1]=n[1],t[o+2]=n[2];return t}}();iat=function(){var n=glt();return function(t,i,r,u,f,e){var o,s;for(i||(i=4),r||(r=0),s=u?Math.min(u*i+r,t.length):t.length,o=r;o<s;o+=i)n[0]=t[o],n[1]=t[o+1],n[2]=t[o+2],n[3]=t[o+3],f(n,n,e),t[o]=n[0],t[o+1]=n[1],t[o+2]=n[2],t[o+3]=n[3];return t}}();var fat=uat,oii=function(){var n=rat();return function(t,i,r,u,f,e){var o,s;for(i||(i=2),r||(r=0),s=u?Math.min(u*i+r,t.length):t.length,o=r;o<s;o+=i)n[0]=t[o],n[1]=t[o+1],f(n,n,e),t[o]=n[0],t[o+1]=n[1];return t}}(),eat=function(n){function t(t){n.call(this,t,bct)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(n){return new er(n)},t.prototype.queryRadius=function(n){var t=n;return ch("circle-radius",this,t)+ch("circle-stroke-width",this,t)+va(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(n,t,i,r,u,f,e,o){for(var b,s,a,y=ya(n,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),f.angle,e),d=this.paint.get("circle-radius").evaluate(t,i),g=this.paint.get("circle-stroke-width").evaluate(t,i),p=d+g,c=this.paint.get("circle-pitch-alignment")==="map",nt=c?y:oat(y,o),tt=c?p*e:p,l=0,w=r;l<w.length;l+=1)for(b=w[l],s=0,a=b;s<a.length;s+=1){var h=a[s],it=c?h:rtt(h,o),v=tt,k=pa([],[h.x,h.y,0,1],o);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?v*=k[3]/f.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(v*=f.cameraToCenterDistance/k[3]),hct(nt,it,v))return!0}return!1},t}(yr);ew=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(er);f("HeatmapBucket",ew,{omit:["layers"]});of=function(n,t){ow(this,n,1,t)};of.prototype.resize=function(n){utt(this,n,1)};of.prototype.clone=function(){return new of({width:this.width,height:this.height},new Uint8Array(this.data))};of.copy=function(n,t,i,r,u){sw(n,t,i,r,u,1)};kt=function(n,t){ow(this,n,4,t)};kt.prototype.resize=function(n){utt(this,n,4)};kt.prototype.replace=function(n,t){t?this.data.set(n):this.data=n instanceof Uint8ClampedArray?new Uint8Array(n.buffer):n};kt.prototype.clone=function(){return new kt({width:this.width,height:this.height},new Uint8Array(this.data))};kt.copy=function(n,t,i,r,u){sw(n,t,i,r,u,4)};f("AlphaImage",of);f("RGBAImage",kt);ftt=new ei({"heatmap-radius":new s(t.paint_heatmap["heatmap-radius"]),"heatmap-weight":new s(t.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new o(t.paint_heatmap["heatmap-intensity"]),"heatmap-color":new lo(t.paint_heatmap["heatmap-color"]),"heatmap-opacity":new o(t.paint_heatmap["heatmap-opacity"])});ett={paint:ftt};var sat=function(n){function t(t){n.call(this,t,ett);this._updateColorRamp()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(n){return new ew(n)},t.prototype._handleSpecialPaintPropertyUpdate=function(n){n==="heatmap-color"&&this._updateColorRamp()},t.prototype._updateColorRamp=function(){var n=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=ott({expression:n,evaluationKey:"heatmapDensity",image:this.colorRamp});this.colorRampTexture=null},t.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},t}(yr),hat=new ei({"hillshade-illumination-direction":new o(t.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new o(t.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new o(t.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new o(t.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new o(t.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new o(t.paint_hillshade["hillshade-accent-color"])}),cat={paint:hat},lat=function(n){function t(t){n.call(this,t,cat)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},t}(yr),aat=vt([{name:"a_pos",components:2,type:"Int16"}],4),vat=aat.members,hw=wa,yat=wa;wa.deviation=function(n,t,i,r){var h=t&&t.length,y=h?t[0]*i:n.length,f=Math.abs(aw(n,0,y,i)),u,s,c,l,e;if(h)for(u=0,s=t.length;u<s;u++)c=t[u]*i,l=u<s-1?t[u+1]*i:n.length,f-=Math.abs(aw(n,c,l,i));for(e=0,u=0;u<r.length;u+=3){var o=r[u]*i,a=r[u+1]*i,v=r[u+2]*i;e+=Math.abs((n[o]-n[v])*(n[a+1]-n[o+1])-(n[o]-n[a])*(n[v+1]-n[o+1]))}return f===0&&e===0?0:Math.abs((e-f)/f)};wa.flatten=function(n){for(var i,r,f=n[0][0].length,u={vertices:[],holes:[],dimensions:f},e=0,t=0;t<n.length;t++){for(i=0;i<n[t].length;i++)for(r=0;r<f;r++)u.vertices.push(n[t][i][r]);t>0&&(e+=n[t-1].length,u.holes.push(e))}return u};hw.default=yat;vtt=500;gi=function(n){this.zoom=n.zoom;this.overscaling=n.overscaling;this.layers=n.layers;this.layerIds=this.layers.map(function(n){return n.id});this.index=n.index;this.hasPattern=!1;this.patternFeatures=[];this.layoutVertexArray=new ao;this.indexArray=new vu;this.indexArray2=new yo;this.programConfigurations=new wi(n.layers,n.zoom);this.segments=new st;this.segments2=new st;this.stateDependentLayerIds=this.layers.filter(function(n){return n.isStateDependent()}).map(function(n){return n.id})};gi.prototype.populate=function(n,t,i){var r,u,f,h,b,k,s,l,g,nt;for(this.hasPattern=yw("fill",this.layers,t),r=this.layers[0].layout.get("fill-sort-key"),u=[],f=0,h=n;f<h.length;f+=1){var e=h[f],o=e.feature,tt=e.id,it=e.index,rt=e.sourceLayerIndex,p=this.layers[0]._featureFilter.needGeometry,c=re(o,p);this.layers[0]._featureFilter.filter(new w(this.zoom),c,i)&&(b=r?r.evaluate(c,{},i,t.availableImages):undefined,k={id:tt,properties:o.properties,type:o.type,sourceLayerIndex:rt,index:it,geometry:p?c.geometry:ie(o),patterns:{},sortKey:b},u.push(k))}for(r&&u.sort(function(n,t){return n.sortKey-t.sortKey}),s=0,l=u;s<l.length;s+=1){var a=l[s],v=a,d=v.geometry,y=v.index,ut=v.sourceLayerIndex;this.hasPattern?(g=pw("fill",this.layers,a,this.zoom,t),this.patternFeatures.push(g)):this.addFeature(a,d,y,i,{});nt=n[y].feature;t.featureIndex.insert(nt,d,y,ut,this.index)}};gi.prototype.update=function(n,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(n,t,this.stateDependentLayers,i)};gi.prototype.addFeatures=function(n,t,i){for(var u,r=0,f=this.patternFeatures;r<f.length;r+=1)u=f[r],this.addFeature(u,u.geometry,u.index,t,i)};gi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0};gi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload};gi.prototype.upload=function(n){this.uploaded||(this.layoutVertexBuffer=n.createVertexBuffer(this.layoutVertexArray,vat),this.indexBuffer=n.createIndexBuffer(this.indexArray),this.indexBuffer2=n.createIndexBuffer(this.indexArray2));this.programConfigurations.upload(n);this.uploaded=!0};gi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())};gi.prototype.addFeature=function(n,t,i,r,u){for(var a,v,y,k,tt,p,nt,f,w,c,e,s,h,l=0,b=vw(t,vtt);l<b.length;l+=1){for(a=b[l],v=0,y=0,k=a;y<k.length;y+=1)tt=k[y],v+=tt.length;var d=this.segments.prepareSegment(v,this.layoutVertexArray,this.indexArray),g=d.vertexLength,o=[],it=[];for(p=0,nt=a;p<nt.length;p+=1)if(f=nt[p],f.length!==0){for(f!==a[0]&&it.push(o.length/2),w=this.segments2.prepareSegment(f.length,this.layoutVertexArray,this.indexArray2),c=w.vertexLength,this.layoutVertexArray.emplaceBack(f[0].x,f[0].y),this.indexArray2.emplaceBack(c+f.length-1,c),o.push(f[0].x),o.push(f[0].y),e=1;e<f.length;e++)this.layoutVertexArray.emplaceBack(f[e].x,f[e].y),this.indexArray2.emplaceBack(c+e-1,c+e),o.push(f[e].x),o.push(f[e].y);w.vertexLength+=f.length;w.primitiveLength+=f.length}for(s=hw(o,it),h=0;h<s.length;h+=3)this.indexArray.emplaceBack(g+s[h],g+s[h+1],g+s[h+2]);d.vertexLength+=v;d.primitiveLength+=s.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,n,i,u,r)};f("FillBucket",gi,{omit:["layers","patternFeatures"]});var avt=new ei({"fill-sort-key":new s(t.layout_fill["fill-sort-key"])}),vvt=new ei({"fill-antialias":new o(t.paint_fill["fill-antialias"]),"fill-opacity":new s(t.paint_fill["fill-opacity"]),"fill-color":new s(t.paint_fill["fill-color"]),"fill-outline-color":new s(t.paint_fill["fill-outline-color"]),"fill-translate":new o(t.paint_fill["fill-translate"]),"fill-translate-anchor":new o(t.paint_fill["fill-translate-anchor"]),"fill-pattern":new eh(t.paint_fill["fill-pattern"])}),yvt={paint:vvt,layout:avt},pvt=function(n){function t(t){n.call(this,t,yvt)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,i){n.prototype.recalculate.call(this,t,i);var r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===undefined&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},t.prototype.createBucket=function(n){return new gi(n)},t.prototype.queryRadius=function(){return va(this.paint.get("fill-translate"))},t.prototype.queryIntersectsFeature=function(n,t,i,r,u,f,e){var o=ya(n,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),f.angle,e);return kn(o,r)},t.prototype.isTileClipped=function(){return!0},t}(yr),wvt=vt([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),bvt=wvt.members,ytt=bo;bo.types=["Unknown","Point","LineString","Polygon"];bo.prototype.loadGeometry=function(){var t=this._pbf,f;t.pos=this._geometry;for(var s=t.readVarint()+t.pos,i=1,r=0,e=0,o=0,u=[],n;t.pos<s;)if(r<=0&&(f=t.readVarint(),i=f&7,r=f>>3),r--,i===1||i===2)e+=t.readSVarint(),o+=t.readSVarint(),i===1&&(n&&u.push(n),n=[]),n.push(new h(e,o));else if(i===7)n&&n.push(n[0].clone());else throw new Error("unknown command "+i);return n&&u.push(n),u};bo.prototype.bbox=function(){var n=this._pbf,h;n.pos=this._geometry;for(var c=n.readVarint()+n.pos,t=1,u=0,i=0,r=0,f=Infinity,e=-Infinity,o=Infinity,s=-Infinity;n.pos<c;)if(u<=0&&(h=n.readVarint(),t=h&7,u=h>>3),u--,t===1||t===2)i+=n.readSVarint(),r+=n.readSVarint(),i<f&&(f=i),i>e&&(e=i),r<o&&(o=r),r>s&&(s=r);else if(t!==7)throw new Error("unknown command "+t);return[f,o,e,s]};bo.prototype.toGeoJSON=function(n,t,i){function o(n){for(var i,r,t=0;t<n.length;t++)i=n[t],r=180-(i.y+a)*360/c,n[t]=[(i.x+l)*360/c-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}var c=this.extent*Math.pow(2,i),l=this.extent*n,a=this.extent*t,r=this.loadGeometry(),e=bo.types[this.type],u,f,s,h;switch(this.type){case 1:for(s=[],u=0;u<r.length;u++)s[u]=r[u][0];r=s;o(r);break;case 2:for(u=0;u<r.length;u++)o(r[u]);break;case 3:for(r=gvt(r),u=0;u<r.length;u++)for(f=0;f<r[u].length;f++)o(r[u][f])}return r.length===1?r=r[0]:e="Multi"+e,h={type:"Feature",geometry:{type:e,coordinates:r},properties:this.properties},"id"in this&&(h.id=this.id),h};ww=ptt;ptt.prototype.feature=function(n){if(n<0||n>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[n];var t=this._pbf.readVarint()+this._pbf.pos;return new ytt(this._pbf,t,this.extent,this._keys,this._values)};wtt=ryt;var fyt=wtt,eyt=ytt,oyt=ww,ko={VectorTile:fyt,VectorTileFeature:eyt,VectorTileLayer:oyt},syt=ko.VectorTileFeature.types,hyt=500,bw=Math.pow(2,13);nr=function(n){this.zoom=n.zoom;this.overscaling=n.overscaling;this.layers=n.layers;this.layerIds=this.layers.map(function(n){return n.id});this.index=n.index;this.hasPattern=!1;this.layoutVertexArray=new pl;this.indexArray=new vu;this.programConfigurations=new wi(n.layers,n.zoom);this.segments=new st;this.stateDependentLayerIds=this.layers.filter(function(n){return n.isStateDependent()}).map(function(n){return n.id})};nr.prototype.populate=function(n,t,i){var f,o,u;for(this.features=[],this.hasPattern=yw("fill-extrusion",this.layers,t),f=0,o=n;f<o.length;f+=1){var e=o[f],r=e.feature,a=e.id,s=e.index,h=e.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,l=re(r,c);this.layers[0]._featureFilter.filter(new w(this.zoom),l,i)&&(u={id:a,sourceLayerIndex:h,index:s,geometry:c?l.geometry:ie(r),properties:r.properties,type:r.type,patterns:{}},this.hasPattern?this.features.push(pw("fill-extrusion",this.layers,u,this.zoom,t)):this.addFeature(u,u.geometry,s,i,{}),t.featureIndex.insert(r,u.geometry,s,h,this.index,!0))}};nr.prototype.addFeatures=function(n,t,i){for(var u,e,r=0,f=this.features;r<f.length;r+=1)u=f[r],e=u.geometry,this.addFeature(u,e,u.index,t,i)};nr.prototype.update=function(n,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(n,t,this.stateDependentLayers,i)};nr.prototype.isEmpty=function(){return this.layoutVertexArray.length===0};nr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload};nr.prototype.upload=function(n){this.uploaded||(this.layoutVertexBuffer=n.createVertexBuffer(this.layoutVertexArray,bvt),this.indexBuffer=n.createIndexBuffer(this.indexArray));this.programConfigurations.upload(n);this.uploaded=!0};nr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())};nr.prototype.addFeature=function(n,t,i,r,u){for(var p,w,g,ft,lt,f,nt,et,l,o,a,s,h,e,ot,c,it,ct,b,rt,k,v,y,d=0,ut=vw(t,hyt);d<ut.length;d+=1){for(p=ut[d],w=0,g=0,ft=p;g<ft.length;g+=1)lt=ft[g],w+=lt.length;for(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),nt=0,et=p;nt<et.length;nt+=1)if((l=et[nt],l.length!==0)&&!lyt(l))for(o=0,a=0;a<l.length;a++)s=l[a],a>=1&&(h=l[a-1],cyt(s,h)||(f.vertexLength+4>st.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)),e=s.sub(h)._perp()._unit(),ot=h.dist(s),o+ot>32768&&(o=0),ph(this.layoutVertexArray,s.x,s.y,e.x,e.y,0,0,o),ph(this.layoutVertexArray,s.x,s.y,e.x,e.y,0,1,o),o+=ot,ph(this.layoutVertexArray,h.x,h.y,e.x,e.y,0,0,o),ph(this.layoutVertexArray,h.x,h.y,e.x,e.y,0,1,o),c=f.vertexLength,this.indexArray.emplaceBack(c,c+2,c+1),this.indexArray.emplaceBack(c+1,c+2,c+3),f.vertexLength+=4,f.primitiveLength+=2));if(f.vertexLength+w>st.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(w,this.layoutVertexArray,this.indexArray)),syt[n.type]==="Polygon"){var tt=[],at=[],ht=f.vertexLength;for(it=0,ct=p;it<ct.length;it+=1)if(b=ct[it],b.length!==0)for(b!==p[0]&&at.push(tt.length/2),rt=0;rt<b.length;rt++)k=b[rt],ph(this.layoutVertexArray,k.x,k.y,0,0,1,1,0),tt.push(k.x),tt.push(k.y);for(v=hw(tt,at),y=0;y<v.length;y+=3)this.indexArray.emplaceBack(ht+v[y],ht+v[y+2],ht+v[y+1]);f.primitiveLength+=v.length/3;f.vertexLength+=w}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,n,i,u,r)};f("FillExtrusionBucket",nr,{omit:["layers","features"]});var ayt=new ei({"fill-extrusion-opacity":new o(t["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new s(t["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new o(t["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new o(t["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new eh(t["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new s(t["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new s(t["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new o(t["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),vyt={paint:ayt},yyt=function(n){function t(t){n.call(this,t,vyt)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(n){return new nr(n)},t.prototype.queryRadius=function(){return va(this.paint.get("fill-extrusion-translate"))},t.prototype.is3D=function(){return!0},t.prototype.queryIntersectsFeature=function(n,t,i,r,u,f,e,o){var h=ya(n,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),f.angle,e),c=this.paint.get("fill-extrusion-height").evaluate(t,i),l=this.paint.get("fill-extrusion-base").evaluate(t,i),a=byt(h,o,f,0),s=wyt(r,l,c,o),v=s[0],y=s[1];return pyt(v,y,a)},t}(yr);var kyt=vt([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),dyt=kyt.members,gyt=vt([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),npt=gyt.members,tpt=ko.VectorTileFeature.types,ktt=63,ipt=Math.cos(75/2*(Math.PI/180)),rpt=15,upt=20,dtt=1/2,gtt=Math.pow(2,14)/dtt,dt=function(n){var t=this;this.zoom=n.zoom;this.overscaling=n.overscaling;this.layers=n.layers;this.layerIds=this.layers.map(function(n){return n.id});this.index=n.index;this.hasPattern=!1;this.patternFeatures=[];this.lineClipsArray=[];this.gradients={};this.layers.forEach(function(n){t.gradients[n.id]={}});this.layoutVertexArray=new wl;this.layoutVertexArray2=new vo;this.indexArray=new vu;this.programConfigurations=new wi(n.layers,n.zoom);this.segments=new st;this.maxLineLength=0;this.stateDependentLayerIds=this.layers.filter(function(n){return n.isStateDependent()}).map(function(n){return n.id})};dt.prototype.populate=function(n,t,i){var r,u,f,h,b,k,s,l,g,nt;for(this.hasPattern=yw("line",this.layers,t),r=this.layers[0].layout.get("line-sort-key"),u=[],f=0,h=n;f<h.length;f+=1){var e=h[f],o=e.feature,tt=e.id,it=e.index,rt=e.sourceLayerIndex,p=this.layers[0]._featureFilter.needGeometry,c=re(o,p);this.layers[0]._featureFilter.filter(new w(this.zoom),c,i)&&(b=r?r.evaluate(c,{},i):undefined,k={id:tt,properties:o.properties,type:o.type,sourceLayerIndex:rt,index:it,geometry:p?c.geometry:ie(o),patterns:{},sortKey:b},u.push(k))}for(r&&u.sort(function(n,t){return n.sortKey-t.sortKey}),s=0,l=u;s<l.length;s+=1){var a=l[s],v=a,d=v.geometry,y=v.index,ut=v.sourceLayerIndex;this.hasPattern?(g=pw("line",this.layers,a,this.zoom,t),this.patternFeatures.push(g)):this.addFeature(a,d,y,i,{});nt=n[y].feature;t.featureIndex.insert(nt,d,y,ut,this.index)}};dt.prototype.update=function(n,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(n,t,this.stateDependentLayers,i)};dt.prototype.addFeatures=function(n,t,i){for(var u,r=0,f=this.patternFeatures;r<f.length;r+=1)u=f[r],this.addFeature(u,u.geometry,u.index,t,i)};dt.prototype.isEmpty=function(){return this.layoutVertexArray.length===0};dt.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload};dt.prototype.upload=function(n){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=n.createVertexBuffer(this.layoutVertexArray2,npt)),this.layoutVertexBuffer=n.createVertexBuffer(this.layoutVertexArray,dyt),this.indexBuffer=n.createIndexBuffer(this.indexArray));this.programConfigurations.upload(n);this.uploaded=!0};dt.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())};dt.prototype.lineFeatureClips=function(n){if(!!n.properties&&n.properties.hasOwnProperty("mapbox_clip_start")&&n.properties.hasOwnProperty("mapbox_clip_end")){var t=+n.properties.mapbox_clip_start,i=+n.properties.mapbox_clip_end;return{start:t,end:i}}};dt.prototype.addFeature=function(n,t,i,r,u){var f=this.layers[0].layout,h=f.get("line-join").evaluate(n,{}),c=f.get("line-cap"),l=f.get("line-miter-limit"),a=f.get("line-round-limit"),e,o,s;for(this.lineClips=this.lineFeatureClips(n),e=0,o=t;e<o.length;e+=1)s=o[e],this.addLine(s,n,h,c,l,a);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,n,i,u,r)};dt.prototype.addLine=function(n,t,i,r,u,f){var d,g,a,w,b,l,st,ft,ht,h,wt,ct,et,k,at,vt,yt,ot;if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){for(this.lineClipsArray.push(this.lineClips),d=0;d<n.length-1;d++)this.totalDistance+=n[d].dist(n[d+1]);this.updateScaledDistance();this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(g=tpt[t.type]==="Polygon",a=n.length;a>=2&&n[a-1].equals(n[a-2]);)a--;for(w=0;w<a-1&&n[w].equals(n[w+1]);)w++;if(!(a<(g?3:2))){i==="bevel"&&(u=1.05);var it=this.overscaling<=16?rpt*rt/(512*this.overscaling):0,c=this.segments.prepareSegment(a*10,this.layoutVertexArray,this.indexArray),e,v=undefined,y=undefined,s=undefined,o=undefined;for(this.e1=this.e2=-1,g&&(e=n[a-2],o=n[w].sub(e)._unit()._perp()),b=w;b<a;b++)if(y=b===a-1?g?n[w+1]:undefined:n[b+1],!y||!n[b].equals(y)){o&&(s=o);e&&(v=e);e=n[b];o=y?y.sub(e)._unit()._perp():s;s=s||o;l=s.add(o);(l.x!==0||l.y!==0)&&l._unit();var nt=s.x*o.x+s.y*o.y,ut=l.x*o.x+l.y*o.y,p=ut!==0?1/ut:Infinity,gt=2*Math.sqrt(2-2*ut),pt=ut<ipt&&v&&y,tt=s.x*o.y-s.y*o.x>0;if(pt&&b>w&&(st=e.dist(v),st>2*it&&(ft=e.sub(e.sub(v)._mult(it/st)._round()),this.updateDistance(v,ft),this.addCurrentVertex(ft,s,0,0,c),v=ft)),ht=v&&y,h=ht?i:g?"butt":r,ht&&h==="round"&&(p<f?h="miter":p<=2&&(h="fakeround")),h==="miter"&&p>u&&(h="bevel"),h==="bevel"&&(p>2&&(h="flipbevel"),p<u&&(h="miter")),v&&this.updateDistance(v,e),h==="miter")l._mult(p),this.addCurrentVertex(e,l,0,0,c);else if(h==="flipbevel")p>100?l=o.mult(-1):(wt=p*s.add(o).mag()/s.sub(o).mag(),l._perp()._mult(wt*(tt?-1:1))),this.addCurrentVertex(e,l,0,0,c),this.addCurrentVertex(e,l.mult(-1),0,0,c);else if(h==="bevel"||h==="fakeround"){var bt=-Math.sqrt(p*p-1),kt=tt?bt:0,dt=tt?0:bt;if(v&&this.addCurrentVertex(e,s,kt,dt,c),h==="fakeround")for(ct=Math.round(gt*180/Math.PI/upt),et=1;et<ct;et++){if(k=et/ct,k!==.5){var lt=k-.5,ni=1.0904+nt*(-3.2452+nt*(3.55645-nt*1.43519)),ti=.848013+nt*(-1.06021+nt*.215638);k=k+k*lt*(k-1)*(ni*lt*lt+ti)}at=o.sub(s)._mult(k)._add(s)._unit()._mult(tt?-1:1);this.addHalfVertex(e,at.x,at.y,!1,tt,0,c)}y&&this.addCurrentVertex(e,o,-kt,-dt,c)}else h==="butt"?this.addCurrentVertex(e,l,0,0,c):h==="square"?(vt=v?1:-1,this.addCurrentVertex(e,l,vt,vt,c)):h==="round"&&(v&&(this.addCurrentVertex(e,s,0,0,c),this.addCurrentVertex(e,s,1,1,c,!0)),y&&(this.addCurrentVertex(e,o,-1,-1,c,!0),this.addCurrentVertex(e,o,0,0,c)));pt&&b<a-1&&(yt=e.dist(y),yt>2*it&&(ot=e.add(y.sub(e)._mult(it/yt)._round()),this.updateDistance(e,ot),this.addCurrentVertex(ot,o,0,0,c),e=ot))}}};dt.prototype.addCurrentVertex=function(n,t,i,r,u,f){f===void 0&&(f=!1);var e=t.x+t.y*i,o=t.y-t.x*i,s=-t.x+t.y*r,h=-t.y-t.x*r;this.addHalfVertex(n,e,o,f,!1,i,u);this.addHalfVertex(n,s,h,f,!0,-r,u);this.distance>gtt/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(n,t,i,r,u,f))};dt.prototype.addHalfVertex=function(n,t,i,r,u,f,e){var h=n.x,c=n.y,l=this.lineClips?this.scaledDistance*(gtt-1):this.scaledDistance,s=l*dtt,o;if(this.layoutVertexArray.emplaceBack((h<<1)+(r?1:0),(c<<1)+(u?1:0),Math.round(ktt*t)+128,Math.round(ktt*i)+128,(f===0?0:f<0?-1:1)+1|(s&63)<<2,s>>6),this.lineClips){var a=this.scaledDistance-this.lineClips.start,v=this.lineClips.end-this.lineClips.start,y=a/v;this.layoutVertexArray2.emplaceBack(y,this.lineClipsArray.length)}o=e.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,o),e.primitiveLength++);u?this.e2=o:this.e1=o};dt.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance};dt.prototype.updateDistance=function(n,t){this.distance+=n.dist(t);this.updateScaledDistance()};f("LineBucket",dt,{omit:["layers","patternFeatures"]});var fpt=new ei({"line-cap":new o(t.layout_line["line-cap"]),"line-join":new s(t.layout_line["line-join"]),"line-miter-limit":new o(t.layout_line["line-miter-limit"]),"line-round-limit":new o(t.layout_line["line-round-limit"]),"line-sort-key":new s(t.layout_line["line-sort-key"])}),ept=new ei({"line-opacity":new s(t.paint_line["line-opacity"]),"line-color":new s(t.paint_line["line-color"]),"line-translate":new o(t.paint_line["line-translate"]),"line-translate-anchor":new o(t.paint_line["line-translate-anchor"]),"line-width":new s(t.paint_line["line-width"]),"line-gap-width":new s(t.paint_line["line-gap-width"]),"line-offset":new s(t.paint_line["line-offset"]),"line-blur":new s(t.paint_line["line-blur"]),"line-dasharray":new ne(t.paint_line["line-dasharray"]),"line-pattern":new eh(t.paint_line["line-pattern"]),"line-gradient":new lo(t.paint_line["line-gradient"])}),nit={paint:ept,layout:fpt},opt=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new w(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),n.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,r,u){return i=ri({},i,{zoom:Math.floor(i.zoom)}),n.prototype.evaluate.call(this,t,i,r,u)},t}(s),tit=new opt(nit.paint.properties["line-width"].specification);tit.useIntegerZoom=!0;iit=function(n){function t(t){n.call(this,t,nit);this.gradientVersion=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(n){if(n==="line-gradient"){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression.expression instanceof cr;this.gradientVersion=(this.gradientVersion+1)%lb}},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(t,i){n.prototype.recalculate.call(this,t,i);this.paint._values["line-floorwidth"]=tit.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(n){return new dt(n)},t.prototype.queryRadius=function(n){var t=n,i=rit(ch("line-width",this,t),ch("line-gap-width",this,t)),r=ch("line-offset",this,t);return i/2+Math.abs(r)+va(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(n,t,i,r,u,f,e){var s=ya(n,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),f.angle,e),h=e/2*rit(this.paint.get("line-width").evaluate(t,i),this.paint.get("line-gap-width").evaluate(t,i)),o=this.paint.get("line-offset").evaluate(t,i);return o&&(r=spt(r,o*e)),cct(s,r,h)},t.prototype.isTileClipped=function(){return!0},t}(yr);var hpt=vt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),cpt=vt([{name:"a_projected_pos",components:3,type:"Float32"}],4),bii=vt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),lpt=vt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),kii=vt([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),uit=vt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),apt=vt([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),dii=vt([{name:"triangle",components:3,type:"Uint16"}]),gii=vt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),nri=vt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{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",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),tri=vt([{type:"Float32",name:"offsetX"}]),iri=vt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);go={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var ht=24,bpt=function(n,t,i,r,u){var f,o,l=u*8-r-1,a=(1<<l)-1,v=a>>1,e=-7,s=i?u-1:0,c=i?-1:1,h=n[t+s];for(s+=c,f=h&(1<<-e)-1,h>>=-e,e+=l;e>0;f=f*256+n[t+s],s+=c,e-=8);for(o=f&(1<<-e)-1,f>>=-e,e+=r;e>0;o=o*256+n[t+s],s+=c,e-=8);if(f===0)f=1-v;else{if(f===a)return o?NaN:(h?-1:1)*Infinity;o=o+Math.pow(2,r);f=f-v}return(h?-1:1)*o*Math.pow(2,f-r)},kpt=function(n,t,i,r,u,f){var e,o,s,l=f*8-u-1,a=(1<<l)-1,h=a>>1,y=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:f-1,v=r?1:-1,p=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(o=isNaN(t)?1:0,e=a):(e=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-e))<1&&(e--,s*=2),t+=e+h>=1?y/s:y*Math.pow(2,1-h),t*s>=2&&(e++,s/=2),e+h>=a?(o=0,e=a):e+h>=1?(o=(t*s-1)*Math.pow(2,u),e=e+h):(o=t*Math.pow(2,h-1)*Math.pow(2,u),e=0));u>=8;n[i+c]=o&255,c+=v,o/=256,u-=8);for(e=e<<u|o,l+=u;l>0;n[i+c]=e&255,c+=v,e/=256,l-=8);n[i+c-v]|=p*128},ga={read:bpt,write:kpt},nv=p;p.Varint=0;p.Fixed64=1;p.Bytes=2;p.Fixed32=5;var kw=4294967296,fit=1/kw,dpt=12,eit=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");p.prototype={destroy:function(){this.buf=null},readFields:function(n,t,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),u=r>>3,f=this.pos;this.type=r&7;n(u,t,this);this.pos===f&&this.skip(r)}return t},readMessage:function(n,t){return this.readFields(n,t,this.readVarint()+this.pos)},readFixed32:function(){var n=tv(this.buf,this.pos);return this.pos+=4,n},readSFixed32:function(){var n=sit(this.buf,this.pos);return this.pos+=4,n},readFixed64:function(){var n=tv(this.buf,this.pos)+tv(this.buf,this.pos+4)*kw;return this.pos+=8,n},readSFixed64:function(){var n=tv(this.buf,this.pos)+sit(this.buf,this.pos+4)*kw;return this.pos+=8,n},readFloat:function(){var n=ga.read(this.buf,this.pos,!0,23,4);return this.pos+=4,n},readDouble:function(){var n=ga.read(this.buf,this.pos,!0,52,8);return this.pos+=8,n},readVarint:function(n){var r=this.buf,i,t;return(t=r[this.pos++],i=t&127,t<128)?i:(t=r[this.pos++],i|=(t&127)<<7,t<128)?i:(t=r[this.pos++],i|=(t&127)<<14,t<128)?i:(t=r[this.pos++],i|=(t&127)<<21,t<128)?i:(t=r[this.pos],i|=(t&15)<<28,gpt(i,n,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var n=this.readVarint();return n%2==1?(n+1)/-2:n/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var n=this.readVarint()+this.pos,t=this.pos;return(this.pos=n,n-t>=dpt&&eit)?vwt(this.buf,t,n):awt(this.buf,t,n)},readBytes:function(){var n=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,n);return this.pos=n,t},readPackedVarint:function(n,t){if(this.type!==p.Bytes)return n.push(this.readVarint(t));var i=yu(this);for(n=n||[];this.pos<i;)n.push(this.readVarint(t));return n},readPackedSVarint:function(n){if(this.type!==p.Bytes)return n.push(this.readSVarint());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readSVarint());return n},readPackedBoolean:function(n){if(this.type!==p.Bytes)return n.push(this.readBoolean());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readBoolean());return n},readPackedFloat:function(n){if(this.type!==p.Bytes)return n.push(this.readFloat());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readFloat());return n},readPackedDouble:function(n){if(this.type!==p.Bytes)return n.push(this.readDouble());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readDouble());return n},readPackedFixed32:function(n){if(this.type!==p.Bytes)return n.push(this.readFixed32());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readFixed32());return n},readPackedSFixed32:function(n){if(this.type!==p.Bytes)return n.push(this.readSFixed32());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readSFixed32());return n},readPackedFixed64:function(n){if(this.type!==p.Bytes)return n.push(this.readFixed64());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readFixed64());return n},readPackedSFixed64:function(n){if(this.type!==p.Bytes)return n.push(this.readSFixed64());var t=yu(this);for(n=n||[];this.pos<t;)n.push(this.readSFixed64());return n},skip:function(n){var t=n&7;if(t===p.Varint)while(this.buf[this.pos++]>127);else if(t===p.Bytes)this.pos=this.readVarint()+this.pos;else if(t===p.Fixed32)this.pos+=4;else if(t===p.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t);},writeTag:function(n,t){this.writeVarint(n<<3|t)},realloc:function(n){for(var t=this.length||16,i;t<this.pos+n;)t*=2;t!==this.length&&(i=new Uint8Array(t),i.set(this.buf),this.buf=i,this.length=t)},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(n){this.realloc(4);ts(this.buf,n,this.pos);this.pos+=4},writeSFixed32:function(n){this.realloc(4);ts(this.buf,n,this.pos);this.pos+=4},writeFixed64:function(n){this.realloc(8);ts(this.buf,n&-1,this.pos);ts(this.buf,Math.floor(n*fit),this.pos+4);this.pos+=8},writeSFixed64:function(n){this.realloc(8);ts(this.buf,n&-1,this.pos);ts(this.buf,Math.floor(n*fit),this.pos+4);this.pos+=8},writeVarint:function(n){if(n=+n||0,n>268435455||n<0){nwt(n,this);return}(this.realloc(4),this.buf[this.pos++]=n&127|(n>127?128:0),n<=127)||(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),n<=127)||(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),n<=127)||(this.buf[this.pos++]=n>>>7&127)},writeSVarint:function(n){this.writeVarint(n<0?-n*2-1:n*2)},writeBoolean:function(n){this.writeVarint(Boolean(n))},writeString:function(n){var i,t;n=String(n);this.realloc(n.length*4);this.pos++;i=this.pos;this.pos=ywt(this.buf,n,this.pos);t=this.pos-i;t>=128&&oit(i,t,this);this.pos=i-1;this.writeVarint(t);this.pos+=t},writeFloat:function(n){this.realloc(4);ga.write(this.buf,n,this.pos,!0,23,4);this.pos+=4},writeDouble:function(n){this.realloc(8);ga.write(this.buf,n,this.pos,!0,52,8);this.pos+=8},writeBytes:function(n){var i=n.length,t;for(this.writeVarint(i),this.realloc(i),t=0;t<i;t++)this.buf[this.pos++]=n[t]},writeRawMessage:function(n,t){var r,i;this.pos++;r=this.pos;n(t,this);i=this.pos-r;i>=128&&oit(r,i,this);this.pos=r-1;this.writeVarint(i);this.pos+=i},writeMessage:function(n,t,i){this.writeTag(n,p.Bytes);this.writeRawMessage(t,i)},writePackedVarint:function(n,t){t.length&&this.writeMessage(n,rwt,t)},writePackedSVarint:function(n,t){t.length&&this.writeMessage(n,uwt,t)},writePackedBoolean:function(n,t){t.length&&this.writeMessage(n,owt,t)},writePackedFloat:function(n,t){t.length&&this.writeMessage(n,fwt,t)},writePackedDouble:function(n,t){t.length&&this.writeMessage(n,ewt,t)},writePackedFixed32:function(n,t){t.length&&this.writeMessage(n,swt,t)},writePackedSFixed32:function(n,t){t.length&&this.writeMessage(n,hwt,t)},writePackedFixed64:function(n,t){t.length&&this.writeMessage(n,cwt,t)},writePackedSFixed64:function(n,t){t.length&&this.writeMessage(n,lwt,t)},writeBytesField:function(n,t){this.writeTag(n,p.Bytes);this.writeBytes(t)},writeFixed32Field:function(n,t){this.writeTag(n,p.Fixed32);this.writeFixed32(t)},writeSFixed32Field:function(n,t){this.writeTag(n,p.Fixed32);this.writeSFixed32(t)},writeFixed64Field:function(n,t){this.writeTag(n,p.Fixed64);this.writeFixed64(t)},writeSFixed64Field:function(n,t){this.writeTag(n,p.Fixed64);this.writeSFixed64(t)},writeVarintField:function(n,t){this.writeTag(n,p.Varint);this.writeVarint(t)},writeSVarintField:function(n,t){this.writeTag(n,p.Varint);this.writeSVarint(t)},writeStringField:function(n,t){this.writeTag(n,p.Bytes);this.writeString(t)},writeFloatField:function(n,t){this.writeTag(n,p.Fixed32);this.writeFloat(t)},writeDoubleField:function(n,t){this.writeTag(n,p.Fixed64);this.writeDouble(t)},writeBooleanField:function(n,t){this.writeVarintField(n,Boolean(t))}};iv=3;dw=iv;var si=1,rv=function(n,t){var i=t.pixelRatio,r=t.version,u=t.stretchX,f=t.stretchY,e=t.content;this.paddedRect=n;this.pixelRatio=i;this.stretchX=u;this.stretchY=f;this.content=e;this.version=r},bh={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};bh.tl.get=function(){return[this.paddedRect.x+si,this.paddedRect.y+si]};bh.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-si,this.paddedRect.y+this.paddedRect.h-si]};bh.tlbr.get=function(){return this.tl.concat(this.br)};bh.displaySize.get=function(){return[(this.paddedRect.w-si*2)/this.pixelRatio,(this.paddedRect.h-si*2)/this.pixelRatio]};Object.defineProperties(rv.prototype,bh);is=function(n,t){var h={},c={},e,l,a,v,y;this.haveRenderCallbacks=[];e=[];this.addImages(n,h,e);this.addImages(t,c,e);var p=hit(e),b=p.w,k=p.h,r=new kt({width:b||1,height:k||1});for(l in n)a=n[l],v=h[l].paddedRect,kt.copy(a.data,r,{x:0,y:0},{x:v.x+si,y:v.y+si},a.data);for(y in t){var i=t[y],w=c[y].paddedRect,u=w.x+si,f=w.y+si,o=i.data.width,s=i.data.height;kt.copy(i.data,r,{x:0,y:0},{x:u,y:f},i.data);kt.copy(i.data,r,{x:0,y:s-1},{x:u,y:f-1},{width:o,height:1});kt.copy(i.data,r,{x:0,y:0},{x:u,y:f+s},{width:o,height:1});kt.copy(i.data,r,{x:o-1,y:0},{x:u-1,y:f},{width:1,height:s});kt.copy(i.data,r,{x:0,y:0},{x:u+o,y:f},{width:1,height:s})}this.image=r;this.iconPositions=h;this.patternPositions=c};is.prototype.addImages=function(n,t,i){var u,r,f;for(u in n)r=n[u],f={x:0,y:0,w:r.data.width+2*si,h:r.data.height+2*si},i.push(f),t[u]=new rv(f,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(u)};is.prototype.patchUpdatedImages=function(n,t){n.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var i in n.updatedImages)this.patchUpdatedImage(this.iconPositions[i],n.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],n.getImage(i),t)};is.prototype.patchUpdatedImage=function(n,t,i){if(n&&t&&n.version!==t.version){n.version=t.version;var r=n.tl,u=r[0],f=r[1];i.update(t.data,undefined,{x:u,y:f})}};f("ImagePosition",rv);f("ImageAtlas",is);hi={horizontal:1,vertical:2,horizontalOnly:3};rs=-17;var cit=57344,lit=63743,us=function(){this.scale=1;this.fontStack="";this.imageName=null};us.forText=function(n,t){var i=new us;return i.scale=n||1,i.fontStack=t,i};us.forImage=function(n){var t=new us;return t.imageName=n,t};pt=function(){this.text="";this.sectionIndex=[];this.sections=[];this.imageSectionID=null};pt.fromFeature=function(n,t){for(var i,r=new pt,u=0;u<n.sections.length;u++)i=n.sections[u],i.image?r.addImageSection(i):r.addTextSection(i,t);return r};pt.prototype.length=function(){return this.text.length};pt.prototype.getSection=function(n){return this.sections[this.sectionIndex[n]]};pt.prototype.getSectionIndex=function(n){return this.sectionIndex[n]};pt.prototype.getCharCode=function(n){return this.text.charCodeAt(n)};pt.prototype.verticalizePunctuation=function(){this.text=wpt(this.text)};pt.prototype.trim=function(){for(var i,n,t=0,r=0;r<this.text.length&&or[this.text.charCodeAt(r)];r++)t++;for(i=this.text.length,n=this.text.length-1;n>=0&&n>=t&&or[this.text.charCodeAt(n)];n--)i--;this.text=this.text.substring(t,i);this.sectionIndex=this.sectionIndex.slice(t,i)};pt.prototype.substring=function(n,t){var i=new pt;return i.text=this.text.substring(n,t),i.sectionIndex=this.sectionIndex.slice(n,t),i.sections=this.sections,i};pt.prototype.toString=function(){return this.text};pt.prototype.getMaxScale=function(){var n=this;return this.sectionIndex.reduce(function(t,i){return Math.max(t,n.sections[i].scale)},0)};pt.prototype.addTextSection=function(n,t){var r,i;for(this.text+=n.text,this.sections.push(us.forText(n.scale,n.fontStack||t)),r=this.sections.length-1,i=0;i<n.text.length;++i)this.sectionIndex.push(r)};pt.prototype.addImageSection=function(n){var i=n.image?n.image.name:"",t;if(i.length===0){gt("Can't add FormattedSection with an empty image.");return}if(t=this.getNextImageSectionCharCode(),!t){gt("Reached maximum number of images "+(lit-cit+2));return}this.text+=String.fromCharCode(t);this.sections.push(us.forImage(i));this.sectionIndex.push(this.sections.length-1)};pt.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=lit?null:++this.imageSectionID:(this.imageSectionID=cit,this.imageSectionID)};or={};or[9]=!0;or[10]=!0;or[11]=!0;or[12]=!0;or[13]=!0;or[32]=!0;ii={};ii[10]=!0;ii[32]=!0;ii[38]=!0;ii[40]=!0;ii[41]=!0;ii[43]=!0;ii[45]=!0;ii[47]=!0;ii[173]=!0;ii[183]=!0;ii[8203]=!0;ii[8208]=!0;ii[8211]=!0;ii[8231]=!0;ue=function(n){function t(t,i,r,u){n.call(this,t,i);this.angle=r;u!==undefined&&(this.segment=u)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.x,this.y,this.angle,this.segment)},t}(h);f("Anchor",ue);tr=128;dit=Object.freeze({__proto__:null,getSizeData:tb,evaluateSizeForFeature:bit,evaluateSizeForZoom:kit,SIZE_PACK_FACTOR:tr});fe=si;kh=function(n,t,i,r,u,f,e,o,s,c){var l;if(this.boxStartIndex=n.length,s){var it=f.top,rt=f.bottom,tt=f.collisionPadding;tt&&(it-=tt[1],rt+=tt[3]);l=rt-it;l>0&&(l=Math.max(10,l),this.circleDiameter=l)}else{var a=f.top*e-o,v=f.bottom*e+o,y=f.left*e-o,p=f.right*e+o,w=f.collisionPadding;if(w&&(y-=w[0]*e,a-=w[1]*e,p+=w[2]*e,v+=w[3]*e),c){var b=new h(y,a),k=new h(p,a),d=new h(y,v),g=new h(p,v),nt=c*Math.PI/180;b._rotate(nt);k._rotate(nt);d._rotate(nt);g._rotate(nt);y=Math.min(b.x,k.x,d.x,g.x);p=Math.max(b.x,k.x,d.x,g.x);a=Math.min(b.y,k.y,d.y,g.y);v=Math.max(b.y,k.y,d.y,g.y)}n.emplaceBack(t.x,t.y,y,a,p,v,i,r,u)}this.boxEndIndex=n.length};ee=function(n,t){if(n===void 0&&(n=[]),t===void 0&&(t=hbt),this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)};ee.prototype.push=function(n){this.data.push(n);this.length++;this._up(this.length-1)};ee.prototype.pop=function(){if(this.length===0)return undefined;var n=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),n};ee.prototype.peek=function(){return this.data[0]};ee.prototype._up=function(n){for(var u=this,t=u.data,e=u.compare,f=t[n],i,r;n>0;){if(i=n-1>>1,r=t[i],e(f,r)>=0)break;t[n]=r;n=i}t[n]=f};ee.prototype._down=function(n){for(var f=this,t=f.data,e=f.compare,s=this.length>>1,o=t[n];n<s;){var i=(n<<1)+1,r=t[i],u=i+1;if(u<this.length&&e(t[u],r)<0&&(i=u,r=t[u]),e(r,o)>=0)break;t[n]=r;n=i}t[n]=o};oe=7;sv=Number.POSITIVE_INFINITY;es=255;pu=es*tr;crt=ko.VectorTileFeature.types;lrt=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];se=function(n){this.layoutVertexArray=new bl;this.indexArray=new vu;this.programConfigurations=n;this.segments=new st;this.dynamicLayoutVertexArray=new kl;this.opacityVertexArray=new dl;this.placedSymbolArray=new yp};se.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0};se.prototype.upload=function(n,t,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=n.createVertexBuffer(this.layoutVertexArray,hpt.members),this.indexBuffer=n.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=n.createVertexBuffer(this.dynamicLayoutVertexArray,cpt.members,!0),this.opacityVertexBuffer=n.createVertexBuffer(this.opacityVertexArray,lrt,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(n))};se.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())};f("SymbolBuffers",se);os=function(n,t,i){this.layoutVertexArray=new n;this.layoutAttributes=t;this.indexArray=new i;this.segments=new st;this.collisionVertexArray=new ta};os.prototype.upload=function(n){this.layoutVertexBuffer=n.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes);this.indexBuffer=n.createIndexBuffer(this.indexArray);this.collisionVertexBuffer=n.createVertexBuffer(this.collisionVertexArray,lpt.members,!0)};os.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())};f("CollisionBuffers",os);v=function(n){var u,i,f;this.collisionBoxArray=n.collisionBoxArray;this.zoom=n.zoom;this.overscaling=n.overscaling;this.layers=n.layers;this.layerIds=this.layers.map(function(n){return n.id});this.index=n.index;this.pixelRatio=n.pixelRatio;this.sourceLayerIndex=n.sourceLayerIndex;this.hasPattern=!1;this.hasRTLText=!1;this.sortKeyRanges=[];this.collisionCircleArray=[];this.placementInvProjMatrix=fw([]);this.placementViewportMatrix=fw([]);u=this.layers[0];i=u._unevaluatedLayout._values;this.textSizeData=tb(this.zoom,i["text-size"]);this.iconSizeData=tb(this.zoom,i["icon-size"]);var t=this.layers[0].layout,e=t.get("symbol-sort-key"),r=t.get("symbol-z-order");this.canOverlap=t.get("text-allow-overlap")||t.get("icon-allow-overlap")||t.get("text-ignore-placement")||t.get("icon-ignore-placement");this.sortFeaturesByKey=r!=="viewport-y"&&e.constantOr(1)!==undefined;f=r==="viewport-y"||r==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=f&&this.canOverlap;t.get("symbol-placement")==="point"&&(this.writingModes=t.get("text-writing-mode").map(function(n){return hi[n]}));this.stateDependentLayerIds=this.layers.filter(function(n){return n.isStateDependent()}).map(function(n){return n.id});this.sourceID=n.sourceID};v.prototype.createArrays=function(){this.text=new se(new wi(this.layers,this.zoom,function(n){return/^text/.test(n)}));this.icon=new se(new wi(this.layers,this.zoom,function(n){return/^icon/.test(n)}));this.glyphOffsetArray=new bp;this.lineVertexArray=new kp;this.symbolInstances=new wp};v.prototype.calculateGlyphDependencies=function(n,t,i,r,u){for(var e,f=0;f<n.length;f++)t[n.charCodeAt(f)]=!0,(i||r)&&u&&(e=go[n.charAt(f)],e&&(t[e.charCodeAt(0)]=!0))};v.prototype.populate=function(n,t,i){var e=this.layers[0],u=e.layout,p=u.get("text-font"),h=u.get("text-field"),b=u.get("icon-image"),nt=(h.value.kind!=="constant"||h.value.value instanceof lt&&!h.value.value.isEmpty()||h.value.value.toString().length>0)&&(p.value.kind!=="constant"||p.value.value.length>0),tt=b.value.kind!=="constant"||!!b.value.value||Object.keys(b.parameters).length>0,vt=u.get("symbol-sort-key"),c,k,f,et,d,o,v,ot,st,ht,ct,y,g,s;if(this.features=[],nt||tt){var it=t.iconDependencies,rt=t.glyphDependencies,ut=t.availableImages,yt=new w(this.zoom);for(c=0,k=n;c<k.length;c+=1){var l=k[c],a=l.feature,pt=l.id,wt=l.index,bt=l.sourceLayerIndex,ft=e._featureFilter.needGeometry,r=re(a,ft);if(e._featureFilter.filter(yt,r,i)&&(ft||(r.geometry=ie(a)),f=void 0,nt&&(et=e.getValueAndResolveTokens("text-field",r,i,ut),d=lt.factory(et),kbt(d)&&(this.hasRTLText=!0),(!this.hasRTLText||lp()==="unavailable"||this.hasRTLText&&pi.isParsed())&&(f=ypt(d,e,r))),o=void 0,tt&&(v=e.getValueAndResolveTokens("icon-image",r,i,ut),o=v instanceof ui?v:ui.fromString(v)),f||o)&&(ot=this.sortFeaturesByKey?vt.evaluate(r,{},i):undefined,st={id:pt,text:f,icon:o,index:wt,sourceLayerIndex:bt,geometry:r.geometry,properties:a.properties,type:crt[a.type],sortKey:ot},this.features.push(st),o&&(it[o.name]=!0),f))for(ht=p.evaluate(r,{},i).join(","),ct=u.get("text-rotation-alignment")==="map"&&u.get("symbol-placement")!=="point",this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(hi.vertical)>=0,y=0,g=f.sections;y<g.length;y+=1)if(s=g[y],s.image)it[s.image.name]=!0;else{var kt=ep(f.toString()),at=s.fontStack||ht,dt=rt[at]=rt[at]||{};this.calculateGlyphDependencies(s.text,dt,ct,this.allowVerticalPlacement,kt)}}u.get("symbol-placement")==="line"&&(this.features=ppt(this.features));this.sortFeaturesByKey&&this.features.sort(function(n,t){return n.sortKey-t.sortKey})}};v.prototype.update=function(n,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(n,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(n,t,this.layers,i))};v.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText};v.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload};v.prototype.upload=function(n){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(n),this.iconCollisionBox.upload(n));this.text.upload(n,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload);this.icon.upload(n,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload);this.uploaded=!0};v.prototype.destroyDebugData=function(){this.textCollisionBox.destroy();this.iconCollisionBox.destroy()};v.prototype.destroy=function(){this.text.destroy();this.icon.destroy();this.hasDebugData()&&this.destroyDebugData()};v.prototype.addToLineVertexArray=function(n,t){var o=this.lineVertexArray.length,i,r,u,f;if(n.segment!==undefined){var s=n.dist(t[n.segment+1]),h=n.dist(t[n.segment]),e={};for(i=n.segment+1;i<t.length;i++)e[i]={x:t[i].x,y:t[i].y,tileUnitDistanceFromAnchor:s},i<t.length-1&&(s+=t[i+1].dist(t[i]));for(r=n.segment||0;r>=0;r--)e[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:h},r>0&&(h+=t[r-1].dist(t[r]));for(u=0;u<t.length;u++)f=e[u],this.lineVertexArray.emplaceBack(f.x,f.y,f.tileUnitDistanceFromAnchor)}return{lineStartIndex:o,lineLength:this.lineVertexArray.length-o}};v.prototype.addSymbols=function(n,t,i,r,u,f,e,o,s,h,c,l){for(var rt=n.indexArray,y=n.layoutVertexArray,b=n.segments.prepareSegment(4*t.length,y,rt,this.canOverlap?f.sortKey:undefined),ut=this.glyphOffsetArray.length,at=b.vertexLength,vt=this.allowVerticalPlacement&&e===hi.vertical?Math.PI/2:0,ft=f.text&&f.text.sections,w=0;w<t.length;w++){var a=t[w],et=a.tl,ot=a.tr,st=a.bl,ht=a.br,v=a.tex,k=a.pixelOffsetTL,d=a.pixelOffsetBR,g=a.minFontScaleX,nt=a.minFontScaleY,ct=a.glyphOffset,tt=a.isSDF,lt=a.sectionIndex,p=b.vertexLength,it=ct[1];hv(y,o.x,o.y,et.x,it+et.y,v.x,v.y,i,tt,k.x,k.y,g,nt);hv(y,o.x,o.y,ot.x,it+ot.y,v.x+v.w,v.y,i,tt,d.x,k.y,g,nt);hv(y,o.x,o.y,st.x,it+st.y,v.x,v.y+v.h,i,tt,k.x,d.y,g,nt);hv(y,o.x,o.y,ht.x,it+ht.y,v.x+v.w,v.y+v.h,i,tt,d.x,d.y,g,nt);rb(n.dynamicLayoutVertexArray,o,vt);rt.emplaceBack(p,p+1,p+2);rt.emplaceBack(p+1,p+2,p+3);b.vertexLength+=4;b.primitiveLength+=2;this.glyphOffsetArray.emplaceBack(ct[0]);(w===t.length-1||lt!==t[w+1].sectionIndex)&&n.programConfigurations.populatePaintArrays(y.length,f,f.index,{},l,ft&&ft[lt])}n.placedSymbolArray.emplaceBack(o.x,o.y,ut,this.glyphOffsetArray.length-ut,at,s,h,o.segment,i?i[0]:0,i?i[1]:0,r[0],r[1],e,0,!1,0,c)};v.prototype._addCollisionDebugVertex=function(n,t,i,r,u,f){return t.emplaceBack(0,0),n.emplaceBack(i.x,i.y,r,u,Math.round(f.x),Math.round(f.y))};v.prototype.addCollisionDebugVertices=function(n,t,i,r,u,f,e){var y=u.segments.prepareSegment(4,u.layoutVertexArray,u.indexArray),o=y.vertexLength,c=u.layoutVertexArray,l=u.collisionVertexArray,a=e.anchorX,v=e.anchorY,s;this._addCollisionDebugVertex(c,l,f,a,v,new h(n,t));this._addCollisionDebugVertex(c,l,f,a,v,new h(i,t));this._addCollisionDebugVertex(c,l,f,a,v,new h(i,r));this._addCollisionDebugVertex(c,l,f,a,v,new h(n,r));y.vertexLength+=4;s=u.indexArray;s.emplaceBack(o,o+1);s.emplaceBack(o+1,o+2);s.emplaceBack(o+2,o+3);s.emplaceBack(o+3,o);y.primitiveLength+=4};v.prototype.addDebugCollisionBoxes=function(n,t,i,r){for(var f=n;f<t;f++){var u=this.collisionBoxArray.get(f),e=u.x1,o=u.y1,s=u.x2,h=u.y2;this.addCollisionDebugVertices(e,o,s,h,r?this.textCollisionBox:this.iconCollisionBox,u.anchorPoint,i)}};v.prototype.generateCollisionDebugBuffers=function(){var t,n;for(this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new os(oh,uit.members,yo),this.iconCollisionBox=new os(oh,uit.members,yo),t=0;t<this.symbolInstances.length;t++)n=this.symbolInstances.get(t),this.addDebugCollisionBoxes(n.textBoxStartIndex,n.textBoxEndIndex,n,!0),this.addDebugCollisionBoxes(n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n,!0),this.addDebugCollisionBoxes(n.iconBoxStartIndex,n.iconBoxEndIndex,n,!1),this.addDebugCollisionBoxes(n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex,n,!1)};v.prototype._deserializeCollisionBoxesForSymbol=function(n,t,i,r,u,f,e,o,s){for(var c,y,l,p,a,w,v,h={},b=t;b<i;b++){c=n.get(b);h.textBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY};h.textFeatureIndex=c.featureIndex;break}for(y=r;y<u;y++){l=n.get(y);h.verticalTextBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY};h.verticalTextFeatureIndex=l.featureIndex;break}for(p=f;p<e;p++){a=n.get(p);h.iconBox={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,anchorPointX:a.anchorPointX,anchorPointY:a.anchorPointY};h.iconFeatureIndex=a.featureIndex;break}for(w=o;w<s;w++){v=n.get(w);h.verticalIconBox={x1:v.x1,y1:v.y1,x2:v.x2,y2:v.y2,anchorPointX:v.anchorPointX,anchorPointY:v.anchorPointY};h.verticalIconFeatureIndex=v.featureIndex;break}return h};v.prototype.deserializeCollisionBoxes=function(n){var i,t;for(this.collisionArrays=[],i=0;i<this.symbolInstances.length;i++)t=this.symbolInstances.get(i),this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(n,t.textBoxStartIndex,t.textBoxEndIndex,t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t.iconBoxStartIndex,t.iconBoxEndIndex,t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex))};v.prototype.hasTextData=function(){return this.text.segments.get().length>0};v.prototype.hasIconData=function(){return this.icon.segments.get().length>0};v.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox};v.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0};v.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0};v.prototype.addIndicesForPlacedSymbol=function(n,t){for(var r=n.placedSymbolArray.get(t),u=r.vertexStartIndex+r.numGlyphs*4,i=r.vertexStartIndex;i<u;i+=4)n.indexArray.emplaceBack(i,i+1,i+2),n.indexArray.emplaceBack(i+1,i+2,i+3)};v.prototype.getSortedSymbolIndexes=function(n){var t,i;if(this.sortedAngle===n&&this.symbolInstanceIndexes!==undefined)return this.symbolInstanceIndexes;var e=Math.sin(n),o=Math.cos(n),r=[],u=[],f=[];for(t=0;t<this.symbolInstances.length;++t)f.push(t),i=this.symbolInstances.get(t),r.push(Math.round(e*i.anchorX+o*i.anchorY)|0),u.push(i.featureIndex);return f.sort(function(n,t){return r[n]-r[t]||u[t]-u[n]}),f};v.prototype.addToSortKeyRanges=function(n,t){var i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===t?i.symbolInstanceEnd=n+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:n,symbolInstanceEnd:n+1})};v.prototype.sortFeatures=function(n){var u=this,i,r,f,t;if(this.sortFeaturesByY&&this.sortedAngle!==n&&!(this.text.segments.get().length>1)&&!(this.icon.segments.get().length>1)){for(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(n),this.sortedAngle=n,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],i=0,r=this.symbolInstanceIndexes;i<r.length;i+=1)f=r[i],t=this.symbolInstances.get(f),this.featureSortOrder.push(t.featureIndex),[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach(function(n,t,i){n>=0&&i.indexOf(n)===t&&u.addIndicesForPlacedSymbol(u.text,n)}),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex);this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray);this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}};f("SymbolBucket",v,{omit:["layers","collisionBoxArray","features","compareText"]});v.MAX_GLYPHS=65535;v.addDynamicAttributes=rb;var gbt=new ei({"symbol-placement":new o(t.layout_symbol["symbol-placement"]),"symbol-spacing":new o(t.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new o(t.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new s(t.layout_symbol["symbol-sort-key"]),"symbol-z-order":new o(t.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new o(t.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new o(t.layout_symbol["icon-ignore-placement"]),"icon-optional":new o(t.layout_symbol["icon-optional"]),"icon-rotation-alignment":new o(t.layout_symbol["icon-rotation-alignment"]),"icon-size":new s(t.layout_symbol["icon-size"]),"icon-text-fit":new o(t.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new o(t.layout_symbol["icon-text-fit-padding"]),"icon-image":new s(t.layout_symbol["icon-image"]),"icon-rotate":new s(t.layout_symbol["icon-rotate"]),"icon-padding":new o(t.layout_symbol["icon-padding"]),"icon-keep-upright":new o(t.layout_symbol["icon-keep-upright"]),"icon-offset":new s(t.layout_symbol["icon-offset"]),"icon-anchor":new s(t.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new o(t.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new o(t.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new o(t.layout_symbol["text-rotation-alignment"]),"text-field":new s(t.layout_symbol["text-field"]),"text-font":new s(t.layout_symbol["text-font"]),"text-size":new s(t.layout_symbol["text-size"]),"text-max-width":new s(t.layout_symbol["text-max-width"]),"text-line-height":new o(t.layout_symbol["text-line-height"]),"text-letter-spacing":new s(t.layout_symbol["text-letter-spacing"]),"text-justify":new s(t.layout_symbol["text-justify"]),"text-radial-offset":new s(t.layout_symbol["text-radial-offset"]),"text-variable-anchor":new o(t.layout_symbol["text-variable-anchor"]),"text-anchor":new s(t.layout_symbol["text-anchor"]),"text-max-angle":new o(t.layout_symbol["text-max-angle"]),"text-writing-mode":new o(t.layout_symbol["text-writing-mode"]),"text-rotate":new s(t.layout_symbol["text-rotate"]),"text-padding":new o(t.layout_symbol["text-padding"]),"text-keep-upright":new o(t.layout_symbol["text-keep-upright"]),"text-transform":new s(t.layout_symbol["text-transform"]),"text-offset":new s(t.layout_symbol["text-offset"]),"text-allow-overlap":new o(t.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new o(t.layout_symbol["text-ignore-placement"]),"text-optional":new o(t.layout_symbol["text-optional"])}),nkt=new ei({"icon-opacity":new s(t.paint_symbol["icon-opacity"]),"icon-color":new s(t.paint_symbol["icon-color"]),"icon-halo-color":new s(t.paint_symbol["icon-halo-color"]),"icon-halo-width":new s(t.paint_symbol["icon-halo-width"]),"icon-halo-blur":new s(t.paint_symbol["icon-halo-blur"]),"icon-translate":new o(t.paint_symbol["icon-translate"]),"icon-translate-anchor":new o(t.paint_symbol["icon-translate-anchor"]),"text-opacity":new s(t.paint_symbol["text-opacity"]),"text-color":new s(t.paint_symbol["text-color"],{runtimeType:sr,getOverride:function(n){return n.textColor},hasOverride:function(n){return!!n.textColor}}),"text-halo-color":new s(t.paint_symbol["text-halo-color"]),"text-halo-width":new s(t.paint_symbol["text-halo-width"]),"text-halo-blur":new s(t.paint_symbol["text-halo-blur"]),"text-translate":new o(t.paint_symbol["text-translate"]),"text-translate-anchor":new o(t.paint_symbol["text-translate-anchor"])}),ub={paint:nkt,layout:gbt},ss=function(n){this.type=n.property.overrides?n.property.overrides.runtimeType:as;this.defaultValue=n};ss.prototype.evaluate=function(n){if(n.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(n.formattedSection))return t.getOverride(n.formattedSection)}return n.feature&&n.featureState?this.defaultValue.evaluate(n.feature,n.featureState):this.defaultValue.property.specification.default};ss.prototype.eachChild=function(n){if(!this.defaultValue.isConstant()){var t=this.defaultValue.value;n(t._styleExpression.expression)}};ss.prototype.outputDefined=function(){return!1};ss.prototype.serialize=function(){return null};f("FormatSectionOverride",ss,{omit:["defaultValue"]});var tkt=function(n){function t(t){n.call(this,t,ub)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,i){var f,r,u,e,o;if(n.prototype.recalculate.call(this,t,i),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point")if(f=this.layout.get("text-writing-mode"),f){for(r=[],u=0,e=f;u<e.length;u+=1)o=e[u],r.indexOf(o)<0&&r.push(o);this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"];this._setPaintOverrides()},t.prototype.getValueAndResolveTokens=function(n,t,i,r){var u=this.layout.get(n).evaluate(t,{},i,r),f=this._unevaluatedLayout._values[n];return!f.isDataDriven()&&!il(f.value)&&u?dbt(t.properties,u):u},t.prototype.createBucket=function(n){return new v(n)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype._setPaintOverrides=function(){for(var r,i=0,u=ub.paint.overridableProperties;i<u.length;i+=1)if(r=u[i],t.hasPaintOverride(this.layout,r)){var n=this.paint.get(r),o=new ss(n),f=new ro(o,n.property.specification),e=null;e=n.value.kind==="constant"||n.value.kind==="source"?new bf("source",f):new rf("composite",f,n.value.zoomStops,n.value._interpolationType);this.paint._values[r]=new fi(n.property,e,n.parameters)}},t.prototype._handleOverridablePaintPropertyUpdate=function(n,i,r){return!this.layout||i.isDataDriven()||r.isDataDriven()?!1:t.hasPaintOverride(this.layout,n)},t.hasPaintOverride=function(n,t){var i=n.get("text-field"),o=ub.paint.properties[t],r=!1,u=function(n){for(var u,t=0,i=n;t<i.length;t+=1)if(u=i[t],o.overrides&&o.overrides.hasOverride(u)){r=!0;return}},f,e;return i.value.kind==="constant"&&i.value.value instanceof lt?u(i.value.value.sections):i.value.kind==="source"&&(f=function(n){if(!r)if(n instanceof ki&&et(n.value)===vs){var t=n.value;u(t.sections)}else n instanceof hr?u(n.sections):n.eachChild(f)},e=i.value,e._styleExpression&&f(e._styleExpression.expression)),r},t}(yr),ikt=new ei({"background-color":new o(t.paint_background["background-color"]),"background-pattern":new ne(t.paint_background["background-pattern"]),"background-opacity":new o(t.paint_background["background-opacity"])}),rkt={paint:ikt},ukt=function(n){function t(t){n.call(this,t,rkt)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(yr),fkt=new ei({"raster-opacity":new o(t.paint_raster["raster-opacity"]),"raster-hue-rotate":new o(t.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new o(t.paint_raster["raster-brightness-min"]),"raster-brightness-max":new o(t.paint_raster["raster-brightness-max"]),"raster-saturation":new o(t.paint_raster["raster-saturation"]),"raster-contrast":new o(t.paint_raster["raster-contrast"]),"raster-resampling":new o(t.paint_raster["raster-resampling"]),"raster-fade-duration":new o(t.paint_raster["raster-fade-duration"])}),ekt={paint:fkt},okt=function(n){function t(t){n.call(this,t,ekt)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(yr);art=function(n){function t(t){n.call(this,t,{});this.implementation=t}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},t.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==undefined},t.prototype.recalculate=function(){},t.prototype.updateTransitions=function(){},t.prototype.hasTransition=function(){},t.prototype.serialize=function(){},t.prototype.onAdd=function(n){if(this.implementation.onAdd)this.implementation.onAdd(n,n.painter.context.gl)},t.prototype.onRemove=function(n){if(this.implementation.onRemove)this.implementation.onRemove(n,n.painter.context.gl)},t}(yr);vrt={circle:eat,heatmap:sat,hillshade:lat,fill:pvt,"fill-extrusion":yyt,line:iit,symbol:tkt,background:ukt,raster:okt};var yrt=e.HTMLImageElement,prt=e.HTMLCanvasElement,wrt=e.HTMLVideoElement,brt=e.ImageData,cv=e.ImageBitmap,he=function(n,t,i,r){this.context=n;this.format=i;this.texture=n.gl.createTexture();this.update(t,r)};he.prototype.update=function(n,t,i){var u=n.width,f=n.height,c=(!this.size||this.size[0]!==u||this.size[1]!==f)&&!i,l=this,e=l.context,r=e.gl;if(this.useMipmap=Boolean(t&&t.useMipmap),r.bindTexture(r.TEXTURE_2D,this.texture),e.pixelStoreUnpackFlipY.set(!1),e.pixelStoreUnpack.set(1),e.pixelStoreUnpackPremultiplyAlpha.set(this.format===r.RGBA&&(!t||t.premultiply!==!1)),c)this.size=[u,f],n instanceof yrt||n instanceof prt||n instanceof wrt||n instanceof brt||cv&&n instanceof cv?r.texImage2D(r.TEXTURE_2D,0,this.format,this.format,r.UNSIGNED_BYTE,n):r.texImage2D(r.TEXTURE_2D,0,this.format,u,f,0,this.format,r.UNSIGNED_BYTE,n.data);else{var o=i||{x:0,y:0},s=o.x,h=o.y;n instanceof yrt||n instanceof prt||n instanceof wrt||n instanceof brt||cv&&n instanceof cv?r.texSubImage2D(r.TEXTURE_2D,0,s,h,r.RGBA,r.UNSIGNED_BYTE,n):r.texSubImage2D(r.TEXTURE_2D,0,s,h,u,f,r.RGBA,r.UNSIGNED_BYTE,n.data)}this.useMipmap&&this.isSizePowerOfTwo()&&r.generateMipmap(r.TEXTURE_2D)};he.prototype.bind=function(n,t,i){var u=this,f=u.context,r=f.gl;r.bindTexture(r.TEXTURE_2D,this.texture);i!==r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=r.LINEAR);n!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,n),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,i||n),this.filter=n);t!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,t),this.wrap=t)};he.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0};he.prototype.destroy=function(){var n=this.context,t=n.gl;t.deleteTexture(this.texture);this.texture=null};lv=function(n){var t=this;this._callback=n;this._triggered=!1;typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1;t._callback()})};lv.prototype.trigger=function(){var n=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){n._triggered=!1;n._callback()},0))};lv.prototype.remove=function(){delete this._channel;this._callback=function(){}};ce=function(n,t,i){this.target=n;this.parent=t;this.mapId=i;this.callbacks={};this.tasks={};this.taskQueue=[];this.cancelCallbacks={};db(["receive","process"],this);this.invoker=new lv(this.process);this.target.addEventListener("message",this.receive,!1);this.globalScope=ic()?n:e};ce.prototype.send=function(n,t,i,r,u){var e=this,f,o;return u===void 0&&(u=!1),f=Math.round(Math.random()*1000000000000000000).toString(36).substring(0,10),i&&(this.callbacks[f]=i),o=nk(this.globalScope)?undefined:[],this.target.postMessage({id:f,type:n,hasCallback:!!i,targetMapId:r,mustQueue:u,sourceMapId:this.mapId,data:rh(t,o)},o),{cancel:function(){i&&delete e.callbacks[f];e.target.postMessage({id:f,type:"<cancel>",targetMapId:r,sourceMapId:e.mapId})}}};ce.prototype.receive=function(n){var t=n.data,i=t.id,r;i&&(t.targetMapId&&this.mapId!==t.targetMapId||(t.type==="<cancel>"?(delete this.tasks[i],r=this.cancelCallbacks[i],delete this.cancelCallbacks[i],r&&r()):ic()||t.mustQueue?(this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()):this.processTask(i,t)))};ce.prototype.process=function(){if(this.taskQueue.length){var n=this.taskQueue.shift(),t=this.tasks[n];(delete this.tasks[n],this.taskQueue.length&&this.invoker.trigger(),t)&&this.processTask(n,t)}};ce.prototype.processTask=function(n,t){var u=this,r,s,c;if(t.type==="<response>")r=this.callbacks[n],delete this.callbacks[n],r&&(t.error?r(uh(t.error)):r(null,uh(t.data)));else{var f=!1,h=nk(this.globalScope)?undefined:[],e=t.hasCallback?function(t,i){f=!0;delete u.cancelCallbacks[n];u.target.postMessage({id:n,type:"<response>",sourceMapId:u.mapId,error:t?rh(t):null,data:rh(i,h)},h)}:function(){f=!0},i=null,o=uh(t.data);this.parent[t.type]?i=this.parent[t.type](t.sourceMapId,o,e):this.parent.getWorkerSource?(s=t.type.split("."),c=this.parent.getWorkerSource(t.sourceMapId,s[0],o.source),i=c[s[1]](o,e)):e(new Error("Could not find function "+t.type));!f&&i&&i.cancel&&(this.cancelCallbacks[n]=i.cancel)}};ce.prototype.remove=function(){this.invoker.remove();this.target.removeEventListener("message",this.receive,!1)};nt=function(n,t){n&&(t?this.setSouthWest(n).setNorthEast(t):n.length===4?this.setSouthWest([n[0],n[1]]).setNorthEast([n[2],n[3]]):this.setSouthWest(n[0]).setNorthEast(n[1]))};nt.prototype.setNorthEast=function(n){return this._ne=n instanceof b?new b(n.lng,n.lat):b.convert(n),this};nt.prototype.setSouthWest=function(n){return this._sw=n instanceof b?new b(n.lng,n.lat):b.convert(n),this};nt.prototype.extend=function(n){var r=this._sw,u=this._ne,t,i,f,e;if(n instanceof b)t=n,i=n;else if(n instanceof nt){if(t=n._sw,i=n._ne,!t||!i)return this}else return Array.isArray(n)?n.length===4||n.every(Array.isArray)?(f=n,this.extend(nt.convert(f))):(e=n,this.extend(b.convert(e))):this;return r||u?(r.lng=Math.min(t.lng,r.lng),r.lat=Math.min(t.lat,r.lat),u.lng=Math.max(i.lng,u.lng),u.lat=Math.max(i.lat,u.lat)):(this._sw=new b(t.lng,t.lat),this._ne=new b(i.lng,i.lat)),this};nt.prototype.getCenter=function(){return new b((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)};nt.prototype.getSouthWest=function(){return this._sw};nt.prototype.getNorthEast=function(){return this._ne};nt.prototype.getNorthWest=function(){return new b(this.getWest(),this.getNorth())};nt.prototype.getSouthEast=function(){return new b(this.getEast(),this.getSouth())};nt.prototype.getWest=function(){return this._sw.lng};nt.prototype.getSouth=function(){return this._sw.lat};nt.prototype.getEast=function(){return this._ne.lng};nt.prototype.getNorth=function(){return this._ne.lat};nt.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]};nt.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"};nt.prototype.isEmpty=function(){return!(this._sw&&this._ne)};nt.prototype.contains=function(n){var i=b.convert(n),t=i.lng,r=i.lat,f=this._sw.lat<=r&&r<=this._ne.lat,u=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(u=this._sw.lng>=t&&t>=this._ne.lng),f&&u};nt.convert=function(n){return!n||n instanceof nt?n:new nt(n)};fb=6371008.8;b=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid LngLat object: ("+n+", "+t+")");if(this.lng=+n,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90");};b.prototype.wrap=function(){return new b(yb(this.lng,-180,180),this.lat)};b.prototype.toArray=function(){return[this.lng,this.lat]};b.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"};b.prototype.distanceTo=function(n){var t=Math.PI/180,i=this.lat*t,r=n.lat*t,u=Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((n.lng-this.lng)*t);return fb*Math.acos(Math.min(u,1))};b.prototype.toBounds=function(n){n===void 0&&(n=0);var t=360*n/40075017,i=t/Math.cos(Math.PI/180*this.lat);return new nt(new b(this.lng-i,this.lat-t),new b(this.lng+i,this.lat+t))};b.convert=function(n){if(n instanceof b)return n;if(Array.isArray(n)&&(n.length===2||n.length===3))return new b(Number(n[0]),Number(n[1]));if(!Array.isArray(n)&&typeof n=="object"&&n!==null)return new b(Number("lng"in n?n.lng:n.lon),Number(n.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>]");};eb=2*Math.PI*fb;hf=function(n,t,i){i===void 0&&(i=0);this.x=+n;this.y=+t;this.z=+i};hf.fromLngLat=function(n,t){t===void 0&&(t=0);var i=b.convert(n);return new hf(grt(i.lng),nut(i.lat),tut(t,i.lat))};hf.prototype.toLngLat=function(){return new b(lkt(this.x),ob(this.y))};hf.prototype.toAltitude=function(){return akt(this.z,this.y)};hf.prototype.meterInMercatorCoordinateUnits=function(){return 1/eb*vkt(ob(this.y))};cf=function(n,t,i){this.z=n;this.x=t;this.y=i;this.key=dh(0,n,n,t,i)};cf.prototype.equals=function(n){return this.z===n.z&&this.x===n.x&&this.y===n.y};cf.prototype.url=function(n,t){var i=ckt(this.x,this.y,this.z),r=ykt(this.z,this.x,this.y);return n[(this.x+this.y)%n.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(t==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",i)};cf.prototype.getTilePoint=function(n){var t=Math.pow(2,this.z);return new h((n.x*t-this.x)*rt,(n.y*t-this.y)*rt)};cf.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};sb=function(n,t){this.wrap=n;this.canonical=t;this.key=dh(n,t.z,t.z,t.x,t.y)};tt=function(n,t,i,r,u){this.overscaledZ=n;this.wrap=t;this.canonical=new cf(i,+r,+u);this.key=dh(t,n,i,r,u)};tt.prototype.equals=function(n){return this.overscaledZ===n.overscaledZ&&this.wrap===n.wrap&&this.canonical.equals(n.canonical)};tt.prototype.scaledTo=function(n){var t=this.canonical.z-n;return n>this.canonical.z?new tt(n,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new tt(n,this.wrap,n,this.canonical.x>>t,this.canonical.y>>t)};tt.prototype.calculateScaledKey=function(n,t){var i=this.canonical.z-n;return n>this.canonical.z?dh(this.wrap*+t,n,this.canonical.z,this.canonical.x,this.canonical.y):dh(this.wrap*+t,n,n,this.canonical.x>>i,this.canonical.y>>i)};tt.prototype.isChildOf=function(n){if(n.wrap!==this.wrap)return!1;var t=this.canonical.z-n.canonical.z;return n.overscaledZ===0||n.overscaledZ<this.overscaledZ&&n.canonical.x===this.canonical.x>>t&&n.canonical.y===this.canonical.y>>t};tt.prototype.children=function(n){if(this.overscaledZ>=n)return[new tt(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,i=this.canonical.x*2,r=this.canonical.y*2;return[new tt(t,this.wrap,t,i,r),new tt(t,this.wrap,t,i+1,r),new tt(t,this.wrap,t,i,r+1),new tt(t,this.wrap,t,i+1,r+1)]};tt.prototype.isLessThan=function(n){return this.wrap<n.wrap?!0:this.wrap>n.wrap?!1:this.overscaledZ<n.overscaledZ?!0:this.overscaledZ>n.overscaledZ?!1:this.canonical.x<n.canonical.x?!0:this.canonical.x>n.canonical.x?!1:this.canonical.y<n.canonical.y?!0:!1};tt.prototype.wrapped=function(){return new tt(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)};tt.prototype.unwrapTo=function(n){return new tt(this.overscaledZ,n,this.canonical.z,this.canonical.x,this.canonical.y)};tt.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)};tt.prototype.toUnwrapped=function(){return new sb(this.wrap,this.canonical)};tt.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y};tt.prototype.getTilePoint=function(n){return this.canonical.getTilePoint(new hf(n.x-this.wrap,n.y))};f("CanonicalTileID",cf);f("OverscaledTileID",tt,{omit:["posMatrix"]});wr=function(n,t,i){var r,u;if(this.uid=n,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(i&&i!=="mapbox"&&i!=="terrarium")return gt('"'+i+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');for(this.stride=t.height,r=this.dim=t.height-2,this.data=new Uint32Array(t.data.buffer),this.encoding=i||"mapbox",u=0;u<r;u++)this.data[this._idx(-1,u)]=this.data[this._idx(0,u)],this.data[this._idx(r,u)]=this.data[this._idx(r-1,u)],this.data[this._idx(u,-1)]=this.data[this._idx(u,0)],this.data[this._idx(u,r)]=this.data[this._idx(u,r-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)];this.data[this._idx(r,-1)]=this.data[this._idx(r-1,0)];this.data[this._idx(-1,r)]=this.data[this._idx(0,r-1)];this.data[this._idx(r,r)]=this.data[this._idx(r-1,r-1)]};wr.prototype.get=function(n,t){var i=new Uint8Array(this.data.buffer),r=this._idx(n,t)*4,u=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return u(i[r],i[r+1],i[r+2])};wr.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]};wr.prototype._idx=function(n,t){if(n<-1||n>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(n+1)};wr.prototype._unpackMapbox=function(n,t,i){return(n*65536+t*256+i)/10-1e4};wr.prototype._unpackTerrarium=function(n,t,i){return n*256+t+i/256-32768};wr.prototype.getPixels=function(){return new kt({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))};wr.prototype.backfillBorder=function(n,t,i){var h,c,r,u;if(this.dim!==n.dim)throw new Error("dem dimension mismatch");var f=t*this.dim,e=t*this.dim+this.dim,o=i*this.dim,s=i*this.dim+this.dim;switch(t){case-1:f=e-1;break;case 1:e=f+1}switch(i){case-1:o=s-1;break;case 1:s=o+1}for(h=-t*this.dim,c=-i*this.dim,r=o;r<s;r++)for(u=f;u<e;u++)this.data[this._idx(u,r)]=n.data[this._idx(u+h,r+c)]};f("DEMData",wr);gh=function(n){var t,i;for(this._stringToNumber={},this._numberToString=[],t=0;t<n.length;t++)i=n[t],this._stringToNumber[i]=t,this._numberToString[t]=i};gh.prototype.encode=function(n){return this._stringToNumber[n]};gh.prototype.decode=function(n){return this._numberToString[n]};nc=function(n,t,i,r,u){this.type="Feature";this._vectorTileFeature=n;n._z=t;n._x=i;n._y=r;this.properties=n.properties;this.id=u};av={geometry:{configurable:!0}};av.geometry.get=function(){return this._geometry===undefined&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry};av.geometry.set=function(n){this._geometry=n};nc.prototype.toJSON=function(){var t={geometry:this.geometry};for(var n in this)n!=="_geometry"&&n!=="_vectorTileFeature"&&(t[n]=this[n]);return t};Object.defineProperties(nc.prototype,av);le=function(){this.state={};this.stateChanges={};this.deletedStates={}};le.prototype.updateState=function(n,t,i){var r=String(t),u,o,f,e,s;if(this.stateChanges[n]=this.stateChanges[n]||{},this.stateChanges[n][r]=this.stateChanges[n][r]||{},ri(this.stateChanges[n][r],i),this.deletedStates[n]===null){this.deletedStates[n]={};for(u in this.state[n])u!==r&&(this.deletedStates[n][u]=null)}else if(o=this.deletedStates[n]&&this.deletedStates[n][r]===null,o){this.deletedStates[n][r]={};for(f in this.state[n][r])i[f]||(this.deletedStates[n][r][f]=null)}else for(e in i)s=this.deletedStates[n]&&this.deletedStates[n][r]&&this.deletedStates[n][r][e]===null,s&&delete this.deletedStates[n][r][e]};le.prototype.removeFeatureState=function(n,t,i){var f=this.deletedStates[n]===null,r,u;if(!f)if(r=String(t),this.deletedStates[n]=this.deletedStates[n]||{},i&&t!==undefined)this.deletedStates[n][r]!==null&&(this.deletedStates[n][r]=this.deletedStates[n][r]||{},this.deletedStates[n][r][i]=null);else if(t!==undefined)if(u=this.stateChanges[n]&&this.stateChanges[n][r],u){this.deletedStates[n][r]={};for(i in this.stateChanges[n][r])this.deletedStates[n][r][i]=null}else this.deletedStates[n][r]=null;else this.deletedStates[n]=null};le.prototype.getState=function(n,t){var r=String(t),e=this.state[n]||{},o=this.stateChanges[n]||{},u=ri({},e[r],o[r]),i,f;if(this.deletedStates[n]===null)return{};if(this.deletedStates[n]){if(i=this.deletedStates[n][t],i===null)return{};for(f in i)delete u[f]}return u};le.prototype.initializeTileState=function(n,t){n.setFeatureState(this.state,t)};le.prototype.coalesceChanges=function(n,t){var e={},r,h,u,i,o,c,f,a,s,l,v,y,p;for(r in this.stateChanges){this.state[r]=this.state[r]||{};h={};for(u in this.stateChanges[r])this.state[r][u]||(this.state[r][u]={}),ri(this.state[r][u],this.stateChanges[r][u]),h[u]=this.state[r][u];e[r]=h}for(i in this.deletedStates){if(this.state[i]=this.state[i]||{},o={},this.deletedStates[i]===null)for(c in this.state[i])o[c]={},this.state[i][c]={};else for(f in this.deletedStates[i]){if(a=this.deletedStates[i][f]===null,a)this.state[i][f]={};else for(s=0,l=Object.keys(this.deletedStates[i][f]);s<l.length;s+=1)v=l[s],delete this.state[i][f][v];o[f]=this.state[i][f]}e[i]=e[i]||{};ri(e[i],o)}if(this.stateChanges={},this.deletedStates={},Object.keys(e).length!==0)for(y in n)p=n[y],p.setFeatureState(e,t)};br=function(n,t){this.tileID=n;this.x=n.canonical.x;this.y=n.canonical.y;this.z=n.canonical.z;this.grid=new df(rt,16,0);this.grid3D=new df(rt,16,0);this.featureIndexArray=new gp;this.promoteId=t};br.prototype.insert=function(n,t,i,r,u,f){var a=this.featureIndexArray.length,l,s,c,e,h,o;for(this.featureIndexArray.emplaceBack(i,r,u),l=f?this.grid3D:this.grid,s=0;s<t.length;s++){for(c=t[s],e=[Infinity,Infinity,-Infinity,-Infinity],h=0;h<c.length;h++)o=c[h],e[0]=Math.min(e[0],o.x),e[1]=Math.min(e[1],o.y),e[2]=Math.max(e[2],o.x),e[3]=Math.max(e[3],o.y);e[0]<rt&&e[1]<rt&&e[2]>=0&&e[3]>=0&&l.insert(a,e[0],e[1],e[2],e[3])}};br.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ko.VectorTile(new nv(this.rawTileData)).layers,this.sourceLayerCoder=new gh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers};br.prototype.query=function(n,t,i,r){var c=this,s,a,w,v,b,k,h;this.loadVTLayers();var l=n.params||{},y=rt/n.tileSize/n.scale,d=el(l.filter),p=n.queryGeometry,u=n.queryPadding*y,f=rut(p),e=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),o=rut(n.cameraQueryGeometry),g=this.grid3D.query(o.minX-u,o.minY-u,o.maxX+u,o.maxY+u,function(t,i,r,f){return vct(n.cameraQueryGeometry,t-u,i-u,r+u,f+u)});for(s=0,a=g;s<a.length;s+=1)w=a[s],e.push(w);for(e.sort(wkt),v={},k=function(u){var s=e[u],f,o;s!==b&&(b=s,f=c.featureIndexArray.get(s),o=null,c.loadMatchingFeature(v,f.bucketIndex,f.sourceLayerIndex,f.featureIndex,d,l.layers,l.availableImages,t,i,r,function(t,i,r){return o||(o=ie(t)),i.queryIntersectsFeature(p,t,r,o,c.z,n.transform,y,n.pixelPosMatrix)}))},h=0;h<e.length;h++)k(h);return v};br.prototype.loadMatchingFeature=function(n,t,i,r,u,f,e,o,s,h,c){var g=this.bucketLayerIDs[t],rt,b,k,a,v,p,y,nt,tt,d;if(!f||aut(f,g)){var it=this.sourceLayerCoder.decode(i),ut=this.vtLayers[it],l=ut.feature(r);if(u.needGeometry){if(rt=re(l,!0),!u.filter(new w(this.tileID.overscaledZ),rt,this.tileID.canonical))return}else if(!u.filter(new w(this.tileID.overscaledZ),l))return;for(b=this.getId(l,it),k=0;k<g.length;k++)(a=g[k],f&&f.indexOf(a)<0)||(v=o[a],v)&&(p={},b!==undefined&&h&&(p=h.getState(v.sourceLayer||"_geojsonTileLayer",b)),y=ri({},s[a]),y.paint=iut(y.paint,v.paint,l,p,e),y.layout=iut(y.layout,v.layout,l,p,e),nt=!c||c(l,v,p),nt)&&(tt=new nc(l,this.z,this.x,this.y,b),tt.layer=y,d=n[a],d===undefined&&(d=n[a]=[]),d.push({featureIndex:r,feature:tt,intersectionZ:nt}))}};br.prototype.lookupSymbolFeatures=function(n,t,i,r,u,f,e,o){var c={},l,s,h,a;for(this.loadVTLayers(),l=el(u),s=0,h=n;s<h.length;s+=1)a=h[s],this.loadMatchingFeature(c,i,r,a,l,f,e,o,t);return c};br.prototype.hasLayer=function(n){for(var f,i,u,e,t=0,r=this.bucketLayerIDs;t<r.length;t+=1)for(f=r[t],i=0,u=f;i<u.length;i+=1)if(e=u[i],n===e)return!0;return!1};br.prototype.getId=function(n,t){var i=n.id,r;return this.promoteId&&(r=typeof this.promoteId=="string"?this.promoteId:this.promoteId[t],i=n.properties[r],typeof i=="boolean"&&(i=Number(i))),i};f("FeatureIndex",br,{omit:["rawTileData","sourceLayerCoder"]});uut=3e4;ut=function(n,t){this.tileID=n;this.uid=wb();this.uses=0;this.tileSize=t;this.buckets={};this.expirationTime=null;this.queryPadding=0;this.hasSymbolBuckets=!1;this.hasRTLText=!1;this.dependencies={};this.expiredRequestCount=0;this.state="loading"};ut.prototype.registerFadeDuration=function(n){var t=n+this.timeAdded;t<ye.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)};ut.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"};ut.prototype.loadVectorData=function(n,t,i){var e,r,o,u,f,s;if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!n){this.collisionBoxArray=new sa;return}n.featureIndex&&(this.latestFeatureIndex=n.featureIndex,n.rawTileData?(this.latestRawTileData=n.rawTileData,this.latestFeatureIndex.rawTileData=n.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData));this.collisionBoxArray=n.collisionBoxArray;this.buckets=pkt(n.buckets,t.style);this.hasSymbolBuckets=!1;for(e in this.buckets)if(r=this.buckets[e],r instanceof v)if(this.hasSymbolBuckets=!0,i)r.justReloaded=!0;else break;if(this.hasRTLText=!1,this.hasSymbolBuckets)for(o in this.buckets)if(u=this.buckets[o],u instanceof v&&u.hasRTLText){this.hasRTLText=!0;vht();break}this.queryPadding=0;for(f in this.buckets)s=this.buckets[f],this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(f).queryRadius(s));n.imageAtlas&&(this.imageAtlas=n.imageAtlas);n.glyphAtlasImage&&(this.glyphAtlasImage=n.glyphAtlasImage)};ut.prototype.unloadVectorData=function(){for(var n in this.buckets)this.buckets[n].destroy();this.buckets={};this.imageAtlasTexture&&this.imageAtlasTexture.destroy();this.imageAtlas&&(this.imageAtlas=null);this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy();this.latestFeatureIndex=null;this.state="unloaded"};ut.prototype.getBucket=function(n){return this.buckets[n.id]};ut.prototype.upload=function(n){var r,t,i;for(r in this.buckets)t=this.buckets[r],t.uploadPending()&&t.upload(n);i=n.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new he(n,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0);this.glyphAtlasImage&&(this.glyphAtlasTexture=new he(n,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)};ut.prototype.prepare=function(n){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(n,this.imageAtlasTexture)};ut.prototype.queryRenderedFeatures=function(n,t,i,r,u,f,e,o,s,h){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:u,scale:f,tileSize:this.tileSize,pixelPosMatrix:h,transform:o,params:e,queryPadding:this.queryPadding*s},n,t,i)};ut.prototype.querySourceFeatures=function(n,t){var r=this.latestFeatureIndex,u,i,y,p,s;if(r&&r.rawTileData){var h=r.loadVTLayers(),c=t?t.sourceLayer:"",f=h._geojsonTileLayer||h[c];if(f){var e=el(t&&t.filter),o=this.tileID.canonical,l=o.z,a=o.x,v=o.y,b={z:l,x:a,y:v};for(u=0;u<f.length;u++){if(i=f.feature(u),e.needGeometry){if(y=re(i,!0),!e.filter(new w(this.tileID.overscaledZ),y,this.tileID.canonical))continue}else if(!e.filter(new w(this.tileID.overscaledZ),i))continue;p=r.getId(i,c);s=new nc(i,l,a,v,p);s.tile=b;n.push(s)}}}};ut.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"};ut.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length};ut.prototype.setExpiryData=function(n){var i=this.expirationTime,r,u,t,f;n.cacheControl?(r=bv(n.cacheControl),r["max-age"]&&(this.expirationTime=Date.now()+r["max-age"]*1e3)):n.expires&&(this.expirationTime=new Date(n.expires).getTime());this.expirationTime&&(u=Date.now(),t=!1,this.expirationTime>u?t=!1:i?this.expirationTime<i?t=!0:(f=this.expirationTime-i,f?this.expirationTime=u+Math.max(f,uut):t=!0):t=!0,t?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0)};ut.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};ut.prototype.setFeatureState=function(n,t){var e,i,f;if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(n).length!==0){e=this.latestFeatureIndex.loadVTLayers();for(i in this.buckets)if(t.style.hasLayer(i)){var r=this.buckets[i],o=r.layers[0].sourceLayer||"_geojsonTileLayer",s=e[o],u=n[o];s&&u&&Object.keys(u).length!==0&&(r.update(u,s,this.imageAtlas&&this.imageAtlas.patternPositions||{}),f=t&&t.style&&t.style.getLayer(i),f&&(this.queryPadding=Math.max(this.queryPadding,f.queryRadius(r))))}}};ut.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==undefined};ut.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<ye.now()};ut.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=undefined};ut.prototype.setHoldDuration=function(n){this.symbolFadeHoldUntil=ye.now()+n};ut.prototype.setDependencies=function(n,t){for(var f,r={},i=0,u=t;i<u.length;i+=1)f=u[i],r[f]=!0;this.dependencies[n]=r};ut.prototype.hasDependency=function(n,t){for(var o,f,r,e,s,i=0,u=n;i<u.length;i+=1)if(o=u[i],f=this.dependencies[o],f)for(r=0,e=t;r<e.length;r+=1)if(s=e[r],f[s])return!0;return!1};var lf=e.performance,fut=function(n){this._marks={start:[n.url,"start"].join("#"),end:[n.url,"end"].join("#"),measure:n.url.toString()};lf.mark(this._marks.start)};fut.prototype.finish=function(){lf.mark(this._marks.end);var n=lf.getEntriesByName(this._marks.measure);return n.length===0&&(lf.measure(this._marks.measure,this._marks.start,this._marks.end),n=lf.getEntriesByName(this._marks.measure),lf.clearMarks(this._marks.start),lf.clearMarks(this._marks.end),lf.clearMeasures(this._marks.measure)),n};n.Actor=ce;n.AlphaImage=of;n.CanonicalTileID=cf;n.CollisionBoxArray=sa;n.Color=y;n.DEMData=wr;n.DataConstantProperty=o;n.DictionaryCoder=gh;n.EXTENT=rt;n.ErrorEvent=sy;n.EvaluationParameters=w;n.Event=ac;n.Evented=tu;n.FeatureIndex=br;n.FillBucket=gi;n.FillExtrusionBucket=nr;n.ImageAtlas=is;n.ImagePosition=rv;n.LineBucket=dt;n.LngLat=b;n.LngLatBounds=nt;n.MercatorCoordinate=hf;n.ONE_EM=ht;n.OverscaledTileID=tt;n.Point=h;n.Point$1=h;n.Properties=ei;n.Protobuf=nv;n.RGBAImage=kt;n.RequestManager=vi;n.RequestPerformance=fut;n.ResourceType=iy;n.SegmentVector=st;n.SourceFeatureState=le;n.StructArrayLayout1ui2=ea;n.StructArrayLayout2f1f2i16=na;n.StructArrayLayout2i4=ao;n.StructArrayLayout3ui6=vu;n.StructArrayLayout4i8=yl;n.SymbolBucket=v;n.Texture=he;n.Tile=ut;n.Transitionable=vr;n.Uniform1f=la;n.Uniform1i=ict;n.Uniform2f=rct;n.Uniform3f=uct;n.Uniform4f=vn;n.UniformColor=yn;n.UniformMatrix4f=ect;n.UnwrappedTileID=sb;n.ValidationError=u;n.WritingMode=hi;n.ZoomHistory=cl;n.add=alt;n.addDynamicAttributes=rb;n.asyncAll=out;n.bezier=ab;n.bindAll=db;n.browser=ye;n.cacheEntryPossiblyAdded=aft;n.clamp=af;n.clearTileCache=yft;n.clipLine=urt;n.clone=ilt;n.clone$1=kr;n.clone$2=llt;n.collisionCircleLayout=apt;n.config=ct;n.create=tlt;n.create$1=gct;n.create$2=kct;n.createCommonjsModule=tc;n.createExpression=rl;n.createLayout=vt;n.createStyleLayer=hkt;n.cross=blt;n.deepEqual=vv;n.dot=wlt;n.dot$1=tat;n.ease=vb;n.emitValidationErrors=dg;n.endsWith=yv;n.enforceCacheSizeLimit=vft;n.evaluateSizeForFeature=bit;n.evaluateSizeForZoom=kit;n.evaluateVariableOffset=ort;n.evented=cp;n.extend=ri;n.featureFilter=el;n.filterObject=gb;n.fromRotation=nlt;n.getAnchorAlignment=nb;n.getAnchorJustification=ib;n.getArrayBuffer=uy;n.getImage=ey;n.getJSON=dft;n.getRTLTextPluginStatus=lp;n.getReferrer=ry;n.getVideo=wk;n.identity=fw;n.invert=rlt;n.isChar=r;n.isMapboxURL=dr;n.keysDifference=hut;n.makeRequest=cc;n.mapObject=pv;n.mercatorXfromLng=grt;n.mercatorYfromLat=nut;n.mercatorZfromAltitude=tut;n.mul=ttt;n.multiply=ntt;n.mvt=ko;n.nextPowerOfTwo=lut;n.normalize=plt;n.number=ot;n.offscreenCanvasSupported=vk;n.ortho=hlt;n.parseGlyphPBF=kwt;n.pbf=nv;n.performSymbolLayout=ybt;n.perspective=slt;n.pick=cut;n.plugin=pi;n.polygonIntersectsPolygon=bn;n.postMapLoadEvent=eft;n.postTurnstileEvent=fft;n.potpack=hit;n.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"];n.register=f;n.registerForPluginStateChange=lht;n.renderColorRamp=ott;n.rotate=dct;n.rotateX=elt;n.rotateZ=olt;n.scale=flt;n.scale$1=nat;n.scale$2=ylt;n.setCacheLimits=pft;n.setRTLTextPlugin=aht;n.sphericalToCartesian=yut;n.sqrLen=fat;n.styleSpec=t;n.sub=itt;n.symbolSize=dit;n.transformMat3=klt;n.transformMat4=pa;n.translate=ult;n.triggerPluginCompletionEvent=en;n.uniqueId=wb;n.validateCustomStyleLayer=skt;n.validateLight=nht;n.validateStyle=th;n.values=sut;n.vectorTile=ko;n.version=hb;n.warnOnce=gt;n.webpSupported=fc;n.window=e;n.wrap=yb}),r(["./shared"],function(n){function g(n){var u=typeof n,f,i,e,s,r,o,t;if(u==="number"||u==="boolean"||u==="string"||n===undefined||n===null)return JSON.stringify(n);if(Array.isArray(n)){for(f="[",i=0,e=n;i<e.length;i+=1)s=e[i],f+=g(s)+",";return f+"]"}for(r=Object.keys(n).sort(),o="{",t=0;t<r.length;t++)o+=JSON.stringify(r[t])+":"+g(n[r[t]])+",";return o+"}"}function nr(t){for(var f,r="",i=0,u=n.refProperties;i<u.length;i+=1)f=u[i],r+="/"+g(t[f]);return r}function tr(n,t){for(var u,f,e,o,r={},i=0;i<n.length;i++)u=t&&t[n[i].id]||nr(n[i]),t&&(t[n[i].id]=u),f=r[u],f||(f=r[u]=[]),f.push(n[i]);e=[];for(o in r)e.push(r[o]);return e}function rt(t,i,r){for(var e,o=new n.EvaluationParameters(i),u=0,f=t;u<f.length;u+=1)e=f[u],e.recalculate(o,r)}function ir(t,i){var r=n.getArrayBuffer(t.request,function(t,r,u,f){t?i(t):r&&i(null,{vectorTile:new n.vectorTile.VectorTile(new n.pbf(r)),rawData:r,cacheControl:u,expires:f})});return function(){r.cancel();i()}}function c(n,t){var r=n&&n.type,i;if(r==="FeatureCollection")for(i=0;i<n.features.length;i++)c(n.features[i],t);else if(r==="GeometryCollection")for(i=0;i<n.geometries.length;i++)c(n.geometries[i],t);else if(r==="Feature")c(n.geometry,t);else if(r==="Polygon")ni(n.coordinates,t);else if(r==="MultiPolygon")for(i=0;i<n.coordinates.length;i++)ni(n.coordinates[i],t);return n}function ni(n,t){if(n.length!==0){ti(n[0],t);for(var i=1;i<n.length;i++)ti(n[i],!t)}}function ti(n,t){for(var r,f,i=0,o=0,u=0,s=n.length,e=s-1;u<s;e=u++)r=(n[u][0]-n[e][0])*(n[e][1]+n[u][1]),f=i+r,o+=Math.abs(i)>=Math.abs(r)?i-f+r:r-f+i,i=f;i+o>=0!=!!t&&n.reverse()}function ui(n,t){this.options=t||{};this.features=n;this.length=n.length}function a(n,t){this.id=typeof n.id=="number"?n.id:undefined;this.type=n.type;this.rawGeometry=n.type===1?[n.geometry]:n.geometry;this.properties=n.tags;this.extent=t||4096}function ot(t){var i=new n.pbf;return or(t,i),i.finish()}function er(n,t){var r,i;t=t||{};r={};for(i in n)r[i]=new et(n[i].features,t),r[i].name=i,r[i].version=t.version,r[i].extent=t.extent;return ot({layers:r})}function or(n,t){for(var i in n.layers)t.writeMessage(3,sr,n.layers[i])}function sr(n,t){var i,r,u,f;for(t.writeVarintField(15,n.version||1),t.writeStringField(1,n.name||""),t.writeVarintField(5,n.extent||4096),r={keys:[],values:[],keycache:{},valuecache:{}},i=0;i<n.length;i++)r.feature=n.feature(i),t.writeMessage(2,hr,r);for(u=r.keys,i=0;i<u.length;i++)t.writeStringField(3,u[i]);for(f=r.values,i=0;i<f.length;i++)t.writeMessage(4,ar,f[i])}function hr(n,t){var i=n.feature;i.id!==undefined&&t.writeVarintField(1,i.id);t.writeMessage(2,cr,n);t.writeVarintField(3,i.type);t.writeMessage(4,lr,i)}function cr(n,t){var s=n.feature,h=n.keys,c=n.values,l=n.keycache,a=n.valuecache,r,i,u,f,o,e;for(r in s.properties)(i=s.properties[r],u=l[r],i!==null)&&(typeof u=="undefined"&&(h.push(r),u=h.length-1,l[r]=u),t.writeVarint(u),f=typeof i,f!=="string"&&f!=="boolean"&&f!=="number"&&(i=JSON.stringify(i)),o=f+":"+i,e=a[o],typeof e=="undefined"&&(c.push(i),e=c.length-1,a[o]=e),t.writeVarint(e))}function st(n,t){return(t<<3)+(n&7)}function fi(n){return n<<1^n>>31}function lr(n,t){for(var i,e,o,r,s,h,c=n.loadGeometry(),u=n.type,l=0,a=0,v=c.length,f=0;f<v;f++){for(i=c[f],e=1,u===1&&(e=i.length),t.writeVarint(st(1,e)),o=u===3?i.length-1:i.length,r=0;r<o;r++)r===1&&u!==1&&t.writeVarint(st(2,o-1)),s=i[r].x-l,h=i[r].y-a,t.writeVarint(fi(s)),t.writeVarint(fi(h)),l+=s,a+=h;u===3&&t.writeVarint(st(7,1))}}function ar(n,t){var i=typeof n;i==="string"?t.writeStringField(1,n):i==="boolean"?t.writeBooleanField(7,n):i==="number"&&(n%1!=0?t.writeDoubleField(3,n):n<0?t.writeSVarintField(6,n):t.writeVarintField(5,n))}function ht(n,t,i,r,u,f){if(!(u-r<=i)){var e=r+u>>1;ei(n,t,e,r,u,f%2);ht(n,t,i,r,e-1,f+1);ht(n,t,i,e+1,u,f+1)}}function ei(n,t,i,r,u,f){while(u>r){if(u-r>600){var s=u-r+1,a=i-r+1,v=Math.log(s),c=.5*Math.exp(2*v/3),y=.5*Math.sqrt(v*c*(s-c)/s)*(a-s/2<0?-1:1),p=Math.max(r,Math.floor(i-a*c/s+y)),w=Math.min(u,Math.floor(i+(s-a)*c/s+y));ei(n,t,i,p,w,f)}var l=t[2*i+f],h=r,e=u;for(o(n,t,r,i),t[2*u+f]>l&&o(n,t,r,u);h<e;){for(o(n,t,h,e),h++,e--;t[2*h+f]<l;)h++;while(t[2*e+f]>l)e--}t[2*r+f]===l?o(n,t,r,e):(e++,o(n,t,e,u));e<=i&&(r=e+1);i<=e&&(u=e-1)}}function o(n,t,i,r){ct(n,i,r);ct(t,2*i,2*r);ct(t,2*i+1,2*r+1)}function ct(n,t,i){var r=n[t];n[t]=n[i];n[i]=r}function vr(n,t,i,r,u,f,e){for(var o=[0,n.length-1,0],y=[],s,h,c,l,w;o.length;){var p=o.pop(),a=o.pop(),v=o.pop();if(a-v<=e){for(c=v;c<=a;c++)s=t[2*c],h=t[2*c+1],s>=i&&s<=u&&h>=r&&h<=f&&y.push(n[c]);continue}l=Math.floor((v+a)/2);s=t[2*l];h=t[2*l+1];s>=i&&s<=u&&h>=r&&h<=f&&y.push(n[l]);w=(p+1)%2;(p===0?i<=s:r<=h)&&(o.push(v),o.push(l-1),o.push(w));(p===0?u>=s:f>=h)&&(o.push(l+1),o.push(a),o.push(w))}return y}function yr(n,t,i,r,u,f){for(var e=[0,n.length-1,0],l=[],w=u*u,o,p;e.length;){var a=e.pop(),h=e.pop(),c=e.pop();if(h-c<=f){for(o=c;o<=h;o++)oi(t[2*o],t[2*o+1],i,r)<=w&&l.push(n[o]);continue}var s=Math.floor((c+h)/2),v=t[2*s],y=t[2*s+1];oi(v,y,i,r)<=w&&l.push(n[s]);p=(a+1)%2;(a===0?i-u<=v:r-u<=y)&&(e.push(c),e.push(s-1),e.push(p));(a===0?i+u>=v:r+u>=y)&&(e.push(s+1),e.push(h),e.push(p))}return l}function oi(n,t,i,r){var u=n-i,f=t-r;return u*u+f*f}function kr(n,t,i,r,u){return{x:p(n),y:p(t),zoom:Infinity,id:i,parentId:-1,numPoints:r,properties:u}}function dr(n,t){var i=n.geometry.coordinates,r=i[0],u=i[1];return{x:p(w(r)),y:p(b(u)),zoom:Infinity,index:t,parentId:-1}}function si(n){return{type:"Feature",id:n.id,properties:hi(n),geometry:{type:"Point",coordinates:[gr(n.x),nu(n.y)]}}}function hi(n){var t=n.numPoints,i=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return s(s({},n.properties),{cluster:!0,cluster_id:n.id,point_count:t,point_count_abbreviated:i})}function w(n){return n/360+.5}function b(n){var i=Math.sin(n*Math.PI/180),t=.5-.25*Math.log((1+i)/(1-i))/Math.PI;return t<0?0:t>1?1:t}function gr(n){return(n-.5)*360}function nu(n){var t=(180-n*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function s(n,t){for(var i in t)n[i]=t[i];return n}function ci(n){return n.x}function li(n){return n.y}function lt(n,t,i,r){for(var o,s,e=r,c=i-t>>1,h=i-t,u,l=n[t],a=n[t+1],v=n[i],y=n[i+1],f=t+3;f<i;f+=3)o=tu(n[f],n[f+1],l,a,v,y),o>e?(u=f,e=o):o===e&&(s=Math.abs(f-c),s<h&&(u=f,h=s));e>r&&(u-t>3&&lt(n,t,u,r),n[u+2]=e,i-u>3&&lt(n,u,i,r))}function tu(n,t,i,r,u,f){var e=u-i,o=f-r,s;return(e!==0||o!==0)&&(s=((n-i)*e+(t-r)*o)/(e*e+o*o),s>1?(i=u,r=f):s>0&&(i+=e*s,r+=o*s)),e=n-i,o=t-r,e*e+o*o}function h(n,t,i,r){var u={id:typeof n=="undefined"?null:n,type:t,geometry:i,tags:r,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity};return iu(u),u}function iu(n){var i=n.geometry,r=n.type,t,u;if(r==="Point"||r==="MultiPoint"||r==="LineString")at(n,i);else if(r==="Polygon"||r==="MultiLineString")for(t=0;t<i.length;t++)at(n,i[t]);else if(r==="MultiPolygon")for(t=0;t<i.length;t++)for(u=0;u<i[t].length;u++)at(n,i[t][u])}function at(n,t){for(var i=0;i<t.length;i+=3)n.minX=Math.min(n.minX,t[i]),n.minY=Math.min(n.minY,t[i+1]),n.maxX=Math.max(n.maxX,t[i]),n.maxY=Math.max(n.maxY,t[i+1])}function ru(n,t){var r=[],i;if(n.type==="FeatureCollection")for(i=0;i<n.features.length;i++)k(r,n.features[i],t,i);else n.type==="Feature"?k(r,n,t):k(r,{geometry:n},t);return r}function k(n,t,i,r){var u,l;if(t.geometry){var f=t.geometry.coordinates,o=t.geometry.type,s=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2),e=[],c=t.id;if(i.promoteId?c=t.properties[i.promoteId]:i.generateId&&(c=r||0),o==="Point")ai(f,e);else if(o==="MultiPoint")for(u=0;u<f.length;u++)ai(f[u],e);else if(o==="LineString")vt(f,e,s,!1);else if(o==="MultiLineString"){if(i.lineMetrics){for(u=0;u<f.length;u++)e=[],vt(f[u],e,s,!1),n.push(h(c,"LineString",e,t.properties));return}yt(f,e,s,!1)}else if(o==="Polygon")yt(f,e,s,!0);else if(o==="MultiPolygon")for(u=0;u<f.length;u++)l=[],yt(f[u],l,s,!0),e.push(l);else{if(o==="GeometryCollection"){for(u=0;u<t.geometry.geometries.length;u++)k(n,{id:c,geometry:t.geometry.geometries[u],properties:t.properties},i,r);return}throw new Error("Input data is not a valid GeoJSON object.");}n.push(h(c,o,e,t.properties))}}function ai(n,t){t.push(vi(n[0]));t.push(yi(n[1]));t.push(0)}function vt(n,t,i,r){for(var f,e,h,o,s,c=0,u=0;u<n.length;u++)f=vi(n[u][0]),e=yi(n[u][1]),t.push(f),t.push(e),t.push(0),u>0&&(c+=r?(o*e-f*s)/2:Math.sqrt(Math.pow(f-o,2)+Math.pow(e-s,2))),o=f,s=e;h=t.length-3;t[2]=1;lt(t,0,h,i);t[h+2]=1;t.size=Math.abs(c);t.start=0;t.end=t.size}function yt(n,t,i,r){for(var f,u=0;u<n.length;u++)f=[],vt(n[u],f,i,r),t.push(f)}function vi(n){return n/360+.5}function yi(n){var i=Math.sin(n*Math.PI/180),t=.5-.25*Math.log((1+i)/(1-i))/Math.PI;return t<0?0:t>1?1:t}function r(n,t,i,r,u,f,e,o){var v,p,c,a,w;if(i/=t,r/=t,f>=i&&e<r)return n;if(e<i||f>=r)return null;for(v=[],p=0;p<n.length;p++){var l=n[p],y=l.geometry,s=l.type,b=u===0?l.minX:l.minY,k=u===0?l.maxX:l.maxY;if(b>=i&&k<r){v.push(l);continue}else if(k<i||b>=r)continue;if(c=[],s==="Point"||s==="MultiPoint")uu(y,c,i,r,u);else if(s==="LineString")pi(y,c,i,r,u,!1,o.lineMetrics);else if(s==="MultiLineString")pt(y,c,i,r,u,!1);else if(s==="Polygon")pt(y,c,i,r,u,!0);else if(s==="MultiPolygon")for(a=0;a<y.length;a++)w=[],pt(y[a],w,i,r,u,!0),w.length&&c.push(w);if(c.length){if(o.lineMetrics&&s==="LineString"){for(a=0;a<c.length;a++)v.push(h(l.id,s,c[a],l.tags));continue}(s==="LineString"||s==="MultiLineString")&&(c.length===1?(s="LineString",c=c[0]):s="MultiLineString");(s==="Point"||s==="MultiPoint")&&(s=c.length===3?"Point":"MultiPoint");v.push(h(l.id,s,c,l.tags))}}return v.length?v:null}function uu(n,t,i,r,u){for(var e,f=0;f<n.length;f+=3)e=n[f+u],e>=i&&e<=r&&(t.push(n[f]),t.push(n[f+1]),t.push(n[f+2]))}function pi(n,t,i,r,u,f,e){for(var c,o=wi(n),b=u===0?fu:eu,k=n.start,w,l,a=0;a<n.length-3;a+=3){var s=n[a],h=n[a+1],g=n[a+2],y=n[a+3],p=n[a+4],v=u===0?s:h,d=u===0?y:p,nt=!1;e&&(w=Math.sqrt(Math.pow(s-y,2)+Math.pow(h-p,2)));v<i?d>i&&(l=b(o,s,h,y,p,i),e&&(o.start=k+w*l)):v>r?d<r&&(l=b(o,s,h,y,p,r),e&&(o.start=k+w*l)):wt(o,s,h,g);d<i&&v>=i&&(l=b(o,s,h,y,p,i),nt=!0);d>r&&v<=r&&(l=b(o,s,h,y,p,r),nt=!0);!f&&nt&&(e&&(o.end=k+w*l),t.push(o),o=wi(n));e&&(k+=w)}c=n.length-3;s=n[c];h=n[c+1];g=n[c+2];v=u===0?s:h;v>=i&&v<=r&&wt(o,s,h,g);c=o.length-3;f&&c>=3&&(o[c]!==o[0]||o[c+1]!==o[1])&&wt(o,o[0],o[1],o[2]);o.length&&t.push(o)}function wi(n){var t=[];return t.size=n.size,t.start=n.start,t.end=n.end,t}function pt(n,t,i,r,u,f){for(var e=0;e<n.length;e++)pi(n[e],t,i,r,u,f,!1)}function wt(n,t,i,r){n.push(t);n.push(i);n.push(r)}function fu(n,t,i,r,u,f){var e=(f-t)/(r-t);return n.push(f),n.push(i+(u-i)*e),n.push(1),e}function eu(n,t,i,r,u,f){var e=(f-i)/(u-i);return n.push(t+(r-t)*e),n.push(f),n.push(1),e}function ou(n,t){var i=t.buffer/t.extent,u=n,f=r(n,1,-1-i,i,0,-1,2,t),e=r(n,1,1-i,2+i,0,-1,2,t);return(f||e)&&(u=r(n,1,-i,1+i,0,-1,2,t)||[],f&&(u=bi(f,1).concat(u)),e&&(u=u.concat(bi(e,-1)))),u}function bi(n,t){for(var i,u,f,r,s,e,c=[],o=0;o<n.length;o++){if(i=n[o],u=i.type,u==="Point"||u==="MultiPoint"||u==="LineString")f=bt(i.geometry,t);else if(u==="MultiLineString"||u==="Polygon")for(f=[],r=0;r<i.geometry.length;r++)f.push(bt(i.geometry[r],t));else if(u==="MultiPolygon")for(f=[],r=0;r<i.geometry.length;r++){for(s=[],e=0;e<i.geometry[r].length;e++)s.push(bt(i.geometry[r][e],t));f.push(s)}c.push(h(i.id,u,f,i.tags))}return c}function bt(n,t){var r=[],i;for(r.size=n.size,n.start!==undefined&&(r.start=n.start,r.end=n.end),i=0;i<n.length;i+=3)r.push(n[i]+t,n[i+1],n[i+2]);return r}function ki(n,t){var o;if(n.transformed)return n;for(var s=1<<n.z,h=n.x,c=n.y,i,u,e=0;e<n.features.length;e++){var f=n.features[e],r=f.geometry,l=f.type;if(f.geometry=[],l===1)for(i=0;i<r.length;i+=2)f.geometry.push(di(r[i],r[i+1],t,s,h,c));else for(i=0;i<r.length;i++){for(o=[],u=0;u<r[i].length;u+=2)o.push(di(r[i][u],r[i][u+1],t,s,h,c));f.geometry.push(o)}}return n.transformed=!0,n}function di(n,t,i,r,u,f){return[Math.round(i*(n*r-u)),Math.round(i*(t*r-f))]}function su(n,t,i,r,u){for(var l=t===u.maxZoom?0:u.tolerance/((1<<t)*u.extent),f={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:i,y:r,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},e=0;e<n.length;e++){f.numFeatures++;hu(f,n[e],l,u);var o=n[e].minX,s=n[e].minY,h=n[e].maxX,c=n[e].maxY;o<f.minX&&(f.minX=o);s<f.minY&&(f.minY=s);h>f.maxX&&(f.maxX=h);c>f.maxY&&(f.maxY=c)}return f}function hu(n,t,i,r){var f=t.geometry,e=t.type,o=[],u,h,c,s,l,a;if(e==="Point"||e==="MultiPoint")for(u=0;u<f.length;u+=3)o.push(f[u]),o.push(f[u+1]),n.numPoints++,n.numSimplified++;else if(e==="LineString")kt(o,f,n,i,!1,!1);else if(e==="MultiLineString"||e==="Polygon")for(u=0;u<f.length;u++)kt(o,f[u],n,i,e==="Polygon",u===0);else if(e==="MultiPolygon")for(h=0;h<f.length;h++)for(c=f[h],u=0;u<c.length;u++)kt(o,c[u],n,i,!0,u===0);if(o.length){if(s=t.tags||null,e==="LineString"&&r.lineMetrics){s={};for(l in t.tags)s[l]=t.tags[l];s.mapbox_clip_start=f.start/f.size;s.mapbox_clip_end=f.end/f.size}a={geometry:o,type:e==="Polygon"||e==="MultiPolygon"?3:e==="LineString"||e==="MultiLineString"?2:1,tags:s};t.id!==null&&(a.id=t.id);n.features.push(a)}}function kt(n,t,i,r,u,f){var s=r*r,o,e;if(r>0&&t.size<(u?s:r)){i.numPoints+=t.length/3;return}for(o=[],e=0;e<t.length;e+=3)(r===0||t[e+2]>s)&&(i.numSimplified++,o.push(t[e]),o.push(t[e+1])),i.numPoints++;u&&cu(o,f);n.push(o)}function cu(n,t){for(var e,o,f=0,i=0,r=n.length,u=r-2;i<r;u=i,i+=2)f+=(n[i]-n[u])*(n[i+1]+n[u+1]);if(f>0===t)for(i=0,r=n.length;i<r/2;i+=2)e=n[i],o=n[i+1],n[i]=n[r-2-i],n[i+1]=n[r-1-i],n[r-2-i]=e,n[r-1-i]=o}function lu(n,t){return new d(n,t)}function d(n,t){var r,i;if(t=this.options=au(Object.create(this.options),t),r=t.debug,r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");i=ru(n,t);this.tiles={};this.tileCoords=[];r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0);i=ou(i,t);i.length&&this.splitTile(i,0,0,0);r&&(i.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 dt(n,t,i){return((1<<n)*i+t)*32+n}function au(n,t){for(var i in t)n[i]=t[i];return n}function vu(n,t){var r=n.tileID.canonical,u,f,i;if(!this._geoJSONIndex||(u=this._geoJSONIndex.getTile(r.z,r.x,r.y),!u))return t(null,null);f=new ft(u.features);i=v(f);(i.byteOffset!==0||i.byteLength!==i.buffer.byteLength)&&(i=new Uint8Array(i));t(null,{vectorTile:f,rawData:i.buffer})}function yu(t){var i=t.superclusterOptions,e=t.clusterProperties,u,h;if(!e||!i)return i;var l={},a={},o={accumulated:null,zoom:0},r={properties:null},s=Object.keys(e);for(u=0,h=s;u<h.length;u+=1){var f=h[u],v=e[f],c=v[0],y=v[1],p=n.createExpression(y),w=n.createExpression(typeof c=="string"?[c,["accumulated"],["get",f]]:c);l[f]=p.value;a[f]=w.value}return i.map=function(n){var i,t,u,f;for(r.properties=n,i={},t=0,u=s;t<u.length;t+=1)f=u[t],i[f]=l[f].evaluate(o,r);return i},i.reduce=function(n,t){var i,f,u;for(r.properties=t,i=0,f=s;i<f.length;i+=1)u=f[i],o.accumulated=n[u],n[u]=a[u].evaluate(o,r)},i}var nt=function(n){this.keyCache={};n&&this.replace(n)},f,tt,it,u,ut,e,gt,ii,l,ft,ri,et,gi,t;nt.prototype.replace=function(n){this._layerConfigs={};this._layers={};this.update(n,[])};nt.prototype.update=function(t,i){for(var r,c,f,l,e,b,o,a,y,u,p,s,d=this,h=0,w=t;h<w.length;h+=1)r=w[h],this._layerConfigs[r.id]=r,c=this._layers[r.id]=n.createStyleLayer(r),c._featureFilter=n.featureFilter(c.filter),this.keyCache[r.id]&&delete this.keyCache[r.id];for(f=0,l=i;f<l.length;f+=1)e=l[f],delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(this.familiesBySource={},b=tr(n.values(this._layerConfigs),this.keyCache),o=0,a=b;o<a.length;o+=1){var g=a[o],k=g.map(function(n){return d._layers[n.id]}),v=k[0];v.visibility!=="none"&&(y=v.source||"",u=this.familiesBySource[y],u||(u=this.familiesBySource[y]={}),p=v.sourceLayer||"_geojsonTileLayer",s=u[p],s||(s=u[p]=[]),s.push(k))}};f=1;tt=function(t){var u={},y=[],e,o,p,s,i,h,c,l,a,r,v;for(e in t){o=t[e];p=u[e]={};for(s in o)(i=o[+s],i&&i.bitmap.width!==0&&i.bitmap.height!==0)&&(h={x:0,y:0,w:i.bitmap.width+2*f,h:i.bitmap.height+2*f},y.push(h),p[s]={rect:h,metrics:i.metrics})}var w=n.potpack(y),k=w.w,d=w.h,b=new n.AlphaImage({width:k||1,height:d||1});for(c in t){l=t[c];for(a in l)(r=l[+a],r&&r.bitmap.width!==0&&r.bitmap.height!==0)&&(v=u[c][a].rect,n.AlphaImage.copy(r.bitmap,b,{x:0,y:0},{x:v.x+f,y:v.y+f},r.bitmap))}this.image=b;this.positions=u};n.register("GlyphAtlas",tt);it=function(t){this.tileID=new n.OverscaledTileID(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y);this.uid=t.uid;this.zoom=t.zoom;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};it.prototype.parse=function(t,i,r,u,f){function d(){var i,u,e,t;if(o)return f(o);if(c&&l&&k){i=new tt(c);u=new n.ImageAtlas(l,k);for(e in w)t=w[e],t instanceof n.SymbolBucket?(rt(t.layers,this.zoom,r),n.performSymbolLayout(t,c,i.positions,l,u.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):t.hasPattern&&(t instanceof n.LineBucket||t instanceof n.FillBucket||t instanceof n.FillExtrusionBucket)&&(rt(t.layers,this.zoom,r),t.addFeatures(a,this.tileID.canonical,u.patternPositions));this.status="done";f(null,{buckets:n.values(w).filter(function(n){return!n.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:i.image,imageAtlas:u,glyphMap:this.returnDependencies?c:null,iconMap:this.returnDependencies?l:null,glyphPositions:this.returnDependencies?i.positions:null})}}var g=this,ht,s,h,v,nt,it,y,ut,lt,b,ft,p,e,at,o,c,l,k,et,ot,st;this.status="parsing";this.data=t;this.collisionBoxArray=new n.CollisionBoxArray;ht=new n.DictionaryCoder(Object.keys(t.layers).sort());s=new n.FeatureIndex(this.tileID,this.promoteId);s.bucketLayerIDs=[];var w={},a={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},ct=i.familiesBySource[this.source];for(h in ct)if(v=t.layers[h],v){for(v.version===1&&n.warnOnce('Vector tile source "'+this.source+'" layer "'+h+'" does not use vector tile spec v2 and therefore may have some rendering errors.'),nt=ht.encode(h),it=[],y=0;y<v.length;y++)ut=v.feature(y),lt=s.getId(ut,h),it.push({feature:ut,id:lt,index:y,sourceLayerIndex:nt});for(b=0,ft=ct[h];b<ft.length;b+=1)(p=ft[b],e=p[0],e.minzoom&&this.zoom<Math.floor(e.minzoom))||e.maxzoom&&this.zoom>=e.maxzoom||e.visibility!=="none"&&(rt(p,this.zoom,r),at=w[e.id]=e.createBucket({index:s.bucketLayerIDs.length,layers:p,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:nt,sourceID:this.source}),at.populate(it,a,this.tileID.canonical),s.bucketLayerIDs.push(p.map(function(n){return n.id})))}et=n.mapObject(a.glyphDependencies,function(n){return Object.keys(n).map(Number)});Object.keys(et).length?u.send("getGlyphs",{uid:this.uid,stacks:et},function(n,t){o||(o=n,c=t,d.call(g))}):c={};ot=Object.keys(a.iconDependencies);ot.length?u.send("getImages",{icons:ot,source:this.source,tileID:this.tileID,type:"icons"},function(n,t){o||(o=n,l=t,d.call(g))}):l={};st=Object.keys(a.patternDependencies);st.length?u.send("getImages",{icons:st,source:this.source,tileID:this.tileID,type:"patterns"},function(n,t){o||(o=n,k=t,d.call(g))}):k={};d.call(this)};u=function(n,t,i,r){this.actor=n;this.layerIndex=t;this.availableImages=i;this.loadVectorData=r||ir;this.loading={};this.loaded={}};u.prototype.loadTile=function(t,i){var r=this,f=t.uid,e,u;this.loading||(this.loading={});e=t&&t.request&&t.request.collectResourceTiming?new n.RequestPerformance(t.request):!1;u=this.loading[f]=new it(t);u.abort=this.loadVectorData(t,function(t,o){var l,s,h,c;if(delete r.loading[f],t||!o)return u.status="done",r.loaded[f]=u,i(t);l=o.rawData;s={};o.expires&&(s.expires=o.expires);o.cacheControl&&(s.cacheControl=o.cacheControl);h={};e&&(c=e.finish(),c&&(h.resourceTiming=JSON.parse(JSON.stringify(c))));u.vectorTile=o.vectorTile;u.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,function(t,r){if(t||!r)return i(t);i(null,n.extend({rawTileData:l.slice(0)},r,s,h))});r.loaded=r.loaded||{};r.loaded[f]=u})};u.prototype.reloadTile=function(n,t){var o=this,u=this.loaded,f=n.uid,e=this,i,r;u&&u[f]&&(i=u[f],i.showCollisionBoxes=n.showCollisionBoxes,r=function(n,r){var u=i.reloadCallback;u&&(delete i.reloadCallback,i.parse(i.vectorTile,e.layerIndex,o.availableImages,e.actor,u));t(n,r)},i.status==="parsing"?i.reloadCallback=r:i.status==="done"&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,r):r()))};u.prototype.abortTile=function(n,t){var i=this.loading,r=n.uid;i&&i[r]&&i[r].abort&&(i[r].abort(),delete i[r]);t()};u.prototype.removeTile=function(n,t){var i=this.loaded,r=n.uid;i&&i[r]&&delete i[r];t()};ut=n.window.ImageBitmap;e=function(){this.loaded={}};e.prototype.loadTile=function(t,i){var u=t.uid,e=t.encoding,r=t.rawImageData,o=ut&&r instanceof ut?this.getImageData(r):r,f=new n.DEMData(u,o,e);this.loaded=this.loaded||{};this.loaded[u]=f;i(null,f)};e.prototype.getImageData=function(t){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);var i=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new n.RGBAImage({width:i.width,height:i.height},i.data)};e.prototype.removeTile=function(n){var t=this.loaded,i=n.uid;t&&t[i]&&delete t[i]};gt=c;ii=n.vectorTile.VectorTileFeature.prototype.toGeoJSON;l=function(t){this._feature=t;this.extent=n.EXTENT;this.type=t.type;this.properties=t.tags;"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};l.prototype.loadGeometry=function(){var u,t,f,e,o,i,s,a,h,r,c,l;if(this._feature.type===1){for(u=[],t=0,f=this._feature.geometry;t<f.length;t+=1)e=f[t],u.push([new n.Point$1(e[0],e[1])]);return u}for(o=[],i=0,s=this._feature.geometry;i<s.length;i+=1){for(a=s[i],h=[],r=0,c=a;r<c.length;r+=1)l=c[r],h.push(new n.Point$1(l[0],l[1]));o.push(h)}return o};l.prototype.toGeoJSON=function(n,t,i){return ii.call(this,n,t,i)};ft=function(t){this.layers={_geojsonTileLayer:this};this.name="_geojsonTileLayer";this.extent=n.EXTENT;this.length=t.length;this._features=t};ft.prototype.feature=function(n){return new l(this._features[n])};ri=n.vectorTile.VectorTileFeature;et=ui;ui.prototype.feature=function(n){return new a(this.features[n],this.options.extent)};a.prototype.loadGeometry=function(){var f=this.rawGeometry,i,r,u,t;for(this.geometry=[],i=0;i<f.length;i++){for(r=f[i],u=[],t=0;t<r.length;t++)u.push(new n.Point$1(r[t][0],r[t][1]));this.geometry.push(u)}return this.geometry};a.prototype.bbox=function(){var t,o,i,n;this.geometry||this.loadGeometry();var s=this.geometry,r=Infinity,u=-Infinity,f=Infinity,e=-Infinity;for(t=0;t<s.length;t++)for(o=s[t],i=0;i<o.length;i++)n=o[i],r=Math.min(r,n.x),u=Math.max(u,n.x),f=Math.min(f,n.y),e=Math.max(e,n.y);return[r,f,u,e]};a.prototype.toGeoJSON=ri.prototype.toGeoJSON;var v=ot,rr=ot,ur=er,fr=et;v.fromVectorTileJs=rr;v.fromGeojsonVt=ur;v.GeoJSONWrapper=fr;var pr=function(n){return n[0]},wr=function(n){return n[1]},y=function(n,t,i,r,u){var f;t===void 0&&(t=pr);i===void 0&&(i=wr);r===void 0&&(r=64);u===void 0&&(u=Float64Array);this.nodeSize=r;this.points=n;var s=n.length<65536?Uint16Array:Uint32Array,e=this.ids=new s(n.length),o=this.coords=new u(n.length*2);for(f=0;f<n.length;f++)e[f]=f,o[2*f]=t(n[f]),o[2*f+1]=i(n[f]);ht(e,o,r,0,e.length-1,0)};y.prototype.range=function(n,t,i,r){return vr(this.ids,this.coords,n,t,i,r,this.nodeSize)};y.prototype.within=function(n,t,i){return yr(this.ids,this.coords,n,t,i,this.nodeSize)};var br={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(n){return n}},p=Math.fround||function(n){return function(t){return n[0]=+t,n[0]}}(new Float32Array(1)),i=function(n){this.options=s(Object.create(br),n);this.trees=new Array(this.options.maxZoom+1)};return i.prototype.load=function(n){var f=this.options,u=f.log,c=f.minZoom,o=f.maxZoom,s=f.nodeSize,e,t,i,r,h;for(u&&console.time("total time"),e="prepare "+n.length+" points",u&&console.time(e),this.points=n,t=[],i=0;i<n.length;i++)n[i].geometry&&t.push(dr(n[i],i));for(this.trees[o+1]=new y(t,ci,li,s,Float32Array),u&&console.timeEnd(e),r=o;r>=c;r--)h=+Date.now(),t=this._cluster(t,r),this.trees[r]=new y(t,ci,li,s,Float32Array),u&&console.log("z%d: %d clusters in %dms",r,t.length,+Date.now()-h);return u&&console.timeEnd("total time"),this},i.prototype.getClusters=function(n,t){var i=((n[0]+180)%360+360)%360-180,e=Math.max(-90,Math.min(90,n[1])),r=n[2]===180?180:((n[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,n[3])),h,c,u,s,v,f;if(n[2]-n[0]>=360)i=-180,r=180;else if(i>r)return h=this.getClusters([i,e,180,o],t),c=this.getClusters([-180,e,r,o],t),h.concat(c);var l=this.trees[this._limitZoom(t)],y=l.range(w(i),b(o),w(r),b(e)),a=[];for(u=0,s=y;u<s.length;u+=1)v=s[u],f=l.points[v],a.push(f.numPoints?si(f):this.points[f.index]);return a},i.prototype.getChildren=function(n){var c=this._getOriginId(n),s=this._getOriginZoom(n),f="No cluster with the specified id.",i=this.trees[s],r,u,o,h,t;if(!i)throw new Error(f);if(r=i.points[c],!r)throw new Error(f);var l=this.options.radius/(this.options.extent*Math.pow(2,s-1)),a=i.within(r.x,r.y,l),e=[];for(u=0,o=a;u<o.length;u+=1)h=o[u],t=i.points[h],t.parentId===n&&e.push(t.numPoints?si(t):this.points[t.index]);if(e.length===0)throw new Error(f);return e},i.prototype.getLeaves=function(n,t,i){t=t||10;i=i||0;var r=[];return this._appendLeaves(r,n,t,i,0),r},i.prototype.getTile=function(n,t,i){var u=this.trees[this._limitZoom(n)],r=Math.pow(2,n),h=this.options,c=h.extent,l=h.radius,f=l/c,o=(i-f)/r,s=(i+1+f)/r,e={features:[]};return this._addTileFeatures(u.range((t-f)/r,o,(t+1+f)/r,s),u.points,t,i,r,e),t===0&&this._addTileFeatures(u.range(1-f/r,o,1,s),u.points,r,i,r,e),t===r-1&&this._addTileFeatures(u.range(0,o,f/r,s),u.points,-1,i,r,e),e.features.length?e:null},i.prototype.getClusterExpansionZoom=function(n){for(var t=this._getOriginZoom(n)-1,i;t<=this.options.maxZoom;){if(i=this.getChildren(n),t++,i.length!==1)break;n=i[0].properties.cluster_id}return t},i.prototype._appendLeaves=function(n,t,i,r,u){for(var o,f,h=this.getChildren(t),e=0,s=h;e<s.length;e+=1)if(o=s[e],f=o.properties,f&&f.cluster?u+f.point_count<=r?u+=f.point_count:u=this._appendLeaves(n,f.cluster_id,i,r,u):u<r?u++:n.push(o),n.length===i)break;return u},i.prototype._addTileFeatures=function(n,t,i,r,u,f){for(var h,y,o,s=0,c=n;s<c.length;s+=1){var k=c[s],e=t[k],p=e.numPoints,l=void 0,a=void 0,v=void 0;p?(l=hi(e),a=e.x,v=e.y):(h=this.points[e.index],l=h.properties,a=w(h.geometry.coordinates[0]),v=b(h.geometry.coordinates[1]));y={type:1,geometry:[[Math.round(this.options.extent*(a*u-i)),Math.round(this.options.extent*(v*u-r))]],tags:l};o=void 0;p?o=e.id:this.options.generateId?o=e.index:this.points[e.index].id&&(o=this.points[e.index].id);o!==undefined&&(y.id=o);f.features.push(y)}},i.prototype._limitZoom=function(n){return Math.max(this.options.minZoom,Math.min(+n,this.options.maxZoom+1))},i.prototype._cluster=function(n,t){for(var i,c,b,it,k,a,g,ft,r,nt,v,tt,et,y,f=[],e=this.options,ot=e.radius,st=e.extent,p=e.reduce,ht=e.minPoints,ct=ot/(st*Math.pow(2,t)),o=0;o<n.length;o++)if(i=n[o],!(i.zoom<=t)){i.zoom=t;var s=this.trees[t+1],w=s.within(i.x,i.y,ct),h=i.numPoints||1,u=h;for(c=0,b=w;c<b.length;c+=1)it=b[c],k=s.points[it],k.zoom>t&&(u+=k.numPoints||1);if(u>=ht){var rt=i.x*h,ut=i.y*h,l=p&&h>1?this._map(i,!0):null,d=(o<<5)+(t+1)+this.points.length;for(a=0,g=w;a<g.length;a+=1)(ft=g[a],r=s.points[ft],r.zoom<=t)||(r.zoom=t,nt=r.numPoints||1,rt+=r.x*nt,ut+=r.y*nt,r.parentId=d,p&&(l||(l=this._map(i,!0)),p(l,this._map(r))));i.parentId=d;f.push(kr(rt/u,ut/u,d,u,l))}else if(f.push(i),u>1)for(v=0,tt=w;v<tt.length;v+=1)(et=tt[v],y=s.points[et],y.zoom<=t)||(y.zoom=t,f.push(y))}return f},i.prototype._getOriginId=function(n){return n-this.points.length>>5},i.prototype._getOriginZoom=function(n){return(n-this.points.length)%32},i.prototype._map=function(n,t){if(n.numPoints)return t?s({},n.properties):n.properties;var r=this.points[n.index].properties,i=this.options.map(r);return t&&i===r?s({},i):i},d.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},d.prototype.splitTile=function(n,t,i,u,f,e,o){for(var c=[n,t,i,u],h=this.options,v=h.debug,w,b;c.length;){u=c.pop();i=c.pop();t=c.pop();n=c.pop();var l=1<<t,ut=dt(t,i,u),s=this.tiles[ut];if(s||(v>1&&console.time("creation"),s=this.tiles[ut]=su(n,t,i,u,h),this.tileCoords.push({z:t,x:i,y:u}),v&&(v>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,i,u,s.numFeatures,s.numPoints,s.numSimplified),console.timeEnd("creation")),w="z"+t,this.stats[w]=(this.stats[w]||0)+1,this.total++)),s.source=n,f){if(t===h.maxZoom||t===f)continue;if(b=1<<f-t,i!==Math.floor(e/b)||u!==Math.floor(o/b))continue}else if(t===h.indexMaxZoom||s.numPoints<=h.indexMaxPoints)continue;if(s.source=null,n.length!==0){v>1&&console.time("clipping");var a=.5*h.buffer/h.extent,k=.5-a,d=.5+a,g=1+a,nt,tt,it,rt,y,p;nt=tt=it=rt=null;y=r(n,l,i-a,i+d,0,s.minX,s.maxX,h);p=r(n,l,i+k,i+g,0,s.minX,s.maxX,h);n=null;y&&(nt=r(y,l,u-a,u+d,1,s.minY,s.maxY,h),tt=r(y,l,u+k,u+g,1,s.minY,s.maxY,h),y=null);p&&(it=r(p,l,u-a,u+d,1,s.minY,s.maxY,h),rt=r(p,l,u+k,u+g,1,s.minY,s.maxY,h),p=null);v>1&&console.timeEnd("clipping");c.push(nt||[],t+1,i*2,u*2);c.push(tt||[],t+1,i*2,u*2+1);c.push(it||[],t+1,i*2+1,u*2);c.push(rt||[],t+1,i*2+1,u*2+1)}}},d.prototype.getTile=function(n,t,i){var c=this.options,l=c.extent,s=c.debug,h,r;if(n<0||n>24)return null;if(h=1<<n,t=(t%h+h)%h,r=dt(n,t,i),this.tiles[r])return ki(this.tiles[r],l);s>1&&console.log("drilling down to z%d-%d-%d",n,t,i);for(var u=n,f=t,e=i,o;!o&&u>0;)u--,f=Math.floor(f/2),e=Math.floor(e/2),o=this.tiles[dt(u,f,e)];return!o||!o.source?null:(s>1&&console.log("found parent tile z%d-%d-%d",u,f,e),s>1&&console.time("drilling down"),this.splitTile(o.source,u,f,e,n,t,i),s>1&&console.timeEnd("drilling down"),this.tiles[r]?ki(this.tiles[r],l):null)},gi=function(t){function r(n,i,r,u){t.call(this,n,i,r,vu);u&&(this.loadGeoJSON=u)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(n,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});this._pendingCallback=t;this._pendingLoadDataParams=n;this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var f=this,r,t,u;this._pendingCallback&&this._pendingLoadDataParams&&(r=this._pendingCallback,t=this._pendingLoadDataParams,delete this._pendingCallback,delete this._pendingLoadDataParams,u=t&&t.request&&t.request.collectResourceTiming?new n.RequestPerformance(t.request):!1,this.loadGeoJSON(t,function(e,o){var s,l,h,c;if(e||!o)return r(e);if(typeof o!="object")return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));gt(o,!0);try{if(t.filter){if(s=n.createExpression(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1}),s.result==="error")throw new Error(s.value.map(function(n){return n.key+": "+n.message}).join(", "));l=o.features.filter(function(n){return s.value.evaluate({zoom:0},n)});o={type:"FeatureCollection",features:l}}f._geoJSONIndex=t.cluster?new i(yu(t)).load(o.features):lu(o,t.geojsonVtOptions)}catch(e){return r(e)}f.loaded={};h={};u&&(c=u.finish(),c&&(h.resourceTiming={},h.resourceTiming[t.source]=JSON.parse(JSON.stringify(c))));r(null,h)}))},r.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(n,i){var r=this.loaded,u=n.uid;return r&&r[u]?t.prototype.reloadTile.call(this,n,i):this.loadTile(n,i)},r.prototype.loadGeoJSON=function(t,i){if(t.request)n.getJSON(t.request,i);else if(typeof t.data=="string")try{return i(null,JSON.parse(t.data))}catch(r){return i(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}else return i(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))},r.prototype.removeSource=function(n,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});t()},r.prototype.getClusterExpansionZoom=function(n,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(n.clusterId))}catch(i){t(i)}},r.prototype.getClusterChildren=function(n,t){try{t(null,this._geoJSONIndex.getChildren(n.clusterId))}catch(i){t(i)}},r.prototype.getClusterLeaves=function(n,t){try{t(null,this._geoJSONIndex.getLeaves(n.clusterId,n.limit,n.offset))}catch(i){t(i)}},r}(u),t=function(t){var i=this;this.self=t;this.actor=new n.Actor(t,this);this.layerIndexes={};this.availableImages={};this.workerSourceTypes={vector:u,geojson:gi};this.workerSources={};this.demWorkerSources={};this.self.registerWorkerSource=function(n,t){if(i.workerSourceTypes[n])throw new Error('Worker source with name "'+n+'" already registered.');i.workerSourceTypes[n]=t};this.self.registerRTLTextPlugin=function(t){if(n.plugin.isParsed())throw new Error("RTL text plugin already registered.");n.plugin.applyArabicShaping=t.applyArabicShaping;n.plugin.processBidirectionalText=t.processBidirectionalText;n.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}},t.prototype.setReferrer=function(n,t){this.referrer=t},t.prototype.setImages=function(n,t,i){var u,r,f;this.availableImages[n]=t;for(u in this.workerSources[n]){r=this.workerSources[n][u];for(f in r)r[f].availableImages=t}i()},t.prototype.setLayers=function(n,t,i){this.getLayerIndex(n).replace(t);i()},t.prototype.updateLayers=function(n,t,i){this.getLayerIndex(n).update(t.layers,t.removedIds);i()},t.prototype.loadTile=function(n,t,i){this.getWorkerSource(n,t.type,t.source).loadTile(t,i)},t.prototype.loadDEMTile=function(n,t,i){this.getDEMWorkerSource(n,t.source).loadTile(t,i)},t.prototype.reloadTile=function(n,t,i){this.getWorkerSource(n,t.type,t.source).reloadTile(t,i)},t.prototype.abortTile=function(n,t,i){this.getWorkerSource(n,t.type,t.source).abortTile(t,i)},t.prototype.removeTile=function(n,t,i){this.getWorkerSource(n,t.type,t.source).removeTile(t,i)},t.prototype.removeDEMTile=function(n,t){this.getDEMWorkerSource(n,t.source).removeTile(t)},t.prototype.removeSource=function(n,t,i){if(this.workerSources[n]&&this.workerSources[n][t.type]&&this.workerSources[n][t.type][t.source]){var r=this.workerSources[n][t.type][t.source];delete this.workerSources[n][t.type][t.source];r.removeSource!==undefined?r.removeSource(t,i):i()}},t.prototype.loadWorkerSource=function(n,t,i){try{this.self.importScripts(t.url);i()}catch(r){i(r.toString())}},t.prototype.syncRTLPluginState=function(t,i,r){var u,f,e;try{n.plugin.setState(i);u=n.plugin.getPluginURL();n.plugin.isLoaded()&&!n.plugin.isParsed()&&u!=null&&(this.self.importScripts(u),f=n.plugin.isParsed(),e=f?undefined:new Error("RTL Text Plugin failed to import scripts from "+u),r(e,f))}catch(o){r(o.toString())}},t.prototype.getAvailableImages=function(n){var t=this.availableImages[n];return t||(t=[]),t},t.prototype.getLayerIndex=function(n){var t=this.layerIndexes[n];return t||(t=this.layerIndexes[n]=new nt),t},t.prototype.getWorkerSource=function(n,t,i){var u=this,r;return this.workerSources[n]||(this.workerSources[n]={}),this.workerSources[n][t]||(this.workerSources[n][t]={}),this.workerSources[n][t][i]||(r={send:function(t,i,r){u.actor.send(t,i,r,n)}},this.workerSources[n][t][i]=new this.workerSourceTypes[t](r,this.getLayerIndex(n),this.getAvailableImages(n))),this.workerSources[n][t][i]},t.prototype.getDEMWorkerSource=function(n,t){return this.demWorkerSources[n]||(this.demWorkerSources[n]={}),this.demWorkerSources[n][t]||(this.demWorkerSources[n][t]=new e),this.demWorkerSources[n][t]},t.prototype.enforceCacheSizeLimit=function(t,i){n.enforceCacheSizeLimit(i)},typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope&&(self.worker=new t(self)),t}),r(["./shared"],function(n){function ie(n){if(!wt)return n[0];for(var t=0;t<n.length;t++)if(n[t]in wt)return n[t];return n[0]}function ic(t,i,r){function c(){var o,i,e;if(u)r(u);else if(f&&s){o=n.browser.getImageData(s);i={};for(e in f){var t=f[e],h=t.width,c=t.height,a=t.x,v=t.y,y=t.sdf,p=t.pixelRatio,w=t.stretchX,b=t.stretchY,k=t.content,l=new n.RGBAImage({width:h,height:c});n.RGBAImage.copy(o,l,{x:a,y:v},{x:0,y:0},{width:h,height:c});i[e]={data:l,pixelRatio:p,sdf:y,stretchX:w,stretchY:b,content:k}}r(null,i)}}var f,s,u,h=n.browser.devicePixelRatio>1?"@2x":"",e=n.getJSON(i.transformRequest(i.normalizeSpriteURL(t,h,".json"),n.ResourceType.SpriteJSON),function(n,t){e=null;u||(u=n,f=t,c())}),o=n.getImage(i.transformRequest(i.normalizeSpriteURL(t,h,".png"),n.ResourceType.SpriteImage),function(n,t){o=null;u||(u=n,s=t,c())});return{cancel:function(){e&&(e.cancel(),e=null);o&&(o.cancel(),o=null)}}}function rc(n){var t=n.userImage,i;return t&&t.render&&(i=t.render(),i)?(n.data.replace(new Uint8Array(t.data.buffer)),!0):!1}function uc(t,i,r,u,f){var e=i*256,o=e+255,s=u.transformRequest(u.normalizeGlyphsURL(r).replace("{fontstack}",t).replace("{range}",e+"-"+o),n.ResourceType.Glyphs);n.getArrayBuffer(s,function(t,i){var u,r,e,o;if(t)f(t);else if(i){for(u={},r=0,e=n.parseGlyphPBF(i);r<e.length;r+=1)o=e[r],u[o.id]=o;f(null,u)}})}function fr(n,t,i,r,u,f){this.fontSize=n||24;this.buffer=t===undefined?3:t;this.cutoff=r||.25;this.fontFamily=u||"sans-serif";this.fontWeight=f||"normal";this.radius=i||8;var o=this.size=this.fontSize+this.buffer*2,e=o+this.buffer*2;this.canvas=document.createElement("canvas");this.canvas.width=this.canvas.height=o;this.ctx=this.canvas.getContext("2d");this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily;this.ctx.textAlign="left";this.ctx.fillStyle="black";this.gridOuter=new Float64Array(e*e);this.gridInner=new Float64Array(e*e);this.f=new Float64Array(e);this.z=new Float64Array(e+1);this.v=new Uint16Array(e);this.useMetrics=this.ctx.measureText("A").actualBoundingBoxLeft!==undefined;this.middle=Math.round(o/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function ec(n,t,i,r,u,f,e){var l,s,h,o,c,a,v;for(f.fill(li,0,t*i),e.fill(0,0,t*i),l=(t-r)/2,s=0;s<u;s++)for(h=0;h<r;h++)o=(s+l)*t+h+l,c=n.data[4*(s*r+h)+3]/255,c===1?(f[o]=0,e[o]=li):c===0?(f[o]=li,e[o]=0):(a=Math.max(0,.5-c),v=Math.max(0,c-.5),f[o]=a*a,e[o]=v*v)}function oc(n,t,i,r,u,f,e){for(var s,o=0;o<t*i;o++)s=Math.sqrt(r[o])-Math.sqrt(u[o]),n[o]=Math.round(255-255*(s/f+e))}function oe(n,t,i,r,u,f){for(var o,e=0;e<t;e++)se(n,e,t,i,r,u,f);for(o=0;o<i;o++)se(n,o*t,1,t,r,u,f)}function se(n,t,i,r,u,f,e){var o,s,c,h;for(f[0]=0,e[0]=-li,e[1]=li,o=0;o<r;o++)u[o]=n[t+o*i];for(o=1,s=0,c=0;o<r;o++){do h=f[s],c=(u[o]-u[h]+o*o-h*h)/(o-h)/2;while(c<=e[s]&&--s>-1);s++;f[s]=o;e[s]=c;e[s+1]=li}for(o=0,s=0;o<r;o++){while(e[s+1]<o)s++;h=f[s];n[t+o*i]=u[h]+(o-h)*(o-h)}}function ce(t,i,r){var u=function(u,f){if(u)return r(u);if(f){var e=n.pick(n.extend(f,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);f.vector_layers&&(e.vectorLayers=f.vector_layers,e.vectorLayerIds=e.vectorLayers.map(function(n){return n.id}));e.tiles=i.canonicalizeTileset(e,t.url);r(null,e)}};return t.url?n.getJSON(i.transformRequest(i.normalizeSourceURL(t.url),n.ResourceType.Source),u):n.browser.frame(function(){return u(null,t)})}function vc(t){for(var i,r=Infinity,u=Infinity,f=-Infinity,e=-Infinity,o=0,s=t;o<s.length;o+=1)i=s[o],r=Math.min(r,i.x),u=Math.min(u,i.y),f=Math.max(f,i.x),e=Math.max(e,i.y);var l=f-r,a=e-u,v=Math.max(l,a),h=Math.max(0,Math.floor(-Math.log(v)/Math.LN2)),c=Math.pow(2,h);return new n.CanonicalTileID(h,Math.floor((r+f)/2*c),Math.floor((u+e)/2*c))}function dc(t,i){var r=n.identity([]);return n.translate(r,r,[1,1,0]),n.scale(r,r,[t.width*.5,t.height*.5,1]),n.multiply(r,r,t.calculatePosMatrix(i.toUnwrapped()))}function gc(n,t,i){var r,f,o,u,s,e;if(n){for(r=0,f=n;r<f.length;r+=1)if(o=f[r],u=t[o],u&&u.source===i&&u.type==="fill-extrusion")return!0}else for(s in t)if(e=t[s],e.source===i&&e.type==="fill-extrusion")return!0;return!1}function nl(n,t,i,r,u,f){var y=gc(u&&u.layers,t,n.id),l=f.maxPitchScaleFactor(),a=n.tilesIn(r,l,y),h,o,c,e,s,v;for(a.sort(ae),h=[],o=0,c=a;o<c.length;o+=1)e=c[o],h.push({wrappedTileID:e.tileID.wrapped().key,queryResults:e.tile.queryRenderedFeatures(t,i,n._state,e.queryGeometry,e.cameraQueryGeometry,e.scale,u,f,l,dc(n.transform,e.tileID))});s=rl(h);for(v in s)s[v].forEach(function(t){var i=t.feature,r=n.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source;i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]);i.state=r});return s}function tl(n,t,i,r,u,f,e){for(var y,p,s,l,w,b,o={},a=f.queryRenderedSymbols(r),h=[],c=0,v=Object.keys(a).map(Number);c<v.length;c+=1)y=v[c],h.push(e[y]);for(h.sort(ae),p=function(){var i=l[s],c=i.featureIndex.lookupSymbolFeatures(a[i.bucketInstanceId],t,i.bucketIndex,i.sourceLayerIndex,u.filter,u.layers,u.availableImages,n),r,v,e,f,h,y;for(r in c)for(v=o[r]=o[r]||[],e=c[r],e.sort(function(n,t){var r=i.featureSortOrder,u,f;return r?(u=r.indexOf(n.featureIndex),f=r.indexOf(t.featureIndex),f-u):t.featureIndex-n.featureIndex}),f=0,h=e;f<h.length;f+=1)y=h[f],v.push(y)},s=0,l=h;s<l.length;s+=1)p();w=function(t){o[t].forEach(function(r){var u=r.feature,f=n[t],e=i[f.source],o=e.getFeatureState(u.layer["source-layer"],u.id);u.source=u.layer.source;u.layer["source-layer"]&&(u.sourceLayer=u.layer["source-layer"]);u.state=o})};for(b in o)w(b);return o}function il(n,t){for(var r,u,f=n.getRenderableIds().map(function(t){return n.getTileByID(t)}),e=[],o={},i=0;i<f.length;i++)r=f[i],u=r.tileID.canonical.key,o[u]||(o[u]=!0,r.querySourceFeatures(e,t));return e}function ae(n,t){var i=n.tileID,r=t.tileID;return i.overscaledZ-r.overscaledZ||i.canonical.y-r.canonical.y||i.wrap-r.wrap||i.canonical.x-r.canonical.x}function rl(n){for(var t,i,e,r,u={},o={},f=0,s=n;f<s.length;f+=1){var h=s[f],c=h.queryResults,l=h.wrappedTileID,a=o[l]=o[l]||{};for(t in c){var y=c[t],v=a[t]=a[t]||{},p=u[t]=u[t]||[];for(i=0,e=y;i<e.length;i+=1)r=e[i],v[r.featureIndex]||(v[r.featureIndex]=!0,p.push(r))}}return u}function ge(n,t){var i=Math.abs(n.wrap*2)-+(n.wrap<0),r=Math.abs(t.wrap*2)-+(t.wrap<0);return n.overscaledZ-t.overscaledZ||r-i||t.canonical.y-n.canonical.y||t.canonical.x-n.canonical.x}function no(n){return n==="raster"||n==="image"||n==="video"}function wa(){return new n.window.Worker(tc.workerUrl)}function io(){return hr||(hr=new yt),hr}function ba(){var n=io();n.acquire(tu)}function ka(){var n=hr;n&&(n.isPreloaded()&&n.numActive()===1?(n.release(tu),hr=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()"))}function da(t,i){var r={};for(var u in t)u!=="ref"&&(r[u]=t[u]);return n.refProperties.forEach(function(n){n in i&&(r[n]=i[n])}),r}function ro(n){var r,i,t;for(n=n.slice(),r=Object.create(null),i=0;i<n.length;i++)r[n[i].id]=n[i];for(t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=da(n[t],r[n[t].ref]));return n}function uo(){var u={},f=n.styleSpec.$version,t,r,i;for(t in n.styleSpec.$root)r=n.styleSpec.$root[t],r.required&&(i=null,i=t==="version"?f:r.type==="array"?[]:{},i!=null&&(u[t]=i));return u}function fo(n,t,r){r.push({command:i.addSource,args:[n,t[n]]})}function eo(n,t,r){t.push({command:i.removeSource,args:[n]});r[n]=!0}function ga(n,t,i,r){eo(n,i,r);fo(n,t,i)}function nv(t,i,r){for(var u in t[r])if(t[r].hasOwnProperty(u)&&u!=="data"&&!n.deepEqual(t[r][u],i[r][u]))return!1;for(u in i[r])if(i[r].hasOwnProperty(u)&&u!=="data"&&!n.deepEqual(t[r][u],i[r][u]))return!1;return!0}function tv(t,r,u,f){t=t||{};r=r||{};for(var e in t)t.hasOwnProperty(e)&&(r.hasOwnProperty(e)||eo(e,u,f));for(e in r)r.hasOwnProperty(e)&&(t.hasOwnProperty(e)?n.deepEqual(t[e],r[e])||(t[e].type==="geojson"&&r[e].type==="geojson"&&nv(t,r,e)?u.push({command:i.setGeoJSONSourceData,args:[e,r[e].data]}):ga(e,r,u,f)):fo(e,r,u))}function iu(t,i,r,u,f,e){t=t||{};i=i||{};for(var o in t)t.hasOwnProperty(o)&&(n.deepEqual(t[o],i[o])||r.push({command:e,args:[u,o,i[o],f]}));for(o in i)i.hasOwnProperty(o)&&!t.hasOwnProperty(o)&&(n.deepEqual(t[o],i[o])||r.push({command:e,args:[u,o,i[o],f]}))}function oo(n){return n.id}function so(n,t){return n[t.id]=t,n}function iv(t,r,u){t=t||[];r=r||[];for(var y=t.map(oo),a=r.map(oo),w=t.reduce(so,{}),p=r.reduce(so,{}),c=y.slice(),b=Object.create(null),e,s,o,v,f,h=0,l=0;h<y.length;h++)e=y[h],p.hasOwnProperty(e)?l++:(u.push({command:i.removeLayer,args:[e]}),c.splice(c.indexOf(e,l),1));for(h=0,l=0;h<a.length;h++)(e=a[a.length-1-h],c[c.length-1-h]!==e)&&(w.hasOwnProperty(e)?(u.push({command:i.removeLayer,args:[e]}),c.splice(c.lastIndexOf(e,c.length-l),1)):l++,v=c[c.length-h],u.push({command:i.addLayer,args:[p[e],v]}),c.splice(c.length-h,0,e),b[e]=!0);for(h=0;h<a.length;h++)if(e=a[h],s=w[e],o=p[e],!b[e]&&!n.deepEqual(s,o)){if(!n.deepEqual(s.source,o.source)||!n.deepEqual(s["source-layer"],o["source-layer"])||!n.deepEqual(s.type,o.type)){u.push({command:i.removeLayer,args:[e]});v=c[c.lastIndexOf(e)+1];u.push({command:i.addLayer,args:[o,v]});continue}iu(s.layout,o.layout,u,e,null,i.setLayoutProperty);iu(s.paint,o.paint,u,e,null,i.setPaintProperty);n.deepEqual(s.filter,o.filter)||u.push({command:i.setFilter,args:[e,o.filter]});n.deepEqual(s.minzoom,o.minzoom)&&n.deepEqual(s.maxzoom,o.maxzoom)||u.push({command:i.setLayerZoomRange,args:[e,o.minzoom,o.maxzoom]});for(f in s)s.hasOwnProperty(f)&&f!=="layout"&&f!=="paint"&&f!=="filter"&&f!=="metadata"&&f!=="minzoom"&&f!=="maxzoom"&&(f.indexOf("paint.")===0?iu(s[f],o[f],u,e,f.slice(6),i.setPaintProperty):n.deepEqual(s[f],o[f])||u.push({command:i.setLayerProperty,args:[e,f,o[f]]}));for(f in o)o.hasOwnProperty(f)&&!s.hasOwnProperty(f)&&f!=="layout"&&f!=="paint"&&f!=="filter"&&f!=="metadata"&&f!=="minzoom"&&f!=="maxzoom"&&(f.indexOf("paint.")===0?iu(s[f],o[f],u,e,f.slice(6),i.setPaintProperty):n.deepEqual(s[f],o[f])||u.push({command:i.setLayerProperty,args:[e,f,o[f]]}))}}function rv(t,r){var u,f,e,o;if(!t)return[{command:i.setStyle,args:[r]}];u=[];try{if(!n.deepEqual(t.version,r.version))return[{command:i.setStyle,args:[r]}];n.deepEqual(t.center,r.center)||u.push({command:i.setCenter,args:[r.center]});n.deepEqual(t.zoom,r.zoom)||u.push({command:i.setZoom,args:[r.zoom]});n.deepEqual(t.bearing,r.bearing)||u.push({command:i.setBearing,args:[r.bearing]});n.deepEqual(t.pitch,r.pitch)||u.push({command:i.setPitch,args:[r.pitch]});n.deepEqual(t.sprite,r.sprite)||u.push({command:i.setSprite,args:[r.sprite]});n.deepEqual(t.glyphs,r.glyphs)||u.push({command:i.setGlyphs,args:[r.glyphs]});n.deepEqual(t.transition,r.transition)||u.push({command:i.setTransition,args:[r.transition]});n.deepEqual(t.light,r.light)||u.push({command:i.setLight,args:[r.light]});f={};e=[];tv(t.sources,r.sources,e,f);o=[];t.layers&&t.layers.forEach(function(n){f[n.source]?u.push({command:i.removeLayer,args:[n.id]}):o.push(n)});u=u.concat(e);iv(o,r.layers,u)}catch(s){console.warn("Unable to compute style diff:",s);u=[{command:i.setStyle,args:[r]}]}return u}function uf(t,i,r,u,f){var e=n.create();return i?(n.scale(e,e,[1/f,1/f,1]),r||n.rotateZ(e,e,u.angle)):n.multiply(e,u.labelPlaneMatrix,t),e}function ho(t,i,r,u,f){if(i){var e=n.clone(t);return n.scale(e,e,[f,f,1]),r||n.rotateZ(e,e,-u.angle),e}return u.glCoordMatrix}function rt(t,i){var r=[t.x,t.y,0,1],u;return po(r,r,i),u=r[3],{point:new n.Point(r[0]/u,r[1]/u),signedDistanceFromCamera:u}}function ff(n,t){return.5+.5*(n/t)}function uv(n,t){var i=n[0]/n[3],r=n[1]/n[3];return i>=-t[0]&&i<=t[0]&&r>=-t[1]&&r<=t[1]}function fv(t,i,r,u,f,e,o,s){var w=u?t.textSizeData:t.iconSizeData,ft=n.evaluateSizeForZoom(w,r.transform.zoom),et=[512/r.width+1,512/r.height+1],c=u?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray,v,h,l;c.clear();var b=t.lineVertexArray,k=u?t.text.placedSymbolArray:t.icon.placedSymbolArray,d=r.transform.width/r.transform.height,a=!1;for(v=0;v<k.length;v++){if(h=k.get(v),h.hidden||h.writingMode===n.WritingMode.vertical&&!a){vi(h.numGlyphs,c);continue}if(a=!1,l=[h.anchorX,h.anchorY,0,1],n.transformMat4(l,l,i),!uv(l,et)){vi(h.numGlyphs,c);continue}var ot=l[3],g=ff(r.transform.cameraToCenterDistance,ot),nt=n.evaluateSizeForFeature(w,ft,h),tt=o?nt/g:nt*g,y=new n.Point(h.anchorX,h.anchorY),it=rt(y,f).point,ut={},p=ao(h,tt,!1,s,i,f,e,t.glyphOffsetArray,b,c,it,y,ut,d);a=p.useVertical;(p.notEnoughRoom||a||p.needsFlipping&&ao(h,tt,!0,s,i,f,e,t.glyphOffsetArray,b,c,it,y,ut,d).notEnoughRoom)&&vi(h.numGlyphs,c)}u?t.text.dynamicLayoutVertexBuffer.updateData(c):t.icon.dynamicLayoutVertexBuffer.updateData(c)}function co(n,t,i,r,u,f,e,o,s,h,c){var p=o.glyphStartIndex+o.numGlyphs,a=o.lineStartIndex,v=o.lineStartIndex+o.lineLength,w=t.getoffsetX(o.glyphStartIndex),b=t.getoffsetX(p-1),y=uu(n*w,i,r,u,f,e,o.segment,a,v,s,h,c),l;return y?(l=uu(n*b,i,r,u,f,e,o.segment,a,v,s,h,c),!l)?null:{first:y,last:l}:null}function lo(t,i,r,u){if(t===n.WritingMode.horizontal){var f=Math.abs(r.y-i.y),e=Math.abs(r.x-i.x)*u;if(f>e)return{useVertical:!0}}return(t===n.WritingMode.vertical?i.y<r.y:i.x>r.x)?{needsFlipping:!0}:null}function ao(t,i,r,u,f,e,o,s,h,c,l,a,v,y){var p=i/24,g=t.lineOffsetX*p,nt=t.lineOffsetY*p,w,et,ot,tt,k,it,d,ut,ft;if(t.numGlyphs>1){var vt=t.glyphStartIndex+t.numGlyphs,yt=t.lineStartIndex,pt=t.lineStartIndex+t.lineLength,b=co(p,s,g,nt,r,l,a,t,h,e,v);if(!b)return{notEnoughRoom:!0};if(et=rt(b.first.point,o).point,ot=rt(b.last.point,o).point,u&&!r&&(tt=lo(t.writingMode,et,ot,y),tt))return tt;for(w=[b.first],k=t.glyphStartIndex+1;k<vt-1;k++)w.push(uu(p*s.getoffsetX(k),g,nt,r,l,a,t.segment,yt,pt,h,e,v));w.push(b.last)}else{if(u&&!r){var st=rt(a,f).point,ht=t.lineStartIndex+t.segment+1,ct=new n.Point(h.getx(ht),h.gety(ht)),lt=rt(ct,f),wt=lt.signedDistanceFromCamera>0?lt.point:vo(a,ct,st,1,f),at=lo(t.writingMode,st,wt,y);if(at)return at}if(it=uu(p*s.getoffsetX(t.glyphStartIndex),g,nt,r,l,a,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,h,e,v),!it)return{notEnoughRoom:!0};w=[it]}for(d=0,ut=w;d<ut.length;d+=1)ft=ut[d],n.addDynamicAttributes(c,ft.point,ft.angle);return{}}function vo(n,t,i,r,u){var e=rt(n.add(n.sub(t)._unit()),u).point,f=i.sub(e);return i.add(f._mult(r/f.mag()))}function uu(t,i,r,u,f,e,o,s,h,c,l,a){var et=u?t-i:t+i,w=et>0?1:-1,d=0,tt,it,ut,ot,ht;u&&(w*=-1,d=Math.PI);w<0&&(d+=Math.PI);for(var y=w>0?s+o:s+o+1,v=f,p=f,b=0,k=0,g=Math.abs(et),nt=[];b+k<=g;){if(y+=w,y<s||y>=h)return null;p=v;nt.push(v);v=a[y];v===undefined&&(tt=new n.Point(c.getx(y),c.gety(y)),it=rt(tt,l),it.signedDistanceFromCamera>0?v=a[y]=it.point:(ut=y-w,ot=b===0?e:new n.Point(c.getx(ut),c.gety(ut)),v=vo(ot,tt,p,g-b+1,l)));b+=k;k=p.dist(v)}var ct=(g-b)/k,st=v.sub(p),ft=st.mult(ct)._add(p);return ft._add(st._unit()._perp()._mult(r*w)),ht=d+Math.atan2(v.y-p.y,v.x-p.x),nt.push(ft),{point:ft,angle:ht,path:nt}}function vi(n,t){for(var r,i=0;i<n;i++)r=t.length,t.resize(r+4),t.float32.set(yo,r*3)}function po(n,t,i){var r=t[0],u=t[1];return n[0]=i[0]*r+i[4]*u+i[12],n[1]=i[1]*r+i[5]*u+i[13],n[3]=i[3]*r+i[7]*u+i[15],n}function nt(t,i,r){return i*(n.EXTENT/(t.tileSize*Math.pow(2,r-t.tileID.overscaledZ)))}function ko(t,i,r,u,f){var e=n.getAnchorAlignment(t),s=e.horizontalAlign,h=e.verticalAlign,c=-(s-.5)*i,l=-(h-.5)*r,o=n.evaluateVariableOffset(t,u);return new n.Point(c+o[0]*f,l+o[1]*f)}function ef(t,i,r,u,f,e){var s=t.x1,h=t.x2,c=t.y1,l=t.y2,a=t.anchorPointX,v=t.anchorPointY,o=new n.Point(i,r);return u&&o._rotate(f?e:-e),{x1:s+o.x,y1:c+o.y,x2:h+o.x,y2:l+o.y,anchorPointX:a,anchorPointY:v}}function eu(n,t,i,r,u){n.emplaceBack(t?1:0,i?1:0,r||0,u||0);n.emplaceBack(t?1:0,i?1:0,r||0,u||0);n.emplaceBack(t?1:0,i?1:0,r||0,u||0);n.emplaceBack(t?1:0,i?1:0,r||0,u||0)}function go(n){if(n.opacity!==0||n.placed){if(n.opacity===1&&n.placed)return 4294967295}else return 0;var t=n.placed?1:0,i=Math.floor(n.opacity*127);return i*sv+t*hv+i*cv+t*lv+i*av+t*vv+i*yv+t}function s(n,t){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,e=t.match(/attribute ([\w]+) ([\w]+)/g),r=n.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),u=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=u?u.concat(r):r,f={};return n=n.replace(i,function(n,t,i,r,u){return f[u]=!0,t==="define"?"\n#ifndef HAS_UNIFORM_u_"+u+"\nvarying "+i+" "+r+" "+u+";\n#else\nuniform "+i+" "+r+" u_"+u+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+u+"\n    "+i+" "+r+" "+u+" = u_"+u+";\n#endif\n"}),t=t.replace(i,function(n,t,i,r,u){var o=r==="float"?"vec2":"vec4",e=u.match(/color/)?"color":o;return f[u]?t==="define"?"\n#ifndef HAS_UNIFORM_u_"+u+"\nuniform lowp float u_"+u+"_t;\nattribute "+i+" "+o+" a_"+u+";\nvarying "+i+" "+r+" "+u+";\n#else\nuniform "+i+" "+r+" u_"+u+";\n#endif\n":e==="vec4"?"\n#ifndef HAS_UNIFORM_u_"+u+"\n    "+u+" = a_"+u+";\n#else\n    "+i+" "+r+" "+u+" = u_"+u+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+u+"\n    "+u+" = unpack_mix_"+e+"(a_"+u+", u_"+u+"_t);\n#else\n    "+i+" "+r+" "+u+" = u_"+u+";\n#endif\n":t==="define"?"\n#ifndef HAS_UNIFORM_u_"+u+"\nuniform lowp float u_"+u+"_t;\nattribute "+i+" "+o+" a_"+u+";\n#else\nuniform "+i+" "+r+" u_"+u+";\n#endif\n":e==="vec4"?"\n#ifndef HAS_UNIFORM_u_"+u+"\n    "+i+" "+r+" "+u+" = a_"+u+";\n#else\n    "+i+" "+r+" "+u+" = u_"+u+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+u+"\n    "+i+" "+r+" "+u+" = unpack_mix_"+e+"(a_"+u+", u_"+u+"_t);\n#else\n    "+i+" "+r+" "+u+" = u_"+u+";\n#endif\n"}),{fragmentSource:n,vertexSource:t,staticAttributes:e,staticUniforms:o}}function rs(n){for(var r,i=[],t=0;t<n.length;t++)n[t]!==null&&(r=n[t].split(" "),i.push(r.pop()));return i}function us(n,t,i){var o=1/nt(i,1,t.transform.tileZoom),r=Math.pow(2,i.tileID.overscaledZ),u=i.tileSize*Math.pow(2,t.transform.tileZoom)/r,f=u*(i.tileID.canonical.x+i.tileID.wrap*r),e=u*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t,u_pixel_coord_upper:[f>>16,e>>16],u_pixel_coord_lower:[f&65535,e&65535]}}function np(n,t,i,r){var u=i.imageManager.getPattern(n.from.toString()),f=i.imageManager.getPattern(n.to.toString()),e=i.imageManager.getPixelSize(),l=e.width,a=e.height,o=Math.pow(2,r.tileID.overscaledZ),s=r.tileSize*Math.pow(2,i.transform.tileZoom)/o,h=s*(r.tileID.canonical.x+r.tileID.wrap*o),c=s*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:u.tl,u_pattern_br_a:u.br,u_pattern_tl_b:f.tl,u_pattern_br_b:f.br,u_texsize:[l,a],u_mix:t.t,u_pattern_size_a:u.displaySize,u_pattern_size_b:f.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/nt(r,1,i.transform.tileZoom),u_pixel_coord_upper:[h>>16,c>>16],u_pixel_coord_lower:[h&65535,c&65535]}}function fw(t,i){var r=Math.pow(2,i.canonical.z),u=i.canonical.y;return[new n.MercatorCoordinate(0,u/r).toLngLat().lat,new n.MercatorCoordinate(0,(u+1)/r).toLngLat().lat]}function cs(n,t){return 1/nt(n,1,t.tileZoom)}function ls(n,t,i){return n.translatePosMatrix(t.tileID.posMatrix,t,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}function vw(n){n*=Math.PI/180;var i=Math.sin(n),t=Math.cos(n);return[(2*t+1)/3,(-Math.sqrt(3)*i-t+1)/3,(Math.sqrt(3)*i-t+1)/3]}function yw(n){return n>0?1/(1-n):1+n}function pw(n){return n>0?1-1/(1.001-n):-n}function ws(t,i,r,f,e,o,s){for(var nt,v,tt,k,dt,gt,l,d,it,vt,y,rt,yt,pt,ht,wt,p,ni,w=t.context,bt=w.gl,ti=t.useProgram("collisionBox"),g=[],b=0,kt=0,ct=0;ct<f.length;ct++){var lt=f[ct],at=i.getTile(lt),a=at.getBucket(r);a&&(nt=lt.posMatrix,(e[0]!==0||e[1]!==0)&&(nt=t.translatePosMatrix(lt.posMatrix,at,e,o)),v=s?a.textCollisionBox:a.iconCollisionBox,tt=a.collisionCircleArray,tt.length>0&&(k=n.create(),dt=nt,n.mul(k,a.placementInvProjMatrix,t.transform.glCoordMatrix),n.mul(k,k,a.placementViewportMatrix),g.push({circleArray:tt,circleOffset:kt,transform:dt,invTransform:k}),b+=tt.length/4,kt=b),v)&&ti.draw(w,bt.LINES,u.disabled,c.disabled,t.colorModeForRenderPass(),h.disabled,yp(nt,t.transform,at),r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,t.transform.zoom,null,null,v.collisionVertexBuffer)}if(s&&g.length){for(gt=t.useProgram("collisionCircle"),l=new n.StructArrayLayout2f1f2i16,l.resize(b*4),l._trim(),d=0,it=0,vt=g;it<vt.length;it+=1)for(y=vt[it],rt=0;rt<y.circleArray.length/4;rt++){var ut=rt*4,ft=y.circleArray[ut+0],et=y.circleArray[ut+1],ot=y.circleArray[ut+2],st=y.circleArray[ut+3];l.emplace(d++,ft,et,ot,st,0);l.emplace(d++,ft,et,ot,st,1);l.emplace(d++,ft,et,ot,st,2);l.emplace(d++,ft,et,ot,st,3)}for((!hu||hu.length<b*2)&&(hu=ub(b)),yt=w.createIndexBuffer(hu,!0),pt=w.createVertexBuffer(l,n.collisionCircleLayout.members,!0),ht=0,wt=g;ht<wt.length;ht+=1)p=wt[ht],ni=pp(p.transform,p.invTransform,t.transform),gt.draw(w,bt.TRIANGLES,u.disabled,c.disabled,t.colorModeForRenderPass(),h.disabled,ni,r.id,pt,yt,n.SegmentVector.simpleSegment(0,p.circleOffset*2,p.circleArray.length,p.circleArray.length/2),null,t.transform.zoom,null,null,null);pt.destroy();yt.destroy()}}function ub(t){var f=t*2,r=new n.StructArrayLayout3ui6,i,u;for(r.resize(f),r._trim(),i=0;i<f;i++)u=i*6,r.uint16[u+0]=i*4+0,r.uint16[u+1]=i*4+1,r.uint16[u+2]=i*4+2,r.uint16[u+3]=i*4+2,r.uint16[u+4]=i*4+3,r.uint16[u+5]=i*4+0;return r}function fb(n,t,i,r,u){if(n.renderPass==="translucent"){var f=c.disabled,e=n.colorModeForRenderPass(),o=i.layout.get("text-variable-anchor");o&&ob(r,n,i,t,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),u);i.paint.get("icon-opacity").constantOr(1)!==0&&ks(n,t,i,r,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),f,e);i.paint.get("text-opacity").constantOr(1)!==0&&ks(n,t,i,r,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),f,e);t.map.showCollisionBoxes&&(ws(n,t,i,r,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),!0),ws(n,t,i,r,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),!1))}}function eb(t,i,r,u,f,e){var o=n.getAnchorAlignment(t),h=o.horizontalAlign,c=o.verticalAlign,l=-(h-.5)*i,a=-(c-.5)*r,s=n.evaluateVariableOffset(t,u);return new n.Point((l/f+s[0])*e,(a/f+s[1])*e)}function ob(t,i,r,u,f,e,o){for(var b,h=i.transform,v=f==="map",y=e==="map",c=0,p=t;c<p.length;c+=1){var l=p[c],a=u.getTile(l),s=a.getBucket(r);if(s&&s.text&&s.text.segments.get().length){var k=s.textSizeData,w=n.evaluateSizeForZoom(k,h.zoom),d=nt(a,1,i.transform.zoom),g=uf(l.posMatrix,y,v,i.transform,d),tt=r.layout.get("icon-text-fit")!=="none"&&s.hasIconData();w&&(b=Math.pow(2,h.zoom-a.tileID.overscaledZ),sb(s,v,y,o,n.symbolSize,h,g,l.posMatrix,b,w,tt))}}}function sb(t,i,r,u,f,e,o,s,h,c,l){var ut=t.text.placedSymbolArray,b=t.text.dynamicLayoutVertexArray,y=t.icon.dynamicLayoutVertexArray,ft={},k,nt,tt,p,w,d,it;for(b.clear(),k=0;k<ut.length;k++){var a=ut.get(k),lt=t.allowVerticalPlacement&&!a.placedOrientation,v=!a.hidden&&a.crossTileID&&!lt?u[a.crossTileID]:null;if(v){var et=new n.Point(a.anchorX,a.anchorY),ot=rt(et,r?s:o),at=ff(e.cameraToCenterDistance,ot.signedDistanceFromCamera),st=f.evaluateSizeForFeature(t.textSizeData,c,a)*at/n.ONE_EM;r&&(st*=t.tilePixelRatio/h);var vt=v.width,yt=v.height,pt=v.anchor,wt=v.textOffset,bt=v.textBoxScale,g=eb(pt,vt,yt,wt,bt,st),ht=r?rt(et.add(g),o).point:ot.point.add(i?g.rotate(-e.angle):g),ct=t.allowVerticalPlacement&&a.placedOrientation===n.WritingMode.vertical?Math.PI/2:0;for(nt=0;nt<a.numGlyphs;nt++)n.addDynamicAttributes(b,ht,ct);l&&a.associatedIconIndex>=0&&(ft[a.associatedIconIndex]={shiftedAnchor:ht,angle:ct})}else vi(a.numGlyphs,b)}if(l){for(y.clear(),tt=t.icon.placedSymbolArray,p=0;p<tt.length;p++)if(w=tt.get(p),w.hidden)vi(w.numGlyphs,y);else if(d=ft[p],d)for(it=0;it<w.numGlyphs;it++)n.addDynamicAttributes(y,d.shiftedAnchor,d.angle);else vi(w.numGlyphs,y);t.icon.dynamicLayoutVertexBuffer.updateData(y)}t.text.dynamicLayoutVertexBuffer.updateData(b)}function hb(n,t,i){return i.iconsInText&&t?"symbolTextAndIcon":n?"symbolSDF":"symbolIcon"}function ks(t,i,r,f,e,o,s,h,c,l,a,v){for(var d,ai,vi,gt,ki,et,ni,ti,ot,ii,st,y,ht,ct=t.context,b=ct.gl,ri=t.transform,ut=h==="map",k=c==="map",lt=ut&&r.layout.get("symbol-placement")!=="point",at=ut&&!k&&!lt,di=r.layout.get("symbol-sort-key").constantOr(1)!==undefined,ui=!1,fi=t.depthModeForSublayer(0,u.ReadOnly),ei=r.layout.get("text-variable-anchor"),ft=[],vt=0,oi=f;vt<oi.length;vt+=1){var tt=oi[vt],w=i.getTile(tt),p=w.getBucket(r);if(p&&(d=e?p.text:p.icon,d&&d.segments.get().length)){var gi=d.programConfigurations.get(r.id),it=e||p.sdfIcons,g=e?p.textSizeData:p.iconSizeData,si=k||ri.pitch!==0,nr=t.useProgram(hb(it,e,p),gi),yt=n.evaluateSizeForZoom(g,ri.zoom),rt=void 0,hi=[0,0],pt=void 0,wt=void 0,ci=null,li=void 0;e?(pt=w.glyphAtlasTexture,wt=b.LINEAR,rt=w.glyphAtlasTexture.size,p.iconsInText&&(hi=w.imageAtlasTexture.size,ci=w.imageAtlasTexture,ai=g.kind==="composite"||g.kind==="camera",li=si||t.options.rotating||t.options.zooming||ai?b.LINEAR:b.NEAREST)):(vi=r.layout.get("icon-size").constantOr(0)!==1||p.iconsNeedLinear,pt=w.imageAtlasTexture,wt=it||t.options.rotating||t.options.zooming||vi||si?b.LINEAR:b.NEAREST,rt=w.imageAtlasTexture.size);var yi=nt(w,1,t.transform.zoom),pi=uf(tt.posMatrix,k,ut,t.transform,yi),wi=ho(tt.posMatrix,k,ut,t.transform,yi),tr=ei&&p.hasTextData(),ir=r.layout.get("icon-text-fit")!=="none"&&tr&&p.hasIconData();lt&&fv(p,tt.posMatrix,t,e,pi,wi,k,l);var bt=t.translatePosMatrix(tt.posMatrix,w,o,s),kt=lt||e&&ei||ir?bs:pi,dt=t.translatePosMatrix(wi,w,o,s,!0),rr=it&&r.paint.get(e?"text-halo-width":"icon-halo-width").constantOr(1)!==0,bi=void 0;if(bi=it?p.iconsInText?dw(g.kind,yt,at,k,t,bt,kt,dt,rt,hi):ps(g.kind,yt,at,k,t,bt,kt,dt,e,rt,!0):ys(g.kind,yt,at,k,t,bt,kt,dt,e,rt),gt={program:nr,buffers:d,uniformValues:bi,atlasTexture:pt,atlasTextureIcon:ci,atlasInterpolation:wt,atlasInterpolationIcon:li,isSDF:it,hasHalo:rr},di&&p.canOverlap)for(ui=!0,ki=d.segments.get(),et=0,ni=ki;et<ni.length;et+=1)ti=ni[et],ft.push({segments:new n.SegmentVector([ti]),sortKey:ti.sortKey,state:gt});else ft.push({segments:d.segments,sortKey:0,state:gt})}}for(ui&&ft.sort(function(n,t){return n.sortKey-t.sortKey}),ot=0,ii=ft;ot<ii.length;ot+=1)st=ii[ot],y=st.state,ct.activeTexture.set(b.TEXTURE0),y.atlasTexture.bind(y.atlasInterpolation,b.CLAMP_TO_EDGE),y.atlasTextureIcon&&(ct.activeTexture.set(b.TEXTURE1),y.atlasTextureIcon&&y.atlasTextureIcon.bind(y.atlasInterpolationIcon,b.CLAMP_TO_EDGE)),y.isSDF&&(ht=y.uniformValues,y.hasHalo&&(ht.u_is_halo=1,ds(y.buffers,st.segments,r,t,y.program,fi,a,v,ht)),ht.u_is_halo=0),ds(y.buffers,st.segments,r,t,y.program,fi,a,v,y.uniformValues)}function ds(n,t,i,r,u,f,e,o,s){var c=r.context,l=c.gl;u.draw(c,l.TRIANGLES,f,e,o,h.disabled,s,i.id,n.layoutVertexBuffer,n.indexBuffer,t,i.paint,r.transform.zoom,n.programConfigurations.get(i.id),n.dynamicLayoutVertexBuffer,n.opacityVertexBuffer)}function cb(t,i,r,f){var l,it,a,y,p,v,w;if(t.renderPass==="translucent"){var ut=r.paint.get("circle-opacity"),ft=r.paint.get("circle-stroke-width"),et=r.paint.get("circle-stroke-opacity"),b=r.layout.get("circle-sort-key").constantOr(1)!==undefined;if(ut.constantOr(1)!==0||ft.constantOr(1)!==0&&et.constantOr(1)!==0){var k=t.context,ot=k.gl,st=t.depthModeForSublayer(0,u.ReadOnly),ht=c.disabled,ct=t.colorModeForRenderPass(),s=[];for(l=0;l<f.length;l++){var d=f[l],g=i.getTile(d),e=g.getBucket(r);if(e){var nt=e.programConfigurations.get(r.id),lt=t.useProgram("circle",nt),at=e.layoutVertexBuffer,vt=e.indexBuffer,yt=lp(t,d,g,r),tt={programConfiguration:nt,program:lt,layoutVertexBuffer:at,indexBuffer:vt,uniformValues:yt};if(b)for(it=e.segments.get(),a=0,y=it;a<y.length;a+=1)p=y[a],s.push({segments:new n.SegmentVector([p]),sortKey:p.sortKey,state:tt});else s.push({segments:e.segments,sortKey:0,state:tt})}}for(b&&s.sort(function(n,t){return n.sortKey-t.sortKey}),v=0,w=s;v<w.length;v+=1){var rt=w[v],o=rt.state,pt=o.programConfiguration,wt=o.program,bt=o.layoutVertexBuffer,kt=o.indexBuffer,dt=o.uniformValues,gt=rt.segments;wt.draw(k,ot.TRIANGLES,st,ht,ct,h.disabled,dt,r.id,bt,kt,gt,r.paint,t.transform.zoom,pt)}}}}function lb(t,i,r,f){var s,l,v,e;if(r.paint.get("heatmap-opacity")!==0)if(t.renderPass==="offscreen"){var o=t.context,a=o.gl,w=c.disabled,b=new y([a.ONE,a.ONE],n.Color.transparent,[!0,!0,!0,!0]);for(ab(o,t,r),o.clear({color:n.Color.transparent}),s=0;s<f.length;s++)if((l=f[s],!i.hasRenderableParent(l))&&(v=i.getTile(l),e=v.getBucket(r),e)){var p=e.programConfigurations.get(r.id),k=t.useProgram("heatmap",p),d=t.transform,g=d.zoom;k.draw(o,a.TRIANGLES,u.disabled,w,b,h.disabled,gp(l.posMatrix,v,g,r.paint.get("heatmap-intensity")),r.id,e.layoutVertexBuffer,e.indexBuffer,e.segments,r.paint,t.transform.zoom,p)}o.viewport.set([0,0,t.width,t.height])}else t.renderPass==="translucent"&&(t.context.setColorMode(t.colorModeForRenderPass()),yb(t,r))}function ab(n,t,i){var r=n.gl,u,f;n.activeTexture.set(r.TEXTURE1);n.viewport.set([0,0,t.width/4,t.height/4]);u=i.heatmapFbo;u?(r.bindTexture(r.TEXTURE_2D,u.colorAttachment.get()),n.bindFramebuffer.set(u.framebuffer)):(f=r.createTexture(),r.bindTexture(r.TEXTURE_2D,f),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),u=i.heatmapFbo=n.createFramebuffer(t.width/4,t.height/4,!1),vb(n,t,f,u))}function vb(n,t,i,r){var u=n.gl,f=n.extRenderToTextureHalfFloat?n.extTextureHalfFloat.HALF_FLOAT_OES:u.UNSIGNED_BYTE;u.texImage2D(u.TEXTURE_2D,0,u.RGBA,t.width/4,t.height/4,0,u.RGBA,f,null);r.colorAttachment.set(i)}function yb(t,i){var f=t.context,r=f.gl,o=i.heatmapFbo,e;o&&(f.activeTexture.set(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,o.colorAttachment.get()),f.activeTexture.set(r.TEXTURE1),e=i.colorRampTexture,e||(e=i.colorRampTexture=new n.Texture(f,i.colorRamp,r.RGBA)),e.bind(r.LINEAR,r.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(f,r.TRIANGLES,u.disabled,c.disabled,t.colorModeForRenderPass(),h.disabled,nw(t,i,0,1),i.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,i.paint,t.transform.zoom))}function pb(t,i,r,f){var it,rt,p,d,a,c,o,ct,e,nt,tt;if(t.renderPass==="translucent"&&(it=r.paint.get("line-opacity"),rt=r.paint.get("line-width"),it.constantOr(1)!==0&&rt.constantOr(1)!==0)){var lt=t.depthModeForSublayer(0,u.ReadOnly),at=t.colorModeForRenderPass(),v=r.paint.get("line-dasharray"),ut=r.paint.get("line-pattern"),y=ut.constantOr(1),b=r.paint.get("line-gradient"),k=r.getCrossfadeParameters(),vt=y?"linePattern":v?"lineSDF":b?"lineGradient":"line",l=t.context,s=l.gl,ft=!0;for(p=0,d=f;p<d.length;p+=1)if((a=d[p],c=i.getTile(a),!y||c.patternsLoaded())&&(o=c.getBucket(r),o)){var w=o.programConfigurations.get(r.id),yt=t.context.program.get(),et=t.useProgram(vt,w),pt=ft||et.program!==yt,g=ut.constantOr(null);if(g&&c.imageAtlas){var ot=c.imageAtlas,st=ot.patternPositions[g.to.toString()],ht=ot.patternPositions[g.from.toString()];st&&ht&&w.setConstantPatternPositions(st,ht)}if(ct=y?lw(t,c,r,k):v?aw(t,c,r,v,k):b?cw(t,c,r,o.lineClipsArray.length):af(t,c,r),y)l.activeTexture.set(s.TEXTURE0),c.imageAtlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE),w.updatePaintBuffers(k);else if(v&&(pt||t.lineAtlas.dirty))l.activeTexture.set(s.TEXTURE0),t.lineAtlas.bind(l);else if(b){if(e=o.gradients[r.id],nt=e.texture,r.gradientVersion!==e.version){if(tt=256,r.stepInterpolant){var wt=i.getSource().maxzoom,bt=a.canonical.z===wt?Math.ceil(1<<t.transform.maxZoom-a.canonical.z):1,kt=o.maxLineLength/n.EXTENT,dt=kt*1024*bt;tt=n.clamp(n.nextPowerOfTwo(dt),256,l.maxTextureSize)}e.gradient=n.renderColorRamp({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:tt,image:e.gradient||undefined,clips:o.lineClipsArray});e.texture?e.texture.update(e.gradient):e.texture=new n.Texture(l,e.gradient,s.RGBA);e.version=r.gradientVersion;nt=e.texture}l.activeTexture.set(s.TEXTURE0);nt.bind(r.stepInterpolant?s.NEAREST:s.LINEAR,s.CLAMP_TO_EDGE)}et.draw(l,s.TRIANGLES,lt,t.stencilModeForClipping(a),at,h.disabled,ct,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,r.paint,t.transform.zoom,w,o.layoutVertexBuffer2);ft=!1}}}function wb(t,i,r,f){var c=r.paint.get("fill-color"),e=r.paint.get("fill-opacity"),s,h;if(e.constantOr(1)!==0){var o=t.colorModeForRenderPass(),l=r.paint.get("fill-pattern"),a=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&c.constantOr(n.Color.transparent).a===1&&e.constantOr(0)===1?"opaque":"translucent";t.renderPass===a&&(s=t.depthModeForSublayer(1,t.renderPass==="opaque"?u.ReadWrite:u.ReadOnly),gs(t,i,r,f,s,o,!1));t.renderPass==="translucent"&&r.paint.get("fill-antialias")&&(h=t.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,u.ReadOnly),gs(t,i,r,f,h,o,!0))}}function gs(n,t,i,r,u,f,e){var c=n.context.gl,k=i.paint.get("fill-pattern"),l=k&&k.constantOr(1),d=i.getCrossfadeParameters(),g,y,nt,tt,it,p,rt,w,o,s,a,ft,b,v,ut;for(e?(y=l&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",g=c.LINES):(y=l?"fillPattern":"fill",g=c.TRIANGLES),p=0,rt=r;p<rt.length;p+=1)if((w=rt[p],o=t.getTile(w),!l||o.patternsLoaded())&&(s=o.getBucket(i),s)){if(a=s.programConfigurations.get(i.id),ft=n.useProgram(y,a),l&&(n.context.activeTexture.set(c.TEXTURE0),o.imageAtlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE),a.updatePaintBuffers(d)),b=k.constantOr(null),b&&o.imageAtlas){var et=o.imageAtlas,ot=et.patternPositions[b.to.toString()],st=et.patternPositions[b.from.toString()];ot&&st&&a.setConstantPatternPositions(ot,st)}v=n.translatePosMatrix(w.posMatrix,o,i.paint.get("fill-translate"),i.paint.get("fill-translate-anchor"));e?(tt=s.indexBuffer2,it=s.segments2,ut=[c.drawingBufferWidth,c.drawingBufferHeight],nt=y==="fillOutlinePattern"&&l?hp(v,n,d,o,ut):sp(v,ut)):(tt=s.indexBuffer,it=s.segments,nt=l?os(v,n,d,o):es(v));ft.draw(n.context,g,u,n.stencilModeForClipping(w),f,h.disabled,nt,i.id,s.layoutVertexBuffer,tt,it,i.paint,n.transform.zoom,a)}}function bb(n,t,i,r){var e=i.paint.get("fill-extrusion-opacity"),f,o;e!==0&&n.renderPass==="translucent"&&(f=new u(n.context.gl.LEQUAL,u.ReadWrite,n.depthRangeFor3D),e!==1||i.paint.get("fill-extrusion-pattern").constantOr(1)?(vf(n,t,i,r,f,c.disabled,y.disabled),vf(n,t,i,r,f,n.stencilModeFor3D(),n.colorModeForRenderPass())):(o=n.colorModeForRenderPass(),vf(n,t,i,r,f,c.disabled,o)))}function vf(n,t,i,r,u,f,e){for(var c,nt,l,a=n.context,v=a.gl,b=i.paint.get("fill-extrusion-pattern"),y=b.constantOr(1),k=i.getCrossfadeParameters(),d=i.paint.get("fill-extrusion-opacity"),p=0,g=r;p<g.length;p+=1){var w=g[p],o=t.getTile(w),s=o.getBucket(i);if(s){if(c=s.programConfigurations.get(i.id),nt=n.useProgram(y?"fillExtrusionPattern":"fillExtrusion",c),y&&(n.context.activeTexture.set(v.TEXTURE0),o.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),c.updatePaintBuffers(k)),l=b.constantOr(null),l&&o.imageAtlas){var tt=o.imageAtlas,it=tt.patternPositions[l.to.toString()],rt=tt.patternPositions[l.from.toString()];it&&rt&&c.setConstantPatternPositions(it,rt)}var ut=n.translatePosMatrix(w.posMatrix,o,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),ft=i.paint.get("fill-extrusion-vertical-gradient"),et=y?rp(ut,n,ft,d,w,k,o):fs(ut,n,ft,d);nt.draw(a,a.gl.TRIANGLES,u,f,e,h.backCCW,et,i.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,i.paint,n.transform.zoom,c)}}}function kb(n,t,i,r){var f,o,s,e;if(n.renderPass==="offscreen"||n.renderPass==="translucent"){var v=n.context,h=n.depthModeForSublayer(0,u.ReadOnly),l=n.colorModeForRenderPass(),a=n.renderPass==="translucent"?n.stencilConfigForOverlap(r):[{},r],y=a[0],p=a[1];for(f=0,o=p;f<o.length;f+=1)s=o[f],e=t.getTile(s),e.needsHillshadePrepare&&n.renderPass==="offscreen"?gb(n,e,i,h,c.disabled,l):n.renderPass==="translucent"&&db(n,e,i,h,y[s.overscaledZ],l);v.viewport.set([0,0,n.width,n.height])}}function db(n,t,i,r,u,f){var o=n.context,e=o.gl,s=t.fbo,c,l;s&&(c=n.useProgram("hillshade"),o.activeTexture.set(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,s.colorAttachment.get()),l=rw(n,t,i),c.draw(o,e.TRIANGLES,r,u,f,h.disabled,l,i.id,n.rasterBoundsBuffer,n.quadTriangleIndexBuffer,n.rasterBoundsSegments))}function gb(t,i,r,u,f,e){var s=t.context,o=s.gl,c=i.dem,v,a,y;if(c&&c.data){var l=c.dim,w=c.stride,p=c.getPixels();s.activeTexture.set(o.TEXTURE1);s.pixelStoreUnpackPremultiplyAlpha.set(!1);i.demTexture=i.demTexture||t.getTileTexture(w);i.demTexture?(v=i.demTexture,v.update(p,{premultiply:!1}),v.bind(o.NEAREST,o.CLAMP_TO_EDGE)):(i.demTexture=new n.Texture(s,p,o.RGBA,{premultiply:!1}),i.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE));s.activeTexture.set(o.TEXTURE0);a=i.fbo;a||(y=new n.Texture(s,{width:l,height:l,data:null},o.RGBA),y.bind(o.LINEAR,o.CLAMP_TO_EDGE),a=i.fbo=s.createFramebuffer(l,l,!0),a.colorAttachment.set(y.texture));s.bindFramebuffer.set(a.framebuffer);s.viewport.set([0,0,l,l]);t.useProgram("hillshadePrepare").draw(s,o.TRIANGLES,u,f,e,h.disabled,uw(i.tileID,c),r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments);i.needsHillshadePrepare=!1}}function nk(n,t,i,r){var a,w,k;if(n.renderPass==="translucent"&&i.paint.get("raster-opacity")!==0&&r.length){var o=n.context,f=o.gl,l=t.getSource(),d=n.useProgram("raster"),g=n.colorModeForRenderPass(),nt=l instanceof or?[{},r]:n.stencilConfigForOverlap(r),rt=nt[0],p=nt[1],ut=p[p.length-1].overscaledZ,ft=!n.options.moving;for(a=0,w=p;a<w.length;a+=1){var s=w[a],tt=n.depthModeForSublayer(s.overscaledZ-ut,i.paint.get("raster-opacity")===1?u.ReadWrite:u.ReadOnly,f.LESS),e=t.getTile(s),et=n.transform.calculatePosMatrix(s.toUnwrapped(),ft);e.registerFadeDuration(i.paint.get("raster-fade-duration"));var v=t.findLoadedParent(s,0),ot=tk(e,v,t,i,n.transform),y=void 0,it=void 0,b=i.paint.get("raster-resampling")==="nearest"?f.NEAREST:f.LINEAR;o.activeTexture.set(f.TEXTURE0);e.texture.bind(b,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST);o.activeTexture.set(f.TEXTURE1);v?(v.texture.bind(b,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),y=Math.pow(2,v.tileID.overscaledZ-e.tileID.overscaledZ),it=[e.tileID.canonical.x*y%1,e.tileID.canonical.y*y%1]):e.texture.bind(b,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST);k=vs(et,it||[0,0],y||1,ot,i);l instanceof or?d.draw(o,f.TRIANGLES,tt,c.disabled,g,h.disabled,k,i.id,l.boundsBuffer,n.quadTriangleIndexBuffer,l.boundsSegments):d.draw(o,f.TRIANGLES,tt,rt[s.overscaledZ],g,h.disabled,k,i.id,n.rasterBoundsBuffer,n.quadTriangleIndexBuffer,n.rasterBoundsSegments)}}}function tk(t,i,r,u,f){var e=u.paint.get("raster-fade-duration");if(e>0){var o=n.browser.now(),s=(o-t.timeAdded)/e,v=i?(o-i.timeAdded)/e:-1,h=r.getSource(),c=f.coveringZoomLevel({tileSize:h.tileSize,roundZoom:h.roundZoom}),l=!i||Math.abs(i.tileID.overscaledZ-c)>Math.abs(t.tileID.overscaledZ-c),a=l&&t.refreshedUponExpiration?1:n.clamp(l?s:1-v,0,1);return t.refreshedUponExpiration&&s>=1&&(t.refreshedUponExpiration=!1),i?{opacity:1,mix:1-a}:{opacity:a,mix:0}}return{opacity:1,mix:0}}function ik(n,t,i){var a=i.paint.get("background-color"),f=i.paint.get("background-opacity"),s,w,e,l;if(f!==0){var o=n.context,v=o.gl,y=n.transform,p=y.tileSize,r=i.paint.get("background-pattern");if(!n.isPatternMissing(r)&&(s=!r&&a.a===1&&f===1&&n.opaquePassEnabledForLayer()?"opaque":"translucent",n.renderPass===s)){var d=c.disabled,g=n.depthModeForSublayer(0,s==="opaque"?u.ReadWrite:u.ReadOnly),nt=n.colorModeForRenderPass(),tt=n.useProgram(r?"backgroundPattern":"background"),it=y.coveringTiles({tileSize:p});for(r&&(o.activeTexture.set(v.TEXTURE0),n.imageManager.bind(n.context)),w=i.getCrossfadeParameters(),e=0,l=it;e<l.length;e+=1){var b=l[e],k=n.transform.calculatePosMatrix(b.toUnwrapped()),rt=r?ib(k,f,n,r,{tileID:b,tileSize:p},w):tb(k,f,a);tt.draw(o,v.TRIANGLES,g,d,nt,h.disabled,rt,i.id,n.tileExtentBuffer,n.quadTriangleIndexBuffer,n.tileExtentSegments)}}}}function sk(n){var t=n.transform.padding,i=3,r;nh(n,n.transform.height-(t.top||0),i,rk);nh(n,t.bottom||0,i,uk);th(n,t.left||0,i,fk);th(n,n.transform.width-(t.right||0),i,ek);r=n.transform.centerPoint;hk(n,r.x,n.transform.height-r.y,ok)}function hk(n,t,i,r){var u=20,f=2;cu(n,t-f/2,i-u/2,f,u,r);cu(n,t-u/2,i-f/2,u,f,r)}function nh(n,t,i,r){cu(n,0,t+i/2,n.transform.width,i,r)}function th(n,t,i,r){cu(n,t-i/2,0,i,n.transform.height,r)}function cu(t,i,r,u,f,e){var s=t.context,o=s.gl;o.enable(o.SCISSOR_TEST);o.scissor(i*n.browser.devicePixelRatio,r*n.browser.devicePixelRatio,u*n.browser.devicePixelRatio,f*n.browser.devicePixelRatio);s.clear({color:e});o.disable(o.SCISSOR_TEST)}function ck(n,t,i){for(var r=0;r<i.length;r++)lk(n,t,i[r])}function lk(t,i,r){var e=t.context,f=e.gl,o=r.posMatrix,s=t.useProgram("debug"),l=u.disabled,a=c.disabled,k=t.colorModeForRenderPass(),v="$debug",b;e.activeTexture.set(f.TEXTURE0);t.emptyTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE);s.draw(e,f.LINE_STRIP,l,a,k,h.disabled,ss(o,n.Color.red),v,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var p=i.getTileByID(r.key).latestRawTileData,d=p&&p.byteLength||0,g=Math.floor(d/1024),nt=i.getTile(r).tileSize,tt=512/Math.min(nt,512)*(r.overscaledZ/t.transform.zoom)*.5,w=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(w+=" => "+r.overscaledZ);b=w+" "+g+"kb";ak(t,b);s.draw(e,f.TRIANGLES,l,a,y.alphaBlended,h.disabled,ss(o,n.Color.transparent,tt),v,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}function ak(n,t){n.initDebugOverlayCanvas();var r=n.debugOverlayCanvas,u=n.context.gl,i=n.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.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(t,5,5);i.strokeText(t,5,5);n.debugOverlayTexture.update(r);n.debugOverlayTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE)}function vk(n,t,i){var r=n.context,f=i.implementation,e,o;n.renderPass==="offscreen"?(e=f.prerender,e&&(n.setCustomLayerDefaults(),r.setColorMode(n.colorModeForRenderPass()),e.call(f,r.gl,n.transform.customLayerMatrix()),r.setDirty(),n.setBaseState())):n.renderPass==="translucent"&&(n.setCustomLayerDefaults(),r.setColorMode(n.colorModeForRenderPass()),r.setStencilMode(c.disabled),o=f.renderingMode==="3d"?new u(n.context.gl.LEQUAL,u.ReadWrite,n.depthRangeFor3D):n.depthModeForSublayer(0,u.ReadOnly),r.setDepthMode(o),f.render(r.gl,n.transform.customLayerMatrix()),r.setDirty(),n.setBaseState(),r.bindFramebuffer.set(null))}function yk(n,t){var r=!1,i=null,u=function(){i=null;r&&(n(),i=setTimeout(u,t),r=!1)};return function(){return r=!0,i||u(),i}}function vu(n,t){(!n.duration||n.duration<t.duration)&&(n.duration=t.duration,n.easing=t.easing)}function yu(t,i,r){var u=r.maxSpeed,f=r.linearity,s=r.deceleration,e=n.clamp(t*f/(i/1e3),-u,u),o=Math.abs(e)/(s*f);return{easing:r.easing,duration:o*1e3,amount:e*(o/2)}}function pf(n,t){for(var r={},i=0;i<n.length;i++)r[n[i].identifier]=t[i];return r}function gk(t){for(var f,r=new n.Point(0,0),i=0,u=t;i<u.length;i+=1)f=u[i],r._add(f);return r.div(t.length)}function td(n,t){var i=bf[t];return n.buttons===undefined||(n.buttons&i)!==i}function bu(n,t,i){for(var r=0;r<n.length;r++)if(n[r].identifier===i)return t[r]}function oh(n,t){return Math.log(n/t)/Math.LN2}function ch(n,t){return n.angleWith(t)*180/Math.PI}function kf(n){return Math.abs(n.y)>Math.abs(n.x)}function ed(n){return n*(2-n)}function df(n){return n.panDelta&&n.panDelta.mag()||n.zoomDelta||n.bearingDelta||n.pitchDelta}function ne(n){n.parentNode&&n.parentNode.removeChild(n)}function bh(t,i,r){var u;if(t=new n.LngLat(t.lng,t.lat),i){var f=new n.LngLat(t.lng-360,t.lat),e=new n.LngLat(t.lng+360,t.lat),o=r.locationPoint(t).distSqr(i);r.locationPoint(f).distSqr(i)<o?t=f:r.locationPoint(e).distSqr(i)<o&&(t=e)}while(Math.abs(t.lng-r.center.lng)>180){if(u=r.locationPoint(t),u.x>=0&&u.y>=0&&u.x<=r.width&&u.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}function kh(n,t,i){var r=n.classList;for(var u in du)r.remove("mapboxgl-"+i+"-anchor-"+u);r.add("mapboxgl-"+i+"-anchor-"+t)}function yd(t){nr!==undefined?t(nr):n.window.navigator.permissions!==undefined?n.window.navigator.permissions.query({name:"geolocation"}).then(function(n){nr=n.state!=="denied";t(nr)}):(nr=!!n.window.navigator.geolocation,t(nr))}function gh(n,t,i){var r=i&&i.maxWidth||100,e=n._container.clientHeight/2,h=n.unproject([0,e]),c=n.unproject([r,e]),u=h.distanceTo(c),f,o,s;i&&i.unit==="imperial"?(f=3.2808*u,f>5280?(o=f/5280,kr(t,r,o,n._getUIString("ScaleControl.Miles"))):kr(t,r,f,n._getUIString("ScaleControl.Feet"))):i&&i.unit==="nautical"?(s=u/1852,kr(t,r,s,n._getUIString("ScaleControl.NauticalMiles"))):u>=1e3?kr(t,r,u/1e3,n._getUIString("ScaleControl.Kilometers")):kr(t,r,u,n._getUIString("ScaleControl.Meters"))}function kr(n,t,i,r){var u=kd(i),f=u/i;n.style.width=t*f+"px";n.innerHTML=u+"&nbsp;"+r}function bd(n){var t=Math.pow(10,Math.ceil(-Math.log(n)/Math.LN10));return Math.round(n*t)/t}function kd(n){var i=Math.pow(10,(""+Math.floor(n)).length-1),t=n/i;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:t>=1?1:bd(t),i*t}function nc(t){var r,i;return t?typeof t=="number"?(r=Math.round(Math.sqrt(.5*Math.pow(t,2))),{center:new n.Point(0,0),top:new n.Point(0,t),"top-left":new n.Point(r,r),"top-right":new n.Point(-r,r),bottom:new n.Point(0,-t),"bottom-left":new n.Point(r,-r),"bottom-right":new n.Point(-r,-r),left:new n.Point(t,0),right:new n.Point(-t,0)}):t instanceof n.Point||Array.isArray(t)?(i=n.Point.convert(t),{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}):{center:n.Point.convert(t.center||[0,0]),top:n.Point.convert(t.top||[0,0]),"top-left":n.Point.convert(t["top-left"]||[0,0]),"top-right":n.Point.convert(t["top-right"]||[0,0]),bottom:n.Point.convert(t.bottom||[0,0]),"bottom-left":n.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":n.Point.convert(t["bottom-right"]||[0,0]),left:n.Point.convert(t.left||[0,0]),right:n.Point.convert(t.right||[0,0])}:nc(new n.Point(0,0))}var te=n.createCommonjsModule(function(n){function t(n){return!r(n)}function r(n){return u()?f()?e()?o()?s()?h()?c()?l()?a()?v(n&&n.failIfMajorPerformanceCaveat)?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":"not a browser"}function u(){return typeof window!="undefined"&&typeof document!="undefined"}function f(){return 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 e(){return Function.prototype&&Function.prototype.bind}function o(){return 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}function s(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function h(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var r=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(r),n,t;try{t=new Worker(i);n=!0}catch(u){n=!1}return t&&t.terminate(),URL.revokeObjectURL(i),n}function c(){return"Uint8ClampedArray"in window}function l(){return ArrayBuffer.isView}function a(){var n=document.createElement("canvas"),t,i;return(n.width=n.height=1,t=n.getContext("2d"),!t)?!1:(i=t.getImageData(0,0,1,1),i&&i.width===n.width)}function v(n){return i[n]===undefined&&(i[n]=p(n)),i[n]}function y(n){var i=document.createElement("canvas"),r=Object.create(t.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=n,i.probablySupportsContext?i.probablySupportsContext("webgl",r)||i.probablySupportsContext("experimental-webgl",r):i.supportsContext?i.supportsContext("webgl",r)||i.supportsContext("experimental-webgl",r):i.getContext("webgl",r)||i.getContext("experimental-webgl",r)}function p(n){var t=y(n),i;return t?(i=t.createShader(t.VERTEX_SHADER),!i||t.isContextLost())?!1:(t.shaderSource(i,"void main() {}"),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)===!0):!1}n.exports?n.exports=t:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=t,window.mapboxgl.notSupportedReason=r);var i={};t.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),t={},wt,ci,re,ue,ir,rr,dr,ur,fe,vt,gr,fi,er,it,sr,ve,ei,r,we,u,k,ai,tu,yt,to,hr,i,ru,v,yo,l,ot,fu,oi,w,cr,of,lr,ns,ou,sf,yi,ar,is,vr,lf,as,vs,bs,yf,o,lu,hi,bt,f,e,kt,st,ft,dt,ht,d,b,eh,sh,hh,lh,pi,gt,lt,wi,bi,ni,wr,vh,a,yh,et,ti,ki,wh,ri,tt,du,gu,dh,nr,at,tc;t.create=function(t,i,r){var u=n.window.document.createElement(t);return i!==undefined&&(u.className=i),r&&r.appendChild(u),u};t.createNS=function(t,i){return n.window.document.createElementNS(t,i)};wt=n.window.document&&n.window.document.documentElement.style;ci=ie(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);t.disableDrag=function(){wt&&ci&&(re=wt[ci],wt[ci]="none")};t.enableDrag=function(){wt&&ci&&(wt[ci]=re)};ue=ie(["transform","WebkitTransform"]);t.setTransform=function(n,t){n.style[ue]=t};ir=!1;try{rr=Object.defineProperty({},"passive",{get:function(){ir=!0}});n.window.addEventListener("test",rr,rr);n.window.removeEventListener("test",rr,rr)}catch(ig){ir=!1}t.addEventListener=function(n,t,i,r){r===void 0&&(r={});"passive"in r&&ir?n.addEventListener(t,i,r):n.addEventListener(t,i,r.capture)};t.removeEventListener=function(n,t,i,r){r===void 0&&(r={});"passive"in r&&ir?n.removeEventListener(t,i,r):n.removeEventListener(t,i,r.capture)};dr=function(t){t.preventDefault();t.stopPropagation();n.window.removeEventListener("click",dr,!0)};t.suppressClick=function(){n.window.addEventListener("click",dr,!0);n.window.setTimeout(function(){n.window.removeEventListener("click",dr,!0)},0)};t.mousePos=function(t,i){var r=t.getBoundingClientRect();return new n.Point(i.clientX-r.left-t.clientLeft,i.clientY-r.top-t.clientTop)};t.touchPos=function(t,i){for(var u=t.getBoundingClientRect(),f=[],r=0;r<i.length;r++)f.push(new n.Point(i[r].clientX-u.left-t.clientLeft,i[r].clientY-u.top-t.clientTop));return f};t.mouseButton=function(t){return typeof n.window.InstallTrigger!="undefined"&&t.button===2&&t.ctrlKey&&n.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button};t.remove=function(n){n.parentNode&&n.parentNode.removeChild(n)};ur=1;fe=function(t){function i(){t.call(this);this.images={};this.updatedImages={};this.callbackDispatchedThisFrame={};this.loaded=!1;this.requestors=[];this.patterns={};this.atlasImage=new n.RGBAImage({width:1,height:1});this.dirty=!0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.isLoaded=function(){return this.loaded},i.prototype.setLoaded=function(n){var t,i;if(this.loaded!==n&&(this.loaded=n,n)){for(t=0,i=this.requestors;t<i.length;t+=1){var r=i[t],u=r.ids,f=r.callback;this._notify(u,f)}this.requestors=[]}},i.prototype.getImage=function(n){return this.images[n]},i.prototype.addImage=function(n,t){this._validate(n,t)&&(this.images[n]=t)},i.prototype._validate=function(t,i){var r=!0;return this._validateStretch(i.stretchX,i.data&&i.data.width)||(this.fire(new n.ErrorEvent(new Error('Image "'+t+'" has invalid "stretchX" value'))),r=!1),this._validateStretch(i.stretchY,i.data&&i.data.height)||(this.fire(new n.ErrorEvent(new Error('Image "'+t+'" has invalid "stretchY" value'))),r=!1),this._validateContent(i.content,i)||(this.fire(new n.ErrorEvent(new Error('Image "'+t+'" has invalid "content" value'))),r=!1),r},i.prototype._validateStretch=function(n,t){var u,r,f,i;if(!n)return!0;for(u=0,r=0,f=n;r<f.length;r+=1){if(i=f[r],i[0]<u||i[1]<i[0]||t<i[1])return!1;u=i[1]}return!0},i.prototype._validateContent=function(n,t){return n?n.length!==4?!1:n[0]<0||t.data.width<n[0]?!1:n[1]<0||t.data.height<n[1]?!1:n[2]<0||t.data.width<n[2]?!1:n[3]<0||t.data.height<n[3]?!1:n[2]<n[0]?!1:n[3]<n[1]?!1:!0:!0},i.prototype.updateImage=function(n,t){var i=this.images[n];t.version=i.version+1;this.images[n]=t;this.updatedImages[n]=!0},i.prototype.removeImage=function(n){var t=this.images[n];delete this.images[n];delete this.patterns[n];t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},i.prototype.listImages=function(){return Object.keys(this.images)},i.prototype.getImages=function(n,t){var u=!0,i,r,f;if(!this.isLoaded())for(i=0,r=n;i<r.length;i+=1)f=r[i],this.images[f]||(u=!1);this.isLoaded()||u?this._notify(n,t):this.requestors.push({ids:n,callback:t})},i.prototype._notify=function(t,i){for(var u,r,e={},f=0,o=t;f<o.length;f+=1)u=o[f],this.images[u]||this.fire(new n.Event("styleimagemissing",{id:u})),r=this.images[u],r?e[u]={data:r.data.clone(),pixelRatio:r.pixelRatio,sdf:r.sdf,version:r.version,stretchX:r.stretchX,stretchY:r.stretchY,content:r.content,hasRenderCallback:Boolean(r.userImage&&r.userImage.render)}:n.warnOnce('Image "'+u+'" 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.');i(null,e)},i.prototype.getPixelSize=function(){var n=this.atlasImage,t=n.width,i=n.height;return{width:t,height:i}},i.prototype.getPattern=function(t){var r=this.patterns[t],i=this.getImage(t);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{var f=i.data.width+ur*2,e=i.data.height+ur*2,u={w:f,h:e,x:0,y:0},o=new n.ImagePosition(u,i);this.patterns[t]={bin:u,position:o}}return this._updatePatternAtlas(),this.patterns[t].position},i.prototype.bind=function(t){var i=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new n.Texture(t,this.atlasImage,i.RGBA);this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)},i.prototype._updatePatternAtlas=function(){var s=[],h,o;for(h in this.patterns)s.push(this.patterns[h].bin);var c=n.potpack(s),a=c.w,v=c.h,i=this.atlasImage;i.resize({width:a||1,height:v||1});for(o in this.patterns){var y=this.patterns[o],l=y.bin,r=l.x+ur,u=l.y+ur,t=this.images[o].data,f=t.width,e=t.height;n.RGBAImage.copy(t,i,{x:0,y:0},{x:r,y:u},{width:f,height:e});n.RGBAImage.copy(t,i,{x:0,y:e-1},{x:r,y:u-1},{width:f,height:1});n.RGBAImage.copy(t,i,{x:0,y:0},{x:r,y:u+e},{width:f,height:1});n.RGBAImage.copy(t,i,{x:f-1,y:0},{x:r-1,y:u},{width:1,height:e});n.RGBAImage.copy(t,i,{x:0,y:0},{x:r+f,y:u},{width:1,height:e})}this.dirty=!0},i.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},i.prototype.dispatchRenderCallbacks=function(n){for(var t,u,f,i=0,r=n;i<r.length;i+=1)(t=r[i],this.callbackDispatchedThisFrame[t])||(this.callbackDispatchedThisFrame[t]=!0,u=this.images[t],f=rc(u),f&&this.updateImage(t,u))},i}(n.Evented);var ee=fr,fc=fr,li=100000000000000000000;fr.prototype._draw=function(n,t){var e=this.ctx.measureText(n),y=e.width,a=2*this.buffer,i,r,u,f,h,o,s,c,v,l;return t&&this.useMetrics?(h=Math.floor(e.actualBoundingBoxAscent),c=this.buffer+Math.ceil(e.actualBoundingBoxAscent),o=this.buffer,s=this.buffer,r=Math.min(this.size,Math.ceil(e.actualBoundingBoxRight-e.actualBoundingBoxLeft)),f=Math.min(this.size-o,Math.ceil(e.actualBoundingBoxAscent+e.actualBoundingBoxDescent)),i=r+a,u=f+a,this.ctx.textBaseline="alphabetic"):(i=r=this.size,u=f=this.size,h=19*this.fontSize/24,o=s=0,c=this.middle,this.ctx.textBaseline="middle"),r&&f&&(this.ctx.clearRect(s,o,r,f),this.ctx.fillText(n,this.buffer,c),v=this.ctx.getImageData(s,o,r,f)),l=new Uint8ClampedArray(i*u),ec(v,i,u,r,f,this.gridOuter,this.gridInner),oe(this.gridOuter,i,u,this.f,this.v,this.z),oe(this.gridInner,i,u,this.f,this.v,this.z),oc(l,i,u,this.gridOuter,this.gridInner,this.radius,this.cutoff),{data:l,metrics:{width:r,height:f,sdfWidth:i,sdfHeight:u,top:h,left:0,advance:y}}};fr.prototype.draw=function(n){return this._draw(n,!1).data};fr.prototype.drawWithMetrics=function(n){return this._draw(n,!0)};ee.default=fc;vt=function(n,t){this.requestManager=n;this.localIdeographFontFamily=t;this.entries={}};vt.prototype.setURL=function(n){this.url=n};vt.prototype.getGlyphs=function(t,i){var r=this,o=[],f,u,e,s;for(f in t)for(u=0,e=t[f];u<e.length;u+=1)s=e[u],o.push({stack:f,id:s});n.asyncAll(o,function(n,t){var f=n.stack,u=n.id,i=r.entries[f],e,o,s;if(i||(i=r.entries[f]={glyphs:{},requests:{},ranges:{}}),e=i.glyphs[u],e!==undefined){t(null,{stack:f,id:u,glyph:e});return}if(e=r._tinySDF(i,f,u),e){i.glyphs[u]=e;t(null,{stack:f,id:u,glyph:e});return}if(o=Math.floor(u/256),o*256>65535){t(new Error("glyphs > 65535 not supported"));return}if(i.ranges[o]){t(null,{stack:f,id:u,glyph:e});return}s=i.requests[o];s||(s=i.requests[o]=[],vt.loadGlyphRange(f,o,r.url,r.requestManager,function(n,t){var u,f,e,h;if(t){for(u in t)r._doesCharSupportLocalGlyph(+u)||(i.glyphs[+u]=t[+u]);i.ranges[o]=!0}for(f=0,e=s;f<e.length;f+=1)h=e[f],h(n,t);delete i.requests[o]}));s.push(function(n,i){n?t(n):i&&t(null,{stack:f,id:u,glyph:i[u]||null})})},function(n,t){var r,u,e;if(n)i(n);else if(t){for(r={},u=0,e=t;u<e.length;u+=1){var o=e[u],s=o.stack,h=o.id,f=o.glyph;(r[s]||(r[s]={}))[h]=f&&{id:f.id,bitmap:f.bitmap.clone(),metrics:f.metrics}}i(null,r)}})};vt.prototype._doesCharSupportLocalGlyph=function(t){return!!this.localIdeographFontFamily&&(n.isChar["CJK Unified Ideographs"](t)||n.isChar["Hangul Syllables"](t)||n.isChar.Hiragana(t)||n.isChar.Katakana(t))};vt.prototype._tinySDF=function(t,i,r){var e=this.localIdeographFontFamily,f,u;if(e)return this._doesCharSupportLocalGlyph(r)?(f=t.tinySDF,f||(u="400",/bold/i.test(i)?u="900":/medium/i.test(i)?u="500":/light/i.test(i)&&(u="200"),f=t.tinySDF=new vt.TinySDF(24,3,8,.25,e,u)),{id:r,bitmap:new n.AlphaImage({width:30,height:30},f.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}):void 0};vt.loadGlyphRange=uc;vt.TinySDF=ee;gr=function(){this.specification=n.styleSpec.light.position};gr.prototype.possiblyEvaluate=function(t,i){return n.sphericalToCartesian(t.expression.evaluate(i))};gr.prototype.interpolate=function(t,i,r){return{x:n.number(t.x,i.x,r),y:n.number(t.y,i.y,r),z:n.number(t.z,i.z,r)}};var sc=new n.Properties({anchor:new n.DataConstantProperty(n.styleSpec.light.anchor),position:new gr,color:new n.DataConstantProperty(n.styleSpec.light.color),intensity:new n.DataConstantProperty(n.styleSpec.light.intensity)}),he="-transition",hc=function(t){function i(i){t.call(this);this._transitionable=new n.Transitionable(sc);this.setLight(i);this._transitioning=this._transitionable.untransitioned()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getLight=function(){return this._transitionable.serialize()},i.prototype.setLight=function(t,i){var r,u;if(i===void 0&&(i={}),!this._validate(n.validateLight,t,i))for(r in t)u=t[r],n.endsWith(r,he)?this._transitionable.setTransition(r.slice(0,-he.length),u):this._transitionable.setValue(r,u)},i.prototype.updateTransitions=function(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)},i.prototype.hasTransition=function(){return this._transitioning.hasTransition()},i.prototype.recalculate=function(n){this.properties=this._transitioning.possiblyEvaluate(n)},i.prototype._validate=function(t,i,r){return r&&r.validate===!1?!1:n.emitValidationErrors(this,t.call(n.validateStyle,n.extend({value:i,style:{glyphs:!0,sprite:!0},styleSpec:n.styleSpec})))},i}(n.Evented),ui=function(n,t){this.width=n;this.height=t;this.nextRow=0;this.data=new Uint8Array(this.width*this.height);this.dashEntry={}};ui.prototype.getDash=function(n,t){var i=n.join(",")+String(t);return this.dashEntry[i]||(this.dashEntry[i]=this.addDash(n,t)),this.dashEntry[i]};ui.prototype.getDashRanges=function(n,t,i){var c=n.length%2==1,e=[],o=c?-n[n.length-1]*i:0,s=n[0]*i,r=!0,u,f,h;for(e.push({left:o,right:s,isDash:r,zeroLength:n[0]===0}),u=n[0],f=1;f<n.length;f++)r=!r,h=n[f],o=u*i,u+=h,s=u*i,e.push({left:o,right:s,isDash:r,zeroLength:h===0});return e};ui.prototype.addRoundDash=function(n,t,i){for(var r,c,o=t/2,f=-i;f<=i;f++){var a=this.nextRow+i+f,v=this.width*a,l=0,u=n[l];for(r=0;r<this.width;r++){r/u.right>1&&(u=n[++l]);var y=Math.abs(r-u.left),p=Math.abs(r-u.right),e=Math.min(y,p),s=void 0,h=f/i*(o+1);u.isDash?(c=o-Math.abs(h),s=Math.sqrt(e*e+c*c)):s=o-Math.sqrt(e*e+h*h);this.data[v+r]=Math.max(0,Math.min(255,s+128))}}};ui.prototype.addRegularDash=function(n){for(var u,f,e,o,i,t=n.length-1;t>=0;--t)u=n[t],f=n[t+1],u.zeroLength?n.splice(t,1):f&&f.isDash===u.isDash&&(f.left=u.left,n.splice(t,1));e=n[0];o=n[n.length-1];e.isDash===o.isDash&&(e.left=o.left-this.width,o.right=e.right+this.width);var c=this.width*this.nextRow,s=0,r=n[s];for(i=0;i<this.width;i++){i/r.right>1&&(r=n[++s]);var l=Math.abs(i-r.left),a=Math.abs(i-r.right),h=Math.min(l,a),v=r.isDash?h:-h;this.data[c+i]=Math.max(0,Math.min(255,v+128))}};ui.prototype.addDash=function(t,i){var u=i?7:0,s=2*u+1,r,f,e,o,h;if(this.nextRow+s>this.height)return n.warnOnce("LineAtlas out of space"),null;for(r=0,f=0;f<t.length;f++)r+=t[f];return r!==0&&(e=this.width/r,o=this.getDashRanges(t,this.width,e),i?this.addRoundDash(o,e,u):this.addRegularDash(o)),h={y:(this.nextRow+u+.5)/this.height,height:2*u/this.height,width:r},this.nextRow+=s,this.dirty=!0,h};ui.prototype.bind=function(n){var t=n.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))};fi=function fi(t,i){var u,r,e,f;for(this.workerPool=t,this.actors=[],this.currentActor=0,this.id=n.uniqueId(),u=this.workerPool.acquire(this.id),r=0;r<u.length;r++)e=u[r],f=new fi.Actor(e,i,this.id),f.name="Worker "+r,this.actors.push(f)};fi.prototype.broadcast=function(t,i,r){r=r||function(){};n.asyncAll(this.actors,function(n,r){n.send(t,i,r)},r)};fi.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]};fi.prototype.remove=function(){this.actors.forEach(function(n){n.remove()});this.actors=[];this.workerPool.release(this.id)};fi.Actor=n.Actor;er=function(t,i,r){this.bounds=n.LngLatBounds.convert(this.validateBounds(t));this.minzoom=i||0;this.maxzoom=r||24};er.prototype.validateBounds=function(n){return!Array.isArray(n)||n.length!==4?[-180,-90,180,90]:[Math.max(-180,n[0]),Math.max(-90,n[1]),Math.min(180,n[2]),Math.min(90,n[3])]};er.prototype.contains=function(t){var i=Math.pow(2,t.z),r={minX:Math.floor(n.mercatorXfromLng(this.bounds.getWest())*i),minY:Math.floor(n.mercatorYfromLat(this.bounds.getNorth())*i),maxX:Math.ceil(n.mercatorXfromLng(this.bounds.getEast())*i),maxY:Math.ceil(n.mercatorYfromLat(this.bounds.getSouth())*i)};return t.x>=r.minX&&t.x<r.maxX&&t.y>=r.minY&&t.y<r.maxY};var cc=function(t){function i(i,r,u,f){if(t.call(this),this.id=i,this.dispatcher=u,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,n.extend(this,n.pick(r,["url","scheme","tileSize","promoteId"])),this._options=n.extend({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(f)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.load=function(){var t=this;this._loaded=!1;this.fire(new n.Event("dataloading",{dataType:"source"}));this._tileJSONRequest=ce(this._options,this.map._requestManager,function(i,r){t._tileJSONRequest=null;t._loaded=!0;i?t.fire(new n.ErrorEvent(i)):r&&(n.extend(t,r),r.bounds&&(t.tileBounds=new er(r.bounds,t.minzoom,t.maxzoom)),n.postTurnstileEvent(r.tiles,t.map._requestManager._customAccessToken),n.postMapLoadEvent(r.tiles,t.map._getMapId(),t.map._requestManager._skuToken,t.map._requestManager._customAccessToken),t.fire(new n.Event("data",{dataType:"source",sourceDataType:"metadata"})),t.fire(new n.Event("data",{dataType:"source",sourceDataType:"content"})))})},i.prototype.loaded=function(){return this._loaded},i.prototype.hasTile=function(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)},i.prototype.onAdd=function(n){this.map=n;this.load()},i.prototype.setSourceProperty=function(n){this._tileJSONRequest&&this._tileJSONRequest.cancel();n();var t=this.map.style.sourceCaches[this.id];t.clearTiles();this.load()},i.prototype.setTiles=function(n){var t=this;return this.setSourceProperty(function(){t._options.tiles=n}),this},i.prototype.setUrl=function(n){var t=this;return this.setSourceProperty(function(){t.url=n;t._options.url=n}),this},i.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},i.prototype.serialize=function(){return n.extend({},this._options)},i.prototype.loadTile=function(t,i){function u(r,u){if(delete t.request,t.aborted)return i(null);if(r&&r.status!==404)return i(r);u&&u.resourceTiming&&(t.resourceTiming=u.resourceTiming);this.map._refreshExpiredTiles&&u&&t.setExpiryData(u);t.loadVectorData(u,this.map.painter);n.cacheEntryPossiblyAdded(this.dispatcher);i(null);t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)}var f=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),r={request:this.map._requestManager.transformRequest(f,n.ResourceType.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:n.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};r.request.collectResourceTiming=this._collectResourceTiming;t.actor&&t.state!=="expired"?t.state==="loading"?t.reloadCallback=i:t.request=t.actor.send("reloadTile",r,u.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",r,u.bind(this)))},i.prototype.abortTile=function(n){n.request&&(n.request.cancel(),delete n.request);n.actor&&n.actor.send("abortTile",{uid:n.uid,type:this.type,source:this.id},undefined)},i.prototype.unloadTile=function(n){n.unloadVectorData();n.actor&&n.actor.send("removeTile",{uid:n.uid,type:this.type,source:this.id},undefined)},i.prototype.hasTransition=function(){return!1},i}(n.Evented),le=function(t){function i(i,r,u,f){t.call(this);this.id=i;this.dispatcher=u;this.setEventedParent(f);this.type="raster";this.minzoom=0;this.maxzoom=22;this.roundZoom=!0;this.scheme="xyz";this.tileSize=512;this._loaded=!1;this._options=n.extend({type:"raster"},r);n.extend(this,n.pick(r,["url","scheme","tileSize"]))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.load=function(){var t=this;this._loaded=!1;this.fire(new n.Event("dataloading",{dataType:"source"}));this._tileJSONRequest=ce(this._options,this.map._requestManager,function(i,r){t._tileJSONRequest=null;t._loaded=!0;i?t.fire(new n.ErrorEvent(i)):r&&(n.extend(t,r),r.bounds&&(t.tileBounds=new er(r.bounds,t.minzoom,t.maxzoom)),n.postTurnstileEvent(r.tiles),n.postMapLoadEvent(r.tiles,t.map._getMapId(),t.map._requestManager._skuToken),t.fire(new n.Event("data",{dataType:"source",sourceDataType:"metadata"})),t.fire(new n.Event("data",{dataType:"source",sourceDataType:"content"})))})},i.prototype.loaded=function(){return this._loaded},i.prototype.onAdd=function(n){this.map=n;this.load()},i.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},i.prototype.serialize=function(){return n.extend({},this._options)},i.prototype.hasTile=function(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)},i.prototype.loadTile=function(t,i){var r=this,u=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);t.request=n.getImage(this.map._requestManager.transformRequest(u,n.ResourceType.Tile),function(u,f){if(delete t.request,t.aborted)t.state="unloaded",i(null);else if(u)t.state="errored",i(u);else if(f){r.map._refreshExpiredTiles&&t.setExpiryData(f);delete f.cacheControl;delete f.expires;var o=r.map.painter.context,e=o.gl;t.texture=r.map.painter.getTileTexture(f.width);t.texture?t.texture.update(f,{useMipmap:!0}):(t.texture=new n.Texture(o,f,e.RGBA,{useMipmap:!0}),t.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE,e.LINEAR_MIPMAP_NEAREST),o.extTextureFilterAnisotropic&&e.texParameterf(e.TEXTURE_2D,o.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,o.extTextureFilterAnisotropicMax));t.state="loaded";n.cacheEntryPossiblyAdded(r.dispatcher);i(null)}})},i.prototype.abortTile=function(n,t){n.request&&(n.request.cancel(),delete n.request);t()},i.prototype.unloadTile=function(n,t){n.texture&&this.map.painter.saveTileTexture(n.texture);t()},i.prototype.hasTransition=function(){return!1},i}(n.Evented),lc=function(t){function i(i,r,u,f){t.call(this,i,r,u,f);this.type="raster-dem";this.maxzoom=22;this._options=n.extend({type:"raster-dem"},r);this.encoding=r.encoding||"mapbox"}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},i.prototype.loadTile=function(t,i){function u(r,u){if(delete t.request,t.aborted)t.state="unloaded",i(null);else if(r)t.state="errored",i(r);else if(u){this.map._refreshExpiredTiles&&t.setExpiryData(u);delete u.cacheControl;delete u.expires;var e=n.window.ImageBitmap&&u instanceof n.window.ImageBitmap&&n.offscreenCanvasSupported(),o=e?u:n.browser.getImageData(u,1),s={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:o,encoding:this.encoding};t.actor&&t.state!=="expired"||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",s,f.bind(this)))}}function f(n,r){n&&(t.state="errored",i(n));r&&(t.dem=r,t.needsHillshadePrepare=!0,t.state="loaded",i(null))}var r=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);t.request=n.getImage(this.map._requestManager.transformRequest(r,n.ResourceType.Tile),u.bind(this));t.neighboringTiles=this._getNeighboringTiles(t.tileID)},i.prototype._getNeighboringTiles=function(t){var i=t.canonical,u=Math.pow(2,i.z),f=(i.x-1+u)%u,e=i.x===0?t.wrap-1:t.wrap,o=(i.x+1+u)%u,s=i.x+1===u?t.wrap+1:t.wrap,r={};return r[new n.OverscaledTileID(t.overscaledZ,e,i.z,f,i.y).key]={backfilled:!1},r[new n.OverscaledTileID(t.overscaledZ,s,i.z,o,i.y).key]={backfilled:!1},i.y>0&&(r[new n.OverscaledTileID(t.overscaledZ,e,i.z,f,i.y-1).key]={backfilled:!1},r[new n.OverscaledTileID(t.overscaledZ,t.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},r[new n.OverscaledTileID(t.overscaledZ,s,i.z,o,i.y-1).key]={backfilled:!1}),i.y+1<u&&(r[new n.OverscaledTileID(t.overscaledZ,e,i.z,f,i.y+1).key]={backfilled:!1},r[new n.OverscaledTileID(t.overscaledZ,t.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},r[new n.OverscaledTileID(t.overscaledZ,s,i.z,o,i.y+1).key]={backfilled:!1}),r},i.prototype.unloadTile=function(n){n.demTexture&&this.map.painter.saveTileTexture(n.demTexture);n.fbo&&(n.fbo.destroy(),delete n.fbo);n.dem&&delete n.dem;delete n.neighboringTiles;n.state="unloaded";n.actor&&n.actor.send("removeDEMTile",{uid:n.uid,source:this.id})},i}(le),ac=function(t){function i(i,r,u,f){t.call(this);this.id=i;this.type="geojson";this.minzoom=0;this.maxzoom=18;this.tileSize=512;this.isTileClipped=!0;this.reparseOverscaled=!0;this._removed=!1;this._loaded=!1;this.actor=u.getActor();this.setEventedParent(f);this._data=r.data;this._options=n.extend({},r);this._collectResourceTiming=r.collectResourceTiming;this._resourceTiming=[];r.maxzoom!==undefined&&(this.maxzoom=r.maxzoom);r.type&&(this.type=r.type);r.attribution&&(this.attribution=r.attribution);this.promoteId=r.promoteId;var e=n.EXTENT/this.tileSize;this.workerOptions=n.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(r.buffer!==undefined?r.buffer:128)*e,tolerance:(r.tolerance!==undefined?r.tolerance:.375)*e,extent:n.EXTENT,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1},superclusterOptions:{maxZoom:r.clusterMaxZoom!==undefined?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,r.clusterMinPoints||2),extent:n.EXTENT,radius:(r.clusterRadius||50)*e,log:!1,generateId:r.generateId||!1},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.load=function(){var t=this;this.fire(new n.Event("dataloading",{dataType:"source"}));this._updateWorkerData(function(i){if(i){t.fire(new n.ErrorEvent(i));return}var r={dataType:"source",sourceDataType:"metadata"};t._collectResourceTiming&&t._resourceTiming&&t._resourceTiming.length>0&&(r.resourceTiming=t._resourceTiming,t._resourceTiming=[]);t.fire(new n.Event("data",r))})},i.prototype.onAdd=function(n){this.map=n;this.load()},i.prototype.setData=function(t){var i=this;return this._data=t,this.fire(new n.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(t){if(t){i.fire(new n.ErrorEvent(t));return}var r={dataType:"source",sourceDataType:"content"};i._collectResourceTiming&&i._resourceTiming&&i._resourceTiming.length>0&&(r.resourceTiming=i._resourceTiming,i._resourceTiming=[]);i.fire(new n.Event("data",r))}),this},i.prototype.getClusterExpansionZoom=function(n,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:n,source:this.id},t),this},i.prototype.getClusterChildren=function(n,t){return this.actor.send("geojson.getClusterChildren",{clusterId:n,source:this.id},t),this},i.prototype.getClusterLeaves=function(n,t,i,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:n,limit:t,offset:i},r),this},i.prototype._updateWorkerData=function(t){var i=this,r,u;this._loaded=!1;r=n.extend({},this.workerOptions);u=this._data;typeof u=="string"?(r.request=this.map._requestManager.transformRequest(n.browser.resolveURL(u),n.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(u);this.actor.send(this.type+".loadData",r,function(n,u){i._removed||u&&u.abandoned||(i._loaded=!0,u&&u.resourceTiming&&u.resourceTiming[i.id]&&(i._resourceTiming=u.resourceTiming[i.id].slice(0)),i.actor.send(i.type+".coalesce",{source:r.source},null),t(n))})},i.prototype.loaded=function(){return this._loaded},i.prototype.loadTile=function(t,i){var f=this,r=t.actor?"reloadTile":"loadTile",u;t.actor=this.actor;u={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:n.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(r,u,function(n,u){return(delete t.request,t.unloadVectorData(),t.aborted)?i(null):n?i(n):(t.loadVectorData(u,f.map.painter,r==="reloadTile"),i(null))})},i.prototype.abortTile=function(n){n.request&&(n.request.cancel(),delete n.request);n.aborted=!0},i.prototype.unloadTile=function(n){n.unloadVectorData();this.actor.send("removeTile",{uid:n.uid,type:this.type,source:this.id})},i.prototype.onRemove=function(){this._removed=!0;this.actor.send("removeSource",{type:this.type,source:this.id})},i.prototype.serialize=function(){return n.extend({},this._options,{type:this.type,data:this._data})},i.prototype.hasTransition=function(){return!1},i}(n.Evented),nu=n.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),or=function(t){function i(n,i,r,u){t.call(this);this.id=n;this.dispatcher=r;this.coordinates=i.coordinates;this.type="image";this.minzoom=0;this.maxzoom=22;this.tileSize=512;this.tiles={};this._loaded=!1;this.setEventedParent(u);this.options=i}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.load=function(t,i){var r=this;this._loaded=!1;this.fire(new n.Event("dataloading",{dataType:"source"}));this.url=this.options.url;n.getImage(this.map._requestManager.transformRequest(this.url,n.ResourceType.Image),function(u,f){r._loaded=!0;u?r.fire(new n.ErrorEvent(u)):f&&(r.image=f,t&&(r.coordinates=t),i&&i(),r._finishLoading())})},i.prototype.loaded=function(){return this._loaded},i.prototype.updateImage=function(n){var t=this;return!this.image||!n.url?this:(this.options.url=n.url,this.load(n.coordinates,function(){t.texture=null}),this)},i.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new n.Event("data",{dataType:"source",sourceDataType:"metadata"})))},i.prototype.onAdd=function(n){this.map=n;this.load()},i.prototype.setCoordinates=function(t){var u=this,r,i;return this.coordinates=t,r=t.map(n.MercatorCoordinate.fromLngLat),this.tileID=vc(r),this.minzoom=this.maxzoom=this.tileID.z,i=r.map(function(n){return u.tileID.getTilePoint(n)._round()}),this._boundsArray=new n.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,n.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,n.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,n.EXTENT,n.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new n.Event("data",{dataType:"source",sourceDataType:"content"})),this},i.prototype.prepare=function(){var t,i,u,r;if(Object.keys(this.tiles).length!==0&&this.image){t=this.map.painter.context;i=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,nu.members));this.boundsSegments||(this.boundsSegments=n.SegmentVector.simpleSegment(0,0,4,2));this.texture||(this.texture=new n.Texture(t,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));for(u in this.tiles)r=this.tiles[u],r.state!=="loaded"&&(r.state="loaded",r.texture=this.texture)}},i.prototype.loadTile=function(n,t){this.tileID&&this.tileID.equals(n.tileID.canonical)?(this.tiles[String(n.tileID.wrap)]=n,n.buckets={},t(null)):(n.state="errored",t(null))},i.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return!1},i}(n.Evented);var yc=function(t){function i(n,i,r,u){t.call(this,n,i,r,u);this.roundZoom=!0;this.type="video";this.options=i}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.load=function(){var t=this,u,i,r,f;for(this._loaded=!1,u=this.options,this.urls=[],i=0,r=u.urls;i<r.length;i+=1)f=r[i],this.urls.push(this.map._requestManager.transformRequest(f,n.ResourceType.Source).url);n.getVideo(this.urls,function(i,r){t._loaded=!0;i?t.fire(new n.ErrorEvent(i)):r&&(t.video=r,t.video.loop=!0,t.video.addEventListener("playing",function(){t.map.triggerRepaint()}),t.map&&t.video.play(),t._finishLoading())})},i.prototype.pause=function(){this.video&&this.video.pause()},i.prototype.play=function(){this.video&&this.video.play()},i.prototype.seek=function(t){if(this.video){var i=this.video.seekable;t<i.start(0)||t>i.end(0)?this.fire(new n.ErrorEvent(new n.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+i.start(0)+" and "+i.end(0)+"-second mark."))):this.video.currentTime=t}},i.prototype.getVideo=function(){return this.video},i.prototype.onAdd=function(n){this.map||(this.map=n,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},i.prototype.prepare=function(){var i,t,u,r;if(Object.keys(this.tiles).length!==0&&!(this.video.readyState<2)){i=this.map.painter.context;t=i.gl;this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,nu.members));this.boundsSegments||(this.boundsSegments=n.SegmentVector.simpleSegment(0,0,4,2));this.texture?this.video.paused||(this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this.texture=new n.Texture(i,this.video,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));for(u in this.tiles)r=this.tiles[u],r.state!=="loaded"&&(r.state="loaded",r.texture=this.texture)}},i.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this.video&&!this.video.paused},i}(or),pc=function(t){function i(i,r,u,f){t.call(this,i,r,u,f);r.coordinates?(!Array.isArray(r.coordinates)||r.coordinates.length!==4||r.coordinates.some(function(n){return!Array.isArray(n)||n.length!==2||n.some(function(n){return typeof n!="number"})}))&&this.fire(new n.ErrorEvent(new n.ValidationError("sources."+i,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new n.ErrorEvent(new n.ValidationError("sources."+i,null,'missing required property "coordinates"')));r.animate&&typeof r.animate!="boolean"&&this.fire(new n.ErrorEvent(new n.ValidationError("sources."+i,null,'optional "animate" property must be a boolean value')));r.canvas?typeof r.canvas=="string"||r.canvas instanceof n.window.HTMLCanvasElement||this.fire(new n.ErrorEvent(new n.ValidationError("sources."+i,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 n.ErrorEvent(new n.ValidationError("sources."+i,null,'missing required property "canvas"')));this.options=r;this.animate=r.animate!==undefined?r.animate:!0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof n.window.HTMLCanvasElement?this.options.canvas:n.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new n.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0;this.map.triggerRepaint()};this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)};this._finishLoading()},i.prototype.getCanvas=function(){return this.canvas},i.prototype.onAdd=function(n){this.map=n;this.load();this.canvas&&this.animate&&this.play()},i.prototype.onRemove=function(){this.pause()},i.prototype.prepare=function(){var r=!1,t,u,f,i;if((this.canvas.width!==this.width&&(this.width=this.canvas.width,r=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,r=!0),!this._hasInvalidDimensions())&&Object.keys(this.tiles).length!==0){t=this.map.painter.context;u=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,nu.members));this.boundsSegments||(this.boundsSegments=n.SegmentVector.simpleSegment(0,0,4,2));this.texture?(r||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new n.Texture(t,this.canvas,u.RGBA,{premultiply:!0});for(f in this.tiles)i=this.tiles[f],i.state!=="loaded"&&(i.state="loaded",i.texture=this.texture)}},i.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this._playing},i.prototype._hasInvalidDimensions=function(){for(var i,n=0,t=[this.canvas.width,this.canvas.height];n<t.length;n+=1)if(i=t[n],isNaN(i)||i<=0)return!0;return!1},i}(or),tf={vector:cc,raster:le,"raster-dem":lc,geojson:ac,video:yc,image:or,canvas:pc},wc=function(t,i,r,u){var f=new tf[i.type](t,i,r,u);if(f.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+f.id);return n.bindAll(["load","abort","unload","serialize","prepare"],f),f},bc=function(n){return tf[n]},kc=function(n,t){tf[n]=t};it=function(n,t){this.max=n;this.onRemove=t;this.reset()};it.prototype.reset=function(){var r,n,i,t;for(r in this.data)for(n=0,i=this.data[r];n<i.length;n+=1){t=i[n];t.timeout&&clearTimeout(t.timeout);this.onRemove(t.value)}return this.data={},this.order=[],this};it.prototype.add=function(n,t,i){var e=this,r=n.wrapped().key,u,f;if(this.data[r]===undefined&&(this.data[r]=[]),u={value:t,timeout:undefined},i!==undefined&&(u.timeout=setTimeout(function(){e.remove(n,u)},i)),this.data[r].push(u),this.order.push(r),this.order.length>this.max&&(f=this._getAndRemoveByKey(this.order[0]),f))this.onRemove(f);return this};it.prototype.has=function(n){return n.wrapped().key in this.data};it.prototype.getAndRemove=function(n){return this.has(n)?this._getAndRemoveByKey(n.wrapped().key):null};it.prototype._getAndRemoveByKey=function(n){var t=this.data[n].shift();return t.timeout&&clearTimeout(t.timeout),this.data[n].length===0&&delete this.data[n],this.order.splice(this.order.indexOf(n),1),t.value};it.prototype.getByKey=function(n){var t=this.data[n];return t?t[0].value:null};it.prototype.get=function(n){if(!this.has(n))return null;var t=this.data[n.wrapped().key][0];return t.value};it.prototype.remove=function(n,t){if(!this.has(n))return this;var i=n.wrapped().key,u=t===undefined?0:this.data[i].indexOf(t),r=this.data[i][u];this.data[i].splice(u,1);r.timeout&&clearTimeout(r.timeout);this.data[i].length===0&&delete this.data[i];this.onRemove(r.value);return this.order.splice(this.order.indexOf(i),1),this};it.prototype.setMaxSize=function(n){for(this.max=n;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);if(t)this.onRemove(t)}return this};it.prototype.filter=function(n){var o=[],s,t,r,u,i,f,e;for(s in this.data)for(t=0,r=this.data[s];t<r.length;t+=1)u=r[t],n(u.value)||o.push(u);for(i=0,f=o;i<f.length;i+=1)e=f[i],this.remove(e.value.tileID,e)};sr=function(n,t,i){this.context=n;var r=n.gl;this.buffer=r.createBuffer();this.dynamicDraw=Boolean(i);this.context.unbindVAO();n.bindElementBuffer.set(this.buffer);r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW);this.dynamicDraw||delete t.arrayBuffer};sr.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)};sr.prototype.updateData=function(n){var t=this.context.gl;this.context.unbindVAO();this.bind();t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,n.arrayBuffer)};sr.prototype.destroy=function(){var n=this.context.gl;this.buffer&&(n.deleteBuffer(this.buffer),delete this.buffer)};ve={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};ei=function(n,t,i,r){this.length=t.length;this.attributes=i;this.itemSize=t.bytesPerElement;this.dynamicDraw=r;this.context=n;var u=n.gl;this.buffer=u.createBuffer();n.bindVertexBuffer.set(this.buffer);u.bufferData(u.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?u.DYNAMIC_DRAW:u.STATIC_DRAW);this.dynamicDraw||delete t.arrayBuffer};ei.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)};ei.prototype.updateData=function(n){var t=this.context.gl;this.bind();t.bufferSubData(t.ARRAY_BUFFER,0,n.arrayBuffer)};ei.prototype.enableAttributes=function(n,t){for(var u,r,i=0;i<this.attributes.length;i++)u=this.attributes[i],r=t.attributes[u.name],r!==undefined&&n.enableVertexAttribArray(r)};ei.prototype.setVertexAttribPointers=function(n,t,i){for(var r,f,u=0;u<this.attributes.length;u++)r=this.attributes[u],f=t.attributes[r.name],f!==undefined&&n.vertexAttribPointer(f,r.components,n[ve[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))};ei.prototype.destroy=function(){var n=this.context.gl;this.buffer&&(n.deleteBuffer(this.buffer),delete this.buffer)};r=function(n){this.gl=n.gl;this.default=this.getDefault();this.current=this.default;this.dirty=!1};r.prototype.get=function(){return this.current};r.prototype.set=function(){};r.prototype.getDefault=function(){return this.default};r.prototype.setDefault=function(){this.set(this.default)};var ul=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getDefault=function(){return n.Color.transparent},i.prototype.set=function(n){var t=this.current;(n.r!==t.r||n.g!==t.g||n.b!==t.b||n.a!==t.a||this.dirty)&&(this.gl.clearColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)},i}(r),fl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.clearDepth(n),this.current=n,this.dirty=!1)},t}(r),el=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.clearStencil(n),this.current=n,this.dirty=!1)},t}(r),ol=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(n){var t=this.current;(n[0]!==t[0]||n[1]!==t[1]||n[2]!==t[2]||n[3]!==t[3]||this.dirty)&&(this.gl.colorMask(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)},t}(r),sl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.depthMask(n),this.current=n,this.dirty=!1)},t}(r),hl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.stencilMask(n),this.current=n,this.dirty=!1)},t}(r),cl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},t.prototype.set=function(n){var t=this.current;(n.func!==t.func||n.ref!==t.ref||n.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(n.func,n.ref,n.mask),this.current=n,this.dirty=!1)},t}(r),ll=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var n=this.gl;return[n.KEEP,n.KEEP,n.KEEP]},t.prototype.set=function(n){var t=this.current;(n[0]!==t[0]||n[1]!==t[1]||n[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(n[0],n[1],n[2]),this.current=n,this.dirty=!1)},t}(r),al=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;n?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST);this.current=n;this.dirty=!1}},t}(r),vl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(n){var t=this.current;(n[0]!==t[0]||n[1]!==t[1]||this.dirty)&&(this.gl.depthRange(n[0],n[1]),this.current=n,this.dirty=!1)},t}(r),yl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;n?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST);this.current=n;this.dirty=!1}},t}(r),pl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.LESS},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.depthFunc(n),this.current=n,this.dirty=!1)},t}(r),wl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;n?t.enable(t.BLEND):t.disable(t.BLEND);this.current=n;this.dirty=!1}},t}(r),bl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var n=this.gl;return[n.ONE,n.ZERO]},t.prototype.set=function(n){var t=this.current;(n[0]!==t[0]||n[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(n[0],n[1]),this.current=n,this.dirty=!1)},t}(r),kl=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getDefault=function(){return n.Color.transparent},i.prototype.set=function(n){var t=this.current;(n.r!==t.r||n.g!==t.g||n.b!==t.b||n.a!==t.a||this.dirty)&&(this.gl.blendColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)},i}(r),dl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.FUNC_ADD},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.blendEquation(n),this.current=n,this.dirty=!1)},t}(r),gl=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;n?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE);this.current=n;this.dirty=!1}},t}(r),na=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.BACK},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.cullFace(n),this.current=n,this.dirty=!1)},t}(r),ta=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.CCW},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.frontFace(n),this.current=n,this.dirty=!1)},t}(r),ia=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.useProgram(n),this.current=n,this.dirty=!1)},t}(r),ra=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.TEXTURE0},t.prototype.set=function(n){(n!==this.current||this.dirty)&&(this.gl.activeTexture(n),this.current=n,this.dirty=!1)},t}(r),ua=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var n=this.gl;return[0,0,n.drawingBufferWidth,n.drawingBufferHeight]},t.prototype.set=function(n){var t=this.current;(n[0]!==t[0]||n[1]!==t[1]||n[2]!==t[2]||n[3]!==t[3]||this.dirty)&&(this.gl.viewport(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)},t}(r),fa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,n);this.current=n;this.dirty=!1}},t}(r),ea=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,n);this.current=n;this.dirty=!1}},t}(r),oa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,n);this.current=n;this.dirty=!1}},t}(r),sa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,n);this.current=n;this.dirty=!1}},t}(r),ha=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n);this.current=n;this.dirty=!1},t}(r),ca=function(n){function t(t){n.call(this,t);this.vao=t.extVertexArrayObject}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(n){this.vao&&(n!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(n),this.current=n,this.dirty=!1)},t}(r),la=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,n);this.current=n;this.dirty=!1}},t}(r),aa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n);this.current=n;this.dirty=!1}},t}(r),va=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(n){if(n!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,n);this.current=n;this.dirty=!1}},t}(r),ye=function(n){function t(t,i){n.call(this,t);this.context=t;this.parent=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(r),ya=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(n){if(n!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);this.current=n;this.dirty=!1}},t}(ye),pa=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.set=function(n){if(n!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,n);this.current=n;this.dirty=!1}},t}(ye),pe=function(n,t,i,r){this.context=n;this.width=t;this.height=i;var f=n.gl,u=this.framebuffer=f.createFramebuffer();this.colorAttachment=new ya(n,u);r&&(this.depthAttachment=new pa(n,u))};pe.prototype.destroy=function(){var n=this.context.gl,i=this.colorAttachment.get(),t;i&&n.deleteTexture(i);this.depthAttachment&&(t=this.depthAttachment.get(),t&&n.deleteRenderbuffer(t));n.deleteFramebuffer(this.framebuffer)};we=519;u=function(n,t,i){this.func=n;this.mask=t;this.range=i};u.ReadOnly=!1;u.ReadWrite=!0;u.disabled=new u(we,u.ReadOnly,[0,1]);var rf=7680,c=function(n,t,i,r,u,f){this.test=n;this.ref=t;this.mask=i;this.fail=r;this.depthFail=u;this.pass=f};c.disabled=new c({func:519,mask:0},0,0,rf,rf,rf);var be=1,y=function(n,t,i){this.blendFunction=n;this.blendColor=t;this.mask=i};y.Replace=[be,0];y.disabled=new y(y.Replace,n.Color.transparent,[!1,!1,!1,!1]);y.unblended=new y(y.Replace,n.Color.transparent,[!0,!0,!0,!0]);y.alphaBlended=new y([be,771],n.Color.transparent,[!0,!0,!0,!0]);var ke=1029,de=2305,h=function(n,t,i){this.enable=n;this.mode=t;this.frontFace=i};h.disabled=new h(!1,ke,de);h.backCCW=new h(!0,ke,de);k=function(n){this.gl=n;this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object");this.clearColor=new ul(this);this.clearDepth=new fl(this);this.clearStencil=new el(this);this.colorMask=new ol(this);this.depthMask=new sl(this);this.stencilMask=new hl(this);this.stencilFunc=new cl(this);this.stencilOp=new ll(this);this.stencilTest=new al(this);this.depthRange=new vl(this);this.depthTest=new yl(this);this.depthFunc=new pl(this);this.blend=new wl(this);this.blendFunc=new bl(this);this.blendColor=new kl(this);this.blendEquation=new dl(this);this.cullFace=new gl(this);this.cullFaceSide=new na(this);this.frontFace=new ta(this);this.program=new ia(this);this.activeTexture=new ra(this);this.viewport=new ua(this);this.bindFramebuffer=new fa(this);this.bindRenderbuffer=new ea(this);this.bindTexture=new oa(this);this.bindVertexBuffer=new sa(this);this.bindElementBuffer=new ha(this);this.bindVertexArrayOES=this.extVertexArrayObject&&new ca(this);this.pixelStoreUnpack=new la(this);this.pixelStoreUnpackPremultiplyAlpha=new aa(this);this.pixelStoreUnpackFlipY=new va(this);this.extTextureFilterAnisotropic=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=n.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT));this.extTextureHalfFloat=n.getExtension("OES_texture_half_float");this.extTextureHalfFloat&&(n.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=n.getExtension("EXT_color_buffer_half_float"));this.extTimerQuery=n.getExtension("EXT_disjoint_timer_query");this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)};k.prototype.setDefault=function(){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()};k.prototype.setDirty=function(){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};k.prototype.createIndexBuffer=function(n,t){return new sr(this,n,t)};k.prototype.createVertexBuffer=function(n,t,i){return new ei(this,n,t,i)};k.prototype.createRenderbuffer=function(n,t,i){var r=this.gl,u=r.createRenderbuffer();return this.bindRenderbuffer.set(u),r.renderbufferStorage(r.RENDERBUFFER,n,t,i),this.bindRenderbuffer.set(null),u};k.prototype.createFramebuffer=function(n,t,i){return new pe(this,n,t,i)};k.prototype.clear=function(n){var r=n.color,u=n.depth,t=this.gl,i=0;r&&(i|=t.COLOR_BUFFER_BIT,this.clearColor.set(r),this.colorMask.set([!0,!0,!0,!0]));typeof u!="undefined"&&(i|=t.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(u),this.depthMask.set(!0));t.clear(i)};k.prototype.setCullFace=function(n){n.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(n.mode),this.frontFace.set(n.frontFace))};k.prototype.setDepthMode=function(n){n.func!==this.gl.ALWAYS||n.mask?(this.depthTest.set(!0),this.depthFunc.set(n.func),this.depthMask.set(n.mask),this.depthRange.set(n.range)):this.depthTest.set(!1)};k.prototype.setStencilMode=function(n){n.test.func!==this.gl.ALWAYS||n.mask?(this.stencilTest.set(!0),this.stencilMask.set(n.mask),this.stencilOp.set([n.fail,n.depthFail,n.pass]),this.stencilFunc.set({func:n.test.func,ref:n.ref,mask:n.test.mask})):this.stencilTest.set(!1)};k.prototype.setColorMode=function(t){n.deepEqual(t.blendFunction,y.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor));this.colorMask.set(t.mask)};k.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};ai=function(t){function i(i,r,u){var f=this;t.call(this);this.id=i;this.dispatcher=u;this.on("data",function(n){n.dataType==="source"&&n.sourceDataType==="metadata"&&(f._sourceLoaded=!0);f._sourceLoaded&&!f._paused&&n.dataType==="source"&&n.sourceDataType==="content"&&(f.reload(),f.transform&&f.update(f.transform))});this.on("error",function(){f._sourceErrored=!0});this._source=wc(i,r,u,this);this._tiles={};this._cache=new it(0,this._unloadTile.bind(this));this._timers={};this._cacheTimers={};this._maxTileCacheSize=null;this._loadedParentTiles={};this._coveredTiles={};this._state=new n.SourceFeatureState}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(n){if(this.map=n,this._maxTileCacheSize=n?n._maxTileCacheSize:null,this._source&&this._source.onAdd)this._source.onAdd(n)},i.prototype.onRemove=function(n){if(this._source&&this._source.onRemove)this._source.onRemove(n)},i.prototype.loaded=function(){var t,n;if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(t in this._tiles)if(n=this._tiles[t],n.state!=="loaded"&&n.state!=="errored")return!1;return!0},i.prototype.getSource=function(){return this._source},i.prototype.pause=function(){this._paused=!0},i.prototype.resume=function(){if(this._paused){var n=this._shouldReloadOnResume;this._paused=!1;this._shouldReloadOnResume=!1;n&&this.reload();this.transform&&this.update(this.transform)}},i.prototype._loadTile=function(n,t){return this._source.loadTile(n,t)},i.prototype._unloadTile=function(n){if(this._source.unloadTile)return this._source.unloadTile(n,function(){})},i.prototype._abortTile=function(n){if(this._source.abortTile)return this._source.abortTile(n,function(){})},i.prototype.serialize=function(){return this._source.serialize()},i.prototype.prepare=function(n){var i,t;this._source.prepare&&this._source.prepare();this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(i in this._tiles)t=this._tiles[i],t.upload(n),t.prepare(this.map.style.imageManager)},i.prototype.getIds=function(){return n.values(this._tiles).map(function(n){return n.tileID}).sort(ge).map(function(n){return n.key})},i.prototype.getRenderableIds=function(t){var r=this,i=[];for(var u in this._tiles)this._isIdRenderable(u,t)&&i.push(this._tiles[u]);return t?i.sort(function(t,i){var u=t.tileID,f=i.tileID,e=new n.Point(u.canonical.x,u.canonical.y)._rotate(r.transform.angle),o=new n.Point(f.canonical.x,f.canonical.y)._rotate(r.transform.angle);return u.overscaledZ-f.overscaledZ||o.y-e.y||o.x-e.x}).map(function(n){return n.tileID.key}):i.map(function(n){return n.tileID}).sort(ge).map(function(n){return n.key})},i.prototype.hasRenderableParent=function(n){var t=this.findLoadedParent(n,0);return t?this._isIdRenderable(t.tileID.key):!1},i.prototype._isIdRenderable=function(n,t){return this._tiles[n]&&this._tiles[n].hasData()&&!this._coveredTiles[n]&&(t||!this._tiles[n].holdingForFade())},i.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var n in this._tiles)this._tiles[n].state!=="errored"&&this._reloadTile(n,"reloading")},i.prototype._reloadTile=function(n,t){var i=this._tiles[n];i&&(i.state!=="loading"&&(i.state=t),this._loadTile(i,this._tileLoaded.bind(this,i,n,t)))},i.prototype._tileLoaded=function(t,i,r,u){if(u){t.state="errored";u.status!==404?this._source.fire(new n.ErrorEvent(u,{tile:t})):this.update(this.transform);return}t.timeAdded=n.browser.now();r==="expired"&&(t.refreshedUponExpiration=!0);this._setTileReloadTimer(i,t);this.getSource().type==="raster-dem"&&t.dem&&this._backfillDEM(t);this._state.initializeTileState(t,this.map?this.map.painter:null);this._source.fire(new n.Event("data",{dataType:"source",tile:t,coord:t.tileID}))},i.prototype._backfillDEM=function(n){function f(n,t){n.needsHillshadePrepare=!0;var i=t.tileID.canonical.x-n.tileID.canonical.x,u=t.tileID.canonical.y-n.tileID.canonical.y,r=Math.pow(2,n.tileID.canonical.z),f=t.tileID.key;(i!==0||u!==0)&&(Math.abs(u)>1||(Math.abs(i)>1&&(Math.abs(i+r)===1?i+=r:Math.abs(i-r)===1&&(i-=r)),t.dem&&n.dem)&&(n.dem.backfillBorder(t.dem,i,u),n.neighboringTiles&&n.neighboringTiles[f]&&(n.neighboringTiles[f].backfilled=!0)))}for(var i,r,u=this.getRenderableIds(),t=0;t<u.length;t++)i=u[t],n.neighboringTiles&&n.neighboringTiles[i]&&(r=this.getTileByID(i),f(n,r),f(r,n))},i.prototype.getTile=function(n){return this.getTileByID(n.key)},i.prototype.getTileByID=function(n){return this._tiles[n]},i.prototype._retainLoadedChildren=function(n,t,i,r){var o,u,e,s,f;for(o in this._tiles)if(u=this._tiles[o],!r[o]&&u.hasData()&&!(u.tileID.overscaledZ<=t)&&!(u.tileID.overscaledZ>i)){for(e=u.tileID;u&&u.tileID.overscaledZ>t+1;)s=u.tileID.scaledTo(u.tileID.overscaledZ-1),u=this._tiles[s.key],u&&u.hasData()&&(e=s);for(f=e;f.overscaledZ>t;)if(f=f.scaledTo(f.overscaledZ-1),n[f.key]){r[e.key]=e;break}}},i.prototype.findLoadedParent=function(n,t){var i,r,f,u;if(n.key in this._loadedParentTiles)return i=this._loadedParentTiles[n.key],i&&i.tileID.overscaledZ>=t?i:null;for(r=n.overscaledZ-1;r>=t;r--)if(f=n.scaledTo(r),u=this._getLoadedTile(f),u)return u},i.prototype._getLoadedTile=function(n){var t=this._tiles[n.key];return t&&t.hasData()?t:this._cache.getByKey(n.wrapped().key)},i.prototype.updateCacheSize=function(n){var i=Math.ceil(n.width/this._source.tileSize)+1,r=Math.ceil(n.height/this._source.tileSize)+1,u=i*r,t=Math.floor(u*5),f=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,t):t;this._cache.setMaxSize(f)},i.prototype.handleWrapJump=function(n){var s=this._prevLng===undefined?n:this._prevLng,h=n-s,c=h/360,f=Math.round(c),i,e,t,r,u,o;if(this._prevLng=n,f){i={};for(e in this._tiles)t=this._tiles[e],t.tileID=t.tileID.unwrapTo(t.tileID.wrap+f),i[t.tileID.key]=t;this._tiles=i;for(r in this._timers)clearTimeout(this._timers[r]),delete this._timers[r];for(u in this._tiles)o=this._tiles[u],this._setTileReloadTimer(u,o)}},i.prototype.update=function(t){var nt=this,u,h,a,e,o,d,g,c,p,w,f;if(this.transform=t,this._sourceLoaded&&!this._paused){this.updateCacheSize(t);this.handleWrapJump(this.transform.center.lng);this._coveredTiles={};this.used?this._source.tileID?u=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(t){return new n.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)}):(u=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(u=u.filter(function(n){return nt._source.hasTile(n)}))):u=[];var s=t.coveringZoomLevel(this._source),tt=Math.max(s-i.maxOverzooming,this._source.minzoom),it=Math.max(s+i.maxUnderzooming,this._source.minzoom),r=this._updateRetainedTiles(u,s);if(no(this._source.type)){var l={},b={},rt=Object.keys(r);for(h=0,a=rt;h<a.length;h+=1){var v=a[h],k=r[v],y=this._tiles[v];!y||y.fadeEndTime&&y.fadeEndTime<=n.browser.now()||(e=this.findLoadedParent(k,tt),e&&(this._addTile(e.tileID),l[e.tileID.key]=e.tileID),b[v]=k)}this._retainLoadedChildren(b,s,it,r);for(o in l)r[o]||(this._coveredTiles[o]=!0,r[o]=l[o])}for(d in r)this._tiles[d].clearFadeHold();for(g=n.keysDifference(this._tiles,r),c=0,p=g;c<p.length;c+=1)w=p[c],f=this._tiles[w],f.hasSymbolBuckets&&!f.holdingForFade()?f.setHoldDuration(this.map._fadeDuration):(!f.hasSymbolBuckets||f.symbolFadeFinished())&&this._removeTile(w);this._updateLoadedParentTileCache()}},i.prototype.releaseSymbolFadeTiles=function(){for(var n in this._tiles)this._tiles[n].holdingForFade()&&this._removeTile(n)},i.prototype._updateRetainedTiles=function(n,t){for(var e,d,h,v,o,u,c,y,s,p,l,f,r={},w={},g=Math.max(t-i.maxOverzooming,this._source.minzoom),nt=Math.max(t+i.maxUnderzooming,this._source.minzoom),b={},a=0,k=n;a<k.length;a+=1)(e=k[a],d=this._addTile(e),r[e.key]=e,d.hasData())||t<this._source.maxzoom&&(b[e.key]=e);for(this._retainLoadedChildren(b,t,nt,r),h=0,v=n;h<v.length;h+=1)if(o=v[h],u=this._tiles[o.key],!u.hasData()){if(t+1>this._source.maxzoom){if(c=o.children(this._source.maxzoom)[0],y=this.getTile(c),!!y&&y.hasData()){r[c.key]=c;continue}}else if(s=o.children(this._source.maxzoom),r[s[0].key]&&r[s[1].key]&&r[s[2].key]&&r[s[3].key])continue;for(p=u.wasRequested(),l=o.overscaledZ-1;l>=g;--l){if(f=o.scaledTo(l),w[f.key])break;if(w[f.key]=!0,u=this.getTile(f),!u&&p&&(u=this._addTile(f)),u&&(r[f.key]=f,p=u.wasRequested(),u.hasData()))break}}return r},i.prototype._updateLoadedParentTileCache=function(){var f,r,i,u,o;this._loadedParentTiles={};for(f in this._tiles){for(var e=[],t=void 0,n=this._tiles[f].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){t=this._loadedParentTiles[n.key];break}if(e.push(n.key),r=n.scaledTo(n.overscaledZ-1),t=this._getLoadedTile(r),t)break;n=r}for(i=0,u=e;i<u.length;i+=1)o=u[i],this._loadedParentTiles[o]=t}},i.prototype._addTile=function(t){var i=this._tiles[t.key],r;return i?i:(i=this._cache.getAndRemove(t),i&&(this._setTileReloadTimer(t.key,i),i.tileID=t,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,i))),r=Boolean(i),r||(i=new n.Tile(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(i,this._tileLoaded.bind(this,i,t.key,i.state))),!i)?null:(i.uses++,this._tiles[t.key]=i,r||this._source.fire(new n.Event("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i)},i.prototype._setTileReloadTimer=function(n,t){var r=this,i;n in this._timers&&(clearTimeout(this._timers[n]),delete this._timers[n]);i=t.getExpiryTimeout();i&&(this._timers[n]=setTimeout(function(){r._reloadTile(n,"expired");delete r._timers[n]},i))},i.prototype._removeTile=function(n){var t=this._tiles[n];t&&((t.uses--,delete this._tiles[n],this._timers[n]&&(clearTimeout(this._timers[n]),delete this._timers[n]),t.uses>0)||(t.hasData()&&t.state!=="reloading"?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},i.prototype.clearTiles=function(){this._shouldReloadOnResume=!1;this._paused=!1;for(var n in this._tiles)this._removeTile(n);this._cache.reset()},i.prototype.tilesIn=function(t,i,r){var b=this,s=[],u=this.transform,e,v,f,w,o;if(!u)return s;var k=r?u.getCameraQueryGeometry(t):t,d=t.map(function(n){return u.pointCoordinate(n)}),y=k.map(function(n){return u.pointCoordinate(n)}),p=this.getIds(),h=Infinity,c=Infinity,l=-Infinity,a=-Infinity;for(e=0,v=y;e<v.length;e+=1)f=v[e],h=Math.min(h,f.x),c=Math.min(c,f.y),l=Math.max(l,f.x),a=Math.max(a,f.y);for(w=function(t){var r=b._tiles[p[t]],w,k;if(!r.holdingForFade()){var f=r.tileID,v=Math.pow(2,u.zoom-r.tileID.overscaledZ),e=i*r.queryPadding*n.EXTENT/r.tileSize/v,o=[f.getTilePoint(new n.MercatorCoordinate(h,c)),f.getTilePoint(new n.MercatorCoordinate(l,a))];o[0].x-e<n.EXTENT&&o[0].y-e<n.EXTENT&&o[1].x+e>=0&&o[1].y+e>=0&&(w=d.map(function(n){return f.getTilePoint(n)}),k=y.map(function(n){return f.getTilePoint(n)}),s.push({tile:r,tileID:f,queryGeometry:w,cameraQueryGeometry:k,scale:v}))}},o=0;o<p.length;o++)w(o);return s},i.prototype.getVisibleCoordinates=function(n){for(var i,f=this,r=this.getRenderableIds(n).map(function(n){return f._tiles[n].tileID}),t=0,u=r;t<u.length;t+=1)i=u[t],i.posMatrix=this.transform.calculatePosMatrix(i.toUnwrapped());return r},i.prototype.hasTransition=function(){var i,t;if(this._source.hasTransition())return!0;if(no(this._source.type))for(i in this._tiles)if(t=this._tiles[i],t.fadeEndTime!==undefined&&t.fadeEndTime>=n.browser.now())return!0;return!1},i.prototype.setFeatureState=function(n,t,i){n=n||"_geojsonTileLayer";this._state.updateState(n,t,i)},i.prototype.removeFeatureState=function(n,t,i){n=n||"_geojsonTileLayer";this._state.removeFeatureState(n,t,i)},i.prototype.getFeatureState=function(n,t){return n=n||"_geojsonTileLayer",this._state.getState(n,t)},i.prototype.setDependencies=function(n,t,i){var r=this._tiles[n];r&&r.setDependencies(t,i)},i.prototype.reloadTilesForDependencies=function(n,t){var i,r;for(i in this._tiles)r=this._tiles[i],r.hasDependency(n,t)&&this._reloadTile(i,"reloading");this._cache.filter(function(i){return!i.hasDependency(n,t)})},i}(n.Evented);ai.maxOverzooming=10;ai.maxUnderzooming=3;tu="mapboxgl_preloaded_worker_pool";yt=function(){this.active={}};yt.prototype.acquire=function(n){if(!this.workers)for(this.workers=[];this.workers.length<yt.workerCount;)this.workers.push(new wa);return this.active[n]=!0,this.workers.slice()};yt.prototype.release=function(n){delete this.active[n];this.numActive()===0&&(this.workers.forEach(function(n){n.terminate()}),this.workers=null)};yt.prototype.isPreloaded=function(){return!!this.active[tu]};yt.prototype.numActive=function(){return Object.keys(this.active).length};to=Math.floor(n.browser.hardwareConcurrency/2);yt.workerCount=Math.max(Math.min(to,6),1);i={setStyle:"setStyle",addLayer:"addLayer",moveLayer:"moveLayer",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"};ru=function(n,t){this.reset(n,t)};ru.prototype.reset=function(n,t){this.points=n||[];this._distances=[0];for(var i=1;i<this.points.length;i++)this._distances[i]=this._distances[i-1]+this.points[i].dist(this.points[i-1]);this.length=this._distances[this._distances.length-1];this.padding=Math.min(t||0,this.length*.5);this.paddedLength=this.length-this.padding*2};ru.prototype.lerp=function(t){if(this.points.length===1)return this.points[0];t=n.clamp(t,0,1);for(var i=1,r=this._distances[i],u=t*this.paddedLength+this.padding;r<u&&i<this._distances.length;)r=this._distances[++i];var f=i-1,e=this._distances[f],o=r-e,s=o>0?(u-e)/o:0;return this.points[f].mult(1-s).add(this.points[i].mult(s))};v=function(n,t,i){var u=this.boxCells=[],f=this.circleCells=[],r;for(this.xCellCount=Math.ceil(n/i),this.yCellCount=Math.ceil(t/i),r=0;r<this.xCellCount*this.yCellCount;r++)u.push([]),f.push([]);this.circleKeys=[];this.boxKeys=[];this.bboxes=[];this.circles=[];this.width=n;this.height=t;this.xScale=this.xCellCount/n;this.yScale=this.yCellCount/t;this.boxUid=0;this.circleUid=0};v.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length};v.prototype.insert=function(n,t,i,r,u){this._forEachCell(t,i,r,u,this._insertBoxCell,this.boxUid++);this.boxKeys.push(n);this.bboxes.push(t);this.bboxes.push(i);this.bboxes.push(r);this.bboxes.push(u)};v.prototype.insertCircle=function(n,t,i,r){this._forEachCell(t-r,i-r,t+r,i+r,this._insertCircleCell,this.circleUid++);this.circleKeys.push(n);this.circles.push(t);this.circles.push(i);this.circles.push(r)};v.prototype._insertBoxCell=function(n,t,i,r,u,f){this.boxCells[u].push(f)};v.prototype._insertCircleCell=function(n,t,i,r,u,f){this.circleCells[u].push(f)};v.prototype._query=function(n,t,i,r,u,f){var e,o,s,a;if(i<0||n>this.width||r<0||t>this.height)return u?!1:[];if(e=[],n<=0&&t<=0&&this.width<=i&&this.height<=r){if(u)return!0;for(o=0;o<this.boxKeys.length;o++)e.push({key:this.boxKeys[o],x1:this.bboxes[o*4],y1:this.bboxes[o*4+1],x2:this.bboxes[o*4+2],y2:this.bboxes[o*4+3]});for(s=0;s<this.circleKeys.length;s++){var c=this.circles[s*3],l=this.circles[s*3+1],h=this.circles[s*3+2];e.push({key:this.circleKeys[s],x1:c-h,y1:l-h,x2:c+h,y2:l+h})}return f?e.filter(f):e}return a={hitTest:u,seenUids:{box:{},circle:{}}},this._forEachCell(n,t,i,r,this._queryCell,e,a,f),u?e.length>0:e};v.prototype._queryCircle=function(n,t,i,r,u){var e=n-i,o=n+i,s=t-i,h=t+i,f,c;return o<0||e>this.width||h<0||s>this.height?r?!1:[]:(f=[],c={hitTest:r,circle:{x:n,y:t,radius:i},seenUids:{box:{},circle:{}}},this._forEachCell(e,s,o,h,this._queryCellCircle,f,c,u),r?f.length>0:f)};v.prototype.query=function(n,t,i,r,u){return this._query(n,t,i,r,!1,u)};v.prototype.hitTest=function(n,t,i,r,u){return this._query(n,t,i,r,!0,u)};v.prototype.hitTestCircle=function(n,t,i,r){return this._queryCircle(n,t,i,!0,r)};v.prototype._queryCell=function(n,t,i,r,u,f,e,o){var y=e.seenUids,nt=this.boxCells[u],s,p,k,a,h,d,c,w,g,v,l;if(nt!==null)for(s=this.bboxes,p=0,k=nt;p<k.length;p+=1)if(a=k[p],!y.box[a]&&(y.box[a]=!0,h=a*4,n<=s[h+2]&&t<=s[h+3]&&i>=s[h+0]&&r>=s[h+1]&&(!o||o(this.boxKeys[a])))){if(e.hitTest)return f.push(!0),!0;f.push({key:this.boxKeys[a],x1:s[h],y1:s[h+1],x2:s[h+2],y2:s[h+3]})}if(d=this.circleCells[u],d!==null)for(c=this.circles,w=0,g=d;w<g.length;w+=1)if(v=g[w],!y.circle[v]&&(y.circle[v]=!0,l=v*3,this._circleAndRectCollide(c[l],c[l+1],c[l+2],n,t,i,r)&&(!o||o(this.circleKeys[v])))){if(e.hitTest)return f.push(!0),!0;var tt=c[l],it=c[l+1],b=c[l+2];f.push({key:this.circleKeys[v],x1:tt-b,y1:it-b,x2:tt+b,y2:it+b})}};v.prototype._queryCellCircle=function(n,t,i,r,u,f,e,o){var s=e.circle,v=e.seenUids,nt=this.boxCells[u],h,y,k,c,l,d,p,w,g,a,b;if(nt!==null)for(h=this.bboxes,y=0,k=nt;y<k.length;y+=1)if(c=k[y],!v.box[c]&&(v.box[c]=!0,l=c*4,this._circleAndRectCollide(s.x,s.y,s.radius,h[l+0],h[l+1],h[l+2],h[l+3])&&(!o||o(this.boxKeys[c]))))return f.push(!0),!0;if(d=this.circleCells[u],d!==null)for(p=this.circles,w=0,g=d;w<g.length;w+=1)if(a=g[w],!v.circle[a]&&(v.circle[a]=!0,b=a*3,this._circlesCollide(p[b],p[b+1],p[b+2],s.x,s.y,s.radius)&&(!o||o(this.circleKeys[a]))))return f.push(!0),!0};v.prototype._forEachCell=function(n,t,i,r,u,f,e,o){for(var s,c,l=this._convertToXCellCoord(n),a=this._convertToYCellCoord(t),v=this._convertToXCellCoord(i),y=this._convertToYCellCoord(r),h=l;h<=v;h++)for(s=a;s<=y;s++)if(c=this.xCellCount*s+h,u.call(this,n,t,i,r,c,f,e,o))return};v.prototype._convertToXCellCoord=function(n){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(n*this.xScale)))};v.prototype._convertToYCellCoord=function(n){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(n*this.yScale)))};v.prototype._circlesCollide=function(n,t,i,r,u,f){var e=r-n,o=u-t,s=i+f;return s*s>e*e+o*o};v.prototype._circleAndRectCollide=function(n,t,i,r,u,f,e){var s=(f-r)/2,c=Math.abs(n-(r+s)),o,h,l,a;return c>s+i?!1:(o=(e-u)/2,h=Math.abs(t-(u+o)),h>o+i)?!1:c<=s||h<=o?!0:(l=c-s,a=h-o,l*l+a*a<=i*i)};yo=new Float32Array([-Infinity,-Infinity,0,-Infinity,-Infinity,0,-Infinity,-Infinity,0,-Infinity,-Infinity,0]);l=100;ot=function(n,t,i){t===void 0&&(t=new v(n.width+2*l,n.height+2*l,25));i===void 0&&(i=new v(n.width+2*l,n.height+2*l,25));this.transform=n;this.grid=t;this.ignoredGrid=i;this.pitchfactor=Math.cos(n._pitch)*n.cameraToCenterDistance;this.screenRightBoundary=n.width+l;this.screenBottomBoundary=n.height+l;this.gridRightBoundary=n.width+2*l;this.gridBottomBoundary=n.height+2*l};ot.prototype.placeCollisionBox=function(n,t,i,r,u){var f=this.projectAndGetPerspectiveRatio(r,n.anchorPointX,n.anchorPointY),e=i*f.perspectiveRatio,o=n.x1*e+f.point.x,s=n.y1*e+f.point.y,h=n.x2*e+f.point.x,c=n.y2*e+f.point.y;return!this.isInsideGrid(o,s,h,c)||!t&&this.grid.hitTest(o,s,h,c,u)?{box:[],offscreen:!1}:{box:[o,s,h,c],offscreen:this.isOffscreen(o,s,h,c)}};ot.prototype.placeCollisionCircles=function(t,i,r,u,f,e,o,s,h,c,a,v,y){var gt=[],lt=new n.Point(i.anchorX,i.anchorY),hi=rt(lt,e),at=ff(this.transform.cameraToCenterDistance,hi.signedDistanceFromCamera),ci=c?f/at:f*at,vt=ci/n.ONE_EM,li=rt(lt,o).point,ai=i.lineOffsetX*vt,vi=i.lineOffsetY*vt,yt=co(vt,u,ai,vi,!1,li,lt,i,r,o,{}),tt=!1,pt=!1,wt=!0,ut,ft,ii,bt,kt,b,k,d,et,dt,ri,ot,st;if(yt){var w=v*.5*at+y,g=new n.Point(-l,-l),nt=new n.Point(this.screenRightBoundary,this.screenBottomBoundary),it=new ru,ni=yt.first,ti=yt.last,p=[];for(ut=ni.path.length-1;ut>=1;ut--)p.push(ni.path[ut]);for(ft=1;ft<ti.path.length;ft++)p.push(ti.path[ft]);if(ii=w*2.5,s&&(bt=p.map(function(n){return rt(n,s)}),p=bt.some(function(n){return n.signedDistanceFromCamera<=0})?[]:bt.map(function(n){return n.point})),kt=[],p.length>0){for(b=p[0].clone(),k=p[0].clone(),d=1;d<p.length;d++)b.x=Math.min(b.x,p[d].x),b.y=Math.min(b.y,p[d].y),k.x=Math.max(k.x,p[d].x),k.y=Math.max(k.y,p[d].y);kt=b.x>=g.x&&k.x<=nt.x&&b.y>=g.y&&k.y<=nt.y?[p]:k.x<g.x||b.x>nt.x||k.y<g.y||b.y>nt.y?[]:n.clipLine([p],g.x,g.y,nt.x,nt.y)}for(et=0,dt=kt;et<dt.length;et+=1)for(ri=dt[et],it.reset(ri,w*.25),ot=0,ot=it.length<=.5*w?1:Math.ceil(it.paddedLength/ii)+1,st=0;st<ot;st++){var yi=st/Math.max(ot-1,1),ui=it.lerp(yi),ht=ui.x+l,ct=ui.y+l;gt.push(ht,ct,w,0);var fi=ht-w,ei=ct-w,oi=ht+w,si=ct+w;if(wt=wt&&this.isOffscreen(fi,ei,oi,si),pt=pt||this.isInsideGrid(fi,ei,oi,si),!t&&this.grid.hitTestCircle(ht,ct,w,a)&&(tt=!0,!h))return{circles:[],offscreen:!1,collisionDetected:tt}}}return{circles:!h&&tt||!pt?[]:gt,offscreen:wt,collisionDetected:tt}};ot.prototype.queryRenderedSymbols=function(t){var h,y,p,u,v,w,r,i,k;if(t.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};var b=[],f=Infinity,e=Infinity,o=-Infinity,s=-Infinity;for(h=0,y=t;h<y.length;h+=1)p=y[h],u=new n.Point(p.x+l,p.y+l),f=Math.min(f,u.x),e=Math.min(e,u.y),o=Math.max(o,u.x),s=Math.max(s,u.y),b.push(u);var d=this.grid.query(f,e,o,s).concat(this.ignoredGrid.query(f,e,o,s)),c={},a={};for(v=0,w=d;v<w.length;v+=1)(r=w[v],i=r.key,c[i.bucketInstanceId]===undefined&&(c[i.bucketInstanceId]={}),c[i.bucketInstanceId][i.featureIndex])||(k=[new n.Point(r.x1,r.y1),new n.Point(r.x2,r.y1),new n.Point(r.x2,r.y2),new n.Point(r.x1,r.y2)],n.polygonIntersectsPolygon(b,k))&&(c[i.bucketInstanceId][i.featureIndex]=!0,a[i.bucketInstanceId]===undefined&&(a[i.bucketInstanceId]=[]),a[i.bucketInstanceId].push(i.featureIndex));return a};ot.prototype.insertCollisionBox=function(n,t,i,r,u){var f=t?this.ignoredGrid:this.grid,e={bucketInstanceId:i,featureIndex:r,collisionGroupID:u};f.insert(e,n[0],n[1],n[2],n[3])};ot.prototype.insertCollisionCircles=function(n,t,i,r,u){for(var e=t?this.ignoredGrid:this.grid,o={bucketInstanceId:i,featureIndex:r,collisionGroupID:u},f=0;f<n.length;f+=4)e.insertCircle(o,n[f],n[f+1],n[f+2])};ot.prototype.projectAndGetPerspectiveRatio=function(t,i,r){var u=[i,r,0,1],f;return po(u,u,t),f=new n.Point((u[0]/u[3]+1)/2*this.transform.width+l,(-u[1]/u[3]+1)/2*this.transform.height+l),{point:f,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/u[3])}};ot.prototype.isOffscreen=function(n,t,i,r){return i<l||n>=this.screenRightBoundary||r<l||t>this.screenBottomBoundary};ot.prototype.isInsideGrid=function(n,t,i,r){return i>=0&&n<this.gridRightBoundary&&r>=0&&t<this.gridBottomBoundary};ot.prototype.getViewportMatrix=function(){var t=n.identity([]);return n.translate(t,t,[-l,-l,0]),t};fu=function(n,t,i,r){this.opacity=n?Math.max(0,Math.min(1,n.opacity+(n.placed?t:-t))):r&&i?1:0;this.placed=i};fu.prototype.isHidden=function(){return this.opacity===0&&!this.placed};oi=function(n,t,i,r,u){this.text=new fu(n?n.text:null,t,i,u);this.icon=new fu(n?n.icon:null,t,r,u)};oi.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var wo=function(n,t,i){this.text=n;this.icon=t;this.skipFade=i},ev=function(){this.invProjMatrix=n.create();this.viewportMatrix=n.create();this.circles=[]},ov=function(n,t,i,r,u){this.bucketInstanceId=n;this.featureIndex=t;this.sourceLayerIndex=i;this.bucketIndex=r;this.tileID=u},bo=function(n){this.crossSourceCollisions=n;this.maxGroupID=0;this.collisionGroups={}};bo.prototype.get=function(n){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[n]){var t=++this.maxGroupID;this.collisionGroups[n]={ID:t,predicate:function(n){return n.collisionGroupID===t}}}return this.collisionGroups[n]};w=function(n,t,i,r){this.transform=n.clone();this.collisionIndex=new ot(this.transform);this.placements={};this.opacities={};this.variableOffsets={};this.stale=!1;this.commitTime=0;this.fadeDuration=t;this.retainedQueryData={};this.collisionGroups=new bo(i);this.collisionCircleArrays={};this.prevPlacement=r;r&&(r.prevPlacement=undefined);this.placedOrientations={}};w.prototype.getBucketParts=function(t,i,r,u){var f=r.getBucket(i),v=r.latestFeatureIndex,b,c,e,l;if(f&&v&&i.id===f.layerIds[0]){var k=r.collisionBoxArray,o=f.layers[0].layout,d=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),g=r.tileSize/n.EXTENT,s=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=o.get("text-pitch-alignment")==="map",y=o.get("text-rotation-alignment")==="map",p=nt(r,1,this.transform.zoom),tt=uf(s,h,y,this.transform,p),w=null;if(h&&(b=ho(s,h,y,this.transform,p),w=n.multiply([],this.transform.labelPlaneMatrix,b)),this.retainedQueryData[f.bucketInstanceId]=new ov(f.bucketInstanceId,v,f.sourceLayerIndex,f.index,r.tileID),c={bucket:f,layout:o,posMatrix:s,textLabelPlaneMatrix:tt,labelToScreenMatrix:w,scale:d,textPixelRatio:g,holdingForFade:r.holdingForFade(),collisionBoxArray:k,partiallyEvaluatedTextSize:n.evaluateSizeForZoom(f.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(f.sourceID)},u)for(e=0,l=f.sortKeyRanges;e<l.length;e+=1){var a=l[e],it=a.sortKey,rt=a.symbolInstanceStart,ut=a.symbolInstanceEnd;t.push({sortKey:it,symbolInstanceStart:rt,symbolInstanceEnd:ut,parameters:c})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:f.symbolInstances.length,parameters:c})}};w.prototype.attemptAnchorPlacement=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){var w=[l.textOffset0,l.textOffset1],p=ko(n,i,r,w,u),b=this.collisionIndex.placeCollisionBox(ef(t,p.x,p.y,f,e,this.transform.angle),c,o,s,h.predicate),k,d;if(!y||(k=this.collisionIndex.placeCollisionBox(ef(y,p.x,p.y,f,e,this.transform.angle),c,o,s,h.predicate),k.box.length!==0))return b.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[l.crossTileID]&&this.prevPlacement.placements[l.crossTileID]&&this.prevPlacement.placements[l.crossTileID].text&&(d=this.prevPlacement.variableOffsets[l.crossTileID].anchor),this.variableOffsets[l.crossTileID]={textOffset:w,width:i,height:r,anchor:n,textBoxScale:u,prevAnchor:d},this.markUsedJustification(a,n,l,v),a.allowVerticalPlacement&&(this.markUsedOrientation(a,v,l),this.placedOrientations[l.crossTileID]=v),{shift:p,placedGlyphBoxes:b}):void 0};w.prototype.placeLayerBucketPart=function(t,i,r){var f=this,o=t.parameters,u=o.bucket,e=o.layout,c=o.posMatrix,ut=o.textLabelPlaneMatrix,ft=o.labelToScreenMatrix,y=o.textPixelRatio,et=o.holdingForFade,g=o.collisionBoxArray,ot=o.partiallyEvaluatedTextSize,s=o.collisionGroup,nt=e.get("text-optional"),tt=e.get("icon-optional"),h=e.get("text-allow-overlap"),a=e.get("icon-allow-overlap"),it=e.get("text-rotation-alignment")==="map",p=e.get("text-pitch-alignment")==="map",rt=e.get("icon-text-fit")!=="none",st=e.get("symbol-z-order")==="viewport-y",ht=h&&(a||!u.hasIconData()||tt),ct=a&&(h||!u.hasTextData()||nt),w,b,v,k,l,d;if(!u.collisionArrays&&g&&u.deserializeCollisionBoxes(g),w=function(t,o){var wt,gt,ni,k,bt,si,kt,ti,ii,ri,ui,lt,vt;if(!i[t.crossTileID]){if(et){f.placements[t.crossTileID]=new wo(!1,!1,!1);return}var v=!1,d=!1,g=!0,yt=null,l={box:null,offscreen:null},at={box:null,offscreen:null},b=null,w=null,st=null,pt=0,dt=0,fi=0;if(o.textFeatureIndex?pt=o.textFeatureIndex:t.useRuntimeCollisionCircles&&(pt=t.featureIndex),o.verticalTextFeatureIndex&&(dt=o.verticalTextFeatureIndex),wt=o.textBox,wt)if(gt=function(i){var e=n.WritingMode.horizontal,r;return u.allowVerticalPlacement&&!i&&f.prevPlacement&&(r=f.prevPlacement.placedOrientations[t.crossTileID],r&&(f.placedOrientations[t.crossTileID]=r,e=r,f.markUsedOrientation(u,e,t))),e},ni=function(i,r){var f,e,s;if(u.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&o.verticalTextBox){for(f=0,e=u.writingModes;f<e.length;f+=1)if(s=e[f],s===n.WritingMode.vertical?(l=r(),at=l):l=i(),l&&l.box&&l.box.length)break}else l=i()},e.get("text-variable-anchor")){k=e.get("text-variable-anchor");f.prevPlacement&&f.prevPlacement.variableOffsets[t.crossTileID]&&(bt=f.prevPlacement.variableOffsets[t.crossTileID],k.indexOf(bt.anchor)>0&&(k=k.filter(function(n){return n!==bt.anchor}),k.unshift(bt.anchor)));var oi=function(n,i,r){for(var w=n.x2-n.x1,b=n.y2-n.y1,d=t.textBoxScale,g=rt&&!a?i:null,e={box:[],offscreen:!1},nt=h?k.length*2:k.length,o=0;o<nt;++o){var tt=k[o%k.length],ut=o>=k.length,l=f.attemptAnchorPlacement(tt,n,w,b,d,it,p,y,c,s,ut,t,u,r,g);if(l&&(e=l.placedGlyphBoxes,e&&e.box&&e.box.length)){v=!0;yt=l.shift;break}}return e},ai=function(){return oi(wt,o.iconBox,n.WritingMode.horizontal)},vi=function(){var i=o.verticalTextBox,r=l&&l.box&&l.box.length;return u.allowVerticalPlacement&&!r&&t.numVerticalGlyphVertices>0&&i?oi(i,o.verticalIconBox,n.WritingMode.vertical):{box:null,offscreen:null}};ni(ai,vi);l&&(v=l.box,g=l.offscreen);si=gt(l&&l.box);!v&&f.prevPlacement&&(kt=f.prevPlacement.variableOffsets[t.crossTileID],kt&&(f.variableOffsets[t.crossTileID]=kt,f.markUsedJustification(u,kt.anchor,t,si)))}else{var ei=function(n,i){var r=f.collisionIndex.placeCollisionBox(n,h,y,c,s.predicate);return r&&r.box&&r.box.length&&(f.markUsedOrientation(u,i,t),f.placedOrientations[t.crossTileID]=i),r},ci=function(){return ei(wt,n.WritingMode.horizontal)},li=function(){var i=o.verticalTextBox;return u.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&i?ei(i,n.WritingMode.vertical):{box:null,offscreen:null}};ni(ci,li);gt(l&&l.box&&l.box.length)}if(b=l,v=b&&b.box&&b.box.length>0,g=b&&b.offscreen,t.useRuntimeCollisionCircles){var hi=u.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),yi=n.evaluateSizeForFeature(u.textSizeData,ot,hi),pi=e.get("text-padding"),wi=t.collisionCircleDiameter;w=f.collisionIndex.placeCollisionCircles(h,hi,u.lineVertexArray,u.glyphOffsetArray,yi,c,ut,ft,r,p,s.predicate,wi,pi);v=h||w.circles.length>0&&!w.collisionDetected;g=g&&w.offscreen}if(o.iconFeatureIndex&&(fi=o.iconFeatureIndex),o.iconBox&&(ti=function(n){var t=rt&&yt?ef(n,yt.x,yt.y,it,p,f.transform.angle):n;return f.collisionIndex.placeCollisionBox(t,a,y,c,s.predicate)},at&&at.box&&at.box.length&&o.verticalIconBox?(st=ti(o.verticalIconBox),d=st.box.length>0):(st=ti(o.iconBox),d=st.box.length>0),g=g&&st.offscreen),ii=nt||t.numHorizontalGlyphVertices===0&&t.numVerticalGlyphVertices===0,ri=tt||t.numIconVertices===0,ii||ri?ri?ii||(d=d&&v):v=d&&v:d=v=d&&v,v&&b&&b.box&&(at&&at.box&&dt?f.collisionIndex.insertCollisionBox(b.box,e.get("text-ignore-placement"),u.bucketInstanceId,dt,s.ID):f.collisionIndex.insertCollisionBox(b.box,e.get("text-ignore-placement"),u.bucketInstanceId,pt,s.ID)),d&&st&&f.collisionIndex.insertCollisionBox(st.box,e.get("icon-ignore-placement"),u.bucketInstanceId,fi,s.ID),w&&(v&&f.collisionIndex.insertCollisionCircles(w.circles,e.get("text-ignore-placement"),u.bucketInstanceId,pt,s.ID),r))for(ui=u.bucketInstanceId,lt=f.collisionCircleArrays[ui],lt===undefined&&(lt=f.collisionCircleArrays[ui]=new ev),vt=0;vt<w.circles.length;vt+=4)lt.circles.push(w.circles[vt+0]),lt.circles.push(w.circles[vt+1]),lt.circles.push(w.circles[vt+2]),lt.circles.push(w.collisionDetected?1:0);f.placements[t.crossTileID]=new wo(v||ht,d||ct,g||u.justReloaded);i[t.crossTileID]=!0}},st)for(b=u.getSortedSymbolIndexes(this.transform.angle),v=b.length-1;v>=0;--v)k=b[v],w(u.symbolInstances.get(k),u.collisionArrays[k]);else for(l=t.symbolInstanceStart;l<t.symbolInstanceEnd;l++)w(u.symbolInstances.get(l),u.collisionArrays[l]);r&&u.bucketInstanceId in this.collisionCircleArrays&&(d=this.collisionCircleArrays[u.bucketInstanceId],n.invert(d.invProjMatrix,c),d.viewportMatrix=this.collisionIndex.getViewportMatrix());u.justReloaded=!1};w.prototype.markUsedJustification=function(t,i,r,u){var c={left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex},o,h,f,s,e;for(o=u===n.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:c[n.getAnchorJustification(i)],h=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex],f=0,s=h;f<s.length;f+=1)e=s[f],e>=0&&(t.text.placedSymbolArray.get(e).crossTileID=o>=0&&e!==o?0:r.crossTileID)};w.prototype.markUsedOrientation=function(t,i,r){for(var e,o=i===n.WritingMode.horizontal||i===n.WritingMode.horizontalOnly?i:0,s=i===n.WritingMode.vertical?i:0,h=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex],u=0,f=h;u<f.length;u+=1)e=f[u],t.text.placedSymbolArray.get(e).placedOrientation=o;r.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=s)};w.prototype.commit=function(n){var t,r,e,i,o,s,h,a,u,f;this.commitTime=n;this.zoomAtLastRecencyCheck=this.transform.zoom;t=this.prevPlacement;r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;var c=t?t.symbolFadeChange(n):1,l=t?t.opacities:{},v=t?t.variableOffsets:{},y=t?t.placedOrientations:{};for(e in this.placements)i=this.placements[e],o=l[e],o?(this.opacities[e]=new oi(o,c,i.text,i.icon),r=r||i.text!==o.text.placed||i.icon!==o.icon.placed):(this.opacities[e]=new oi(null,c,i.text,i.icon,i.skipFade),r=r||i.text||i.icon);for(s in l)h=l[s],this.opacities[s]||(a=new oi(h,c,!1,!1),a.isHidden()||(this.opacities[s]=a,r=r||h.text.placed||h.icon.placed));for(u in v)this.variableOffsets[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.variableOffsets[u]=v[u]);for(f in y)this.placedOrientations[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.placedOrientations[f]=y[f]);r?this.lastPlacementChangeTime=n:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:n)};w.prototype.updateLayerOpacities=function(n,t){for(var i,r,e={},u=0,f=t;u<f.length;u+=1)i=f[u],r=i.getBucket(n),r&&i.latestFeatureIndex&&n.id===r.layerIds[0]&&this.updateBucketOpacities(r,e,i.collisionBoxArray)};w.prototype.updateBucketOpacities=function(t,i,r){var u=this,o,a,s,h;t.hasTextData()&&t.text.opacityVertexArray.clear();t.hasIconData()&&t.icon.opacityVertexArray.clear();t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear();t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();var f=t.layers[0].layout,v=new oi(null,0,!1,!1,!0),c=f.get("text-allow-overlap"),l=f.get("icon-allow-overlap"),y=f.get("text-variable-anchor"),p=f.get("text-rotation-alignment")==="map",w=f.get("text-pitch-alignment")==="map",e=f.get("icon-text-fit")!=="none",b=new oi(null,0,c&&(l||!t.hasIconData()||f.get("icon-optional")),l&&(c||!t.hasTextData()||f.get("text-optional")),!0);for(!t.collisionArrays&&r&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(r),o=function(n,t,i){for(var r=0;r<t/4;r++)n.opacityVertexArray.emplaceBack(i)},a=function(r){var f=t.symbolInstances.get(r),st=f.numHorizontalGlyphVertices,ht=f.numVerticalGlyphVertices,a=f.crossTileID,yt=i[a],s=u.opacities[a],it,ct,lt,rt,ut,nt,ft,et,at,vt,c,h,tt,l,ot;yt?s=v:s||(s=b,u.opacities[a]=s);i[a]=!0;var pt=st>0||ht>0,wt=f.numIconVertices>0,k=u.placedOrientations[f.crossTileID],d=k===n.WritingMode.vertical,g=k===n.WritingMode.horizontal||k===n.WritingMode.horizontalOnly;pt&&(it=go(s.text),ct=d?cr:it,o(t.text,st,ct),lt=g?cr:it,o(t.text,ht,lt),rt=s.text.isHidden(),[f.rightJustifiedTextSymbolIndex,f.centerJustifiedTextSymbolIndex,f.leftJustifiedTextSymbolIndex].forEach(function(n){n>=0&&(t.text.placedSymbolArray.get(n).hidden=rt||d?1:0)}),f.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(f.verticalPlacedTextSymbolIndex).hidden=rt||g?1:0),ut=u.variableOffsets[f.crossTileID],ut&&u.markUsedJustification(t,ut.anchor,f,k),nt=u.placedOrientations[f.crossTileID],nt&&(u.markUsedJustification(t,"left",f,nt),u.markUsedOrientation(t,nt,f)));wt&&(ft=go(s.icon),et=!(e&&f.verticalPlacedIconSymbolIndex&&d),f.placedIconSymbolIndex>=0&&(at=et?ft:cr,o(t.icon,f.numIconVertices,at),t.icon.placedSymbolArray.get(f.placedIconSymbolIndex).hidden=s.icon.isHidden()),f.verticalPlacedIconSymbolIndex>=0&&(vt=et?cr:ft,o(t.icon,f.numVerticalIconVertices,vt),t.icon.placedSymbolArray.get(f.verticalPlacedIconSymbolIndex).hidden=s.icon.isHidden()));(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&(c=t.collisionArrays[r],c&&(h=new n.Point(0,0),(c.textBox||c.verticalTextBox)&&(tt=!0,y&&(l=u.variableOffsets[a],l?(h=ko(l.anchor,l.width,l.height,l.textOffset,l.textBoxScale),p&&h._rotate(w?u.transform.angle:-u.transform.angle)):tt=!1),c.textBox&&eu(t.textCollisionBox.collisionVertexArray,s.text.placed,!tt||d,h.x,h.y),c.verticalTextBox&&eu(t.textCollisionBox.collisionVertexArray,s.text.placed,!tt||g,h.x,h.y)),ot=Boolean(!g&&c.verticalIconBox),c.iconBox&&eu(t.iconCollisionBox.collisionVertexArray,s.icon.placed,ot,e?h.x:0,e?h.y:0),c.verticalIconBox&&eu(t.iconCollisionBox.collisionVertexArray,s.icon.placed,!ot,e?h.x:0,e?h.y:0)))},s=0;s<t.symbolInstances.length;s++)a(s);t.sortFeatures(this.transform.angle);this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder);t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray);t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray);t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray);t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray);t.bucketInstanceId in this.collisionCircleArrays&&(h=this.collisionCircleArrays[t.bucketInstanceId],t.placementInvProjMatrix=h.invProjMatrix,t.placementViewportMatrix=h.viewportMatrix,t.collisionCircleArray=h.circles,delete this.collisionCircleArrays[t.bucketInstanceId])};w.prototype.symbolFadeChange=function(n){return this.fadeDuration===0?1:(n-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment};w.prototype.zoomAdjustment=function(n){return Math.max(0,(this.transform.zoom-n)/1.5)};w.prototype.hasTransitions=function(n){return this.stale||n-this.lastPlacementChangeTime<this.fadeDuration};w.prototype.stillRecent=function(n,t){var i=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*i>n};w.prototype.setStale=function(){this.stale=!0};var sv=Math.pow(2,25),hv=Math.pow(2,24),cv=Math.pow(2,17),lv=Math.pow(2,16),av=Math.pow(2,9),vv=Math.pow(2,8),yv=Math.pow(2,1);cr=0;of=function(n){this._sortAcrossTiles=n.layout.get("symbol-z-order")!=="viewport-y"&&n.layout.get("symbol-sort-key").constantOr(1)!==undefined;this._currentTileIndex=0;this._currentPartIndex=0;this._seenCrossTileIDs={};this._bucketParts=[]};of.prototype.continuePlacement=function(n,t,i,r,u){for(var f=this._bucketParts,e,o;this._currentTileIndex<n.length;)if(e=n[this._currentTileIndex],t.getBucketParts(f,r,e,this._sortAcrossTiles),this._currentTileIndex++,u())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,f.sort(function(n,t){return n.sortKey-t.sortKey}));this._currentPartIndex<f.length;)if(o=f[this._currentPartIndex],t.placeLayerBucketPart(o,this._seenCrossTileIDs,i),this._currentPartIndex++,u())return!0;return!1};lr=function(n,t,i,r,u,f,e){this.placement=new w(n,u,f,e);this._currentPlacementIndex=t.length-1;this._forceFullPlacement=i;this._showCollisionBoxes=r;this._done=!1};lr.prototype.isDone=function(){return this._done};lr.prototype.continuePlacement=function(t,i,r){for(var o=this,s=n.browser.now(),h=function(){var t=n.browser.now()-s;return o._forceFullPlacement?!1:t>2},e;this._currentPlacementIndex>=0;){var c=t[this._currentPlacementIndex],u=i[c],f=this.placement.collisionIndex.transform.zoom;if(u.type==="symbol"&&(!u.minzoom||u.minzoom<=f)&&(!u.maxzoom||u.maxzoom>f)){if(this._inProgressLayer||(this._inProgressLayer=new of(u)),e=this._inProgressLayer.continuePlacement(r[u.source],this.placement,this._showCollisionBoxes,u,h),e)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0};lr.prototype.commit=function(n){return this.placement.commit(n),this.placement};ns=256/n.EXTENT;ou=function(n,t,i){var r,u,f;for(this.tileID=n,this.indexedSymbolInstances={},this.bucketInstanceId=i,r=0;r<t.length;r++)u=t.get(r),f=u.key,this.indexedSymbolInstances[f]||(this.indexedSymbolInstances[f]=[]),this.indexedSymbolInstances[f].push({crossTileID:u.crossTileID,coord:this.getScaledCoordinates(u,n)})};ou.prototype.getScaledCoordinates=function(t,i){var u=i.canonical.z-this.tileID.canonical.z,r=ns/Math.pow(2,u);return{x:Math.floor((i.canonical.x*n.EXTENT+t.anchorX)*r),y:Math.floor((i.canonical.y*n.EXTENT+t.anchorY)*r)}};ou.prototype.findMatches=function(n,t,i){for(var u,o,s,f,h,r,c=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z),e=0;e<n.length;e++)if((u=n.get(e),!u.crossTileID)&&(o=this.indexedSymbolInstances[u.key],o))for(s=this.getScaledCoordinates(u,t),f=0,h=o;f<h.length;f+=1)if(r=h[f],Math.abs(r.coord.x-s.x)<=c&&Math.abs(r.coord.y-s.y)<=c&&!i[r.crossTileID]){i[r.crossTileID]=!0;u.crossTileID=r.crossTileID;break}};sf=function(){this.maxCrossTileID=0};sf.prototype.generate=function(){return++this.maxCrossTileID};yi=function(){this.indexes={};this.usedCrossTileIDs={};this.lng=0};yi.prototype.handleWrapJump=function(n){var f=Math.round((n-this.lng)/360),i,r,u,e,t;if(f!==0)for(i in this.indexes){r=this.indexes[i];u={};for(e in r)t=r[e],t.tileID=t.tileID.unwrapTo(t.tileID.wrap+f),u[t.tileID.key]=t;this.indexes[i]=u}this.lng=n};yi.prototype.addBucket=function(n,t,i){var r,l,u,f,e,a,h,v,c,o,s;if(this.indexes[n.overscaledZ]&&this.indexes[n.overscaledZ][n.key]){if(this.indexes[n.overscaledZ][n.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(n.overscaledZ,this.indexes[n.overscaledZ][n.key])}for(r=0;r<t.symbolInstances.length;r++)l=t.symbolInstances.get(r),l.crossTileID=0;this.usedCrossTileIDs[n.overscaledZ]||(this.usedCrossTileIDs[n.overscaledZ]={});u=this.usedCrossTileIDs[n.overscaledZ];for(f in this.indexes)if(e=this.indexes[f],Number(f)>n.overscaledZ)for(a in e)h=e[a],h.tileID.isChildOf(n)&&h.findMatches(t.symbolInstances,n,u);else v=n.scaledTo(Number(f)),c=e[v.key],c&&c.findMatches(t.symbolInstances,n,u);for(o=0;o<t.symbolInstances.length;o++)s=t.symbolInstances.get(o),s.crossTileID||(s.crossTileID=i.generate(),u[s.crossTileID]=!0);return this.indexes[n.overscaledZ]===undefined&&(this.indexes[n.overscaledZ]={}),this.indexes[n.overscaledZ][n.key]=new ou(n,t.symbolInstances,t.bucketInstanceId),!0};yi.prototype.removeBucketCrossTileIDs=function(n,t){var u,i,r,f;for(u in t.indexedSymbolInstances)for(i=0,r=t.indexedSymbolInstances[u];i<r.length;i+=1)f=r[i],delete this.usedCrossTileIDs[n][f.crossTileID]};yi.prototype.removeStaleBuckets=function(n){var u=!1,r,t,i;for(r in this.indexes){t=this.indexes[r];for(i in t)n[t[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,t[i]),delete t[i],u=!0)}return u};ar=function(){this.layerIndexes={};this.crossTileIDs=new sf;this.maxBucketInstanceId=0;this.bucketsInCurrentPlacement={}};ar.prototype.addLayer=function(n,t,i){var u=this.layerIndexes[n.id],f,o,e,s,h,r;for(u===undefined&&(u=this.layerIndexes[n.id]=new yi),f=!1,o={},u.handleWrapJump(i),e=0,s=t;e<s.length;e+=1)(h=s[e],r=h.getBucket(n),r&&n.id===r.layerIds[0])&&(r.bucketInstanceId||(r.bucketInstanceId=++this.maxBucketInstanceId),u.addBucket(h.tileID,r,this.crossTileIDs)&&(f=!0),o[r.bucketInstanceId]=!0);return u.removeStaleBuckets(o)&&(f=!0),f};ar.prototype.pruneUnusedLayers=function(n){var i={},t;n.forEach(function(n){i[n]=!0});for(t in this.layerIndexes)i[t]||delete this.layerIndexes[t]};var su=function(t,i){return n.emitValidationErrors(t,i&&i.filter(function(n){return n.identifier!=="source.canvas"}))},pv=n.pick(i,["moveLayer","addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),wv=n.pick(i,["setCenter","setZoom","setBearing","setPitch"]),ts=uo(),si=function(t){function r(i,u){var f=this,e;u===void 0&&(u={});t.call(this);this.map=i;this.dispatcher=new fi(io(),this);this.imageManager=new fe;this.imageManager.setEventedParent(this);this.glyphManager=new vt(i._requestManager,u.localIdeographFontFamily);this.lineAtlas=new ui(256,512);this.crossTileSymbolIndex=new ar;this._layers={};this._serializedLayers={};this._order=[];this.sourceCaches={};this.zoomHistory=new n.ZoomHistory;this._loaded=!1;this._availableImages=[];this._resetUpdates();this.dispatcher.broadcast("setReferrer",n.getReferrer());e=this;this._rtlTextPluginCallback=r.registerForPluginStateChange(function(t){var i={pluginStatus:t.pluginStatus,pluginURL:t.pluginURL};e.dispatcher.broadcast("syncRTLPluginState",i,function(t,i){var r,u;if(n.triggerPluginCompletionEvent(t),i&&(r=i.every(function(n){return n}),r))for(u in e.sourceCaches)e.sourceCaches[u].reload()})});this.on("data",function(n){var i,t,u,r;if(n.dataType==="source"&&n.sourceDataType==="metadata"&&(i=f.sourceCaches[n.sourceId],i)&&(t=i.getSource(),t&&t.vectorLayerIds))for(u in f._layers)r=f._layers[u],r.source===t.id&&f._validateLayer(r)})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(t,i){var r=this,u;i===void 0&&(i={});this.fire(new n.Event("dataloading",{dataType:"style"}));i.validate=typeof i.validate=="boolean"?i.validate:!n.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,i.accessToken);u=this.map._requestManager.transformRequest(t,n.ResourceType.Style);this._request=n.getJSON(u,function(t,u){r._request=null;t?r.fire(new n.ErrorEvent(t)):u&&r._load(u,i)})},r.prototype.loadJSON=function(t,i){var r=this;i===void 0&&(i={});this.fire(new n.Event("dataloading",{dataType:"style"}));this._request=n.browser.frame(function(){r._request=null;i.validate=i.validate!==!1;r._load(t,i)})},r.prototype.loadEmpty=function(){this.fire(new n.Event("dataloading",{dataType:"style"}));this._load(ts,{validate:!1})},r.prototype._load=function(t,r){var c=this,e,o,s,f,h,u;if(!r.validate||!su(this,n.validateStyle(t))){e=[];r.stylePatch&&(e=this._buildStylePatch(t,r),this.sourceCaches={});this._loaded=!0;this.stylesheet=t;for(o in t.sources)this.addSource(o,t.sources[o],{validate:!1});for(t.sprite?this._loadSprite(t.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs),s=ro(this.stylesheet.layers),this._order=s.map(function(n){return n.id}),this._layers={},this._serializedLayers={},f=0,h=s;f<h.length;f+=1)u=h[f],u=n.createStyleLayer(u),u.setEventedParent(this,{layer:{id:u.id}}),this._layers[u.id]=u,this._serializedLayers[u.id]=u.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order));this.light=new hc(this.stylesheet.light);e.filter(function(n){return n.command!==i.moveLayer}).forEach(function(n){c[n.command].apply(c,n.args)});this.fire(new n.Event("data",{dataType:"style"}));this.fire(new n.Event("style.load"))}},r.prototype._loadSprite=function(t){var i=this;this._spriteRequest=ic(t,this.map._requestManager,function(t,r){if(i._spriteRequest=null,t)i.fire(new n.ErrorEvent(t));else if(r)for(var u in r)i.imageManager.addImage(u,r[u]);i.imageManager.setLoaded(!0);i._availableImages=i.imageManager.listImages();i.dispatcher.broadcast("setImages",i._availableImages);i.fire(new n.Event("data",{dataType:"style"}))})},r.prototype._validateLayer=function(t){var u=this.sourceCaches[t.source],r,i;u&&(r=t.sourceLayer,r)&&(i=u.getSource(),(i.type==="geojson"||i.vectorLayerIds&&i.vectorLayerIds.indexOf(r)===-1)&&this.fire(new n.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"'))))},r.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var n in this.sourceCaches)if(!this.sourceCaches[n].loaded())return!1;return this.imageManager.isLoaded()?!0:!1},r.prototype._serializeLayers=function(n){for(var f,i,r=[],t=0,u=n;t<u.length;t+=1)f=u[t],i=this._layers[f],i.type!=="custom"&&r.push(i.serialize());return r},r.prototype.hasTransitions=function(){var n,t;if(this.light&&this.light.hasTransition())return!0;for(n in this.sourceCaches)if(this.sourceCaches[n].hasTransition())return!0;for(t in this._layers)if(this._layers[t].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading");},r.prototype.update=function(t){var p,s,h,r,c,u,f,l,a,e,v,w,i,o,y;if(this.loaded){if(p=this._changed,this._changed){s=Object.keys(this._updatedLayers);h=Object.keys(this._removedLayers);(s.length||h.length)&&this._updateWorkerLayers(s,h);for(r in this._updatedSources)c=this._updatedSources[r],c==="reload"?this._reloadSource(r):c==="clear"&&this._clearSource(r);this._updateTilesForChangedImages();for(u in this._updatedPaintProps)this._layers[u].updateTransitions(t),this._serializedLayers[u]=this._layers[u].serialize();this.light.updateTransitions(t);this._resetUpdates()}f={};for(l in this.sourceCaches)a=this.sourceCaches[l],f[l]=a.used,a.used=!1;for(e=0,v=this._order;e<v.length;e+=1)w=v[e],i=this._layers[w],i.recalculate(t,this._availableImages),!i.isHidden(t.zoom)&&i.source&&(this.sourceCaches[i.source].used=!0);for(o in f)y=this.sourceCaches[o],f[o]!==y.used&&y.fire(new n.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:o}));this.light.recalculate(t);this.z=t.zoom;p&&this.fire(new n.Event("data",{dataType:"style"}))}},r.prototype._updateTilesForChangedImages=function(){var n=Object.keys(this._changedImages),t;if(n.length){for(t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],n);this._changedImages={}}},r.prototype._updateWorkerLayers=function(n,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(n),removedIds:t})},r.prototype._resetUpdates=function(){this._changed=!1;this._updatedLayers={};this._removedLayers={};this._updatedSources={};this._updatedPaintProps={};this._changedImages={}},r.prototype.setState=function(t,r){var f=this,u,s;if(r===void 0&&(r={}),this._checkLoaded(),su(this,n.validateStyle(t)))return!1;t=n.clone$1(t);t.layers=ro(t.layers);var e=[],o={},h={};if(r.stylePatch&&(e=this._buildStylePatch(t,r)),e=e.filter(function(n){return n.command===i.addLayer&&f._serializedLayers.hasOwnProperty(n.args[0].id)?(o[n.args[0].id]=!0,!1):n.command===i.moveLayer&&f._serializedLayers.hasOwnProperty(n.args[0])?(o[n.args[0]]=!0,!0):n.command===i.addSource&&f.sourceCaches.hasOwnProperty(n.args[0])?(h[n.args[0]]=!0,!1):!0}),u=rv(this.serialize(),t).filter(function(n){return!(n.command in wv)}),u=u.concat(e),u.length===0)return!1;if(s=u.filter(function(n){return!(n.command in pv)}),s.length>0)throw new Error("Unimplemented: "+s.map(function(n){return n.command}).join(", ")+".");return u.forEach(function(n){n.command!=="setTransition"&&(n.command===i.removeLayer&&o.hasOwnProperty(n.args[0])||(n.command===i.addSource||n.command===i.removeSource)&&h.hasOwnProperty(n.args[0])||f[n.command].apply(f,n.args))}),this.stylesheet=t,!0},r.prototype.addImage=function(t,i){if(this.getImage(t))return this.fire(new n.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,i);this._afterImageUpdated(t)},r.prototype.updateImage=function(n,t){this.imageManager.updateImage(n,t)},r.prototype.getImage=function(n){return this.imageManager.getImage(n)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new n.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t);this._afterImageUpdated(t)},r.prototype._afterImageUpdated=function(t){this._availableImages=this.imageManager.listImages();this._changedImages[t]=!0;this._changed=!0;this.dispatcher.broadcast("setImages",this._availableImages);this.fire(new n.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,i,r){var o=this,f,e,u;if(r===void 0&&(r={}),this._checkLoaded(),this.sourceCaches[t]!==undefined)throw new Error("There is already a source with this ID");if(!i.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(i).join(", ")+".");if(f=["vector","raster","geojson","video","image"],e=f.indexOf(i.type)>=0,!e||!this._validate(n.validateStyle.source,"sources."+t,i,null,r)){this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);u=this.sourceCaches[t]=new ai(t,i,this.dispatcher);u.style=this;u.setEventedParent(this,function(){return{isSourceLoaded:o.loaded(),source:u.serialize(),sourceId:t}});u.onAdd(this.map);this._changed=!0}},r.prototype.removeSource=function(t){var r,i;if(this._checkLoaded(),this.sourceCaches[t]===undefined)throw new Error("There is no source with this ID");for(r in this._layers)if(this._layers[r].source===t)return this.fire(new n.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));if(i=this.sourceCaches[t],delete this.sourceCaches[t],delete this._updatedSources[t],i.fire(new n.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),i.setEventedParent(null),i.clearTiles(),i.onRemove)i.onRemove(this.map);this._changed=!0},r.prototype.setGeoJSONSourceData=function(n,t){this._checkLoaded();var i=this.sourceCaches[n].getSource();i.setData(t);this._changed=!0},r.prototype.getSource=function(n){return this.sourceCaches[n]&&this.sourceCaches[n].getSource()},r.prototype.addLayer=function(t,i,r){var f,u,e,o;if(r===void 0&&(r={}),this._checkLoaded(),f=t.id,this.getLayer(f)){this.fire(new n.ErrorEvent(new Error('Layer with id "'+f+'" already exists on this map')));return}if(t.type==="custom"){if(su(this,n.validateCustomStyleLayer(t)))return;u=n.createStyleLayer(t)}else{if(typeof t.source=="object"&&(this.addSource(f,t.source),t=n.clone$1(t),t=n.extend(t,{source:f})),this._validate(n.validateStyle.layer,"layers."+f,t,{arrayIndex:-1},r))return;u=n.createStyleLayer(t);this._validateLayer(u);u.setEventedParent(this,{layer:{id:f}});this._serializedLayers[u.id]=u.serialize()}if(e=i?this._order.indexOf(i):this._order.length,i&&e===-1){this.fire(new n.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.')));return}if(this._order.splice(e,0,f),this._layerOrderChanged=!0,this._layers[f]=u,this._removedLayers[f]&&u.source&&u.type!=="custom"&&(o=this._removedLayers[f],delete this._removedLayers[f],o.type!==u.type?this._updatedSources[u.source]="clear":(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause())),this._updateLayer(u),u.onAdd)u.onAdd(this.map)},r.prototype.moveLayer=function(t,i){var u,f,r;if(this._checkLoaded(),this._changed=!0,u=this._layers[t],!u){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")));return}if(t!==i){if(f=this._order.indexOf(t),this._order.splice(f,1),r=i?this._order.indexOf(i):this._order.length,i&&r===-1){this.fire(new n.ErrorEvent(new Error('Layer with id "'+i+'" does not exist on this map.')));return}this._order.splice(r,0,t);this._layerOrderChanged=!0}},r.prototype.removeLayer=function(t){var i,r;if(this._checkLoaded(),i=this._layers[t],!i){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")));return}if(i.setEventedParent(null),r=this._order.indexOf(t),this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=i,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],i.onRemove)i.onRemove(this.map)},r.prototype.getLayer=function(n){return this._layers[n]},r.prototype.hasLayer=function(n){return n in this._layers},r.prototype.setLayerZoomRange=function(t,i,r){this._checkLoaded();var u=this.getLayer(t);if(!u){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")));return}(u.minzoom!==i||u.maxzoom!==r)&&(i!=null&&(u.minzoom=i),r!=null&&(u.maxzoom=r),this._updateLayer(u))},r.prototype.setFilter=function(t,i,r){r===void 0&&(r={});this._checkLoaded();var u=this.getLayer(t);if(!u){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")));return}if(!n.deepEqual(u.filter,i)){if(i===null||i===undefined){u.filter=undefined;this._updateLayer(u);return}this._validate(n.validateStyle.filter,"layers."+u.id+".filter",i,null,r)||(u.filter=n.clone$1(i),this._updateLayer(u))}},r.prototype.getFilter=function(t){return n.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,i,r,u){u===void 0&&(u={});this._checkLoaded();var f=this.getLayer(t);if(!f){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")));return}n.deepEqual(f.getLayoutProperty(i),r)||(f.setLayoutProperty(i,r,u),this._serializedLayers[t]=f.serialize(),this._updateLayer(f))},r.prototype.getLayoutProperty=function(t,i){var r=this.getLayer(t);if(!r){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")));return}return r.getLayoutProperty(i)},r.prototype.setPaintProperty=function(t,i,r,u){var f,e;if(u===void 0&&(u={}),this._checkLoaded(),f=this.getLayer(t),!f){this.fire(new n.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")));return}n.deepEqual(f.getPaintProperty(i),r)||(e=f.setPaintProperty(i,r,u),e&&this._updateLayer(f),this._changed=!0,this._updatedPaintProps[t]=!0)},r.prototype.getPaintProperty=function(n,t){return this.getLayer(n).getPaintProperty(t)},r.prototype.setFeatureState=function(t,i){var f;this._checkLoaded();var e=t.source,r=t.sourceLayer,u=this.sourceCaches[e];if(u===undefined){this.fire(new n.ErrorEvent(new Error("The source '"+e+"' does not exist in the map's style.")));return}if(f=u.getSource().type,f==="geojson"&&r){this.fire(new n.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(f==="vector"&&!r){this.fire(new n.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}t.id===undefined&&this.fire(new n.ErrorEvent(new Error("The feature id parameter must be provided.")));u.setFeatureState(r,t.id,i)},r.prototype.removeFeatureState=function(t,i){var u,r,f,e;if(this._checkLoaded(),u=t.source,r=this.sourceCaches[u],r===undefined){this.fire(new n.ErrorEvent(new Error("The source '"+u+"' does not exist in the map's style.")));return}if(f=r.getSource().type,e=f==="vector"?t.sourceLayer:undefined,f==="vector"&&!e){this.fire(new n.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(i&&typeof t.id!="string"&&typeof t.id!="number"){this.fire(new n.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}r.removeFeatureState(e,t.id,i)},r.prototype.getFeatureState=function(t){var f;this._checkLoaded();var r=t.source,u=t.sourceLayer,i=this.sourceCaches[r];if(i===undefined){this.fire(new n.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")));return}if(f=i.getSource().type,f==="vector"&&!u){this.fire(new n.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return t.id===undefined&&this.fire(new n.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(u,t.id)},r.prototype.getTransition=function(){return n.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return this._loaded?n.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:n.mapObject(this.sourceCaches,function(n){return n.serialize()}),layers:this._serializeLayers(this._order)},function(n){return n!==undefined}):ts},r.prototype._buildStylePatch=function(t,i){var e=this,r=[],o=[],u=[],f=t.layers.reduce(function(n,t){return n[t.id]=t,n},{}),s=function(i,s){if(e.hasLayer(i)){var h=e._serializedLayers[i];t.sources.hasOwnProperty(h.source)||o.includes(h.source)||(r.push({command:"addSource",args:[h.source,e.sourceCaches[h.source].serialize(),{validate:!1}]}),o.push(h.source));f.hasOwnProperty(i)&&r.push({command:"removeLayer",args:[i]});s=f.hasOwnProperty(s)||u.find(function(n){return n.id===s})?s:undefined;r.push({command:"moveLayer",args:[h.id,s,{validate:!0}]});r.push({command:"addLayer",args:[h,s,{validate:!0}]});u.push(i)}else n.warnOnce("Cannot preserve layer "+i+" that is not in the previous style.")},h=function(t,i,e){f.hasOwnProperty(t)||u.includes(t)?r.push({command:"setPaintProperty",args:[t,i,e,{validate:!0}]}):n.warnOnce("Cannot update paint property on layer "+t+" that is not in the next style.")},c=function(t,i,e){f.hasOwnProperty(t)||u.includes(t)?r.push({command:"setLayoutProperty",args:[t,i,e,{validate:!0}]}):n.warnOnce("Cannot update layout property on layer "+t+" that is not in the next style.")},l=function(t,i,e){f.hasOwnProperty(t)||u.includes(t)?r.push({command:"setFilter",args:[t,i,e,{validate:!0}]}):n.warnOnce("Cannot update filter on layer "+t+" that is not in the next style.")};return i.stylePatch&&i.stylePatch(this.serialize(),t,s.bind(this),h.bind(this),c.bind(this),l.bind(this)),r},r.prototype._updateLayer=function(n){this._updatedLayers[n.id]=!0;n.source&&!this._updatedSources[n.source]&&this.sourceCaches[n.source].getSource().type!=="raster"&&(this._updatedSources[n.source]="reload",this.sourceCaches[n.source].pause());this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(n){for(var u,f,l,nt,a,e,v,tt,o,i,y,s,p,h,w,it,b,c,k,rt,ut=this,d=function(n){return ut._layers[n].type==="fill-extrusion"},g={},t=[],r=this._order.length-1;r>=0;r--)if(u=this._order[r],d(u))for(g[u]=r,f=0,l=n;f<l.length;f+=1)if(nt=l[f],a=nt[u],a)for(e=0,v=a;e<v.length;e+=1)tt=v[e],t.push(tt);for(t.sort(function(n,t){return t.intersectionZ-n.intersectionZ}),o=[],i=this._order.length-1;i>=0;i--)if(y=this._order[i],d(y))for(s=t.length-1;s>=0;s--){if(p=t[s].feature,g[p.layer.id]<i)break;o.push(p);t.pop()}else for(h=0,w=n;h<w.length;h+=1)if(it=w[h],b=it[y],b)for(c=0,k=b;c<k.length;c+=1)rt=k[c],o.push(rt.feature);return o},r.prototype.queryRenderedFeatures=function(t,i,r){var e,u,o,s,h,f,c;if(i&&i.filter&&this._validate(n.validateStyle.filter,"queryRenderedFeatures.filter",i.filter,null,i),e={},i&&i.layers){if(!Array.isArray(i.layers))return this.fire(new n.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(u=0,o=i.layers;u<o.length;u+=1){if(s=o[u],h=this._layers[s],!h)return this.fire(new n.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];e[h.source]=!0}}f=[];i.availableImages=this._availableImages;for(c in this.sourceCaches)(!i.layers||e[c])&&f.push(nl(this.sourceCaches[c],this._layers,this._serializedLayers,t,i,r));return this.placement&&f.push(tl(this._layers,this._serializedLayers,this.sourceCaches,t,i,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(f)},r.prototype.querySourceFeatures=function(t,i){i&&i.filter&&this._validate(n.validateStyle.filter,"querySourceFeatures.filter",i.filter,null,i);var r=this.sourceCaches[t];return r?il(r,i):[]},r.prototype.addSourceType=function(n,t,i){if(r.getSourceType(n))return i(new Error('A source type called "'+n+'" already exists.'));if(r.setSourceType(n,t),!t.workerSourceURL)return i(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:n,url:t.workerSourceURL},i)},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(t,i){var f,r,u,e;i===void 0&&(i={});this._checkLoaded();f=this.light.getLight();r=!1;for(u in t)if(!n.deepEqual(t[u],f[u])){r=!0;break}r&&(e={now:n.browser.now(),transition:n.extend({duration:300,delay:0},this.stylesheet.transition)},this.light.setLight(t,i),this.light.updateTransitions(e))},r.prototype._validate=function(t,i,r,u,f){return(f===void 0&&(f={}),f&&f.validate===!1)?!1:su(this,t.call(n.validateStyle,n.extend({key:i,style:this.serialize(),value:r,styleSpec:n.styleSpec},u)))},r.prototype._remove=function(){var i,r,t;this._request&&(this._request.cancel(),this._request=null);this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null);n.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(i in this._layers)r=this._layers[i],r.setEventedParent(null);for(t in this.sourceCaches)this.sourceCaches[t].clearTiles(),this.sourceCaches[t].setEventedParent(null);this.imageManager.setEventedParent(null);this.setEventedParent(null);this.dispatcher.remove()},r.prototype._clearSource=function(n){this.sourceCaches[n].clearTiles()},r.prototype._reloadSource=function(n){this.sourceCaches[n].resume();this.sourceCaches[n].reload()},r.prototype._updateSources=function(n){for(var t in this.sourceCaches)this.sourceCaches[t].update(n)},r.prototype._generateCollisionBoxes=function(){for(var n in this.sourceCaches)this._reloadSource(n)},r.prototype._updatePlacement=function(t,i,r,u,f){var h,a,w,e,v,b,c,y,k,l;f===void 0&&(f=!1);var s=!1,p=!1,o={};for(h=0,a=this._order;h<a.length;h+=1)(w=a[h],e=this._layers[w],e.type==="symbol")&&(o[e.source]||(v=this.sourceCaches[e.source],o[e.source]=v.getRenderableIds(!0).map(function(n){return v.getTileByID(n)}).sort(function(n,t){return t.tileID.overscaledZ-n.tileID.overscaledZ||(n.tileID.isLessThan(t.tileID)?-1:1)})),b=this.crossTileSymbolIndex.addLayer(e,o[e.source],t.center.lng),s=s||b);if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),f=f||this._layerOrderChanged||r===0,(f||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.browser.now(),t.zoom))&&(this.pauseablePlacement=new lr(t,this._order,f,i,r,u,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.browser.now()),p=!0),s&&this.pauseablePlacement.placement.setStale()),p||s)for(c=0,y=this._order;c<y.length;c+=1)(k=y[c],l=this._layers[k],l.type==="symbol")&&this.placement.updateLayerOpacities(l,o[l.source]);return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(n.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var n in this.sourceCaches)this.sourceCaches[n].releaseSymbolFadeTiles()},r.prototype.getImages=function(n,t,i){this.imageManager.getImages(t.icons,i);this._updateTilesForChangedImages();var r=this.sourceCaches[t.source];r&&r.setDependencies(t.tileID.key,t.type,t.icons)},r.prototype.getGlyphs=function(n,t,i){this.glyphManager.getGlyphs(t.stacks,i)},r.prototype.getResource=function(t,i,r){return n.makeRequest(i,r)},r}(n.Evented);si.getSourceType=bc;si.setSourceType=kc;si.registerForPluginStateChange=n.registerForPluginStateChange;var hf=n.createLayout([{name:"a_pos",type:"Int16",components:2}]),cf=s("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\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(unpack_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;}"),bv=s("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_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);}"),kv=s("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);gl_FragColor=mix(color1,color2,u_mix)*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);}"),dv=s("varying vec3 v_data;\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(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\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(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);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),gv=s("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);}"),ny=s("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 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;varying 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;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),ty=s("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}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),iy=s("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;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_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),ry=s("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;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;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-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(0.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);}"),uy=s("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;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),fy=s("#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_FragColor=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);}"),ey=s("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);gl_FragColor=outline_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;}"),oy=s("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);gl_FragColor=mix(color1,color2,u_fade)*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;}"),sy=s("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);gl_FragColor=mix(color1,color2,u_fade)*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);}"),hy=s("varying vec4 v_color;void main() {gl_FragColor=v_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;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\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\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float 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/16384.0,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*=((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)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),cy=s("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying 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 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\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 vec2 a_pos;attribute vec4 a_normal_ed;varying 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;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_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=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\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/16383.0,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*=((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)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),ly=s("#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,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);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((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.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;}"),ay=s("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;\n#define PI 3.141592653589793\nvoid 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 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;}"),vy=s("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\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 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);gl_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;uniform mat4 u_matrix;uniform mediump float u_ratio;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 float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\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;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.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_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float 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;v_width2=vec2(outset,inset);}"),yy=s("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\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);vec4 color=texture2D(u_image,v_uv);gl_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_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\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 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float 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;v_width2=vec2(outset,inset);}"),py=s("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);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;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;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;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_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float 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;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),wy=s("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\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);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\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;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;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_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float 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;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),by=s("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(dot(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);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*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 float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),ky=s("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}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform 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 highp float u_pitch;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;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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.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(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp 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);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_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(1.0,fade_opacity[0]+fade_change));}"),dy=s("#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}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform 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 highp float u_pitch;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;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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.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(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp 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);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float 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(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),gy=s("#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}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform 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 highp float u_pitch;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 vec2 u_texsize_icon;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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.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[2];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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.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(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp 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);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float 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(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");is=Object.freeze({__proto__:null,prelude:cf,background:bv,backgroundPattern:kv,circle:dv,clippingMask:gv,heatmap:ny,heatmapTexture:ty,collisionBox:iy,collisionCircle:ry,debug:uy,fill:fy,fillOutline:ey,fillOutlinePattern:oy,fillPattern:sy,fillExtrusion:hy,fillExtrusionPattern:cy,hillshadePrepare:ly,hillshade:ay,line:vy,lineGradient:yy,linePattern:py,lineSDF:wy,raster:by,symbolIcon:ky,symbolSDF:dy,symbolTextAndIcon:gy});vr=function(){this.boundProgram=null;this.boundLayoutVertexBuffer=null;this.boundPaintVertexBuffers=[];this.boundIndexBuffer=null;this.boundVertexOffset=null;this.boundDynamicVertexBuffer=null;this.vao=null};vr.prototype.bind=function(n,t,i,r,u,f,e,o){var h,s,c;for(this.context=n,h=this.boundPaintVertexBuffers.length!==r.length,s=0;!h&&s<r.length;s++)this.boundPaintVertexBuffers[s]!==r[s]&&(h=!0);c=!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==i||h||this.boundIndexBuffer!==u||this.boundVertexOffset!==f||this.boundDynamicVertexBuffer!==e||this.boundDynamicVertexBuffer2!==o;!n.extVertexArrayObject||c?this.freshBind(t,i,r,u,f,e,o):(n.bindVertexArrayOES.set(this.vao),e&&e.bind(),u&&u.dynamicDraw&&u.bind(),o&&o.bind())};vr.prototype.freshBind=function(n,t,i,r,u,f,e){var a,w=n.numAttributes,s=this.context,o=s.gl,h,c,v,b,l,y,p;if(s.extVertexArrayObject)this.vao&&this.destroy(),this.vao=s.extVertexArrayObject.createVertexArrayOES(),s.bindVertexArrayOES.set(this.vao),a=0,this.boundProgram=n,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=i,this.boundIndexBuffer=r,this.boundVertexOffset=u,this.boundDynamicVertexBuffer=f,this.boundDynamicVertexBuffer2=e;else for(a=s.currentNumAttributes||0,h=w;h<a;h++)o.disableVertexAttribArray(h);for(t.enableAttributes(o,n),c=0,v=i;c<v.length;c+=1)b=v[c],b.enableAttributes(o,n);for(f&&f.enableAttributes(o,n),e&&e.enableAttributes(o,n),t.bind(),t.setVertexAttribPointers(o,n,u),l=0,y=i;l<y.length;l+=1)p=y[l],p.bind(),p.setVertexAttribPointers(o,n,u);f&&(f.bind(),f.setVertexAttribPointers(o,n,u));r&&r.bind();e&&(e.bind(),e.setVertexAttribPointers(o,n,u));s.currentNumAttributes=w};vr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};lf=function(n,t,i,r,u,f){var e=n.gl,v,b,k,y,s,h,o,w,c,d;this.program=e.createProgram();var g=rs(i.staticAttributes),nt=r?r.getBinderAttributes():[],l=g.concat(nt),tt=i.staticUniforms?rs(i.staticUniforms):[],it=r?r.getBinderUniforms():[],rt=tt.concat(it),a=[];for(v=0,b=rt;v<b.length;v+=1)k=b[v],a.indexOf(k)<0&&a.push(k);y=r?r.defines():[];f&&y.push("#define OVERDRAW_INSPECTOR;");var ut=y.concat(cf.fragmentSource,i.fragmentSource).join("\n"),ft=y.concat(cf.vertexSource,i.vertexSource).join("\n"),p=e.createShader(e.FRAGMENT_SHADER);if(e.isContextLost()){this.failedToCreate=!0;return}if(e.shaderSource(p,ut),e.compileShader(p),e.attachShader(this.program,p),s=e.createShader(e.VERTEX_SHADER),e.isContextLost()){this.failedToCreate=!0;return}for(e.shaderSource(s,ft),e.compileShader(s),e.attachShader(this.program,s),this.attributes={},h={},this.numAttributes=l.length,o=0;o<this.numAttributes;o++)l[o]&&(e.bindAttribLocation(this.program,o,l[o]),this.attributes[l[o]]=o);for(e.linkProgram(this.program),e.deleteShader(s),e.deleteShader(p),w=0;w<a.length;w++)c=a[w],c&&!h[c]&&(d=e.getUniformLocation(this.program,c),d&&(h[c]=d));this.fixedUniforms=u(n,h);this.binderUniforms=r?r.getUniforms(n,h):[]};lf.prototype.draw=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){var w,b=n.gl,g,nt,d,tt;if(!this.failedToCreate){n.program.set(this.program);n.setDepthMode(i);n.setStencilMode(r);n.setColorMode(u);n.setCullFace(f);for(g in this.fixedUniforms)this.fixedUniforms[g].set(e[g]);for(v&&v.setUniforms(n,this.binderUniforms,l,{zoom:a}),nt=(w={},w[b.LINES]=2,w[b.TRIANGLES]=3,w[b.LINE_STRIP]=1,w)[t],d=0,tt=c.get();d<tt.length;d+=1){var k=tt[d],it=k.vaos||(k.vaos={}),rt=it[o]||(it[o]=new vr);rt.bind(n,this,s,v?v.getPaintVertexBuffers():[],h,k.vertexOffset,y,p);b.drawElements(t,k.primitiveLength*nt,b.UNSIGNED_SHORT,k.primitiveOffset*nt*2)}}};var tp=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_lightpos:new n.Uniform3f(t,i.u_lightpos),u_lightintensity:new n.Uniform1f(t,i.u_lightintensity),u_lightcolor:new n.Uniform3f(t,i.u_lightcolor),u_vertical_gradient:new n.Uniform1f(t,i.u_vertical_gradient),u_opacity:new n.Uniform1f(t,i.u_opacity)}},ip=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_lightpos:new n.Uniform3f(t,i.u_lightpos),u_lightintensity:new n.Uniform1f(t,i.u_lightintensity),u_lightcolor:new n.Uniform3f(t,i.u_lightcolor),u_vertical_gradient:new n.Uniform1f(t,i.u_vertical_gradient),u_height_factor:new n.Uniform1f(t,i.u_height_factor),u_image:new n.Uniform1i(t,i.u_image),u_texsize:new n.Uniform2f(t,i.u_texsize),u_pixel_coord_upper:new n.Uniform2f(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(t,i.u_pixel_coord_lower),u_scale:new n.Uniform3f(t,i.u_scale),u_fade:new n.Uniform1f(t,i.u_fade),u_opacity:new n.Uniform1f(t,i.u_opacity)}},fs=function(t,i,r,u){var f=i.style.light,o=f.properties.get("position"),s=[o.x,o.y,o.z],h=n.create$1(),e;return f.properties.get("anchor")==="viewport"&&n.fromRotation(h,-i.transform.angle),n.transformMat3(s,s,h),e=f.properties.get("color"),{u_matrix:t,u_lightpos:s,u_lightintensity:f.properties.get("intensity"),u_lightcolor:[e.r,e.g,e.b],u_vertical_gradient:+r,u_opacity:u}},rp=function(t,i,r,u,f,e,o){return n.extend(fs(t,i,r,u),us(e,i,o),{u_height_factor:-Math.pow(2,f.overscaledZ)/o.tileSize/8})},up=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix)}},fp=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_image:new n.Uniform1i(t,i.u_image),u_texsize:new n.Uniform2f(t,i.u_texsize),u_pixel_coord_upper:new n.Uniform2f(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(t,i.u_pixel_coord_lower),u_scale:new n.Uniform3f(t,i.u_scale),u_fade:new n.Uniform1f(t,i.u_fade)}},ep=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_world:new n.Uniform2f(t,i.u_world)}},op=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_world:new n.Uniform2f(t,i.u_world),u_image:new n.Uniform1i(t,i.u_image),u_texsize:new n.Uniform2f(t,i.u_texsize),u_pixel_coord_upper:new n.Uniform2f(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(t,i.u_pixel_coord_lower),u_scale:new n.Uniform3f(t,i.u_scale),u_fade:new n.Uniform1f(t,i.u_fade)}},es=function(n){return{u_matrix:n}},os=function(t,i,r,u){return n.extend(es(t),us(r,i,u))},sp=function(n,t){return{u_matrix:n,u_world:t}},hp=function(t,i,r,u,f){return n.extend(os(t,i,r,u),{u_world:f})},cp=function(t,i){return{u_camera_to_center_distance:new n.Uniform1f(t,i.u_camera_to_center_distance),u_scale_with_map:new n.Uniform1i(t,i.u_scale_with_map),u_pitch_with_map:new n.Uniform1i(t,i.u_pitch_with_map),u_extrude_scale:new n.Uniform2f(t,i.u_extrude_scale),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_matrix:new n.UniformMatrix4f(t,i.u_matrix)}},lp=function(t,i,r,u){var f=t.transform,e,o,s;return u.paint.get("circle-pitch-alignment")==="map"?(s=nt(r,1,f.zoom),e=!0,o=[s,s]):(e=!1,o=f.pixelsToGLUnits),{u_camera_to_center_distance:f.cameraToCenterDistance,u_scale_with_map:+(u.paint.get("circle-pitch-scale")==="map"),u_matrix:t.translatePosMatrix(i.posMatrix,r,u.paint.get("circle-translate"),u.paint.get("circle-translate-anchor")),u_pitch_with_map:+e,u_device_pixel_ratio:n.browser.devicePixelRatio,u_extrude_scale:o}},ap=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_camera_to_center_distance:new n.Uniform1f(t,i.u_camera_to_center_distance),u_pixels_to_tile_units:new n.Uniform1f(t,i.u_pixels_to_tile_units),u_extrude_scale:new n.Uniform2f(t,i.u_extrude_scale),u_overscale_factor:new n.Uniform1f(t,i.u_overscale_factor)}},vp=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_inv_matrix:new n.UniformMatrix4f(t,i.u_inv_matrix),u_camera_to_center_distance:new n.Uniform1f(t,i.u_camera_to_center_distance),u_viewport_size:new n.Uniform2f(t,i.u_viewport_size)}},yp=function(n,t,i){var r=nt(i,1,t.zoom),u=Math.pow(2,t.zoom-i.tileID.overscaledZ),f=i.tileID.overscaleFactor();return{u_matrix:n,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[t.pixelsToGLUnits[0]/(r*u),t.pixelsToGLUnits[1]/(r*u)],u_overscale_factor:f}},pp=function(n,t,i){return{u_matrix:n,u_inv_matrix:t,u_camera_to_center_distance:i.cameraToCenterDistance,u_viewport_size:[i.width,i.height]}},wp=function(t,i){return{u_color:new n.UniformColor(t,i.u_color),u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_overlay:new n.Uniform1i(t,i.u_overlay),u_overlay_scale:new n.Uniform1f(t,i.u_overlay_scale)}},ss=function(n,t,i){return i===void 0&&(i=1),{u_matrix:n,u_color:t,u_overlay:0,u_overlay_scale:i}},bp=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix)}},hs=function(n){return{u_matrix:n}},kp=function(t,i){return{u_extrude_scale:new n.Uniform1f(t,i.u_extrude_scale),u_intensity:new n.Uniform1f(t,i.u_intensity),u_matrix:new n.UniformMatrix4f(t,i.u_matrix)}},dp=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_world:new n.Uniform2f(t,i.u_world),u_image:new n.Uniform1i(t,i.u_image),u_color_ramp:new n.Uniform1i(t,i.u_color_ramp),u_opacity:new n.Uniform1f(t,i.u_opacity)}},gp=function(n,t,i,r){return{u_matrix:n,u_extrude_scale:nt(t,1,i),u_intensity:r}},nw=function(t,i,r,u){var e=n.create(),f;return n.ortho(e,0,t.width,t.height,0,0,1),f=t.context.gl,{u_matrix:e,u_world:[f.drawingBufferWidth,f.drawingBufferHeight],u_image:r,u_color_ramp:u,u_opacity:i.paint.get("heatmap-opacity")}},tw=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_image:new n.Uniform1i(t,i.u_image),u_latrange:new n.Uniform2f(t,i.u_latrange),u_light:new n.Uniform2f(t,i.u_light),u_shadow:new n.UniformColor(t,i.u_shadow),u_highlight:new n.UniformColor(t,i.u_highlight),u_accent:new n.UniformColor(t,i.u_accent)}},iw=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_image:new n.Uniform1i(t,i.u_image),u_dimension:new n.Uniform2f(t,i.u_dimension),u_zoom:new n.Uniform1f(t,i.u_zoom),u_unpack:new n.Uniform4f(t,i.u_unpack)}},rw=function(n,t,i){var f=i.paint.get("hillshade-shadow-color"),e=i.paint.get("hillshade-highlight-color"),o=i.paint.get("hillshade-accent-color"),r=i.paint.get("hillshade-illumination-direction")*(Math.PI/180),u;return i.paint.get("hillshade-illumination-anchor")==="viewport"&&(r-=n.transform.angle),u=!n.options.moving,{u_matrix:n.transform.calculatePosMatrix(t.tileID.toUnwrapped(),u),u_image:0,u_latrange:fw(n,t.tileID),u_light:[i.paint.get("hillshade-exaggeration"),r],u_shadow:f,u_highlight:e,u_accent:o}},uw=function(t,i){var u=i.stride,r=n.create();return n.ortho(r,0,n.EXTENT,-n.EXTENT,0,0,1),n.translate(r,r,[0,-n.EXTENT,0]),{u_matrix:r,u_image:1,u_dimension:[u,u],u_zoom:t.overscaledZ,u_unpack:i.getUnpackVector()}};var ew=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_ratio:new n.Uniform1f(t,i.u_ratio),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_units_to_pixels:new n.Uniform2f(t,i.u_units_to_pixels)}},ow=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_ratio:new n.Uniform1f(t,i.u_ratio),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_units_to_pixels:new n.Uniform2f(t,i.u_units_to_pixels),u_image:new n.Uniform1i(t,i.u_image),u_image_height:new n.Uniform1f(t,i.u_image_height)}},sw=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_texsize:new n.Uniform2f(t,i.u_texsize),u_ratio:new n.Uniform1f(t,i.u_ratio),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_image:new n.Uniform1i(t,i.u_image),u_units_to_pixels:new n.Uniform2f(t,i.u_units_to_pixels),u_scale:new n.Uniform3f(t,i.u_scale),u_fade:new n.Uniform1f(t,i.u_fade)}},hw=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_ratio:new n.Uniform1f(t,i.u_ratio),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_units_to_pixels:new n.Uniform2f(t,i.u_units_to_pixels),u_patternscale_a:new n.Uniform2f(t,i.u_patternscale_a),u_patternscale_b:new n.Uniform2f(t,i.u_patternscale_b),u_sdfgamma:new n.Uniform1f(t,i.u_sdfgamma),u_image:new n.Uniform1i(t,i.u_image),u_tex_y_a:new n.Uniform1f(t,i.u_tex_y_a),u_tex_y_b:new n.Uniform1f(t,i.u_tex_y_b),u_mix:new n.Uniform1f(t,i.u_mix)}},af=function(t,i,r){var u=t.transform;return{u_matrix:ls(t,i,r),u_ratio:1/nt(i,1,u.zoom),u_device_pixel_ratio:n.browser.devicePixelRatio,u_units_to_pixels:[1/u.pixelsToGLUnits[0],1/u.pixelsToGLUnits[1]]}},cw=function(t,i,r,u){return n.extend(af(t,i,r),{u_image:0,u_image_height:u})},lw=function(t,i,r,u){var f=t.transform,e=cs(i,f);return{u_matrix:ls(t,i,r),u_texsize:i.imageAtlasTexture.size,u_ratio:1/nt(i,1,f.zoom),u_device_pixel_ratio:n.browser.devicePixelRatio,u_image:0,u_scale:[e,u.fromScale,u.toScale],u_fade:u.t,u_units_to_pixels:[1/f.pixelsToGLUnits[0],1/f.pixelsToGLUnits[1]]}},aw=function(t,i,r,u,f){var v=t.transform,e=t.lineAtlas,h=cs(i,v),c=r.layout.get("line-cap")==="round",o=e.getDash(u.from,c),s=e.getDash(u.to,c),l=o.width*f.fromScale,a=s.width*f.toScale;return n.extend(af(t,i,r),{u_patternscale_a:[h/l,-o.height/2],u_patternscale_b:[h/a,-s.height/2],u_sdfgamma:e.width/(Math.min(l,a)*256*n.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:o.y,u_tex_y_b:s.y,u_mix:f.t})};as=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_tl_parent:new n.Uniform2f(t,i.u_tl_parent),u_scale_parent:new n.Uniform1f(t,i.u_scale_parent),u_buffer_scale:new n.Uniform1f(t,i.u_buffer_scale),u_fade_t:new n.Uniform1f(t,i.u_fade_t),u_opacity:new n.Uniform1f(t,i.u_opacity),u_image0:new n.Uniform1i(t,i.u_image0),u_image1:new n.Uniform1i(t,i.u_image1),u_brightness_low:new n.Uniform1f(t,i.u_brightness_low),u_brightness_high:new n.Uniform1f(t,i.u_brightness_high),u_saturation_factor:new n.Uniform1f(t,i.u_saturation_factor),u_contrast_factor:new n.Uniform1f(t,i.u_contrast_factor),u_spin_weights:new n.Uniform3f(t,i.u_spin_weights)}};vs=function(n,t,i,r,u){return{u_matrix:n,u_tl_parent:t,u_scale_parent:i,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*u.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:u.paint.get("raster-brightness-min"),u_brightness_high:u.paint.get("raster-brightness-max"),u_saturation_factor:pw(u.paint.get("raster-saturation")),u_contrast_factor:yw(u.paint.get("raster-contrast")),u_spin_weights:vw(u.paint.get("raster-hue-rotate"))}};var ww=function(t,i){return{u_is_size_zoom_constant:new n.Uniform1i(t,i.u_is_size_zoom_constant),u_is_size_feature_constant:new n.Uniform1i(t,i.u_is_size_feature_constant),u_size_t:new n.Uniform1f(t,i.u_size_t),u_size:new n.Uniform1f(t,i.u_size),u_camera_to_center_distance:new n.Uniform1f(t,i.u_camera_to_center_distance),u_pitch:new n.Uniform1f(t,i.u_pitch),u_rotate_symbol:new n.Uniform1i(t,i.u_rotate_symbol),u_aspect_ratio:new n.Uniform1f(t,i.u_aspect_ratio),u_fade_change:new n.Uniform1f(t,i.u_fade_change),u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_label_plane_matrix:new n.UniformMatrix4f(t,i.u_label_plane_matrix),u_coord_matrix:new n.UniformMatrix4f(t,i.u_coord_matrix),u_is_text:new n.Uniform1i(t,i.u_is_text),u_pitch_with_map:new n.Uniform1i(t,i.u_pitch_with_map),u_texsize:new n.Uniform2f(t,i.u_texsize),u_texture:new n.Uniform1i(t,i.u_texture)}},bw=function(t,i){return{u_is_size_zoom_constant:new n.Uniform1i(t,i.u_is_size_zoom_constant),u_is_size_feature_constant:new n.Uniform1i(t,i.u_is_size_feature_constant),u_size_t:new n.Uniform1f(t,i.u_size_t),u_size:new n.Uniform1f(t,i.u_size),u_camera_to_center_distance:new n.Uniform1f(t,i.u_camera_to_center_distance),u_pitch:new n.Uniform1f(t,i.u_pitch),u_rotate_symbol:new n.Uniform1i(t,i.u_rotate_symbol),u_aspect_ratio:new n.Uniform1f(t,i.u_aspect_ratio),u_fade_change:new n.Uniform1f(t,i.u_fade_change),u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_label_plane_matrix:new n.UniformMatrix4f(t,i.u_label_plane_matrix),u_coord_matrix:new n.UniformMatrix4f(t,i.u_coord_matrix),u_is_text:new n.Uniform1i(t,i.u_is_text),u_pitch_with_map:new n.Uniform1i(t,i.u_pitch_with_map),u_texsize:new n.Uniform2f(t,i.u_texsize),u_texture:new n.Uniform1i(t,i.u_texture),u_gamma_scale:new n.Uniform1f(t,i.u_gamma_scale),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_is_halo:new n.Uniform1i(t,i.u_is_halo)}},kw=function(t,i){return{u_is_size_zoom_constant:new n.Uniform1i(t,i.u_is_size_zoom_constant),u_is_size_feature_constant:new n.Uniform1i(t,i.u_is_size_feature_constant),u_size_t:new n.Uniform1f(t,i.u_size_t),u_size:new n.Uniform1f(t,i.u_size),u_camera_to_center_distance:new n.Uniform1f(t,i.u_camera_to_center_distance),u_pitch:new n.Uniform1f(t,i.u_pitch),u_rotate_symbol:new n.Uniform1i(t,i.u_rotate_symbol),u_aspect_ratio:new n.Uniform1f(t,i.u_aspect_ratio),u_fade_change:new n.Uniform1f(t,i.u_fade_change),u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_label_plane_matrix:new n.UniformMatrix4f(t,i.u_label_plane_matrix),u_coord_matrix:new n.UniformMatrix4f(t,i.u_coord_matrix),u_is_text:new n.Uniform1i(t,i.u_is_text),u_pitch_with_map:new n.Uniform1i(t,i.u_pitch_with_map),u_texsize:new n.Uniform2f(t,i.u_texsize),u_texsize_icon:new n.Uniform2f(t,i.u_texsize_icon),u_texture:new n.Uniform1i(t,i.u_texture),u_texture_icon:new n.Uniform1i(t,i.u_texture_icon),u_gamma_scale:new n.Uniform1f(t,i.u_gamma_scale),u_device_pixel_ratio:new n.Uniform1f(t,i.u_device_pixel_ratio),u_is_halo:new n.Uniform1i(t,i.u_is_halo)}},ys=function(n,t,i,r,u,f,e,o,s,h){var c=u.transform;return{u_is_size_zoom_constant:+(n==="constant"||n==="source"),u_is_size_feature_constant:+(n==="constant"||n==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/180*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:c.width/c.height,u_fade_change:u.options.fadeDuration?u.symbolFadeChange:1,u_matrix:f,u_label_plane_matrix:e,u_coord_matrix:o,u_is_text:+s,u_pitch_with_map:+r,u_texsize:h,u_texture:0}},ps=function(t,i,r,u,f,e,o,s,h,c,l){var a=f.transform;return n.extend(ys(t,i,r,u,f,e,o,s,h,c),{u_gamma_scale:u?Math.cos(a._pitch)*a.cameraToCenterDistance:1,u_device_pixel_ratio:n.browser.devicePixelRatio,u_is_halo:+l})},dw=function(t,i,r,u,f,e,o,s,h,c){return n.extend(ps(t,i,r,u,f,e,o,s,!0,h,!0),{u_texsize_icon:c,u_texture_icon:1})},gw=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_opacity:new n.Uniform1f(t,i.u_opacity),u_color:new n.UniformColor(t,i.u_color)}},nb=function(t,i){return{u_matrix:new n.UniformMatrix4f(t,i.u_matrix),u_opacity:new n.Uniform1f(t,i.u_opacity),u_image:new n.Uniform1i(t,i.u_image),u_pattern_tl_a:new n.Uniform2f(t,i.u_pattern_tl_a),u_pattern_br_a:new n.Uniform2f(t,i.u_pattern_br_a),u_pattern_tl_b:new n.Uniform2f(t,i.u_pattern_tl_b),u_pattern_br_b:new n.Uniform2f(t,i.u_pattern_br_b),u_texsize:new n.Uniform2f(t,i.u_texsize),u_mix:new n.Uniform1f(t,i.u_mix),u_pattern_size_a:new n.Uniform2f(t,i.u_pattern_size_a),u_pattern_size_b:new n.Uniform2f(t,i.u_pattern_size_b),u_scale_a:new n.Uniform1f(t,i.u_scale_a),u_scale_b:new n.Uniform1f(t,i.u_scale_b),u_pixel_coord_upper:new n.Uniform2f(t,i.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(t,i.u_pixel_coord_lower),u_tile_units_to_pixels:new n.Uniform1f(t,i.u_tile_units_to_pixels)}},tb=function(n,t,i){return{u_matrix:n,u_opacity:t,u_color:i}},ib=function(t,i,r,u,f,e){return n.extend(np(u,e,r,f),{u_matrix:t,u_opacity:i})},rb={fillExtrusion:tp,fillExtrusionPattern:ip,fill:up,fillPattern:fp,fillOutline:ep,fillOutlinePattern:op,circle:cp,collisionBox:ap,collisionCircle:vp,debug:wp,clippingMask:bp,heatmap:kp,heatmapTexture:dp,hillshade:tw,hillshadePrepare:iw,line:ew,lineGradient:ow,linePattern:sw,lineSDF:hw,raster:as,symbolIcon:ww,symbolSDF:bw,symbolTextAndIcon:kw,background:gw,backgroundPattern:nb},hu;bs=n.identity(new Float32Array(16));var rk=new n.Color(1,0,0,1),uk=new n.Color(0,1,0,1),fk=new n.Color(0,0,1,1),ek=new n.Color(1,0,1,1),ok=new n.Color(0,1,1,1);yf={symbol:fb,circle:cb,heatmap:lb,line:pb,fill:wb,"fill-extrusion":bb,hillshade:kb,raster:nk,background:ik,debug:ck,custom:vk};o=function(n,t){this.context=new k(n);this.transform=t;this._tileTextures={};this.setup();this.numSublayers=ai.maxUnderzooming+ai.maxOverzooming+1;this.depthEpsilon=1/Math.pow(2,16);this.crossTileSymbolIndex=new ar;this.gpuTimers={}};o.prototype.resize=function(t,i){var r,u,f;if(this.width=t*n.browser.devicePixelRatio,this.height=i*n.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(r=0,u=this.style._order;r<u.length;r+=1)f=u[r],this.style._layers[f].resize()};o.prototype.setup=function(){var t=this.context,e=new n.StructArrayLayout2i4,r,u,f,i,s,o;e.emplaceBack(0,0);e.emplaceBack(n.EXTENT,0);e.emplaceBack(0,n.EXTENT);e.emplaceBack(n.EXTENT,n.EXTENT);this.tileExtentBuffer=t.createVertexBuffer(e,hf.members);this.tileExtentSegments=n.SegmentVector.simpleSegment(0,0,4,2);r=new n.StructArrayLayout2i4;r.emplaceBack(0,0);r.emplaceBack(n.EXTENT,0);r.emplaceBack(0,n.EXTENT);r.emplaceBack(n.EXTENT,n.EXTENT);this.debugBuffer=t.createVertexBuffer(r,hf.members);this.debugSegments=n.SegmentVector.simpleSegment(0,0,4,5);u=new n.StructArrayLayout4i8;u.emplaceBack(0,0,0,0);u.emplaceBack(n.EXTENT,0,n.EXTENT,0);u.emplaceBack(0,n.EXTENT,0,n.EXTENT);u.emplaceBack(n.EXTENT,n.EXTENT,n.EXTENT,n.EXTENT);this.rasterBoundsBuffer=t.createVertexBuffer(u,nu.members);this.rasterBoundsSegments=n.SegmentVector.simpleSegment(0,0,4,2);f=new n.StructArrayLayout2i4;f.emplaceBack(0,0);f.emplaceBack(1,0);f.emplaceBack(0,1);f.emplaceBack(1,1);this.viewportBuffer=t.createVertexBuffer(f,hf.members);this.viewportSegments=n.SegmentVector.simpleSegment(0,0,4,2);i=new n.StructArrayLayout1ui2;i.emplaceBack(0);i.emplaceBack(1);i.emplaceBack(3);i.emplaceBack(2);i.emplaceBack(0);this.tileBorderIndexBuffer=t.createIndexBuffer(i);s=new n.StructArrayLayout3ui6;s.emplaceBack(0,1,2);s.emplaceBack(2,1,3);this.quadTriangleIndexBuffer=t.createIndexBuffer(s);this.emptyTexture=new n.Texture(t,{width:1,height:1,data:new Uint8Array([0,0,0,0])},t.gl.RGBA);o=this.context.gl;this.stencilClearMode=new c({func:o.ALWAYS,mask:0},0,255,o.ZERO,o.ZERO,o.ZERO)};o.prototype.clearStencil=function(){var r=this.context,i=r.gl,t;this.nextStencilID=1;this.currentStencilSource=undefined;t=n.create();n.ortho(t,0,this.width,this.height,0,0,1);n.scale(t,t,[i.drawingBufferWidth,i.drawingBufferHeight,0]);this.useProgram("clippingMask").draw(r,i.TRIANGLES,u.disabled,this.stencilClearMode,y.disabled,h.disabled,hs(t),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)};o.prototype._renderTileClippingMasks=function(n,t){var r,i,s,f,e,o,l;if(this.currentStencilSource!==n.source&&n.isTileClipped()&&t&&t.length)for(this.currentStencilSource=n.source,r=this.context,i=r.gl,this.nextStencilID+t.length>256&&this.clearStencil(),r.setColorMode(y.disabled),r.setDepthMode(u.disabled),s=this.useProgram("clippingMask"),this._tileClippingMaskIDs={},f=0,e=t;f<e.length;f+=1)o=e[f],l=this._tileClippingMaskIDs[o.key]=this.nextStencilID++,s.draw(r,i.TRIANGLES,u.disabled,new c({func:i.ALWAYS,mask:0},l,255,i.KEEP,i.KEEP,i.REPLACE),y.disabled,h.disabled,hs(o.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)};o.prototype.stencilModeFor3D=function(){this.currentStencilSource=undefined;this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,n=this.context.gl;return new c({func:n.NOTEQUAL,mask:255},t,255,n.KEEP,n.KEEP,n.REPLACE)};o.prototype.stencilModeForClipping=function(n){var t=this.context.gl;return new c({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[n.key],0,t.KEEP,t.KEEP,t.REPLACE)};o.prototype.stencilConfigForOverlap=function(n){var f,r=this.context.gl,t=n.sort(function(n,t){return t.overscaledZ-n.overscaledZ}),e=t[t.length-1].overscaledZ,u=t[0].overscaledZ-e+1,o,i;if(u>1){for(this.currentStencilSource=undefined,this.nextStencilID+u>256&&this.clearStencil(),o={},i=0;i<u;i++)o[i+e]=new c({func:r.GEQUAL,mask:255},i+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=u,[o,t]}return[(f={},f[e]=c.disabled,f),t]};o.prototype.colorModeForRenderPass=function(){var i=this.context.gl,r,t;return this._showOverdrawInspector?(r=8,t=1/r,new y([i.CONSTANT_COLOR,i.ONE],new n.Color(t,t,t,0),[!0,!0,!0,!0])):this.renderPass==="opaque"?y.unblended:y.alphaBlended};o.prototype.depthModeForSublayer=function(n,t,i){if(!this.opaquePassEnabledForLayer())return u.disabled;var r=1-((1+this.currentLayer)*this.numSublayers+n)*this.depthEpsilon;return new u(i||this.context.gl.LEQUAL,t,[r,r])};o.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff};o.prototype.render=function(t,i){var d=this,r,u,g,y,e,w,h,tt,a,b,it,f,k,s,c,ut;this.style=t;this.options=i;this.lineAtlas=t.lineAtlas;this.imageManager=t.imageManager;this.glyphManager=t.glyphManager;this.symbolFadeChange=t.placement.symbolFadeChange(n.browser.now());this.imageManager.beginFrame();r=this.style._order;u=this.style.sourceCaches;for(g in u)y=u[g],y.used&&y.prepare(this.context);var l={},p={},nt={};for(e in u)w=u[e],l[e]=w.getVisibleCoordinates(),p[e]=l[e].slice().reverse(),nt[e]=w.getVisibleCoordinates(!0).reverse();for(this.opaquePassCutoff=Infinity,h=0;h<r.length;h++)if(tt=r[h],this.style._layers[tt].is3D()){this.opaquePassCutoff=h;break}for(this.renderPass="offscreen",a=0,b=r;a<b.length;a+=1)(it=b[a],f=this.style._layers[it],f.hasOffscreenPass()&&!f.isHidden(this.transform.zoom))&&(k=p[f.source],f.type==="custom"||k.length)&&this.renderLayer(this,u[f.source],f,k);for(this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?n.Color.black:n.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=r.length-1;this.currentLayer>=0;this.currentLayer--){var v=this.style._layers[r[this.currentLayer]],ft=u[v.source],rt=l[v.source];this._renderTileClippingMasks(v,rt);this.renderLayer(this,ft,v,rt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<r.length;this.currentLayer++){var o=this.style._layers[r[this.currentLayer]],et=u[o.source],ot=(o.type==="symbol"?nt:p)[o.source];this._renderTileClippingMasks(o,l[o.source]);this.renderLayer(this,et,o,ot)}this.options.showTileBoundaries&&(ut=n.values(this.style._layers),ut.forEach(function(n){n.source&&!n.isHidden(d.transform.zoom)&&(n.source!==(c&&c.id)&&(c=d.style.sourceCaches[n.source]),(!s||s.getSource().maxzoom<c.getSource().maxzoom)&&(s=c))}),s&&yf.debug(this,s,s.getVisibleCoordinates()));this.options.showPadding&&sk(this);this.context.setDefault()};o.prototype.renderLayer=function(n,t,i,r){i.isHidden(this.transform.zoom)||(i.type==="background"||i.type==="custom"||r.length)&&(this.id=i.id,this.gpuTimingStart(i),yf[i.type](n,t,i,r,this.style.placement.variableOffsets),this.gpuTimingEnd())};o.prototype.gpuTimingStart=function(n){if(this.options.gpuTiming){var i=this.context.extTimerQuery,t=this.gpuTimers[n.id];t||(t=this.gpuTimers[n.id]={calls:0,cpuTime:0,query:i.createQueryEXT()});t.calls++;i.beginQueryEXT(i.TIME_ELAPSED_EXT,t.query)}};o.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var n=this.context.extTimerQuery;n.endQueryEXT(n.TIME_ELAPSED_EXT)}};o.prototype.collectGpuTimers=function(){var n=this.gpuTimers;return this.gpuTimers={},n};o.prototype.queryGpuTimers=function(n){var i={};for(var r in n){var u=n[r],t=this.context.extTimerQuery,f=t.getQueryObjectEXT(u.query,t.QUERY_RESULT_EXT)/1e6;t.deleteQueryEXT(u.query);i[r]=f}return i};o.prototype.translatePosMatrix=function(t,i,r,u,f){var e,o,s,c,h;return!r[0]&&!r[1]?t:(e=f?u==="map"?this.transform.angle:0:u==="viewport"?-this.transform.angle:0,e&&(o=Math.sin(e),s=Math.cos(e),r=[r[0]*s-r[1]*o,r[0]*o+r[1]*s]),c=[f?r[0]:nt(i,r[0],this.transform.zoom),f?r[1]:nt(i,r[1],this.transform.zoom),0],h=new Float32Array(16),n.translate(h,t,c),h)};o.prototype.saveTileTexture=function(n){var t=this._tileTextures[n.size[0]];t?t.push(n):this._tileTextures[n.size[0]]=[n]};o.prototype.getTileTexture=function(n){var t=this._tileTextures[n];return t&&t.length>0?t.pop():null};o.prototype.isPatternMissing=function(n){if(!n)return!1;if(!n.from||!n.to)return!0;var t=this.imageManager.getPattern(n.from.toString()),i=this.imageManager.getPattern(n.to.toString());return!t||!i};o.prototype.useProgram=function(n,t){this.cache=this.cache||{};var i=""+n+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[i]||(this.cache[i]=new lf(this.context,n,is[n],t,rb[n],this._showOverdrawInspector)),this.cache[i]};o.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO();this.context.cullFace.setDefault();this.context.activeTexture.setDefault();this.context.pixelStoreUnpack.setDefault();this.context.pixelStoreUnpackPremultiplyAlpha.setDefault();this.context.pixelStoreUnpackFlipY.setDefault()};o.prototype.setBaseState=function(){var n=this.context.gl;this.context.cullFace.set(!1);this.context.viewport.set([0,0,this.width,this.height]);this.context.blendEquation.set(n.FUNC_ADD)};o.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=n.window.document.createElement("canvas");this.debugOverlayCanvas.width=512;this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new n.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}};o.prototype.destroy=function(){this.emptyTexture.destroy();this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};lu=function(n,t){this.points=n;this.planes=t};lu.fromInvProjectionMatrix=function(t,i,r){var f=Math.pow(2,r),u=[[-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(function(i){return n.transformMat4([],i,t)}).map(function(t){return n.scale$1([],t,1/t[3]/i*f)}),e=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(t){var r=n.sub([],u[t[0]],u[t[1]]),f=n.sub([],u[t[2]],u[t[1]]),i=n.normalize([],n.cross([],r,f)),e=-n.dot(i,u[t[1]]);return i.concat(e)});return new lu(u,e)};hi=function(t,i){this.min=t;this.max=i;this.center=n.scale$2([],n.add([],this.min,this.max),.5)};hi.prototype.quadrant=function(t){for(var r=[t%2==0,t<2],f=n.clone$2(this.min),u=n.clone$2(this.max),i=0;i<r.length;i++)f[i]=r[i]?this.min[i]:this.center[i],u[i]=r[i]?this.center[i]:this.max[i];return u[2]=this.max[2],new hi(f,u)};hi.prototype.distanceX=function(n){var t=Math.max(Math.min(this.max[0],n[0]),this.min[0]);return t-n[0]};hi.prototype.distanceY=function(n){var t=Math.max(Math.min(this.max[1],n[1]),this.min[1]);return t-n[1]};hi.prototype.intersects=function(t){for(var a,r,u,i,f,e,o,c,s=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],l=!0,h=0;h<t.planes.length;h++){for(a=t.planes[h],r=0,u=0;u<s.length;u++)r+=n.dot$1(a,s[u])>=0;if(r===0)return 0;r!==s.length&&(l=!1)}if(l)return 2;for(i=0;i<3;i++){for(f=Number.MAX_VALUE,e=-Number.MAX_VALUE,o=0;o<t.points.length;o++)c=t.points[o][i]-this.min[i],f=Math.min(f,c),e=Math.max(e,c);if(e<0||f>this.max[i]-this.min[i])return 0}return 1};bt=function(n,t,i,r){if(n===void 0&&(n=0),t===void 0&&(t=0),i===void 0&&(i=0),r===void 0&&(r=0),isNaN(n)||n<0||isNaN(t)||t<0||isNaN(i)||i<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=n;this.bottom=t;this.left=i;this.right=r};bt.prototype.interpolate=function(t,i,r){return i.top!=null&&t.top!=null&&(this.top=n.number(t.top,i.top,r)),i.bottom!=null&&t.bottom!=null&&(this.bottom=n.number(t.bottom,i.bottom,r)),i.left!=null&&t.left!=null&&(this.left=n.number(t.left,i.left,r)),i.right!=null&&t.right!=null&&(this.right=n.number(t.right,i.right,r)),this};bt.prototype.getCenter=function(t,i){var r=n.clamp((this.left+t-this.right)/2,0,t),u=n.clamp((this.top+i-this.bottom)/2,0,i);return new n.Point(r,u)};bt.prototype.equals=function(n){return this.top===n.top&&this.bottom===n.bottom&&this.left===n.left&&this.right===n.right};bt.prototype.clone=function(){return new bt(this.top,this.bottom,this.left,this.right)};bt.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};f=function(t,i,r,u,f){this.tileSize=512;this.maxValidLatitude=85.051129;this._renderWorldCopies=f===undefined?!0:f;this._minZoom=t||0;this._maxZoom=i||22;this._minPitch=r===undefined||r===null?0:r;this._maxPitch=u===undefined||u===null?60:u;this.setMaxBounds();this.width=0;this.height=0;this._center=new n.LngLat(0,0);this.zoom=0;this.angle=0;this._fov=.64350110879328437;this._pitch=0;this._unmodified=!0;this._edgeInsets=new bt;this._posMatrixCache={};this._alignedPosMatrixCache={}};e={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};f.prototype.clone=function(){var n=new f(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return n.tileSize=this.tileSize,n.latRange=this.latRange,n.width=this.width,n.height=this.height,n._center=this._center,n.zoom=this.zoom,n.angle=this.angle,n._fov=this._fov,n._pitch=this._pitch,n._unmodified=this._unmodified,n._edgeInsets=this._edgeInsets.clone(),n._calcMatrices(),n};e.minZoom.get=function(){return this._minZoom};e.minZoom.set=function(n){this._minZoom!==n&&(this._minZoom=n,this.zoom=Math.max(this.zoom,n))};e.maxZoom.get=function(){return this._maxZoom};e.maxZoom.set=function(n){this._maxZoom!==n&&(this._maxZoom=n,this.zoom=Math.min(this.zoom,n))};e.minPitch.get=function(){return this._minPitch};e.minPitch.set=function(n){this._minPitch!==n&&(this._minPitch=n,this.pitch=Math.max(this.pitch,n))};e.maxPitch.get=function(){return this._maxPitch};e.maxPitch.set=function(n){this._maxPitch!==n&&(this._maxPitch=n,this.pitch=Math.min(this.pitch,n))};e.renderWorldCopies.get=function(){return this._renderWorldCopies};e.renderWorldCopies.set=function(n){n===undefined?n=!0:n===null&&(n=!1);this._renderWorldCopies=n};e.worldSize.get=function(){return this.tileSize*this.scale};e.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))};e.size.get=function(){return new n.Point(this.width,this.height)};e.bearing.get=function(){return-this.angle/Math.PI*180};e.bearing.set=function(t){var i=-n.wrap(t,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=n.create$2(),n.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))};e.pitch.get=function(){return this._pitch/Math.PI*180};e.pitch.set=function(t){var i=n.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())};e.fov.get=function(){return this._fov/Math.PI*180};e.fov.set=function(n){(n=Math.max(.01,Math.min(60,n)),this._fov!==n)&&(this._unmodified=!1,this._fov=n/180*Math.PI,this._calcMatrices())};e.zoom.get=function(){return this._zoom};e.zoom.set=function(n){var t=Math.min(Math.max(n,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())};e.center.get=function(){return this._center};e.center.set=function(n){(n.lat!==this._center.lat||n.lng!==this._center.lng)&&(this._unmodified=!1,this._center=n,this._constrain(),this._calcMatrices())};e.padding.get=function(){return this._edgeInsets.toJSON()};e.padding.set=function(n){this._edgeInsets.equals(n)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,n,1),this._calcMatrices())};e.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)};f.prototype.isPaddingEqual=function(n){return this._edgeInsets.equals(n)};f.prototype.interpolatePadding=function(n,t,i){this._unmodified=!1;this._edgeInsets.interpolate(n,t,i);this._constrain();this._calcMatrices()};f.prototype.coveringZoomLevel=function(n){var t=(n.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/n.tileSize));return Math.max(0,t)};f.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new n.UnwrappedTileID(0,t)],i;if(this._renderWorldCopies){var u=this.pointCoordinate(new n.Point(0,0)),f=this.pointCoordinate(new n.Point(this.width,0)),e=this.pointCoordinate(new n.Point(this.width,this.height)),o=this.pointCoordinate(new n.Point(0,this.height)),h=Math.floor(Math.min(u.x,f.x,e.x,o.x)),c=Math.floor(Math.max(u.x,f.x,e.x,o.x)),s=1;for(i=h-s;i<=c+s;i++)i!==0&&r.push(new n.UnwrappedTileID(i,t))}return r};f.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),g=r,o,y,f,k,d;if(t.minzoom!==undefined&&r<t.minzoom)return[];t.maxzoom!==undefined&&r>t.maxzoom&&(r=t.maxzoom);var p=n.MercatorCoordinate.fromLngLat(this.center),e=Math.pow(2,r),s=[e*p.x,e*p.y,0],nt=lu.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),w=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(w=r);var h=function(n){return{aabb:new hi([n*e,0,0],[(n+1)*e,e,0]),zoom:0,x:0,y:0,wrap:n,fullyVisible:!1}},u=[],b=[],c=r,tt=t.reparseOverscaled?g:r;if(this._renderWorldCopies)for(o=1;o<=3;o++)u.push(h(-o)),u.push(h(o));for(u.push(h(0));u.length>0;){var i=u.pop(),l=i.x,a=i.y,v=i.fullyVisible;if(!v){if(y=i.aabb.intersects(nt),y===0)continue;v=y===2}var it=i.aabb.distanceX(s),rt=i.aabb.distanceY(s),ut=Math.max(Math.abs(it),Math.abs(rt)),ft=3+(1<<c-i.zoom)-2;if(i.zoom===c||ut>ft&&i.zoom>=w){b.push({tileID:new n.OverscaledTileID(i.zoom===c?tt:i.zoom,i.wrap,i.zoom,l,a),distanceSq:n.sqrLen([s[0]-.5-l,s[1]-.5-a])});continue}for(f=0;f<4;f++)k=(l<<1)+f%2,d=(a<<1)+(f>>1),u.push({aabb:i.aabb.quadrant(f),zoom:i.zoom+1,x:k,y:d,wrap:i.wrap,fullyVisible:v})}return b.sort(function(n,t){return n.distanceSq-t.distanceSq}).map(function(n){return n.tileID})};f.prototype.resize=function(n,t){this.width=n;this.height=t;this.pixelsToGLUnits=[2/n,-2/t];this._constrain();this._calcMatrices()};e.unmodified.get=function(){return this._unmodified};f.prototype.zoomScale=function(n){return Math.pow(2,n)};f.prototype.scaleZoom=function(n){return Math.log(n)/Math.LN2};f.prototype.project=function(t){var i=n.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new n.Point(n.mercatorXfromLng(t.lng)*this.worldSize,n.mercatorYfromLat(i)*this.worldSize)};f.prototype.unproject=function(t){return new n.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()};e.point.get=function(){return this.project(this.center)};f.prototype.setLocationAtPoint=function(t,i){var r=this.pointCoordinate(i),u=this.pointCoordinate(this.centerPoint),f=this.locationCoordinate(t),e=new n.MercatorCoordinate(f.x-(r.x-u.x),f.y-(r.y-u.y));this.center=this.coordinateLocation(e);this._renderWorldCopies&&(this.center=this.center.wrap())};f.prototype.locationPoint=function(n){return this.coordinatePoint(this.locationCoordinate(n))};f.prototype.pointLocation=function(n){return this.coordinateLocation(this.pointCoordinate(n))};f.prototype.locationCoordinate=function(t){return n.MercatorCoordinate.fromLngLat(t)};f.prototype.coordinateLocation=function(n){return n.toLngLat()};f.prototype.pointCoordinate=function(t){var i=[t.x,t.y,0,1],r=[t.x,t.y,1,1];n.transformMat4(i,i,this.pixelMatrixInverse);n.transformMat4(r,r,this.pixelMatrixInverse);var u=i[3],f=r[3],h=i[0]/u,c=r[0]/f,l=i[1]/u,a=r[1]/f,e=i[2]/u,o=r[2]/f,s=e===o?0:(0-e)/(o-e);return new n.MercatorCoordinate(n.number(h,c,s)/this.worldSize,n.number(l,a,s)/this.worldSize)};f.prototype.coordinatePoint=function(t){var i=[t.x*this.worldSize,t.y*this.worldSize,0,1];return n.transformMat4(i,i,this.pixelMatrix),new n.Point(i[0]/i[3],i[1]/i[3])};f.prototype.getBounds=function(){return(new n.LngLatBounds).extend(this.pointLocation(new n.Point(0,0))).extend(this.pointLocation(new n.Point(this.width,0))).extend(this.pointLocation(new n.Point(this.width,this.height))).extend(this.pointLocation(new n.Point(0,this.height)))};f.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new n.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])};f.prototype.setMaxBounds=function(n){n?(this.lngRange=[n.getWest(),n.getEast()],this.latRange=[n.getSouth(),n.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])};f.prototype.calculatePosMatrix=function(t,i){var u,f;if(i===void 0&&(i=!1),u=t.key,f=i?this._alignedPosMatrixCache:this._posMatrixCache,f[u])return f[u];var e=t.canonical,o=this.worldSize/this.zoomScale(e.z),s=e.x+Math.pow(2,e.z)*t.wrap,r=n.identity(new Float64Array(16));return n.translate(r,r,[s*o,e.y*o,0]),n.scale(r,r,[o/n.EXTENT,o/n.EXTENT,1]),n.multiply(r,i?this.alignedProjMatrix:this.projMatrix,r),f[u]=new Float32Array(r),f[u]};f.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()};f.prototype._constrain=function(){var v,y,t,p,w,h,b,c;if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var i=-90,r=90,u=-180,f=180,l,a,o,s,e=this.size,k=this._unmodified;if(this.latRange&&(v=this.latRange,i=n.mercatorYfromLat(v[1])*this.worldSize,r=n.mercatorYfromLat(v[0])*this.worldSize,l=r-i<e.y?e.y/(r-i):0),this.lngRange&&(y=this.lngRange,u=n.mercatorXfromLng(y[0])*this.worldSize,f=n.mercatorXfromLng(y[1])*this.worldSize,a=f-u<e.x?e.x/(f-u):0),t=this.point,p=Math.max(a||0,l||0),p){this.center=this.unproject(new n.Point(a?(f+u)/2:t.x,l?(r+i)/2:t.y));this.zoom+=this.scaleZoom(p);this._unmodified=k;this._constraining=!1;return}this.latRange&&(w=t.y,h=e.y/2,w-h<i&&(s=i+h),w+h>r&&(s=r-h));this.lngRange&&(b=t.x,c=e.x/2,b-c<u&&(o=u+c),b+c>f&&(o=f-c));(o!==undefined||s!==undefined)&&(this.center=this.unproject(new n.Point(o!==undefined?o:t.x,s!==undefined?s:t.y)));this._unmodified=k;this._constraining=!1}};f.prototype._calcMatrices=function(){var s,i;if(this.height){s=this._fov/2;i=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(s)*this.height;var p=Math.PI/2+this._pitch,h=this._fov*(.5+i.y/this.height),w=Math.sin(h)*this.cameraToCenterDistance/Math.sin(n.clamp(Math.PI-p-h,.01,Math.PI-.01)),c=this.point,r=c.x,u=c.y,b=Math.cos(Math.PI/2-this._pitch)*w+this.cameraToCenterDistance,k=b*1.01,d=this.height/50,t=new Float64Array(16);n.perspective(t,this._fov,this.width/this.height,d,k);t[8]=-i.x*2/this.width;t[9]=i.y*2/this.height;n.scale(t,t,[1,-1,1]);n.translate(t,t,[0,0,-this.cameraToCenterDistance]);n.rotateX(t,t,this._pitch);n.rotateZ(t,t,this.angle);n.translate(t,t,[-r,-u,0]);this.mercatorMatrix=n.scale([],t,[this.worldSize,this.worldSize,this.worldSize]);n.scale(t,t,[1,1,n.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]);this.projMatrix=t;this.invProjMatrix=n.invert([],this.projMatrix);var l=this.width%2/2,a=this.height%2/2,v=Math.cos(this.angle),y=Math.sin(this.angle),f=r-Math.round(r)+v*l+y*a,e=u-Math.round(u)+v*a+y*l,o=new Float64Array(t);if(n.translate(o,o,[f>.5?f-1:f,e>.5?e-1:e,0]),this.alignedProjMatrix=o,t=n.create(),n.scale(t,t,[this.width/2,-this.height/2,1]),n.translate(t,t,[1,-1,0]),this.labelPlaneMatrix=t,t=n.create(),n.scale(t,t,[1,-1,1]),n.translate(t,t,[-1,-1,0]),n.scale(t,t,[2/this.width,2/this.height,1]),this.glCoordMatrix=t,this.pixelMatrix=n.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),t=n.invert(new Float64Array(16),this.pixelMatrix),!t)throw new Error("failed to invert matrix");this.pixelMatrixInverse=t;this._posMatrixCache={};this._alignedPosMatrixCache={}}};f.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new n.Point(0,0)),i=[t.x*this.worldSize,t.y*this.worldSize,0,1],r=n.transformMat4(i,i,this.pixelMatrix);return r[3]/this.cameraToCenterDistance};f.prototype.getCameraPoint=function(){var t=this._pitch,i=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.Point(0,i))};f.prototype.getCameraQueryGeometry=function(t){var i=this.getCameraPoint(),s,h,f;if(t.length===1)return[t[0],i];var r=i.x,u=i.y,e=i.x,o=i.y;for(s=0,h=t;s<h.length;s+=1)f=h[s],r=Math.min(r,f.x),u=Math.min(u,f.y),e=Math.max(e,f.x),o=Math.max(o,f.y);return[new n.Point(r,u),new n.Point(e,u),new n.Point(e,o),new n.Point(r,o),new n.Point(r,u)]};Object.defineProperties(f.prototype,e);kt=function(t){this._hashName=t&&encodeURIComponent(t);n.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this);this._updateHash=yk(this._updateHashUnthrottled.bind(this),300)};kt.prototype.addTo=function(t){this._map=t;n.window.addEventListener("hashchange",this._onHashChange,!1);this._map.on("moveend",this._updateHash);return this};kt.prototype.remove=function(){return n.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this};kt.prototype.getHashString=function(t){var e=this._map.getCenter(),u=Math.round(this._map.getZoom()*100)/100,v=Math.ceil((u*Math.LN2+Math.log(512/360/.5))/Math.LN10),r=Math.pow(10,v),o=Math.round(e.lng*r)/r,s=Math.round(e.lat*r)/r,h=this._map.getBearing(),f=this._map.getPitch(),i="";if(i+=t?"/"+o+"/"+s+"/"+u:u+"/"+s+"/"+o,(h||f)&&(i+="/"+Math.round(h*10)/10),f&&(i+="/"+Math.round(f)),this._hashName){var c=this._hashName,l=!1,a=n.window.location.hash.slice(1).split("&").map(function(n){var t=n.split("=")[0];return t===c?(l=!0,t+"="+i):n}).filter(function(n){return n});return l||a.push(c+"="+i),"#"+a.join("&")}return"#"+i};kt.prototype._getCurrentHash=function(){var r=this,i=n.window.location.hash.replace("#",""),t;return this._hashName?(i.split("&").map(function(n){return n.split("=")}).forEach(function(n){n[0]===r._hashName&&(t=n)}),(t?t[1]||"":"").split("/")):i.split("/")};kt.prototype._onHashChange=function(){var n=this._getCurrentHash(),t;return n.length>=3&&!n.some(function(n){return isNaN(n)})?(t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(n[3]||0):this._map.getBearing(),this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:t,pitch:+(n[4]||0)}),!0):!1};kt.prototype._updateHashUnthrottled=function(){var t=n.window.location.href.replace(/(#.+)?$/,this.getHashString());try{n.window.history.replaceState(n.window.history.state,null,t)}catch(i){}};var au={linearity:.3,easing:n.bezier(0,0,.3,1)},pk=n.extend({deceleration:2500,maxSpeed:1400},au),wk=n.extend({deceleration:20,maxSpeed:1400},au),bk=n.extend({deceleration:1e3,maxSpeed:360},au),kk=n.extend({deceleration:1e3,maxSpeed:90},au),yr=function(n){this._map=n;this.clear()};yr.prototype.clear=function(){this._inertiaBuffer=[]};yr.prototype.record=function(t){this._drainInertiaBuffer();this._inertiaBuffer.push({time:n.browser.now(),settings:t})};yr.prototype._drainInertiaBuffer=function(){for(var t=this._inertiaBuffer,i=n.browser.now();t.length>0&&i-t[0].time>160;)t.shift()};yr.prototype._onMoveEnd=function(t){var i,f,o,v,u,s,h,c,l,a;if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(i={zoom:0,bearing:0,pitch:0,pan:new n.Point(0,0),pinchAround:undefined,around:undefined},f=0,o=this._inertiaBuffer;f<o.length;f+=1)v=o[f],u=v.settings,i.zoom+=u.zoomDelta||0,i.bearing+=u.bearingDelta||0,i.pitch+=u.pitchDelta||0,u.panDelta&&i.pan._add(u.panDelta),u.around&&(i.around=u.around),u.pinchAround&&(i.pinchAround=u.pinchAround);var y=this._inertiaBuffer[this._inertiaBuffer.length-1],e=y.time-this._inertiaBuffer[0].time,r={};return i.pan.mag()&&(s=yu(i.pan.mag(),e,n.extend({},pk,t||{})),r.offset=i.pan.mult(s.amount/i.pan.mag()),r.center=this._map.transform.center,vu(r,s)),i.zoom&&(h=yu(i.zoom,e,wk),r.zoom=this._map.transform.zoom+h.amount,vu(r,h)),i.bearing&&(c=yu(i.bearing,e,bk),r.bearing=this._map.transform.bearing+n.clamp(c.amount,-179,179),vu(r,c)),i.pitch&&(l=yu(i.pitch,e,kk),r.pitch=this._map.transform.pitch+l.amount,vu(r,l)),(r.zoom||r.bearing)&&(a=i.pinchAround===undefined?i.around:i.pinchAround,r.around=a?this._map.unproject(a):this._map.getCenter()),this.clear(),n.extend(r,{noMoveStart:!0})}};var ut=function(i){function r(r,u,f,e){e===void 0&&(e={});var o=t.mousePos(u.getCanvasContainer(),f),s=u.unproject(o);i.call(this,r,n.extend({point:o,lngLat:s,originalEvent:f},e));this._defaultPrevented=!1;this.target=u}i&&(r.__proto__=i);r.prototype=Object.create(i&&i.prototype);r.prototype.constructor=r;var u={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},u.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,u),r}(n.Event),pu=function(i){function r(r,u,f){var s=r==="touchend"?f.changedTouches:f.touches,e=t.touchPos(u.getCanvasContainer(),s),h=e.map(function(n){return u.unproject(n)}),o=e.reduce(function(n,t,i,r){return n.add(t.div(r.length))},new n.Point(0,0)),c=u.unproject(o);i.call(this,r,{points:e,point:o,lngLats:h,lngLat:c,originalEvent:f});this._defaultPrevented=!1}i&&(r.__proto__=i);r.prototype=Object.create(i&&i.prototype);r.prototype.constructor=r;var u={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},u.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,u),r}(n.Event),dk=function(n){function t(t,i,r){n.call(this,t,{originalEvent:r});this._defaultPrevented=!1}n&&(t.__proto__=n);t.prototype=Object.create(n&&n.prototype);t.prototype.constructor=t;var i={defaultPrevented:{configurable:!0}};return t.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,i),t}(n.Event),p=function(n,t){this._map=n;this._clickTolerance=t.clickTolerance};p.prototype.reset=function(){delete this._mousedownPos};p.prototype.wheel=function(n){return this._firePreventable(new dk(n.type,this._map,n))};p.prototype.mousedown=function(n,t){return this._mousedownPos=t,this._firePreventable(new ut(n.type,this._map,n))};p.prototype.mouseup=function(n){this._map.fire(new ut(n.type,this._map,n))};p.prototype.click=function(n,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new ut(n.type,this._map,n))};p.prototype.dblclick=function(n){return this._firePreventable(new ut(n.type,this._map,n))};p.prototype.mouseover=function(n){this._map.fire(new ut(n.type,this._map,n))};p.prototype.mouseout=function(n){this._map.fire(new ut(n.type,this._map,n))};p.prototype.touchstart=function(n){return this._firePreventable(new pu(n.type,this._map,n))};p.prototype.touchmove=function(n){this._map.fire(new pu(n.type,this._map,n))};p.prototype.touchend=function(n){this._map.fire(new pu(n.type,this._map,n))};p.prototype.touchcancel=function(n){this._map.fire(new pu(n.type,this._map,n))};p.prototype._firePreventable=function(n){return this._map.fire(n),n.defaultPrevented?{}:void 0};p.prototype.isEnabled=function(){return!0};p.prototype.isActive=function(){return!1};p.prototype.enable=function(){};p.prototype.disable=function(){};st=function(n){this._map=n};st.prototype.reset=function(){this._delayContextMenu=!1;delete this._contextMenuEvent};st.prototype.mousemove=function(n){this._map.fire(new ut(n.type,this._map,n))};st.prototype.mousedown=function(){this._delayContextMenu=!0};st.prototype.mouseup=function(){this._delayContextMenu=!1;this._contextMenuEvent&&(this._map.fire(new ut("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)};st.prototype.contextmenu=function(n){this._delayContextMenu?this._contextMenuEvent=n:this._map.fire(new ut(n.type,this._map,n));this._map.listens("contextmenu")&&n.preventDefault()};st.prototype.isEnabled=function(){return!0};st.prototype.isActive=function(){return!1};st.prototype.enable=function(){};st.prototype.disable=function(){};ft=function(n,t){this._map=n;this._el=n.getCanvasContainer();this._container=n.getContainer();this._clickTolerance=t.clickTolerance||1};ft.prototype.isEnabled=function(){return!!this._enabled};ft.prototype.isActive=function(){return!!this._active};ft.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)};ft.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)};ft.prototype.mousedown=function(n,i){this.isEnabled()&&n.shiftKey&&n.button===0&&(t.disableDrag(),this._startPos=this._lastPos=i,this._active=!0)};ft.prototype.mousemoveWindow=function(n,i){var r,u;if(this._active&&(r=i,!this._lastPos.equals(r)&&(this._box||!(r.dist(this._startPos)<this._clickTolerance)))){u=this._startPos;this._lastPos=r;this._box||(this._box=t.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",n));var f=Math.min(u.x,r.x),o=Math.max(u.x,r.x),e=Math.min(u.y,r.y),s=Math.max(u.y,r.y);t.setTransform(this._box,"translate("+f+"px,"+e+"px)");this._box.style.width=o-f+"px";this._box.style.height=s-e+"px"}};ft.prototype.mouseupWindow=function(i,r){var e=this,u,f;if(this._active&&i.button===0)if(u=this._startPos,f=r,this.reset(),t.suppressClick(),u.x===f.x&&u.y===f.y)this._fireEvent("boxzoomcancel",i);else return this._map.fire(new n.Event("boxzoomend",{originalEvent:i})),{cameraAnimation:function(n){return n.fitScreenCoordinates(u,f,e._map.getBearing(),{linear:!0})}}};ft.prototype.keydown=function(n){this._active&&n.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",n))};ft.prototype.reset=function(){this._active=!1;this._container.classList.remove("mapboxgl-crosshair");this._box&&(t.remove(this._box),this._box=null);t.enableDrag();delete this._startPos;delete this._lastPos};ft.prototype._fireEvent=function(t,i){return this._map.fire(new n.Event(t,{originalEvent:i}))};var ih=500,nd=500,rh=30,pr=function(n){this.reset();this.numTouches=n.numTouches};pr.prototype.reset=function(){delete this.centroid;delete this.startTime;delete this.touches;this.aborted=!1};pr.prototype.touchstart=function(n,t,i){((this.centroid||i.length>this.numTouches)&&(this.aborted=!0),this.aborted)||(this.startTime===undefined&&(this.startTime=n.timeStamp),i.length===this.numTouches&&(this.centroid=gk(t),this.touches=pf(i,t)))};pr.prototype.touchmove=function(n,t,i){var f,r,e,u;if(!this.aborted&&this.centroid){f=pf(i,t);for(r in this.touches)e=this.touches[r],u=f[r],(!u||u.dist(e)>rh)&&(this.aborted=!0)}};pr.prototype.touchend=function(n,t,i){if((!this.centroid||n.timeStamp-this.startTime>nd)&&(this.aborted=!0),i.length===0){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}};dt=function(n){this.singleTap=new pr(n);this.numTaps=n.numTaps;this.reset()};dt.prototype.reset=function(){this.lastTime=Infinity;delete this.lastTap;this.count=0;this.singleTap.reset()};dt.prototype.touchstart=function(n,t,i){this.singleTap.touchstart(n,t,i)};dt.prototype.touchmove=function(n,t,i){this.singleTap.touchmove(n,t,i)};dt.prototype.touchend=function(n,t,i){var r=this.singleTap.touchend(n,t,i),u,f;if(r&&(u=n.timeStamp-this.lastTime<ih,f=!this.lastTap||this.lastTap.dist(r)<rh,u&&f||this.reset(),this.count++,this.lastTime=n.timeStamp,this.lastTap=r,this.count===this.numTaps))return this.reset(),r};ht=function(){this._zoomIn=new dt({numTouches:1,numTaps:2});this._zoomOut=new dt({numTouches:2,numTaps:1});this.reset()};ht.prototype.reset=function(){this._active=!1;this._zoomIn.reset();this._zoomOut.reset()};ht.prototype.touchstart=function(n,t,i){this._zoomIn.touchstart(n,t,i);this._zoomOut.touchstart(n,t,i)};ht.prototype.touchmove=function(n,t,i){this._zoomIn.touchmove(n,t,i);this._zoomOut.touchmove(n,t,i)};ht.prototype.touchend=function(n,t,i){var r=this,u=this._zoomIn.touchend(n,t,i),f=this._zoomOut.touchend(n,t,i);return u?(this._active=!0,n.preventDefault(),setTimeout(function(){return r.reset()},0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(u)},{originalEvent:n})}}):f?(this._active=!0,n.preventDefault(),setTimeout(function(){return r.reset()},0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(f)},{originalEvent:n})}}):void 0};ht.prototype.touchcancel=function(){this.reset()};ht.prototype.enable=function(){this._enabled=!0};ht.prototype.disable=function(){this._enabled=!1;this.reset()};ht.prototype.isEnabled=function(){return this._enabled};ht.prototype.isActive=function(){return this._active};var wu=0,wf=2,bf={};bf[wu]=1;bf[wf]=2;d=function(n){this.reset();this._clickTolerance=n.clickTolerance||1};d.prototype.reset=function(){this._active=!1;this._moved=!1;delete this._lastPoint;delete this._eventButton};d.prototype._correctButton=function(){return!1};d.prototype._move=function(){return{}};d.prototype.mousedown=function(n,i){if(!this._lastPoint){var r=t.mouseButton(n);this._correctButton(n,r)&&(this._lastPoint=i,this._eventButton=r)}};d.prototype.mousemoveWindow=function(n,t){var i=this._lastPoint;if(i){if(n.preventDefault(),td(n,this._eventButton)){this.reset();return}if(this._moved||!(t.dist(i)<this._clickTolerance))return this._moved=!0,this._lastPoint=t,this._move(i,t)}};d.prototype.mouseupWindow=function(n){if(this._lastPoint){var i=t.mouseButton(n);i===this._eventButton&&(this._moved&&t.suppressClick(),this.reset())}};d.prototype.enable=function(){this._enabled=!0};d.prototype.disable=function(){this._enabled=!1;this.reset()};d.prototype.isEnabled=function(){return this._enabled};d.prototype.isActive=function(){return this._active};var id=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.mousedown=function(t,i){n.prototype.mousedown.call(this,t,i);this._lastPoint&&(this._active=!0)},t.prototype._correctButton=function(n,t){return t===wu&&!n.ctrlKey},t.prototype._move=function(n,t){return{around:t,panDelta:t.sub(n)}},t}(d),uh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._correctButton=function(n,t){return t===wu&&n.ctrlKey||t===wf},t.prototype._move=function(n,t){var i=(t.x-n.x)*.8;if(i)return this._active=!0,{bearingDelta:i}},t.prototype.contextmenu=function(n){n.preventDefault()},t}(d),fh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype._correctButton=function(n,t){return t===wu&&n.ctrlKey||t===wf},t.prototype._move=function(n,t){var i=(t.y-n.y)*-.5;if(i)return this._active=!0,{pitchDelta:i}},t.prototype.contextmenu=function(n){n.preventDefault()},t}(d),ct=function(n){this._minTouches=1;this._clickTolerance=n.clickTolerance||1;this.reset()};ct.prototype.reset=function(){this._active=!1;this._touches={};this._sum=new n.Point(0,0)};ct.prototype.touchstart=function(n,t,i){return this._calculateTransform(n,t,i)};ct.prototype.touchmove=function(n,t,i){if(this._active&&!(i.length<this._minTouches))return n.preventDefault(),this._calculateTransform(n,t,i)};ct.prototype.touchend=function(n,t,i){this._calculateTransform(n,t,i);this._active&&i.length<this._minTouches&&this.reset()};ct.prototype.touchcancel=function(){this.reset()};ct.prototype._calculateTransform=function(t,i,r){var e,o,h,c,a;r.length>0&&(this._active=!0);var u=pf(r,i),l=new n.Point(0,0),s=new n.Point(0,0),f=0;for(e in u)o=u[e],h=this._touches[e],h&&(l._add(o),s._add(o.sub(h)),f++,u[e]=o);if(this._touches=u,!(f<this._minTouches)&&s.mag())return(c=s.div(f),this._sum._add(c),this._sum.mag()<this._clickTolerance)?void 0:(a=l.div(f),{around:a,panDelta:c})};ct.prototype.enable=function(){this._enabled=!0};ct.prototype.disable=function(){this._enabled=!1;this.reset()};ct.prototype.isEnabled=function(){return this._enabled};ct.prototype.isActive=function(){return this._active};b=function(){this.reset()};b.prototype.reset=function(){this._active=!1;delete this._firstTwoTouches};b.prototype._start=function(){};b.prototype._move=function(){return{}};b.prototype.touchstart=function(n,t,i){this._firstTwoTouches||i.length<2||(this._firstTwoTouches=[i[0].identifier,i[1].identifier],this._start([t[0],t[1]]))};b.prototype.touchmove=function(n,t,i){var e;if(this._firstTwoTouches){n.preventDefault();var f=this._firstTwoTouches,o=f[0],s=f[1],r=bu(i,t,o),u=bu(i,t,s);if(r&&u)return e=this._aroundCenter?null:r.add(u).div(2),this._move([r,u],e,n)}};b.prototype.touchend=function(n,i,r){if(this._firstTwoTouches){var u=this._firstTwoTouches,f=u[0],e=u[1],o=bu(r,i,f),s=bu(r,i,e);o&&s||(this._active&&t.suppressClick(),this.reset())}};b.prototype.touchcancel=function(){this.reset()};b.prototype.enable=function(n){this._enabled=!0;this._aroundCenter=!!n&&n.around==="center"};b.prototype.disable=function(){this._enabled=!1;this.reset()};b.prototype.isEnabled=function(){return this._enabled};b.prototype.isActive=function(){return this._active};eh=.1;sh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.reset=function(){n.prototype.reset.call(this);delete this._distance;delete this._startDistance},t.prototype._start=function(n){this._startDistance=this._distance=n[0].dist(n[1])},t.prototype._move=function(n,t){var i=this._distance;if(this._distance=n[0].dist(n[1]),this._active||!(Math.abs(oh(this._distance,this._startDistance))<eh))return this._active=!0,{zoomDelta:oh(this._distance,i),pinchAround:t}},t}(b);hh=25;lh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.reset=function(){n.prototype.reset.call(this);delete this._minDiameter;delete this._startVector;delete this._vector},t.prototype._start=function(n){this._startVector=this._vector=n[0].sub(n[1]);this._minDiameter=n[0].dist(n[1])},t.prototype._move=function(n,t){var i=this._vector;if(this._vector=n[0].sub(n[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ch(this._vector,i),pinchAround:t}},t.prototype._isBelowThreshold=function(n){this._minDiameter=Math.min(this._minDiameter,n.mag());var t=Math.PI*this._minDiameter,i=hh/t*360,r=ch(n,this._startVector);return Math.abs(r)<i},t}(b);var rd=100,ud=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.reset=function(){n.prototype.reset.call(this);this._valid=undefined;delete this._firstMove;delete this._lastPoints},t.prototype._start=function(n){this._lastPoints=n;kf(n[0].sub(n[1]))&&(this._valid=!1)},t.prototype._move=function(n,t,i){var r=n[0].sub(this._lastPoints[0]),u=n[1].sub(this._lastPoints[1]),f,e;if(this._valid=this.gestureBeginsVertically(r,u,i.timeStamp),this._valid)return this._lastPoints=n,this._active=!0,f=(r.y+u.y)/2,e=-.5,{pitchDelta:f*e}},t.prototype.gestureBeginsVertically=function(n,t,i){var e;if(this._valid!==undefined)return this._valid;var r=2,u=n.mag()>=r,f=t.mag()>=r;if(u||f)return!u||!f?(this._firstMove===undefined&&(this._firstMove=i),i-this._firstMove<rd?undefined:!1):(e=n.y>0==t.y>0,kf(n)&&kf(t)&&e)},t}(b),fd={panStep:100,bearingStep:15,pitchStep:10},pt=function(){var n=fd;this._panStep=n.panStep;this._bearingStep=n.bearingStep;this._pitchStep=n.pitchStep;this._rotationDisabled=!1};pt.prototype.reset=function(){this._active=!1};pt.prototype.keydown=function(n){var t=this;if(!n.altKey&&!n.ctrlKey&&!n.metaKey){var i=0,r=0,u=0,f=0,e=0;switch(n.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:n.shiftKey?r=-1:(n.preventDefault(),f=-1);break;case 39:n.shiftKey?r=1:(n.preventDefault(),f=1);break;case 38:n.shiftKey?u=1:(n.preventDefault(),e=-1);break;case 40:n.shiftKey?u=-1:(n.preventDefault(),e=1);break;default:return}return this._rotationDisabled&&(r=0,u=0),{cameraAnimation:function(o){var s=o.getZoom();o.easeTo({duration:300,easeId:"keyboardHandler",easing:ed,zoom:i?Math.round(s)+i*(n.shiftKey?2:1):s,bearing:o.getBearing()+r*t._bearingStep,pitch:o.getPitch()+u*t._pitchStep,offset:[-f*t._panStep,-e*t._panStep],center:o.getCenter()},{originalEvent:n})}}}};pt.prototype.enable=function(){this._enabled=!0};pt.prototype.disable=function(){this._enabled=!1;this.reset()};pt.prototype.isEnabled=function(){return this._enabled};pt.prototype.isActive=function(){return this._active};pt.prototype.disableRotation=function(){this._rotationDisabled=!0};pt.prototype.enableRotation=function(){this._rotationDisabled=!1};var ah=4.000244140625,od=1/100,sd=1/450,hd=2,g=function(t,i){this._map=t;this._el=t.getCanvasContainer();this._handler=i;this._delta=0;this._defaultZoomRate=od;this._wheelZoomRate=sd;n.bindAll(["_onTimeout"],this)};g.prototype.setZoomRate=function(n){this._defaultZoomRate=n};g.prototype.setWheelZoomRate=function(n){this._wheelZoomRate=n};g.prototype.isEnabled=function(){return!!this._enabled};g.prototype.isActive=function(){return!!this._active||this._finishTimeout!==undefined};g.prototype.isZooming=function(){return!!this._zooming};g.prototype.enable=function(n){this.isEnabled()||(this._enabled=!0,this._aroundCenter=n&&n.around==="center")};g.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)};g.prototype.wheel=function(t){if(this.isEnabled()){var i=t.deltaMode===n.window.WheelEvent.DOM_DELTA_LINE?t.deltaY*40:t.deltaY,r=n.browser.now(),u=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r;i!==0&&i%ah==0?this._type="wheel":i!==0&&Math.abs(i)<4?this._type="trackpad":u>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(u*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue));t.shiftKey&&i&&(i=i/4);this._type&&(this._lastWheelEvent=t,this._delta-=i,this._active||this._start(t));t.preventDefault()}};g.prototype._onTimeout=function(n){this._type="wheel";this._delta-=this._lastValue;this._active||this._start(n)};g.prototype._start=function(i){if(this._delta){this._frameId&&(this._frameId=null);this._active=!0;this.isZooming()||(this._zooming=!0);this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=t.mousePos(this._el,i);this._around=n.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r));this._aroundPoint=this._map.transform.locationPoint(this._around);this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}};g.prototype.renderFrame=function(){var r=this,t,o,i,s,e,a;if(this._frameId&&(this._frameId=null,this.isActive())){t=this._map.transform;this._delta!==0&&(o=this._type==="wheel"&&Math.abs(this._delta)>ah?this._wheelZoomRate:this._defaultZoomRate,i=hd/(1+Math.exp(-Math.abs(this._delta*o))),this._delta<0&&i!==0&&(i=1/i),s=typeof this._targetZoom=="number"?t.zoomScale(this._targetZoom):t.scale,this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(s*i))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0);var h=typeof this._targetZoom=="number"?this._targetZoom:t.zoom,c=this._startZoom,l=this._easing,u=!1,f;return this._type==="wheel"&&c&&l?(e=Math.min((n.browser.now()-this._lastWheelEventTime)/200,1),a=l(e),f=n.number(c,h,a),e<1?this._frameId||(this._frameId=!0):u=!0):(f=h,u=!0),this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout(function(){r._zooming=!1;r._handler._triggerRenderFrame();delete r._targetZoom;delete r._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:f-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}};g.prototype._smoothOutEasing=function(t){var r=n.ease;if(this._prevEase){var i=this._prevEase,f=(n.browser.now()-i.start)/i.duration,e=i.easing(f+.01)-i.easing(f),u=.27/Math.sqrt(e*e+.0001)*.01,o=Math.sqrt(.27*.27-u*u);r=n.bezier(u,o,.25,1)}return this._prevEase={start:n.browser.now(),duration:t,easing:r},r};g.prototype.reset=function(){this._active=!1};pi=function(n,t){this._clickZoom=n;this._tapZoom=t};pi.prototype.enable=function(){this._clickZoom.enable();this._tapZoom.enable()};pi.prototype.disable=function(){this._clickZoom.disable();this._tapZoom.disable()};pi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()};pi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};gt=function(){this.reset()};gt.prototype.reset=function(){this._active=!1};gt.prototype.dblclick=function(n,t){return n.preventDefault(),{cameraAnimation:function(i){i.easeTo({duration:300,zoom:i.getZoom()+(n.shiftKey?-1:1),around:i.unproject(t)},{originalEvent:n})}}};gt.prototype.enable=function(){this._enabled=!0};gt.prototype.disable=function(){this._enabled=!1;this.reset()};gt.prototype.isEnabled=function(){return this._enabled};gt.prototype.isActive=function(){return this._active};lt=function(){this._tap=new dt({numTouches:1,numTaps:1});this.reset()};lt.prototype.reset=function(){this._active=!1;delete this._swipePoint;delete this._swipeTouch;delete this._tapTime;this._tap.reset()};lt.prototype.touchstart=function(n,t,i){this._swipePoint||(this._tapTime&&n.timeStamp-this._tapTime>ih&&this.reset(),this._tapTime?i.length>0&&(this._swipePoint=t[0],this._swipeTouch=i[0].identifier):this._tap.touchstart(n,t,i))};lt.prototype.touchmove=function(n,t,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;var r=t[0],u=r.y-this._swipePoint.y;return this._swipePoint=r,n.preventDefault(),this._active=!0,{zoomDelta:u/128}}}else this._tap.touchmove(n,t,i)};lt.prototype.touchend=function(n,t,i){if(this._tapTime)this._swipePoint&&i.length===0&&this.reset();else{var r=this._tap.touchend(n,t,i);r&&(this._tapTime=n.timeStamp)}};lt.prototype.touchcancel=function(){this.reset()};lt.prototype.enable=function(){this._enabled=!0};lt.prototype.disable=function(){this._enabled=!1;this.reset()};lt.prototype.isEnabled=function(){return this._enabled};lt.prototype.isActive=function(){return this._active};wi=function(n,t,i){this._el=n;this._mousePan=t;this._touchPan=i};wi.prototype.enable=function(n){this._inertiaOptions=n||{};this._mousePan.enable();this._touchPan.enable();this._el.classList.add("mapboxgl-touch-drag-pan")};wi.prototype.disable=function(){this._mousePan.disable();this._touchPan.disable();this._el.classList.remove("mapboxgl-touch-drag-pan")};wi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()};wi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};bi=function(n,t,i){this._pitchWithRotate=n.pitchWithRotate;this._mouseRotate=t;this._mousePitch=i};bi.prototype.enable=function(){this._mouseRotate.enable();this._pitchWithRotate&&this._mousePitch.enable()};bi.prototype.disable=function(){this._mouseRotate.disable();this._mousePitch.disable()};bi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())};bi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};ni=function(n,t,i,r){this._el=n;this._touchZoom=t;this._touchRotate=i;this._tapDragZoom=r;this._rotationDisabled=!1;this._enabled=!0};ni.prototype.enable=function(n){this._touchZoom.enable(n);this._rotationDisabled||this._touchRotate.enable(n);this._tapDragZoom.enable();this._el.classList.add("mapboxgl-touch-zoom-rotate")};ni.prototype.disable=function(){this._touchZoom.disable();this._touchRotate.disable();this._tapDragZoom.disable();this._el.classList.remove("mapboxgl-touch-zoom-rotate")};ni.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()};ni.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()};ni.prototype.disableRotation=function(){this._rotationDisabled=!0;this._touchRotate.disable()};ni.prototype.enableRotation=function(){this._rotationDisabled=!1;this._touchZoom.isEnabled()&&this._touchRotate.enable()};wr=function(n){return n.zoom||n.drag||n.pitch||n.rotate};vh=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(n.Event);a=function(i,r){var u,f,e;for(this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new yr(i),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),n.bindAll(["handleEvent","handleWindowEvent"],this),u=this._el,this._listeners=[[u,"touchstart",{passive:!0}],[u,"touchmove",{passive:!1}],[u,"touchend",undefined],[u,"touchcancel",undefined],[u,"mousedown",undefined],[u,"mousemove",undefined],[u,"mouseup",undefined],[n.window.document,"mousemove",{capture:!0}],[n.window.document,"mouseup",undefined],[u,"mouseover",undefined],[u,"mouseout",undefined],[u,"dblclick",undefined],[u,"click",undefined],[u,"keydown",{capture:!1}],[u,"keyup",undefined],[u,"wheel",{passive:!1}],[u,"contextmenu",undefined],[n.window,"blur",undefined]],f=0,e=this._listeners;f<e.length;f+=1){var o=e[f],s=o[0],h=o[1],c=o[2];t.addEventListener(s,h,s===n.window.document?this.handleWindowEvent:this.handleEvent,c)}};a.prototype.destroy=function(){for(var i=0,r=this._listeners;i<r.length;i+=1){var u=r[i],f=u[0],e=u[1],o=u[2];t.removeEventListener(f,e,f===n.window.document?this.handleWindowEvent:this.handleEvent,o)}};a.prototype._addDefaultHandlers=function(n){var t=this._map,y=t.getCanvasContainer(),w,u,f,e,b,o,s,h,c,l,a,k,d,i,v,r;for(this._add("mapEvent",new p(t,n)),w=t.boxZoom=new ft(t,n),this._add("boxZoom",w),u=new ht,f=new gt,t.doubleClickZoom=new pi(f,u),this._add("tapZoom",u),this._add("clickZoom",f),e=new lt,this._add("tapDragZoom",e),b=t.touchPitch=new ud,this._add("touchPitch",b),o=new uh(n),s=new fh(n),t.dragRotate=new bi(n,o,s),this._add("mouseRotate",o,["mousePitch"]),this._add("mousePitch",s,["mouseRotate"]),h=new id(n),c=new ct(n),t.dragPan=new wi(y,h,c),this._add("mousePan",h),this._add("touchPan",c,["touchZoom","touchRotate"]),l=new lh,a=new sh,t.touchZoomRotate=new ni(y,a,l,e),this._add("touchRotate",l,["touchPan","touchZoom"]),this._add("touchZoom",a,["touchPan","touchRotate"]),k=t.scrollZoom=new g(t,this),this._add("scrollZoom",k,["mousePan"]),d=t.keyboard=new pt,this._add("keyboard",d),this._add("blockableMapEvent",new st(t)),i=0,v=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];i<v.length;i+=1)r=v[i],n.interactive&&n[r]&&t[r].enable(n[r])};a.prototype._add=function(n,t,i){this._handlers.push({handlerName:n,handler:t,allowed:i});this._handlersById[n]=t};a.prototype.stop=function(n){var t,i,r,u;if(!this._updatingCamera){for(t=0,i=this._handlers;t<i.length;t+=1)r=i[t],u=r.handler,u.reset();this._inertia.clear();this._fireEvents({},{},n);this._changes=[]}};a.prototype.isActive=function(){for(var i,r,n=0,t=this._handlers;n<t.length;n+=1)if(i=t[n],r=i.handler,r.isActive())return!0;return!1};a.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()};a.prototype.isRotating=function(){return!!this._eventsInProgress.rotate};a.prototype.isMoving=function(){return Boolean(wr(this._eventsInProgress))||this.isZooming()};a.prototype._blockedByActive=function(n,t,i){for(var r in n)if(r!==i&&(!t||t.indexOf(r)<0))return!0;return!1};a.prototype.handleWindowEvent=function(n){this.handleEvent(n,n.type+"Window")};a.prototype._getMapTouches=function(n){for(var i,f,r=[],t=0,u=n;t<u.length;t+=1)i=u[t],f=i.target,this._el.contains(f)&&r.push(i);return r};a.prototype.handleEvent=function(n,i){var o,c,u,s,v,y;if(n.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;var p=n.type==="renderFrame"?undefined:n,f={needsRenderFrame:!1},w={},e={},h=n.touches?this._getMapTouches(n.touches):undefined,b=h?t.touchPos(this._el,h):t.mousePos(this._el,n);for(o=0,c=this._handlers;o<c.length;o+=1){var l=c[o],a=l.handlerName,r=l.handler,k=l.allowed;r.isEnabled()&&(u=void 0,this._blockedByActive(e,k,a)?r.reset():r[i||n.type]&&(u=r[i||n.type](n,b,h),this.mergeHandlerResult(f,w,u,a,p),u&&u.needsRenderFrame&&this._triggerRenderFrame()),(u||r.isActive())&&(e[a]=r))}s={};for(v in this._previousActiveHandlers)e[v]||(s[v]=p);this._previousActiveHandlers=e;(Object.keys(s).length||df(f))&&(this._changes.push([f,w,s]),this._triggerRenderFrame());(Object.keys(e).length||df(f))&&this._map._stop(!0);this._updatingCamera=!1;y=f.cameraAnimation;y&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],y(this._map))};a.prototype.mergeHandlerResult=function(t,i,r,u,f){if(r){n.extend(t,r);var e={handlerName:u,originalEvent:r.originalEvent||f};r.zoomDelta!==undefined&&(i.zoom=e);r.panDelta!==undefined&&(i.drag=e);r.pitchDelta!==undefined&&(i.pitch=e);r.bearingDelta!==undefined&&(i.rotate=e)}};a.prototype._applyChanges=function(){for(var i={},f={},e={},r=0,o=this._changes;r<o.length;r+=1){var u=o[r],t=u[0],s=u[1],h=u[2];t.panDelta&&(i.panDelta=(i.panDelta||new n.Point(0,0))._add(t.panDelta));t.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+t.zoomDelta);t.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+t.bearingDelta);t.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+t.pitchDelta);t.around!==undefined&&(i.around=t.around);t.pinchAround!==undefined&&(i.pinchAround=t.pinchAround);t.noInertia&&(i.noInertia=t.noInertia);n.extend(f,s);n.extend(e,h)}this._updateMapTransform(i,f,e);this._changes=[]};a.prototype._updateMapTransform=function(n,t,i){var f=this._map,u=f.transform,l;if(!df(n))return this._fireEvents(t,i,!0);var e=n.panDelta,o=n.zoomDelta,s=n.bearingDelta,h=n.pitchDelta,r=n.around,c=n.pinchAround;c!==undefined&&(r=c);f._stop(!0);r=r||f.transform.centerPoint;l=u.pointLocation(e?r.sub(e):r);s&&(u.bearing+=s);h&&(u.pitch+=h);o&&(u.zoom+=o);u.setLocationAtPoint(l,r);this._map._update();n.noInertia||this._inertia.record(n);this._fireEvents(t,i,!0)};a.prototype._fireEvents=function(t,i,r){var p=this,w=wr(this._eventsInProgress),f=wr(t),c={},u,b,k,l,a,d,g,o,s,h,v,it,e,y;for(u in t)b=t[u],k=b.originalEvent,this._eventsInProgress[u]||(c[u+"start"]=k),this._eventsInProgress[u]=t[u];!w&&f&&this._fireEvent("movestart",f.originalEvent);for(l in c)this._fireEvent(l,c[l]);f&&this._fireEvent("move",f.originalEvent);for(a in t)d=t[a],g=d.originalEvent,this._fireEvent(a,g);o={};for(h in this._eventsInProgress){var nt=this._eventsInProgress[h],tt=nt.handlerName,rt=nt.originalEvent;this._handlersById[tt].isActive()||(delete this._eventsInProgress[h],s=i[tt]||rt,o[h+"end"]=s)}for(v in o)this._fireEvent(v,o[v]);it=wr(this._eventsInProgress);r&&(w||f)&&!it&&(this._updatingCamera=!0,e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),y=function(n){return n!==0&&-p._bearingSnap<n&&n<p._bearingSnap},e?(y(e.bearing||this._map.getBearing())&&(e.bearing=0),this._map.easeTo(e,{originalEvent:s})):(this._map.fire(new n.Event("moveend",{originalEvent:s})),y(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1)};a.prototype._fireEvent=function(t,i){this._map.fire(new n.Event(t,i?{originalEvent:i}:{}))};a.prototype._requestFrame=function(){var n=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(t){delete n._frameId;n.handleEvent(new vh("renderFrame",{timeStamp:t}));n._applyChanges()})};a.prototype._triggerRenderFrame=function(){this._frameId===undefined&&(this._frameId=this._requestFrame())};yh=function(t){function i(i,r){t.call(this);this._moving=!1;this._zooming=!1;this.transform=i;this._bearingSnap=r.bearingSnap;n.bindAll(["_renderFrameCallback"],this)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getCenter=function(){return new n.LngLat(this.transform.center.lng,this.transform.center.lat)},i.prototype.setCenter=function(n,t){return this.jumpTo({center:n},t)},i.prototype.panBy=function(t,i,r){return t=n.Point.convert(t).mult(-1),this.panTo(this.transform.center,n.extend({offset:t},i),r)},i.prototype.panTo=function(t,i,r){return this.easeTo(n.extend({center:t},i),r)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(n,t){return this.jumpTo({zoom:n},t),this},i.prototype.zoomTo=function(t,i,r){return this.easeTo(n.extend({zoom:t},i),r)},i.prototype.zoomIn=function(n,t){return this.zoomTo(this.getZoom()+1,n,t),this},i.prototype.zoomOut=function(n,t){return this.zoomTo(this.getZoom()-1,n,t),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(n,t){return this.jumpTo({bearing:n},t),this},i.prototype.getPadding=function(){return this.transform.padding},i.prototype.setPadding=function(n,t){return this.jumpTo({padding:n},t),this},i.prototype.rotateTo=function(t,i,r){return this.easeTo(n.extend({bearing:t},i),r)},i.prototype.resetNorth=function(t,i){return this.rotateTo(0,n.extend({duration:1e3},t),i),this},i.prototype.resetNorthPitch=function(t,i){return this.easeTo(n.extend({bearing:0,pitch:0,duration:1e3},t),i),this},i.prototype.snapToNorth=function(n,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(n,t):this},i.prototype.getPitch=function(){return this.transform.pitch},i.prototype.setPitch=function(n,t){return this.jumpTo({pitch:n},t),this},i.prototype.cameraForBounds=function(t,i){t=n.LngLatBounds.convert(t);var r=i&&i.bearing||0;return this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),r,i)},i.prototype._cameraForBoxAndBearing=function(t,i,r,u){var c={top:0,bottom:0,right:0,left:0},e;u=n.extend({padding:c,offset:[0,0],maxZoom:this.transform.maxZoom},u);typeof u.padding=="number"&&(e=u.padding,u.padding={top:e,bottom:e,right:e,left:e});u.padding=n.extend(c,u.padding);var f=this.transform,o=f.padding,l=f.project(n.LngLat.convert(t)),a=f.project(n.LngLat.convert(i)),s=l.rotate(-r*Math.PI/180),h=a.rotate(-r*Math.PI/180),b=new n.Point(Math.max(s.x,h.x),Math.max(s.y,h.y)),k=new n.Point(Math.min(s.x,h.x),Math.min(s.y,h.y)),v=b.sub(k),y=(f.width-(o.left+o.right+u.padding.left+u.padding.right))/v.x,p=(f.height-(o.top+o.bottom+u.padding.top+u.padding.bottom))/v.y;if(p<0||y<0){n.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var w=Math.min(f.scaleZoom(f.scale*Math.min(y,p)),u.maxZoom),d=typeof u.offset.x=="number"?new n.Point(u.offset.x,u.offset.y):n.Point.convert(u.offset),g=(u.padding.left-u.padding.right)/2,nt=(u.padding.top-u.padding.bottom)/2,tt=new n.Point(g,nt),it=tt.rotate(r*Math.PI/180),rt=d.add(it),ut=rt.mult(f.scale/f.zoomScale(w)),ft=f.unproject(l.add(a).div(2).sub(ut));return{center:ft,zoom:w,bearing:r}},i.prototype.fitBounds=function(n,t,i){return this._fitInternal(this.cameraForBounds(n,t),t,i)},i.prototype.fitScreenCoordinates=function(t,i,r,u,f){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.Point.convert(t)),this.transform.pointLocation(n.Point.convert(i)),r,u),u,f)},i.prototype._fitInternal=function(t,i,r){return t?(i=n.extend(t,i),delete i.padding,i.linear?this.easeTo(i,r):this.flyTo(i,r)):this},i.prototype.jumpTo=function(t,i){this.stop();var r=this.transform,u=!1,f=!1,e=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(u=!0,r.zoom=+t.zoom),t.center!==undefined&&(r.center=n.LngLat.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(f=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(e=!0,r.pitch=+t.pitch),t.padding==null||r.isPaddingEqual(t.padding)||(r.padding=t.padding),this.fire(new n.Event("movestart",i)).fire(new n.Event("move",i)),u&&this.fire(new n.Event("zoomstart",i)).fire(new n.Event("zoom",i)).fire(new n.Event("zoomend",i)),f&&this.fire(new n.Event("rotatestart",i)).fire(new n.Event("rotate",i)).fire(new n.Event("rotateend",i)),e&&this.fire(new n.Event("pitchstart",i)).fire(new n.Event("pitch",i)).fire(new n.Event("pitchend",i)),this.fire(new n.Event("moveend",i))},i.prototype.easeTo=function(t,i){var u=this,g;this._stop(!1,t.easeId);t=n.extend({offset:[0,0],duration:500,easing:n.ease},t);(t.animate===!1||!t.essential&&n.browser.prefersReducedMotion)&&(t.duration=0);var r=this.transform,f=this.getZoom(),e=this.getBearing(),h=this.getPitch(),nt=this.getPadding(),o="zoom"in t?+t.zoom:f,l="bearing"in t?this._normalizeBearing(t.bearing,e):e,a="pitch"in t?+t.pitch:h,v="padding"in t?t.padding:r.padding,y=n.Point.convert(t.offset),c=r.centerPoint.add(y),p=r.pointLocation(c),w=n.LngLat.convert(t.center||p);this._normalizeCenter(w);var b=r.project(p),tt=r.project(w).sub(b),k=r.zoomScale(o-f),s,d;return t.around&&(s=n.LngLat.convert(t.around),d=r.locationPoint(s)),g={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching},this._zooming=this._zooming||o!==f,this._rotating=this._rotating||e!==l,this._pitching=this._pitching||a!==h,this._padding=!r.isPaddingEqual(v),this._easeId=t.easeId,this._prepareEase(i,t.noMoveStart,g),this._ease(function(t){if(u._zooming&&(r.zoom=n.number(f,o,t)),u._rotating&&(r.bearing=n.number(e,l,t)),u._pitching&&(r.pitch=n.number(h,a,t)),u._padding&&(r.interpolatePadding(nt,v,t),c=r.centerPoint.add(y)),s)r.setLocationAtPoint(s,d);else{var w=r.zoomScale(r.zoom-f),g=o>f?Math.min(2,k):Math.max(.5,k),it=Math.pow(g,1-t),p=r.unproject(b.add(tt.mult(t*it)).mult(w));r.setLocationAtPoint(r.renderWorldCopies?p.wrap():p,c)}u._fireMoveEvents(i)},function(n){u._afterEase(i,n)},t),this},i.prototype._prepareEase=function(t,i,r){r===void 0&&(r={});this._moving=!0;i||r.moving||this.fire(new n.Event("movestart",t));this._zooming&&!r.zooming&&this.fire(new n.Event("zoomstart",t));this._rotating&&!r.rotating&&this.fire(new n.Event("rotatestart",t));this._pitching&&!r.pitching&&this.fire(new n.Event("pitchstart",t))},i.prototype._fireMoveEvents=function(t){this.fire(new n.Event("move",t));this._zooming&&this.fire(new n.Event("zoom",t));this._rotating&&this.fire(new n.Event("rotate",t));this._pitching&&this.fire(new n.Event("pitch",t))},i.prototype._afterEase=function(t,i){if(!this._easeId||!i||this._easeId!==i){delete this._easeId;var r=this._zooming,u=this._rotating,f=this._pitching;this._moving=!1;this._zooming=!1;this._rotating=!1;this._pitching=!1;this._padding=!1;r&&this.fire(new n.Event("zoomend",t));u&&this.fire(new n.Event("rotateend",t));f&&this.fire(new n.Event("pitchend",t));this.fire(new n.Event("moveend",t))}},i.prototype.flyTo=function(t,i){function st(n){var t=(e*e-f*f+(n?-1:1)*l*l*o*o)/(2*(n?e:f)*l*o);return Math.log(Math.sqrt(t*t+1)-t)}function ht(n){return(Math.exp(n)-Math.exp(-n))/2}function v(n){return(Math.exp(n)+Math.exp(-n))/2}function wt(n){return ht(n)/v(n)}var h=this,d,et,ot,l,at,vt;if(!t.essential&&n.browser.prefersReducedMotion)return d=n.pick(t,["center","zoom","bearing","pitch","around"]),this.jumpTo(d,i);this.stop();t=n.extend({offset:[0,0],speed:1.2,curve:1.42,easing:n.ease},t);var r=this.transform,c=this.getZoom(),a=this.getBearing(),p=this.getPitch(),yt=this.getPadding(),w="zoom"in t?n.clamp(+t.zoom,r.minZoom,r.maxZoom):c,g="bearing"in t?this._normalizeBearing(t.bearing,a):a,nt="pitch"in t?+t.pitch:p,tt="padding"in t?t.padding:r.padding,pt=r.zoomScale(w-c),it=n.Point.convert(t.offset),b=r.centerPoint.add(it),rt=r.pointLocation(b),k=n.LngLat.convert(t.center||rt);this._normalizeCenter(k);var ut=r.project(rt),ft=r.project(k).sub(ut),u=t.curve,f=Math.max(r.width,r.height),e=f/pt,o=ft.mag();"minZoom"in t&&(et=n.clamp(Math.min(t.minZoom,c,w),r.minZoom,r.maxZoom),ot=f/r.zoomScale(et-c),u=Math.sqrt(ot/o*2));l=u*u;var s=st(0),ct=function(n){return v(s)/v(s+u*n)},lt=function(n){return f*((v(s)*wt(s+u*n)-ht(s))/l)/o},y=(st(1)-s)/u;if(Math.abs(o)<1e-6||!isFinite(y)){if(Math.abs(f-e)<1e-6)return this.easeTo(t,i);at=e<f?-1:1;y=Math.abs(Math.log(e/f))/u;lt=function(){return 0};ct=function(n){return Math.exp(at*u*n)}}return"duration"in t?t.duration=+t.duration:(vt="screenSpeed"in t?+t.screenSpeed/u:+t.speed,t.duration=1e3*y/vt),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=a!==g,this._pitching=nt!==p,this._padding=!r.isPaddingEqual(tt),this._prepareEase(i,!1),this._ease(function(t){var f=t*y,e=1/ct(f),u;r.zoom=t===1?w:c+r.scaleZoom(e);h._rotating&&(r.bearing=n.number(a,g,t));h._pitching&&(r.pitch=n.number(p,nt,t));h._padding&&(r.interpolatePadding(yt,tt,t),b=r.centerPoint.add(it));u=t===1?k:r.unproject(ut.add(ft.mult(lt(f))).mult(e));r.setLocationAtPoint(r.renderWorldCopies?u.wrap():u,b);h._fireMoveEvents(i)},function(){return h._afterEase(i)},t),this},i.prototype.isEasing=function(){return!!this._easeFrameId},i.prototype.stop=function(){return this._stop()},i.prototype._stop=function(n,t){var r,i;return this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd&&(r=this._onEaseEnd,delete this._onEaseEnd,r.call(this,t)),n||(i=this.handlers,i&&i.stop(!1)),this},i.prototype._ease=function(t,i,r){r.animate===!1||r.duration===0?(t(1),i()):(this._easeStart=n.browser.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},i.prototype._renderFrameCallback=function(){var t=Math.min((n.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t));t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},i.prototype._normalizeBearing=function(t,i){t=n.wrap(t,-180,180);var r=Math.abs(t-i);return Math.abs(t-360-i)<r&&(t-=360),Math.abs(t+360-i)<r&&(t+=360),t},i.prototype._normalizeCenter=function(n){var t=this.transform,i;t.renderWorldCopies&&!t.lngRange&&(i=n.lng-t.center.lng,n.lng+=i>180?-360:i<-180?360:0)},i}(n.Evented);et=function(t){t===void 0&&(t={});this.options=t;n.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};et.prototype.getDefaultPosition=function(){return"bottom-right"};et.prototype.onAdd=function(n){var i=this.options&&this.options.compact;this._map=n;this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib");this._compactButton=t.create("button","mapboxgl-ctrl-attrib-button",this._container);this._compactButton.addEventListener("click",this._toggleAttribution);this._setElementTitle(this._compactButton,"ToggleAttribution");this._innerContainer=t.create("div","mapboxgl-ctrl-attrib-inner",this._container);this._innerContainer.setAttribute("role","list");i&&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);if(i===undefined){this._map.on("resize",this._updateCompact);this._updateCompact()}return this._container};et.prototype.onRemove=function(){t.remove(this._container);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=undefined;this._attribHTML=undefined};et.prototype._setElementTitle=function(n,t){var i=this._map._getUIString("AttributionControl."+t);n.title=i;n.setAttribute("aria-label",i)};et.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))};et.prototype._updateEditLink=function(){var t=this._editLink,i,r;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));i=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||n.config.ACCESS_TOKEN}];t&&(r=i.reduce(function(n,t,r){return t.value&&(n+=t.key+"="+t.value+(r<i.length-1?"&":"")),n},"?"),t.href=n.config.FEEDBACK_URL+"/"+r+(this._map._hash?this._map._hash.getHashString(!0):""),t.rel="noopener nofollow",this._setElementTitle(t,"MapFeedback"))};et.prototype._updateData=function(n){n&&(n.sourceDataType==="metadata"||n.sourceDataType==="visibility"||n.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())};et.prototype._updateAttributions=function(){var n,r,u,e,f,t,i;if(this._map.style){n=[];this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?n=n.concat(this.options.customAttribution.map(function(n){return typeof n!="string"?"":n})):typeof this.options.customAttribution=="string"&&n.push(this.options.customAttribution));this._map.style.stylesheet&&(r=this._map.style.stylesheet,this.styleOwner=r.owner,this.styleId=r.id);u=this._map.style.sourceCaches;for(e in u)f=u[e],f.used&&(t=f.getSource(),t.attribution&&n.indexOf(t.attribution)<0&&n.push(t.attribution));(n.sort(function(n,t){return n.length-t.length}),n=n.filter(function(t,i){for(var r=i+1;r<n.length;r++)if(n[r].indexOf(t)>=0)return!1;return!0}),i=n.join(" | "),i!==this._attribHTML)&&(this._attribHTML=i,n.length?(this._innerContainer.innerHTML=i,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}};et.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};ti=function(){n.bindAll(["_updateLogo"],this);n.bindAll(["_updateCompact"],this)};ti.prototype.onAdd=function(n){this._map=n;this._container=t.create("div","mapboxgl-ctrl");var i=t.create("a","mapboxgl-ctrl-logo");i.target="_blank";i.rel="noopener nofollow";i.href="https://www.mapbox.com/";i.setAttribute("aria-label",this._map._getUIString("LogoControl.Title"));i.setAttribute("rel","noopener nofollow");this._container.appendChild(i);this._container.style.display="none";this._map.on("sourcedata",this._updateLogo);this._updateLogo();this._map.on("resize",this._updateCompact);return this._updateCompact(),this._container};ti.prototype.onRemove=function(){t.remove(this._container);this._map.off("sourcedata",this._updateLogo);this._map.off("resize",this._updateCompact)};ti.prototype.getDefaultPosition=function(){return"bottom-left"};ti.prototype._updateLogo=function(n){n&&n.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")};ti.prototype._logoRequired=function(){var n,t,i;if(this._map.style){n=this._map.style.sourceCaches;for(t in n)if(i=n[t].getSource(),i.mapbox_logo)return!0;return!1}};ti.prototype._updateCompact=function(){var t=this._container.children,n;t.length&&(n=t[0],this._map.getCanvasContainer().offsetWidth<250?n.classList.add("mapboxgl-compact"):n.classList.remove("mapboxgl-compact"))};ki=function(){this._queue=[];this._id=0;this._cleared=!1;this._currentlyRunning=!1};ki.prototype.add=function(n){var t=++this._id,i=this._queue;return i.push({callback:n,id:t,cancelled:!1}),t};ki.prototype.remove=function(n){for(var i,r=this._currentlyRunning,f=r?this._queue.concat(r):this._queue,t=0,u=f;t<u.length;t+=1)if(i=u[t],i.id===n){i.cancelled=!0;return}};ki.prototype.run=function(n){var u,t,i,r;for(n===void 0&&(n=0),u=this._currentlyRunning=this._queue,this._queue=[],t=0,i=u;t<i.length;t+=1)if((r=i[t],!r.cancelled)&&(r.callback(n),this._cleared))break;this._cleared=!1;this._currentlyRunning=!1};ki.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0);this._queue=[]};var cd={"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","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},gf=n.window.HTMLImageElement,ld=n.window.HTMLElement,di=n.window.ImageBitmap,ku=-2,ph=22,ii=0,gi=60,ad={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:ku,maxZoom:ph,minPitch:ii,maxPitch:gi,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},vd=function(i){function r(t){var r=this,u,e;if(t=n.extend({},ad,t),t.minZoom!=null&&t.maxZoom!=null&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(t.minPitch!=null&&t.maxPitch!=null&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(t.minPitch!=null&&t.minPitch<ii)throw new Error("minPitch must be greater than or equal to "+ii);if(t.maxPitch!=null&&t.maxPitch>gi)throw new Error("maxPitch must be less than or equal to "+gi);if(u=new f(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),i.call(this,u,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new ki,this._controls=[],this._mapId=n.uniqueId(),this._locale=n.extend({},cd,t.locale),this._clickTolerance=t.clickTolerance,this._requestManager=new n.RequestManager(t.transformRequest,t.accessToken),typeof t.container=="string"){if(this._container=n.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.");}else if(t.container instanceof ld)this._container=t.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(t.maxBounds&&this.setMaxBounds(t.maxBounds),n.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===undefined)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return r._update(!1)});this.on("moveend",function(){return r._update(!1)});this.on("zoom",function(){return r._update(!0)});typeof n.window!="undefined"&&(n.window.addEventListener("online",this._onWindowOnline,!1),n.window.addEventListener("resize",this._onWindowResize,!1),n.window.addEventListener("orientationchange",this._onWindowResize,!1));this.handlers=new a(this,t);e=typeof t.hash=="string"&&t.hash||undefined;this._hash=t.hash&&new kt(e).addTo(this);this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,n.extend({},t.fitBoundsOptions,{duration:0}))));this.resize();this._localIdeographFontFamily=t.localIdeographFontFamily;t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily});t.attributionControl&&this.addControl(new et({customAttribution:t.customAttribution}));this.addControl(new ti,t.logoPosition);this.on("style.load",function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)});this.on("data",function(t){r._update(t.dataType==="style");r.fire(new n.Event(t.dataType+"data",t))});this.on("dataloading",function(t){r.fire(new n.Event(t.dataType+"dataloading",t))})}i&&(r.__proto__=i);r.prototype=Object.create(i&&i.prototype);r.prototype.constructor=r;var u={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return r.prototype._getMapId=function(){return this._mapId},r.prototype.addControl=function(t,i){var u,r;return(i===undefined&&(i=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)?this.fire(new n.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods."))):(u=t.onAdd(this),this._controls.push(t),r=this._controlPositions[i],i.indexOf("bottom")!==-1?r.insertBefore(u,r.firstChild):r.appendChild(u),this)},r.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new n.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var i=this._controls.indexOf(t);i>-1&&this._controls.splice(i,1);t.onRemove(this);return this},r.prototype.hasControl=function(n){return this._controls.indexOf(n)>-1},r.prototype.resize=function(t){var f=this._containerDimensions(),i=f[0],r=f[1],u;return this._resizeCanvas(i,r),this.transform.resize(i,r),this.painter.resize(i,r),u=!this._moving,u&&(this.stop(),this.fire(new n.Event("movestart",t)).fire(new n.Event("move",t))),this.fire(new n.Event("resize",t)),u&&this.fire(new n.Event("moveend",t)),this},r.prototype.getBounds=function(){return this.transform.getBounds()},r.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},r.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(n.LngLatBounds.convert(t)),this._update()},r.prototype.setMinZoom=function(n){if(n=n===null||n===undefined?ku:n,n>=ku&&n<=this.transform.maxZoom)return this.transform.minZoom=n,this._update(),this.getZoom()<n&&this.setZoom(n),this;throw new Error("minZoom must be between "+ku+" and the current maxZoom, inclusive");},r.prototype.getMinZoom=function(){return this.transform.minZoom},r.prototype.setMaxZoom=function(n){if(n=n===null||n===undefined?ph:n,n>=this.transform.minZoom)return this.transform.maxZoom=n,this._update(),this.getZoom()>n&&this.setZoom(n),this;throw new Error("maxZoom must be greater than the current minZoom");},r.prototype.getMaxZoom=function(){return this.transform.maxZoom},r.prototype.setMinPitch=function(n){if(n=n===null||n===undefined?ii:n,n<ii)throw new Error("minPitch must be greater than or equal to "+ii);if(n>=ii&&n<=this.transform.maxPitch)return this.transform.minPitch=n,this._update(),this.getPitch()<n&&this.setPitch(n),this;throw new Error("minPitch must be between "+ii+" and the current maxPitch, inclusive");},r.prototype.getMinPitch=function(){return this.transform.minPitch},r.prototype.setMaxPitch=function(n){if(n=n===null||n===undefined?gi:n,n>gi)throw new Error("maxPitch must be less than or equal to "+gi);if(n>=this.transform.minPitch)return this.transform.maxPitch=n,this._update(),this.getPitch()>n&&this.setPitch(n),this;throw new Error("maxPitch must be greater than the current minPitch");},r.prototype.getMaxPitch=function(){return this.transform.maxPitch},r.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},r.prototype.setRenderWorldCopies=function(n){return this.transform.renderWorldCopies=n,this._update()},r.prototype.project=function(t){return this.transform.locationPoint(n.LngLat.convert(t))},r.prototype.unproject=function(t){return this.transform.pointLocation(n.Point.convert(t))},r.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},r.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},r.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},r.prototype._createDelegatedListener=function(n,t,i){var r=this,e,o;if(n==="mouseenter"||n==="mouseover"){var f=!1,s=function(u){var e=r.getLayer(t)?r.queryRenderedFeatures(u.point,{layers:[t]}):[];e.length?f||(f=!0,i.call(r,new ut(n,r,u.originalEvent,{features:e}))):f=!1},h=function(){f=!1};return{layer:t,listener:i,delegates:{mousemove:s,mouseout:h}}}if(n==="mouseleave"||n==="mouseout"){var u=!1,c=function(f){var e=r.getLayer(t)?r.queryRenderedFeatures(f.point,{layers:[t]}):[];e.length?u=!0:u&&(u=!1,i.call(r,new ut(n,r,f.originalEvent)))},l=function(t){u&&(u=!1,i.call(r,new ut(n,r,t.originalEvent)))};return{layer:t,listener:i,delegates:{mousemove:c,mouseout:l}}}return o=function(n){var u=r.getLayer(t)?r.queryRenderedFeatures(n.point,{layers:[t]}):[];u.length&&(n.features=u,i.call(r,n),delete n.features)},{layer:t,listener:i,delegates:(e={},e[n]=o,e)}},r.prototype.on=function(n,t,r){var u,f;if(r===undefined)return i.prototype.on.call(this,n,t);u=this._createDelegatedListener(n,t,r);this._delegatedListeners=this._delegatedListeners||{};this._delegatedListeners[n]=this._delegatedListeners[n]||[];this._delegatedListeners[n].push(u);for(f in u.delegates)this.on(f,u.delegates[f]);return this},r.prototype.once=function(n,t,r){var u,f;if(r===undefined)return i.prototype.once.call(this,n,t);u=this._createDelegatedListener(n,t,r);for(f in u.delegates)this.once(f,u.delegates[f]);return this},r.prototype.off=function(n,t,r){var u=this,f;return r===undefined?i.prototype.off.call(this,n,t):(f=function(i){for(var f,s,o=i[n],e=0;e<o.length;e++)if(f=o[e],f.layer===t&&f.listener===r){for(s in f.delegates)u.off(s,f.delegates[s]);return o.splice(e,1),u}},this._delegatedListeners&&this._delegatedListeners[n]&&f(this._delegatedListeners),this)},r.prototype.queryRenderedFeatures=function(t,i){var f,r,u;return this.style?(i!==undefined||t===undefined||t instanceof n.Point||Array.isArray(t)||(i=t,t=undefined),i=i||{},t=t||[[0,0],[this.transform.width,this.transform.height]],t instanceof n.Point||typeof t[0]=="number"?f=[n.Point.convert(t)]:(r=n.Point.convert(t[0]),u=n.Point.convert(t[1]),f=[r,new n.Point(u.x,r.y),u,new n.Point(r.x,u.y),r]),this.style.queryRenderedFeatures(f,i,this.transform)):[]},r.prototype.querySourceFeatures=function(n,t){return this.style.querySourceFeatures(n,t)},r.prototype.setStyle=function(t,i){return i=n.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},i),i.diff!==!1&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&t?(this._diffStyle(t,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(t,i))},r.prototype._getUIString=function(n){var t=this._locale[n];if(t==null)throw new Error("Missing UI string '"+n+"'");return t},r.prototype._updateStyle=function(n,t){if(t===void 0&&(t={}),t.stylePatch)n||(n=uo());else{if(this.style&&(this.style.setEventedParent(null),this.style._remove()),n)this.style=new si(this,t);else return delete this.style,this;this.style.setEventedParent(this,{style:this.style})}return this.style||(this.style=new si(this,t),this.style.setEventedParent(this,{style:this.style})),typeof n=="string"?this.style.loadURL(n,t):this.style.loadJSON(n,t),this},r.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new si(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},r.prototype._diffStyle=function(t,i){var r=this,u,f;i===void 0&&(i={});typeof t=="string"?(u=this._requestManager.normalizeStyleURL(t),f=this._requestManager.transformRequest(u,n.ResourceType.Style),n.getJSON(f,function(t,u){t?r.fire(new n.ErrorEvent(t)):u&&r._updateDiff(u,i)})):typeof t=="object"&&this._updateDiff(t,i)},r.prototype._updateDiff=function(t,i){i===void 0&&(i={});try{this.style.setState(t,i)&&this._update(!0)}catch(r){n.warnOnce("Unable to perform style diff: "+(r.message||r.error||r)+".  Rebuilding the style from scratch.");this._updateStyle(t,i)}},r.prototype.getStyle=function(){if(this.style)return this.style.serialize()},r.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():n.warnOnce("There is no style added to the map.")},r.prototype.addSource=function(n,t){return this._lazyInitEmptyStyle(),this.style.addSource(n,t),this._update(!0)},r.prototype.isSourceLoaded=function(t){var i=this.style&&this.style.sourceCaches[t];if(i===undefined){this.fire(new n.ErrorEvent(new Error("There is no source with ID '"+t+"'")));return}return i.loaded()},r.prototype.areTilesLoaded=function(){var i=this.style&&this.style.sourceCaches,r,u,n,f,t;for(r in i){u=i[r];n=u._tiles;for(f in n)if(t=n[f],!(t.state==="loaded"||t.state==="errored"))return!1}return!0},r.prototype.addSourceType=function(n,t,i){return this._lazyInitEmptyStyle(),this.style.addSourceType(n,t,i)},r.prototype.removeSource=function(n){return this.style.removeSource(n),this._update(!0)},r.prototype.getSource=function(n){return this.style.getSource(n)},r.prototype.addImage=function(t,i,r){var u,f,e;r===void 0&&(r={});u=r.pixelRatio;u===void 0&&(u=1);f=r.sdf;f===void 0&&(f=!1);var h=r.stretchX,c=r.stretchY,l=r.content;if(this._lazyInitEmptyStyle(),e=0,i instanceof gf||di&&i instanceof di){var o=n.browser.getImageData(i),a=o.width,v=o.height,y=o.data;this.style.addImage(t,{data:new n.RGBAImage({width:a,height:v},y),pixelRatio:u,stretchX:h,stretchY:c,content:l,sdf:f,version:e})}else{if(i.width===undefined||i.height===undefined)return this.fire(new n.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`")));var p=i.width,w=i.height,b=i.data,s=i;if(this.style.addImage(t,{data:new n.RGBAImage({width:p,height:w},new Uint8Array(b)),pixelRatio:u,stretchX:h,stretchY:c,content:l,sdf:f,version:e,userImage:s}),s.onAdd)s.onAdd(this,t)}},r.prototype.updateImage=function(t,i){var r=this.style.getImage(t),o;if(!r)return this.fire(new n.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var u=i instanceof gf||di&&i instanceof di?n.browser.getImageData(i):i,f=u.width,e=u.height,s=u.data;if(f===undefined||e===undefined)return this.fire(new n.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`")));if(f!==r.data.width||e!==r.data.height)return this.fire(new n.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));o=!(i instanceof gf||di&&i instanceof di);r.data.replace(s,o);this.style.updateImage(t,r)},r.prototype.hasImage=function(t){return t?!!this.style.getImage(t):(this.fire(new n.ErrorEvent(new Error("Missing required image id"))),!1)},r.prototype.removeImage=function(n){this.style.removeImage(n)},r.prototype.loadImage=function(t,i){n.getImage(this._requestManager.transformRequest(t,n.ResourceType.Image),i)},r.prototype.listImages=function(){return this.style.listImages()},r.prototype.addLayer=function(n,t){return this._lazyInitEmptyStyle(),this.style.addLayer(n,t),this._update(!0)},r.prototype.moveLayer=function(n,t){return this.style.moveLayer(n,t),this._update(!0)},r.prototype.removeLayer=function(n){return this.style.removeLayer(n),this._update(!0)},r.prototype.getLayer=function(n){return this.style.getLayer(n)},r.prototype.setLayerZoomRange=function(n,t,i){return this.style.setLayerZoomRange(n,t,i),this._update(!0)},r.prototype.setFilter=function(n,t,i){return i===void 0&&(i={}),this.style.setFilter(n,t,i),this._update(!0)},r.prototype.getFilter=function(n){return this.style.getFilter(n)},r.prototype.setPaintProperty=function(n,t,i,r){return r===void 0&&(r={}),this.style.setPaintProperty(n,t,i,r),this._update(!0)},r.prototype.getPaintProperty=function(n,t){return this.style.getPaintProperty(n,t)},r.prototype.setLayoutProperty=function(n,t,i,r){return r===void 0&&(r={}),this.style.setLayoutProperty(n,t,i,r),this._update(!0)},r.prototype.getLayoutProperty=function(n,t){return this.style.getLayoutProperty(n,t)},r.prototype.setLight=function(n,t){return t===void 0&&(t={}),this._lazyInitEmptyStyle(),this.style.setLight(n,t),this._update(!0)},r.prototype.getLight=function(){return this.style.getLight()},r.prototype.setFeatureState=function(n,t){return this.style.setFeatureState(n,t),this._update()},r.prototype.removeFeatureState=function(n,t){return this.style.removeFeatureState(n,t),this._update()},r.prototype.getFeatureState=function(n){return this.style.getFeatureState(n)},r.prototype.getContainer=function(){return this._container},r.prototype.getCanvasContainer=function(){return this._canvasContainer},r.prototype.getCanvas=function(){return this._canvas},r.prototype._containerDimensions=function(){var n=0,t=0;return this._container&&(n=this._container.clientWidth||400,t=this._container.clientHeight||300),[n,t]},r.prototype._detectMissingCSS=function(){var t=n.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");t!=="rgb(250, 128, 114)"&&n.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 in https://www.mapbox.com/mapbox-gl-js/api/.")},r.prototype._setupContainer=function(){var n=this._container,u,i,r,f,e;n.classList.add("mapboxgl-map");u=this._missingCSSCanary=t.create("div","mapboxgl-canary",n);u.style.visibility="hidden";this._detectMissingCSS();i=this._canvasContainer=t.create("div","mapboxgl-canvas-container",n);this._interactive&&i.classList.add("mapboxgl-interactive");this._canvas=t.create("canvas","mapboxgl-canvas",i);this._canvas.addEventListener("webglcontextlost",this._contextLost,!1);this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1);this._canvas.setAttribute("tabindex","0");this._canvas.setAttribute("aria-label","Map");this._canvas.setAttribute("role","region");r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);f=this._controlContainer=t.create("div","mapboxgl-control-container",n);e=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(n){e[n]=t.create("div","mapboxgl-ctrl-"+n,f)});this._container.addEventListener("scroll",this._onMapScroll,!1)},r.prototype._resizeCanvas=function(t,i){var r=n.browser.devicePixelRatio||1;this._canvas.width=r*t;this._canvas.height=r*i;this._canvas.style.width=t+"px";this._canvas.style.height=i+"px"},r.prototype._setupPainter=function(){var i=n.extend({},te.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl",i)||this._canvas.getContext("experimental-webgl",i);if(!t){this.fire(new n.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new o(t,this.transform);n.webpSupported.testSupport(t)},r.prototype._contextLost=function(t){t.preventDefault();this._frame&&(this._frame.cancel(),this._frame=null);this.fire(new n.Event("webglcontextlost",{originalEvent:t}))},r.prototype._contextRestored=function(t){this._setupPainter();this.resize();this._update();this.fire(new n.Event("webglcontextrestored",{originalEvent:t}))},r.prototype._onMapScroll=function(n){if(n.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},r.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},r.prototype._update=function(n){return this.style?(this._styleDirty=this._styleDirty||n,this._sourcesDirty=!0,this.triggerRepaint(),this):this},r.prototype._requestRenderFrame=function(n){return this._update(),this._renderTaskQueue.add(n)},r.prototype._cancelRenderFrame=function(n){this._renderTaskQueue.remove(n)},r.prototype._render=function(t){var f=this,r,l=0,i=this.painter.context.extTimerQuery,e,o,s,h,u,a,v,c;if(this.listens("gpu-timing-frame")&&(r=i.createQueryEXT(),i.beginQueryEXT(i.TIME_ELAPSED_EXT,r),l=n.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),!this._removed)return e=!1,this.style&&this._styleDirty&&(this._styleDirty=!1,o=this.transform.zoom,s=n.browser.now(),this.style.zoomHistory.update(o,s),h=new n.EvaluationParameters(o,{now:s,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),u=h.crossFadingFactor(),(u!==1||u!==this._crossFadingFactor)&&(e=!0,this._crossFadingFactor=u),this.style.update(h)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new n.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new n.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")&&(a=n.browser.now()-l,i.endQueryEXT(i.TIME_ELAPSED_EXT,r),setTimeout(function(){var t=i.getQueryObjectEXT(r,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(r);f.fire(new n.Event("gpu-timing-frame",{cpuTime:a,gpuTime:t}))},50)),this.listens("gpu-timing-layer")&&(v=this.painter.collectGpuTimers(),setTimeout(function(){var t=f.painter.queryGpuTimers(v);f.fire(new n.Event("gpu-timing-layer",{layerTimes:t}))},50)),c=this._sourcesDirty||this._styleDirty||this._placementDirty,c||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.Event("idle")),!this._loaded||this._fullyLoaded||c||(this._fullyLoaded=!0),this},r.prototype.remove=function(){var t,i,u,r;for(this._hash&&this._hash.remove(),t=0,i=this._controls;t<i.length;t+=1){u=i[t];u.onRemove(this)}this._controls=[];this._frame&&(this._frame.cancel(),this._frame=null);this._renderTaskQueue.clear();this.painter.destroy();this.handlers.destroy();delete this.handlers;this.setStyle(null);typeof n.window!="undefined"&&(n.window.removeEventListener("resize",this._onWindowResize,!1),n.window.removeEventListener("orientationchange",this._onWindowResize,!1),n.window.removeEventListener("online",this._onWindowOnline,!1));r=this.painter.context.gl.getExtension("WEBGL_lose_context");r&&r.loseContext();ne(this._canvasContainer);ne(this._controlContainer);ne(this._missingCSSCanary);this._container.classList.remove("mapboxgl-map");this._removed=!0;this.fire(new n.Event("remove"))},r.prototype.triggerRepaint=function(){var t=this;this.style&&!this._frame&&(this._frame=n.browser.frame(function(n){t._frame=null;t._render(n)}))},r.prototype._onWindowOnline=function(){this._update()},r.prototype._onWindowResize=function(n){this._trackResize&&this.resize({originalEvent:n})._update()},u.showTileBoundaries.get=function(){return!!this._showTileBoundaries},u.showTileBoundaries.set=function(n){this._showTileBoundaries!==n&&(this._showTileBoundaries=n,this._update())},u.showPadding.get=function(){return!!this._showPadding},u.showPadding.set=function(n){this._showPadding!==n&&(this._showPadding=n,this._update())},u.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},u.showCollisionBoxes.set=function(n){this._showCollisionBoxes!==n&&(this._showCollisionBoxes=n,n?this.style._generateCollisionBoxes():this._update())},u.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},u.showOverdrawInspector.set=function(n){this._showOverdrawInspector!==n&&(this._showOverdrawInspector=n,this._update())},u.repaint.get=function(){return!!this._repaint},u.repaint.set=function(n){this._repaint!==n&&(this._repaint=n,this.triggerRepaint())},u.vertices.get=function(){return!!this._vertices},u.vertices.set=function(n){this._vertices=n;this._update()},r.prototype._setCacheLimits=function(t,i){n.setCacheLimits(t,i)},u.version.get=function(){return n.version},Object.defineProperties(r.prototype,u),r}(yh);wh={showCompass:!0,showZoom:!0,visualizePitch:!1};ri=function(i){var r=this;this.options=n.extend({},wh,i);this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group");this._container.addEventListener("contextmenu",function(n){return n.preventDefault()});this.options.showZoom&&(n.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(n){return r._map.zoomIn({},{originalEvent:n})}),t.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(n){return r._map.zoomOut({},{originalEvent:n})}),t.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0));this.options.showCompass&&(n.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(n){r.options.visualizePitch?r._map.resetNorthPitch({},{originalEvent:n}):r._map.resetNorth({},{originalEvent:n})}),this._compassIcon=t.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};ri.prototype._updateZoomButtons=function(){var n=this._map.getZoom(),t=n===this._map.getMaxZoom(),i=n===this._map.getMinZoom();this._zoomInButton.disabled=t;this._zoomOutButton.disabled=i;this._zoomInButton.setAttribute("aria-disabled",t.toString());this._zoomOutButton.setAttribute("aria-disabled",i.toString())};ri.prototype._rotateCompassArrow=function(){var n=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=n};ri.prototype.onAdd=function(n){if(this._map=n,this.options.showZoom){this._setButtonTitle(this._zoomInButton,"ZoomIn");this._setButtonTitle(this._zoomOutButton,"ZoomOut");this._map.on("zoom",this._updateZoomButtons);this._updateZoomButtons()}if(this.options.showCompass){if(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch)this._map.on("pitch",this._rotateCompassArrow);this._map.on("rotate",this._rotateCompassArrow);this._rotateCompassArrow();this._handler=new tt(this._map,this._compass,this.options.visualizePitch)}return this._container};ri.prototype.onRemove=function(){t.remove(this._container);this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons);this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler);delete this._map};ri.prototype._createButton=function(n,i){var r=t.create("button",n,this._container);return r.type="button",r.addEventListener("click",i),r};ri.prototype._setButtonTitle=function(n,t){var i=this._map._getUIString("NavigationControl."+t);n.title=i;n.setAttribute("aria-label",i)};tt=function(i,r,u){u===void 0&&(u=!1);this._clickTolerance=10;this.element=r;this.mouseRotate=new uh({clickTolerance:i.dragRotate._mouseRotate._clickTolerance});this.map=i;u&&(this.mousePitch=new fh({clickTolerance:i.dragRotate._mousePitch._clickTolerance}));n.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this);t.addEventListener(r,"mousedown",this.mousedown);t.addEventListener(r,"touchstart",this.touchstart,{passive:!1});t.addEventListener(r,"touchmove",this.touchmove);t.addEventListener(r,"touchend",this.touchend);t.addEventListener(r,"touchcancel",this.reset)};tt.prototype.down=function(n,i){this.mouseRotate.mousedown(n,i);this.mousePitch&&this.mousePitch.mousedown(n,i);t.disableDrag()};tt.prototype.move=function(n,t){var i=this.map,u=this.mouseRotate.mousemoveWindow(n,t),r;u&&u.bearingDelta&&i.setBearing(i.getBearing()+u.bearingDelta);this.mousePitch&&(r=this.mousePitch.mousemoveWindow(n,t),r&&r.pitchDelta&&i.setPitch(i.getPitch()+r.pitchDelta))};tt.prototype.off=function(){var n=this.element;t.removeEventListener(n,"mousedown",this.mousedown);t.removeEventListener(n,"touchstart",this.touchstart,{passive:!1});t.removeEventListener(n,"touchmove",this.touchmove);t.removeEventListener(n,"touchend",this.touchend);t.removeEventListener(n,"touchcancel",this.reset);this.offTemp()};tt.prototype.offTemp=function(){t.enableDrag();t.removeEventListener(n.window,"mousemove",this.mousemove);t.removeEventListener(n.window,"mouseup",this.mouseup)};tt.prototype.mousedown=function(i){this.down(n.extend({},i,{ctrlKey:!0,preventDefault:function(){return i.preventDefault()}}),t.mousePos(this.element,i));t.addEventListener(n.window,"mousemove",this.mousemove);t.addEventListener(n.window,"mouseup",this.mouseup)};tt.prototype.mousemove=function(n){this.move(n,t.mousePos(this.element,n))};tt.prototype.mouseup=function(n){this.mouseRotate.mouseupWindow(n);this.mousePitch&&this.mousePitch.mouseupWindow(n);this.offTemp()};tt.prototype.touchstart=function(n){n.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=t.touchPos(this.element,n.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return n.preventDefault()}},this._startPos))};tt.prototype.touchmove=function(n){n.targetTouches.length!==1?this.reset():(this._lastPos=t.touchPos(this.element,n.targetTouches)[0],this.move({preventDefault:function(){return n.preventDefault()}},this._lastPos))};tt.prototype.touchend=function(n){n.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click();this.reset()};tt.prototype.reset=function(){this.mouseRotate.reset();this.mousePitch&&this.mousePitch.reset();delete this._startPos;delete this._lastPos;this.offTemp()};du={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%)"};gu=function(i){function r(r,u){var c,e,l,it,y,d,g,o,p,nt,a,tt,w,v,s,h;if(i.call(this),(r instanceof n.window.HTMLElement||u)&&(r=n.extend({element:r},u)),n.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._scale=r&&r.scale||1,this._draggable=r&&r.draggable||!1,this._clickTolerance=r&&r.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=r&&r.rotation||0,this._rotationAlignment=r&&r.rotationAlignment||"auto",this._pitchAlignment=r&&r.pitchAlignment&&r.pitchAlignment!=="auto"?r.pitchAlignment:this._rotationAlignment,r&&r.element)this._element=r.element,this._offset=n.Point.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0;this._element=t.create("div");this._element.setAttribute("aria-label","Map marker");var f=t.createNS("http://www.w3.org/2000/svg","svg"),b=41,k=27;for(f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",b+"px"),f.setAttributeNS(null,"width",k+"px"),f.setAttributeNS(null,"viewBox","0 0 "+k+" "+b),c=t.createNS("http://www.w3.org/2000/svg","g"),c.setAttributeNS(null,"stroke","none"),c.setAttributeNS(null,"stroke-width","1"),c.setAttributeNS(null,"fill","none"),c.setAttributeNS(null,"fill-rule","evenodd"),e=t.createNS("http://www.w3.org/2000/svg","g"),e.setAttributeNS(null,"fill-rule","nonzero"),l=t.createNS("http://www.w3.org/2000/svg","g"),l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000"),it=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],y=0,d=it;y<d.length;y+=1)g=d[y],o=t.createNS("http://www.w3.org/2000/svg","ellipse"),o.setAttributeNS(null,"opacity","0.04"),o.setAttributeNS(null,"cx","10.5"),o.setAttributeNS(null,"cy","5.80029008"),o.setAttributeNS(null,"rx",g.rx),o.setAttributeNS(null,"ry",g.ry),l.appendChild(o);p=t.createNS("http://www.w3.org/2000/svg","g");p.setAttributeNS(null,"fill",this._color);nt=t.createNS("http://www.w3.org/2000/svg","path");nt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z");p.appendChild(nt);a=t.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"opacity","0.25");a.setAttributeNS(null,"fill","#000000");tt=t.createNS("http://www.w3.org/2000/svg","path");tt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z");a.appendChild(tt);w=t.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"transform","translate(6.0, 7.0)");w.setAttributeNS(null,"fill","#FFFFFF");v=t.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");s=t.createNS("http://www.w3.org/2000/svg","circle");s.setAttributeNS(null,"fill","#000000");s.setAttributeNS(null,"opacity","0.25");s.setAttributeNS(null,"cx","5.5");s.setAttributeNS(null,"cy","5.5");s.setAttributeNS(null,"r","5.4999962");h=t.createNS("http://www.w3.org/2000/svg","circle");h.setAttributeNS(null,"fill","#FFFFFF");h.setAttributeNS(null,"cx","5.5");h.setAttributeNS(null,"cy","5.5");h.setAttributeNS(null,"r","5.4999962");v.appendChild(s);v.appendChild(h);e.appendChild(l);e.appendChild(p);e.appendChild(a);e.appendChild(w);e.appendChild(v);f.appendChild(e);f.setAttributeNS(null,"height",b*this._scale+"px");f.setAttributeNS(null,"width",k*this._scale+"px");this._element.appendChild(f);this._offset=n.Point.convert(r&&r.offset||[0,-14])}this._element.classList.add("mapboxgl-marker");this._element.addEventListener("dragstart",function(n){n.preventDefault()});this._element.addEventListener("mousedown",function(n){n.preventDefault()});kh(this._element,this._anchor,"marker");this._popup=null}return i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r,r.prototype.addTo=function(n){this.remove();this._map=n;n.getCanvasContainer().appendChild(this._element);n.on("move",this._update);n.on("moveend",this._update);this.setDraggable(this._draggable);this._update();this._map.on("click",this._onMapClick);return this},r.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),t.remove(this._element),this._popup&&this._popup.remove(),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=n.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},r.prototype.getElement=function(){return this._element},r.prototype.setPopup=function(n){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),n){if(!("offset"in n.options)){var i=41-5.8/2,t=13.5,r=Math.sqrt(Math.pow(t,2)/2);n.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-i],"bottom-left":[r,(i-t+r)*-1],"bottom-right":[-r,(i-t+r)*-1],left:[t,(i-t)*-1],right:[-t,(i-t)*-1]}:this._offset}this._popup=n;this._lngLat&&this._popup.setLngLat(this._lngLat);this._originalTabIndex=this._element.getAttribute("tabindex");this._originalTabIndex||this._element.setAttribute("tabindex","0");this._element.addEventListener("keypress",this._onKeyPress)}return this},r.prototype._onKeyPress=function(n){var t=n.code,i=n.charCode||n.keyCode;(t==="Space"||t==="Enter"||i===32||i===13)&&this.togglePopup()},r.prototype._onMapClick=function(n){var t=n.originalEvent.target,i=this._element;this._popup&&(t===i||i.contains(t))&&this.togglePopup()},r.prototype.getPopup=function(){return this._popup},r.prototype.togglePopup=function(){var n=this._popup;if(n)n.isOpen()?n.remove():n.addTo(this._map);else return this;return this},r.prototype._update=function(n){var i,r;this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=bh(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),i="",this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?i="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(i="rotateZ("+(this._rotation-this._map.getBearing())+"deg)"),r="",this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?r="rotateX(0deg)":this._pitchAlignment==="map"&&(r="rotateX("+this._map.getPitch()+"deg)"),n&&n.type!=="moveend"||(this._pos=this._pos.round()),t.setTransform(this._element,du[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+r+" "+i))},r.prototype.getOffset=function(){return this._offset},r.prototype.setOffset=function(t){return this._offset=n.Point.convert(t),this._update(),this},r.prototype._onMove=function(t){if(!this._isDragging){var i=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=i}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new n.Event("dragstart"))),this.fire(new n.Event("drag")))},r.prototype._onUp=function(){this._element.style.pointerEvents="auto";this._positionDelta=null;this._pointerdownPos=null;this._isDragging=!1;this._map.off("mousemove",this._onMove);this._map.off("touchmove",this._onMove);this._state==="active"&&this.fire(new n.Event("dragend"));this._state="inactive"},r.prototype._addDragHandler=function(n){if(this._element.contains(n.originalEvent.target)){n.preventDefault();this._positionDelta=n.point.sub(this._pos).add(this._offset);this._pointerdownPos=n.point;this._state="pending";this._map.on("mousemove",this._onMove);this._map.on("touchmove",this._onMove);this._map.once("mouseup",this._onUp);this._map.once("touchend",this._onUp)}},r.prototype.setDraggable=function(n){if(this._draggable=!!n,this._map)if(n){this._map.on("mousedown",this._addDragHandler);this._map.on("touchstart",this._addDragHandler)}else this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler);return this},r.prototype.isDraggable=function(){return this._draggable},r.prototype.setRotation=function(n){return this._rotation=n||0,this._update(),this},r.prototype.getRotation=function(){return this._rotation},r.prototype.setRotationAlignment=function(n){return this._rotationAlignment=n||"auto",this._update(),this},r.prototype.getRotationAlignment=function(){return this._rotationAlignment},r.prototype.setPitchAlignment=function(n){return this._pitchAlignment=n&&n!=="auto"?n:this._rotationAlignment,this._update(),this},r.prototype.getPitchAlignment=function(){return this._pitchAlignment},r}(n.Evented);dh={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};var nf=0,br=!1,pd=function(i){function r(t){i.call(this);this.options=n.extend({},dh,t);n.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(n){return this._map=n,this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),yd(this._setupUI),this._container},r.prototype.onRemove=function(){this._geolocationWatchID!==undefined&&(n.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=undefined);this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove();this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove();t.remove(this._container);this._map.off("zoom",this._onZoom);this._map=undefined;nf=0;br=!1},r.prototype._isOutOfMapMaxBounds=function(n){var t=this._map.getMaxBounds(),i=n.coords;return t&&(i.longitude<t.getWest()||i.longitude>t.getEast()||i.latitude<t.getSouth()||i.latitude>t.getNorth())},r.prototype._setErrorState=function(){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")}},r.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t)){this._setErrorState();this.fire(new n.Event("outofmaxbounds",t));this._updateMarker();this._finish();return}if(this.options.trackUserLocation){this._lastKnownPosition=t;switch(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&&this._watchState!=="OFF"&&this._updateMarker(t);this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(t);this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale");this.fire(new n.Event("geolocate",t));this._finish()}},r.prototype._updateCamera=function(t){var i=new n.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,u=this._map.getBearing(),f=n.extend({bearing:u},this.options.fitBoundsOptions);this._map.fitBounds(i.toBounds(r),f,{geolocateSource:!0})},r.prototype._updateMarker=function(t){if(t){var i=new n.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map);this._userLocationDotMarker.setLngLat(i).addTo(this._map);this._accuracy=t.coords.accuracy;this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},r.prototype._updateCircleRadius=function(){var n=this._map._container.clientHeight/2,i=this._map.unproject([0,n]),r=this._map.unproject([1,n]),u=i.distanceTo(r),t=Math.ceil(2*this._accuracy/u);this._circleElement.style.width=t+"px";this._circleElement.style.height=t+"px"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(t.code===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._geolocateButton.disabled=!0;var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i;this._geolocateButton.setAttribute("aria-label",i);this._geolocationWatchID!==undefined&&this._clearWatch()}else{if(t.code===3&&br)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale");this.fire(new n.Event("error",t));this._finish()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId);this._timeoutId=undefined},r.prototype._setupUI=function(i){var r=this,u,f;if(this._container.addEventListener("contextmenu",function(n){return n.preventDefault()}),this._geolocateButton=t.create("button","mapboxgl-ctrl-geolocate",this._container),t.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",i===!1?(n.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled."),u=this._map._getUIString("GeolocateControl.LocationNotAvailable"),this._geolocateButton.disabled=!0,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)):(f=this._map._getUIString("GeolocateControl.FindMyLocation"),this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation){this._dotElement=t.create("div","mapboxgl-user-location-dot");this._userLocationDotMarker=new gu(this._dotElement);this._circleElement=t.create("div","mapboxgl-user-location-accuracy-circle");this._accuracyCircleMarker=new gu({element:this._circleElement,pitchAlignment:"map"});this.options.trackUserLocation&&(this._watchState="OFF");this._map.on("zoom",this._onZoom)}if(this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation)this._map.on("movestart",function(t){var i=t.originalEvent&&t.originalEvent.type==="resize";t.geolocateSource||r._watchState!=="ACTIVE_LOCK"||i||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new n.Event("trackuserlocationend")))})},r.prototype.trigger=function(){if(!this._setup)return n.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 n.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":nf--;br=!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 n.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 n.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(this._watchState==="OFF"&&this._geolocationWatchID!==undefined)this._clearWatch();else if(this._geolocationWatchID===undefined){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");this._geolocateButton.setAttribute("aria-pressed","true");nf++;var t;nf>1?(t={maximumAge:6e5,timeout:0},br=!0):(t=this.options.positionOptions,br=!1);this._geolocationWatchID=n.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else n.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){n.window.navigator.geolocation.clearWatch(this._geolocationWatchID);this._geolocationWatchID=undefined;this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting");this._geolocateButton.setAttribute("aria-pressed","false");this.options.showUserLocation&&this._updateMarker(null)},r}(n.Evented),wd={maxWidth:100,unit:"metric"},tr=function(t){this.options=n.extend({},wd,t);n.bindAll(["_onMove","setUnit"],this)};tr.prototype.getDefaultPosition=function(){return"bottom-left"};tr.prototype._onMove=function(){gh(this._map,this._container,this.options)};tr.prototype.onAdd=function(n){this._map=n;this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",n.getContainer());this._map.on("move",this._onMove);return this._onMove(),this._container};tr.prototype.onRemove=function(){t.remove(this._container);this._map.off("move",this._onMove);this._map=undefined};tr.prototype.setUnit=function(n){this.options.unit=n;gh(this._map,this._container,this.options)};at=function(t){this._fullscreen=!1;t&&t.container&&(t.container instanceof n.window.HTMLElement?this._container=t.container:n.warnOnce("Full screen control 'container' must be a DOM element."));n.bindAll(["_onClickFullscreen","_changeIcon"],this);"onfullscreenchange"in n.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in n.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in n.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in n.window.document&&(this._fullscreenchange="MSFullscreenChange")};at.prototype.onAdd=function(i){return this._map=i,this._container||(this._container=this._map.getContainer()),this._controlContainer=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",n.warnOnce("This device does not support fullscreen mode.")),this._controlContainer};at.prototype.onRemove=function(){t.remove(this._controlContainer);this._map=null;n.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)};at.prototype._checkFullscreenSupport=function(){return!!(n.window.document.fullscreenEnabled||n.window.document.mozFullScreenEnabled||n.window.document.msFullscreenEnabled||n.window.document.webkitFullscreenEnabled)};at.prototype._setupUI=function(){var i=this._fullscreenButton=t.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);t.create("span","mapboxgl-ctrl-icon",i).setAttribute("aria-hidden",!0);i.type="button";this._updateTitle();this._fullscreenButton.addEventListener("click",this._onClickFullscreen);n.window.document.addEventListener(this._fullscreenchange,this._changeIcon)};at.prototype._updateTitle=function(){var n=this._getTitle();this._fullscreenButton.setAttribute("aria-label",n);this._fullscreenButton.title=n};at.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")};at.prototype._isFullscreen=function(){return this._fullscreen};at.prototype._changeIcon=function(){var t=n.window.document.fullscreenElement||n.window.document.mozFullScreenElement||n.window.document.webkitFullscreenElement||n.window.document.msFullscreenElement;t===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())};at.prototype._onClickFullscreen=function(){this._isFullscreen()?n.window.document.exitFullscreen?n.window.document.exitFullscreen():n.window.document.mozCancelFullScreen?n.window.document.mozCancelFullScreen():n.window.document.msExitFullscreen?n.window.document.msExitFullscreen():n.window.document.webkitCancelFullScreen&&n.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var dd={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},gd="a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])",ng=function(i){function r(t){i.call(this);this.options=n.extend(Object.create(dd),t);n.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r,r.prototype.addTo=function(t){if(this._map&&this.remove(),this._map=t,this.options.closeOnClick)this._map.on("click",this._onClose);if(this.options.closeOnMove)this._map.on("move",this._onClose);this._map.on("remove",this.remove);if(this._update(),this._focusFirstElement(),this._trackPointer){this._map.on("mousemove",this._onMouseMove);this._map.on("mouseup",this._onMouseUp);this._container&&this._container.classList.add("mapboxgl-popup-track-pointer");this._map._canvasContainer.classList.add("mapboxgl-track-pointer")}else this._map.on("move",this._update);return this.fire(new n.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&t.remove(this._content),this._container&&(t.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new n.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){if(this._lngLat=n.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map){this._map.on("move",this._update);this._map.off("mousemove",this._onMouseMove);this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer");this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")}return this},r.prototype.trackPointer=function(){if(this._trackPointer=!0,this._pos=null,this._update(),this._map){this._map.off("move",this._update);this._map.on("mousemove",this._onMouseMove);this._map.on("drag",this._onDrag);this._container&&this._container.classList.add("mapboxgl-popup-track-pointer");this._map._canvasContainer.classList.add("mapboxgl-track-pointer")}return this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(t){return this.setDOMContent(n.window.document.createTextNode(t))},r.prototype.setHTML=function(t){var r=n.window.document.createDocumentFragment(),u=n.window.document.createElement("body"),i;for(u.innerHTML=t;;){if(i=u.firstChild,!i)break;r.appendChild(i)}return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(n){return this.options.maxWidth=n,this._update(),this},r.prototype.setDOMContent=function(n){if(this._content)while(this._content.hasChildNodes())this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=t.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(n),this._createCloseButton(),this._update(),this._focusFirstElement(),this},r.prototype.addClassName=function(n){this._container&&this._container.classList.add(n)},r.prototype.removeClassName=function(n){this._container&&this._container.classList.remove(n)},r.prototype.setOffset=function(n){return this.options.offset=n,this._update(),this},r.prototype.toggleClassName=function(n){if(this._container)return this._container.classList.toggle(n)},r.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=t.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},r.prototype._onMouseUp=function(n){this._update(n.point)},r.prototype._onMouseMove=function(n){this._update(n.point)},r.prototype._onDrag=function(n){this._update(n.point)},r.prototype._update=function(n){var h=this,c=this._lngLat||this._trackPointer,f,e,u,o;if(this._map&&c&&this._content&&(this._container||(this._container=t.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=t.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(n){return h._container.classList.add(n)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=bh(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||n)){var i=this._pos=this._trackPointer&&n?n:this._map.project(this._lngLat),r=this.options.anchor,s=nc(this.options.offset);r||(f=this._container.offsetWidth,e=this._container.offsetHeight,u=i.y+s.bottom.y<e?["top"]:i.y>this._map.transform.height-e?["bottom"]:[],i.x<f/2?u.push("left"):i.x>this._map.transform.width-f/2&&u.push("right"),r=u.length===0?"bottom":u.join("-"));o=i.add(s[r]).round();t.setTransform(this._container,du[r]+" translate("+o.x+"px,"+o.y+"px)");kh(this._container,r,"popup")}},r.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var n=this._container.querySelector(gd);n&&n.focus()}},r.prototype._onClose=function(){this.remove()},r}(n.Evented);return tc={version:n.version,supported:te,setRTLTextPlugin:n.setRTLTextPlugin,getRTLTextPluginStatus:n.getRTLTextPluginStatus,Map:vd,NavigationControl:ri,GeolocateControl:pd,AttributionControl:et,ScaleControl:tr,FullscreenControl:at,Popup:ng,Marker:gu,Style:si,LngLat:n.LngLat,LngLatBounds:n.LngLatBounds,Point:n.Point,MercatorCoordinate:n.MercatorCoordinate,Evented:n.Evented,config:n.config,prewarm:ba,clearPrewarmedResources:ka,get accessToken(){return n.config.ACCESS_TOKEN},set accessToken(t){n.config.ACCESS_TOKEN=t},get baseApiUrl(){return n.config.API_URL},set baseApiUrl(t){n.config.API_URL=t},get workerCount(){return yt.workerCount},set workerCount(n){yt.workerCount=n},get maxParallelImageRequests(){return n.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){n.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){n.clearTileCache(t)},workerUrl:""}}),i})}),lai=wi.Map,nht=wi.setRTLTextPlugin,aai=wi.supported,aa=wi.Marker,bi={domain:"atlas.microsoft.com",staticAssetsDomain:"atlas.microsoft.com",stylePath:"styling",styleDefinitionsVersion:"2021-02-01",appInsightsKey:"e96cb745-c6f5-409c-a775-c4313e468c1d",aadInstance:"https://login.microsoftonline.com/"},f={apiVersionQueryParameter:"api-version",authorizationHeaderName:"Authorization",authorizationTokenPrefix:"Bearer ",domainPlaceHolder:"{{azMapsDomain}}",legacyDomainPlaceHolder:"{azMapsDomain}",viewPlaceHolder:"{{azMapsView}}",viewParameter:"view",languagePlaceHolder:"{{azMapsLanguage}}",stylePathHolder:"{{azMapsStylingPath}}",styleResourcePlaceholder:"{{azMapsStylePath}}",stylePath:"styling",styleResourcePath:"styles",styleApiVersion:"2.0",mapAgentHeaderName:"Map-Agent",msClientIdHeaderName:"x-ms-client-id",msOriginHeaderName:"Ms-Am-Request-Origin",msOriginHeaderValue:"MapControl",resourceId:"https://atlas.microsoft.com/",sessionIdHeaderName:"Session-Id"},va=function(n,t){return va=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},va(n,t)},o=function(){return o=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},o.apply(this,arguments)},nt=function(){function n(){}return n.prototype.merge=function(){for(var s,u,r,i,t,o,h,c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];try{for(u=e(c),r=u.next();!r.done;r=u.next())if(i=r.value,i)for(t in i)i.hasOwnProperty(t)&&this.hasOwnProperty(t)&&(i[t]!==undefined&&i[t]!=null?this[t]instanceof n?this[t].merge(i[t]):this[t]=i[t]:(s||(s=new(Object.getPrototypeOf(this).constructor)),this[t]=s[t]))}catch(l){o={error:l}}finally{try{r&&!r.done&&(h=u.return)&&h.call(u)}finally{if(o)throw o.error;}}return this},n}(),iht=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.domain=undefined,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}return u(t,n),t}(nt),fr=function(){function n(n){this.options=(new iht).merge(n)}return n.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then(function(n){if(n.ok)return n.json();throw new Error("HTTP "+n.status+": "+n.statusText);})},n.prototype.toString=function(){var t=this,u=Object.entries(t.options.queryParams).map(function(n){var t=ki(n,2),i=t[0],r=t[1];return i+"="+r}).join("&"),i=[],r=t.options.path||"";return n.protoRegEx.test(r)?i.push(r):(t.options.domain&&(n.protoRegEx.test(t.options.domain)||(i.push(t.options.protocol+"://"),i.push(t.options.subdomain?t.options.subdomain+".":"")),i.push(t.options.domain)),i.push(t.options.path?"/"+r:"")),i.push(u?"?"+u:""),i.join("")},n.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i),n}(),fe="2.1.4",dh=function(){function n(){}return n.getFullVersion=function(){return fe},n.getEndpointVersion=function(){var n=fe.indexOf(".");return(n=fe.indexOf(".",n+1),n===-1)?fe:fe.substring(0,n)},n}(),cb,lb,vb,ee,yb,pb,wb,bb,yo,kb,db,gb,nf,uk,fk,ek,ok,sk,hk,wa,ck,lk,ko,ak,vk,yk,pk,ba,wk,bk,le,da,ae,kk,tr,dk,nv,td,rd,rv,fd,tc,od,ns,ic,sd,hd,ts,cd,uv,fv,ld,yd,bd,sv,rc,fc,ig,rg,eg,vv,hg,wg,bg,kg,dg,yv,gg,fn,on,it,a,d,g,v,fy,kc,vtt,dc,ytt,ptt,btt,oy,ktt,sy,dtt,gtt,nit,out,i,kut,cl,io,eft,fw,ft,gr,lu,au,get,kf,not,tot,hst,eb,ast,ob,vst;(function(n){n.TopLeft="top-left";n.TopRight="top-right";n.BottomLeft="bottom-left";n.BottomRight="bottom-right";n.NonFixed="non-fixed"})(n.ControlPosition||(n.ControlPosition={}));cb=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i.position=n.ControlPosition.NonFixed,i}return u(i,t),i}(nt);lb=function(){function n(n){if(n){var t=void 0;t=typeof n=="string"?this.getRBGA(n):n;t.length>=3&&(this.r=t[0],this.g=t[1],this.b=t[2],t.length>3&&(this.a=t[3]))}}return n.prototype.getLuminosity=function(){for(var i,r=[this.r,this.g,this.b],n=[],t=0;t<r.length;t++)i=r[t]/255,n[t]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4);return.2126*n[0]+.7152*n[1]+.0722*n[2]},n.prototype.getRBGA=function(n){var r=document.createElement("canvas"),i=r.getContext("2d"),t;return i.globalAlpha=1,i.fillStyle=n,i.fillRect(0,0,1,1),t=i.getImageData(0,0,1,1).data,[t[0],t[1],t[2],t[3]]},n}(),function(n){n.light="light";n.dark="dark";n.auto="auto"}(n.ControlStyle||(n.ControlStyle={}));var er=Map,wr=function(){function n(){this.listeners=new er}return n.prototype._addEventListener=function(n,t,i){this.listeners.has(n)||this.listeners.set(n,new er);this.listeners.get(n).set(t,i)},n.prototype._removeEventListener=function(n,t){this.listeners.has(n)&&this.listeners.get(n).delete(t)},n.prototype._invokeEvent=function(n,t){var i=this;this.listeners.has(n)&&this.listeners.get(n).forEach(function(r,u){r&&i._removeEventListener(n,u);try{u(t)}catch(f){console.error(f)}})},n}(),rht=Object.freeze({__proto__:null,EventEmitter:wr}),or=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i._onStyleChange=function(){if(i._map.getStyle().style.toLowerCase().startsWith("blank"))i._observer||(i._onBackgroundChange(),i._observer=new MutationObserver(i._onBackgroundChange),i._observer.observe(i._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]}));else{i._observer&&(i._observer.disconnect(),delete i._observer);var n=i._map.styles.getTheme(i._map.getStyle());i._setTheme(n)}},i._onBackgroundChange=function(){var r=new lb(i._map.getMapContainer().style.backgroundColor),t=r.getLuminosity(),u=isNaN(t)||t>.5?n.ControlStyle.light:n.ControlStyle.dark;i._setTheme(u)},i}return u(i,t),i.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container);this._map&&(this._map.events.remove("styledata",this._onStyleChange),delete this._map);this._observer&&(this._observer.disconnect(),delete this._observer);delete this._theme},i.prototype.buildContainer=function(t,i,r,u){var f=this;return this._map=t,this._container=document.createElement(u||"div"),this._container.classList.add("azure-maps-control-container"),typeof r=="string"&&this._container.setAttribute("aria-label",r),i.toLowerCase()===n.ControlStyle.auto?this._map.styles.initialize().then(function(){f._map&&(f._onStyleChange(),f._map.events.add("styledata",f._onStyleChange))}):this._container.classList.add(i),this._container},i.prototype._setTheme=function(n){this._theme!==n&&(this._container.classList.remove(this._theme),this._container.classList.add(n),this._theme=n)},i.activateClickDelay=100,i}(wr),uht=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i.rotationDegreesDelta=15,i.style=n.ControlStyle.light,i}return u(i,t),i}(nt),ab=function(t){function i(n){var i=t.call(this)||this;return i.hasMouse=!1,i.hasFocus=!1,i.options=(new uht).merge(n),i}return u(i,t),i.prototype.onAdd=function(n,t){var u=this,r=this.buildContainer(n,this.options.style,"Rotation Control"),e=this.constructRotationButton(n),f=this.constructRotationGrid(n,t);return r.addEventListener("mouseover",function(n){u.lastActiveTime=u.lastActiveTime||n.timeStamp;u.hasMouse=!0;r.classList.add("in-use");f.classList.remove("hidden-accessible-element")}),r.addEventListener("focusin",function(n){u.lastActiveTime=u.lastActiveTime||n.timeStamp;u.hasFocus=!0;r.classList.add("in-use");f.classList.remove("hidden-accessible-element")}),r.addEventListener("mouseleave",function(){u.hasMouse=!1;u.hasFocus||(delete u.lastActiveTime,r.classList.remove("in-use"),f.classList.add("hidden-accessible-element"))}),r.addEventListener("focusout",function(n){n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(u.hasFocus=!1,u.hasMouse||(delete u.lastActiveTime,r.classList.remove("in-use"),f.classList.add("hidden-accessible-element")))}),t&&i.InvertOrderPositions.includes(t.position)?(r.appendChild(f),r.appendChild(e)):(r.appendChild(e),r.appendChild(f)),r},i.prototype.constructRotationGrid=function(n,t){var r=document.createElement("div"),u,f;return r.classList.add("sub-container"),r.classList.add("hidden-accessible-element"),u=this.constructRightRotationButton(n),f=this.constructLeftRotationButton(n),t&&i.InvertOrderPositions.includes(t.position)?(r.appendChild(u),r.appendChild(f)):(r.appendChild(f),r.appendChild(u)),r},i.prototype.constructRotationButton=function(n){var u=this,t=document.createElement("button"),r;return t.classList.add("azure-maps-control-button"),t.classList.add("rotation"),t.setAttribute("title","Reset to Default Rotation"),t.setAttribute("alt","Reset to Default Rotation"),t.setAttribute("type","button"),r=document.createElement("div"),t.appendChild(r),t.addEventListener("click",function(t){t.timeStamp-u.lastActiveTime>or.activateClickDelay&&n.setCamera({bearing:i.DefaultRotation},!0)}),n.events.add("rotate",function(n){r.style.transform="rotate("+-n.map.getCamera().bearing+"deg)"}),t},i.prototype.constructRightRotationButton=function(n){var r=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("rotation-right"),t.setAttribute("title","Rotate Right"),t.setAttribute("alt","Rotate Right"),t.setAttribute("type","button"),t.addEventListener("click",function(){n.setCamera({bearing:n.getCamera().bearing-r.options.rotationDegreesDelta,duration:i.RotationDuration,type:"ease"},!0)}),t},i.prototype.constructLeftRotationButton=function(n){var r=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("rotation-left"),t.setAttribute("title","Rotate Left"),t.setAttribute("alt","Rotate Left"),t.setAttribute("type","button"),t.addEventListener("click",function(){n.setCamera({bearing:n.getCamera().bearing+r.options.rotationDegreesDelta,duration:i.RotationDuration,type:"ease"},!0)}),t},i.DefaultRotation=0,i.RotationDuration=100,i.InvertOrderPositions=[n.ControlPosition.BottomRight,n.ControlPosition.TopRight],i}(or),fht=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i.pitchDegreesDelta=10,i.style=n.ControlStyle.light,i}return u(i,t),i}(nt),eht=function(t){function i(n){var i=t.call(this)||this;return i.container=null,i.map=null,i.pitchIncrementButton=null,i.pitchDecrementButton=null,i.hasMouse=!1,i.hasFocus=!1,i.pitchChanged=function(){return i.updatePitchButtonsState()},i.updatePitchButtonsState=function(){var n=i.map.getCamera().pitch<=0,t=i.map.getCamera().pitch>=60;i.pitchIncrementButton&&i.pitchIncrementButton.disabled!=t&&(i.pitchIncrementButton.disabled=t);i.pitchDecrementButton&&i.pitchDecrementButton.disabled!=n&&(i.pitchDecrementButton.disabled=n)},i.options=(new fht).merge(n),i}return u(i,t),i.prototype.onAdd=function(n,t){var u=this,r=this.buildContainer(n,this.options.style,"Pitch Control"),e=this.constructPitchButton(n),f=this.constructPitchGrid(n,t);return r.addEventListener("mouseover",function(n){u.lastActiveTime=u.lastActiveTime||n.timeStamp;u.hasMouse=!0;r.classList.add("in-use");f.classList.remove("hidden-accessible-element")}),r.addEventListener("focusin",function(n){u.lastActiveTime=u.lastActiveTime||n.timeStamp;u.hasFocus=!0;r.classList.add("in-use");f.classList.remove("hidden-accessible-element")}),r.addEventListener("mouseleave",function(){u.hasMouse=!1;u.hasFocus||(delete u.lastActiveTime,r.classList.remove("in-use"),f.classList.add("hidden-accessible-element"))}),r.addEventListener("focusout",function(n){n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(u.hasFocus=!1,u.hasMouse||(delete u.lastActiveTime,r.classList.remove("in-use"),f.classList.add("hidden-accessible-element")))}),t&&i.INVERT_ORDER_POSITIONS.includes(t.position)?(r.appendChild(f),r.appendChild(e)):(r.appendChild(e),r.appendChild(f)),this.map=n,this.container=r,n.events.add("pitch",this.pitchChanged),r},i.prototype.onRemove=function(){this.container&&(this.container.remove(),this.container=null,this.pitchIncrementButton=null,this.pitchDecrementButton=null);this.map&&(this.map.events.remove("pitch",this.pitchChanged),this.map=null)},i.prototype.constructPitchGrid=function(n,t){var r=document.createElement("div");return r.classList.add("sub-container"),r.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(n),this.pitchDecrementButton=this.constructPitchDecrementButton(n),t&&i.INVERT_ORDER_POSITIONS.includes(t.position)?(r.appendChild(this.pitchDecrementButton),r.appendChild(this.pitchIncrementButton)):(r.appendChild(this.pitchIncrementButton),r.appendChild(this.pitchDecrementButton)),r},i.prototype.constructPitchButton=function(n){var r=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("pitch"),t.setAttribute("title","Reset to Default Pitch"),t.setAttribute("alt","Reset to Default Pitch"),t.setAttribute("type","button"),t.addEventListener("click",function(){event.timeStamp-r.lastActiveTime>or.activateClickDelay&&n.setCamera({pitch:i.DEFAULT_PITCH},!0)}),t},i.prototype.constructPitchDecrementButton=function(n){var r=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("pitch-down"),t.setAttribute("title","Decrease Pitch"),t.setAttribute("alt","Decrease Pitch"),t.setAttribute("type","button"),t.addEventListener("click",function(){n.setCamera({pitch:n.getCamera().pitch-r.options.pitchDegreesDelta,duration:i.PITCH_DURATION_MS,type:"ease"},!0)}),t},i.prototype.constructPitchIncrementButton=function(n){var r=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("pitch-up"),t.setAttribute("title","Increase Pitch"),t.setAttribute("alt","Increase Pitch"),t.setAttribute("type","button"),t.addEventListener("click",function(){n.setCamera({pitch:n.getCamera().pitch+r.options.pitchDegreesDelta,duration:i.PITCH_DURATION_MS,type:"ease"},!0)}),t},i.PITCH_DURATION_MS=100,i.DEFAULT_PITCH=0,i.INVERT_ORDER_POSITIONS=[n.ControlPosition.BottomRight,n.ControlPosition.TopRight],i}(or);vb=oht;ee=sht;var gh=hht,cht=Array.prototype,lht=cht.splice;yb=aht;pb=vht;wb=yht;bb=pht;oe.prototype.clear=vb;oe.prototype["delete"]=yb;oe.prototype.get=pb;oe.prototype.has=wb;oe.prototype.set=bb;yo=oe;kb=wht;db=bht;gb=kht;var ght=dht,nct=typeof ue=="object"&&ue&&ue.Object===Object&&ue,nk=nct,tct=typeof self=="object"&&self&&self.Object===Object&&self,ict=nk||tct||Function("return this")(),sr=ict,rct=sr.Symbol,tu=rct,tk=Object.prototype,uct=tk.hasOwnProperty,fct=tk.toString,po=tu?tu.toStringTag:undefined;var oct=ect,sct=Object.prototype,hct=sct.toString;var lct=cct,act="[object Null]",vct="[object Undefined]",ik=tu?tu.toStringTag:undefined;nf=yct;var iu=pct,wct="[object AsyncFunction]",bct="[object Function]",kct="[object GeneratorFunction]",dct="[object Proxy]";var ya=gct,nlt=sr["__core-js_shared__"],pa=nlt,rk=function(){var n=/[^.]+$/.exec(pa&&pa.keys&&pa.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();var ilt=tlt,rlt=Function.prototype,ult=rlt.toString;var tf=flt,elt=/^\[object .+?Constructor\]$/,olt=Function.prototype,slt=Object.prototype,hlt=olt.toString,clt=slt.hasOwnProperty,llt=RegExp("^"+hlt.call(clt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");uk=alt;fk=vlt;var rf=ylt,plt=rf(sr,"Map"),wo=plt,wlt=rf(Object,"create"),bo=wlt;ek=blt;var dlt=klt,glt="__lodash_hash_undefined__",nat=Object.prototype,tat=nat.hasOwnProperty;var rat=iat,uat=Object.prototype,fat=uat.hasOwnProperty;ok=eat;sk="__lodash_hash_undefined__";hk=oat;se.prototype.clear=ek;se.prototype["delete"]=dlt;se.prototype.get=rat;se.prototype.has=ok;se.prototype.set=hk;wa=se;ck=sat;lk=hat;ko=cat;ak=lat;vk=aat;yk=vat;pk=yat;he.prototype.clear=ck;he.prototype["delete"]=ak;he.prototype.get=vk;he.prototype.has=yk;he.prototype.set=pk;ba=he;wk=200;bk=pat;ce.prototype.clear=kb;ce.prototype["delete"]=db;ce.prototype.get=gb;ce.prototype.has=ght;ce.prototype.set=bk;le=ce;var bat=wat,kat=function(){try{var n=rf(Object,"defineProperty");return n({},"",{}),n}catch(t){}}(),nc=kat;var ka=dat,gat=Object.prototype,nvt=gat.hasOwnProperty;da=tvt;ae=ivt;kk=rvt;tr=uvt;dk="[object Arguments]";var gk=fvt,nd=Object.prototype,evt=nd.hasOwnProperty,ovt=nd.propertyIsEnumerable,svt=gk(function(){return arguments}())?gk:function(n){return tr(n)&&evt.call(n,"callee")&&!ovt.call(n,"callee")},ga=svt,hvt=Array.isArray,uf=hvt;var lvt=cvt,go=nu(function(n,t){var i=t&&!t.nodeType&&t,r=i&&!0&&n&&!n.nodeType&&n,f=r&&r.exports===i,u=f?sr.Buffer:undefined,e=u?u.isBuffer:undefined,o=e||lvt;n.exports=o}),avt=9007199254740991,vvt=/^(?:0|[1-9]\d*)$/;nv=yvt;td=9007199254740991;var id=pvt,ut={};ut["[object Float32Array]"]=ut["[object Float64Array]"]=ut["[object Int8Array]"]=ut["[object Int16Array]"]=ut["[object Int32Array]"]=ut["[object Uint8Array]"]=ut["[object Uint8ClampedArray]"]=ut["[object Uint16Array]"]=ut["[object Uint32Array]"]=!0;ut["[object Arguments]"]=ut["[object Array]"]=ut["[object ArrayBuffer]"]=ut["[object Boolean]"]=ut["[object DataView]"]=ut["[object Date]"]=ut["[object Error]"]=ut["[object Function]"]=ut["[object Map]"]=ut["[object Number]"]=ut["[object Object]"]=ut["[object RegExp]"]=ut["[object Set]"]=ut["[object String]"]=ut["[object WeakMap]"]=!1;rd=wvt;var tv=bvt,ve=nu(function(n,t){var u=t&&!t.nodeType&&t,i=u&&!0&&n&&!n.nodeType&&n,f=i&&i.exports===u,r=f&&nk.process,e=function(){try{var n=i&&i.require&&i.require("util").types;return n?n:r&&r.binding&&r.binding("util")}catch(t){}}();n.exports=e}),ud=ve&&ve.isTypedArray,kvt=ud?tv(ud):rd,iv=kvt,dvt=Object.prototype,gvt=dvt.hasOwnProperty;rv=nyt;fd=Object.prototype;tc=tyt;var ed=iyt,ryt=ed(Object.keys,Object),uyt=ryt,fyt=Object.prototype,eyt=fyt.hasOwnProperty;od=oyt;ns=syt;ic=hyt;sd=cyt;var ayt=lyt,vyt=Object.prototype,yyt=vyt.hasOwnProperty;hd=pyt;ts=wyt;cd=byt;uv=nu(function(n,t){function o(n,t){if(t)return n.slice();var i=n.length,r=f?f(i):new n.constructor(i);return n.copy(r),r}var i=t&&!t.nodeType&&t,r=i&&!0&&n&&!n.nodeType&&n,e=r&&r.exports===i,u=e?sr.Buffer:undefined,f=u?u.allocUnsafe:undefined;n.exports=o});fv=kyt;ld=dyt;var ad=gyt,npt=Object.prototype,tpt=npt.propertyIsEnumerable,vd=Object.getOwnPropertySymbols,ipt=vd?function(n){return n==null?[]:(n=Object(n),ld(vd(n),function(t){return tpt.call(n,t)}))}:ad,ev=ipt;yd=rpt;var pd=upt,fpt=ed(Object.getPrototypeOf,Object),ov=fpt,ept=Object.getOwnPropertySymbols,opt=ept?function(n){for(var t=[];n;)pd(t,ev(n)),n=ov(n);return t}:ad,wd=opt;bd=spt;sv=hpt;rc=cpt;var apt=lpt,vpt=rf(sr,"DataView"),hv=vpt,ypt=rf(sr,"Promise"),cv=ypt,ppt=rf(sr,"Set"),lv=ppt,wpt=rf(sr,"WeakMap"),av=wpt,kd="[object Map]",bpt="[object Object]",dd="[object Promise]",gd="[object Set]",ng="[object WeakMap]",tg="[object DataView]",kpt=tf(hv),dpt=tf(wo),gpt=tf(cv),nwt=tf(lv),twt=tf(av),ff=nf;(hv&&ff(new hv(new ArrayBuffer(1)))!=tg||wo&&ff(new wo)!=kd||cv&&ff(cv.resolve())!=dd||lv&&ff(new lv)!=gd||av&&ff(new av)!=ng)&&(ff=function(n){var t=nf(n),i=t==bpt?n.constructor:undefined,r=i?tf(i):"";if(r)switch(r){case kpt:return tg;case dpt:return kd;case gpt:return dd;case nwt:return gd;case twt:return ng}return t});var is=ff,iwt=Object.prototype,rwt=iwt.hasOwnProperty;var fwt=uwt,ewt=sr.Uint8Array,uc=ewt;fc=owt;ig=swt;rg=/\w*$/;var cwt=hwt,ug=tu?tu.prototype:undefined,fg=ug?ug.valueOf:undefined;eg=lwt;var og=awt,vwt="[object Boolean]",ywt="[object Date]",pwt="[object Map]",wwt="[object Number]",bwt="[object RegExp]",kwt="[object Set]",dwt="[object String]",gwt="[object Symbol]",nbt="[object ArrayBuffer]",tbt="[object DataView]",ibt="[object Float32Array]",rbt="[object Float64Array]",ubt="[object Int8Array]",fbt="[object Int16Array]",ebt="[object Int32Array]",obt="[object Uint8Array]",sbt="[object Uint8ClampedArray]",hbt="[object Uint16Array]",cbt="[object Uint32Array]";var abt=lbt,sg=Object.create,vbt=function(){function n(){}return function(t){if(!iu(t))return{};if(sg)return sg(t);n.prototype=t;var i=new n;return n.prototype=undefined,i}}(),ybt=vbt;vv=pbt;hg="[object Map]";var bbt=wbt,cg=ve&&ve.isMap,kbt=cg?tv(cg):bbt,dbt=kbt,gbt="[object Set]";var tkt=nkt,lg=ve&&ve.isSet,ikt=lg?tv(lg):tkt,rkt=ikt,ukt=1,fkt=2,ekt=4,ag="[object Arguments]",vg="[object Function]",okt="[object GeneratorFunction]",yg="[object Object]",tt={};tt[ag]=tt["[object Array]"]=tt["[object ArrayBuffer]"]=tt["[object DataView]"]=tt["[object Boolean]"]=tt["[object Date]"]=tt["[object Float32Array]"]=tt["[object Float64Array]"]=tt["[object Int8Array]"]=tt["[object Int16Array]"]=tt["[object Int32Array]"]=tt["[object Map]"]=tt["[object Number]"]=tt[yg]=tt["[object RegExp]"]=tt["[object Set]"]=tt["[object String]"]=tt["[object Symbol]"]=tt["[object Uint8Array]"]=tt["[object Uint8ClampedArray]"]=tt["[object Uint16Array]"]=tt["[object Uint32Array]"]=!0;tt["[object Error]"]=tt[vg]=tt["[object WeakMap]"]=!1;var pg=ec,skt=1,hkt=4;var at=ckt,lkt=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i.layout="icons",i.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief",],i.style=n.ControlStyle.light,i.autoSelectionMode=!0,i}return u(i,t),i}(nt),akt=function(t){function i(n){var i=t.call(this)||this;return i.hasMouse=!1,i.hasFocus=!1,i.styleButtons=new er,i.styleIcons=new er,i.onStyleChange=function(){if(i.options.autoSelectionMode){var n=i.map.getStyle().style;i.setSelectedStyle(n)}},i.options=(new lkt).merge(at(n)),i}return u(i,t),i.prototype.onAdd=function(n,t){var f=this;this.map=n;var r=this.buildContainer(n,this.options.style,"Map Style Control"),u=this.buildStyleOpsGrid(r),e=this.buildCurrStyleBtn(r,u);return r.addEventListener("mouseover",function(){f.hasMouse=!0;r.classList.add(i.Css.inUse);u.classList.remove("hidden-accessible-element")}),r.addEventListener("focusin",function(){f.hasFocus=!0;r.classList.add(i.Css.inUse);u.classList.remove("hidden-accessible-element")}),r.addEventListener("mouseleave",function(){f.hasMouse=!1;f.hasFocus||(r.classList.remove(i.Css.inUse),u.classList.add("hidden-accessible-element"))}),r.addEventListener("focusout",function(n){n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(f.hasFocus=!1,f.hasMouse||(r.classList.remove(i.Css.inUse),u.classList.add("hidden-accessible-element")))}),t&&i.InvertOrderPositions.includes(t.position)?(r.appendChild(u),r.appendChild(e)):(r.appendChild(e),r.appendChild(u)),r},i.prototype.onRemove=function(){t.prototype.onRemove.call(this);this.styleButtons.clear();this.map.events.remove("styledata",this.onStyleChange)},i.prototype.setSelectedStyle=function(n){var t,i,r;this.styleIcons.has(n)&&(t=this.currStyleImage,i=this.styleIcons.get(n),t.src!==i&&(t.src=i),r=this.mapToFriendlyStyleName(n),t.alt!==r&&(t.alt=r))},i.prototype.disableStyle=function(n){var t=this.styleButtons[n];t&&t.setAttribute("disabled","true")},i.prototype.enableStyle=function(n){var t=this.styleButtons[n];t&&t.removeAttribute("disabled")},i.prototype.buildSelectStyleBtn=function(n,t){var u=this,r=document.createElement("button"),f=this.mapToFriendlyStyleName(n),e;return r.setAttribute("title",f),r.setAttribute("alt",f),r.setAttribute("type","button"),e=new Image,e.src=t,e.alt=f,r.appendChild(e),this.options.layout==="icons"?r.classList.add(i.Css.button):r.appendChild(document.createTextNode(f)),r.addEventListener("click",function(){var t=u.styleButtons[n];t&&!t.hasAttribute("disabled")&&(u._invokeEvent("styleselected",n),u.options.autoSelectionMode&&u.map.setStyle({style:n}))}),r},i.prototype.buildCurrStyleBtn=function(){var n=document.createElement("button"),t;return n.classList.add(i.Css.button),n.classList.add(i.Css.currentStyle),n.setAttribute("title","Select Style"),n.setAttribute("alt","Select Style"),n.setAttribute("type","button"),this.currStyleImage=new Image,n.appendChild(this.currStyleImage),t=document.createElement("div"),t.classList.add("icon"),n.appendChild(t),n},i.prototype.buildStyleOpsGrid=function(){var n=this,t=document.createElement("div");return t.classList.add(i.Css.styleOptions),t.classList.add(this.options.layout),t.setAttribute("aria-label","Style Options"),t.classList.add("hidden-accessible-element"),this.map.styles.initialize().then(function(){var s,c,h,l=n.map.styles.getDef(),a=n.map.getStyle().style,o,i,r,u;try{for(o=e(l.styles),i=o.next();!i.done;i=o.next())r=i.value,u=r.thumbnail,(u.indexOf(f.stylePathHolder)>-1||u.indexOf(f.styleResourcePlaceholder)>-1)&&(u=new fr({domain:bi.staticAssetsDomain,path:r.thumbnail.replace(f.stylePathHolder,f.stylePath).replace(f.styleResourcePlaceholder,f.styleResourcePath),queryParams:(h={},h[f.apiVersionQueryParameter]=f.styleApiVersion,h)}).toString()),n.styleIcons.set(r.name,u),r.name===a&&(n.currStyleImage.src=u,n.currStyleImage.alt=n.mapToFriendlyStyleName(r.name))}catch(v){s={error:v}}finally{try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error;}}n.options.mapStyles==="all"?n.styleIcons.forEach(function(i,r){var u=n.buildSelectStyleBtn(r,i);t.appendChild(u);n.styleButtons[r]=u}):n.options.mapStyles.filter(function(t){return n.styleIcons.has(t)}).forEach(function(i){var u=n.styleIcons.get(i),r=n.buildSelectStyleBtn(i,u);t.appendChild(r);n.styleButtons[i]=r});n.map.events.add("styledata",n.onStyleChange)}),t},i.prototype.mapToFriendlyStyleName=function(n){return i.StyleNamesMap[n]?i.StyleNamesMap[n]:i.StyleNamesMap[n+"_indoor"]?i.StyleNamesMap[n+"_indoor"]:n},i.InvertOrderPositions=[n.ControlPosition.TopRight,n.ControlPosition.BottomRight],i.Css={button:"azure-maps-control-button",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options"},i.StyleNamesMap={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast (Dark)",high_contrast_light:"High contrast (Light)"},i}(or),vkt=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i.flow="relative",i.incidents=!0,i.isActive=!1,i.style=n.ControlStyle.light,i}return u(i,t),i}(nt),ykt=function(n){function t(t){var i=n.call(this)||this;return i.hasMouse=!1,i.hasFocus=!1,i.options=(new vkt).merge(t),i}return u(t,n),t.prototype.onAdd=function(n){this.container=this.buildContainer(n,this.options.style,"Traffic Control");this.container.style.flexDirection="column";var t=this.constructTrafficButton(n);return this.container.appendChild(t),this.container},t.prototype.getOptions=function(){return at(this.options)},t.prototype.constructTrafficButton=function(n){var i=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("traffic"),t.setAttribute("title","Toggle Traffic Display"),t.setAttribute("alt","Toggle Traffic Display"),t.setAttribute("type","button"),t.addEventListener("click",function(){var t=n.getTraffic();i.options.isActive=!(t.flow!=="none"||t.incidents);i.options.isActive?(n.setTraffic({flow:i.options.flow,incidents:i.options.incidents}),i.container.classList.add("in-use")):(n.setTraffic({flow:"none",incidents:!1}),i.container.classList.remove("in-use"))}),n.events.addOnce("styledata",function(){i.options.isActive&&t.dispatchEvent(new Event("click"))}),t},t}(or),pkt=function(t){function i(){var n=t.call(this)||this;return n.table=["Fast",["green","yellow","red","dark-red"],"Slow"],n}return u(i,t),i.prototype.onAdd=function(t){var i=this.buildContainer(t,n.ControlStyle.auto,"Traffic Legend"),r=this.buildTrafficLegendDiv(t);return i.appendChild(r),i},i.prototype.buildTrafficLegendDiv=function(n){var l,p,c,w,i=document.createElement("div"),v,s,f,r,t,h,o,k,y;i.classList.add("traffic-legend","hidden");i.setAttribute("title","Traffic Legend");i.setAttribute("alt","Traffic Legend");var a=document.createElement("table"),b=document.createElement("tr"),u=document.createElement("td");u.setAttribute("title","Traffic");u.setAttribute("alt","Traffic");u.appendChild(document.createTextNode("Traffic"));u.classList.add("traffic-legend-title");u.colSpan=6;b.appendChild(u);a.appendChild(b);v=document.createElement("tr");try{for(s=e(this.table),f=s.next();!f.done;f=s.next()){if(r=f.value,t=document.createElement("td"),r==="Fast"||r==="Slow")t.setAttribute("title",r),t.setAttribute("alt",r),t.appendChild(document.createTextNode(r)),t.classList.add("traffic-legend-text");else{t.classList.add("traffic-legend-colors");try{for(h=(c=void 0,e(r)),o=h.next();!o.done;o=h.next())k=o.value,y=document.createElement("div"),y.classList.add(k),t.appendChild(y)}catch(d){c={error:d}}finally{try{o&&!o.done&&(w=h.return)&&w.call(h)}finally{if(c)throw c.error;}}}v.appendChild(t)}}catch(g){l={error:g}}finally{try{f&&!f.done&&(p=s.return)&&p.call(s)}finally{if(l)throw l.error;}}return a.appendChild(v),i.appendChild(a),n.events.add("styledata",function(t){if(t.dataType==="style"){var r=n.getTraffic();r.flow&&r.flow!=="none"?i.classList.remove("hidden"):i.classList.add("hidden")}}),i},i}(or),wkt="__lodash_hash_undefined__";wg=bkt;bg=kkt;oc.prototype.add=oc.prototype.push=wg;oc.prototype.has=bg;kg=oc;dg=dkt;var ndt=gkt,tdt=1,idt=2;yv=rdt;gg=udt;var edt=fdt,odt=1,sdt=2,hdt="[object Boolean]",cdt="[object Date]",ldt="[object Error]",adt="[object Map]",vdt="[object Number]",ydt="[object RegExp]",pdt="[object Set]",wdt="[object String]",bdt="[object Symbol]",kdt="[object ArrayBuffer]",ddt="[object DataView]",nn=tu?tu.prototype:undefined,pv=nn?nn.valueOf:undefined;var ngt=gdt,tgt=1,igt=Object.prototype,rgt=igt.hasOwnProperty;var fgt=ugt,egt=1,tn="[object Arguments]",rn="[object Array]",sc="[object Object]",ogt=Object.prototype,un=ogt.hasOwnProperty;fn=sgt;on=en;var ri=hgt,cgt=Object.freeze({__proto__:null,"default":{}}),lgt=gst(cgt),ef=nu(function(n){(function(){function s(n){return(!e||u+n>r.BUFFER_SIZE)&&(u=0,e=r.randomBytes(r.BUFFER_SIZE)),e.slice(u,u+=n)}function o(){var n=s(16);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,n}function r(){var n=o();return t[n[0]]+t[n[1]]+t[n[2]]+t[n[3]]+"-"+t[n[4]]+t[n[5]]+"-"+t[n[6]]+t[n[7]]+"-"+t[n[8]]+t[n[9]]+"-"+t[n[10]]+t[n[11]]+t[n[12]]+t[n[13]]+t[n[14]]+t[n[15]]}for(var e,u=0,t=[],i,f=0;f<256;f++)t[f]=(f+256).toString(16).substr(1);r.BUFFER_SIZE=4096;r.bin=o;r.clearBuffer=function(){e=null;u=0};r.test=function(n){return typeof n=="string"?/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(n):!1};typeof crypto!="undefined"?i=crypto:typeof window!="undefined"&&typeof msCrypto!="undefined"&&(i=window.msCrypto);typeof kst=="function"?(i=i||lgt,n.exports=r):typeof window!="undefined"&&(window.uuid=r);r.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(n){var t=new Uint8Array(n);return i.getRandomValues(t),Array.from(t)}:function(n){var t=new Uint8Array(n);return i.getRandomValues(t),t}}return function(n){for(var i=[],t=0;t<n;t++)i.push(Math.floor(Math.random()*256));return i}}()})()}),ir=function(){function n(t,i,r,u){this.type="Feature";this.type=n.TYPE;this.properties=i||{};this.id=r;this.geometry=t;this.bbox=u}return n.TYPE="Feature",n}(),gt=function(n){function t(t,i){return n.call(this,t,i)||this}return u(t,n),t.fromData=function(n){var i=NaN,r=NaN,u=new Set(["y"]),f=new Set(["x"]);return(Object.keys(n).forEach(function(t){var e=t.toLowerCase();isNaN(i)&&u.has(e)&&typeof n[t]=="number"?i=n[t]:isNaN(r)&&f.has(e)&&typeof n[t]=="number"&&(r=n[t])}),!isNaN(i)&&!isNaN(r))?new t(i,r):null},t.getX=function(n){return n.length>0?n[0]:NaN},t.getY=function(n){return n.length>1?n[1]:NaN},t.getDestination=function(n,i,r){return new t(t.getX(n)+r*Math.cos((i+270)*Math.PI/180),t.getY(n)+r*Math.sin((i+270)*Math.PI/180))},t.getDistance=function(n,i){var r=t.getX(n)-t.getX(i),u=t.getY(n)-t.getY(i);return Math.sqrt(r*r+u*u)},t.getHeading=function(n,i){var r=t.getX(i)-t.getX(n),u=t.getY(n)-t.getY(i);return(5/2*Math.PI-Math.atan2(u,r))*180/Math.PI%360},t}(Array),hr=function(){function n(t){this.type="Point";this.type=n.TYPE;this.coordinates=t}return n.TYPE="Point",n}(),sn=nu(function(n,t){function i(n,t){return n*n+t*t}function u(n,t){return i(n[0]-t[0],n[1]-t[1])}function f(n,t,r){var u=t[0],f=t[1],o=r[0]-u,s=r[1]-f,e;return(o!==0||s!==0)&&(e=((n[0]-u)*o+(n[1]-f)*s)/i(o,s),e>1?(u=r[0],f=r[1]):e>0&&(u+=o*e,f+=s*e)),i(n[0]-u,n[1]-f)}function e(n,t){for(var r=n[0],i,f=[r],e=1,o=n.length;e<o;e++)i=n[e],u(i,r)>t&&(f.push(i),r=i);return r!==i&&f.push(i),f}function r(n,t,i,u,e){for(var c,h=u,o,s=t+1;s<i;s++)c=f(n[s],n[t],n[i]),c>h&&(o=s,h=c);h>u&&(o-t>1&&r(n,t,o,u,e),e.push(n[o]),i-o>1&&r(n,o,i,u,e))}function o(n,t){var u=n.length-1,i=[n[0]];return r(n,0,u,t,i),i.push(n[u]),i}function s(n,t,i){if(t===void 0&&(t=1),i===void 0&&(i=!1),n.length<=2)return n;var r=t*t;return n=i?n:e(n,r),o(n,r)}t.__esModule=!0;t.SimplifyAP=s});dst(sn);var agt=sn.SimplifyAP,hc=6378137,vgt=Math.PI/180,hn=180/Math.PI,cn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];(function(n){n.squareMeters="squareMeters";n.acres="acres";n.hectares="hectares";n.squareFeet="squareFeet";n.squareKilometers="squareKilometers";n.squareMiles="squareMiles";n.squareYards="squareYards"})(it||(it={})),function(n){n.meters="meters";n.kilometers="kilometers";n.feet="feet";n.miles="miles";n.nauticalMiles="nauticalMiles";n.yards="yards"}(a||(a={})),function(n){n.seconds="seconds";n.hours="hours";n.ms="ms";n.minutes="minutes";n.days="days"}(d||(d={})),function(n){n.metersPerSecond="metersPerSecond";n.kilometersPerHour="kilometersPerHour";n.feetPerSecond="feetPerSecond";n.milesPerHour="milesPerHour";n.knots="knots";n.mach="mach"}(g||(g={})),function(n){n.milesPerSecondSquared="milesPerSecondSquared";n.kilometersPerSecondSquared="kilometersPerSecondSquared";n.knotsPerSecond="knotsPerSecond";n.standardGravity="standardGravity";n.feetPerSecondSquared="feetPerSecondSquared";n.yardsPerSecondSquared="yardsPerSecondSquared";n.milesPerHourSecond="milesPerHourSecond";n.kilometersPerHourSecond="kilometersPerHourSecond";n.metersPerSecondSquared="metersPerSecondSquared"}(v||(v={}));var fi=function(n){function t(t,i,r){var u=this;return r?n.call(this,t,i,r)||this:n.call(this,t,i)||this}return u(t,n),t.fromPosition=function(n){return n.length===2?new t(n[0],n[1]):n.length>2?new t(n[0],n[1],n[2]):null},t.areEqual=function(n,t,i){var u;if(typeof i=="undefined"&&(i=6),n&&n.length>=2&&t&&t.length>=2){var r=Math.pow(10,i),f=vt(n[1]),e=vt(t[1]),o=st(n[0]),s=st(t[0]),h=Math.round((f-e)*r)/r;return h!==0?!1:(u=Math.round((o-s)*r)/r,u!==0&&u!==360)?!1:!0}return!1},t.fromLatLng=function(n,t,i){var r=[];if(typeof n=="number")r.push(n),typeof t=="number"&&r.push(t),typeof i=="number"&&r.push(i);else if(Array.isArray(n))n.length>=2&&typeof n[0]=="number"&&typeof n[1]=="number"&&(n.length>=3&&typeof n[2]=="number"?r.push(n[0],n[1],n[2]):r.push(n[0],n[1]));else if(typeof n=="object"){var o=["lat","latitude","y"],s=["lng","longitude","lon","x"],h=["elv","elevation","alt","altitude","z"],u=NaN,f=NaN,e=NaN;Object.keys(n).forEach(function(t){var i=t.toLowerCase();isNaN(u)&&o.indexOf(i)>=0&&typeof n[t]=="number"?u=n[t]:isNaN(f)&&s.indexOf(i)>=0&&typeof n[t]=="number"?f=n[t]:isNaN(e)&&h.indexOf(i)>=0&&typeof n[t]=="number"&&(e=n[t])});isNaN(u)||isNaN(f)||(r.push(f,u),isNaN(e)||r.push(e))}return r.length>=2?r:null},t.fromLatLngs=function(n){var u=[],i,f,r;if(Array.isArray(n))for(i=0,f=n.length;i<f;i++)r=t.fromLatLng(n[i]),r&&u.push(r);return u},t._getDimensions=function(n){for(var t=0;Array.isArray(n);)n=n[0],t++;return typeof n=="number"&&t--,t},t}(Array),lc=function(){function n(t,i){this.type="Polygon";this.type=n.TYPE;this.coordinates=fi._getDimensions(t)===1?[t]:t;this.bbox=i}return n.TYPE="Polygon",n}(),ac=function(){function n(t,i){this.M=n._calculateAffineTransform(t,i);this.inverseM=n._calculateAffineTransform(i,t)}return n.prototype.toTarget=function(n,t){if(typeof n!==undefined)return this.transformArray(n,this.M,t);throw new Error("Invalid sourcePoints specified.");},n.prototype.toSource=function(n,t){if(typeof n!==undefined)return this.transformArray(n,this.inverseM,t);throw new Error("Invalid targetPoints specified.");},n.prototype.transformArray=function(n,t,i){var f,s,o,u,r,h;if(n&&Array.isArray(n)&&Array.isArray(n[0])){o=[];try{for(u=e(n),r=u.next();!r.done;r=u.next())h=r.value,o.push(this.transform(h,t,i))}catch(c){f={error:c}}finally{try{r&&!r.done&&(s=u.return)&&s.call(u)}finally{if(f)throw f.error;}}return o}return null},n.prototype.transform=function(n,t,i){var r=n[0]*t[0][3]+n[1]*t[1][3]+t[2][3],u=n[0]*t[0][4]+n[1]*t[1][4]+t[2][4];return typeof i=="number"&&i>=0?[oi(r,i),oi(u,i)]:[oi(r,6),oi(u,6)]},n._calculateAffineTransform=function(n,t){var u,s,o,e,r,i,f;if(n.length!==t.length||n.length<1)throw new Error("Error: source and target arrays must have the same length.");if(u=Math.min(n[0].length,t[0].length),s=u+1,n.length<u)throw new Error("Erorr: At least "+u+" reference points required.");for(o=[],e=[],r=0;r<s;r++){for(e[r]=[],i=0;i<s;i++)for(i<u&&(o[i]=0),e[r][i]=0,f=0;f<n.length;f++)i<u&&(o[i]+=r<u?n[f][r]*t[f][i]:t[f][i]),e[r][i]+=r>=u&&i>=u?1:r>=u?n[f][i]:i>=u?n[f][r]:n[f][r]*n[f][i];e[r]=e[r].concat(o)}if(!this._gaussJordanElimination(e))throw new Error("Error: Singular matrix. Points are likely coplanar.");return e},n._gaussJordanElimination=function(n){for(var f,e,o,i,s,h,r=n.length,c=2*r-1,u,l,t=0;t<r;t++){for(f=t,i=t+1;i<r;i++)Math.abs(n[i][t])>Math.abs(n[f][t])&&(f=i);if(l=n[f],n[f]=n[t],n[t]=l,Math.abs(n[t][t])<=1e-10)return!1;for(e=t+1;e<r;e++)for(u=n[e][t]/n[t][t],o=t;o<c;o++)n[e][o]-=n[t][o]*u}for(t=r-1;t>-1;t--){for(u=n[t][t],i=0;i<t;i++)for(s=c-1;s>t-1;s--)n[i][s]-=n[t][s]*n[i][t]/u;for(n[t][t]/=u,h=r;h<c;h++)n[t][h]/=u}return!0},n}(),ont=Object.freeze({__proto__:null,AffineTransform:ac,_precision:oi,get AreaUnits(){return it},get DistanceUnits(){return a},get TimeUnits(){return d},get SpeedUnits(){return g},get AccelerationUnits(){return v},boundingBoxToPolygon:wgt,convertDistance:ru,getCardinalSpline:bgt,getDestination:ye,getDistanceTo:ai,getEarthRadius:dn,getGeodesicPath:kgt,getHeading:uu,getLengthOfPath:kv,getPositionAlongPath:gn,getRegularPolygonPath:ntt,interpolate:dv,normalizeLatitude:vt,normalizeLongitude:st,rotatePositions:ttt,getPixelHeading:dgt,mercatorPixelsToPositions:gv,mercatorPositionsToPixels:us,convertAcceleration:ny,convertArea:itt,convertSpeed:fs,convertTimespan:es,getAcceleration:rtt,getAccelerationFromSpeeds:utt,getAccelerationFromFeatures:ggt,getArea:ftt,getSpeed:nnt,getSpeedFromFeatures:tnt,getTimespan:ett,getTravelDistance:int,parseTimestamp:ty,getConvexHull:rnt,getPositions:of,getPosition:ui,getPositionsAlongPath:unt,getPointWithHeadingAlongPath:ott,getPointsWithHeadingsAlongPath:fnt,getClosestPointOnGeometry:cc,simplify:ent}),yt=function(n){function t(i,r,u){var e=n.call(this)||this,o,f;return i.type==="Feature"?(f=i,o=at(f.geometry),u=f.properties?at(f.properties):{},r=f.id==null||f.id===""?ef():f.id):(o=at(i),r=r==null||r===""?ef():r,u=u?at(u):{}),u[t._shapeIdPropName]=r,e.data=new ir(o,u,r),e._handleCircle(),e}return u(t,n),t.prototype.addProperty=function(n,t){ri(this.data.properties[n],t)||(this.data.properties[n]=at(t),(n==="subType"||n==="radius")&&this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},t.prototype.getBounds=function(){var h,a,l,v,f=this.getCoordinates(),t,i=this.getType(),o,r,y,n,s,u,p;if(i==="Point")this.circlePolygon?(n=this.circlePolygon.geometry.coordinates,t=c.fromPositions(n[0])):(n=f,t=new c(n,n));else if(i==="MultiPoint"||i==="LineString")n=f,t=c.fromPositions(n);else if(i==="Polygon")n=f,t=c.fromPositions(n[0]);else if(i==="MultiLineString"){n=f;try{for(o=e(n),r=o.next();!r.done;r=o.next())y=r.value,t=c.merge(t,c.fromPositions(y))}catch(w){h={error:w}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(h)throw h.error;}}}else if(i==="MultiPolygon"){n=f;try{for(s=e(n),u=s.next();!u.done;u=s.next())p=u.value,t=c.merge(t,c.fromPositions(p[0]))}catch(b){l={error:b}}finally{try{u&&!u.done&&(v=s.return)&&v.call(s)}finally{if(l)throw l.error;}}}return t},t.prototype.getCoordinates=function(){return at(this.data.geometry.coordinates)},t.prototype.getCircleCoordinates=function(){return this.circlePolygon?at(this.circlePolygon.geometry.coordinates[0]):null},t.prototype.getId=function(){return this.data.id},t.prototype.getProperties=function(){return at(this.data.properties)},t.prototype.getType=function(){return this.data.geometry.type},t.prototype.isCircle=function(){return t._isCircle(this.data)},t.prototype.isRectangle=function(){return t._isRectangle(this.data)},t.prototype.setCoordinates=function(n){var t;t=this.getType()==="Polygon"&&fi._getDimensions(n)===1?[n]:n;ri(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=at(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},t.prototype.setProperties=function(n){n[t._shapeIdPropName]=this.data.id;ri(this.data.properties,n)||(this.data.properties=at(n),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},t.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},t.prototype._toJson=function(){return this.circlePolygon||this.data},t.prototype._setDataSource=function(n){n===undefined||n==null?delete this.dataSource:this.dataSource=n},t.prototype._handleCircle=function(){if(this.isCircle()){var n=t._getCirclePositions(this.data);this.circlePolygon=new ir(new lc([n]),this.data.properties,this.data.id);this.data.properties.subType="Circle"}else delete this.circlePolygon},t._isCircle=function(n){return n&&n.geometry&&n.geometry.type==="Point"&&n.geometry.coordinates&&n.properties&&typeof n.properties.subType=="string"&&n.properties.subType.toLowerCase()==="circle"&&typeof n.properties.radius=="number"},t._isRectangle=function(n){var i,t;if(n.geometry.type==="Polygon"&&n.geometry.coordinates&&typeof n.properties.subType=="string"&&n.properties.subType.toLowerCase()==="rectangle"&&(i=n.geometry.coordinates,i.length===1)){if(t=i[0],t.length===5)return t[0][0]===t[4][0]&&t[0][1]===t[4][1];if(t.length===4)return!0}return!1},t._getCirclePositions=function(n){return ntt(n.geometry.coordinates,n.properties.radius,72,"meters")},t._shapeIdPropName="_azureMapsShapeId",t}(wr),c=function(n){function t(t,i){var f=this,u,r;return t&&i?(u=t,f=u[2]&&i[2]?n.call(this,u[0],u[1],u[2]||0,i[0],i[1],i[2]||0)||this:n.call(this,u[0],u[1],i[0],i[1])||this):t&&(r=t,r&&(r.length===4?f=n.call(this,r[0],r[1],r[2],r[3])||this:r.length>=6&&(f=n.call(this,r[0],r[1],r[2],r[3],r[4],r[5])||this))),f}return u(t,n),t.fromBoundingBox=function(n){var i=t.getWest(n),r=t.getSouth(n),u=t.getEast(n),f=t.getNorth(n);return new t([i,r,u,f])},t.fromDimensions=function(n,i,r){var u=n[0],f=n[1],e=Math.min(Math.max(f+r/2,-85.5),85.5),o=Math.min(Math.max(f-r/2,-85.5),85.5),s=st(u+i/2),h=st(u-i/2);return new t([h,o,s,e])},t.fromEdges=function(n,i,r,u){return new t([n,i,r,u])},t.containsPosition=function(n,i){var u=1e-8,f=t.getCenter(n),s=Math.abs(f[1]-i[1]),r=Math.abs(f[0]-i[0]),e,o;return r>180&&(r=360-r),e=t.getHeight(n),o=t.getWidth(n),s<=e/2+u&&r<=o/2+u},t.containsBoundingBox=function(n,i){var r=n&&n.length===4,u=i&&i.length===4;return!r||!u?!1:t.getWest(n)<t.getWest(i)&&t.getWest(i)<t.getEast(n)&&t.getWest(n)<t.getEast(i)&&t.getEast(i)<t.getEast(n)&&t.getSouth(n)<t.getSouth(i)&&t.getSouth(i)<t.getNorth(n)&&t.getSouth(n)<t.getNorth(i)&&t.getNorth(i)<t.getNorth(n)},t.crossesAntimeridian=function(n){var i=st(t.getEast(n)),r=st(t.getWest(n));return i-r<0||t.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(n)||t.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(n)},t.getCenter=function(n){var i=st(t.getEast(n)),r=st(t.getWest(n));r>i&&(i+=360);var u=st((r+i)/2),f=vt(t.getSouth(n)),e=vt(t.getNorth(n)),o=vt((f+e)/2);return[u,o]},t.getHeight=function(n){var r=vt(t.getNorth(n)),u=vt(t.getSouth(n)),i=r-u;return isNaN(i)?0:i},t.getWidth=function(n){var r=st(t.getEast(n)),u=st(t.getWest(n)),i=r-u;return isNaN(i)?0:i<0?i+=360:i},t.getSouthWest=function(n){var t=this.getSouth(n),i=this.getWest(n);return isNaN(t)||isNaN(i)?null:[i,t]},t.getNorthEast=function(n){var t=this.getNorth(n),i=this.getEast(n);return isNaN(t)||isNaN(i)?null:[i,t]},t.getNorthWest=function(n){var t=this.getNorth(n),i=this.getWest(n);return isNaN(t)||isNaN(i)?null:[i,t]},t.getSouthEast=function(n){var t=this.getSouth(n),i=this.getEast(n);return isNaN(t)||isNaN(i)?null:[i,t]},t.getSouth=function(n){return n&&n.length>=4?Number(n[1]):NaN},t.getWest=function(n){return n&&n.length>=4?Number(n[0]):NaN},t.getNorth=function(n){if(n){if(n.length===4)return Number(n[3]);if(n.length===6)return Number(n[4])}return NaN},t.getEast=function(n){if(n){if(n.length===4)return Number(n[2]);if(n.length===6)return Number(n[3])}return NaN},t.intersect=function(n,i){var u=t.getCenter(n),f=t.getCenter(i),e=Math.abs(u[1]-f[1]),r=Math.abs(u[0]-f[0]);r>180&&(r=360-r);var o=t.getHeight(n),s=t.getWidth(n),h=t.getHeight(i),c=t.getWidth(i);return e<=o/2+h/2&&r<=s/2+c/2},t.merge=function(n,i){var s=n&&n.length===4,h=i&&i.length===4,u,e,o,v;if(s&&!h)return n;if(h&&!s)return i;if(!s&&!h)return null;for(var k=Math.max(vt(t.getNorth(n)),vt(t.getNorth(i))),d=Math.min(vt(t.getSouth(n)),vt(t.getSouth(i))),y=[n,i],f=[],r=0,r=0;r<y.length;r++){var c=y[r],p=st(t.getWest(c)),w=st(t.getEast(c));t.crossesAntimeridian(c)?(f.push([p,180]),f.push([-180,w])):f.push([p,w])}for(f.sort(function(n,t){return n[0]===t[0]?n[1]-t[1]:n[0]-t[0]}),u=[],e=f[0],r=1;r<f.length;)o=f[r],e[1]>=o[0]?e[1]=Math.max(e[1],o[1]):(u.push(e),e=o),r++;u.push(e);var l=u.length,b=u[0][0]+360-u[l-1][1],a=[u[l-1][1],u[0][0]];for(r=1;r<l;r++)v=u[r][0]-u[r-1][1],v>b&&(b=v,a=[u[r-1][1],u[r][0]]);return new t([a[1],d],[a[0],k])},t.fromPositions=function(n){for(var f=NaN,e=NaN,c=NaN,l=NaN,o,i=n.length,r=new Array(i),u=0,s,a,h,v;i--;)o=n[i],o&&o.length>=2&&(s=vt(o[1]),f=isNaN(f)?s:Math.max(f,s),e=isNaN(e)?s:Math.min(e,s),r[u++]=st(o[0]));if(u){for(r.length=u,r.sort(function(n,t){return n-t}),a=r[0]+360-r[u-1],h=0,i=1;i<u;i++)v=r[i]-r[i-1],v>a&&(a=v,h=i);c=r[h];l=r[(h||u)-1]}return isNaN(c)||isNaN(e)||isNaN(l)||isNaN(f)?null:new t([c,e,l,f])},t.fromLatLngs=function(n){return t.fromPositions(fi.fromLatLngs(n))},t.fromData=function(n){var y,p,u,r=null,c,s,w,i,o,l,h,f,a,v,b;if(Array.isArray(n)&&n.length>0){try{for(c=e(n),s=c.next();!s.done;s=c.next())w=s.value,u=t.fromData(w),u!=null&&(r=r===null?u:t.merge(r,u))}catch(k){y={error:k}}finally{try{s&&!s.done&&(p=c.return)&&p.call(c)}finally{if(y)throw y.error;}}return r}if(n instanceof yt)return n.getBounds();if(n&&n.type){if(i=n,i.bbox&&i.bbox.length===4)return i.bbox;switch(i.type){case"FeatureCollection":return t.fromData(i.features);case"Feature":return yt._isCircle(i)?t.fromPositions(yt._getCirclePositions(i)):t.fromData(i.geometry);case"GeometryCollection":return t.fromData(i.geometries);case"Point":if(o=i.coordinates,o&&o.length>=2)return[o[0],o[1],o[0],o[1]];break;case"LineString":case"MultiPoint":return t.fromPositions(i.coordinates);case"Polygon":case"MultiLineString":if(l=i.coordinates,l&&l.length>0){for(f=0,a=l.length;f<a;f++)u=t.fromPositions(l[f]),u!=null&&(r=r===null?u:t.merge(r,u));if(r!=null)return r}break;case"MultiPolygon":if(h=i.coordinates,h&&h.length>0){for(f=0,a=h.length;f<a;f++)for(v=0,b=h[f].length;v<b;v++)u=t.fromPositions(h[f][v]),u!=null&&(r=r===null?u:t.merge(r,u));return r}}}return null},t.splitOnAntimeridian=function(n){var u=[];if(t.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(n))return[[-180,n[1],n[2],180,n[4],n[5]]];if(t.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(n))return[[-180,n[1],180,n[3]]];if(t.crossesAntimeridian(n)){var f=void 0,e=void 0,o=st(t.getWest(n)),s=st(t.getEast(n)),i=vt(t.getNorth(n)),r=vt(t.getSouth(n));n.length>=6?(f=[o,r,n[2],180,i,n[5]],e=[-180,r,n[2],s,i,n[5]]):(f=[o,r,180,i],e=[-180,r,s,i]);u.push(f,e)}else u.push(n);return u},t.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(n){return n.length>=6&&n[3]-n[0]>360},t.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(n){return n.length<6&&n[2]-n[0]>360},t}(Array),sf=function(){function n(t,i){this.type="FeatureCollection";this.type=n.TYPE;this.features=t;this.bbox=i}return n.TYPE="FeatureCollection",n}(),snt=function(){function n(t){this.type="GeometryCollection";this.type=n.TYPE;this.geometries=t}return n.TYPE="GeometryCollection",n}(),hnt=function(){function n(t,i){this.type="LineString";this.type=n.TYPE;this.coordinates=t;this.bbox=i}return n.TYPE="LineString",n}(),cnt=function(){function n(t,i){this.type="MultiLineString";this.type=n.TYPE;this.coordinates=t;this.bbox=i}return n.TYPE="MultiLineString",n}(),lnt=function(){function n(t,i){this.type="MultiPoint";this.type=n.TYPE;this.coordinates=t;this.bbox=i}return n.TYPE="MultiPoint",n}(),ant=function(){function n(t,i){this.type="MultiPolygon";this.type=n.TYPE;this.coordinates=t;this.bbox=i}return n.TYPE="MultiPolygon",n}(),vnt=Object.freeze({__proto__:null,Feature:ir,FeatureCollection:sf,LineString:hnt,Point:hr,Polygon:lc,Position:fi,BoundingBox:c,MultiLineString:cnt,MultiPoint:lnt,MultiPolygon:ant,GeometryCollection:snt}),ynt=function(t){function i(){var i=t!==null&&t.apply(this,arguments)||this;return i.zoomDelta=1,i.style=n.ControlStyle.light,i}return u(i,t),i}(nt),pnt=function(n){function t(t){var i=n.call(this)||this;return i.container=null,i.zoomInButton=null,i.zoomOutButton=null,i.zoomChanged=function(){return i.updateZoomButtonsState()},i.minZoomChanged=function(){return i.updateZoomButtonsState()},i.maxZoomChanged=function(){return i.updateZoomButtonsState()},i.options=(new ynt).merge(t),i}return u(t,n),t.prototype.onAdd=function(n){return this.container=this.buildContainer(n,this.options.style,"Zoom Control"),this.container.style.flexDirection="column",this.zoomInButton=this.constructZoomInButton(n),this.zoomOutButton=this.constructZoomOutButton(n),this.container.appendChild(this.zoomInButton),this.container.appendChild(this.zoomOutButton),n.events.add("zoom",this.zoomChanged),n.events.add("minzoomchanged",this.minZoomChanged),n.events.add("maxzoomchanged",this.maxZoomChanged),this.map=n,this.container},t.prototype.onRemove=function(){this.map&&(this.map.events.remove("zoom",this.zoomChanged),this.map.events.remove("minzoomchanged",this.minZoomChanged),this.map.events.remove("maxzoomchanged",this.maxZoomChanged),this.map=null);this.container&&(this.container.remove(),this.container=null,this.zoomInButton=null,this.zoomOutButton=null)},t.prototype.updateZoomButtonsState=function(){var n=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),r=c.getSouth(this.map.getCamera().bounds)<=-t.WEBMERCATOR_MAXLAT&&c.getNorth(this.map.getCamera().bounds)>=t.WEBMERCATOR_MAXLAT,i=this.map.getCamera().zoom<=this.map._getMap().getMinZoom()||r;this.zoomInButton&&this.zoomInButton.disabled!=n&&(this.zoomInButton.disabled=n);this.zoomOutButton&&this.zoomOutButton.disabled!=i&&(this.zoomOutButton.disabled=i)},t.prototype.constructZoomInButton=function(n){var r=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("zoom-in"),i.setAttribute("title","Zoom In"),i.setAttribute("alt","Zoom In"),i.setAttribute("type","button"),i.addEventListener("click",function(){n.setCamera({zoom:n.getCamera().zoom+r.options.zoomDelta,duration:t.ZOOM_DURATION_MS,type:"ease"},!0)}),i},t.prototype.constructZoomOutButton=function(n){var r=this,i=document.createElement("button");return i.classList.add("azure-maps-control-button"),i.classList.add("zoom-out"),i.setAttribute("title","Zoom Out"),i.setAttribute("alt","Zoom Out"),i.setAttribute("type","button"),i.addEventListener("click",function(){n.setCamera({zoom:n.getCamera().zoom-r.options.zoomDelta,duration:t.ZOOM_DURATION_MS,type:"ease"},!0)}),i},t.WEBMERCATOR_MAXLAT=85.0511,t.ZOOM_DURATION_MS=200,t}(or),wnt=Object.freeze({__proto__:null,ControlBase:or,PitchControl:eht,CompassControl:ab,ZoomControl:pnt,StyleControl:akt,TrafficControl:ykt,TrafficLegendControl:pkt}),bnt=1,knt=4;var w=dnt,stt=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMaxZoom=undefined,t.clusterProperties=undefined,t.lineMetrics=!1,t.tolerance=.375,t}return u(t,n),t}(nt),ct=function(n){function t(t){var i=n.call(this)||this;return i.id=t||ef(),i}return u(t,n),t.prototype.getId=function(){return this.id},t.prototype._setMap=function(n){if(n==null||n===undefined){var t=this.map;delete this.map;this._invokeEvent("sourceremoved",this);t&&t.events.invoke("sourceremoved",this)}else this.map=n,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this)},t}(wr),cr=function(n){function t(t,i){var r=n.call(this,t)||this;return r.requestId=undefined,r.options=(new stt).merge(at(i)),r.shapes=[],r.shapesMap=new er,r}return u(t,n),t.prototype.add=function(n,t){this._addNoUpdate(n,t);this._updateSource()},t.prototype.clear=function(){this._clearNoUpdate();this._updateSource()},t.prototype.dispose=function(){this.options=null;this.shapes=null;this.shapesMap=null;this.map=null},t.prototype.getClusterExpansionZoom=function(n){var t=this;return new Promise(function(i,r){if(!t.map){r("The DataSource hasn't been added to a map.");return}var u=t.map._getMap().getSource(t.getId());u&&u.type==="geojson"&&u.getClusterExpansionZoom(n,function(n,t){if(n){r(n);return}if(typeof t=="number"){i(t);return}})})},t.prototype.getClusterChildren=function(n){var t=this;return new Promise(function(i,r){if(!t.map){r("The DataSource hasn't been added to a map.");return}var u=t.map._getMap().getSource(t.getId());u&&u.type==="geojson"&&u.getClusterChildren(n,function(n,u){if(n){r(n);return}if(u){i(t.map.sources._mapFeaturesToShapes(u,!1,t));return}})})},t.prototype.getClusterLeaves=function(n,t,i){var r=this;return new Promise(function(u,f){if(!r.map){f("The DataSource hasn't been added to a map.");return}var e=r.map._getMap().getSource(r.getId());e&&e.type==="geojson"&&e.getClusterLeaves(n,t,i,function(n,t){if(n){f(n);return}if(t){u(r.map.sources._mapFeaturesToShapes(t,!1,r));return}})})},t.prototype.getOptions=function(){return at(this.options)},t.prototype.getShapes=function(){return Array.from(this.shapes)},t.prototype.importDataFromUrl=function(n){var t=this;return fetch(n,{method:"GET",mode:"cors"}).then(function(n){if(n.ok)return n.json();throw new Error("HTTP "+n.status+": "+n.statusText);}).then(function(n){t.add(n)})},t.prototype.getShapeById=function(n){return this.shapes[this.shapesMap.get(n)]||null},t.prototype.remove=function(n){var u,f,o=Array.isArray(n)?n:[n],i,t,r;try{for(i=e(o),t=i.next();!t.done;t=i.next())r=t.value,typeof r=="number"?this._removeByIndex(r):this._removeById(r)}catch(s){u={error:s}}finally{try{t&&!t.done&&(f=i.return)&&f.call(i)}finally{if(u)throw u.error;}}this._updateSource()},t.prototype.removeById=function(n){var r,u,o=Array.isArray(n)?n:[n],i,t,f;try{for(i=e(o),t=i.next();!t.done;t=i.next())f=t.value,this._removeById(f)}catch(s){r={error:s}}finally{try{t&&!t.done&&(u=i.return)&&u.call(i)}finally{if(r)throw r.error;}}this._updateSource()},t.prototype.setOptions=function(n){var t=(new stt).merge(this.options,at(n));ri(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},t.prototype.setShapes=function(n){this._clearNoUpdate();this.add(n)},t.prototype.toJson=function(){return new sf(this.shapes.map(function(n){return n.toJson()}))},t.prototype._toJson=function(){return new sf(this.shapes.map(function(n){return n._toJson()}))},t.prototype._buildSource=function(){var n={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer};return typeof this.options.clusterMaxZoom=="number"&&(n.clusterMaxZoom=this.options.clusterMaxZoom),n},t.prototype._addNoUpdate=function(n,t){var i,r;n instanceof yt?(this._addToSources(n,t),i=[n]):Array.isArray(n)?(i=n.map(function(n){return n instanceof yt?n:new yt(n)}),this._addToSources(i,t)):n.type==="FeatureCollection"?(i=n.features.map(function(n){return new yt(n)}),this._addToSources(i,t)):n.type==="GeometryCollection"?(i=n.geometries.map(function(n){return new yt(n)}),this._addToSources(i,t)):(r=new yt(n),this._addToSources(r,t),i=[r]);this._invokeEvent("dataadded",i)},t.prototype._clearNoUpdate=function(){var n=this.shapes;this.shapes=[];this.shapesMap=new er;n&&n.length>0&&this._invokeEvent("dataremoved",n)},t.prototype._updateSource=function(){var n=this;this.requestId===undefined&&(this.requestId=requestAnimationFrame(function(){n._updateMboxSource();n.requestId=undefined}))},t.prototype._addToSources=function(n,t){var h,l,c,a,u,i,s,o,r,f;if(n=Array.isArray(n)?n:[n],typeof t!="number")try{for(u=e(n),i=u.next();!i.done;i=u.next())f=i.value,this.shapes.push(f),this.shapesMap.set(f.getId(),this.shapes.length-1)}catch(v){h={error:v}}finally{try{i&&!i.done&&(l=u.return)&&l.call(u)}finally{if(h)throw h.error;}}else for(s=n.length-1;s>=0;s--)this.shapes.splice(t,0,n[s]),this._updateShapesMap(t);try{for(o=e(n),r=o.next();!r.done;r=o.next())f=r.value,f._setDataSource(this)}catch(y){c={error:y}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(c)throw c.error;}}},t.prototype._removeById=function(n){var t,i=n instanceof yt?n.getId():typeof n=="string"||typeof n=="number"?n:n.id;t=this.shapes[this.shapesMap.get(i)];t&&(t._setDataSource(null),this.shapes.splice(this.shapesMap.get(i),1),this._updateShapesMap(this.shapesMap.get(i)),this.shapesMap.delete(i),this._invokeEvent("dataremoved",[t]))},t.prototype._removeByIndex=function(n){var t;if(n>=this.shapes.length)throw new Error("The specified remove index '"+n+"' "+("is greater than the maximum possible index '"+(this.shapes.length-1)+"'"));t=this.shapes[n];this.shapesMap.delete(t.getId());t._setDataSource(null);this.shapes.splice(n,1);this._updateShapesMap(n);this._invokeEvent("dataremoved",[t])},t.prototype._updateShapesMap=function(n){for(var t=n;t<this.shapes.length;t++)this.shapesMap.set(this.shapes[t].getId(),t)},t.prototype._updateMboxSource=function(){if(this.map&&this.map._getMap()){var n=this.map._getMap().getSource(this.getId());n&&n.type==="geojson"&&n.setData(this._toJson())}},t}(ct),gnt=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.bounds=undefined,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=undefined,t.url=undefined,t}return u(t,n),t}(nt),htt=function(n){function t(t,i){var r=n.call(this,t)||this;return r.options=(new gnt).merge(at(i)),r}return u(t,n),t.prototype.getOptions=function(){return at(this.options)},t.prototype.getShape=function(n,t){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:n,filter:t})},t.prototype._buildSource=function(){var n={type:"vector"};return this.options.bounds&&(n.bounds=this.options.bounds),this.options.tiles?(n.tiles=this.options.tiles,n.minzoom=this.options.minZoom,n.maxzoom=this.options.maxZoom):this.options.url&&(n.url=this.options.url),this.options.isTMS&&(n.scheme="tms"),n},t}(ct),nti=Object.freeze({__proto__:null,Source:ct,DataSource:cr,VectorTileSource:htt}),et=function(n){function t(t){var i=n.call(this)||this;return i.id=t||ef(),i}return u(t,n),t.prototype.getId=function(){return this.id},t.prototype.getMap=function(){return this.map||null},t.prototype.onAdd=function(n){this.map=n;this._invokeEvent("layeradded",this);this.map.events.invoke("layeradded",this)},t.prototype.onRemove=function(){var n=this.map;delete this.map;this._invokeEvent("layerremoved",this);n&&n.events.invoke("layerremoved",this)},t._isMBoxEvent=function(n){return!this.LayerEvents.hasOwnProperty(n)},t.prototype._updateBaseProperties=function(n,t){this._updateFilter(n.filter,t.filter);this._updateZoomRange(n.minZoom,t.minZoom,n.maxZoom,t.maxZoom);this._updateLayoutProperty("visibility",n.visible,t.visible,n.visible?"visible":"none")},t.prototype._updateFilter=function(n,t){ri(n,t)||this.map._getMap().setFilter(this.id,n)},t.prototype._updatePaintProperty=function(n,t,i,r){ri(t,i)||this.map._getMap().setPaintProperty(this.id,n,r||t)},t.prototype._updateLayoutProperty=function(n,t,i,r){ri(t,i)||this.map._getMap().setLayoutProperty(this.id,n,r||t)},t.prototype._updateZoomRange=function(n,t,i,r){(n!==t||r!==i)&&this.map._getMap().setLayerZoomRange(this.id,n,i)},t.LayerEvents={layeradded:undefined,layerremoved:undefined},t}(wr),hf=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.filter=undefined,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}return u(t,n),t._cloneCustomizer=function(n){if(n instanceof ct)return n},t}(nt),os=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.source=undefined,t.sourceLayer=undefined,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t}return u(t,n),t}(hf),iy=function(n){function t(t,i,r){var u=n.call(this,i)||this;return u.options=(new os).merge(w(r,os._cloneCustomizer)),u.options.source=t||u.options.source,u}return u(t,n),t.prototype.getOptions=function(){return w(this.options,os._cloneCustomizer)},t.prototype.getSource=function(){return this.options.source},t.prototype.setOptions=function(n){var t=(new os).merge(this.options,w(n,os._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updatePaintProperty("circle-blur",t.blur,this.options.blur);this._updatePaintProperty("circle-color",t.color,this.options.color);this._updatePaintProperty("circle-opacity",t.opacity,this.options.opacity);this._updatePaintProperty("circle-radius",t.radius,this.options.radius);this._updatePaintProperty("circle-stroke-color",t.strokeColor,this.options.strokeColor);this._updatePaintProperty("circle-stroke-opacity",t.strokeOpacity,this.options.strokeOpacity);this._updatePaintProperty("circle-stroke-width",t.strokeWidth,this.options.strokeWidth);this._updatePaintProperty("circle-pitch-alignment",t.pitchAlignment,this.options.pitchAlignment)}this.options=t},t.prototype._buildLayers=function(){var n={id:this.id,type:"circle",source:this.options.source instanceof ct?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(n.filter=this.options.filter),this.options.sourceLayer&&(n["source-layer"]=this.options.sourceLayer),[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._getSourceIds=function(){var n=new Set;return this.options.source instanceof ct?n.add(this.options.source.getId()):n.add(this.options.source),n},t}(et),ss=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.source=undefined,t.sourceLayer=undefined,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radius=30,t.weight=1,t}return u(t,n),t._cloneCustomizer=function(n){if(n instanceof ct)return n},t}(hf),tti=function(n){function t(t,i,r){var u=n.call(this,i)||this;return u.options=(new ss).merge(w(r,ss._cloneCustomizer)),u.options.source=t||u.options.source,u}return u(t,n),t.prototype.getOptions=function(){return w(this.options,ss._cloneCustomizer)},t.prototype.getSource=function(){return this.options.source},t.prototype.setOptions=function(n){var t=(new ss).merge(this.options,w(n,ss._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updatePaintProperty("heatmap-color",t.color,this.options.color);this._updatePaintProperty("heatmap-intensity",t.intensity,this.options.intensity);this._updatePaintProperty("heatmap-opacity",t.opacity,this.options.opacity);this._updatePaintProperty("heatmap-radius",t.radius,this.options.radius);this._updatePaintProperty("heatmap-weight",t.weight,this.options.weight)}this.options=t},t.prototype._buildLayers=function(){var n={id:this.id,type:"heatmap",source:this.options.source instanceof ct?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(n.filter=this.options.filter),this.options.sourceLayer&&(n["source-layer"]=this.options.sourceLayer),[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._getSourceIds=function(){var n=new Set;return this.options.source instanceof ct?n.add(this.options.source.getId()):n.add(this.options.source),n},t}(et),ctt=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}return u(t,n),t}(hf),hs=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.url=undefined,t.coordinates=undefined,t}return u(t,n),t._cloneCustomizer=function(n){if(n instanceof ct)return n},t}(ctt),vc=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return u(t,n),t.prototype._getSourceIds=function(){var n=new Set;return n.add(this._getSourceId()),n},t}(et),iti=function(n){function t(t,i){var r=n.call(this,i)||this;return r.isLoading=!1,r.options=(new hs).merge(w(t,hs._cloneCustomizer)),r.img=new Image,r.reloadImage(),r}return u(t,n),t.prototype.getOptions=function(){return w(this.options,hs._cloneCustomizer)},t.prototype.setOptions=function(n){var t=(new hs).merge(this.options,w(n,hs._cloneCustomizer)),r=typeof n.url=="string"&&n.url!==this.getOptions().url,u=typeof n.coordinates!="undefined"&&n.coordinates!==this.getOptions().coordinates,i;this.map&&(this._updateBaseProperties(t,this.options),this._updatePaintProperty("raster-contrast",t.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",t.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",t.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",t.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",t.saturation,this.options.saturation),i=this.map._getMap().getSource(this._getSourceId()),i&&i.updateImage(t));this.options=t;r?this.reloadImage():u&&this.updateTransform()},t.prototype.getPositions=function(n){return this.transform.then(function(t){return t.toTarget(n)})},t.prototype.getPixels=function(n){return this.transform.then(function(t){return t.toSource(n)})},t.getCoordinatesFromRefPoints=function(n,t,i,r){var u=new ac(i,r);return u.toTarget([[0,0],[n,0],[n,t],[0,t]])},t.getCoordinatesFromEdges=function(n,t,i,r,u){typeof u!="number"&&(u=0);var f=[Math.min(r,i),t,Math.max(r,i),n],e=c.getCenter(f),o=c.getNorthWest(f),s=c.getNorthEast(f),h=c.getSouthEast(f),l=c.getSouthWest(f);return ttt([o,s,h,l],e,u)},t.prototype._buildLayers=function(){var n={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(n.filter=this.options.filter),[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},t.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},t.prototype.reloadImage=function(){var n=this;this.options.url&&(this.transform=new Promise(function(t,i){n.img.onload=function(){var i=[[0,0],[n.img.width,0],[n.img.width,n.img.height],[0,n.img.height]];t(new ac(i,n.options.coordinates));n.isLoading=!1};n.img.onerror=n.img.onabort=function(){i("Failed to load image")};n.isLoading=!0;n.img.src=n.options.url}))},t.prototype.updateTransform=function(){if(!this.isLoading){var n=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]];this.transform=Promise.resolve(new ac(n,this.options.coordinates))}},t}(vc),cs=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.source=undefined,t.sourceLayer=undefined,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=undefined,t.strokeGradient=undefined,t.offset=0,t.strokeOpacity=1,t.translate=new gt(0,0),t.translateAnchor="map",t.strokeWidth=2,t}return u(t,n),t}(hf),ry=function(n){function t(t,i,r){var u=n.call(this,i)||this;return u.options=(new cs).merge(w(r,cs._cloneCustomizer)),u.options.source=t||u.options.source,u}return u(t,n),t.prototype.getOptions=function(){return w(this.options,cs._cloneCustomizer)},t.prototype.getSource=function(){return this.options.source},t.prototype.setOptions=function(n){var t=(new cs).merge(this.options,w(n,cs._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updatePaintProperty("line-blur",t.blur,this.options.blur);this._updateLayoutProperty("line-cap",t.lineCap,this.options.lineCap);this._updateLayoutProperty("line-join",t.lineJoin,this.options.lineJoin);this._updatePaintProperty("line-offset",t.offset,this.options.offset);this._updatePaintProperty("line-color",t.strokeColor,this.options.strokeColor);this._updatePaintProperty("line-dasharray",t.strokeDashArray,this.options.strokeDashArray);this._updatePaintProperty("line-gradient",t.strokeGradient,this.options.strokeGradient);this._updatePaintProperty("line-opacity",t.strokeOpacity,this.options.strokeOpacity);this._updatePaintProperty("line-width",t.strokeWidth,this.options.strokeWidth);this._updatePaintProperty("line-translate",t.translate,this.options.translate);this._updatePaintProperty("line-translate-anchor",t.translateAnchor,this.options.translateAnchor)}this.options=t},t.prototype._buildLayers=function(){var n=o(o(o(o({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof ct?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:o(o(o({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray&&{"line-dasharray":this.options.strokeDashArray}),this.options.strokeGradient&&{"line-gradient":this.options.strokeGradient}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._getSourceIds=function(){var n=new Set;return this.options.source instanceof ct?n.add(this.options.source.getId()):n.add(this.options.source),n},t}(et),ls=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.source=undefined,t.sourceLayer=undefined,t.base=0,t.fillColor="#1E90FF",t.height=0,t.fillOpacity=1,t.fillPattern=undefined,t.translate=new gt(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}return u(t,n),t}(hf),rti=function(n){function t(t,i,r){var u=n.call(this,i)||this;return u.options=(new ls).merge(w(r,ls._cloneCustomizer)),u.options.source=t||u.options.source,u}return u(t,n),t.prototype.getOptions=function(){return w(this.options,ls._cloneCustomizer)},t.prototype.getSource=function(){return this.options.source},t.prototype.setOptions=function(n){var t=(new ls).merge(this.options,w(n,ls._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updatePaintProperty("fill-extrusion-base",t.base,this.options.base);this._updatePaintProperty("fill-extrusion-color",t.fillColor,this.options.fillColor);this._updatePaintProperty("fill-extrusion-height",t.height,this.options.height);this._updatePaintProperty("fill-extrusion-opacity",t.fillOpacity,this.options.fillOpacity);this._updatePaintProperty("fill-extrusion-pattern",t.fillPattern,this.options.fillPattern);this._updatePaintProperty("fill-extrusion-translate",t.translate,this.options.translate);this._updatePaintProperty("fill-extrusion-translate-anchor",t.translateAnchor,this.options.translateAnchor);this._updatePaintProperty("fill-extrusion-vertical-gradient",t.verticalGradient,this.options.verticalGradient)}this.options=t},t.prototype._buildLayers=function(){var n=o(o(o(o({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof ct?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:o(o({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._getSourceIds=function(){var n=new Set;return this.options.source instanceof ct?n.add(this.options.source.getId()):n.add(this.options.source),n},t}(et),as=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.source=undefined,t.sourceLayer=undefined,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=undefined,t}return u(t,n),t.prototype.merge=function(){for(var u,f,i,t,o,s,h,l,c=[],r=0;r<arguments.length;r++)c[r]=arguments[r];u=!1;f=!1;try{for(i=e(c),t=i.next();!t.done;t=i.next())o=t.value,o&&(o.hasOwnProperty("fillColor")?(u=!0,f=!1):o.hasOwnProperty("fillPattern")&&(f=!0,u=!1))}catch(a){h={error:a}}finally{try{t&&!t.done&&(l=i.return)&&l.call(i)}finally{if(h)throw h.error;}}return s=n.prototype.merge.apply(this,dt(c)),u?s.fillPattern=undefined:f&&(s.fillColor=undefined),s},t}(hf),uy=function(n){function t(t,i,r){var u=n.call(this,i)||this;return u.options=(new as).merge(w(r,as._cloneCustomizer)),u.options.source=t||u.options.source,u}return u(t,n),t.prototype.getOptions=function(){return w(this.options,as._cloneCustomizer)},t.prototype.getSource=function(){return this.options.source},t.prototype.setOptions=function(n){var t=(new as).merge(this.options,w(n,as._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updatePaintProperty("fill-color",t.fillColor,this.options.fillColor);this._updatePaintProperty("fill-opacity",t.fillOpacity,this.options.fillOpacity);this._updatePaintProperty("fill-pattern",t.fillPattern,this.options.fillPattern)}this.options=t},t.prototype._buildLayers=function(){var n={id:this.id,type:"fill",source:this.options.source instanceof ct?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(n.filter=this.options.filter),this.options.sourceLayer&&(n["source-layer"]=this.options.sourceLayer),this.options.fillPattern?n.paint["fill-pattern"]=this.options.fillPattern:n.paint["fill-color"]=this.options.fillColor,[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._getSourceIds=function(){var n=new Set;return this.options.source instanceof ct?n.add(this.options.source.getId()):n.add(this.options.source),n},t}(et),uti=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new gt(0,0),t.optional=!1,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}return u(t,n),t}(nt),fti=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=undefined,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.offset=new gt(0,0),t.optional=!1,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}return u(t,n),t}(nt),vs=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.source=undefined,t.sourceLayer=undefined,t.iconOptions=new uti,t.textOptions=new fti,t.placement="point",t.lineSpacing=250,t}return u(t,n),t}(hf),yc=function(n){function t(t,i,r){var u=n.call(this,i)||this;return u.options=(new vs).merge(w(r,vs._cloneCustomizer)),u.options.source=t||u.options.source,u}return u(t,n),t.prototype.getOptions=function(){return w(this.options,vs._cloneCustomizer)},t.prototype.getSource=function(){return this.options.source},t.prototype.setOptions=function(n){var t=(new vs).merge(this.options,w(n,vs._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updateLayoutProperty("symbol-spacing",t.lineSpacing,this.options.lineSpacing);this._updateLayoutProperty("symbol-placement",t.placement,this.options.placement);this._updateLayoutProperty("icon-allow-overlap",t.iconOptions.allowOverlap,this.options.iconOptions.allowOverlap);this._updateLayoutProperty("icon-anchor",t.iconOptions.anchor,this.options.iconOptions.anchor);this._updateLayoutProperty("icon-ignore-placement",t.iconOptions.ignorePlacement,this.options.iconOptions.ignorePlacement);this._updateLayoutProperty("icon-image",t.iconOptions.image,this.options.iconOptions.image);this._updateLayoutProperty("icon-offset",t.iconOptions.offset,this.options.iconOptions.offset);this._updatePaintProperty("icon-opacity",t.iconOptions.opacity,this.options.iconOptions.opacity);this._updateLayoutProperty("icon-optional",t.iconOptions.optional,this.options.iconOptions.optional);this._updateLayoutProperty("icon-pitch-alignment",t.iconOptions.pitchAlignment,this.options.iconOptions.pitchAlignment);this._updateLayoutProperty("icon-rotate",t.iconOptions.rotation,this.options.iconOptions.rotation);this._updateLayoutProperty("icon-rotation-alignment",t.iconOptions.rotationAlignment,this.options.iconOptions.rotationAlignment);this._updateLayoutProperty("icon-size",t.iconOptions.size,this.options.iconOptions.size);this._updateLayoutProperty("text-allow-overlap",t.textOptions.allowOverlap,this.options.textOptions.allowOverlap);this._updateLayoutProperty("text-anchor",t.textOptions.anchor,this.options.textOptions.anchor);this._updatePaintProperty("text-color",t.textOptions.color,this.options.textOptions.color);this._updateLayoutProperty("text-font",t.textOptions.font,this.options.textOptions.font);this._updateLayoutProperty("text-ignore-placement",t.textOptions.ignorePlacement,this.options.textOptions.ignorePlacement);this._updatePaintProperty("text-halo-blur",t.textOptions.haloBlur,this.options.textOptions.haloBlur);this._updatePaintProperty("text-halo-color",t.textOptions.haloColor,this.options.textOptions.haloColor);this._updatePaintProperty("text-halo-width",t.textOptions.haloWidth,this.options.textOptions.haloWidth);this._updateLayoutProperty("text-offset",t.textOptions.offset,this.options.textOptions.offset);this._updatePaintProperty("text-opacity",t.textOptions.opacity,this.options.textOptions.opacity);this._updateLayoutProperty("text-optional",t.textOptions.optional,this.options.textOptions.optional);this._updateLayoutProperty("text-pitch-alignment",t.textOptions.pitchAlignment,this.options.textOptions.pitchAlignment);this._updateLayoutProperty("text-rotate",t.textOptions.rotation,this.options.textOptions.rotation);this._updateLayoutProperty("text-rotation-alignment",t.textOptions.rotationAlignment,this.options.textOptions.rotationAlignment);this._updateLayoutProperty("text-size",t.textOptions.size,this.options.textOptions.size);this._updateLayoutProperty("text-field",t.textOptions.textField,this.options.textOptions.textField)}this.options=t},t.prototype._buildLayers=function(){var n=o(o(o(o({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof ct?this.options.source.getId():this.options.source,layout:o(o({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._getSourceIds=function(){var n=new Set;return this.options.source instanceof ct?n.add(this.options.source.getId()):n.add(this.options.source),n},t}(et),ys=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=undefined,t.tileUrl=undefined,t}return u(t,n),t}(ctt),pc=function(n){function t(t,i){var r=n.call(this,i)||this;return t&&r.setOptions(t),r}return u(t,n),t.prototype.getOptions=function(){return w(this.options,ys._cloneCustomizer)},t.prototype.setOptions=function(n){var t=(new ys).merge(this.options,w(n,ys._cloneCustomizer));if(this.map){if(!ri(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!ri(t.subdomains,this.options.subdomains)||t.tileSize!==this.options.tileSize||t.tileUrl!==this.options.tileUrl){this.options=t;this.map.layers.add(this);return}this._updateBaseProperties(t,this.options);this._updatePaintProperty("raster-contrast",t.contrast,this.options.contrast);this._updatePaintProperty("raster-fade-duration",t.fadeDuration,this.options.fadeDuration);this._updatePaintProperty("raster-hue-rotate",t.hueRotation,this.options.hueRotation);this._updatePaintProperty("raster-brightness-max",t.maxBrightness,this.options.maxBrightness);this._updatePaintProperty("raster-opacity",t.opacity,this.options.opacity);this._updatePaintProperty("raster-saturation",t.saturation,this.options.saturation)}this.options=t},t.prototype._setOptionsNoUpdate=function(n){this.options=(new ys).merge(this.options,w(n,ys._cloneCustomizer))},t.prototype._buildLayers=function(){var n=o(o({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return[n]},t.prototype._getLayerIds=function(){return[this.id]},t.prototype._buildSource=function(){var r,f,i,u,t,n,s;if(this.options.tileUrl)if(this.options.tileUrl.indexOf("{")!==-1)if(this.options.tileUrl.indexOf("{subdomain}")!==-1)if(this.options.subdomains&&this.options.subdomains.length>0){u=[];try{for(t=e(this.options.subdomains),n=t.next();!n.done;n=t.next())s=n.value,u.push(this.options.tileUrl.replace(/{subdomain}/g,s))}catch(h){r={error:h}}finally{try{n&&!n.done&&(f=t.return)&&f.call(t)}finally{if(r)throw r.error;}}i=u}else throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");else i=[this.options.tileUrl];else return{type:"raster",url:this.options.tileUrl};return o({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},i&&{tiles:i})},t.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},t}(vc),eti=Object.freeze({__proto__:null,BubbleLayer:iy,Layer:et,LineLayer:ry,PolygonExtrusionLayer:rti,PolygonLayer:uy,SymbolLayer:yc,TileLayer:pc,HeatMapLayer:tti,ImageLayer:iti}),wc=function(){function n(){}return n.convertHtmlString=function(n){if(typeof n=="string"){var t=document.createElement("div");return t.innerHTML=n,t}return n},n.parseWithFilter=function(n,t,i,r){var o=this,u,f,e;if(t===void 0&&(t=function(){return!0}),i===void 0&&(i=function(n){return n}),r===void 0&&(r=function(){return document.createElement("div")}),typeof n=="string"){if(f=(new DOMParser).parseFromString(n,"text/html").body,f.children.length==0)return i(f.innerHTML);f.children.length==1&&f.childNodes.length==1?u=f.children[0]:(e=r(),Array.from(f.childNodes).map(function(n){return e.append(n)}),u=e)}else u=n;return Array.from(u.children).forEach(function(n){return o.parseWithFilter(n,t,i)}),t(u)?i(u):(u.parentNode&&u.parentNode.removeChild(u),null)},n}(),oti="[object Object]",sti=Function.prototype,hti=Object.prototype,ltt=sti.toString,cti=hti.hasOwnProperty,lti=ltt.call(Object);fy=ati;var att=vti,ps=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new gt(0,0),t.position=new fi(0,0),t.showPointer=!0,t}return u(t,n),t._cloneCustomizer=function(n){if(att(n))return n},t}(nt),bc=function(n){function t(i){var r=n.call(this)||this;return r.attach=function(n){r.map!==n&&(r.map&&r.remove(),r.map=n,r.marker=r._createMarker(r.options),r.marker.addTo(r.map._getMap()),r.map.popups._getCollectionDiv().appendChild(r.containerDiv),r.map.popups.add(r))},r.open=function(n){if(!n&&!r.map)throw new Error("Must specify a map to open on or attach to a map in advance");r.attach(n||r.map);r.containerDiv.classList.remove(t.Css.hidden);r.map.events.add("move",r._onMove);r._onMove();r._invokeEvent("open",{target:r,type:"open"})},r.close=function(){r.map&&r.map.events.remove("move",r._onMove);r.containerDiv.classList.add(t.Css.hidden);r._invokeEvent("close",{target:r,type:"close"})},r.remove=function(){r.map&&(r.marker.remove(),r.containerDiv.classList.remove(r.autoAnchor||r.options.anchor),r.map.events.remove("move",r._onMove),r.map.popups.remove(r),delete r.map,delete r.marker,delete r.autoAnchor)},r.isOpen=function(){return r.map&&!r.containerDiv.classList.contains(t.Css.hidden)},r._onMove=function(){var n=r._getAutoAnchor(r.map,r.options);n!==r.autoAnchor&&(r._replaceMarker(r.map,r.options,n),r.map.events.add("move",r._onMove))},r._onDown=function(n){r.map.popups._addDraggedPopup(r);var i=ki(r.map.positionsToPixels([r.options.position]),1),t=i[0];n.type==="mousedown"?(n=n,r.dragOffset=[t[0]-n.clientX,t[1]-n.clientY]):n.type==="touchstart"&&(n=n,r.dragOffset=[t[0]-n.touches[0].clientX,t[1]-n.touches[0].clientY])},r._onDragStart=function(n){n.preventDefault()},r.options=(new ps).merge(w(i,ps._cloneCustomizer)),r.containerDiv=r._createContainerDiv(r.options),r.contentDiv=r._createContentDiv(r.options),r.containerDiv.appendChild(r.contentDiv),r.options.showPointer&&(r.arrowDiv=r._createArrowDiv(),r.containerDiv.appendChild(r.arrowDiv)),r.options.closeButton&&(r.closeBtn=r._createCloseButton(),r.contentDiv.appendChild(r.closeBtn)),r}return u(t,n),t.prototype.setPopupOptions=function(n){this.setOptions(n)},t.prototype.setOptions=function(n){var t=(new ps).merge(this.options,w(n,ps._cloneCustomizer));t.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(t),this.contentDiv.prepend(this.htmlContent)):t.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,t.draggable);t.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn)):!t.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn);t.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!t.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv);t.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=t.fillColor,this.contentDiv.style.backgroundColor=t.fillColor);this.marker&&(t.anchor!==this.options.anchor?this.options.anchor==="none"?(this.autoAnchor!==t.anchor&&this._replaceMarker(this.map,t),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,t),t.anchor==="none"&&this.map.events.add("move",this._onMove)):(ri(t.position,this.options.position)||this.marker.setLngLat(t.position),ri(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset)));this.options=t},t.prototype.getPopupOptions=function(){return this.getOptions()},t.prototype.getOptions=function(){return w(this.options,ps._cloneCustomizer)},t.prototype._dragToPixel=function(n){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));var t=[n[0]+this.dragOffset[0],n[1]+this.dragOffset[1]],i=ki(this.map.pixelsToPositions([t]),1),r=i[0];this.options.position=r;this.marker.setLngLat(this.options.position);this._invokeEvent("drag",{type:"drag",target:this})},t.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),this.options.anchor==="none"&&this._onMove());delete this.dragOffset;delete this.dragging},t.prototype._createContainerDiv=function(n){var r=this,i=document.createElement("div"),u;return i.classList.add(t.Css.container),i.classList.add(t.Css.hidden),i.style.borderColor=n.fillColor,i.setAttribute("role","dialog"),i.setAttribute("aria-label","Map Information Window"),u=!1,i.addEventListener("keydown",function(n){(n.key==="Tab"||n.key==="Escape"||n.key==="Esc")&&(u=!0)}),i.addEventListener("keyup",function(n){(n.key==="Tab"||n.key==="Escape"||n.key==="Esc")&&(u=!1)}),i.addEventListener("focusin",function(n){r.map&&!r.isOpen()&&(r.open(r.map),n.target instanceof HTMLElement&&n.target.focus())}),i.addEventListener("focusout",function(n){u&&n.relatedTarget instanceof Node&&!i.contains(n.relatedTarget)&&(u=!1,r.isOpen()&&r.close())}),i},t.prototype._createContentDiv=function(n){var i=document.createElement("div");return i.classList.add(t.Css.content),i.style.backgroundColor=n.fillColor,i.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(n),i.appendChild(this.htmlContent),i},t.prototype._createArrowDiv=function(){var n=document.createElement("div");return n.classList.add(t.Css.arrow),n},t.prototype._createCloseButton=function(){var n=document.createElement("button");return n.addEventListener("click",this.close),n.classList.add(t.Css.close),n.setAttribute("aria-label","close"),n.setAttribute("title","close"),n.setAttribute("tabindex","0"),n.innerHTML="&times;",n},t.prototype._createHtmlContent=function(n){var t=wc.convertHtmlString(n.content);return n.draggable&&this._setDraggable(t,n.draggable),t},t.prototype._createMarker=function(n,t){var r=this.marker?this.marker.getLngLat():n.position,i;return n.anchor==="none"?(this.autoAnchor=t||"bottom",this.containerDiv.classList.add(this.autoAnchor),i=new aa({anchor:this.autoAnchor,element:this.containerDiv,offset:n.pixelOffset}).setLngLat(r)):(this.containerDiv.classList.add(n.anchor),i=new aa({anchor:n.anchor,element:this.containerDiv,offset:n.pixelOffset}).setLngLat(r)),i},t.prototype._getAutoAnchor=function(n,t){var e=this.containerDiv.offsetWidth,o=this.containerDiv.offsetHeight,r,u,f,i;if(this.marker)f=n._getMap().project(this.marker.getLngLat()),r=f.x,u=f.y;else{var h=ki(n.positionsToPixels([t.position]),1),s=ki(h[0],2),c=s[0],l=s[1];r=c;u=l}return i=[],u<o?i.push("top"):u>n.getCanvas().offsetHeight-o&&i.push("bottom"),r<e/2?i.push("left"):r>n.getCanvas().offsetWidth-e/2&&i.push("right"),i.length>0?i.join("-"):"bottom"},t.prototype._replaceMarker=function(n,t,i){var r=this.containerDiv.nextElementSibling;this.marker.remove();this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor);this.marker=this._createMarker(t,i);this.marker.addTo(n._getMap());n.popups._getCollectionDiv().insertBefore(this.containerDiv,r||null)},t.prototype._setDraggable=function(n,t){t?(n.addEventListener("mousedown",this._onDown),n.addEventListener("touchstart",this._onDown),n.addEventListener("dragstart",this._onDragStart)):(n.removeEventListener("mousedown",this._onDown),n.removeEventListener("touchstart",this._onDown),n.removeEventListener("dragstart",this._onDragStart))},t.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},t}(wr),ws=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'+ef()+'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z"   fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}<\/text><\/svg>',t.pixelOffset=new gt(0,0),t.position=new fi(0,0),t.popup=undefined,t.secondaryColor="white",t.text=undefined,t.visible=!0,t}return u(t,n),t._cloneCustomizer=function(n){if(n instanceof bc||att(n))return n},t}(nt),ey=function(n){function t(t){var i=n.call(this)||this;return i._onDrag=function(){var n=i.marker.getLngLat().wrap();i.options.position=new fi(n.lng,n.lat);i._invokeEvent("drag",{type:"drag",target:i})},i._onDragStart=function(){i._invokeEvent("dragstart",{type:"dragstart",target:i})},i._onDragEnd=function(){i._invokeEvent("dragend",{type:"dragend",target:i})},i._bubbleElementEvent=function(n){i._invokeEvent(n.type,{type:n.type,target:i})},i._onEleDragStart=function(n){n.preventDefault()},i.options=(new ws).merge(w(t,ws._cloneCustomizer)),i._buildMarker(i.options),i}return u(t,n),t.prototype.getOptions=function(){return w(this.options,ws._cloneCustomizer)},t.prototype.getElement=function(){return this.marker.getElement()},t.prototype.setOptions=function(n){var i=(new ws).merge(this.options,w(n,ws._cloneCustomizer));ri(i.htmlContent,this.options.htmlContent)&&i.anchor===this.options.anchor?(typeof i.htmlContent=="string"&&(i.color!==this.options.color||i.text!==this.options.text||i.secondaryColor!==this.options.secondaryColor)&&(this.element.innerHTML=this._getSubbedHtmlString(i)),i.draggable!==this.options.draggable&&(this._setDraggable(i.draggable),this.marker.setDraggable(i.draggable)),ri(i.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(i.pixelOffset),ri(i.position,this.options.position)||this.marker.setLngLat(i.position),i.visible!==this.options.visible&&(i.visible?this.element.classList.remove(t.hiddenClass):this.element.classList.add(t.hiddenClass))):(this.marker.remove(),this._buildMarker(i),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element)));this.options=i},t.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else if(this.map)this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map);else throw new Error("The marker must be added to a map before calling togglePopup().");},t.prototype._addToMap=function(n,t){this.map&&this.map!==n&&this._removeFromMap();t&&(this.options.position=at(t),this.marker.setLngLat(this.options.position));this.map!==n&&(this.map=n,this.marker.addTo(n._getMap()),this._getCollectionContainer().appendChild(this.element))},t.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},t.prototype._getId=function(){return this.element?typeof this.options.htmlContent=="string"?this.element.firstChild.id:this.element.id:undefined},t.prototype._buildMarker=function(n){if(typeof n.htmlContent=="string"){var i=this._getSubbedHtmlString(n);this.element=wc.convertHtmlString(i)}else this.element=n.htmlContent;this.element.classList.add(t.containerClass);n.draggable&&this._setDraggable(!0);n.visible||this.element.classList.add(t.hiddenClass);this.marker=new aa({element:this.element,offset:n.pixelOffset,draggable:n.draggable,anchor:n.anchor}).setLngLat(n.position);this.marker.on("drag",this._onDrag);this.marker.on("dragstart",this._onDragStart);this.marker.on("dragend",this._onDragEnd);this.element.addEventListener("click",this._bubbleElementEvent);this.element.addEventListener("dblclick",this._bubbleElementEvent);this.element.addEventListener("contextmenu",this._bubbleElementEvent);this.element.addEventListener("keydown",this._bubbleElementEvent);this.element.addEventListener("keypress",this._bubbleElementEvent);this.element.addEventListener("keyup",this._bubbleElementEvent);this.element.addEventListener("mousedown",this._bubbleElementEvent);this.element.addEventListener("mouseenter",this._bubbleElementEvent);this.element.addEventListener("mouseleave",this._bubbleElementEvent);this.element.addEventListener("mousemove",this._bubbleElementEvent);this.element.addEventListener("mouseout",this._bubbleElementEvent);this.element.addEventListener("mouseover",this._bubbleElementEvent);this.element.addEventListener("mouseup",this._bubbleElementEvent)},t.prototype._getSubbedHtmlString=function(n){if(typeof n.htmlContent=="string")return n.htmlContent.replace(/{color}/ig,n.color||"").replace(/{secondaryColor}/ig,n.secondaryColor||"").replace(/{text}/ig,n.text||"")},t.prototype._getCollectionContainer=function(){var n=this.map.getCanvasContainer().querySelector("."+t.collectionContainerClass);return n||(n=document.createElement("div"),n.classList.add(t.collectionContainerClass),this.map.getCanvasContainer().appendChild(n)),n},t.prototype._setDraggable=function(n){n?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},t.collectionContainerClass="marker-collection-container",t.hiddenClass="hidden-accessible-element",t.containerClass="marker-container",t}(wr);kc=yti;var wti=pti,bti=wti(),kti=bti;vtt=dti;dc=gti;ytt=nii;ptt=tii;btt=wtt;oy=iii;ktt=rii;sy=Math.max;dtt=uii;var eii=fii,oii=nc?function(n,t){return nc(n,"toString",{configurable:!0,enumerable:!1,value:eii(t),writable:!0})}:oy,sii=oii,hii=800,cii=16,lii=Date.now;var vii=aii,yii=vii(sii),pii=yii;gtt=wii;nit=bii;var dii=kii,gii=dii(function(n,t,i){btt(n,t,i)}),nri=gii,tit=function(){function n(){}return n.parse=function(n){n=n.toLowerCase();var t=n.lastIndexOf("-");return t!==-1?{code:n,language:n.substring(0,t),region:n.substring(t+1)}:{code:n,language:n}},n}(),cf={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}}}},tri=function(){function n(){this.Unknown="Unknown";this.Accident="Accident";this.Fog="Fog";this.Danger="Danger";this.Rain="Rain";this.Ice="Ice";this.Jam="Jam";this.LaneClosed="Lane Closed";this.RoadClosed="Road Closed";this.RoadWorks="Road Works";this.Wind="Wind";this.Flood="Flood";this.Detour="Detour"}return n}(),gc=function(){function n(){}return n.getCode=function(n){var t=tit.parse(n);return cf.sensitiveUserRegions.indexOf(t.region)===-1?this.getLocaleData(t).code:n},n.getStrings=function(n){var t=this.getLocaleData(n),i=new fr({domain:bi.staticAssetsDomain,path:cf.localizationsPath+"/"+t.strings}).get();return i.then(function(n){return n},function(){return new tri})},n.getLocaleData=function(n){if(typeof n=="string"&&(n=tit.parse(n)),cf.locales[n.code])return cf.locales[n.code].defaultRegion;var t;if(cf.locales[n.language])t=cf.locales[n.language];else{if(n.language.indexOf("-")!==-1)return this.getLocaleData(n.language);t=cf.locales.defaultLanguage}return n.region&&t[n.region]?t[n.region]:t.defaultRegion},n}(),iri=function(){function n(){}return n.getEdgeOrIEVersion=function(){var n=window.navigator.userAgent,i=n.indexOf("MSIE "),u,r,t;return i>0?parseInt(n.substring(i+5,n.indexOf(".",i)),10):(u=n.indexOf("Trident/"),u>0)?(r=n.indexOf("rv:"),parseInt(n.substring(r+3,n.indexOf(".",r)),10)):(t=n.indexOf("Edge/"),t>0)?parseInt(n.substring(t+5,n.indexOf(".",t)),10):-1},n.isEdgeOrIE=function(){var n=this.getEdgeOrIEVersion();return n!==-1},n.isIE=function(){var n=this.getEdgeOrIEVersion();return n!==-1&&n<=11},n}();(function(n){n.subscriptionKey="subscriptionKey";n.aad="aad";n.anonymous="anonymous"})(n.AuthenticationType||(n.AuthenticationType={}));var iit=function(t){function i(){var n=t!==null&&t.apply(this,arguments)||this;return n.authType=undefined,n.subscriptionKey=undefined,n.clientId=undefined,n.aadAppId=undefined,n.aadTenant=undefined,n.aadInstance=undefined,n.getToken=undefined,n.authContext=undefined,n}return u(i,t),i.prototype.setSubscriptionKey=function(t){this.authType=n.AuthenticationType.subscriptionKey;this.subscriptionKey=t},i.prototype.setAadProperties=function(t,i,r,u,f){this.authType=n.AuthenticationType.aad;this.authContext=f||this.authContext;this.aadInstance=u||this.aadInstance;this.clientId=t;this.aadAppId=i;this.aadTenant=r},i.prototype.setTokenCallbackFunction=function(t){this.authType=n.AuthenticationType.anonymous;this.getToken=t},i.prototype.merge=function(){for(var i,u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];return i=t.prototype.merge.apply(this,dt(u)),i.authType===n.AuthenticationType.subscriptionKey?i.authContext=i.aadAppId=i.getToken=undefined:i.authType===n.AuthenticationType.aad?i.subscriptionKey=i.getToken=undefined:i.authType===n.AuthenticationType.anonymous&&(i.subscriptionKey=i.authContext=i.aadAppId=undefined),i},i}(nt),nl,rit="NGT",uit=ef(),fit=bi.domain,rri=bi.staticAssetsDomain,eit=bi.stylePath,oit=bi.styleDefinitionsVersion,pe=new iit,hy=!1,sit=!1,hit=!1,cit=!1,lit=!1,ait=!1,vit=!1,yit=!1,cy=!1;var bs={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}<\/text><\/svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}<\/text><\/svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/><\/g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}<\/text><\/svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})"  viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/><\/g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/><\/g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}<\/text><\/svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/><\/g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/><\/g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/><\/g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/><\/g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/><\/g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/><\/g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+<\/text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/><\/g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/><\/g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+<\/text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/><\/g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/><\/g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/><\/g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/><\/g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/><\/g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/><\/g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/><\/g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/><\/g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/><\/g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/><\/g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/><\/g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/><\/g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}<\/text><\/svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/><\/g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}<\/text><\/svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/><\/g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}<\/text><\/svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/><\/pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/><\/svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/><\/svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/><\/svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/><\/svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/><\/pattern><\/defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/><\/svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/><\/pattern><\/defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/><\/svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/><\/g><\/svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/><\/g><\/svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/><\/g><\/svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/><\/g><\/svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/><\/g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/><\/g><\/svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/><\/g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/><\/g><\/svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/><\/g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/><\/g><\/svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/><\/g><\/svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/><\/g><\/svg>'},vri=function(){function n(){}return n.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},n}(),yri={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},ks="function",br="object",fu="undefined",di="prototype",yy="hasOwnProperty",we=Object,py=we[di],wy=we.assign,pri=we.create,wri=we.defineProperty,tl=py[yy];var vai=(be()||{}).Symbol,yai=(be()||{}).Reflect,bri=function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)py[yy].call(t,r)&&(n[r]=t[r])}return n},ds=wy||bri,dy=function(n,t){return dy=we.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t[yy](i)&&(n[i]=t[i])},dy(n,t)};var il="constructor",kr="prototype",rl="function",ul="_dynInstFuncs",gy="_isDynProxy",ke="_dynClass",kri="_dynCls$",np="_dynInstChk",gs=np,iut="_dfOpts",rut="_unknown_",dri="__proto__",tp="useBaseInst",uut="setInstFuncs",fl=Object,nh=fl.getPrototypeOf,fut=0;out={setInstFuncs:!0,useBaseInst:!0};lt[iut]=out,function(n){n[n.CRITICAL=1]="CRITICAL";n[n.WARNING=2]="WARNING"}(i||(i={}));var t={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103},sut="on",hut="attachEvent",cut="addEventListener",lut="detachEvent",aut="removeEventListener",vut=wri;kut=!{toString:null}.propertyIsEnumerable("toString");cl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var nft="window",aui="document",vui="navigator",yui="history",pui="location",wui="console",bui="performance",tft="JSON",kui="crypto",dui="msCrypto",gui="ReactNative",hp="msie",cp="trident/",lp=null,ap=null,nfi=!1;var sfi="AI (Internal): ",hfi="AI: ",cfi="AITR_";io=function(){function n(n,t,i,r){var u,f,e;i===void 0&&(i=!1);u=this;u.messageId=n;u.message=(i?hfi:sfi)+n;f="";to()&&(f=rr().stringify(r));e=(t?" message:"+uft(t):"")+(r?" props:"+uft(f):"");u.message+=e}return n.dataType="MessageData",n}();var fft=function(){function n(u){this.identifier="DiagnosticLogger";this.queue=[];var e=0,f={};lt(n,this,function(n){function o(n,t){var i=u[n];return r(i)?t:i}function s(){return e>=n.maxInternalMessageLimit()}r(u)&&(u={});n.consoleLoggingLevel=function(){return o("loggingLevelConsole",0)};n.telemetryLoggingLevel=function(){return o("loggingLevelTelemetry",1)};n.maxInternalMessageLimit=function(){return o("maxMessageLimit",25)};n.enableDebugExceptions=function(){return o("enableDebugExceptions",!1)};n.throwInternal=function(t,r,u,e,o){var s,h,c;if(o===void 0&&(o=!1),s=new io(r,u,o,e),n.enableDebugExceptions())throw s;else si(s.message)||(h=n.consoleLoggingLevel(),o?(c=+s.messageId,!f[c]&&h>=i.WARNING&&(n.warnToConsole(s.message),f[c]=!0)):h>=i.WARNING&&n.warnToConsole(s.message),n.logInternalMessage(t,s))};n.warnToConsole=function(n){var t=ufi(),i;!t||(i="log",t.warn&&(i="warn"),y(t[i])&&t[i](n))};n.resetInternalMessageCount=function(){e=0;f={}};n.logInternalMessage=function(i,r){var u,o,h,c;s()||(u=!0,o=cfi+r.messageId,f[o]?u=!1:f[o]=!0,u&&(i<=n.telemetryLoggingLevel()&&(n.queue.push(r),e++),e===n.maxInternalMessageLimit()&&(h="Internal events throttle limit per PageView reached for this app.",c=new io(t.MessageLimitPerPVExceeded,h,!1),n.queue.push(c),n.warnToConsole(h))))}})}return n}(),ro="ctx",yl=function(){function n(t,i,r){var u=this,e=!1,f;u.start=lr();u.name=t;u.isAsync=r;u.isChildEvt=function(){return!1};y(i)&&(e=ll(u,"payload",function(){return!f&&y(i)&&(f=i(),i=null),f}));u.getCtx=function(t){return t?t===n.ParentContextKey||t===n.ChildrenContextKey?u[t]:(u[ro]||{})[t]:null};u.setCtx=function(t,i){if(t)if(t===n.ParentContextKey)u[t]||(u.isChildEvt=function(){return!0}),u[t]=i;else if(t===n.ChildrenContextKey)u[t]=i;else{var r=u[ro]=u[ro]||{};r[t]=i}};u.complete=function(){var o=0,r=u.getCtx(n.ChildrenContextKey),t,f;if(af(r))for(t=0;t<r.length;t++)f=r[t],f&&(o+=f.time);u.time=lr()-u.start;u.exTime=u.time-o;u.complete=function(){};!e&&y(i)&&(u.payload=i())}}return n.ParentContextKey="parent",n.ChildrenContextKey="childEvts",n}(),lfi=function(){function n(t){this.ctx={};lt(n,this,function(n){n.create=function(n,t,i){return new yl(n,t,i)};n.fire=function(n){n&&(n.complete(),t&&t.perfEvent(n))};n.setCtx=function(t,i){if(t){var r=n[ro]=n[ro]||{};r[t]=i}};n.getCtx=function(t){return(n[ro]||{})[t]}})}return n}(),yp="CoreUtils.doPerf";eft=function(){function n(n,r){var f=this,u=null,e=y(n.processTelemetry),o=y(n.setNextPlugin);f._hasRun=!1;f.getPlugin=function(){return n};f.getNext=function(){return u};f.setNext=function(n){u=n};f.processTelemetry=function(s,h){h||(h=r);var c=n?n.identifier:"TelemetryPluginChain";ih(h?h.core():null,function(){return c+":processTelemetry"},function(){if(n&&e){f._hasRun=!0;try{h.setNext(u);o&&n.setNextPlugin(u);u&&(u._hasRun=!1);n.processTelemetry(s,h)}catch(c){var r=u&&u._hasRun;u&&r||h.diagLog().throwInternal(i.CRITICAL,t.PluginException,"Plugin ["+n.identifier+"] failed during processTelemetry - "+c);u&&!r&&u.processTelemetry(s,h)}}else u&&(f._hasRun=!0,u.processTelemetry(s,h))},function(){return{item:s}},!s.sync)}}return n}();var uo=function(){function n(t,i,u,f){var e=this,o=null;f!==null&&(t&&y(t.getPlugin)?o=afi(t,e,f||t.getPlugin()):f?o=vfi(t,e,f):si(f)&&(o=pp(t,e)));e.core=function(){return u};e.diagLog=function(){return vl(u,i)};e.getCfg=function(){return i};e.getExtCfg=function(n,t){var r,u;return t===void 0&&(t={}),i&&(u=i.extensionConfig,u&&n&&(r=u[n])),r?r:t};e.getConfig=function(n,t,u){u===void 0&&(u=!1);var f,o=e.getExtCfg(n,null);return o&&!r(o[t])?f=o[t]:i&&!r(i[t])&&(f=i[t]),r(f)?u:f};e.hasNext=function(){return o!=null};e.getNext=function(){return o};e.setNext=function(n){o=n};e.processNext=function(n){var t=o;t&&(o=t.getNext(),t.processTelemetry(n,e))};e.createNew=function(t,r){return t===void 0&&(t=null),new n(t||o,i,u,r)}}return n}(),yfi="iKey",oft="extensionConfig",pl="getPlugin",rh=function(){function n(){var t=this,i=!1,u=null,n=null;t.core=null;t.diagLog=function(n){return t._getTelCtx(n).diagLog()};t.isInitialized=function(){return i};t.setInitialized=function(n){i=n};t.setNextPlugin=function(t){n=t};t.processNext=function(t,i){i?i.processNext(t):n&&y(n.processTelemetry)&&n.processTelemetry(t,null)};t._getTelCtx=function(i){var r,f;return i===void 0&&(i=null),r=i,r||(f=u||new uo(null,{},t.core),r=n&&n[pl]?f.createNew(null,n[pl]):f.createNew(null,n)),r};t._baseTelInit=function(f,e,o,s){f&&p(f,oft,[],null,r);!s&&e&&(s=e.getProcessTelContext().getNext());var h=n;n&&n[pl]&&(h=n[pl]());t.core=e;u=new uo(s,f,e,h);i=!0}}return n.prototype.initialize=function(n,t,i,r){this._baseTelInit(n,t,i,r)},n}(),wp="processTelemetry",sft="priority",hft="setNextPlugin",cft="isInitialized";var kp=500,pfi="Channel has invalid priority",wfi=function(n){function t(){function f(n){l(n,function(n){n.priority<kp&&dr(pfi+n.identifier)})}function u(n){n&&n.length>0&&(n=n.sort(function(n,t){return n.priority-t.priority}),f(n),i.push(n))}function e(n,t){if(i=[],n&&l(n,function(n){return u(n)}),t){var r=[];l(t,function(n){n.priority>kp&&r.push(n)});u(r)}}var r=n.call(this)||this,i;return r.identifier="ChannelControllerPlugin",r.priority=kp,lt(t,r,function(n,t){n.setNextPlugin=function(){};n.processTelemetry=function(n,t){i&&l(i,function(i){if(i.length>0){var u=r._getTelCtx(t).createNew(i);u.processNext(n)}})};n.getChannelControls=function(){return i};n.initialize=function(r,u,f){n.isInitialized()||(t.initialize(r,u,f),e((r||{}).channels,f),l(i,function(n){return bp(new uo(n,r,u),f)}))}}),r}return k(t,n),t._staticInit=function(){var n=t.prototype;ll(n,"ChannelControls",n.getChannelControls);ll(n,"channelQueue",n.getChannelControls)}(),t}(rh),aft="toGMTString",vft="toUTCString",dp="cookie",gp="expires",nw="enabled",yft="isCookieUseDisabled",pft="disableCookiesUsage",su="_ckMgr",ur="",wl=null,tw=null,wft=null,uh=ar(),bft={},bl={};var nei="Extensions must provide callback to initialize",iet="_notificationManager",tei=function(){function n(){var o=!1,i,t,u,f,e;lt(n,this,function(n){n._extensions=[];t=new wfi;n.logger=ky({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}});i=[];n.isInitialized=function(){return o};n.initialize=function(i,f,e,s){var v,h,c,a;n.isInitialized()&&dr("Core should not be initialized more than once");(!i||r(i.instrumentationKey))&&dr("Please provide instrumentation key");u=s;n[iet]=s;n.config=i||{};i.extensions=r(i.extensions)?[]:i.extensions;v=ii(i,oft);v.NotificationManager=s;e&&(n.logger=e);h=[];h.push.apply(h,f.concat(i.extensions));h=lft(h);c=[];a={};l(h,function(n){(r(n)||r(n.initialize))&&dr(nei);var i=n.priority,u=n.identifier;n&&i&&(r(a[i])?a[i]=u:e.warnToConsole("Two extensions have same priority #"+i+" - "+a[i]+", "+u));(!i||i<t.priority)&&c.push(n)});h.push(t);c.push(t);h=lft(h);n._extensions=h;bp(new uo([t],i,n),h);bp(new uo(c,i,n),h);n._extensions=c;n.getTransmissionControls().length===0&&dr("No channels available");o=!0;n.releaseQueue()};n.getTransmissionControls=function(){return t.getChannelControls()};n.track=function(t){p(t,yfi,n.config.instrumentationKey,null,dut);p(t,"time",ge(new Date),null,dut);p(t,"ver","4.0",null,r);n.isInitialized()?n.getProcessTelContext().processNext(t):i.push(t)};n.getProcessTelContext=function(){var i=n._extensions,r=i;return i&&i.length!==0||(r=[t]),new uo(r,n.config,n)};n.getNotifyMgr=function(){return u||(u=ky({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),n[iet]=u),u};n.getCookieMgr=function(){return e||(e=fh(n.config,n.logger)),e};n.setCookieMgr=function(n){e=n};n.getPerfMgr=function(){return f||n.config&&n.config.enablePerfMgr&&(f=new lfi(n.getNotifyMgr())),f};n.setPerfMgr=function(n){f=n};n.eventCnt=function(){return i.length};n.releaseQueue=function(){i.length>0&&(l(i,function(t){n.getProcessTelContext().processNext(t)}),i=[])}})}return n}(),iei=function(){function n(t){this.listeners=[];var i=!!(t||{}).perfEvtsSendAll;lt(n,this,function(n){n.addNotificationListener=function(t){n.listeners.push(t)};n.removeNotificationListener=function(t){for(var i=op(n.listeners,t);i>-1;)n.listeners.splice(i,1),i=op(n.listeners,t)};n.eventsSent=function(t){l(n.listeners,function(n){n&&n.eventsSent&&setTimeout(function(){return n.eventsSent(t)},0)})};n.eventsDiscarded=function(t,i){l(n.listeners,function(n){n&&n.eventsDiscarded&&setTimeout(function(){return n.eventsDiscarded(t,i)},0)})};n.eventsSendRequest=function(t,i){l(n.listeners,function(n){if(n&&n.eventsSendRequest)if(i)setTimeout(function(){return n.eventsSendRequest(t,i)},0);else try{n.eventsSendRequest(t,i)}catch(r){}})};n.perfEvent=function(t){t&&(i||!t.isChildEvt())&&l(n.listeners,function(n){if(n&&n.perfEvent)if(t.isAsync)setTimeout(function(){return n.perfEvent(t)},0);else try{n.perfEvent(t)}catch(i){}})}})}return n}(),rei=function(n){function t(){var i=n.call(this)||this;return lt(t,i,function(n,t){function u(n){if(r(n.name)){i(n);throw Error("telemetry name required");}}function i(t){var i=n.getNotifyMgr();i&&i.eventsDiscarded([t],yri.InvalidEvent)}n.initialize=function(n,i,r,u){t.initialize(n,i,r||new fft(n),u||new iei(n))};n.track=function(r){ih(n.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){r===null&&(i(r),dr("Invalid telemetry item"));u(r);t.track(r)},function(){return{item:r}},!r.sync)};n.addNotificationListener=function(t){var i=n.getNotifyMgr();i&&i.addNotificationListener(t)};n.removeNotificationListener=function(t){var i=n.getNotifyMgr();i&&i.removeNotificationListener(t)};n.pollInternalLogs=function(t){var i=n.config.diagnosticLogInterval;return i&&i>0||(i=1e4),setInterval(function(){var i=n.logger?n.logger.queue:[];l(i,function(i){var r={name:t?t:"InternalMessageId: "+i.messageId,iKey:n.config.instrumentationKey,time:ge(new Date),baseType:io.dataType,baseData:{message:i.message}};n.track(r)});i.length=0},i)}}),i}return k(t,n),t}(tei),ret=4294967296,yf=4294967295,uet=!1,eh=123456789,oh=987654321;var gl={Attach:sl,AttachEvent:sl,Detach:put,DetachEvent:put},eet="_aiHooks",oet=["req","rsp","hkErr","fnErr"],oei="__proto__",sei="constructor";fw=Object.getPrototypeOf;ft={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"};var hh="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",yet="sampleRate",ow="ProcessLegacy",pet="http.method",kei="https://dc.services.visualstudio.com",pr="not_specified",bf;(function(n){n[n.LocalStorage=0]="LocalStorage";n[n.SessionStorage=1]="SessionStorage"})(bf||(bf={})),function(n){n[n.AI=0]="AI";n[n.AI_AND_W3C=1]="AI_AND_W3C";n[n.W3C=2]="W3C"}(gr||(gr={}));lu=undefined;au=undefined;var bet=ar()||{},ket=0,roi=[null,null,null,null,null];get=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];kf={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(n,t,i){var r,e,o,f,u,s;if(!t||n&&n.disableCorrelationHeaders)return!1;if(n&&n.correlationHeaderExcludePatterns)for(u=0;u<n.correlationHeaderExcludePatterns.length;u++)if(n.correlationHeaderExcludePatterns[u].test(t))return!1;if((r=aw(t).host.toLowerCase(),r&&(r.indexOf(":443")!==-1||r.indexOf(":80")!==-1)&&(r=(det(t,!0)||"").toLowerCase()),(!n||!n.enableCorsCorrelation)&&r&&r!==i)||(e=n&&n.correlationHeaderDomains,e&&(l(e,function(n){var t=new RegExp(n.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));o=o||t.test(r)}),!o)))return!1;if(f=n&&n.correlationHeaderExcludedDomains,!f||f.length===0)return!0;for(u=0;u<f.length;u++)if(s=new RegExp(f[u].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")),s.test(r))return!1;return r&&r.length>0},getCorrelationContext:function(n){if(n){var t=kf.getCorrelationContextValue(n,ft.requestContextTargetKey);if(t&&t!==kf.correlationIdPrefix)return t}},getCorrelationContextValue:function(n,t){var u,i,r;if(n)for(u=n.split(","),i=0;i<u.length;++i)if(r=u[i].split("="),r.length===2&&r[0]===t)return r[1]}};not=";";tot="=";var hoi=function(){function n(){}return n}(),coi=function(n){function t(){return n.call(this)||this}return k(t,n),t}(hoi),loi=function(){function n(){this.ver=1;this.sampleRate=100;this.tags={}}return n}(),aoi=function(n){function t(t,i,r){var u=n.call(this)||this;return u.name=ci(t,r)||pr,u.data=i,u.time=ge(new Date),u.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return u.sampleRate===100?4:1},tags:1,data:1},u}return k(t,n),t}(loi),iot=function(){function n(){this.ver=2;this.properties={};this.measurements={}}return n}(),vu=function(n){function t(t,i,r,u){var f=n.call(this)||this;return f.aiDataContract={ver:1,name:1,properties:0,measurements:0},f.name=ci(t,i)||pr,f.properties=pf(t,r),f.measurements=wf(t,u),f}return k(t,n),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t}(iot),voi=function(){function n(){}return n}(),yoi=function(){function n(){this.ver=2;this.exceptions=[];this.properties={};this.measurements={}}return n}(),poi=function(){function n(){this.hasFullStack=!0;this.parsedStack=[]}return n}(),woi="<no_method>",eo="error",gi="stack",yw="stackDetails",rot="errorSrc",pw="message",uot="description";var nr=function(n){function t(t,i,u,f,e,o){var s=n.call(this)||this;return s.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},koi(i)?(s.exceptions=i.exceptions,s.properties=i.properties,s.measurements=i.measurements,i.severityLevel&&(s.severityLevel=i.severityLevel),i.id&&(s.id=i.id),i.problemGroup&&(s.problemGroup=i.problemGroup),s.ver=2,r(i.isManual)||(s.isManual=i.isManual)):(u||(u={}),s.exceptions=[new sot(t,i,u)],s.properties=pf(t,u),s.measurements=wf(t,f),e&&(s.severityLevel=e),o&&(s.id=o)),s}return k(t,n),t.CreateAutoException=function(n,t,i,r,u,f,e,o){var s=ua(u||f||n);return{message:fot(n,s),url:t,lineNumber:i,columnNumber:r,error:bw(u||f||n),evt:bw(f||n),typeName:s,stackDetails:oot(e||u||f),errorSrc:o}},t.CreateFromInterface=function(n,i,r,u){var f=i.exceptions&&hl(i.exceptions,function(t){return sot.CreateFromInterface(n,t)});return new t(n,ds({},i,{exceptions:f}),r,u)},t.prototype.toInterface=function(){var n=this,t=n.exceptions,i=n.properties,r=n.measurements,u=n.severityLevel,h=n.ver,f=n.problemGroup,e=n.id,o=n.isManual,s=t instanceof Array&&hl(t,function(n){return n.toInterface()})||undefined;return{ver:"4.0",exceptions:s,severityLevel:u,properties:i,measurements:r,problemGroup:f,id:e,isManual:o}},t.CreateSimpleException=function(n,t,i,r,u){return{exceptions:[{hasFullStack:!0,message:n,stack:u,typeName:t}]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=bw,t}(yoi),sot=function(n){function t(t,i,r){var u=n.call(this)||this,f,o,e;return u.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},boi(i)?(u.typeName=i.typeName,u.message=i.message,u[gi]=i[gi],u.parsedStack=i.parsedStack,u.hasFullStack=i.hasFullStack):(f=i,o=f&&f.evt,wut(f)||(f=f[eo]||o||f),u.typeName=ci(t,ua(f))||pr,u.message=cet(t,fot(i||f,u.typeName))||pr,e=i[yw]||oot(i),u.parsedStack=nsi(e),u[gi]=vei(t,goi(e)),u.hasFullStack=af(u.parsedStack)&&u.parsedStack.length>0,r&&(r.typeName=r.typeName||u.typeName)),u}return k(t,n),t.prototype.toInterface=function(){var n=this.parsedStack instanceof Array&&hl(this.parsedStack,function(n){return n.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this[gi],parsedStack:n||undefined}},t.CreateFromInterface=function(n,i){var r=i.parsedStack instanceof Array&&hl(i.parsedStack,function(n){return kw.CreateFromInterface(n)})||i.parsedStack;return new t(n,ds({},i,{parsedStack:r}))},t}(poi),kw=function(n){function t(i,r){var u=n.call(this)||this,e,f;return u.sizeInBytes=0,u.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},typeof i=="string"?(e=i,u.level=r,u.method=woi,u.assembly=hi(e),u.fileName="",u.line=0,f=e.match(t.regex),f&&f.length>=5&&(u.method=hi(f[2])||u.method,u.fileName=hi(f[4]),u.line=parseInt(f[5])||0)):(u.level=i.level,u.method=i.method,u.assembly=i.assembly,u.fileName=i.fileName,u.line=i.line,u.sizeInBytes=0),u.sizeInBytes+=u.method.length,u.sizeInBytes+=u.fileName.length,u.sizeInBytes+=u.assembly.length,u.sizeInBytes+=t.baseSize,u.sizeInBytes+=u.level.toString().length,u.sizeInBytes+=u.line.toString().length,u}return k(t,n),t.CreateFromInterface=function(n){return new t(n,null)},t.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},t.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,t.baseSize=58,t}(voi),tsi=function(){function n(){this.ver=2;this.metrics=[];this.properties={};this.measurements={}}return n}(),dw;(function(n){n[n.Measurement=0]="Measurement";n[n.Aggregation=1]="Aggregation"})(dw||(dw={}));var isi=function(){function n(){this.kind=dw.Measurement}return n}(),rsi=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},t}return k(t,n),t}(isi),df=function(n){function t(t,i,r,u,f,e,o,s){var c=n.call(this)||this,h;return c.aiDataContract={ver:1,metrics:1,properties:0},h=new rsi,h.count=u>0?u:undefined,h.max=isNaN(e)||e===null?undefined:e,h.min=isNaN(f)||f===null?undefined:f,h.name=ci(t,i)||pr,h.value=r,c.metrics=[h],c.properties=pf(t,o),c.measurements=wf(t,s),c}return k(t,n),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t}(tsi),hot=function(n){function t(){var t=n.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return k(t,n),t}(iot),yu=function(n){function t(t,i,r,u,f,e,o){var s=n.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=yei(t,o),s.url=na(t,r),s.name=ci(t,i)||pr,isNaN(u)||(s.duration=cu(u)),s.properties=pf(t,f),s.measurements=wf(t,e),s}return k(t,n),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t}(hot),usi=function(){function n(){this.ver=2;this.success=!0;this.properties={};this.measurements={}}return n}(),gf=function(n){function t(t,i,r,u,f,e,o,s,h,c,l,a){var v,y;return h===void 0&&(h="Ajax"),v=n.call(this)||this,v.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},v.id=i,v.duration=cu(f),v.success=e,v.resultCode=o+"",v.type=ci(t,h),y=ooi(t,r,s,u),v.data=na(t,u)||y.data,v.target=ci(t,y.target),c&&(v.target=v.target+" | "+c),v.name=ci(t,y.name),v.properties=pf(t,l),v.measurements=wf(t,a),v}return k(t,n),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t}(usi),fsi=function(){function n(){this.ver=2;this.properties={};this.measurements={}}return n}(),so=function(n){function t(t,i,r,u,f){var e=n.call(this)||this;return e.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},i=i||pr,e.message=cet(t,i),e.properties=pf(t,u),e.measurements=wf(t,f),r&&(e.severityLevel=r),e}return k(t,n),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t}(fsi),esi=function(n){function t(){var t=n.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return k(t,n),t}(hot),ho=function(n){function t(t,i,r,u,f,e,o){var s=n.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=na(t,r),s.name=ci(t,i)||pr,s.properties=pf(t,f),s.measurements=wf(t,e),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}return k(t,n),t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t}(esi),ne=function(n){function t(t,i){var r=n.call(this)||this;return r.aiDataContract={baseType:1,baseData:1},r.baseType=t,r.baseData=i,r}return k(t,n),t}(coi),gw;(function(n){n[n.Verbose=0]="Verbose";n[n.Information=1]="Information";n[n.Warning=2]="Warning";n[n.Error=3]="Error";n[n.Critical=4]="Critical"})(gw||(gw={}));var ch=pu("application"),wt=pu("device"),fa=pu("location"),co=pu("operation"),nb=pu("session"),wu=pu("user"),te=pu("cloud"),lh=pu("internal"),cot=function(n){function t(){return n.call(this)||this}return k(t,n),t}(lui({applicationVersion:ch("ver"),applicationBuild:ch("build"),applicationTypeId:ch("typeId"),applicationId:ch("applicationId"),applicationLayer:ch("layer"),deviceId:wt("id"),deviceIp:wt("ip"),deviceLanguage:wt("language"),deviceLocale:wt("locale"),deviceModel:wt("model"),deviceFriendlyName:wt("friendlyName"),deviceNetwork:wt("network"),deviceNetworkName:wt("networkName"),deviceOEMName:wt("oemName"),deviceOS:wt("os"),deviceOSVersion:wt("osVersion"),deviceRoleInstance:wt("roleInstance"),deviceRoleName:wt("roleName"),deviceScreenResolution:wt("screenResolution"),deviceType:wt("type"),deviceMachineName:wt("machineName"),deviceVMName:wt("vmName"),deviceBrowser:wt("browser"),deviceBrowserVersion:wt("browserVersion"),locationIp:fa("ip"),locationCountry:fa("country"),locationProvince:fa("province"),locationCity:fa("city"),operationId:co("id"),operationName:co("name"),operationParentId:co("parentId"),operationRootId:co("rootId"),operationSyntheticSource:co("syntheticSource"),operationCorrelationVector:co("correlationVector"),sessionId:nb("id"),sessionIsFirst:nb("isFirst"),sessionIsNew:nb("isNew"),userAccountAcquisitionDate:wu("accountAcquisitionDate"),userAccountId:wu("accountId"),userAgent:wu("userAgent"),userId:wu("id"),userStoreRegion:wu("storeRegion"),userAuthUserId:wu("authUserId"),userAnonymousUserAcquisitionDate:wu("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:wu("authUserAcquisitionDate"),cloudName:te("name"),cloudRole:te("role"),cloudRoleVer:te("roleVer"),cloudRoleInstance:te("roleInstance"),cloudEnvironment:te("environment"),cloudLocation:te("location"),cloudDeploymentUnit:te("deploymentUnit"),internalNodeName:lh("nodeName"),internalSdkVersion:lh("sdkVersion"),internalAgentVersion:lh("agentVersion"),internalSnippet:lh("snippet"),internalSdkSrc:lh("sdkSrc")})),bu=function(){function n(){}return n.create=function(n,t,i,u,f,e){if(i=ci(u,i)||pr,r(n)||r(t)||r(i))throw Error("Input doesn't contain all required fields");var o={name:i,time:ge(new Date),iKey:"",ext:e?e:{},tags:[],data:{},baseType:t,baseData:n};return r(f)||bt(f,function(n,t){o.data[n]=t}),o},n}(),vi={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},rt=new cot,ea="AppInsightsPropertiesPlugin",lot="AppInsightsChannelPlugin",osi="ApplicationInsightsAnalytics",ssi=function(){function n(u,f,e,o){lt(n,this,function(n){function v(){e&&l(e.getTransmissionControls(),function(n){l(n,function(n){return n.flush(!0)})})}function p(n){h.push(n);c||(c=setInterval(function(){var t=h.slice(0),n=!1;h=[];l(t,function(t){t()?n=!0:h.push(t)});h.length===0&&(clearInterval(c),c=null);n&&v()},100))}var c=null,h=[],y=!1,a;e&&(a=e.logger);n.trackPageView=function(n,e){var k=n.name,d,h,g,c,l,w,nt,tt;if((r(k)||typeof k!="string")&&(d=ar(),k=n.name=d&&d.title||""),h=n.uri,(r(h)||typeof h!="string")&&(g=vf(),h=n.uri=g&&g.href||""),!o.isPerformanceTimingSupported()){u.sendPageViewInternal(n,e);v();a.throwInternal(i.WARNING,t.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}c=!1;w=o.getPerformanceTiming().navigationStart;w>0&&(l=li(w,+new Date),o.shouldCollectDuration(l)||(l=undefined));r(e)||r(e.duration)||(nt=e.duration);(f||!isNaN(nt))&&(isNaN(nt)&&(e||(e={}),e.duration=l),u.sendPageViewInternal(n,e),v(),c=!0);tt=6e4;e||(e={});p(function(){var f=!1,r;try{o.isPerformanceTimingDataReady()?(f=!0,r={name:k,uri:h},o.populatePageViewPerformanceEvent(r),r.isValid||c?(c||(e.duration=r.durationMs,u.sendPageViewInternal(n,e)),y||(u.sendPageViewPerformanceInternal(r,e),y=!0)):(e.duration=l,u.sendPageViewInternal(n,e))):w>0&&li(w,+new Date)>tt&&(f=!0,c||(e.duration=tt,u.sendPageViewInternal(n,e)))}catch(v){a.throwInternal(i.CRITICAL,t.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+b(v),{exception:s(v)})}return f})}})}return n}(),hsi=function(){function n(n,t){this.prevPageVisitDataKeyName="prevPageVisitData";this.pageVisitTimeTrackingHandler=t;this._logger=n}return n.prototype.trackPreviousPageVisit=function(n,t){try{var i=this.restartPageVisitTimer(n,t);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+s(r))}},n.prototype.restartPageVisitTimer=function(n,t){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(n,t),i}catch(r){return this._logger.warnToConsole("Call to restart failed: "+s(r)),null}},n.prototype.startPageVisitTimer=function(n,t){try{if(ia()){cw(this._logger,this.prevPageVisitDataKeyName)!=null&&dr("Cannot call startPageVisit consecutively without first calling stopPageVisit");var i=new csi(n,t),r=rr().stringify(i);lw(this._logger,this.prevPageVisitDataKeyName,r)}}catch(u){this._logger.warnToConsole("Call to start failed: "+s(u))}},n.prototype.stopPageVisitTimer=function(){var i,t,n;try{return ia()?(i=lr(),t=cw(this._logger,this.prevPageVisitDataKeyName),t&&to()?(n=rr().parse(t),n.pageVisitTime=i-n.pageVisitStartTime,ioi(this._logger,this.prevPageVisitDataKeyName),n):null):null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+s(r)),null}},n}(),csi=function(){function n(n,t){this.pageVisitStartTime=lr();this.pageName=n;this.pageUrl=t}return n}(),lsi=function(){function n(n){this.MAX_DURATION_ALLOWED=36e5;n&&(this._logger=n.logger)}return n.prototype.populatePageViewPerformanceEvent=function(n){n.isValid=!1;var r=this.getPerformanceNavigationTiming(),u=this.getPerformanceTiming(),f=0,e=0,o=0,s=0,h=0;(r||u)&&(r?(f=r.duration,e=r.startTime===0?r.connectEnd:li(r.startTime,r.connectEnd),o=li(r.requestStart,r.responseStart),s=li(r.responseStart,r.responseEnd),h=li(r.responseEnd,r.loadEventEnd)):(f=li(u.navigationStart,u.loadEventEnd),e=li(u.navigationStart,u.connectEnd),o=li(u.requestStart,u.responseStart),s=li(u.responseStart,u.responseEnd),h=li(u.responseEnd,u.loadEventEnd)),f===0?this._logger.throwInternal(i.WARNING,t.ErrorPVCalc,"error calculating page view performance.",{total:f,network:e,request:o,response:s,dom:h}):this.shouldCollectDuration(f,e,o,s,h)?f<Math.floor(e)+Math.floor(o)+Math.floor(s)+Math.floor(h)?this._logger.throwInternal(i.WARNING,t.ClientPerformanceMathError,"client performance math error.",{total:f,network:e,request:o,response:s,dom:h}):(n.durationMs=f,n.perfTotal=n.duration=cu(f),n.networkConnect=cu(e),n.sentRequest=cu(o),n.receivedResponse=cu(s),n.domProcessing=cu(h),n.isValid=!0):this._logger.throwInternal(i.WARNING,t.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:f,network:e,request:o,response:s,dom:h}))},n.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?ou().timing:null},n.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?ou().getEntriesByType("navigation")[0]:null},n.prototype.isPerformanceNavigationTimingSupported=function(){var n=ou();return n&&n.getEntriesByType&&n.getEntriesByType("navigation").length>0},n.prototype.isPerformanceTimingSupported=function(){var n=ou();return n&&n.timing},n.prototype.isPerformanceTimingDataReady=function(){var t=ou(),n=t?t.timing:0;return n&&n.domainLookupStart>0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},n.prototype.shouldCollectDuration=function(){for(var n,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=vr()||{},u=["googlebot","adsbot-google","apis-google","mediapartners-google"],f=e.userAgent,r=!1;if(f)for(n=0;n<u.length;n++)r=r||f.toLowerCase().indexOf(u[n])!==-1;if(r)return!1;for(n=0;n<t.length;n++)if(t[n]<0||t[n]>=this.MAX_DURATION_ALLOWED)return!1;return!0},n}(),aot="duration",tb="event";var vsi=function(n){function u(){var f=n.call(this)||this,o,h,e,a,c;return f.identifier=osi,f.priority=180,f.autoRoutePVDelay=500,lt(u,f,function(n,v){function w(t,i,r){var u={PageName:t,PageUrl:i};n.trackMetric({name:"PageVisitTime",average:r,max:r,min:r,sampleCount:1},u)}function k(n){if(!n.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"],i=function(n){var i,r;if(n.baseType===gf.dataType&&(i=n.baseData,i))for(r=0;r<t.length;r++)if(i.target&&i.target.indexOf(t[r])>=0)return!1;return!0};d(i)}}function d(t){n._telemetryInitializers.push(t)}function g(t,i){var r=bu.create(t,nr.dataType,nr.envelopeType,n.diagLog(),i);n.core.track(r)}var p=vf(!0);a=p&&p.href||"";n.getCookieMgr=function(){return iw(n.core)};n.processTelemetry=function(r,u){ih(n.core,function(){return n.identifier+":processTelemetry"},function(){var o=!1,c=n._telemetryInitializers.length,f,e;for(u=n._getTelCtx(u),f=0;f<c;++f)if(e=n._telemetryInitializers[f],e)try{if(e.apply(null,[r])===!1){o=!0;break}}catch(h){u.diagLog().throwInternal(i.CRITICAL,t.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+b(h),{exception:s(h)},!0)}o||n.processNext(r,u)},function(){return{item:r}},!r.sync)};n.trackEvent=function(r,u){try{var e=bu.create(r,vu.dataType,vu.envelopeType,n.diagLog(),u);n.core.track(e)}catch(f){n.diagLog().throwInternal(i.WARNING,t.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+b(f),{exception:s(f)})}};n.startTrackEvent=function(r){try{o.start(r)}catch(u){n.diagLog().throwInternal(i.CRITICAL,t.StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+b(u),{exception:s(u)})}};n.stopTrackEvent=function(r,u){try{o.stop(r,undefined,u)}catch(f){n.diagLog().throwInternal(i.CRITICAL,t.StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+b(f),{exception:s(f)})}};n.trackTrace=function(r,u){try{var e=bu.create(r,so.dataType,so.envelopeType,n.diagLog(),u);n.core.track(e)}catch(f){n.diagLog().throwInternal(i.WARNING,t.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+b(f),{exception:s(f)})}};n.trackMetric=function(r,u){try{var e=bu.create(r,df.dataType,df.envelopeType,n.diagLog(),u);n.core.track(e)}catch(f){n.diagLog().throwInternal(i.CRITICAL,t.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+b(f),{exception:s(f)})}};n.trackPageView=function(r,u){try{var f=r||{};n._pageViewManager.trackPageView(f,ds({},f.properties,f.measurements,u));n.config.autoTrackPageVisitTime&&n._pageVisitTimeManager.trackPreviousPageVisit(f.name,f.uri)}catch(e){n.diagLog().throwInternal(i.CRITICAL,t.TrackPVFailed,"trackPageView failed, page view will not be collected: "+b(e),{exception:s(e)})}};n.sendPageViewInternal=function(t,i,r){var u=ar(),f;u&&(t.refUri=t.refUri===undefined?u.referrer:t.refUri);f=bu.create(t,yu.dataType,yu.envelopeType,n.diagLog(),i,r);n.core.track(f)};n.sendPageViewPerformanceInternal=function(t,i,r){var u=bu.create(t,ho.dataType,ho.envelopeType,n.diagLog(),i,r);n.core.track(u)};n.trackPageViewPerformance=function(r,u){try{n._pageViewPerformanceManager.populatePageViewPerformanceEvent(r);n.sendPageViewPerformanceInternal(r,u)}catch(f){n.diagLog().throwInternal(i.CRITICAL,t.TrackPVFailed,"trackPageViewPerformance failed, page view will not be collected: "+b(f),{exception:s(f)})}};n.startTrackPage=function(r){try{if(typeof r!="string"){var u=ar();r=u&&u.title||""}h.start(r)}catch(f){n.diagLog().throwInternal(i.CRITICAL,t.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+b(f),{exception:s(f)})}};n.stopTrackPage=function(r,u,f,e){var o,c;try{typeof r!="string"&&(o=ar(),r=o&&o.title||"");typeof u!="string"&&(c=vf(),u=c&&c.href||"");h.stop(r,u,f,e);n.config.autoTrackPageVisitTime&&n._pageVisitTimeManager.trackPreviousPageVisit(r,u)}catch(l){n.diagLog().throwInternal(i.CRITICAL,t.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+b(l),{exception:s(l)})}};n.sendExceptionInternal=function(t,i,r){var u=t.exception||t.error||new Error(pr),f=new nr(n.diagLog(),u,t.properties||i,t.measurements,t.severityLevel,t.id).toInterface(),e=bu.create(f,nr.dataType,nr.envelopeType,n.diagLog(),i,r);n.core.track(e)};n.trackException=function(r,u){try{n.sendExceptionInternal(r,u)}catch(f){n.diagLog().throwInternal(i.CRITICAL,t.TrackExceptionFailed,"trackException failed, exception will not be collected: "+b(f),{exception:s(f)})}};n._onerror=function(r){var u=r&&r.error,f=r&&r.evt,e,a;try{f||(e=th(),e&&(f=e[tb]));var o=r&&r.url||(ar()||{}).URL,h=r.errorSrc||"window.onerror@"+o+":"+(r.lineNumber||0)+":"+(r.columnNumber||0),c={errorSrc:h,url:o,lineNumber:r.lineNumber||0,columnNumber:r.columnNumber||0,message:r.message};bei(r.message,r.url,r.lineNumber,r.columnNumber,r.error)?g(nr.CreateAutoException("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",o,r.lineNumber||0,r.columnNumber||0,u,f,null,h),c):(r.errorSrc||(r.errorSrc=h),n.trackException({exception:r,severityLevel:gw.Error},c))}catch(l){a=u?u.name+", "+u.message:"null";n.diagLog().throwInternal(i.CRITICAL,t.ExceptionWhileLoggingError,"_onError threw exception while logging error, error will not be collected: "+b(l),{exception:s(l),errorString:a})}};n.addTelemetryInitializer=function(t){n._telemetryInitializers.push(t)};n.initialize=function(t,i,s,p){var tt,it,rt,ot,ht,ut,ft,et,g;if(!n.isInitialized()){if(r(i))throw Error("Error initializing");v.initialize(t,i,s,p);n.setInitialized(!1);tt=n._getTelCtx();it=n.identifier;n.config=tt.getExtCfg(it);rt=u.getDefaultConfig(t);rt!==undefined&&bt(rt,function(t,i){n.config[t]=tt.getConfig(it,t,i);n.config[t]===undefined&&(n.config[t]=i)});n.config.isStorageUseDisabled&&dei();ot={instrumentationKey:function(){return t.instrumentationKey},accountId:function(){return n.config.accountId||t.accountId},sessionRenewalMs:function(){return n.config.sessionRenewalMs||t.sessionRenewalMs},sessionExpirationMs:function(){return n.config.sessionExpirationMs||t.sessionExpirationMs},sampleRate:function(){return n.config.samplingPercentage||t.samplingPercentage},sdkExtension:function(){return n.config.sdkExtension||t.sdkExtension},isBrowserLinkTrackingEnabled:function(){return n.config.isBrowserLinkTrackingEnabled||t.isBrowserLinkTrackingEnabled},appId:function(){return n.config.appId||t.appId}};n._pageViewPerformanceManager=new lsi(n.core);n._pageViewManager=new ssi(f,n.config.overridePageViewDuration,n.core,n._pageViewPerformanceManager);n._pageVisitTimeManager=new hsi(n.diagLog(),function(n,t,i){return w(n,t,i)});n._telemetryInitializers=n._telemetryInitializers||[];k(ot);o=new vot(n.diagLog(),"trackEvent");o.action=function(t,i,r,u){u||(u={});u[aot]=r.toString();n.trackEvent({name:t,properties:u})};h=new vot(n.diagLog(),"trackPageView");h.action=function(t,i,u,f,e){r(f)&&(f={});f[aot]=u.toString();var o={name:t,uri:i,properties:f,measurements:e};n.sendPageViewInternal(o,f)};var b=th(),nt=rfi(),d=vf(!0),st=f;n.config.disableExceptionTracking===!1&&!n.config.autoExceptionInstrumented&&b&&(ht="onerror",ut=b[ht],b.onerror=function(n,t,i,r,u){var e=b[tb],f=ut&&ut(n,t,i,r,u);return f!==!0&&st._onerror(nr.CreateAutoException(n,t,i,r,u,e)),f},n.config.autoExceptionInstrumented=!0);n.config.disableExceptionTracking===!1&&n.config.enableUnhandledPromiseRejectionTracking===!0&&!n.config.autoUnhandledPromiseInstrumented&&b&&(ft="onunhandledrejection",et=b[ft],b[ft]=function(n){var i=b[tb],t=et&&et.call(b,n);return t!==!0&&st._onerror(nr.CreateAutoException(asi(n),d?d.href:"",0,0,n,i)),t},n.config.autoUnhandledPromiseInstrumented=!0);n.config.enableAutoRouteTracking===!0&&nt&&y(nt.pushState)&&y(nt.replaceState)&&b&&typeof Event!="undefined"&&(g=f,l(s,function(n){n.identifier===ea&&(e=n)}),nt.pushState=function(n){return function(){var t=n.apply(this,arguments);return ah(b,sh(g.config.namePrefix+"pushState")),ah(b,sh(g.config.namePrefix+"locationchange")),t}}(nt.pushState),nt.replaceState=function(n){return function(){var t=n.apply(this,arguments);return ah(b,sh(g.config.namePrefix+"replaceState")),ah(b,sh(g.config.namePrefix+"locationchange")),t}}(nt.replaceState),b.addEventListener&&(b.addEventListener(g.config.namePrefix+"popstate",function(){ah(b,sh(g.config.namePrefix+"locationchange"))}),b.addEventListener(g.config.namePrefix+"locationchange",function(){if(e&&e.context&&e.context.telemetryTrace){e.context.telemetryTrace.traceID=hu();var n="_unknown_";d&&d.pathname&&(n=d.pathname+(d.hash||""));e.context.telemetryTrace.name=n}c?(a=c,c=d&&d.href||""):c=d&&d.href||"";setTimeout(function(n){g.trackPageView({refUri:n,properties:{duration:0}})}.bind(f,a),g.autoRoutePVDelay)})));n.setInitialized(!0)}}}),f}return k(u,n),u.getDefaultConfig=function(n){return n||(n={}),n.sessionRenewalMs=18e5,n.sessionExpirationMs=864e5,n.disableExceptionTracking=yr(n.disableExceptionTracking),n.autoTrackPageVisitTime=yr(n.autoTrackPageVisitTime),n.overridePageViewDuration=yr(n.overridePageViewDuration),n.enableUnhandledPromiseRejectionTracking=yr(n.enableUnhandledPromiseRejectionTracking),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.isStorageUseDisabled=yr(n.isStorageUseDisabled),n.isBrowserLinkTrackingEnabled=yr(n.isBrowserLinkTrackingEnabled),n.enableAutoRouteTracking=yr(n.enableAutoRouteTracking),n.namePrefix=n.namePrefix||"",n.enableDebug=yr(n.enableDebug),n.disableFlushOnBeforeUnload=yr(n.disableFlushOnBeforeUnload),n.disableFlushOnUnload=yr(n.disableFlushOnUnload,n.disableFlushOnBeforeUnload),n},u.Version="2.6.5",u}(rh),vot=function(){function n(n){var u=this,r={};u.start=function(u){typeof r[u]!="undefined"&&n.throwInternal(i.WARNING,t.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:u,key:u},!0);r[u]=+new Date};u.stop=function(f,e,o,s){var h=r[f],c,l;isNaN(h)?n.throwInternal(i.WARNING,t.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:f,key:f},!0):(c=+new Date,l=li(h,c),u.action(f,e,l,o,s));delete r[f];r[f]=undefined}}return n}(),ysi=function(){function n(t){var i=[];lt(n,this,function(n){n.enqueue=function(n){i.push(n)};n.count=function(){return i.length};n.clear=function(){i.length=0};n.getItems=function(){return i.slice(0)};n.batchPayloads=function(n){return n&&n.length>0?t.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null};n.markAsSent=function(){n.clear()};n.clearSent=function(){}})}return n}(),psi=function(){function n(r,u){var e=!1,f;lt(n,this,function(o){function v(n,t){var i=[];return l(t,function(t){y(t)||op(n,t)!==-1||i.push(t)}),i}function a(n){var e=n,o,f;try{if(e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,o=cw(r,e),o&&(f=rr().parse(o),h(f)&&(f=rr().parse(f)),f&&af(f)))return f}catch(c){r.throwInternal(i.CRITICAL,t.FailedToRestoreStorageBuffer," storage key: "+e+", "+b(c),{exception:s(c)})}return[]}function c(n,f){var e=n,o;try{e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e;o=JSON.stringify(f);lw(r,e,o)}catch(h){lw(r,e,JSON.stringify([]));r.throwInternal(i.WARNING,t.FailedToSetStorageBuffer," storage key: "+e+", "+b(h)+". Buffer cleared",{exception:s(h)})}}var p=a(n.BUFFER_KEY),w=a(n.SENT_BUFFER_KEY);f=p.concat(w);f.length>n.MAX_BUFFER_SIZE&&(f.length=n.MAX_BUFFER_SIZE);c(n.SENT_BUFFER_KEY,[]);c(n.BUFFER_KEY,f);o.enqueue=function(u){if(f.length>=n.MAX_BUFFER_SIZE){e||(r.throwInternal(i.WARNING,t.SessionStorageBufferFull,"Maximum buffer size reached: "+f.length,!0),e=!0);return}f.push(u);c(n.BUFFER_KEY,f)};o.count=function(){return f.length};o.clear=function(){f=[];c(n.BUFFER_KEY,[]);c(n.SENT_BUFFER_KEY,[]);e=!1};o.getItems=function(){return f.slice(0)};o.batchPayloads=function(n){return n&&n.length>0?u.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null};o.markAsSent=function(u){f=v(u,f);c(n.BUFFER_KEY,f);var e=a(n.SENT_BUFFER_KEY);e instanceof Array&&u instanceof Array&&(e=e.concat(u),e.length>n.MAX_BUFFER_SIZE&&(r.throwInternal(i.CRITICAL,t.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+e.length,!0),e.length=n.MAX_BUFFER_SIZE),c(n.SENT_BUFFER_KEY,e))};o.clearSent=function(t){var i=a(n.SENT_BUFFER_KEY);i=v(t,i);c(n.SENT_BUFFER_KEY,i)}})}return n.BUFFER_KEY="AI_buffer",n.SENT_BUFFER_KEY="AI_sentBuffer",n.MAX_BUFFER_SIZE=2e3,n}(),ib="baseType",ot="baseData",kt="properties",yot="true";var ht=function(){function n(){}return n.extractPropsAndMeasurements=function(n,t,i){r(n)||bt(n,function(n,r){but(r)?i[n]=r:h(r)?t[n]=r:to()&&(t[n]=rr().stringify(r))})},n.createEnvelope=function(t,i,r,u){var f=new aoi(t,u,i),e;return pt(f,"sampleRate",r[yet]),(r[ot]||{}).startTime&&(f.time=ge(r[ot].startTime)),f.iKey=r.iKey,e=r.iKey.replace(/-/g,""),f.name=f.name.replace("{0}",e),n.extractPartAExtensions(r,f),r.tags=r.tags||[],gut(f)},n.extractPartAExtensions=function(t,i){var r=i.tags=i.tags||{},e=t.ext=t.ext||{},h=t.tags=t.tags||[],c=e.user,y,f,u,p,o,a,s,k,v;if(c&&(pt(r,rt.userAuthUserId,c.authId),pt(r,rt.userId,c.id||c.localId)),y=e.app,y&&pt(r,rt.sessionId,y.sesId),f=e.device,f&&(pt(r,rt.deviceId,f.id||f.localId),pt(r,rt.deviceType,f.deviceClass),pt(r,rt.deviceIp,f.ip),pt(r,rt.deviceModel,f.model),pt(r,rt.deviceType,f.deviceType)),u=t.ext.web,u){pt(r,rt.deviceLanguage,u.browserLang);pt(r,rt.deviceBrowserVersion,u.browserVer);pt(r,rt.deviceBrowser,u.browser);var w=i.data=i.data||{},b=w[ot]=w[ot]||{},l=b[kt]=b[kt]||{};pt(l,"domain",u.domain);pt(l,"isManual",u.isManual?yot:null);pt(l,"screenRes",u.screenRes);pt(l,"userConsent",u.userConsent?yot:null)}for(p=e.os,p&&pt(r,rt.deviceOS,p.name),o=e.trace,o&&(pt(r,rt.operationParentId,o.parentID),pt(r,rt.operationName,o.name),pt(r,rt.operationId,o.traceID)),a={},s=h.length-1;s>=0;s--)k=h[s],bt(k,function(n,t){a[n]=t}),h.splice(s,1);bt(h,function(n,t){a[n]=t});v=ds({},r,a);v[rt.internalSdkVersion]||(v[rt.internalSdkVersion]="javascript:"+n.Version);i.tags=gut(v)},n.prototype.Init=function(n,u){this._logger=n;r(u[ot])&&this._logger.throwInternal(i.CRITICAL,t.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")},n.Version="2.6.5",n}(),wsi=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var f,e,u;if(n.prototype.Init.call(this,t,i),f=i[ot].measurements||{},e=i[ot][kt]||{},ht.extractPropsAndMeasurements(i.data,e,f),u=i[ot],r(u))return t.warnToConsole("Invalid input for dependency data"),null;var o=u[kt]&&u[kt][pet]?u[kt][pet]:"GET",s=new gf(t,u.id,u.target,u.name,u.duration,u.success,u.responseCode,o,u.type,u.correlationContext,e,f),h=new ne(gf.dataType,s);return ht.createEnvelope(t,gf.envelopeType,i,h)},t.DependencyEnvelopeCreator=new t,t}(ht),pot=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var r,u;n.prototype.Init.call(this,t,i);r={};u={};i[ib]!==vu.dataType&&(r.baseTypeSource=i[ib]);i[ib]===vu.dataType?(r=i[ot][kt]||{},u=i[ot].measurements||{}):i[ot]&&ht.extractPropsAndMeasurements(i[ot],r,u);ht.extractPropsAndMeasurements(i.data,r,u);var f=i[ot].name,e=new vu(t,f,r,u),o=new ne(vu.dataType,e);return ht.createEnvelope(t,vu.envelopeType,i,o)},t.EventEnvelopeCreator=new t,t}(ht),bsi=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var r,u;n.prototype.Init.call(this,t,i);r=i[ot].measurements||{};u=i[ot][kt]||{};ht.extractPropsAndMeasurements(i.data,u,r);var f=i[ot],e=nr.CreateFromInterface(t,f,u,r),o=new ne(nr.dataType,e);return ht.createEnvelope(t,nr.envelopeType,i,o)},t.ExceptionEnvelopeCreator=new t,t}(ht),ksi=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var e,o;n.prototype.Init.call(this,t,i);var r=i[ot],u=r[kt]||{},f=r.measurements||{};return ht.extractPropsAndMeasurements(i.data,u,f),e=new df(t,r.name,r.average,r.sampleCount,r.min,r.max,u,f),o=new ne(df.dataType,e),ht.createEnvelope(t,df.envelopeType,i,o)},t.MetricEnvelopeCreator=new t,t}(ht),dsi=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var f,s,e,u,h,l,a,v;n.prototype.Init.call(this,t,i);f="duration";e=i[ot];r(e)||r(e[kt])||r(e[kt][f])?r(i.data)||r(i.data[f])||(s=i.data[f],delete i.data[f]):(s=e[kt][f],delete e[kt][f]);u=i[ot];((i.ext||{}).trace||{}).traceID&&(h=i.ext.trace.traceID);var y=u.id||h,p=u.name,w=u.uri,o=u[kt]||{},c=u.measurements||{};return r(u.refUri)||(o.refUri=u.refUri),r(u.pageType)||(o.pageType=u.pageType),r(u.isLoggedIn)||(o.isLoggedIn=u.isLoggedIn.toString()),r(u[kt])||(l=u[kt],bt(l,function(n,t){o[n]=t})),ht.extractPropsAndMeasurements(i.data,o,c),a=new yu(t,p,w,s,o,c,y),v=new ne(yu.dataType,a),ht.createEnvelope(t,yu.envelopeType,i,v)},t.PageViewEnvelopeCreator=new t,t}(ht),gsi=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var e,o;n.prototype.Init.call(this,t,i);var r=i[ot],s=r.name,h=r.uri||r.url,u=r[kt]||{},f=r.measurements||{};return ht.extractPropsAndMeasurements(i.data,u,f),e=new ho(t,s,h,undefined,u,f,r),o=new ne(ho.dataType,e),ht.createEnvelope(t,ho.envelopeType,i,o)},t.PageViewPerformanceEnvelopeCreator=new t,t}(ht),nhi=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return k(t,n),t.prototype.Create=function(t,i){var f,e;n.prototype.Init.call(this,t,i);var o=i[ot].message,s=i[ot].severityLevel,r=i[ot][kt]||{},u=i[ot].measurements||{};return ht.extractPropsAndMeasurements(i.data,r,u),f=new so(t,o,s,r,u),e=new ne(so.dataType,f),ht.createEnvelope(t,so.envelopeType,i,e)},t.TraceEnvelopeCreator=new t,t}(ht),thi=function(){function n(r){lt(n,this,function(n){function u(n,o){var h="__aiCircularRefCheck",s={};if(!n)return r.throwInternal(i.CRITICAL,t.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:o},!0),s;if(n[h])return r.throwInternal(i.WARNING,t.CircularReferenceDetected,"Circular reference detected while serializing object",{name:o},!0),s;if(!n.aiDataContract){if(o==="measurements")s=f(n,"number",o);else if(o==="properties")s=f(n,"string",o);else if(o==="tags")s=f(n,"string",o);else if(af(n))s=e(n,o);else{r.throwInternal(i.WARNING,t.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:o},!0);try{rr().stringify(n);s=n}catch(c){r.throwInternal(i.CRITICAL,t.CannotSerializeObject,c&&y(c.toString)?c.toString():"Error serializing object",null,!0)}}return s}return n[h]=!0,bt(n.aiDataContract,function(f,h){var a=y(h)?h()&1:h&1,v=y(h)?h()&4:h&4,l=h&2,p=n[f]!==undefined,w=de(n[f])&&n[f]!==null,c;!a||p||l?v||(c=void 0,c=w?l?e(n[f],f):u(n[f],f):n[f],c!==undefined&&(s[f]=c)):r.throwInternal(i.CRITICAL,t.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:f,name:o})}),delete n[h],s}function e(n,f){var o,e,s,h;if(!!n)if(af(n))for(o=[],e=0;e<n.length;e++)s=n[e],h=u(s,f+"["+e+"]"),o.push(h);else r.throwInternal(i.CRITICAL,t.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:f},!0);return o}function f(n,t,u){var f;return n&&(f={},bt(n,function(n,e){if(t==="string")f[n]=e===undefined?"undefined":e===null?"null":e.toString?e.toString():"invalid field: toString() is not defined.";else if(t==="number")if(e===undefined)f[n]="undefined";else if(e===null)f[n]="null";else{var o=parseFloat(e);f[n]=isNaN(o)?"NaN":o}else f[n]="invalid field: "+u+" is of unknown type.",r.throwInternal(i.CRITICAL,f[n],null,!0)})),f}n.serialize=function(n){var e=u(n,"root");try{return rr().stringify(e)}catch(f){r.throwInternal(i.CRITICAL,t.CannotSerializeObject,f&&y(f.toString)?f.toString():"Error serializing object",null,!0)}}})}return n}(),ihi=function(){function n(){var u=th(),f=ar(),t=!1,i=!0;lt(n,this,function(n){function s(){i=!0}function h(){i=!1}var e,o;try{u&&gl.Attach(u,"online",s)&&(gl.Attach(u,"offline",h),t=!0);f&&(e=f.body||f,si(e.ononline)||(e.ononline=s,e.onoffline=h,t=!0));t&&(o=vr(),o&&!r(o.onLine)&&(i=o.onLine))}catch(c){t=!1}n.isListening=t;n.isOnline=function(){var n=!0,u=vr();return t?n=i:u&&!r(u.onLine)&&(n=u.onLine),n};n.isOffline=function(){return!n.isOnline()}})}return n.Offline=new n,n}(),wot=ihi.Offline,rhi=function(){function n(){}return n.prototype.getHashCodeScore=function(t){var i=this.getHashCode(t)/n.INT_MAX_VALUE;return i*100},n.prototype.getHashCode=function(t){var i,r;if(t==="")return 0;while(t.length<n.MIN_INPUT_LENGTH)t=t.concat(t);for(i=5381,r=0;r<t.length;++r)i=(i<<5)+i+t.charCodeAt(r),i=i&i;return Math.abs(i)},n.INT_MAX_VALUE=2147483647,n.MIN_INPUT_LENGTH=8,n}(),uhi=function(){function n(){this.hashCodeGeneragor=new rhi;this.keys=new cot}return n.prototype.getSamplingScore=function(n){return n.tags&&n.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(n.tags[this.keys.userId]):n.ext&&n.ext.user&&n.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(n.ext.user.id):n.tags&&n.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(n.tags[this.keys.operationId]):n.ext&&n.ext.telemetryTrace&&n.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(n.ext.telemetryTrace.traceID):Math.random()*100},n}(),fhi=function(){function n(n,r){this.INT_MAX_VALUE=2147483647;this._logger=r||vl(null);(n>100||n<0)&&(this._logger.throwInternal(i.WARNING,t.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:n},!0),n=100);this.sampleRate=n;this.samplingScoreGenerator=new uhi}return n.prototype.isSampledIn=function(n){var t=this.sampleRate;return t===null||t===undefined||t>=100?!0:n.baseType===df.dataType?!0:this.samplingScoreGenerator.getSamplingScore(n)<t},n}();var ehi=function(n){function u(){var f=n.call(this)||this,e,h,c,v,a,o;return f.priority=1001,f.identifier=lot,f._XMLHttpRequestSupported=!1,o={},lt(u,f,function(n,y){function p(){dr("Method not implemented.")}function ot(t){return n._sample.isSampledIn(t)}function g(r,u,f,o,s,h){var c=null,l;if(n._appId||(c=w(h),c&&c.appId&&(n._appId=c.appId)),(r<200||r>=300)&&r!==0){if((r===301||r===307||r===308)&&!nt(f)){n._onError(u,s);return}!n._senderConfig.isRetryDisabled()&&ut(r)?(k(u),n.diagLog().throwInternal(i.WARNING,t.TransmissionFailed,". Response code "+r+". Will retry to send "+u.length+" items.")):n._onError(u,s)}else wot.isOffline()?n._senderConfig.isRetryDisabled()||(l=10,k(u,l),n.diagLog().throwInternal(i.WARNING,t.TransmissionFailed,". Offline - Response Code: "+r+". Offline status: "+wot.isOffline()+". Will retry to send "+u.length+" items.")):(nt(f),r===206?(c||(c=w(h)),c&&!n._senderConfig.isRetryDisabled()?n._onPartialSuccess(u,c):n._onError(u,s)):(e=0,n._onSuccess(u,o)))}function nt(t){return a>=10?!1:!r(t)&&t!==""&&t!==n._senderConfig.endpointUrl()?(n._senderConfig.endpointUrl=function(){return t},++a,!0):!1}function tt(r){var u=n._senderConfig.endpointUrl(),f=n._buffer.batchPayloads(r),e=new Blob([f],{type:"text/plain;charset=UTF-8"}),o=vr().sendBeacon(u,e);o?(n._buffer.markAsSent(r),n._onSuccess(r,r.length)):(it(r,!0),n.diagLog().throwInternal(i.WARNING,t.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function it(t,i){var r=new XMLHttpRequest,u=n._senderConfig.endpointUrl(),f;try{r[hh]=!0}catch(e){}r.open("POST",u,i);r.setRequestHeader("Content-type","application/json");vw(u)&&r.setRequestHeader(ft.sdkContextHeader,ft.sdkContextHeaderAppIdRequest);l(no(o),function(n){r.setRequestHeader(n,o[n])});r.onreadystatechange=function(){return n._xhrReadyStateChange(r,t,t.length)};r.onerror=function(i){return n._onError(t,d(r),i)};f=n._buffer.batchPayloads(t);r.send(f);n._buffer.markAsSent(t)}function st(t){var r=n._senderConfig.endpointUrl(),e=n._buffer.batchPayloads(t),s=new Blob([e],{type:"text/plain;charset=UTF-8"}),i=new Headers,u,f;vw(r)&&i.append(ft.sdkContextHeader,ft.sdkContextHeaderAppIdRequest);l(no(o),function(n){i.append(n,o[n])});u={method:"POST",headers:i,body:s};f=new Request(r,u);fetch(f).then(function(i){if(i.ok)i.text().then(function(n){g(i.status,t,i.url,t.length,i.statusText,n)}),n._buffer.markAsSent(t);else throw Error(i.statusText);})["catch"](function(i){n._onError(t,i.message)})}function w(r){try{if(r&&r!==""){var u=rr().parse(r);if(u&&u.itemsReceived&&u.itemsReceived>=u.itemsAccepted&&u.itemsReceived-u.itemsAccepted===u.errors.length)return u}}catch(f){n.diagLog().throwInternal(i.CRITICAL,t.InvalidBackendResponse,"Cannot parse the response. "+b(f),{response:r})}return null}function k(t,i){var r,u,f;if(i===void 0&&(i=1),t&&t.length!==0){for(n._buffer.clearSent(t),e++,r=0,u=t;r<u.length;r++)f=u[r],n._buffer.enqueue(f);ht(i);rt()}}function ht(n){var i=10,r,u,t,f;e<=1?r=i:(u=(Math.pow(2,e)-1)/2,t=Math.floor(Math.random()*u*i)+1,t=n*t,r=Math.max(Math.min(t,3600),i));f=lr()+r*1e3;h=f}function rt(){if(!c){var t=h?Math.max(0,h-lr()):0,i=Math.max(n._senderConfig.maxBatchInterval(),t);c=setTimeout(function(){n.triggerSend(!0,null,1)},i)}}function ut(n){return n===408||n===429||n===500||n===503}function d(n,t){return n?"XMLHttpRequest,Status:"+n.status+",Response:"+oa(n)||n.response||"":t}function ct(r){var f=th(),u=new XDomainRequest,e,o,s;if(u.onload=function(){return n._xdrOnLoad(u,r)},u.onerror=function(t){return n._onError(r,et(u),t)},e=f&&f.location&&f.location.protocol||"",n._senderConfig.endpointUrl().lastIndexOf(e,0)!==0){n.diagLog().throwInternal(i.WARNING,t.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.");n._buffer.clear();return}o=n._senderConfig.endpointUrl().replace(/^(https?:)/,"");u.open("POST",o);s=n._buffer.batchPayloads(r);u.send(s);n._buffer.markAsSent(r)}function et(n,t){return n?"XDomainRequest,Response:"+oa(n)||"":t}function lt(){var t="getNotifyMgr";return n.core[t]?n.core[t]():n.core._notificationManager}function at(r,u){var f=lt();if(f&&f.eventsSendRequest)try{f.eventsSendRequest(r,u)}catch(e){n.diagLog().throwInternal(i.CRITICAL,t.NotificationException,"send request notification failed: "+b(e),{exception:s(e)})}}function vt(n){var u=r(n.disableInstrumentationKeyValidation)?!1:n.disableInstrumentationKeyValidation,t,i;return u?!0:(t="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",i=new RegExp(t),i.test(n.instrumentationKey))}n.pause=p;n.resume=p;n.flush=function(){try{n.triggerSend(!0,null,1)}catch(r){n.diagLog().throwInternal(i.CRITICAL,t.FlushFailed,"flush failed, telemetry will not be collected: "+b(r),{exception:s(r)})}};n.onunloadFlush=function(){if((n._senderConfig.onunloadDisableBeacon()===!1||n._senderConfig.isBeaconApiDisabled()===!1)&&vet())try{n.triggerSend(!0,tt,2)}catch(r){n.diagLog().throwInternal(i.CRITICAL,t.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+b(r),{exception:s(r)})}else n.flush()};n.teardown=p;n.addHeader=function(n,t){o[n]=t};n.initialize=function(r,o,s,c){var w,b,k,p,d,g;y.initialize(r,o,s,c);w=n._getTelCtx();b=n.identifier;v=new thi(o.logger);e=0;h=null;n._sender=null;a=0;k=u._getDefaultAppInsightsChannelConfig();n._senderConfig=u._getEmptyAppInsightsChannelConfig();bt(k,function(t,i){n._senderConfig[t]=function(){return w.getConfig(b,t,i())}});n._buffer=n._senderConfig.enableSessionStorageBuffer()&&ia()?new psi(n.diagLog(),n._senderConfig):new ysi(n._senderConfig);n._sample=new fhi(n._senderConfig.samplingPercentage(),n.diagLog());vt(r)||n.diagLog().throwInternal(i.CRITICAL,t.InvalidInstrumentationKey,"Invalid Instrumentation key "+r.instrumentationKey);!vw(n._senderConfig.endpointUrl())&&n._senderConfig.customHeaders()&&n._senderConfig.customHeaders().length>0&&l(n._senderConfig.customHeaders(),function(n){f.addHeader(n.header,n.value)});!n._senderConfig.isBeaconApiDisabled()&&vet()?n._sender=tt:(p=ei("XMLHttpRequest"),p?(d=new p,"withCredentials"in d?(n._sender=it,n._XMLHttpRequestSupported=!0):typeof XDomainRequest!==fu&&(n._sender=ct)):(g=ei("fetch"),g&&(n._sender=st)))};n.processTelemetry=function(r,f){var e,o;f=n._getTelCtx(f);try{if(n._senderConfig.disableTelemetry())return;if(!r){f.diagLog().throwInternal(i.CRITICAL,t.CannotSendEmptyTelemetry,"Cannot send empty telemetry");return}if(r.baseData&&!r.baseType){f.diagLog().throwInternal(i.CRITICAL,t.InvalidEvent,"Cannot send telemetry without baseData and baseType");return}if(r.baseType||(r.baseType="EventData"),!n._sender){f.diagLog().throwInternal(i.CRITICAL,t.SenderNotInitialized,"Sender was not initialized");return}if(ot(r))r[yet]=n._sample.sampleRate;else{f.diagLog().throwInternal(i.WARNING,t.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:n._sample.sampleRate});return}if(e=u.constructEnvelope(r,n._senderConfig.instrumentationKey(),f.diagLog()),!e){f.diagLog().throwInternal(i.CRITICAL,t.CreateEnvelopeError,"Unable to create an AppInsights envelope");return}if(o=!1,r.tags&&r.tags[ow]&&(l(r.tags[ow],function(n){try{n&&n(e)===!1&&(o=!0,f.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(r){f.diagLog().throwInternal(i.CRITICAL,t.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+b(r),{exception:s(r)},!0)}}),delete r.tags[ow]),o)return;var h=v.serialize(e),y=n._buffer.getItems(),c=n._buffer.batchPayloads(y);c&&c.length+h.length>n._senderConfig.maxBatchSizeInBytes()&&n.triggerSend(!0,null,10);n._buffer.enqueue(h);rt()}catch(a){f.diagLog().throwInternal(i.WARNING,t.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+b(a),{exception:s(a)})}n.processNext(r,f)};n._xhrReadyStateChange=function(n,t,i){n.readyState===4&&g(n.status,t,n.responseURL,i,d(n),oa(n)||n.response)};n.triggerSend=function(r,u,e){var o,l;r===void 0&&(r=!0);try{n._senderConfig.disableTelemetry()?n._buffer.clear():n._buffer.count()>0&&(o=n._buffer.getItems(),at(e||0,r),u?u.call(f,o,r):n._sender(o,r));clearTimeout(c);c=null;h=null}catch(a){l=rft();(!l||l>9)&&n.diagLog().throwInternal(i.CRITICAL,t.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+b(a),{exception:s(a)})}};n._onError=function(r,u){n.diagLog().throwInternal(i.WARNING,t.OnError,"Failed to send telemetry.",{message:u});n._buffer.clearSent(r)};n._onPartialSuccess=function(r,u){for(var s,h,f=[],e=[],l=u.errors.reverse(),o=0,c=l;o<c.length;o++)s=c[o],h=r.splice(s.index,1)[0],ut(s.statusCode)?e.push(h):f.push(h);r.length>0&&n._onSuccess(r,u.itemsAccepted);f.length>0&&n._onError(f,d(null,["partial success",u.itemsAccepted,"of",u.itemsReceived].join(" ")));e.length>0&&(k(e),n.diagLog().throwInternal(i.WARNING,t.TransmissionFailed,"Partial success. Delivered: "+r.length+", Failed: "+f.length+". Will retry to send "+e.length+" our of "+u.itemsReceived+" items"))};n._onSuccess=function(t){n._buffer.clearSent(t)};n._xdrOnLoad=function(t,i){var u=oa(t),r;t&&(u+""=="200"||u==="")?(e=0,n._onSuccess(i,0)):(r=w(u),r&&r.itemsReceived&&r.itemsReceived>r.itemsAccepted&&!n._senderConfig.isRetryDisabled()?n._onPartialSuccess(i,r):n._onError(i,et(t)))}}),f}return k(u,n),u.constructEnvelope=function(n,t,i){var u=t===n.iKey||r(t)?n:ds({},n,{iKey:t});switch(u.baseType){case vu.dataType:return pot.EventEnvelopeCreator.Create(i,u);case so.dataType:return nhi.TraceEnvelopeCreator.Create(i,u);case yu.dataType:return dsi.PageViewEnvelopeCreator.Create(i,u);case ho.dataType:return gsi.PageViewPerformanceEnvelopeCreator.Create(i,u);case nr.dataType:return bsi.ExceptionEnvelopeCreator.Create(i,u);case df.dataType:return ksi.MetricEnvelopeCreator.Create(i,u);case gf.dataType:return wsi.DependencyEnvelopeCreator.Create(i,u);default:return pot.EventEnvelopeCreator.Create(i,u)}},u._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined}}},u._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:undefined,emitLineDelimitedJson:undefined,maxBatchInterval:undefined,maxBatchSizeInBytes:undefined,disableTelemetry:undefined,enableSessionStorageBuffer:undefined,isRetryDisabled:undefined,isBeaconApiDisabled:undefined,onunloadDisableBeacon:undefined,instrumentationKey:undefined,namePrefix:undefined,samplingPercentage:undefined,customHeaders:undefined}},u}(rh),ohi="ai_session",bot=function(){function n(){}return n}(),shi=function(){function n(r,u){var c=this,e,o,f=vl(u),h=iw(u);lt(n,c,function(u){function v(n){var t=!1,i=h.get(e()),r;return i&&y(i.split)?t=c(n,i):(r=gei(f,e()),r&&(t=c(n,r))),t||!!n.id}function c(n,r){var c=!1,h=", session will be reset",u=r.split("|"),e,o;if(u.length>=2)try{e=+u[1]||0;o=+u[2]||0;isNaN(e)||e<=0?f.throwInternal(i.WARNING,t.SessionRenewalDateIsZero,"AI session acquisition date is 0"+h):isNaN(o)||o<=0?f.throwInternal(i.WARNING,t.SessionRenewalDateIsZero,"AI session renewal date is 0"+h):u[0]&&(n.id=u[0],n.acquisitionDate=e,n.renewalDate=o,c=!0)}catch(l){f.throwInternal(i.CRITICAL,t.ErrorParsingAISessionCookie,"Error parsing ai_session value ["+(r||"")+"]"+h+" - "+b(l),{exception:s(l)})}return c}function p(n){var r=u.config||{},e=(r.getNewId?r.getNewId():null)||fet;u.automaticSession.id=e(r.idLength?r.idLength():22);u.automaticSession.acquisitionDate=n;l(u.automaticSession,n);wet()||f.throwInternal(i.WARNING,t.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")}function l(n,t){var r=n.acquisitionDate,l;n.renewalDate=t;var i=u.config,f=i.sessionRenewalMs(),s=r+i.sessionExpirationMs()-t,a=[n.id,r,t],c=0;c=s<f?s/1e3:f/1e3;l=i.cookieDomain?i.cookieDomain():null;h.set(e(),a.join("|"),i.sessionExpirationMs()>0?c:null,l);o=t}function w(n,t,i){noi(f,e(),[n,t,i].join("|"))}r||(r={});y(r.sessionExpirationMs)||(r.sessionExpirationMs=function(){return n.acquisitionSpan});y(r.sessionRenewalMs)||(r.sessionRenewalMs=function(){return n.renewalSpan});u.config=r;var a=u.config.sessionCookiePostfix&&u.config.sessionCookiePostfix()?u.config.sessionCookiePostfix():u.config.namePrefix&&u.config.namePrefix()?u.config.namePrefix():"";e=function(){return ohi+a};u.automaticSession=new bot;u.update=function(){var i=lr(),t=!1,r=u.automaticSession,f;if(r.id||(t=!v(r)),f=u.config.sessionExpirationMs(),!t&&f>0){var h=u.config.sessionRenewalMs(),e=i-r.acquisitionDate,s=i-r.renewalDate;t=e<0||s<0;t=t||e>f;t=t||s>h}t?p(i):(!o||i-o>n.cookieUpdateInterval)&&l(r,i)};u.backup=function(){var n=u.automaticSession;w(n.id,n.acquisitionDate,n.renewalDate)}})}return n.acquisitionSpan=864e5,n.renewalSpan=18e5,n.cookieUpdateInterval=6e4,n}(),hhi=function(){function n(){}return n}(),chi=function(){function n(){this.id="browser";this.deviceClass="Browser"}return n}(),lhi="2.6.5",ahi=function(){function n(n){this.sdkVersion=(n.sdkExtension&&n.sdkExtension()?n.sdkExtension()+"_":"")+"javascript:"+lhi}return n}();var vhi=function(){function n(r,u){this.isNewUser=!1;var o=vl(u),f=iw(u),e;lt(n,this,function(u){var y,l,a,c,p,w,v,b,k,h,s;u.config=r;y=u.config.userCookiePostfix&&u.config.userCookiePostfix()?u.config.userCookiePostfix():"";e=function(){return n.userCookieName+y};l=f.get(e());l&&(u.isNewUser=!1,a=l.split(n.cookieSeparator),a.length>0&&(u.id=a[0]));u.id||(c=r||{},p=(c.getNewId?c.getNewId():null)||fet,u.id=p(c.idLength?r.idLength():22),w=31536e3,v=ge(new Date),u.accountAcquisitionDate=v,u.isNewUser=!0,b=[u.id,v],f.set(e(),b.join(n.cookieSeparator),w),k=r.namePrefix&&r.namePrefix()?r.namePrefix()+"ai_session":"ai_session",toi(o,k));u.accountId=r.accountId?r.accountId():undefined;h=f.get(n.authUserCookieName);h&&(h=decodeURI(h),s=h.split(n.cookieSeparator),s[0]&&(u.authenticatedId=s[0]),s.length>1&&s[1]&&(u.accountId=s[1]));u.setAuthenticatedUserContext=function(r,e,s){var c,h;if(s===void 0&&(s=!1),c=!kot(r)||e&&!kot(e),c){o.throwInternal(i.WARNING,t.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}u.authenticatedId=r;h=u.authenticatedId;e&&(u.accountId=e,h=[u.authenticatedId,u.accountId].join(n.cookieSeparator));s&&f.set(n.authUserCookieName,encodeURI(h))};u.clearAuthenticatedUserContext=function(){u.authenticatedId=null;u.accountId=null;f.del(n.authUserCookieName)}})}return n.cookieSeparator="|",n.userCookieName="ai_user",n.authUserCookieName="ai_authUser",n}(),yhi=function(){function n(){}return n}(),phi=function(){function n(n,t,i,r){var u=this,f;u.traceID=n||hu();u.parentID=t;u.name=i;f=vf();!i&&f&&f.pathname&&(u.name=f.pathname);u.name=ci(r,u.name)}return n}(),sa="ext",ha="tags";var whi=function(){function n(t,i){var r=this,u=t.logger;this.appId=function(){return null};lt(n,this,function(n){n.application=new hhi;n.internal=new ahi(i);al()&&(n.sessionManager=new shi(i,t),n.device=new chi,n.location=new yhi,n.user=new vhi(i,t),n.telemetryTrace=new phi(undefined,undefined,undefined,u),n.session=new bot);n.applySessionContext=function(t){var i=n.session,r=n.sessionManager;i&&h(i.id)?p(ii(t.ext,vi.AppExt),"sesId",i.id):r&&r.automaticSession&&p(ii(t.ext,vi.AppExt),"sesId",r.automaticSession.id,h)};n.applyOperatingSystemContxt=function(t){p(t.ext,vi.OSExt,n.os)};n.applyApplicationContext=function(t){var i=n.application,r;i&&(r=ii(t,ha),p(r,rt.applicationVersion,i.ver,h),p(r,rt.applicationBuild,i.build,h))};n.applyDeviceContext=function(t){var i=n.device,r;i&&(r=ii(ii(t,sa),vi.DeviceExt),p(r,"localId",i.id,h),p(r,"ip",i.ip,h),p(r,"model",i.model,h),p(r,"deviceClass",i.deviceClass,h))};n.applyInternalContext=function(t){var i=n.internal,r;i&&(r=ii(t,ha),p(r,rt.internalAgentVersion,i.agentVersion,h),p(r,rt.internalSdkVersion,i.sdkVersion,h),(t.baseType===io.dataType||t.baseType===yu.dataType)&&(p(r,rt.internalSnippet,i.snippetVer,h),p(r,rt.internalSdkSrc,i.sdkSrc,h)))};n.applyLocationContext=function(n){var t=r.location;t&&p(ii(n,ha,[]),rt.locationIp,t.ip,h)};n.applyOperationContext=function(t){var i=n.telemetryTrace,r;i&&(r=ii(ii(t,sa),vi.TraceExt,{traceID:undefined,parentID:undefined}),p(r,"traceID",i.traceID,h),p(r,"name",i.name,h),p(r,"parentID",i.parentID,h))};n.applyWebContext=function(n){var t=r.web;t&&p(ii(n,sa),vi.WebExt,t)};n.applyUserContext=function(t){var i=n.user,u,r;i&&(u=ii(t,ha,[]),p(u,rt.userAccountId,i.accountId,h),r=ii(ii(t,sa),vi.UserExt),p(r,"id",i.id,h),p(r,"authId",i.authenticatedId,h))};n.cleanUp=function(n){var t=n.ext;t&&(lo(t,vi.DeviceExt),lo(t,vi.UserExt),lo(t,vi.WebExt),lo(t,vi.OSExt),lo(t,vi.AppExt),lo(t,vi.TraceExt))}})}return n}(),bhi=function(n){function u(){var e=n.call(this)||this,o,f;return e.priority=110,e.identifier=ea,lt(u,e,function(n,e){function s(t,i){ii(t,"tags",[]);ii(t,"ext",{});var r=n.context;r.applySessionContext(t,i);r.applyApplicationContext(t,i);r.applyDeviceContext(t,i);r.applyOperationContext(t,i);r.applyUserContext(t,i);r.applyOperatingSystemContxt(t,i);r.applyWebContext(t,i);r.applyLocationContext(t,i);r.applyInternalContext(t,i);r.cleanUp(t,i)}n.initialize=function(t,i,r,s){e.initialize(t,i,r,s);var h=n._getTelCtx(),c=n.identifier,l=u.getDefaultConfig();f=f||{};bt(l,function(n,t){f[n]=function(){return h.getConfig(c,n,t())}});n.context=new whi(i,f);o=wei(r,lot);n.context.appId=function(){return o?o._appId:null};n._extConfig=f};n.processTelemetry=function(u,f){var e,o;r(u)||(f=n._getTelCtx(f),u.name===yu.envelopeType&&f.diagLog().resetInternalMessageCount(),e=n.context||{},e.session&&typeof n.context.session.id!="string"&&e.sessionManager&&e.sessionManager.update(),s(u,f),e.user&&e.user.isNewUser&&(e.user.isNewUser=!1,o=new io(t.SendBrowserInfoOnUserInit,(vr()||{}).userAgent||""),f.diagLog().logInternalMessage(i.CRITICAL,o)),n.processNext(u,f))}}),e}return k(u,n),u.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){return undefined},sessionCookiePostfix:function(){return undefined},userCookiePostfix:function(){return undefined},idLength:function(){return 22},getNewId:function(){return null}}},u}(rh),yi="properties";var dhi=function(){function n(){var n=this;n.openDone=!1;n.setRequestHeaderDone=!1;n.sendDone=!1;n.abortDone=!1;n.stateChangeAttached=!1}return n}(),got=function(){function n(t,i,r){var u=this,e=r,f="responseText";u.perfMark=null;u.completed=!1;u.requestHeadersSize=null;u.requestHeaders=null;u.responseReceivingDuration=null;u.callbackDuration=null;u.ajaxTotalDuration=null;u.aborted=0;u.pageUrl=null;u.requestUrl=null;u.requestSize=0;u.method=null;u.status=null;u.requestSentTime=null;u.responseStartedTime=null;u.responseFinishedTime=null;u.callbackFinishedTime=null;u.endTime=null;u.xhrMonitoringState=new dhi;u.clientFailure=0;u.traceID=t;u.spanID=i;lt(n,u,function(n){n.getAbsoluteUrl=function(){return n.requestUrl?uoi(n.requestUrl):null};n.getPathName=function(){return n.requestUrl?na(e,foi(n.method,n.requestUrl)):null};n.CreateTrackItem=function(t,i,r){var u,e,s,o,h;return(n.ajaxTotalDuration=Math.round(li(n.requestSentTime,n.responseFinishedTime)*1e3)/1e3,n.ajaxTotalDuration<0)?null:(u=(h={id:"|"+n.traceID+"."+n.spanID,target:n.getAbsoluteUrl(),name:n.getPathName(),type:t,startTime:null,duration:n.ajaxTotalDuration,success:+n.status>=200&&+n.status<400,responseCode:+n.status,method:n.method},h[yi]={HttpMethod:n.method},h),n.requestSentTime&&(u.startTime=new Date,u.startTime.setTime(n.requestSentTime)),khi(n,u),i&&no(n.requestHeaders).length>0&&(u[yi]=u[yi]||{},u[yi].requestHeaders=n.requestHeaders),r&&(e=r(),e&&(s=e.correlationContext,s&&(u.correlationContext=s),e.headerMap&&no(e.headerMap).length>0&&(u[yi]=u[yi]||{},u[yi].responseHeaders=e.headerMap),n.status>=400&&(o=e.type,u[yi]=u[yi]||{},(o===""||o==="text")&&(u[yi][f]=e[f]?e.statusText+" - "+e[f]:e.statusText),o==="json"&&(u[yi][f]=e.response?e.statusText+" - "+JSON.stringify(e.response):e.statusText)))),u)}})}return n}(),nst=function(){function n(t,i){var r=this;r.traceFlag=n.DEFAULT_TRACE_FLAG;r.version=n.DEFAULT_VERSION;r.traceId=t&&n.isValidTraceId(t)?t:hu();r.spanId=i&&n.isValidSpanId(i)?i:hu().substr(0,16)}return n.isValidTraceId=function(n){return n.match(/^[0-9a-f]{32}$/)&&n!=="00000000000000000000000000000000"},n.isValidSpanId=function(n){return n.match(/^[0-9a-f]{16}$/)&&n!=="0000000000000000"},n.prototype.toString=function(){var n=this;return n.version+"-"+n.traceId+"-"+n.spanId+"-"+n.traceFlag},n.DEFAULT_TRACE_FLAG="01",n.DEFAULT_VERSION="00",n}(),tst="ai.ajxmn.",vh="diagLog",pi="ajaxData",ist="throwInternal",yh="fetch",rst=0;var tci=function(n){function i(){var a=n.call(this)||this;a.identifier=i.identifier;a.priority=120;var v="trackDependencyDataInternal",b=vf(),k=!1,o=!1,et=b&&b.host&&b.host.toLowerCase(),u=i.getEmptyConfig(),f=!1,d=0,e,g,nt,p,tt=!1,w=0,it=!1,c=[],rt={},ut;return lt(i,a,function(n,a){function ot(n){var t=!0;return(n||u.ignoreHeaders)&&l(u.ignoreHeaders,function(i){if(i.toLowerCase()===n.toLowerCase())return t=!1,-1}),t}function yt(){var f=ghi(),r,i;f&&(r=be(),i=f.polyfill,u.disableFetchTracking===!1?(c.push(ew(r,yh,{req:function(t,r,u){var f,s,e;!k||ht(null,r,u)||i&&o||(s=t.ctx(),f=ti(r,u),e=n.includeCorrelationHeaders(f,r,u),e!==u&&t.set(1,e),s.data=f)},rsp:function(n,t){var i=n.ctx().data;i&&(n.rslt=n.rslt.then(function(t){return vt(n,(t||{}).status,t,i,function(){var i={statusText:t.statusText,headerMap:null,correlationContext:ii(t)},n;return it&&(n={},t.headers.forEach(function(t,i){ot(i)&&(n[i]=t)}),i.headerMap=n),i}),t})["catch"](function(r){vt(n,0,t,i,null,{error:r.message});throw r;}))},hkErr:wh(n,t.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),k=!0):i&&c.push(ew(r,yh,{req:function(n,t,i){ht(null,t,i)}})),i&&(r[yh].polyfill=i))}function st(n,t,i){c.push(lei(n,t,i))}function pt(){nci(n)&&!o&&(st(XMLHttpRequest,"open",{req:function(n,t,i,r){var u=n.inst,f=u[pi];ht(u,i)||!b(u,!0)||f&&f.xhrMonitoringState.openDone||wt(u,t,i,r)},hkErr:wh(n,t.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),st(XMLHttpRequest,"send",{req:function(t){var r=t.inst,i=r[pi];b(r)&&!i.xhrMonitoringState.sendDone&&(ct("xhr",i),i.requestSentTime=ra(),n.includeCorrelationHeaders(i,undefined,undefined,r),i.xhrMonitoringState.sendDone=!0)},hkErr:wh(n,t.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),st(XMLHttpRequest,"abort",{req:function(n){var i=n.inst,t=i[pi];b(i)&&!t.xhrMonitoringState.abortDone&&(t.aborted=1,t.xhrMonitoringState.abortDone=!0)},hkErr:wh(n,t.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),f&&st(XMLHttpRequest,"setRequestHeader",{req:function(n,t,i){var r=n.inst;b(r)&&ot(t)&&(r[pi].requestHeaders[t]=i)},hkErr:wh(n,t.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),o=!0)}function ht(n,t,i){var u=!1,f=((h(t)?t:(t||{}).url||"")||"").toLowerCase(),e,o;return(l(ut,function(n){var t=n;h(n)&&(t=new RegExp(n));u||(u=t.test(f))}),u)?u:(e=ao(f,"?"),o=ao(f,"#"),(e===-1||o!==-1&&o<e)&&(e=o),e!==-1&&(f=f.substring(0,e)),r(n)?r(t)||(u=(typeof t=="object"?t[hh]===!0:!1)||(i?i[hh]===!0:!1)):u=n[hh]===!0||f[hh]===!0,u?rt[f]||(rt[f]=1):rt[f]&&(u=!0),u)}function b(n,t){var i=!0,u=o;return r(n)||(i=t===!0||!r(n[pi])),u&&i}function wt(t,i,r,u){var o=e&&e.telemetryTrace&&e.telemetryTrace.traceID||hu(),s=hu().substr(0,16),f=new got(o,s,n[vh]());f.method=i;f.requestUrl=r;f.xhrMonitoringState.openDone=!0;f.requestHeaders={};f.async=u;t[pi]=f;kt(t)}function kt(i){i[pi].xhrMonitoringState.stateChangeAttached=gl.Attach(i,"readystatechange",function(){try{i&&i.readyState===4&&b(i)&&gt(i)}catch(u){var r=s(u);r&&ao(r.toLowerCase(),"c00c023f")!==-1||ph(n,t.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:ca(i),exception:r})}})}function dt(n){try{var t=n.responseType;if(t===""||t==="text")return n.responseText}catch(i){}return null}function gt(i){function u(r,u){var f=u||{};f.ajaxDiagnosticsMessage=ca(i);r&&(f.exception=s(r));la(n,t.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",f)}var r=i[pi];r.responseFinishedTime=ra();r.status=i.status;lt("xmlhttprequest",r,function(){try{var t=r.CreateTrackItem("Ajax",f,function(){var r={statusText:i.statusText,headerMap:null,correlationContext:ni(i),type:i.responseType,responseText:dt(i),response:i.response},n,u,t;return it&&(n=i.getAllResponseHeaders(),n&&(u=hi(n).split(/[\r\n]+/),t={},l(u,function(n){var i=n.split(": "),r=i.shift(),u=i.join(": ");ot(r)&&(t[r]=u)}),r.headerMap=t)),r});t?n[v](t):u(null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}finally{try{i[pi]=null}catch(e){}}},function(n){u(n,null)})}function ni(i){var r,u,f;try{if(r=i.getAllResponseHeaders(),r!==null&&(u=ao(r.toLowerCase(),ft.requestContextHeaderLowerCase),u!==-1))return f=i.getResponseHeader(ft.requestContextHeader),kf.getCorrelationContext(f)}catch(e){la(n,t.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:ca(i),exception:s(e)})}}function ct(n,t){var i,u,r;t.requestUrl&&p&&tt&&(i=ou(),i&&y(i.mark)&&(rst++,u=p+n+"#"+rst,i.mark(u),r=i.getEntriesByName(u),r&&r.length===1&&(t.perfMark=r[0])))}function lt(n,t,i,r){var f=t.perfMark,e=ou(),h=u.maxAjaxPerfLookupAttempts,c=u.ajaxPerfLookupDelay,s=t.requestUrl,o=0;(function l(){var v,p,a,u;try{if(e&&f)for(o++,v=null,p=e.getEntries(),a=p.length-1;a>=0;a--)if(u=p[a],u){if(u.entryType==="resource")u.initiatorType===n&&(ao(u.name,s)!==-1||ao(s,u.name)!==-1)&&(v=u);else if(u.entryType==="mark"&&u.name===f.name){t.perfTiming=v;break}if(u.startTime<f.startTime-1e3)break}!f||t.perfTiming||o>=h||t.async===!1?(f&&y(e.clearMarks)&&e.clearMarks(f.name),t.perfAttempts=o,i()):setTimeout(l,c)}catch(w){r(w)}})()}function ti(t,i){var h=e&&e.telemetryTrace&&e.telemetryTrace.traceID||hu(),c=hu().substr(0,16),r=new got(h,c,n[vh]()),u,o,s;return r.requestSentTime=ra(),r.requestUrl=t instanceof Request?t?t.url:"":t,u="GET",i&&i.method?u=i.method:t&&t instanceof Request&&(u=t.method),r.method=u,o={},f&&(s=new Headers((i?i.headers:0)||(t instanceof Request?t.headers||{}:{})),s.forEach(function(n,t){ot(t)&&(o[t]=n)})),r.requestHeaders=o,ct("fetch",r),r}function at(i){var u="";try{r(i)||(u+=typeof i=="string"?"(url: '"+i+"')":"(url: '"+i.url+"')")}catch(f){ph(n,t.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:s(f)})}return u}function vt(i,r,u,e,o){function h(t,i,r){var f=r||{};f.fetchDiagnosticsMessage=at(u);i&&(f.exception=s(i));la(n,t,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",f)}e&&(e.responseFinishedTime=ra(),e.status=r,lt("fetch",e,function(){var i=e.CreateTrackItem("Fetch",f,o);i?n[v](i):h(t.FailedMonitorAjaxDur,null,{requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime})},function(n){h(t.FailedMonitorAjaxGetCorrelationHeader,n,null)}))}function ii(i){if(i&&i.headers)try{var r=i.headers.get(ft.requestContextHeader);return kf.getCorrelationContext(r)}catch(u){la(n,t.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:at(i),exception:s(u)})}}n.initialize=function(t,r,o,s){var y,b,c,l,v,h;if(!n.isInitialized()&&(a.initialize(t,r,o,s),y=n._getTelCtx(),b=i.getDefaultConfig(),bt(b,function(n,t){u[n]=y.getConfig(i.identifier,n,t)}),c=u.distributedTracingMode,f=u.enableRequestHeaderTracking,tt=u.enableAjaxPerfTracking,w=u.maxAjaxCallsPerView,it=u.enableResponseHeaderTracking,ut=u.excludeRequestFromAutoTrackingPatterns,nt=c===gr.AI||c===gr.AI_AND_W3C,g=c===gr.AI_AND_W3C||c===gr.W3C,tt&&(l=t.instrumentationKey||"unkwn",p=l.length>5?tst+l.substring(l.length-5)+".":tst+l+"."),u.disableAjaxTracking===!1&&pt(),yt(),o.length>0&&o)){for(v=void 0,h=0;!v&&h<o.length;)o[h]&&o[h].identifier===ea&&(v=o[h]),h++;v&&(e=v.context)}};n.teardown=function(){l(c,function(n){n.rm()});c=[];k=!1;o=!1;n.setInitialized(!1)};n.trackDependencyData=function(t,i){n[v](t,i)};n.includeCorrelationHeaders=function(t,i,r,o){var l=n._currentWindowHost||et,h,s,c;return i?(kf.canIncludeCorrelationHeader(u,t.getAbsoluteUrl(),l)&&(r||(r={}),r.headers=new Headers(r.headers||(i instanceof Request?i.headers||{}:{})),nt&&(h="|"+t.traceID+"."+t.spanID,r.headers.set(ft.requestIdHeader,h),f&&(t.requestHeaders[ft.requestIdHeader]=h)),s=u.appId||e&&e.appId(),s&&(r.headers.set(ft.requestContextHeader,ft.requestContextAppIdFormat+s),f&&(t.requestHeaders[ft.requestContextHeader]=ft.requestContextAppIdFormat+s)),g&&(c=new nst(t.traceID,t.spanID),r.headers.set(ft.traceParentHeader,c.toString()),f&&(t.requestHeaders[ft.traceParentHeader]=c.toString()))),r):o?(kf.canIncludeCorrelationHeader(u,t.getAbsoluteUrl(),l)&&(nt&&(h="|"+t.traceID+"."+t.spanID,o.setRequestHeader(ft.requestIdHeader,h),f&&(t.requestHeaders[ft.requestIdHeader]=h)),s=u.appId||e&&e.appId(),s&&(o.setRequestHeader(ft.requestContextHeader,ft.requestContextAppIdFormat+s),f&&(t.requestHeaders[ft.requestContextHeader]=ft.requestContextAppIdFormat+s)),g&&(c=new nst(t.traceID,t.spanID),o.setRequestHeader(ft.traceParentHeader,c.toString()),f&&(t.requestHeaders[ft.traceParentHeader]=c.toString()))),o):undefined};n[v]=function(i,f,e){if(w===-1||d<w){(u.distributedTracingMode===gr.W3C||u.distributedTracingMode===gr.AI_AND_W3C)&&typeof i.id=="string"&&i.id[i.id.length-1]!=="."&&(i.id+=".");r(i.startTime)&&(i.startTime=new Date);var o=bu.create(i,gf.dataType,gf.envelopeType,n[vh](),f,e);n.core.track(o)}else d===w&&ph(n,t.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++d}}),a}return k(i,n),i.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:undefined,disableCorrelationHeaders:!1,distributedTracingMode:gr.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,correlationHeaderExcludePatterns:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"]}},i.getEmptyConfig=function(){var n=this.getDefaultConfig();return bt(n,function(t){n[t]=undefined}),n},i.prototype.processTelemetry=function(n,t){this.processNext(n,t)},i.identifier="AjaxDependencyPlugin",i}(rh),rb,ust=["snippet","dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults",],ici=function(){function n(n){var t=this,i,r,u;t._snippetVersion=""+(n.sv||n.version||"");n.queue=n.queue||[];n.version=n.version||2;i=n.config||{};i.connectionString&&(r=soi(i.connectionString),u=r.ingestionendpoint,i.endpointUrl=u?u+"/v2/track":i.endpointUrl,i.instrumentationKey=r.instrumentationkey||i.instrumentationKey);t.appInsights=new vsi;t.properties=new bhi;t.dependencies=new tci;t.core=new rei;t._sender=new ehi;t.snippet=n;t.config=i;t.getSKUDefaults()}return n.prototype.getCookieMgr=function(){return this.appInsights.getCookieMgr()},n.prototype.trackEvent=function(n,t){this.appInsights.trackEvent(n,t)},n.prototype.trackPageView=function(n){var t=n||{};this.appInsights.trackPageView(t)},n.prototype.trackPageViewPerformance=function(n){var t=n||{};this.appInsights.trackPageViewPerformance(t)},n.prototype.trackException=function(n){n&&!n.exception&&n.error&&(n.exception=n.error);this.appInsights.trackException(n)},n.prototype._onerror=function(n){this.appInsights._onerror(n)},n.prototype.trackTrace=function(n,t){this.appInsights.trackTrace(n,t)},n.prototype.trackMetric=function(n,t){this.appInsights.trackMetric(n,t)},n.prototype.startTrackPage=function(n){this.appInsights.startTrackPage(n)},n.prototype.stopTrackPage=function(n,t,i,r){this.appInsights.stopTrackPage(n,t,i,r)},n.prototype.startTrackEvent=function(n){this.appInsights.startTrackEvent(n)},n.prototype.stopTrackEvent=function(n,t,i){this.appInsights.stopTrackEvent(n,t,i)},n.prototype.addTelemetryInitializer=function(n){return this.appInsights.addTelemetryInitializer(n)},n.prototype.setAuthenticatedUserContext=function(n,t,i){i===void 0&&(i=!1);this.properties.context.user.setAuthenticatedUserContext(n,t,i)},n.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},n.prototype.trackDependencyData=function(n){this.dependencies.trackDependencyData(n)},n.prototype.flush=function(n){var t=this;n===void 0&&(n=!0);ih(this.core,function(){return"AISKU.flush"},function(){l(t.core.getTransmissionControls(),function(t){l(t,function(t){t.flush(n)})})},null,n)},n.prototype.onunloadFlush=function(n){n===void 0&&(n=!0);l(this.core.getTransmissionControls(),function(t){l(t,function(t){t.onunloadFlush?t.onunloadFlush():t.flush(n)})})},n.prototype.loadAppInsights=function(n,t,i){function e(t){if(t){var i="";r(u._snippetVersion)||(i+=u._snippetVersion);n&&(i+=".lg");u.context&&u.context.internal&&(u.context.internal.snippetVer=i||"-");bt(u,function(n,i){h(n)&&!y(i)&&n&&n[0]!=="_"&&ust.indexOf(n)===-1&&(t[n]=i)})}}var f=this,u;return n===void 0&&(n=!1),u=this,n&&u.config.extensions&&u.config.extensions.length>0&&dr("Extensions not allowed in legacy mode"),ih(u.core,function(){return"AISKU.loadAppInsights"},function(){var n=[];n.push(u._sender);n.push(u.properties);n.push(u.dependencies);n.push(u.appInsights);u.core.initialize(u.config,n,t,i);u.context=u.properties.context;rb&&u.context&&(u.context.internal.sdkSrc=rb);e(u.snippet);u.emptyQueue();u.pollInternalLogs();u.addHousekeepingBeforeUnload(f)}),u},n.prototype.updateSnippetDefinitions=function(n){cui(n,this,function(n){return n&&ust.indexOf(n)===-1})},n.prototype.emptyQueue=function(){var n=this,r,t,u,f;try{if(af(n.snippet.queue)){for(r=n.snippet.queue.length,t=0;t<r;t++)u=n.snippet.queue[t],u();n.snippet.queue=undefined;delete n.snippet.queue}}catch(i){f={};i&&y(i.toString)&&(f.exception=i.toString())}},n.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},n.prototype.addHousekeepingBeforeUnload=function(n){var u,r;(al()||ift())&&(u=function(){n.onunloadFlush(!1);l(n.appInsights.core._extensions,function(n){if(n.identifier===ea)return n&&n.context&&n.context._sessionManager&&n.context._sessionManager.backup(),-1})},n.appInsights.config.disableFlushOnBeforeUnload||(r=fo("beforeunload",u),r=fo("unload",u)||r,r=fo("pagehide",u)||r,r=fo("visibilitychange",u)||r,r||ofi()||n.appInsights.core.logger.throwInternal(i.CRITICAL,t.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload and pagehide")),n.appInsights.config.disableFlushOnUnload||(fo("pagehide",u),fo("visibilitychange",u)))},n.prototype.getSender=function(){return this._sender},n.prototype.getSKUDefaults=function(){var n=this;n.config.diagnosticLogInterval=n.config.diagnosticLogInterval&&n.config.diagnosticLogInterval>0?n.config.diagnosticLogInterval:1e4},n}();(function(){var r=null,f=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"],u,n,t,i;try{u=(document||{}).currentScript;u&&(r=u.src)}catch(e){}if(r)try{if(n=r.toLowerCase(),n)for(t="",i=0;i<f.length;i++)if(n.indexOf(f[i])!==-1){t="cdn"+(i+1);n.indexOf("/scripts/")===-1&&(n.indexOf("/next/")!==-1?t+="-next":n.indexOf("/beta/")!==-1&&(t+="-beta"));rb=t+"";break}}catch(e){}})();var rci=function(){function n(n){this.options=n;!this.options.disableTelemetry&&bi.appInsightsKey&&(this.appInsights=new ici({config:{instrumentationKey:bi.appInsightsKey,disableExceptionTracking:!0,disableAjaxTracking:!0,isCookieUseDisabled:!0,maxBatchInterval:5e3}}),this.appInsights.loadAppInsights(),this.appInsights.addTelemetryInitializer(function(n){n.tags[rt.applicationVersion]=dh.getFullVersion()}))}return n.prototype.trackEvent=function(n,t){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.trackEvent(n,t)},n.prototype.setAuthenticatedUserContext=function(n,t){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.setAuthenticatedUserContext(n,t)},n.prototype.trackException=function(n){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.trackException(n)},n.prototype.flush=function(n){!this.options.disableTelemetry&&this.appInsights&&this.appInsights.flush(n)},n}(),fst=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.copyrightMessage=undefined,t.copyrightContent=undefined,t.customAttribution=undefined,t.showFeedbackLink=!0,t.showLogo=!0,t}return u(t,n),t}(nt),uci=function(t){function i(n){var i=t.call(this)||this;return i.textAttribution=function(){return[i.options.copyrightMessage,i.options.customAttribution].filter(function(n){return n}).join("")},i.options=(new fst).merge(n),i}return u(i,t),i.prototype.onAdd=function(t){return this.container=this.buildContainer(t,n.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.copyrightDiv.className="azure-map-copyright",this.container.appendChild(this.copyrightDiv),this.options.showLogo&&this.addRemoveLogo(!0),this.options.showFeedbackLink&&this.addRemoveFeedbackDiv(!0),this.container},i.prototype.onRemove=function(){t.prototype.onRemove.call(this);delete this.container},i.prototype.setOptions=function(n){var r=this,t=(new fst).merge(this.options,n),i;(t.copyrightMessage!==this.options.copyrightMessage||t.customAttribution!==this.options.customAttribution)&&(this.copyrightDiv.innerText=this.textAttribution(t));t.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(i=Array.from(this.copyrightDiv.children).find(function(n){return n===r.options.copyrightContent}),this.copyrightDiv.removeChild(i)),this.copyrightDiv.childNodes.length>0?this.copyrightDiv.insertBefore(t.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(t.copyrightContent),this.options.copyrightContent=t.copyrightContent);!t.showLogo&&this.logoDiv?this.addRemoveLogo(!1):t.showLogo&&!this.logoDiv&&this.addRemoveLogo(!0);!t.showFeedbackLink&&this.feedbackDiv?this.addRemoveFeedbackDiv(!1):t.showFeedbackLink&&!this.feedbackDiv&&this.addRemoveFeedbackDiv(!0);this.options=t},i.prototype.getDefaultAttributions=function(){var n=(new Date).getFullYear(),t=["©"+n+" TomTom"];return this.options.showLogo||t.push("©"+n+" Microsoft"),t},i.prototype.buildCopyrightDiv=function(){var n=document.createElement("div");return n.innerText=this.textAttribution(this.options)||"",n},i.prototype.buildFeedbackLink=function(){var t=this,n=document.createElement("a");return n.href="https://feedback.azuremaps.com",n.target="_blank",n.rel="noopener",n.className="azure-map-feedback",n.onmouseover=function(){t.tooltip.style.visibility="visible"},n.onmouseout=function(){t.tooltip.style.visibility="hidden"},n},i.prototype.addToolTip=function(){var n=document.createElement("div"),t=document.createElement("div"),i;return t.innerText="Give Feedback",t.className="azure-map-feedback-tooltip",i=document.createElement("div"),i.className="azure-map-feedback-tooltip-beak",n.appendChild(t),n.appendChild(i),n.style.visibility="hidden",n.style.zIndex="1000",n},i.prototype.addRemoveFeedbackDiv=function(n){n?(this.feedbackDiv=this.buildFeedbackLink(),this.container.appendChild(this.feedbackDiv),this.tooltip=this.addToolTip(),this.container.appendChild(this.tooltip)):(this.feedbackDiv.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackDiv)},i.prototype.addRemoveLogo=function(n){n?(this.logoDiv=document.createElement("div"),this.logoDiv.className="azure-map-logo",this.container.appendChild(this.logoDiv)):(this.logoDiv.remove(),delete this.logoDiv)},i}(or),fci=function(){function n(){}return n.throwOnError=function(n,t){var i=n instanceof bst?n._getMap():n,r=function(n){i.off("error",r);throw n.error;},u;i.on("error",r);return u=t(),i.off("error",r),u},n.tryCatch=function(n,t,i,r){try{return this.throwOnError(n,t)}catch(u){return i(u)}finally{typeof r=="function"&&r()}},n.tryFinally=function(n,t,i){try{return this.throwOnError(n,t)}finally{i()}},n}(),eci=function(){function n(n){this.map=n}return n.prototype.request=function(n){var t=this.map.getServiceOptions().domain,i={domain:t,path:"search/address/reverse/json",queryParams:o({"api-version":"1.0",language:n.style.language,limit:1,query:vt(n.position[1])+","+st(n.position[0])},n.style.view&&{view:n.style.view})};return new fr(this.map.authentication.signRequest(i)).get()},n}(),oci=function(){function n(){this._labelCache={};this._labelIdx={};this._preloadedCache=new Set}return n.prototype.cache=function(n,t,i,r){var u=n+"_"+i[0]+"_"+i[1]+"_"+r;this._labelIdx[t.labelType]||(this._labelIdx[t.labelType]=[],this._labelCache[t.labelType]=[]);this._labelIdx[t.labelType].indexOf(u)===-1&&(this._labelCache[t.labelType].push({name:n,radius:t.radius,minZoom:t.minZoom,maxZoom:t.maxZoom||24,position:i}),this._labelIdx[t.labelType].push(u))},n.prototype.getNearestLabel=function(n,t,i){var o=null,u=this._labelCache[n],e,r,s,f;if(u)for(e=Infinity,r=0,s=u.length;r<s;r++)i>=u[r].minZoom&&i<=u[r].maxZoom&&(f=ai(u[r].position,t),f<=u[r].radius&&f<=e&&(e=f,o=u[r]));return o},n.prototype._preloadCache=function(n){if(!this._preloadedCache.has(n)){this._preloadedCache.add(n);var t={source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},i=n,r=i.indexOf("-");r!==-1&&(i=i.substr(0,r));switch(i){case"fr":this.cache("Océan Pacifique",t,[-170,32],n);this.cache("Océan Pacifique",t,[-138,-27],n);this.cache("Océan Atlantique",t,[-40,32],n);this.cache("Océan Atlantique",t,[-17,-29],n);break;case"es":this.cache("Océan Pacifique",t,[-170,32],n);this.cache("Océan Pacifique",t,[-138,-27],n);this.cache("Océano Atlántico",t,[-40,32],n);this.cache("Océano Atlántico",t,[-17,-29],n);break;case"pt":this.cache("Oceano Pacífico",t,[-170,32],n);this.cache("Oceano Pacífico",t,[-138,-27],n);this.cache("Oceano Atlântico",t,[-40,32],n);this.cache("Oceano Atlântico",t,[-17,-29],n);break;case"ja":this.cache("太平洋",t,[-170,32],n);this.cache("太平洋",t,[-138,-27],n);break;case"en":this.cache("Pacific Ocean",t,[-170,32],n);this.cache("Pacific Ocean",t,[-138,-27],n);this.cache("Atlantic Ocean",t,[-40,32],n);this.cache("Atlantic Ocean",t,[-17,-29],n);this.cache("Indian Ocean",t,[77,-26],n)}}},n}(),sci=function(){function n(t,i){var r=this;this._disposed=!1;this._lastHeadingTime=0;this._actionQueue=[];this._pointerUpdateDelay=3e3;this._camUpdateDelay=1e3;this._headUpdateLimit=1e3;this._controlEventDelay=500;this._moveThreshold=25;this._headingThreshold=5;this._pitchThreshold=5;this._roadPixelRadius=120;this._minRoadDistance=25;this._minIntersectionPixelDistance=50;this._baseVectorTileSourceId="vectorTiles";this._lableConfig=[{source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},{source:["Sea label"],labelType:"water",minZoom:3,radius:1e6,polygonSources:["Sea","Ocean or sea"]},{source:["Country name"],labelType:"country",minZoom:0,maxZoom:5,radius:3e5},{source:["State name","State name short"],labelType:"state",minZoom:4,maxZoom:7,radius:3e5},{source:["Capital city","Large city"],labelType:"city",minZoom:8,radius:4e4},{source:["Medium city"],labelType:"city",minZoom:8,radius:3e4},{source:["Small city"],labelType:"city",minZoom:8,radius:2e4},{source:["Island label"],labelType:"city",minZoom:8,radius:1e4},{source:["Town"],labelType:"city",minZoom:10,radius:1e4},{source:["Village"],labelType:"neighbourhood",minZoom:12,radius:6e3},{source:["Amusement area label"],labelType:"poi",minZoom:14,radius:2e3,polygonSources:["Amusement park"]},{source:["Hospital label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Hospital"]},{source:["Shopping centre label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Shopping"]},{source:["Stadium label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Stadium"]},{source:["University/School label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["University"]},{source:["Zoo label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Zoo"]},{source:["Airport Label","Airport name","Airport POI"],labelType:"majorPoi",minZoom:11,radius:3e3,polygonSources:["Airport","Runway"]},{source:["National park label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["National or state park","National park","Forest"]},{source:["Reservation label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["Reservation"]}];this._polygonStyleLayer=["National or state park","National park","Reservation","Airport","Runway","Stadium","University","Zoo","Shopping","Hospital","Amusement park","Ocean","Sea","Ocean or sea"];this._labelCache=new Set(["city","state","country","water","majorPoi"]);this._roadLayers=new Set(["Connecting road","Connecting road tunnel","International road","International road tunnel","Local road","Local road tunnel","Major local road","Major local road tunnel","Major road","Major road tunnel","Minor local road","Minor local road tunnel","Motorway","Motorway tunnel","Secondary road","Secondary road tunnel","Toll connecting road","Toll connecting road tunnel","Toll international road","Toll international road tunnel","Toll local road","Toll local road tunnel","Toll major local road","Toll major local road tunnel","Toll major road","Toll major road tunnel","Toll minor local road","Toll minor local road tunnel","Toll motorway","Toll motorway tunnel","Toll secondary road","Toll secondary road tunnel"]);this._returnDetailedDescriptions=!1;this._shortcutListener=function(n){return du(r,void 0,void 0,function(){var i,t,r,u,f;return gu(this,function(e){switch(e.label){case 0:return(n.altKey&&n.ctrlKey&&n.keyCode===68)?(this._returnDetailedDescriptions=!this._returnDetailedDescriptions,i=this._map.getCamera(),t=this._map.getStyle(),r=t.language.toLowerCase(),u=t.style.toLowerCase(),[4,this._getLocDesc(i,r,u)]):[3,2];case 1:f=e.sent();this._descCallback(f);e.label=2;case 2:return[2]}})})};this._onRotate=function(){r._rotateTimeout||(r._rotateTimeout=Date.now()-r._lastHeadingTime>=r._headUpdateLimit?setTimeout(r._updateHeading,ab.RotationDuration+25):setTimeout(r._updateHeading,r._headUpdateLimit-(Date.now()-r._lastHeadingTime)))};this._onMove=function(){r._moveTimeout&&(clearTimeout(r._moveTimeout),delete r._moveTimeout);r._controlTimeout&&(clearTimeout(r._controlTimeout),delete r._controlTimeout)};this._onMoveEnd=function(n){n.fromControl?r._controlTimeout=setTimeout(r._updateCam,r._controlEventDelay):r._updateCam()};this._onStyleData=function(){setTimeout(r._updateStyle)};this._onPointerDown=function(n){r._lastPointerPos=r._getEventPos(n);r._pointerTimeout=setTimeout(function(){return du(r,void 0,void 0,function(){var n,i,r,t,u;return gu(this,function(f){switch(f.label){case 0:return n=this._map.getStyle(),i=n.language.toLowerCase(),r=n.style.toLowerCase(),t=this._map.getCamera(),t.center=this._map.pixelsToPositions([this._lastPointerPos])[0],[4,this._getLocDesc(t,i,r)];case 1:return u=f.sent(),this._descCallback(u),this._onPointerUp(),[2]}})})},r._pointerUpdateDelay);r._map.getCanvas().addEventListener("mousemove",r._onPointerMove);r._map.getCanvas().addEventListener("touchmove",r._onPointerMove);r._map.getCanvas().addEventListener("mouseup",r._onPointerUp);r._map.getCanvas().addEventListener("touchend",r._onPointerUp)};this._onPointerMove=function(n){var t=r._getEventPos(n),i=r._lastPointerPos[0]-t[0],u=r._lastPointerPos[1]-t[1],f=Math.sqrt(i*i+u*u);f>r._moveThreshold&&r._onPointerUp()};this._onPointerUp=function(){clearTimeout(r._pointerTimeout);delete r._pointerTimeout;r._map.getCanvas().removeEventListener("mousemove",r._onPointerMove);r._map.getCanvas().removeEventListener("touchmove",r._onPointerMove);r._map.getCanvas().removeEventListener("mouseup",r._onPointerUp);r._map.getCanvas().removeEventListener("touchend",r._onPointerUp)};this._updateHeading=function(){var n=r._map.getCamera(),t;(!r._lastHead||r._checkHeadingThreshold(n.bearing,r._lastHead))&&(t=r._getHeadingDesc(n),r._lastHead=n.bearing,r._descCallback("<p>Map heading "+t+".<\/p>"),r._lastHeadingTime=Date.now());delete r._rotateTimeout};this._updateStyle=function(){return du(r,void 0,void 0,function(){var u,f,t,i,r;return gu(this,function(e){switch(e.label){case 0:return(u=this._map.getCamera(),f=this._map.getStyle(),t=f.language.toLowerCase(),i=f.style.toLowerCase(),!(this._lastLang!==t))?[3,2]:(n._labelCache._preloadCache(t),[4,this._getLocDesc(u,t,i)]);case 1:return r=e.sent(),[3,4];case 2:return(this._lastStyle!==i&&this._lastStyle==="blank")?[4,this._getLocDesc(u,t,i)]:[3,4];case 3:r=e.sent();e.label=4;case 4:return this._lastLang=t,this._lastStyle=i,r&&this._descCallback(r),[2]}})})};this._updateCam=function(n){var t;if(n===void 0&&(n=!1),t=r._map.getCamera(),!r._lastCam||r._actionQueue.length>0||r._checkThresholds(t,r._lastCam)){var i=r._map.getStyle(),f=i.language.toLowerCase(),e=i.style.toLowerCase(),u=r._getActionDesc(t);u&&r._actionQueue.push(u);r._lastCam=t;r._moveTimeout&&(clearTimeout(r._moveTimeout),delete r._moveTimeout);r._moveTimeout=setTimeout(function(){return du(r,void 0,void 0,function(){var n;return gu(this,function(i){switch(i.label){case 0:return clearTimeout(this._rotateTimeout),delete this._rotateTimeout,[4,this._getLocDesc(t,f,e)];case 1:return n=i.sent(),this._actionQueue.length>0?(this._descCallback("<p>Map "+this._actionQueue.join(", then ")+".<\/p>"+n),this._actionQueue=[]):this._descCallback(n),[2]}})})},n?0:r._camUpdateDelay)}};this._map=t;this._restFallback=t.getServiceOptions().enableAccessibilityLocationFallback;this._descCallback=i;this._reverseSearch=new eci(t);n._labelCache||(n._labelCache=new oci);this._lastLang=this._map.getStyle().language.toLowerCase();n._labelCache._preloadCache(this._lastLang);this._map.events.addOnce("load",function(){if(!r._disposed){r._updateCam(!0);r._map._getMap().on("move",r._onMove);r._map._getMap().on("moveend",r._onMoveEnd);r._map._getMap().on("styledata",r._onStyleData);r._map._getMap().on("rotate",r._onRotate);r._map.getCanvas().addEventListener("mousedown",r._onPointerDown);r._map.getCanvas().addEventListener("touchstart",r._onPointerDown)}});this._map.getMapContainer().addEventListener("keydown",this._shortcutListener)}return n.prototype.dispose=function(){this._disposed=!0;this._map._getMap().off("move",this._onMove);this._map._getMap().off("moveend",this._onMoveEnd);this._map._getMap().off("styledata",this._onStyleData);this._map._getMap().off("rotate",this._onRotate);this._map.getCanvas().removeEventListener("mousedown",this._onPointerDown);this._map.getCanvas().removeEventListener("touchstart",this._onPointerDown);this._map.getMapContainer().removeEventListener("keydown",this._shortcutListener)},n.prototype._getEventPos=function(n){if("touches"in n){var t=n.touches[0],i=n.target.getBoundingClientRect();return[t.pageX-i.left,t.pageY-i.top]}return[n.offsetX,n.offsetY]},n.prototype._checkThresholds=function(n,t){return this._checkZoomThreshold(n.zoom,t.zoom)||this._checkPitchThreshold(n.pitch,t.pitch)||this._checkLocThreshold(n.center,t.center)||this._checkHeadingThreshold(n.bearing,t.bearing)},n.prototype._checkZoomThreshold=function(n,t){return this._round(n)!==this._round(t)},n.prototype._checkPitchThreshold=function(n,t){return Math.abs(n-t)>=this._pitchThreshold},n.prototype._checkLocThreshold=function(n,t){var i=ki(this._map.positionsToPixels([t,n]),2),r=i[0],u=i[1];return gt.getDistance(r,u)>=this._moveThreshold},n.prototype._checkHeadingThreshold=function(n,t){n<0&&(n+=360);t<0&&(t+=360);var i=Math.abs(n-t);return i>180&&(i=360-i),i>=this._headingThreshold},n.prototype._getLocDesc=function(t,i,r){return du(this,void 0,void 0,function(){var u,a,o,s,h,c,v,f,e,l=this;return gu(this,function(y){switch(y.label){case 0:return(r!=="blank")?!this._map._getMap().loaded()?[4,new Promise(function(n){return l._map._getMap().once("idle",n)})]:[3,2]:[3,3];case 1:y.sent();y.label=2;case 2:for(u={},a=this._map.positionsToPixels([t.center])[0],fci.tryCatch(this._map,function(){o=l._map._getMap().queryRenderedFeatures(a,{layers:l._polygonStyleLayer,filter:["==",["geometry-type"],"Polygon"]})},function(){}),s=null,o&&o.length>0&&(s=o[0]),h=null,c=0,v=this._lableConfig.length;c<v;c++)f=this._lableConfig[c],t.zoom>=f.minZoom?f.polygonSources?s&&f.polygonSources.indexOf(s.layer["source-layer"])!==-1?(h=f.labelType,this._getClosestLabel(f,t,i,u,!1)):this._getClosestLabel(f,t,i,u,!0):this._getClosestLabel(f,t,i,u,!1):this._getClosestLabel(f,t,i,u,!0);return t.zoom>=8&&this._processRoads(u,t,i),this._labelCache.forEach(function(i){u[i]||(e=null,i==="water"||i==="majorPoi"?i===h&&(e=n._labelCache.getNearestLabel(i,t.center,t.zoom)):e=n._labelCache.getNearestLabel(i,t.center,t.zoom),e&&(u[i]=e.name))}),[2,this._processLocInfo(t,h,u,!0,this._restFallback)];case 3:return[2,this._processLocInfo(t,null,null,!1,!1)]}})})},n.prototype._getHeadingDesc=function(n){var t=n.bearing;t<0&&(t+=360);t=this._round(t,this._headingThreshold);switch(t){case 0:case 360:return"north";case 45:return"north east";case 90:return"east";case 135:return"south east";case 180:return"south";case 225:return"south west";case 270:return"west";case 315:return"north west";default:return t+" degrees"}},n.prototype._getClosestLabel=function(t,i,r,u,f){for(var e,p,h,v,c,w=t.radius,l=0,b=t.source.length;l<b;l++){var k={sourceLayer:t.source[l]},o=this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId,k),a=null,s=Infinity,y=this._labelCache.has(t.labelType);if(!f||f&&y)for(e=0,p=o.length;e<p;e++)h=o[e].geometry.type==="Point"?o[e]:cc(i.center,o[e].geometry),f||(v=o[e].geometry.type==="Point"?ai(i.center,h.geometry.coordinates):h.properties.distance,v<s&&(s=v,a=o[e])),y&&n._labelCache.cache(o[e].properties.name,t,h.geometry.coordinates,r);f||(c=t.labelType+"Dis",a&&s<=w&&(typeof u[c]!="number"||s<=u[c])&&(u[t.labelType]=a.properties.name,u[c]=s))}},n.prototype._processRoads=function(t,i,r,u){var e=this._map._getMap().queryRenderedFeatures(u,{filter:["==",["geometry-type"],"LineString"]}),f,y,c,a,v,p;if(e){var o=void 0,l=void 0,s=void 0,h=void 0;for(f=0,y=e.length;f<y;f++)this._roadLayers.has(e[f].layer["source-layer"])&&e[f].properties.name&&e[f].properties.name!==""&&(c=cc(i.center,e[f]),(!s||c.properties.distance<s.properties.distance)&&(o&&e[f].properties.name===o.properties.name?s=c:o&&e[f].properties.name===o.properties.name?(!h||c.properties.distance<h.properties.distance)&&(h=c,l=e[f]):(h=s,l=o,s=c,o=e[f])));o&&(t.country||(t.country=o.properties.country_code,t.countryDis=0,n._labelCache.cache(t.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},s.geometry.coordinates,r)),t.state||(t.state=o.properties.country_subdivision,t.stateDis=0,n._labelCache.cache(t.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},s.geometry.coordinates,r)),i.zoom>=15&&(a=this._map.positionsToPixels([i.center,s.geometry.coordinates]),v=gt.getDistance(a[0],a[1]),(v<this._roadPixelRadius||s.properties.distance<this._minRoadDistance)&&(t.road=o.properties.name),l&&(p=this._map.positionsToPixels([h.geometry.coordinates]),v=gt.getDistance(a[0],p[0]),(v<this._minIntersectionPixelDistance||h.properties.distance<this._minRoadDistance)&&(t.secondRoad=l.properties.name,t.secondRoadDis=h.properties.distance))))}},n.prototype._getActionDesc=function(n){var r,i,f,t,u,e,o;return this._lastCam?(r=[],this._checkLocThreshold(n.center,this._lastCam.center)&&(t=["panned"],i=Math.round(uu(this._lastCam.center,n.center)),i===0||i===360?t.push("north"):i<90?t.push("north east"):i===90?t.push("east"):i<180?t.push("south east"):i===180?t.push("south"):i<270?t.push("south west"):i===270?t.push("west"):i<360&&t.push("north west"),f=ai(this._lastCam.center,n.center,a.meters),t.push(f>1e3?oi(f/1e3,2)+" kilometers":oi(f,2)+" meters"),r.push(t.join(" "))),this._checkZoomThreshold(n.zoom,this._lastCam.zoom)&&(t=["zoomed"],t.push(this._lastCam.zoom<n.zoom?"in":"out"),u=Math.abs(this._lastCam.zoom-n.zoom),u>=1&&(u=Math.ceil(u),t.push(u>1?u+" levels":u+" level")),this._getCanonicalZoom(this._lastCam.zoom)!==this._getCanonicalZoom(n.zoom)&&t.push("to "+this._getCanonicalZoom(n.zoom)+" level"),r.push(t.join(" "))),this._checkPitchThreshold(n.pitch,this._lastCam.pitch)&&(e=this._round(n.pitch,this._pitchThreshold),r.push("pitched to "+e+" degrees"),(n.pitch===60||n.pitch===0)&&(o=n.pitch===60?"maximum":"minimum",r.push("reached "+o+" of "+n.pitch+" degrees"))),this._checkHeadingThreshold(this._lastCam.bearing,n.bearing)&&r.push("rotated to "+this._getHeadingDesc(n)),r.join(" and ")||null):null},n.prototype._getCanonicalZoom=function(n){return(n=this._round(n),n<2)?"world":n<5?"country":n<11?"state province":n<15?"city":"street"},n.prototype._processLocInfo=function(n,t,i,r,u){var f=this;return new Promise(function(e,o){var h=[],s;if(r)if(s=[],i&&(t&&(t==="water"&&i.water?s.push(i.water):t==="majorPoi"&&i.majorPoi&&s.push(i.majorPoi)),s.length===0&&(i.majorPoi&&n.zoom>=8?s.push(i.majorPoi):(i.poi&&n.zoom>=14?s.push(i.poi):i.road&&n.zoom>=15&&(i.secondRoad?s.push(i.road+" & "+i.secondRoad):s.push(i.road)),i.neighbourhood&&n.zoom>=12&&s.push(i.neighbourhood),i.city&&n.zoom>=6&&s.push(i.city)),i.state&&n.zoom>=4&&s.push(i.state),s.length===0?i.water?s.push(i.water):i.country&&s.push(i.country):s.length===1&&i.state&&n.zoom>=4&&i.country&&s.push(i.country))),s.length>0)h.push("<p>Location: ",s.join(", "),".<\/p>");else if(u&&t!=="water"){f._reverseGeocodeDescription(n).then(function(n){e(n)},function(){o("<p>Location: unknown<\/p>")});return}f._returnDetailedDescriptions&&(h.push("<p>Zoom: ",oi(n.zoom,2),".<\/p>"),h.push("<p>Latitude: ",oi(n.center[1],5),".<\/p>"),h.push("<p>Longitude: ",oi(n.center[0],5),".<\/p>"));e(h.join(""))})},n.prototype._reverseGeocodeDescription=function(t){var i=this;return new Promise(function(r){var u=i._map.getStyle();i._reverseSearch.request({position:t.center,style:u}).then(function(f){var o={},e;f&&f.addresses&&f.addresses.length>0&&f.addresses[0].address&&(e=f.addresses[0].address,e.country&&(o.country=e.country,n._labelCache.cache(o.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},t.center,u.language)),e.countrySubdivision&&(o.state=e.countrySubdivision,n._labelCache.cache(o.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},t.center,u.language)),e.municipality&&(o.city=e.municipality,n._labelCache.cache(o.state,{source:["Small city"],labelType:"city",radius:1e3,minZoom:10},t.center,u.language)),e.streetNameAndNumber?o.road=e.streetNameAndNumber:e.street&&(o.road=e.street));i._processLocInfo(t,null,o,!0,!1).then(function(n){r(n)})},function(){i._processLocInfo(t,null,null,!0,!1).then(function(n){r(n)})}).catch(function(){i._processLocInfo(t,null,null,!0,!1).then(function(n){r(n)})})})},n.prototype._round=function(n,t){return t===void 0&&(t=1),Math.round(n/t)*t},n}(),hci=function(){function n(n){var t=this;this.addToMap=function(){t.initializeMapLiveStateInfo();t.initializeMapStyleInfo();t.createMapKeyBindingInfo();t.map.getMapContainer().setAttribute("role","application");t.map.getMapContainer().setAttribute("aria-label","Map Application");t.map.getCanvas().setAttribute("aria-label","Interactive Map");t.map.getCanvas().setAttribute("aria-describedby","atlas-map-state atlas-map-style atlas-map-shortcuts");t.map.getCanvas().setAttribute("alt","Interactive Map")};this.removeFromMap=function(){t.mapViewDesc!=null&&t.mapViewDesc.dispose();delete t.mapViewDesc;t.atlasMapKeyBindings!=null&&t.map.getCanvasContainer().removeChild(t.atlasMapKeyBindings);delete t.atlasMapKeyBindings;t.atlasMapLiveStateInfo!=null&&t.map.getCanvasContainer().removeChild(t.atlasMapLiveStateInfo);delete t.atlasMapLiveStateInfo;t.atlasMapStyleInfo!=null&&t.map.getCanvasContainer().removeChild(t.atlasMapStyleInfo);delete t.atlasMapStyleInfo;t.map.getMapContainer().removeAttribute("role");t.map.getMapContainer().removeAttribute("aria-label");t.map.getCanvas().removeAttribute("aria-label");t.map.getCanvas().removeAttribute("aria-describedby");t.map.getCanvas().removeAttribute("alt");t.map.events.remove("styledata",t.updateMapStyle)};this.createMapKeyBindingInfo=function(){t.atlasMapKeyBindings=document.createElement("div");t.atlasMapKeyBindings.setAttribute("tabindex","-1");t.atlasMapKeyBindings.setAttribute("aria-hidden","true");t.atlasMapKeyBindings.id="atlas-map-shortcuts";t.atlasMapKeyBindings.classList.add("hidden-accessible-element");t.atlasMapKeyBindings.innerHTML="Map shortcuts:\nZoom out: hyphen.\nZoom in: plus.\nPan right 100 pixels: right arrow.\nPan left 100 pixels: left arrow.\nPan up 100 pixels: up arrow.\nPan down 100 pixels: down arrow.\nRotate 15 degrees clockwise: shift + right arrow.\nRotate 15 degrees counter clockwise: shift + left arrow.\nIncrease pitch 10 degrees: shift + up arrow.\nDecrease pitch 10 degrees: shift + down arrow.\nToggle verbose map state: control + alt + D.\nJump focus to the map: Escape.";t.map.getCanvasContainer().appendChild(t.atlasMapKeyBindings);t.atlasMapKeyBindings.setAttribute("aria-live","polite")};this.initializeMapLiveStateInfo=function(){t.mapViewDesc=new sci(t.map,t.updateMapState);t.atlasMapLiveStateInfo=document.createElement("div");t.atlasMapLiveStateInfo.setAttribute("tabindex","-1");t.atlasMapLiveStateInfo.setAttribute("aria-hidden","true");t.atlasMapLiveStateInfo.id="atlas-map-state";t.atlasMapLiveStateInfo.classList.add("hidden-accessible-element");t.map.getCanvasContainer().appendChild(t.atlasMapLiveStateInfo);t.atlasMapLiveStateInfo.setAttribute("aria-live","polite")};this.initializeMapStyleInfo=function(){t.atlasMapStyleInfo=document.createElement("div");t.atlasMapStyleInfo.setAttribute("tabindex","-1");t.atlasMapStyleInfo.setAttribute("aria-hidden","true");t.atlasMapStyleInfo.id="atlas-map-style";t.atlasMapStyleInfo.classList.add("hidden-accessible-element");t.updateMapStyle();t.map.events.add("styledata",t.updateMapStyle);t.map.getCanvasContainer().appendChild(t.atlasMapStyleInfo);t.atlasMapStyleInfo.setAttribute("aria-live","polite")};this.updateMapStyle=function(){t.atlasMapStyleInfo.innerHTML="<p>Map style: "+t.map.getStyle().style+".<\/p>"};this.updateMapState=function(n){t.atlasMapLiveStateInfo.innerHTML=n};this.map=n}return n}(),cci=function(){function n(n){var t=this;this.listenerEnabled=!1;this.lastFlowMode="none";this.addToMap=function(){var n,i;if(!t.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");t.listenerEnabled||(t.map.events.add("styledata",t.addToMap),t.listenerEnabled=!0);n=t.map.getTraffic();n.flow!=="none"&&(i=t.map.layers.getLayerById("traffic_"+n.flow),i&&(t.lastFlowMode=n.flow,i._updateLayoutProperty("visibility","visible","none")))};this.removeFromMap=function(){var i=t.map.getTraffic(),n;t.lastFlowMode!="none"&&(n=t.map.layers.getLayerById("traffic_"+t.lastFlowMode),n&&n._updateLayoutProperty("visibility","none","visible"),t.lastFlowMode="none");t.listenerEnabled&&(t.map.events.remove("styledata",t.addToMap),t.listenerEnabled=!1)};this.map=n}return n}(),lci=function(n){function t(i,r,u){var f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,vt=this,ct=(b=(w=(p=(y=(v=(a=(l=(c=(h=(s=(o=(e=(f=i.icon_category_12)!==null&&f!==void 0?f:i.icon_category_11)!==null&&e!==void 0?e:i.icon_category_10)!==null&&o!==void 0?o:i.icon_category_9)!==null&&s!==void 0?s:i.icon_category_8)!==null&&h!==void 0?h:i.icon_category_7)!==null&&c!==void 0?c:i.icon_category_6)!==null&&l!==void 0?l:i.icon_category_5)!==null&&a!==void 0?a:i.icon_category_4)!==null&&v!==void 0?v:i.icon_category_3)!==null&&y!==void 0?y:i.icon_category_2)!==null&&p!==void 0?p:i.icon_category_1)!==null&&w!==void 0?w:i.icon_category_0)!==null&&b!==void 0?b:i.icon_category,lt=(ht=(st=(ot=(et=(ft=(ut=(rt=(it=(tt=(nt=(g=(d=(k=i.description_12)!==null&&k!==void 0?k:i.description_11)!==null&&d!==void 0?d:i.description_10)!==null&&g!==void 0?g:i.description_9)!==null&&nt!==void 0?nt:i.description_8)!==null&&tt!==void 0?tt:i.description_7)!==null&&it!==void 0?it:i.description_6)!==null&&rt!==void 0?rt:i.description_5)!==null&&ut!==void 0?ut:i.description_4)!==null&&ft!==void 0?ft:i.description_3)!==null&&et!==void 0?et:i.description_2)!==null&&ot!==void 0?ot:i.description_1)!==null&&st!==void 0?st:i.description_0)!==null&&ht!==void 0?ht:i.description,at={icon:t.getSeverityColorName(i.magnitude)+"-"+t.getIncidentTypeIconName(ct),incidentType:t.getIncidentTypeName(ct,u),description:lt,delay:i.delay,color:t.getSeverityColorHexCode(i.magnitude),id:i.id};return n.call(this,r,at)||this}return u(t,n),t.getIncidentTypeName=function(n,t){switch(n){case 0:return t.Unknown;case 1:return t.Accident;case 2:return t.Fog;case 3:return t.Danger;case 4:return t.Rain;case 5:return t.Ice;case 6:return t.Jam;case 7:return t.LaneClosed;case 8:return t.RoadClosed;case 9:return t.RoadWorks;case 10:return t.Wind;case 11:return t.Flood;case 12:return t.Detour;default:return t.Unknown}},t.getIncidentTypeIconName=function(n){switch(n){case 0:return"unknown";case 1:return"accident";case 2:return"fog";case 3:return"danger";case 4:return"rain";case 5:return"ice";case 6:return"jam";case 7:return"lane-closed";case 8:return"road-closed";case 9:return"road-work";case 10:return"wind";case 11:return"flood";case 12:return"detour";default:return"unknown"}},t.getSeverityColorName=function(n){switch(n){case 0:return"grey";case 1:return"yellow";case 2:return"orange";case 3:return"red";case 4:return"grey";default:return"grey"}},t.getSeverityColorHexCode=function(n){switch(n){case 0:return"#B5B6B7";case 1:return"#F4C951";case 2:return"#F4873F";case 3:return"#F04F4E";case 4:return"#B5B6B7";default:return"#B5B6B7"}},t}(ir),vo;(function(n){n.DELAY="delay";n.LENGTH="length";n.FROM="from";n.TO="to"})(vo||(vo={}));var aci=function(){function n(){}return n.build=function(n,t){var i,r,f,u,h,c,s,o,l,a,v,y,p,e;return t===void 0&&(t="en-US"),i=document.createElement("div"),i.classList.add("incident-popup-title"),i.classList.add("font-segoeui-b"),i.setAttribute("tabindex","0"),i.innerText=n.properties.incidentType,i.setAttribute("aria-label","Incident Type "+n.properties.incidentType),r=document.createElement("div"),r.classList.add("incident-popup-subtitle"),r.classList.add("font-segoeui-b"),r.setAttribute("aria-label","Incident Description "+n.properties.description),r.setAttribute("tabindex","0"),r.innerText=n.properties.description,f=document.createElement("div"),f.classList.add("incident-popup-header"),f.style.backgroundColor=n.properties.color,f.appendChild(i),f.appendChild(r),u=document.createElement("div"),u.classList.add("incident-popup-body"),n.properties.delay&&(h=Math.floor(n.properties.delay/60)+" min",c=this.createInfoSection(h,vo.DELAY),u.appendChild(c)),n.properties.length&&(s=new Intl.NumberFormat([t,"en-US"],{maximumFractionDigits:2}),o=void 0,t==="en-US"?(l=ru(n.properties.length,"meters","miles"),o=s.format(l)+" miles"):(a=ru(n.properties.length,"meters","kilometers"),o=s.format(a)+" km"),v=this.createInfoSection(o,vo.LENGTH),u.appendChild(v)),n.properties.from&&(y=this.createInfoSection(n.properties.from,vo.FROM),u.appendChild(y)),n.properties.to&&(p=this.createInfoSection(n.properties.to,vo.TO),u.appendChild(p)),e=document.createElement("div"),e.classList.add("incident-popup-content"),e.appendChild(f),e.appendChild(u),new bc({content:e,position:n.geometry.coordinates})},n.createInfoSection=function(n,t){var r=document.createElement("div"),u,i;return r.classList.add("incident-popup-info"),u=document.createElement("div"),u.classList.add("icon"),u.classList.add(t),i=document.createElement("span"),i.classList.add("message"),i.classList.add("font-segoeui"),i.setAttribute("aria-label","Incident "+t+" "+n),i.setAttribute("tabindex","0"),i.innerText=n,r.appendChild(u),r.appendChild(i),r},n}(),vci=function(){function n(n){var t=this,i;this.incidentLayerName="incidents";this.incidentSourceName="mapcontrol_traffic_incident";this.addToMap=function(){t.map.sources.getById(t.incidentSourceName)||t.map.sources.add(t.vectorTileSource);t.map.layers.getLayerById(t.incidentLayerName)||t.map.layers.add(t.incidentLayer,"labels");t.popup=new bc({position:[0,0],pixelOffset:[0,-18]});t.map.addEventListener("mouseover",t.incidentLayerName,t.cursorToPointer);t.map.addEventListener("mouseleave",t.incidentLayerName,t.cursorToDefault);t.map.addEventListener("click",t.incidentLayerName,t.openIncidentPopup)};this.removeFromMap=function(){t.map.layers.getLayerById(t.incidentLayerName)!=null&&t.map.layers.remove(t.incidentLayerName);t.map.sources.getById(t.incidentSourceName)!=null&&t.map.sources.remove(t.incidentSourceName)};this.cursorToPointer=function(){t.map.getCanvas().style.cursor="pointer"};this.cursorToDefault=function(){t.map.getCanvas().style.cursor=""};this.openIncidentPopup=function(n){t.popup.remove();var i=n.position,r=n.features[0];t.map._getLocalizedStrings().then(function(n){var u=new hr(new fi(i[0],i[1])),f=new lci(r.properties,u,n);t.popup=aci.build(f,t.incidentLanguage);t.popup.open(t.map)})};this.map=n;this.vectorTileSource=new htt(this.incidentSourceName,{maxZoom:22,tiles:["https://"+f.domainPlaceHolder+"/traffic/incident/tile/pbf?api-version=1.0&zoom={z}&x={x}&y={y}",]});i=this.getIncidentIconImageExpression();this.incidentLayer=new yc(this.incidentSourceName,this.incidentLayerName,{sourceLayer:"Traffic incident POI",iconOptions:{ignorePlacement:!0,allowOverlap:!0,image:i,size:.75}})}return n.prototype.getIncidentIconImageExpression=function(){return["concat",["let","magnitude",["get","magnitude"],["case",["==",["var","magnitude"],0],"grey",["==",["var","magnitude"],1],"yellow",["==",["var","magnitude"],2],"orange",["==",["var","magnitude"],3],"red",["==",["var","magnitude"],4],"grey","grey",],],"-",["let","category",["coalesce",["get","icon_category_12"],["get","icon_category_11"],["get","icon_category_10"],["get","icon_category_9"],["get","icon_category_8"],["get","icon_category_7"],["get","icon_category_6"],["get","icon_category_5"],["get","icon_category_4"],["get","icon_category_3"],["get","icon_category_2"],["get","icon_category_0"],["get","icon_category"],0],["case",["==",["var","category"],0],"unknown",["==",["var","category"],1],"accident",["==",["var","category"],2],"fog",["==",["var","category"],3],"danger",["==",["var","category"],4],"rain",["==",["var","category"],5],"ice",["==",["var","category"],6],"jam",["==",["var","category"],7],"lane-closed",["==",["var","category"],8],"road-closed",["==",["var","category"],9],"road-work",["==",["var","category"],10],"wind",["==",["var","category"],11],"flood",["==",["var","category"],12],"detour","unknown"]]]},n}(),est=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.wheelZoomRate=1/450,t}return u(t,n),t}(nt),yci=function(){function n(n){var t=this;this._onKeyDown=function(n){n.keyCode===27&&t.map.getCanvas().focus()};this.map=n}return n.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},n.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},n}(),pci=function(){function n(n){var t=this;this.minDiffX=70;this.maxDiffY=100;this.minDiff=30;this.delay=160;this._onTouchStart=function(n){if(n.points.length===2){var i=n.points[0].y-n.points[1].y,r=n.points[0].x-n.points[1].x;Math.abs(r)>=t.minDiffX&&Math.abs(i)<=t.maxDiffY&&(n.originalEvent.preventDefault(),t.map._getMap().touchZoomRotate.disable(),t.map._getMap().dragPan.disable(),t.dpPoint=n.point,t.dpPitch=t.map._getMap().getPitch(),t.startTiming=Date.now(),t.startDistance=Math.hypot(r,i),t.startEventData=n)}};this._onTouchMove=function(n){var i;if(t.dpPoint!==undefined&&t.dpPitch!==undefined){n.preventDefault();n.originalEvent.preventDefault();var r=n.points[0].y-n.points[1].y,u=n.points[0].x-n.points[1].x,f=Math.hypot(u,r);if(Math.abs(f-t.startDistance)>=t.minDiff){if(t.dpPoint){t.map._getMap().touchZoomRotate.enable();t.map._getMap().dragPan.enable();t.map._getMap().touchZoomRotate.onStart(Date.now()-t.startTiming>=t.delay?n.originalEvent:t.startEventData.originalEvent)}t.dpPoint=undefined;return}Date.now()-t.startTiming>=t.delay&&(i=(t.dpPoint.y-n.point.y)*.5,t.map._getMap().setPitch(t.dpPitch+i))}};this._onTouchEnd=function(){t.dpPoint&&(t.map._getMap().touchZoomRotate.enable(),t.map._getMap().dragPan.enable());t.dpPoint=undefined};this._onTouchCancel=function(){t.dpPoint&&(t.map._getMap().touchZoomRotate.enable(),t.map._getMap().dragPan.enable());t.dpPoint=undefined};this.map=n}return n.prototype.enable=function(){this.map._getMap().on("touchstart",this._onTouchStart);this.map._getMap().on("touchmove",this._onTouchMove);this.map._getMap().on("touchend",this._onTouchEnd);this.map._getMap().on("touchcancel",this._onTouchCancel)},n.prototype.disable=function(){this.map._getMap().off("touchstart",this._onTouchStart);this.map._getMap().off("touchmove",this._onTouchMove);this.map._getMap().off("touchend",this._onTouchEnd);this.map._getMap().off("touchcancel",this._onTouchCancel)},n}(),wci=function(){function n(n){var t=this;this._onGestureStart=function(n){t.hasTouch||(n.preventDefault(),t.initZoom=t.map.getCamera().zoom)};this._onGestureChange=function(n){t.hasTouch||(n.preventDefault(),t.map.setCamera({zoom:t.initZoom+n.scale-1}))};this._onTouchStart=function(){t.hasTouch=!0};this._onTouchEnd=function(n){n.touches.length===0&&(t.hasTouch=!1)};this.map=n}return n.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart);this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange);this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart);this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},n.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart);this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange);this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart);this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)},n}(),bci=function(){function n(n,t){this.added=!1;this.map=n;this.mobilePitch=new pci(n);this.focusShortcut=new yci(n);this.pinchZoom=new wci(n);this.options=(new est).merge(t)}return n.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},n.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},n.prototype.setOptions=function(n){this.options=(new est).merge(this.options,n);this.added&&this._setInteractions(this.options)},n.prototype.getOptions=function(){return Object.assign({},this.options)},n.prototype._setInteractions=function(n){n.interactive?(n.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),n.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),n.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),n.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),n.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),n.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(n.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),n.touchInteraction?(this.map._getMap().touchZoomRotate.enable(),this.mobilePitch.enable(),this.pinchZoom.enable()):(this.map._getMap().touchZoomRotate.disable(),this.mobilePitch.disable(),this.pinchZoom.enable())):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.mobilePitch.disable(),this.pinchZoom.disable())},n}();hst=nu(function(n){(function(t,i){n.exports=i()})(ue,function(){function t(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function g(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function n(n,t,i){return t&&g(n.prototype,t),i&&g(n,i),n}function ct(n,t){return n>t?1:n<t?-1:0}function f(n,t,i){for(var f=new u(null,null),e=f,o=f,s,r;;)if(s=i(n,t.key),s<0){if(t.left===null)break;if(i(n,t.left.key)<0&&(r=t.left,t.left=r.right,r.right=t,t=r,t.left===null))break;o.left=t;o=t;t=t.left}else if(s>0){if(t.right===null)break;if(i(n,t.right.key)>0&&(r=t.right,t.right=r.left,r.left=t,t=r,t.right===null))break;e.right=t;e=t;t=t.right}else break;return e.right=t.left,o.left=t.right,t.left=f.right,t.right=f.left,t}function a(n,t,i,r){var e=new u(n,t),o;return i===null?(e.left=e.right=null,e):(i=f(n,i,r),o=r(n,i.key),o<0?(e.left=i.left,e.right=i,i.left=null):o>=0&&(e.right=i.right,e.left=i,i.right=null),e)}function nt(n,t,i){var r=null,u=null,e;return t&&(t=f(n,t,i),e=i(t.key,n),e===0?(r=t.left,u=t.right):e<0?(u=t.right,t.right=null,r=t):(r=t.left,t.left=null,u=t)),{left:r,right:u}}function lt(n,t,i){return t===null?n:n===null?t:(t=f(n.key,t,i),t.left=n,t)}function v(n,t,i,r,u){if(n){r(""+t+(i?"└── ":"├── ")+u(n)+"\n");var f=t+(i?"    ":"│   ");n.left&&v(n.left,f,!1,r,u);n.right&&v(n.right,f,!0,r,u)}}function p(n,t,i,r){var o=r-i;if(o>0){var f=i+Math.floor(o/2),s=n[f],h=t[f],e=new u(s,h);return e.left=p(n,t,i,f),e.right=p(n,t,f+1,r),e}return null}function at(n,t){for(var f=new u(null,null),r=f,i=0;i<n.length;i++)r=r.next=new u(n[i],t[i]);return r.next=null,f.next}function vt(n){for(var t=n,i=[],f=!1,e=new u(null,null),r=e;!f;)t?(i.push(t),t=t.left):i.length>0?(t=r=r.next=i.pop(),t=t.right):f=!0;return r.next=null,e.next}function w(n,t,i){var u=i-t;if(u>0){var f=t+Math.floor(u/2),e=w(n,t,f),r=n.head;return r.left=e,n.head=n.head.next,r.right=w(n,f+1,i),r}return null}function yt(n,t,i){for(var o=new u(null,null),e=o,r=n,f=t;r!==null&&f!==null;)i(r.key,f.key)<0?(e.next=r,r=r.next):(e.next=f,f=f.next),e=e.next;return r!==null?e.next=r:f!==null&&(e.next=f),o.next}function b(n,t,i,r,u){var o;if(!(i>=r)){for(var s=n[i+r>>1],e=i-1,f=r+1;;){do e++;while(u(n[e],s)<0);do f--;while(u(n[f],s)>0);if(e>=f)break;o=n[e];n[e]=n[f];n[f]=o;o=t[e];t[e]=t[f];t[f]=o}b(n,t,i,f,u);b(n,t,f+1,r,u)}}var u=function(){function n(n,t){this.next=null;this.key=n;this.data=t;this.left=null;this.right=null}return n}(),y=function(){function n(n){n===void 0&&(n=ct);this._root=null;this._size=0;this._comparator=n}return n.prototype.insert=function(n,t){return this._size++,this._root=a(n,t,this._root,this._comparator)},n.prototype.add=function(n,t){var i=new u(n,t);this._root===null&&(i.left=i.right=null,this._size++,this._root=i);var o=this._comparator,r=f(n,this._root,o),e=o(n,r.key);return e===0?this._root=r:(e<0?(i.left=r.left,i.right=r,r.left=null):e>0&&(i.right=r.right,i.left=r,r.right=null),this._size++,this._root=i),this._root},n.prototype.remove=function(n){this._root=this._remove(n,this._root,this._comparator)},n.prototype._remove=function(n,t,i){var r,u;return t===null?null:(t=f(n,t,i),u=i(n,t.key),u===0)?(t.left===null?r=t.right:(r=f(n,t.left,i),r.right=t.right),this._size--,r):t},n.prototype.pop=function(){var n=this._root;if(n){while(n.left)n=n.left;return this._root=f(n.key,this._root,this._comparator),this._root=this._remove(n.key,this._root,this._comparator),{key:n.key,data:n.data}}return null},n.prototype.findStatic=function(n){for(var t=this._root,r=this._comparator,i;t;){if(i=r(n,t.key),i===0)return t;t=i<0?t.left:t.right}return null},n.prototype.find=function(n){return this._root&&(this._root=f(n,this._root,this._comparator),this._comparator(n,this._root.key)!==0)?null:this._root},n.prototype.contains=function(n){for(var t=this._root,r=this._comparator,i;t;){if(i=r(n,t.key),i===0)return!0;t=i<0?t.left:t.right}return!1},n.prototype.forEach=function(n,t){for(var i=this._root,r=[],u=!1;!u;)i!==null?(r.push(i),i=i.left):r.length!==0?(i=r.pop(),n.call(t,i),i=i.right):u=!0;return this},n.prototype.range=function(n,t,i,r){for(var f=[],e=this._comparator,u=this._root,o;f.length!==0||u;)if(u)f.push(u),u=u.left;else{if(u=f.pop(),o=e(u.key,t),o>0)break;else if(e(u.key,n)>=0&&i.call(r,u))return this;u=u.right}return this},n.prototype.keys=function(){var n=[];return this.forEach(function(t){var i=t.key;return n.push(i)}),n},n.prototype.values=function(){var n=[];return this.forEach(function(t){var i=t.data;return n.push(i)}),n},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(n){if(n===void 0&&(n=this._root),n)while(n.left)n=n.left;return n},n.prototype.maxNode=function(n){if(n===void 0&&(n=this._root),n)while(n.right)n=n.right;return n},n.prototype.at=function(n){for(var t=this._root,r=!1,u=0,i=[];!r;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),u===n)return t;u++;t=t.right}else r=!0;return null},n.prototype.next=function(n){var t=this._root,i=null,u,r;if(n.right){for(i=n.right;i.left;)i=i.left;return i}for(u=this._comparator;t;)if(r=u(n.key,t.key),r===0)break;else r<0?(i=t,t=t.left):t=t.right;return i},n.prototype.prev=function(n){var t=this._root,i=null,u,r;if(n.left!==null){for(i=n.left;i.right;)i=i.right;return i}for(u=this._comparator;t;)if(r=u(n.key,t.key),r===0)break;else r<0?t=t.left:(i=t,t=t.right);return i},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return vt(this._root)},n.prototype.load=function(n,t,i){var r,u,f;return t===void 0&&(t=[]),i===void 0&&(i=!1),r=n.length,u=this._comparator,i&&b(n,t,0,r-1,u),this._root===null?(this._root=p(n,t,0,r),this._size=r):(f=yt(this.toList(),at(n,t),u),r=this._size+r,this._root=w({head:f},0,r)),this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(n){n===void 0&&(n=function(n){return String(n.key)});var t=[];return v(this._root,"",!0,function(n){return t.push(n)},n),t.join("")},n.prototype.update=function(n,t,i){var r=this._comparator,e=nt(n,this._root,r),u=e.left,f=e.right;r(n,t)<0?f=a(t,i,f,r):u=a(t,i,u,r);this._root=lt(u,f,r)},n.prototype.split=function(n){return nt(n,this._root,this._comparator)},n}(),o=function(n,t){return n.ll.x<=t.x&&t.x<=n.ur.x&&n.ll.y<=t.y&&t.y<=n.ur.y},k=function(n,t){if(t.ur.x<n.ll.x||n.ur.x<t.ll.x||t.ur.y<n.ll.y||n.ur.y<t.ll.y)return null;var i=n.ll.x<t.ll.x?t.ll.x:n.ll.x,r=n.ur.x<t.ur.x?n.ur.x:t.ur.x,u=n.ll.y<t.ll.y?t.ll.y:n.ll.y,f=n.ur.y<t.ur.y?n.ur.y:t.ur.y;return{ll:{x:i,y:u},ur:{x:r,y:f}}},e=Number.EPSILON;e===undefined&&(e=Math.pow(2,-52));var pt=e*e,d=function(n,t){if(-e<n&&n<e&&-e<t&&t<e)return 0;var i=n-t;return i*i<pt*n*t?0:n<t?-1:1},wt=function(){function i(){t(this,i);this.reset()}return n(i,[{key:"reset",value:function(){this.xRounder=new tt;this.yRounder=new tt}},{key:"round",value:function(n,t){return{x:this.xRounder.round(n),y:this.yRounder.round(t)}}}]),i}(),tt=function(){function i(){t(this,i);this.tree=new y;this.round(0)}return n(i,[{key:"round",value:function(n){var t=this.tree.add(n),r=this.tree.prev(t),i;return r!==null&&d(t.key,r.key)===0?(this.tree.remove(n),r.key):(i=this.tree.next(t),i!==null&&d(t.key,i.key)===0)?(this.tree.remove(n),i.key):n}}]),i}(),s=new wt,h=function(n,t){return n.x*t.y-n.y*t.x},it=function(n,t){return n.x*t.x+n.y*t.y},rt=function(n,t,i){var r={x:t.x-n.x,y:t.y-n.y},u={x:i.x-n.x,y:i.y-n.y},f=h(r,u);return d(f,0)},c=function(n){return Math.sqrt(it(n,n))},bt=function(n,t,i){var r={x:t.x-n.x,y:t.y-n.y},u={x:i.x-n.x,y:i.y-n.y};return h(u,r)/c(u)/c(r)},kt=function(n,t,i){var r={x:t.x-n.x,y:t.y-n.y},u={x:i.x-n.x,y:i.y-n.y};return it(u,r)/c(u)/c(r)},ut=function(n,t,i){return t.y===0?null:{x:n.x+t.x/t.y*(i-n.y),y:i}},ft=function(n,t,i){return t.x===0?null:{x:i,y:n.y+t.y/t.x*(i-n.x)}},dt=function(n,t,i,r){var u;if(t.x===0)return ft(i,r,n.x);if(r.x===0)return ft(n,t,i.x);if(t.y===0)return ut(i,r,n.y);if(r.y===0)return ut(n,t,i.y);if(u=h(t,r),u==0)return null;var f={x:i.x-n.x,y:i.y-n.y},e=h(f,t)/u,o=h(f,r)/u,s=n.x+o*t.x,c=i.x+e*r.x,l=n.y+o*t.y,a=i.y+e*r.y,v=(s+c)/2,y=(l+a)/2;return{x:v,y:y}},r=function(){function i(n,r){t(this,i);n.events===undefined?n.events=[this]:n.events.push(this);this.point=n;this.isLeft=r}return n(i,null,[{key:"compare",value:function(n,t){var r=i.comparePoints(n.point,t.point);return r!==0?r:(n.point!==t.point&&n.link(t),n.isLeft!==t.isLeft)?n.isLeft?1:-1:l.compare(n.segment,t.segment)}},{key:"comparePoints",value:function(n,t){return n.x<t.x?-1:n.x>t.x?1:n.y<t.y?-1:n.y>t.y?1:0}}]),n(i,[{key:"link",value:function(n){var i,t,u,r;if(n.point===this.point)throw new Error("Tried to link already linked events");for(i=n.point.events,t=0,u=i.length;t<u;t++)r=i[t],this.point.events.push(r),r.point=this.point;this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t,i,r,u=this.point.events.length,n=0;n<u;n++)if(t=this.point.events[n],t.segment.consumedBy===undefined)for(i=n+1;i<u;i++)(r=this.point.events[i],r.consumedBy===undefined)&&t.otherSE.point.events===r.otherSE.point.events&&t.segment.consume(r.segment)}},{key:"getAvailableLinkedEvents",value:function(){for(var n,i=[],t=0,r=this.point.events.length;t<r;t++)n=this.point.events[t],n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&i.push(n);return i}},{key:"getLeftmostComparator",value:function(n){var i=this,t=new Map,r=function(r){var u=r.otherSE;t.set(r,{sine:bt(i.point,n.point,u.point),cosine:kt(i.point,n.point,u.point)})};return function(n,i){t.has(n)||r(n);t.has(i)||r(i);var s=t.get(n),u=s.sine,f=s.cosine,h=t.get(i),e=h.sine,o=h.cosine;return u>=0&&e>=0?f<o?1:f>o?-1:0:u<0&&e<0?f<o?-1:f>o?1:0:e<u?-1:e>u?1:0}}}]),i}(),gt=0,l=function(){function u(n,i,r,f){t(this,u);this.id=++gt;this.leftSE=n;n.segment=this;n.otherSE=i;this.rightSE=i;i.segment=this;i.otherSE=n;this.rings=r;this.windings=f}return n(u,null,[{key:"compare",value:function(n,t){var s=n.leftSE.point.x,h=t.leftSE.point.x,u=n.rightSE.point.x,f=t.rightSE.point.x,c,l,a,v,y,p;if(f<s)return 1;if(u<h)return-1;var i=n.leftSE.point.y,r=t.leftSE.point.y,e=n.rightSE.point.y,o=t.rightSE.point.y;if(s<h)return r<i&&r<e?1:r>i&&r>e?-1:(c=n.comparePoint(t.leftSE.point),c<0)?1:c>0?-1:(l=t.comparePoint(n.rightSE.point),l!==0)?l:-1;if(s>h)return i<r&&i<o?-1:i>r&&i>o?1:(a=t.comparePoint(n.leftSE.point),a!==0)?a:(v=n.comparePoint(t.rightSE.point),v<0)?1:v>0?-1:1;if(i<r)return-1;if(i>r)return 1;if(u<f&&(y=t.comparePoint(n.rightSE.point),y!==0))return y;if(u>f){if(p=n.comparePoint(t.rightSE.point),p<0)return 1;if(p>0)return-1}if(u!==f){var w=e-i,b=u-s,k=o-r,d=f-h;if(w>b&&k<d)return 1;if(w<b&&k>d)return-1}return u>f?1:u<f?-1:e<o?-1:e>o?1:n.id<t.id?-1:n.id>t.id?1:0}}]),n(u,[{key:"replaceRightSE",value:function(n){this.rightSE=n;this.rightSE.segment=this;this.rightSE.otherSE=this.leftSE;this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var n=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:n<t?n:t},ur:{x:this.rightSE.point.x,y:n>t?n:t}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(n){return n.x===this.leftSE.point.x&&n.y===this.leftSE.point.y||n.x===this.rightSE.point.x&&n.y===this.rightSE.point.y}},{key:"comparePoint",value:function(n){var u,f,e,r;if(this.isAnEndpoint(n))return 0;var t=this.leftSE.point,o=this.rightSE.point,i=this.vector();return t.x===o.x?n.x===t.x?0:n.x<t.x?1:-1:(u=(n.y-t.y)/i.y,f=t.x+u*i.x,n.x===f)?0:(e=(n.x-t.x)/i.x,r=t.y+e*i.y,n.y===r)?0:n.y<r?-1:1}},{key:"getIntersection",value:function(n){var c=this.bbox(),l=n.bbox(),a=k(c,l),h;if(a===null)return null;var t=this.leftSE.point,i=this.rightSE.point,r=n.leftSE.point,u=n.rightSE.point,v=o(c,r)&&this.comparePoint(r)===0,y=o(l,t)&&n.comparePoint(t)===0,f=o(c,u)&&this.comparePoint(u)===0,e=o(l,i)&&n.comparePoint(i)===0;return y&&v?e&&!f?i:!e&&f?u:null:y?f&&t.x===u.x&&t.y===u.y?null:t:v?e&&i.x===r.x&&i.y===r.y?null:r:e&&f?null:e?i:f?u:(h=dt(t,this.vector(),r,n.vector()),h===null)?null:o(a,h)?s.round(h.x,h.y):null}},{key:"split",value:function(n){var i=[],o=n.events!==undefined,f=new r(n,!0),e=new r(n,!1),s=this.rightSE,t;return this.replaceRightSE(e),i.push(e),i.push(f),t=new u(f,s,this.rings.slice(),this.windings.slice()),r.comparePoints(t.leftSE.point,t.rightSE.point)>0&&t.swapEvents(),r.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),o&&(f.checkForConsuming(),e.checkForConsuming()),i}},{key:"swapEvents",value:function(){var i=this.rightSE,n,t;for(this.rightSE=this.leftSE,this.leftSE=i,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1,n=0,t=this.windings.length;n<t;n++)this.windings[n]*=-1}},{key:"consume",value:function(n){for(var i=this,t=n,f,e,o,r,s;i.consumedBy;)i=i.consumedBy;while(t.consumedBy)t=t.consumedBy;if(f=u.compare(i,t),f!==0){for(f>0&&(e=i,i=t,t=e),i.prev===t&&(o=i,i=t,t=o),r=0,s=t.rings.length;r<s;r++){var h=t.rings[r],c=t.windings[r],l=i.rings.indexOf(h);l===-1?(i.rings.push(h),i.windings.push(c)):i.windings[l]+=c}t.rings=null;t.windings=null;t.consumedBy=i;t.leftSE.consumedBy=i.leftSE;t.rightSE.consumedBy=i.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==undefined?this._prevInResult:(this._prevInResult=this.prev?this.prev.isInResult()?this.prev:this.prev.prevInResult():null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==undefined)return this._beforeState;if(this.prev){var n=this.prev.consumedBy||this.prev;this._beforeState=n.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){var s,t,v,n,f,i,b,e,r,c,o,k,l;if(this._afterState!==undefined)return this._afterState;s=this.beforeState();this._afterState={rings:s.rings.slice(0),windings:s.windings.slice(0),multiPolys:[]};var u=this._afterState.rings,h=this._afterState.windings,a=this._afterState.multiPolys;for(t=0,v=this.rings.length;t<v;t++){var y=this.rings[t],p=this.windings[t],w=u.indexOf(y);w===-1?(u.push(y),h.push(p)):h[w]+=p}for(n=[],f=[],i=0,b=u.length;i<b;i++)h[i]!==0&&(e=u[i],r=e.poly,f.indexOf(r)===-1)&&(e.isExterior?n.push(r):(f.indexOf(r)===-1&&f.push(r),c=n.indexOf(e.poly),c!==-1&&n.splice(c,1)));for(o=0,k=n.length;o<k;o++)l=n[o].multiPoly,a.indexOf(l)===-1&&a.push(l);return this._afterState}},{key:"isInResult",value:function(){var n,t,e,o,u,r,s,f;if(this.consumedBy)return!1;if(this._isInResult!==undefined)return this._isInResult;n=this.beforeState().multiPolys;t=this.afterState().multiPolys;switch(i.type){case"union":e=n.length===0;o=t.length===0;this._isInResult=e!==o;break;case"intersection":n.length<t.length?(u=n.length,r=t.length):(u=t.length,r=n.length);this._isInResult=r===i.numMultiPolys&&u<r;break;case"xor":s=Math.abs(n.length-t.length);this._isInResult=s%2==1;break;case"difference":f=function(n){return n.length===1&&n[0].isSubject};this._isInResult=f(n)!==f(t);break;default:throw new Error("Unrecognized operation type found ".concat(i.type));}return this._isInResult}}],[{key:"fromRing",value:function(n,t,i){var f,e,o,s=r.comparePoints(n,t),h,c;if(s<0)f=n,e=t,o=1;else if(s>0)f=t,e=n,o=-1;else throw new Error("Tried to create degenerate segment at [".concat(n.x,", ").concat(n.y,"]"));return h=new r(f,!0),c=new r(e,!1),new u(h,c,[i],[o])}}]),u}(),et=function(){function i(n,r,u){var e,o,h,c,f;if(t(this,i),!Array.isArray(n)||n.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=u,this.segments=[],typeof n[0][0]!="number"||typeof n[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");for(e=s.round(n[0][0],n[0][1]),this.bbox={ll:{x:e.x,y:e.y},ur:{x:e.x,y:e.y}},o=e,h=1,c=n.length;h<c;h++){if(typeof n[h][0]!="number"||typeof n[h][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");(f=s.round(n[h][0],n[h][1]),f.x!==o.x||f.y!==o.y)&&(this.segments.push(l.fromRing(o,f,this)),f.x<this.bbox.ll.x&&(this.bbox.ll.x=f.x),f.y<this.bbox.ll.y&&(this.bbox.ll.y=f.y),f.x>this.bbox.ur.x&&(this.bbox.ur.x=f.x),f.y>this.bbox.ur.y&&(this.bbox.ur.y=f.y),o=f)}(e.x!==o.x||e.y!==o.y)&&this.segments.push(l.fromRing(o,e,this))}return n(i,[{key:"getSweepEvents",value:function(){for(var i,n=[],t=0,r=this.segments.length;t<r;t++)i=this.segments[t],n.push(i.leftSE),n.push(i.rightSE);return n}}]),i}(),ni=function(){function i(n,r){var f,e,u;if(t(this,i),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");for(this.exteriorRing=new et(n[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[],f=1,e=n.length;f<e;f++)u=new et(n[f],this,!1),u.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=u.bbox.ll.x),u.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=u.bbox.ll.y),u.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=u.bbox.ur.x),u.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=u.bbox.ur.y),this.interiorRings.push(u);this.multiPoly=r}return n(i,[{key:"getSweepEvents",value:function(){for(var i,n,u,r=this.exteriorRing.getSweepEvents(),t=0,f=this.interiorRings.length;t<f;t++)for(i=this.interiorRings[t].getSweepEvents(),n=0,u=i.length;n<u;n++)r.push(i[n]);return r}}]),i}(),ot=function(){function i(n,r){var f,e,u;if(t(this,i),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof n[0][0][0]=="number"&&(n=[n])}catch(o){}for(this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}},f=0,e=n.length;f<e;f++)u=new ni(n[f],this),u.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=u.bbox.ll.x),u.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=u.bbox.ll.y),u.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=u.bbox.ur.x),u.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=u.bbox.ur.y),this.polys.push(u);this.isSubject=r}return n(i,[{key:"getSweepEvents",value:function(){for(var i,n,u,r=[],t=0,f=this.polys.length;t<f;t++)for(i=this.polys[t].getSweepEvents(),n=0,u=i.length;n<u;n++)r.push(i[n]);return r}}]),i}(),ti=function(){function i(n){t(this,i);this.events=n;for(var r=0,u=n.length;r<u;r++)n[r].segment.ringOut=this;this.poly=null}return n(i,null,[{key:"factory",value:function(n){for(var u,f,v,y,s,e,w,b,h,k,c=[],l=0,d=n.length;l<d;l++)if(u=n[l],u.isInResult()&&!u.ringOut){for(var p=null,t=u.leftSE,a=u.rightSE,r=[t],g=t.point,o=[];;){if(p=t,t=a,r.push(t),t.point===g)break;for(;;){if(f=t.getAvailableLinkedEvents(),f.length===0){v=r[0].point;y=r[r.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(v.x,",")+" ".concat(v.y,"]. Last matching segment found ends at")+" [".concat(y.x,", ").concat(y.y,"]."));}if(f.length===1){a=f[0].otherSE;break}for(s=null,e=0,w=o.length;e<w;e++)if(o[e].point===t.point){s=e;break}if(s!==null){b=o.splice(s)[0];h=r.splice(b.index);h.unshift(h[0].otherSE);c.push(new i(h.reverse()));continue}o.push({index:r.length,point:t.point});k=t.getLeftmostComparator(p);a=f.sort(k)[0].otherSE;break}}c.push(new i(r))}return c}}]),n(i,[{key:"getGeom",value:function(){for(var u,f,e,o,t,i=this.events[0].point,n=[i],r=1,h=this.events.length-1;r<h;r++)(u=this.events[r].point,f=this.events[r+1].point,rt(u,i,f)!==0)&&(n.push(u),i=u);if(n.length===1)return null;e=n[0];o=n[1];rt(e,i,o)===0&&n.shift();n.push(n[0]);var c=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:n.length-1,a=this.isExteriorRing()?n.length:-1,s=[];for(t=l;t!=a;t+=c)s.push([n[t].x,n[t].y]);return s}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===undefined){var n=this.enclosingRing();this._isExteriorRing=n?!n.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===undefined&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var f,n,t,i=this.events[0],u=1,e=this.events.length;u<e;u++)f=this.events[u],r.compare(i,f)>0&&(i=f);for(n=i.segment.prevInResult(),t=n?n.prevInResult():null;;){if(!n)return null;if(!t)return n.ringOut;if(t.ringOut!==n.ringOut)return t.ringOut.enclosingRing()!==n.ringOut?n.ringOut:n.ringOut.enclosingRing();n=t.prevInResult();t=n?n.prevInResult():null}}}]),i}(),st=function(){function i(n){t(this,i);this.exteriorRing=n;n.poly=this;this.interiorRings=[]}return n(i,[{key:"addInterior",value:function(n){this.interiorRings.push(n);n.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()],n,r,i;if(t[0]===null)return null;for(n=0,r=this.interiorRings.length;n<r;n++)(i=this.interiorRings[n].getGeom(),i!==null)&&t.push(i);return t}}]),i}(),ii=function(){function i(n){t(this,i);this.rings=n;this.polys=this._composePolys(n)}return n(i,[{key:"getGeom",value:function(){for(var t,i=[],n=0,r=this.polys.length;n<r;n++)(t=this.polys[n].getGeom(),t!==null)&&i.push(t);return i}},{key:"_composePolys",value:function(n){for(var t,i,r=[],u=0,f=n.length;u<f;u++)(t=n[u],t.poly)||(t.isExteriorRing()?r.push(new st(t)):(i=t.enclosingRing(),i.poly||r.push(new st(i)),i.poly.addInterior(t)));return r}}]),i}(),ri=function(){function i(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:l.compare;t(this,i);this.queue=n;this.tree=new y(r);this.segments=[]}return n(i,[{key:"process",value:function(n){var t=n.segment,f=[],y,e,s,g,p,ut,o,h,nt,w,ft,v,et,tt,b,ot,c,it,k,st,rt,d,ht;if(n.consumedBy)return n.isLeft?this.queue.remove(n.otherSE):this.tree.remove(t),f;if(y=n.isLeft?this.tree.insert(t):this.tree.find(t),!y)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var l=y,a=y,i=undefined,u=undefined;i===undefined;)l=this.tree.prev(l),l===null?i=null:l.key.consumedBy===undefined&&(i=l.key);while(u===undefined)a=this.tree.next(a),a===null?u=null:a.key.consumedBy===undefined&&(u=a.key);if(n.isLeft){if(e=null,i&&(s=i.getIntersection(t),s!==null&&(t.isAnEndpoint(s)||(e=s),!i.isAnEndpoint(s))))for(g=this._splitSafely(i,s),p=0,ut=g.length;p<ut;p++)f.push(g[p]);if(o=null,u&&(h=u.getIntersection(t),h!==null&&(t.isAnEndpoint(h)||(o=h),!u.isAnEndpoint(h))))for(nt=this._splitSafely(u,h),w=0,ft=nt.length;w<ft;w++)f.push(nt[w]);if(e!==null||o!==null)for(v=null,e===null?v=o:o===null?v=e:(et=r.comparePoints(e,o),v=et<=0?e:o),this.queue.remove(t.rightSE),f.push(t.rightSE),tt=t.split(v),b=0,ot=tt.length;b<ot;b++)f.push(tt[b]);f.length>0?(this.tree.remove(t),f.push(n)):(this.segments.push(t),t.prev=i)}else{if(i&&u&&(c=i.getIntersection(u),c!==null)){if(!i.isAnEndpoint(c))for(it=this._splitSafely(i,c),k=0,st=it.length;k<st;k++)f.push(it[k]);if(!u.isAnEndpoint(c))for(rt=this._splitSafely(u,c),d=0,ht=rt.length;d<ht;d++)f.push(rt[d])}this.tree.remove(t)}return f}},{key:"_splitSafely",value:function(n,t){var i,r;return this.tree.remove(n),i=n.rightSE,this.queue.remove(i),r=n.split(t),r.push(i),n.consumedBy===undefined&&this.tree.insert(n),r}}]),i}(),ht=typeof process!="undefined"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,ui=typeof process!="undefined"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,fi=function(){function u(){t(this,u)}return n(u,[{key:"run",value:function(n,t,u){var f,a,rt,ut,c,l,ft,et,v,st,e,p,ct,d,w,lt,o,h,tt,b,vt,it,yt,pt;for(i.type=n,s.reset(),f=[new ot(t,!0)],a=0,rt=u.length;a<rt;a++)f.push(new ot(u[a],!1));if(i.numMultiPolys=f.length,i.type==="difference")for(ut=f[0],c=1;c<f.length;)k(f[c].bbox,ut.bbox)!==null?c++:f.splice(c,1);if(i.type==="intersection")for(l=0,ft=f.length;l<ft;l++)for(et=f[l],v=l+1,st=f.length;v<st;v++)if(k(et.bbox,f[v].bbox)===null)return[];for(e=new y(r.compare),p=0,ct=f.length;p<ct;p++)for(d=f[p].getSweepEvents(),w=0,lt=d.length;w<lt;w++)if(e.insert(d[w]),e.size>ht)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var g=new ri(e),at=e.size,nt=e.pop();nt;){if(o=nt.key,e.size===at){h=o.segment;throw new Error("Unable to pop() ".concat(o.isLeft?"left":"right"," SweepEvent ")+"[".concat(o.point.x,", ").concat(o.point.y,"] from segment #").concat(h.id," ")+"[".concat(h.leftSE.point.x,", ").concat(h.leftSE.point.y,"] -> ")+"[".concat(h.rightSE.point.x,", ").concat(h.rightSE.point.y,"] from queue. ")+"Please file a bug report.");}if(e.size>ht)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(g.segments.length>ui)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(tt=g.process(o),b=0,vt=tt.length;b<vt;b++)it=tt[b],it.consumedBy===undefined&&e.insert(it);at=e.size;nt=e.pop()}return s.reset(),yt=ti.factory(g.segments),pt=new ii(yt),pt.getGeom()}}]),u}(),i=new fi,ei=function(n){for(var r=arguments.length,u=new Array(r>1?r-1:0),t=1;t<r;t++)u[t-1]=arguments[t];return i.run("union",n,u)},oi=function(n){for(var r=arguments.length,u=new Array(r>1?r-1:0),t=1;t<r;t++)u[t-1]=arguments[t];return i.run("intersection",n,u)},si=function(n){for(var r=arguments.length,u=new Array(r>1?r-1:0),t=1;t<r;t++)u[t-1]=arguments[t];return i.run("xor",n,u)},hi=function(n){for(var r=arguments.length,u=new Array(r>1?r-1:0),t=1;t<r;t++)u[t-1]=arguments[t];return i.run("difference",n,u)};return{union:ei,intersection:oi,xor:si,difference:hi}})});var nli=function(n){return function(t,i,r){var f=r.value,u=new Map;return r.value=function(){var t=this,i=arguments,r=u.get(t)||!1;r||(f.apply(t,i),u.set(t,!0),setTimeout(function(){return u.delete(t)},n))},r}},tli=["DIV","SPAN","A"],ub=["data-azure-maps-attribution-minzoom","data-azure-maps-attribution-maxzoom","data-azure-maps-attribution-geometry","data-azure-maps-attribution-tileset","data-azure-maps-attribution-order","data-azure-maps-attribution-dynamic"],ili=dt(["href"],ub),cst=function(){function n(n,t){var i=this;this.lastFetchState={bounds:null,zoom:null};this.getElement=function(){return i.element};this.element=n;this.attributionChangeCallback=t}return n.prototype.equals=function(n){return this.stringRepresentation===n.stringRepresentation},Object.defineProperty(n.prototype,"stringRepresentation",{get:function(){return[this.minZoom!==undefined?"minzoom="+this.minZoom:"",this.maxZoom!==undefined?"maxzoom="+this.maxZoom:"",this.geometry!==undefined?this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry").value:"",this.tilesetId!==undefined?"tilesetId="+this.tilesetId:"",this.dynamic?"dynamic":""].filter(function(n){return n.length>0}).join(";")},enumerable:!1,configurable:!0}),n.applicable=function(n){return Array.from(n.attributes).map(function(n){return ub.includes(n.name)}).reduce(function(n,t){return n||t},!1)},Object.defineProperty(n.prototype,"minZoom",{get:function(){var n=this.element.attributes.getNamedItem("data-azure-maps-attribution-minzoom");return n&&!isNaN(n.value)?parseInt(n.value):undefined},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxZoom",{get:function(){var n=this.element.attributes.getNamedItem("data-azure-maps-attribution-maxzoom");return n&&!isNaN(n.value)?parseInt(n.value):undefined},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"geometry",{get:function(){var n=this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry");if(n&&n.value)try{return JSON.parse(n.value)}catch(t){return undefined}else return undefined},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tilesetId",{get:function(){var n=this.element.attributes.getNamedItem("data-azure-maps-attribution-tileset");return n&&n.value?n.value:undefined},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"order",{get:function(){var n=this.element.attributes.getNamedItem("data-azure-maps-attribution-order");return n&&!isNaN(n.value)?parseInt(n.value):undefined},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dynamic",{get:function(){return this.element.attributes.getNamedItem("data-azure-maps-attribution-dynamic")!==null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hidesElement",{get:function(){return this.element.style.display=="none"},enumerable:!1,configurable:!0}),n.prototype.forceHide=function(){this.element.style.display="none"},n.prototype.satisfied=function(n){var u=this.minZoom&&n.zoom?n.zoom>=this.minZoom:!0,f=this.maxZoom&&n.zoom?n.zoom<=this.maxZoom:!0,t=!0,i,r;return this.geometry&&n.bounds&&(i={type:"Feature",geometry:this.geometry,properties:{}},r={type:"Feature",geometry:{type:"Polygon",coordinates:[[c.getNorthWest(n.bounds),c.getNorthEast(n.bounds),c.getSouthEast(n.bounds),c.getSouthWest(n.bounds),c.getNorthWest(n.bounds)]]},properties:{}},t=gci(i,r)!==null),u&&f&&t},n.prototype.apply=function(n,t){var f=this;t===void 0&&(t=null);var i=this.satisfied(n.getCamera()),u=this.dynamic&&this.tilesetId,r=this.hidesElement,e=t&&["dragend","zoomend","pitchend"].includes(t.type);return i||r?i&&(r||u)&&(i&&r&&this.element.style.removeProperty("display"),u&&(e?n.events.addOnce("idle",function(){return f.fetchAndApplyDynamicAttribution(n)}):this.fetchAndApplyDynamicAttribution(n))):this.element.style.display="none",i===r},n.prototype.fetchAndApplyDynamicAttribution=function(t){var f=this,i=t.getCamera();if(!this.lastFetchState||!c.containsBoundingBox(this.lastFetchState.bounds,i.bounds)||Math.floor(this.lastFetchState.zoom)!=Math.floor(i.zoom)){var e="https://{{azMapsDomain}}",r=dv(i.center,c.getSouthWest(i.bounds),n.viewportBufferExpansionRatio),u=dv(i.center,c.getNorthEast(i.bounds),n.viewportBufferExpansionRatio),o=u[0]<r[0]?[[r[0],r[1],180,u[1]],[-180,r[1],u[0],u[1]]]:[[r[0],r[1],u[0],u[1]]],s=o.map(function(n){var s=new URLSearchParams({"api-version":"2.1",tilesetId:f.tilesetId,zoom:i.zoom!==undefined?""+Math.floor(i.zoom):undefined,bounds:n.join(",")}),r=e+"/map/attribution",u={url:r},o;return t._substituteDomainLanguageViewAndSignInRequest(r,u),o=u.url+"&"+s.toString(),t._sendRequest(o,"Attribution").then(function(n){return n.json()})});Promise.all(s).then(function(n){f.applyAttributionResponse(n);f.lastFetchState={bounds:new c([r[0],r[1],u[0],u[1]]),zoom:i.zoom}}).catch(function(n){return console.error(n)})}},n.prototype.applyAttributionResponse=function(n){var f=this,e=n.map(function(n){return n.copyrights||[]}).reduce(function(n,t){return dt(n,t)},[]),i,r,t,u,o;if(e.length!=0){if(i=wc.parseWithFilter(e.join(""),function(){return!0},function(n){return n},function(){return f.element.innerHTML="",f.element}),i===null){console.warn("Dynamic attribution is empty after filtering");return}r=typeof i=="string"?function(){var n=document.createElement("span");return n.innerHTML=i,n}():i;r===this.element?(u=document.createElement("span"),Array.from(this.element.childNodes).forEach(function(n){return u.appendChild(n)}),t=u):t=r;Array.from(this.element.attributes).filter(function(n){return ub.includes(n.name)}).forEach(function(n){return t.attributes.setNamedItem(n.cloneNode())});t.style.display=this.element.style.display;o=this.element.parentElement;this.element.remove();o.append(t);this.element=t;this.attributionChangeCallback(this)}},n.viewportBufferExpansionRatio=2,tht([nli(1e3)],n.prototype,"fetchAndApplyDynamicAttribution",null),n}(),rli=[/all rights reserved/gi],uli=function(){function n(n,t,i){var r=this;this.rules=[];this.virtualContext=function(){var n=document.createElement("span");return n.className="azure-map-copyright-context",n}();this.renderContext=this.virtualContext.cloneNode(!1);this.addAttributionFromSource=function(){};this.removeAttributionFromSource=function(){};this.getMapStyleSources=function(){var n=r.map._getMap();return Object.entries(n.getStyle().sources).map(function(t){var i=ki(t,1),r=i[0];return n.getSource(r)})};this.loadAttributionOnceSourcesLoaded=function(){var n=r.getMapStyleSources();Promise.all(n.map(function(n){return new Promise(function(t,i){if("tiles"in n)t(n);else{n.on("data",function r(i){i.sourceDataType=="metadata"&&(n.off("data",r),t(n))});n.on("error",function u(t){n.off("error",u);i(t)})}}).then(function(n){return{status:"fulfilled",value:n}}).catch(function(n){return{status:"rejected",reason:n}})})).then(function(){r.reloadAttribution()})};this.reloadAttribution=function(){var e=r.getMapStyleSources(),u=new Set,n={},o=Object.values(e).filter(function(n){return"attribution"in n&&n.attribution&&"tiles"in n&&n.tiles.length>0}).map(function(n){return n}).map(function(t){var i=t.attribution;return wc.parseWithFilter(i,function(n){return tli.includes(n.tagName)&&Array.from(n.attributes).map(function(n){return ili.includes(n.name)}).reduce(function(n,t){return n&&t},!0)},function(t){var i=null,f;return t instanceof HTMLElement&&cst.applicable(t)&&(i=new cst(t,function(){return r.renderAttribution()}),u.add(i),i.order!==undefined&&(t.style.order=""+i.order)),i&&t instanceof HTMLElement&&(f=i.stringRepresentation,f in n?(i.order!==undefined&&n[f].order!==undefined&&i.order<n[f].order||i.order!==undefined&&n[f].order===undefined)&&(n[f]=i):n[f]=i),t},function(){return document.createElement("span")})}),s=new Set(Object.values(n)),h=new Set(dt(u).filter(function(n){return!s.has(n)})),f=new Set(dt(h).map(function(n){return n.getElement()})),i,t;dt(f).filter(function(n){return n.parentElement!==null}).forEach(function(n){return n.parentElement.removeChild(n)});r.rules=Object.values(n);i=o.filter(function(n){return typeof n=="string"||!f.has(n)}).map(function(n){return typeof n=="string"?new Text(n):n});t=document.createElement("span");i.length>0?i.forEach(function(n){return t.appendChild(n)}):r.getDefaultAttribution().forEach(function(n){return t.appendChild(n)});r.virtualContext=t;r.copyrightControl.setOptions({copyrightContent:r.renderContext});r.applyRules();r.renderAttribution()};this.applyRules=function(n){n===void 0&&(n=null);var t=r.rules.reduce(function(t,i){var u=i.apply(r.map,n);return t||u},!1);t&&r.renderAttribution()};this.renderAttribution=function(){var n=function(t){return Array.from(t.style.display!="none"?t.children:[]).map(function(t){return n(t)}).reduce(function(n,t){return dt(n,t)},Array.from(t.style.display!="none"?t.childNodes:[]).filter(function(n){return n.nodeType==n.TEXT_NODE}))},t=r.virtualContext.cloneNode(!0),i=n(t);i.forEach(function(n){return n.textContent=dt(rli).reduce(function(n,t){return n.replace(t,"").trim()},n.textContent)});i.reduce(function(n,t){return n.has(t.textContent)?(t.textContent="",t.parentElement&&t.parentElement.removeChild(t)):n.add(t.textContent),n},new Set);r.renderContext.innerHTML="";Array.from(t.childNodes).forEach(function(n){return r.renderContext.appendChild(n)})};this.map=n;this.copyrightControl=t;this.options=i}return n.prototype.addToMap=function(){this.map.events.add("stylechanged",this.loadAttributionOnceSourcesLoaded);this.map.events.add("dragend",this.applyRules);this.map.events.add("zoomend",this.applyRules);this.map.events.add("pitchend",this.applyRules)},n.prototype.removeFromMap=function(){this.map.events.remove("stylechanged",this.loadAttributionOnceSourcesLoaded);this.map.events.remove("dragend",this.applyRules);this.map.events.remove("zoomend",this.applyRules);this.map.events.remove("pitchend",this.applyRules)},n.prototype.getDefaultAttribution=function(){var n=function(n){var t=document.createElement("a");return t.textContent=n,t};return this.copyrightControl.getDefaultAttributions().map(function(t){return n(t)})},n}(),lst=nu(function(n){var t=function(){return t=function(n){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},t.prototype._singletonInstance)return t.prototype._singletonInstance;if(t.prototype._singletonInstance=this,this.instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,n.displayCall&&typeof n.displayCall!="function")throw new Error("displayCall is not a function");if(!n.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(n);this.config.navigateToLoginRequestUrl===undefined&&(this.config.navigateToLoginRequestUrl=!0);this.config.popUp&&(this.popUp=!0);this.config.callback&&typeof this.config.callback=="function"&&(this.callback=this.config.callback);this.config.instance&&(this.instance=this.config.instance);this.config.loginResource||(this.config.loginResource=this.config.clientId);this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]);this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]);this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]);this.config.isAngular&&(this.isAngular=this.config.isAngular);this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},typeof window!="undefined"&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(){}}),t.prototype.login=function(){var n,t,i;if(this._loginInProgress){this.info("Login in progress");return}this._loginInProgress=!0;n=this._guid();this.config.state=n;this._idTokenNonce=this._guid();t=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);t&&t!==""?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):t=window.location.href;this.verbose("Expected state: "+n+" startPage:"+t);this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,t);this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,n,!0);this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0);this._saveItem(this.CONSTANTS.STORAGE.ERROR,"");this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");i=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(i):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(n),this.registerCallback(n,this.config.clientId,this.callback),this._loginPopup(i)):this.promptUser(i)},t.prototype._openPopup=function(n,t,i,r){try{var f=window.screenLeft?window.screenLeft:window.screenX,e=window.screenTop?window.screenTop:window.screenY,o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,h=o/2-i/2+f,c=s/2-r/2+e,u=window.open(n,t,"width="+i+", height="+r+", top="+c+", left="+h);return u.focus&&u.focus(),u}catch(l){return this.warn("Error opening popup, "+l.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},t.prototype._handlePopupError=function(n,t,i,r,u){this.warn(r);this._saveItem(this.CONSTANTS.STORAGE.ERROR,i);this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,r);this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,u);t&&this._activeRenewals[t]&&(this._activeRenewals[t]=null);this._loginInProgress=!1;this._acquireTokenInProgress=!1;n&&n(r,null,i)},t.prototype._loginPopup=function(n,t,i){var u=this._openPopup(n,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),o=i||this.callback,s,f,h,r,e;if(u==null){s="Error opening popup";f="Popup Window is null. This can happen if you are using IE";this._handlePopupError(o,t,s,f,f);return}this._openedWindows.push(u);h=this.config.redirectUri.indexOf("#")!=-1?this.config.redirectUri.split("#")[0]:this.config.redirectUri;r=this;e=window.setInterval(function(){var f,n,i;if(!u||u.closed||u.closed===undefined){f="Popup Window closed";n="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";r.isAngular&&r._broadcast("adal:popUpClosed",n+r.CONSTANTS.RESOURCE_DELIMETER+f);r._handlePopupError(o,t,f,n,n);window.clearInterval(e);return}try{if(i=u.location,encodeURI(i.href).indexOf(encodeURI(h))!=-1){r.isAngular?r._broadcast("adal:popUpHashChanged",i.hash):r.handleWindowCallback(i.hash);window.clearInterval(e);r._loginInProgress=!1;r._acquireTokenInProgress=!1;r.info("Closing popup window");r._openedWindows=[];u.close();return}}catch(s){}},1)},t.prototype._broadcast=function(n,t){(function(){function n(n,t){t=t||{bubbles:!1,cancelable:!1,detail:undefined};var i=document.createEvent("CustomEvent");return i.initCustomEvent(n,t.bubbles,t.cancelable,t.detail),i}if(typeof window.CustomEvent=="function")return!1;n.prototype=window.Event.prototype;window.CustomEvent=n})();var i=new CustomEvent(n,{detail:t});window.dispatchEvent(i)},t.prototype.loginInProgress=function(){return this._loginInProgress},t.prototype._hasResource=function(n){var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return t&&!this._isEmpty(t)&&t.indexOf(n+this.CONSTANTS.RESOURCE_DELIMETER)>-1},t.prototype.getCachedToken=function(n){if(!this._hasResource(n))return null;var i=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n),t=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n),r=this.config.expireOffsetSeconds||300;return t&&t>this._now()+r?i:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,0),null)},t.prototype.getCachedUser=function(){if(this._user)return this._user;var n=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(n),this._user},t.prototype.registerCallback=function(n,t,i){this._activeRenewals[t]=n;this._callBacksMappedToRenewStates[n]||(this._callBacksMappedToRenewStates[n]=[]);var r=this;this._callBacksMappedToRenewStates[n].push(i);this._callBackMappedToRenewStates[n]||(this._callBackMappedToRenewStates[n]=function(i,u,f,e){r._activeRenewals[t]=null;for(var o=0;o<r._callBacksMappedToRenewStates[n].length;++o)try{r._callBacksMappedToRenewStates[n][o](i,u,f,e)}catch(f){r.warn(f)}r._callBacksMappedToRenewStates[n]=null;r._callBackMappedToRenewStates[n]=null})},t.prototype._renewToken=function(n,t,i){var f,u,r;this.info("renewToken is called for resource:"+n);f=this._addAdalFrame("adalRenewFrame"+n);u=this._guid()+"|"+n;this.config.state=u;this._renewStates.push(u);this.verbose("Renew token Expected state: "+u);i=i||"token";r=this._urlRemoveQueryStringParameter(this._getNavigateUrl(i,n),"prompt");i===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),r+="&nonce="+encodeURIComponent(this._idTokenNonce));r=r+"&prompt=none";r=this._addHintParameters(r);this.registerCallback(u,n,t);this.verbosePii("Navigate to:"+r);f.src="about:blank";this._loadFrameTimeout(r,"adalRenewFrame"+n,n)},t.prototype._renewIdToken=function(n,t){var u,r;this.info("renewIdToken is called");u=this._addAdalFrame("adalIdTokenFrame");r=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid();this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0);this.config.state=r;this._renewStates.push(r);this.verbose("Renew Idtoken Expected state: "+r);var f=t===null||typeof t=="undefined"?null:this.config.clientId,t=t||"id_token",i=this._urlRemoveQueryStringParameter(this._getNavigateUrl(t,f),"prompt");i=i+"&prompt=none";i=this._addHintParameters(i);i+="&nonce="+encodeURIComponent(this._idTokenNonce);this.registerCallback(r,this.config.clientId,n);this.verbosePii("Navigate to:"+i);u.src="about:blank";this._loadFrameTimeout(i,"adalIdTokenFrame",this.config.clientId)},t.prototype._urlContainsQueryStringParameter=function(n,t){var i=new RegExp("[\\?&]"+n+"=");return i.test(t)},t.prototype._urlRemoveQueryStringParameter=function(n,t){var i=new RegExp("(\\&"+t+"=)[^&]+");return n=n.replace(i,""),i=new RegExp("("+t+"=)[^&]+&"),n=n.replace(i,""),i=new RegExp("("+t+"=)[^&]+"),n.replace(i,"")},t.prototype._loadFrameTimeout=function(n,t,i){this.verbose("Set loading state to pending for: "+i);this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS);this._loadFrame(n,t);var r=this;setTimeout(function(){if(r._getItem(r.CONSTANTS.STORAGE.RENEW_STATUS+i)===r.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS){r.verbose("Loading frame has timed out after: "+r.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+i);var n=r._activeRenewals[i];n&&r._callBackMappedToRenewStates[n]&&r._callBackMappedToRenewStates[n]("Token renewal operation failed due to timeout",null,"Token Renewal Failed");r._saveItem(r.CONSTANTS.STORAGE.RENEW_STATUS+i,r.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)}},r.CONSTANTS.LOADFRAME_TIMEOUT)},t.prototype._loadFrame=function(n,t){var i=this,r;i.info("LoadFrame: "+t);r=t;setTimeout(function(){var t=i._addAdalFrame(r);(t.src===""||t.src==="about:blank")&&(t.src=n,i._loadFrame(n,r))},500)},t.prototype.acquireToken=function(n,t){if(this._isEmpty(n)){this.warn("resource is required");t("resource is required",null,"resource is required");return}var i=this.getCachedToken(n);if(i){this.info("Token is already in cache for resource:"+n);t(null,i,null);return}if(!this._user&&!(this.config.extraQueryParameter&&this.config.extraQueryParameter.indexOf("login_hint")!==-1)){this.warn("User login is required");t("User login is required",null,"login required");return}this._activeRenewals[n]?this.registerCallback(this._activeRenewals[n],n,t):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,n===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(t)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(n,t)):(this.verbose("renewing idtoken and access_token"),this._renewToken(n,t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))},t.prototype.acquireTokenPopup=function(n,t,i,r){var f,u;if(this._isEmpty(n)){this.warn("resource is required");r("resource is required",null,"resource is required");return}if(!this._user){this.warn("User login is required");r("User login is required",null,"login required");return}if(this._acquireTokenInProgress){this.warn("Acquire token interactive is already in progress");r("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");return}if(f=this._guid()+"|"+n,this.config.state=f,this._renewStates.push(f),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+f),u=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",n),"prompt"),u=u+"&prompt=select_account",t&&(u+=t),i&&u.indexOf("&claims")===-1)u+="&claims="+encodeURIComponent(i);else if(i&&u.indexOf("&claims")!==-1)throw new Error("Claims cannot be passed as an extraQueryParameter");u=this._addHintParameters(u);this._acquireTokenInProgress=!0;this.info("acquireToken interactive is called for the resource "+n);this.registerCallback(f,n,r);this._loginPopup(u,n,r)},t.prototype.acquireTokenRedirect=function(n,t,i){var u,f,r;if(this._isEmpty(n)){this.warn("resource is required");u("resource is required",null,"resource is required");return}if(u=this.callback,!this._user){this.warn("User login is required");u("User login is required",null,"login required");return}if(this._acquireTokenInProgress){this.warn("Acquire token interactive is already in progress");u("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");return}if(f=this._guid()+"|"+n,this.config.state=f,this.verbose("Renew token Expected state: "+f),r=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",n),"prompt"),r=r+"&prompt=select_account",t&&(r+=t),i&&r.indexOf("&claims")===-1)r+="&claims="+encodeURIComponent(i);else if(i&&r.indexOf("&claims")!==-1)throw new Error("Claims cannot be passed as an extraQueryParameter");r=this._addHintParameters(r);this._acquireTokenInProgress=!0;this.info("acquireToken interactive is called for the resource "+n);this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href);this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,f,!0);this.promptUser(r)},t.prototype.promptUser=function(n){n?(this.infoPii("Navigate to:"+n),window.location.replace(n)):this.info("Navigate url is empty")},t.prototype.clearCache=function(){var n,t;if(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),n=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS),!this._isEmpty(n))for(n=n.split(this.CONSTANTS.RESOURCE_DELIMETER),t=0;t<n.length&&n[t]!=="";t++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n[t],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n[t],0);this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},t.prototype.clearCacheForResource=function(n){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,"");this._saveItem(this.CONSTANTS.STORAGE.ERROR,"");this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");this._hasResource(n)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,0))},t.prototype.logOut=function(){var n,t,i;this.clearCache();this._user=null;this.config.logOutUri?n=this.config.logOutUri:(t="common",i="",this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(i="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),n=this.instance+t+"/oauth2/logout?"+i);this.infoPii("Logout navigate to: "+n);this.promptUser(n)},t.prototype._isEmpty=function(n){return typeof n=="undefined"||!n||0===n.length},t.prototype.getUser=function(n){if(typeof n!="function")throw new Error("callback is not a function");if(this._user){n(null,this._user);return}var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);this._isEmpty(t)?(this.warn("User information is not available"),n("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(t),n(null,this._user))},t.prototype._addHintParameters=function(n){if(this._user&&this._user.profile)if(this._user.profile.sid&&n.indexOf("&prompt=none")!==-1)this._urlContainsQueryStringParameter("sid",n)||(n+="&sid="+encodeURIComponent(this._user.profile.sid));else if(this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",n)||(n+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",n)&&this._user.profile.upn.indexOf("@")>-1)){var t=this._user.profile.upn.split("@");n+="&domain_hint="+encodeURIComponent(t[t.length-1])}return n},t.prototype._createUser=function(n){var i=null,t=this._extractIdToken(n);return t&&t.hasOwnProperty("aud")&&(t.aud.toLowerCase()===this.config.clientId.toLowerCase()?(i={userName:"",profile:t},t.hasOwnProperty("upn")?i.userName=t.upn:t.hasOwnProperty("email")&&(i.userName=t.email)):this.warn("IdToken has invalid aud field")),i},t.prototype._getHash=function(n){return n.indexOf("#/")>-1?n=n.substring(n.indexOf("#/")+2):n.indexOf("#")>-1&&(n=n.substring(1)),n},t.prototype.isCallback=function(n){n=this._getHash(n);var t=this._deserialize(n);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},t.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},t.prototype.getRequestInfo=function(n){var i,t,u,f,r;if(n=this._getHash(n),i=this._deserialize(n),t={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN},i&&(t.parameters=i,i.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||i.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||i.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){if(t.valid=!0,u="",i.hasOwnProperty("state"))this.verbose("State: "+i.state),u=i.state;else return this.warn("No state returned"),t;if(t.stateResponse=u,this._matchState(t))return t;if(!t.stateMatch&&window.parent)for(t.requestType=this._requestType,f=this._renewStates,r=0;r<f.length;r++)if(f[r]===t.stateResponse){t.stateMatch=!0;break}}return t},t.prototype._matchNonce=function(n){var t=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN),i;if(t)for(t=t.split(this.CONSTANTS.CACHE_DELIMETER),i=0;i<t.length;i++)if(t[i]&&t[i]===n.profile.nonce)return!0;return!1},t.prototype._matchState=function(n){var r=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN),i,t;if(r)for(r=r.split(this.CONSTANTS.CACHE_DELIMETER),t=0;t<r.length;t++)if(r[t]&&r[t]===n.stateResponse)return n.requestType=this.REQUEST_TYPE.LOGIN,n.stateMatch=!0,!0;if(i=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW),i)for(i=i.split(this.CONSTANTS.CACHE_DELIMETER),t=0;t<i.length;t++)if(i[t]&&i[t]===n.stateResponse)return n.requestType=this.REQUEST_TYPE.RENEW_TOKEN,n.stateMatch=!0,!0;return!1},t.prototype._getResourceFromState=function(n){if(n){var t=n.indexOf("|");if(t>-1&&t+1<n.length)return n.substring(t+1)}return""},t.prototype.saveTokenFromHash=function(n){var t,i;this.info("State status:"+n.stateMatch+"; Request type:"+n.requestType);this._saveItem(this.CONSTANTS.STORAGE.ERROR,"");this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");t=this._getResourceFromState(n.stateResponse);n.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)?(this.infoPii("Error :"+n.parameters.error+"; Error description:"+n.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,n.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),n.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,n.parameters.error_description))):n.stateMatch?(this.info("State is right"),n.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,n.parameters[this.CONSTANTS.SESSION_STATE]),n.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(t)||(i=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,i+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,n.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._expiresIn(n.parameters[this.CONSTANTS.EXPIRES_IN]))),n.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(n.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,n.parameters[this.CONSTANTS.ID_TOKEN]),t=this.config.loginResource?this.config.loginResource:this.config.clientId,this._hasResource(t)||(i=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,i+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,n.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(n.parameters.error="invalid id_token",n.parameters.error_description="Invalid id_token. id_token: "+n.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+n.parameters[this.CONSTANTS.ID_TOKEN])))):(n.parameters.error="Invalid_state",n.parameters.error_description="Invalid_state. state: "+n.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+n.stateResponse));this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+t,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},t.prototype.getResourceForEndpoint=function(n){var t,i;if(this.config&&this.config.anonymousEndpoints)for(t=0;t<this.config.anonymousEndpoints.length;t++)if(n.indexOf(this.config.anonymousEndpoints[t])>-1)return null;if(this.config&&this.config.endpoints)for(i in this.config.endpoints)if(n.indexOf(i)>-1)return this.config.endpoints[i];if(n.indexOf("http://")>-1||n.indexOf("https://")>-1){if(this._getHostFromUri(n)===this._getHostFromUri(this.config.redirectUri))return this.config.loginResource}else return this.config.loginResource;return null},t.prototype._getHostFromUri=function(n){var t=String(n).replace(/^(https?:)\/\//,"");return t.split("/")[0]},t.prototype.handleWindowCallback=function(n){var t,r,i,f,e,u,o,s;if(n==null&&(n=window.location.hash),this.isCallback(n)){t=null;r=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,r=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);i=t.getRequestInfo(n);u=null;e=r||window.parent!==window?t._callBackMappedToRenewStates[i.stateResponse]:t.callback;t.info("Returned from redirect url");t.saveTokenFromHash(i);i.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),f=i.parameters[t.CONSTANTS.ACCESS_TOKEN]||i.parameters[t.CONSTANTS.ID_TOKEN],u=t.CONSTANTS.ACCESS_TOKEN):i.requestType===this.REQUEST_TYPE.LOGIN&&(f=i.parameters[t.CONSTANTS.ID_TOKEN],u=t.CONSTANTS.ID_TOKEN);o=i.parameters[t.CONSTANTS.ERROR_DESCRIPTION];s=i.parameters[t.CONSTANTS.ERROR];try{e&&e(o,f,s,u)}catch(h){t.error("Error occurred in user defined callback function: "+h)}window.parent!==window||r||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},t.prototype._getNavigateUrl=function(n,t){var r="common",i;return this.config.tenant&&(r=this.config.tenant),i=this.instance+r+"/oauth2/authorize"+this._serialize(n,this.config,t)+this._addLibMetadata(),this.info("Navigate url:"+i),i},t.prototype._extractIdToken=function(n){var i=this._decodeJwt(n),r,t;if(!i)return null;try{return(r=i.JWSPayload,t=this._base64DecodeStringUrlSafe(r),!t)?(this.info("The returned id_token could not be base64 url safe decoded."),null):JSON.parse(t)}catch(u){this.error("The returned id_token could not be decoded",u)}return null},t.prototype._base64DecodeStringUrlSafe=function(n){return n=n.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(n))):decodeURIComponent(escape(this._decode(n)))},t.prototype._decode=function(n){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u,o,s,c,l,t,r,h,a,f,i;if(n=String(n).replace(/=+$/,""),u=n.length,u%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(f="",i=0;i<u;i+=4){if(o=e.indexOf(n.charAt(i)),s=e.indexOf(n.charAt(i+1)),c=e.indexOf(n.charAt(i+2)),l=e.indexOf(n.charAt(i+3)),i+2===u-1){t=o<<18|s<<12|c<<6;r=t>>16&255;h=t>>8&255;f+=String.fromCharCode(r,h);break}else if(i+1===u-1){t=o<<18|s<<12;r=t>>16&255;f+=String.fromCharCode(r);break}t=o<<18|s<<12|c<<6|l;r=t>>16&255;h=t>>8&255;a=t&255;f+=String.fromCharCode(r,h,a)}return f},t.prototype._decodeJwt=function(n){var i,t;return this._isEmpty(n)?null:(i=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,t=i.exec(n),!t||t.length<4)?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},t.prototype._convertUrlSafeToRegularBase64EncodedString=function(n){return n.replace("-","+").replace("_","/")},t.prototype._serialize=function(n,t,i){var r=[],u;return t!==null&&(r.push("?response_type="+n),r.push("client_id="+encodeURIComponent(t.clientId)),i&&r.push("resource="+encodeURIComponent(i)),r.push("redirect_uri="+encodeURIComponent(t.redirectUri)),r.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&r.push(t.extraQueryParameter),u=t.correlationId?t.correlationId:this._guid(),r.push("client-request-id="+encodeURIComponent(u))),r.join("&")},t.prototype._deserialize=function(n){for(var f=/\+/g,i=/([^&=]+)=([^&]*)/g,r=function(n){return decodeURIComponent(n.replace(f," "))},u={},t=i.exec(n);t;)u[r(t[1])]=r(t[2]),t=i.exec(n);return u},t.prototype._decimalToHex=function(n){for(var t=n.toString(16);t.length<2;)t="0"+t;return t},t.prototype._guid=function(){var f=window.crypto||window.msCrypto,n,t;if(f&&f.getRandomValues)return n=new Uint8Array(16),f.getRandomValues(n),n[6]|=64,n[6]&=79,n[8]|=128,n[8]&=191,this._decimalToHex(n[0])+this._decimalToHex(n[1])+this._decimalToHex(n[2])+this._decimalToHex(n[3])+"-"+this._decimalToHex(n[4])+this._decimalToHex(n[5])+"-"+this._decimalToHex(n[6])+this._decimalToHex(n[7])+"-"+this._decimalToHex(n[8])+this._decimalToHex(n[9])+"-"+this._decimalToHex(n[10])+this._decimalToHex(n[11])+this._decimalToHex(n[12])+this._decimalToHex(n[13])+this._decimalToHex(n[14])+this._decimalToHex(n[15]);var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",e="0123456789abcdef",r=0,u="";for(t=0;t<36;t++)i[t]!=="-"&&i[t]!=="4"&&(r=Math.random()*16|0),i[t]==="x"?u+=e[r]:i[t]==="y"?(r&=3,r|=8,u+=e[r]):u+=i[t];return u},t.prototype._expiresIn=function(n){return n||(n=3599),this._now()+parseInt(n,10)},t.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},t.prototype._addAdalFrame=function(n){var i,t;if(typeof n!="undefined")return this.info("Add adal frame to document:"+n),i=document.getElementById(n),i||(document.createElement&&document.documentElement&&(window.opera||window.navigator.userAgent.indexOf("MSIE 5.0")===-1)?(t=document.createElement("iframe"),t.setAttribute("id",n),t.setAttribute("aria-hidden","true"),t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height=t.borderWidth="0px",i=document.getElementsByTagName("body")[0].appendChild(t)):document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+n+'" id="'+n+'" style="display:none"><\/iframe>'),window.frames&&window.frames[n]&&(i=window.frames[n])),i},t.prototype._saveItem=function(n,t,i){if(this.config&&this.config.cacheLocation&&this.config.cacheLocation==="localStorage"){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(i){var r=this._getItem(n)||"";localStorage.setItem(n,r+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(n,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(n,t),!0):(this.info("Session storage is not supported"),!1)},t.prototype._getItem=function(n){return this.config&&this.config.cacheLocation&&this.config.cacheLocation==="localStorage"?this._supportsLocalStorage()?localStorage.getItem(n):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(n):(this.info("Session storage is not supported"),null)},t.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem("storageTest","A"),window.localStorage.getItem("storageTest")!="A")?!1:(window.localStorage.removeItem("storageTest"),window.localStorage.getItem("storageTest"))?!1:!0:!1}catch(n){return!1}},t.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem("storageTest","A"),window.sessionStorage.getItem("storageTest")!="A")?!1:(window.sessionStorage.removeItem("storageTest"),window.sessionStorage.getItem("storageTest"))?!1:!0:!1}catch(n){return!1}},t.prototype._cloneConfig=function(n){var i,t;if(null===n||"object"!=typeof n)return n;i={};for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i},t.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},t.prototype.log=function(n,t,i,r){if(n<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var f=(new Date).toUTCString(),u="";u=this.config.correlationId?f+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[n]+" "+t:f+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[n]+" "+t;i&&(u+="\nstack:\n"+i.stack);Logging.log(u)}},t.prototype.error=function(n,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,n,t)},t.prototype.warn=function(n){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,n,null)},t.prototype.info=function(n){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,n,null)},t.prototype.verbose=function(n){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,n,null)},t.prototype.errorPii=function(n,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,n,t,!0)},t.prototype.warnPii=function(n){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,n,null,!0)},t.prototype.infoPii=function(n){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,n,null,!0)},t.prototype.verbosePii=function(n){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,n,null,!0)},t.prototype._libVersion=function(){return"1.0.18"},n.exports&&(n.exports=t,n.exports.inject=function(n){return new t(n)}),t}()}),pai=lst.inject,fli="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";fb.prototype=new Error;fb.prototype.name="InvalidCharacterError";eb=typeof window!="undefined"&&window.atob&&window.atob.bind(window)||eli;ast=function(n){var t=n.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!";}try{return oli(t)}catch(i){return eb(t)}};bh.prototype=new Error;bh.prototype.name="InvalidTokenError";ob=function(n,t){if(typeof n!="string")throw new bh("Invalid token specified");t=t||{};var i=t.header===!0?0:1;try{return JSON.parse(ast(n.split(".")[i]))}catch(r){throw new bh("Invalid token specified: "+r.message);}};vst=bh;ob.InvalidTokenError=vst;var sli=function(){function t(n){var i=this,r;this.fallbackStorage={};this._triggerTokenFetch=function(){return new Promise(function(n,r){i.options.getToken(function(u){try{var f=i._getTokenExpiry(u)-t.constants.tokenRefreshClockSkew;i._storeAccessToken(u);clearTimeout(i.tokenTimeOutHandle);i.tokenTimeOutHandle=setTimeout(i._triggerTokenFetch,f*1e3);n()}catch(e){r(new Error("Invalid token returned by getToken function"))}},function(n){r(n)},i.map)})};r=n.getServiceOptions();this.options=r.authOptions;this.sessionId=r.sessionId;this.map=n}return t.prototype.initialize=function(){var i=this;return this.initPromise||(this.initPromise=new Promise(function(r,u){if(i.options.authType===n.AuthenticationType.subscriptionKey)r();else if(i.options.authType===n.AuthenticationType.aad){if(i.options.authContext=i.options.authContext||t.getDefaultAuthContext(i.options),i.options.authContext.handleWindowCallback(),i.options.authContext.getLoginError()){u(new Error("Error logging in the AAD users: "+i.options.authContext.getLoginError()));return}if(i.options.authContext.isCallback(window.location.hash)){i.map.dispose();return}setTimeout(function(){return i._loginAndAcquire(r,u)})}else i.options.authType===n.AuthenticationType.anonymous?r(i._triggerTokenFetch()):u(new Error("An invalid authentication type was specified."))})),this.initPromise},t.getDefaultAuthContext=function(n){if(!n.aadAppId)throw new Error("No AAD app ID was specified.");if(!n.aadTenant)throw new Error("No AAD tenant was specified.");return this.defaultAuthContext||(this.defaultAuthContext=new lst({instance:n.aadInstance||bi.aadInstance,tenant:n.aadTenant,clientId:n.aadAppId,cacheLocation:this.constants.preferredCacheLocation})),this.defaultAuthContext},t.prototype._loginAndAcquire=function(n,i){var r=this,u=function(){r.options.authContext.acquireToken(f.resourceId,function(u){if(u)i(new Error(u));else{var f={map:r.map,type:t.constants.events.tokenAcquired};r.map.events.invoke(t.constants.events.tokenAcquired,f);n()}})},o=this.options.authContext.getCachedToken(this.options.aadAppId),s=this.options.authContext.getCachedUser(),e;o&&s?u():(this.options.authContext.loginInProgress()||this.options.authContext.login(),e=setInterval(function(){r.options.authContext.loginInProgress()||(clearInterval(e),r.options.authContext.getCachedToken(r.options.aadAppId)?u():i(new Error(r.options.authContext.getLoginError()||"The AAD authentication context is not logged-in for the specified app ID: "+r.options.aadAppId)))},25))},t.prototype.getAuthType=function(){return this.options.authType},t.prototype.getClientId=function(){return this.options.clientId},t.prototype.getToken=function(){var e=this,i,r,u;if(this.options.authType===n.AuthenticationType.aad)return i=this.options.authContext.getCachedToken(f.resourceId),i||(this.options.authContext.getCachedUser()||this.options.authContext.login(),this.options.authContext.acquireToken(f.resourceId,function(n,r){if(!n){i=r;var u={map:e.map,type:t.constants.events.tokenAcquired};e.map.events.invoke(t.constants.events.tokenAcquired,u)}})),i;if(this.options.authType===n.AuthenticationType.anonymous){if(r=this._getItem(t.constants.storage.accessTokenKey),r){if(u=this._getTokenExpiry(r),u<300&&u>0)this._triggerTokenFetch();else if(u<=0){this._saveItem(t.constants.storage.accessTokenKey,"");throw new Error(t.constants.errors.tokenExpired);}}else this._triggerTokenFetch();return r}if(this.options.authType===n.AuthenticationType.subscriptionKey)return this.options.subscriptionKey},t.prototype._getTokenExpiry=function(n){var r=ob(n),t=r.exp,i=this._getCurrentTime();return t-i>0?t-i:-1},t.prototype._storeAccessToken=function(n){this._saveItem(t.constants.storage.accessTokenKey,n);var i={map:this.map,type:t.constants.events.tokenAcquired};this.map.events.invoke(t.constants.events.tokenAcquired,i)},t.prototype._saveItem=function(n,t){return this._supportsLocalStorage()?(localStorage.setItem(n,t),!0):this._supportsSessionStorage()?(sessionStorage.setItem(n,t),!0):(this.fallbackStorage[n]=t,!0)},t.prototype._getItem=function(n){return this._supportsLocalStorage()?localStorage.getItem(n):this._supportsSessionStorage()?sessionStorage.getItem(n):n in this.fallbackStorage?this.fallbackStorage[n]:null},t.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem(t.constants.storage.testStorageKey,"A"),window.localStorage.getItem(t.constants.storage.testStorageKey)!=="A")?!1:(window.localStorage.removeItem(t.constants.storage.testStorageKey),window.localStorage.getItem(t.constants.storage.testStorageKey))?!1:!0:!1}catch(n){return!1}},t.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem(t.constants.storage.testStorageKey,"A"),window.sessionStorage.getItem(t.constants.storage.testStorageKey)!=="A")?!1:(window.sessionStorage.removeItem(t.constants.storage.testStorageKey),window.sessionStorage.getItem(t.constants.storage.testStorageKey))?!1:!0:!1}catch(n){return!1}},t.prototype._getCurrentTime=function(){return Math.round((new Date).getTime()/1e3)},t.prototype.signRequest=function(t){t.headers=t.headers||{};t.headers[f.sessionIdHeaderName]=this.sessionId;t.headers[f.msOriginHeaderName]=f.msOriginHeaderValue;t.headers[f.mapAgentHeaderName]="MapControl/"+fe+" (Web)";var i=this.getToken();switch(this.options.authType){case n.AuthenticationType.aad:case n.AuthenticationType.anonymous:t.headers[f.msClientIdHeaderName]=this.options.clientId;t.headers[f.authorizationHeaderName]=f.authorizationTokenPrefix+i;break;case n.AuthenticationType.subscriptionKey:if("url"in t)t.url+=t.url.indexOf("?")!==-1?"&subscription-key="+i:"?&subscription-key="+i;else if("domain"in t)t.queryParams=t.queryParams||{},t.queryParams["subscription-key"]=i;else throw new Error("Could not determine if the provided object was UrlOptions or RequestParameters");break;default:throw new Error("An invalid authentication type was specified");}return t},t.constants={preferredCacheLocation:"localStorage",storage:{accessTokenKey:"access.token.key",testStorageKey:"testStorage"},events:{tokenAcquired:"tokenacquired"},tokenExpiresIn:3599,tokenRefreshClockSkew:300,errors:{tokenExpired:"Token Expired, Try again"}},t}(),hli=function(){function t(t){var r,i;this.map=t;this.controlContainer=document.createElement("div");this.controlContainer.classList.add("atlas-control-container");for(r in n.ControlPosition)n.ControlPosition.hasOwnProperty(r)&&(i=document.createElement("div"),i.classList.add(n.ControlPosition[r]),i.classList.add("subcontrol-container"),this.controlContainer.appendChild(i));this.map.getMapContainer().appendChild(this.controlContainer);this.controls=new Set}return t.prototype.add=function(n,t){var u,f,r,i,o;if(Array.isArray(n))try{for(r=e(n),i=r.next();!i.done;i=r.next())o=i.value,this._add(o,t)}catch(s){u={error:s}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}else this._add(n,t)},t.prototype.getControls=function(){return Array.from(this.controls)},t.prototype.remove=function(n){var r,u,i,t,f;if(Array.isArray(n))try{for(i=e(n),t=i.next();!t.done;t=i.next())f=t.value,this._remove(f)}catch(o){r={error:o}}finally{try{t&&!t.done&&(u=i.return)&&u.call(i)}finally{if(r)throw r.error;}}else this._remove(n)},t.prototype._add=function(n,t){this.controls.add(n);var i=(new cb).merge(t),u=n.onAdd(this.map,t),r=this.controlContainer.getElementsByClassName(i.position);if(r.length>0)r.item(0).appendChild(u);else throw new Error("Control position "+i.position+" does not exist.");},t.prototype._remove=function(n){n.onRemove();this.controls.delete(n)},t}(),cli=function(){function n(n){this.callbacks=new er;this.map=n}return n.prototype.addCallback=function(n,t,i,r,u){var f=this,e,s;if(r)e=function(n){var t=n.lngLat?new fi(n.lngLat.lng,n.lngLat.lat):undefined,r=n.point?[n.point.x,n.point.y]:undefined,u=n.features?n.features.map(function(n){return new ir(n.geometry,n.properties,n.id)}):[],f={type:n.type,originalEvent:n.originalEvent,position:t,coordinate:r,features:u};i(f)};else switch(n){case"data":case"sourcedata":case"styledata":e=function(r){var e=o(o({dataType:r.dataType},r.dataType==="source"&&o(o(o({isSourceLoaded:r.isSourceLoaded},r.sourceDataType&&{sourceDataType:r.sourceDataType}),{source:f.map.sources.getById(r.sourceId)}),r.tile&&{tile:{id:{x:r.tile.tileID.canonical.x,y:r.tile.tileID.canonical.y,z:r.tile.tileID.canonical.z},size:r.tile.tileSize,state:r.tile.state}})),{map:f.map,type:r.type});u&&f.map.events._removeListener(n,t,i);i(e)};break;case"error":e=function(r){var e={error:r.error,map:f.map,type:r.type};u&&f.map.events._removeListener(n,t,i);i(e)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":e=function(r){if(r.originalEvent)if(r.originalEvent!==s)s=r.originalEvent;else return;var o=r.point?new gt(r.point.x,r.point.y):undefined,h=r.points?r.points.map(function(n){return new gt(n.x,n.y)}):[],e=r.lngLat?new fi(r.lngLat.lng,r.lngLat.lat):undefined,c=r.lngLats?r.lngLats.map(function(n){return new fi(n.lng,n.lat)}):[],l=e?f.map.layers.getRenderedShapes(new hr(e),t?[t]:undefined):[],a={map:f.map,originalEvent:r.originalEvent,pixel:o,pixels:h,position:e,positions:c,shapes:l,layerId:t||undefined,preventDefault:function(){return r.preventDefault()},type:r.type};u&&f.map.events._removeListener(n,t,i);i(a)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":e=function(r){if(r.originalEvent)if(r.originalEvent!==s)s=r.originalEvent;else return;var e=r.lngLat?new fi(r.lngLat.lng,r.lngLat.lat):undefined,o=r.point?new gt(r.point.x,r.point.y):undefined,h=e?f.map.layers.getRenderedShapes(new hr(e),t?[t]:undefined):[],c={map:f.map,originalEvent:r.originalEvent,position:e,pixel:o,preventDefault:function(){return r.preventDefault()},shapes:h,layerId:t||undefined,type:r.type};u&&f.map.events._removeListener(n,t,i);i(c)};break;case"styleimagemissing":e=function(r){u&&f.map.events._removeListener(n,t,i);i(r.id)};break;case"wheel":e=function(r){if(r.originalEvent)if(r.originalEvent!==s)s=r.originalEvent;else return;var e={map:f.map,originalEvent:r.originalEvent,preventDefault:function(){return r.preventDefault()},type:r.type};u&&f.map.events._removeListener(n,t,i);i(e)};break;case"resize":e=function(r){var o={map:f.map,type:r.type};for(var e in r)e!=="type"&&e!=="target"&&(o[e]=r[e]);u&&f.map.events._removeListener(n,t,i);i(o)};break;default:e=function(r){var e={map:f.map,type:r.type};r.originalEvent&&(e.originalEvent=r.originalEvent);u&&f.map.events._removeListener(n,t,i);i(e)}}this.callbacks.has(t)||this.callbacks.set(t,new er);this.callbacks.get(t).has(n)||this.callbacks.get(t).set(n,new Map);this.callbacks.get(t).get(n).set(i,[e,u])},n.prototype.removeCallback=function(n,t,i){this.callbacks.has(t)&&this.callbacks.get(t).has(n)&&this.callbacks.get(t).get(n).has(i)&&this.callbacks.get(t).get(n).delete(i)},n.prototype.getModifiedCallback=function(n,t,i){return this.callbacks.has(t)&&this.callbacks.get(t).has(n)&&this.callbacks.get(t).get(n).has(i)?this.callbacks.get(t).get(n).get(i)[0]:undefined},n.prototype.getLayerCallbacks=function(n){return this.callbacks.has(n)?this.callbacks.get(n):undefined},n.prototype.getEventCallbacks=function(n,t){if(this.callbacks.has(t)){var i=this.callbacks.get(t);if(i.has(n))return i.get(n)}return undefined},n}(),lli=function(){function n(n){this.map=n;this.mapCallbackHandler=new cli(this.map)}return n.prototype.add=function(n,t,i){var o,s,u,r,f;if(typeof t=="function")this._addGlobalListener(n,t,!1,!1);else{t=Array.isArray(t)?t:[t];try{for(u=e(t),r=u.next();!r.done;r=u.next())f=r.value,f instanceof et&&et._isMBoxEvent(n)?this._addLayerListener(n,f,i,!1,!1):f._addEventListener(n,i,!1)}catch(h){o={error:h}}finally{try{r&&!r.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error;}}}},n.prototype.addOnce=function(n,t,i){typeof t=="function"?this._addGlobalListener(n,t,!1,!0):t instanceof et&&et._isMBoxEvent(n)?this._addLayerListener(n,t,i,!1,!0):t._addEventListener(n,i,!0)},n.prototype._addLegacy=function(n,t,i){typeof t=="function"?this._addGlobalListener(n,t,!0,!1):this._addLayerListener(n,t,i,!0,!1)},n.prototype._addLayerListener=function(n,t,i,r,u){var y,w,p,b,c=t instanceof et?t.getId():t,l=this.map.layers.getLayerById(c),a=this.mapCallbackHandler.getModifiedCallback(n,c,i),s,f,h,o,v;if(a&&l)try{for(s=e(l._getLayerIds()),f=s.next();!f.done;f=s.next())v=f.value,this.map._getMap().off(n,v,a)}catch(k){y={error:k}}finally{try{f&&!f.done&&(w=s.return)&&w.call(s)}finally{if(y)throw y.error;}}if(this.mapCallbackHandler.addCallback(n,c,i,r,u),l){a=this.mapCallbackHandler.getModifiedCallback(n,c,i);try{for(h=e(l._getLayerIds()),o=h.next();!o.done;o=h.next()){v=o.value;this.map._getMap().on(n,v,a)}}catch(d){p={error:d}}finally{try{o&&!o.done&&(b=h.return)&&b.call(h)}finally{if(p)throw p.error;}}}},n.prototype._addGlobalListener=function(n,t,i,r){var f=this.mapCallbackHandler.getModifiedCallback(n,"",t),u,e,o;if(this.mapCallbackHandler.addCallback(n,"",t,i,r),u=this.mapCallbackHandler.getModifiedCallback(n,"",t),n==="load"&&this.map._isLoaded())e={type:"load",map:this.map},setTimeout(function(){return u(e)});else if(n==="ready")this.map._isReady()&&(o={type:"ready",map:this.map},setTimeout(function(){return u(o)}));else if(["minzoomchanged","maxzoomchanged"].includes(n))this.map._addEventListener(n,t,r);else{f&&this.map._getMap().off(n,f);this.map._getMap().on(n,u)}},n.prototype.invoke=function(n,t,i){if(typeof i=="undefined")this._invokeListeners(n,"",t);else if(t instanceof et&&et._isMBoxEvent(n))this._invokeListeners(n,t.getId(),i);else if(t instanceof wr)t._invokeEvent(n,i);else throw new Error("The invoke target is invalid.");},n.prototype._invokeListeners=function(n,t,i){var u=this,r=this.mapCallbackHandler.getEventCallbacks(n,t);r?r.forEach(function(r,f){var e=ki(r,2),s=e[0],o=e[1];o&&u._removeListener(n,t,f);f(i)}):n==="error"&&console.error("error"in i?i.error:i)},n.prototype.remove=function(n,t,i){var o,s,u,r,f;if(typeof t=="function")this._removeListener(n,"",t);else{t=Array.isArray(t)?t:[t];try{for(u=e(t),r=u.next();!r.done;r=u.next())f=r.value,f instanceof et&&et._isMBoxEvent(n)?this._removeListener(n,f,i):f._removeEventListener(n,i)}catch(h){o={error:h}}finally{try{r&&!r.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error;}}}},n.prototype._removeLegacy=function(n,t,i){typeof t=="function"?this._removeListener(n,"",t):this._removeListener(n,t,i)},n.prototype._removeListener=function(n,t,i){var o,c,f=t instanceof et?t.getId():t,s=this.mapCallbackHandler.getModifiedCallback(n,f,i),h,u,r,l;if(s)if(f){if(h=this.map.layers.getLayerById(f),h)try{for(u=e(h._getLayerIds()),r=u.next();!r.done;r=u.next())l=r.value,this.map._getMap().off(n,l,s)}catch(a){o={error:a}}finally{try{r&&!r.done&&(c=u.return)&&c.call(u)}finally{if(o)throw o.error;}}}else this.map._getMap().off(n,s);this.mapCallbackHandler.removeCallback(n,f,i)},n.prototype._enableLayerEvents=function(n){var i=this,t=this.mapCallbackHandler.getLayerCallbacks(n.getId());t&&t.forEach(function(t,r){t.forEach(function(t){var o,s,c=ki(t,1),l=c[0],f,u,h;try{for(f=e(n._getLayerIds()),u=f.next();!u.done;u=f.next()){h=u.value;i.map._getMap().on(r,h,l)}}catch(a){o={error:a}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error;}}})})},n.prototype._disableLayerEvents=function(n){var i=this,t=this.mapCallbackHandler.getLayerCallbacks(n.getId());t&&t.forEach(function(t,r){t.forEach(function(t){var o,s,c=ki(t,1),l=c[0],f,u,h;try{for(f=e(n._getLayerIds()),u=f.next();!u.done;u=f.next())h=u.value,i.map._getMap().off(r,h,l)}catch(a){o={error:a}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error;}}})})},n}(),ali=function(){function n(n){this.markers=new Set;this.map=n}return n.prototype.add=function(n,t){var u,f,r,i,o;if(Array.isArray(n))try{for(r=e(n),i=r.next();!i.done;i=r.next())o=i.value,this._addMarker(o,t)}catch(s){u={error:s}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}else this._addMarker(n,t)},n.prototype._addMarker=function(n,t){n._addToMap(this.map,t);this.markers.add(n)},n.prototype.getMarkers=function(){return Array.from(this.markers)},n.prototype.remove=function(n){var r,u,i,t,f;if(Array.isArray(n))try{for(i=e(n),t=i.next();!t.done;t=i.next())f=t.value,this._removeMarker(f)}catch(o){r={error:o}}finally{try{t&&!t.done&&(u=i.return)&&u.call(i)}finally{if(r)throw r.error;}}else this._removeMarker(n)},n.prototype._removeMarker=function(n){var t=this;n instanceof ey?(n._removeFromMap(),this.markers.delete(n)):this.markers.forEach(function(i){i._getId()===n&&(i._removeFromMap(),t.markers.delete(i))})},n.prototype.clear=function(){var n=this;this.markers.forEach(function(t){t._removeFromMap();n.markers.delete(t)})},n}(),vli=function(){function n(n){this.userImages=new er;this.imageLoadTimeout=5e3;this.map=n}return n.prototype.add=function(n,t){var i=this;return new Promise(function(r,u){var e,o,f;if(i.userImages.has(n)){r();return}t instanceof HTMLImageElement||t instanceof ImageData?(i.map._getMap().addImage(n,t),i.userImages.set(n,t),r()):typeof t=="string"&&(e=void 0,e=/<svg/i.test(t)&&!/^data:/i.test(t)?"data:image/svg+xml;base64,"+window.btoa(t):t,f=!1,i.map._sendRequest(e,"Image").then(function(n){if(!f)return n.blob()}).then(function(t){if(!f){clearTimeout(o);var e=new Image;e.onload=function(){i.map._getMap().addImage(n,e);i.userImages.set(n,e);r()};e.onerror=e.onabort=function(){u("Failed to load image into HTML element.")};e.src=URL.createObjectURL(t)}}).catch(function(){f||(clearTimeout(o),u("Failed to load image into HTML element."))}),o=setTimeout(function(){f=!0;u("Failed to load image within specified timeout: "+i.imageLoadTimeout+" ms.")},i.imageLoadTimeout))})},n.prototype.clear=function(){var n=this;this.userImages.forEach(function(t,i){n.map._getMap().removeImage(i)});this.userImages.clear()},n.prototype.getImageIds=function(){var n=[];return this.userImages.forEach(function(t,i){n.push(i)}),n},n.prototype.createFromTemplate=function(n,t,i,r,u){i=i||"#1A73AA";r=r||"#fff";var f=yrt(t,u);return f=f.replace(/{color}/g,i).replace(/{secondaryColor}/g,r).replace(/{text}/g,""),this.add(n,f)},n.prototype.hasImage=function(n){return this.userImages.has(n)},n.prototype.remove=function(n){this.map._getMap().removeImage(n);this.userImages.delete(n)},n.prototype._restoreImages=function(){var n=this;this.userImages.forEach(function(t,i){n.map._getMap().hasImage(i)||n.map._getMap().addImage(i,t)})},n}(),re=function(n){function t(t,i){var r=n.call(this,i)||this;return r.layers=t,r}return u(t,n),t.prototype._buildLayers=function(){return this.layers},t.prototype._getLayerIds=function(){return this.layers.map(function(n){return n.id})},t.prototype._getSourceIds=function(){var r,f,u=new Set,t,n,i;try{for(t=e(this.layers),n=t.next();!n.done;n=t.next())i=n.value,typeof i.source=="string"?u.add(i.source):i.source&&u.add(i.id)}catch(o){r={error:o}}finally{try{n&&!n.done&&(f=t.return)&&f.call(t)}finally{if(r)throw r.error;}}return u},t.prototype._updateLayoutProperty=function(n,t,i,r){var u=this;this.layers.forEach(function(f){ri(t,i)||u.map._getMap().setLayoutProperty(f.id,n,r||t)})},t}(et),yli=function(){function n(n){this.layerIndex=[];this.userLayers=[];this.map=n}return n.prototype.add=function(n,t){var u,f,o=t instanceof et?t.getId():t,r,i,s;if(Array.isArray(n))try{for(r=e(n),i=r.next();!i.done;i=r.next())s=i.value,this._addLayer(s,o)}catch(h){u={error:h}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}else this._addLayer(n,o)},n.prototype._addLayer=function(n,t){var u,i,r;if(!this.map._isReady()&&!(n instanceof re))throw new Error("The layer '"+n.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");if(t!==n.getId()&&this.layerIndex.find(function(n){return t===n.getId()}))if(this._getMapboxLayerExists(n)){i=this.layerIndex.findIndex(function(t){return t.getId()===n.getId()});r=this.layerIndex[i];this._removeMapboxLayers(n);this._addMapboxLayers(n,t);this.map.events._disableLayerEvents(r);this.map.events._enableLayerEvents(n);this.layerIndex.splice(i,1);u=this.layerIndex.findIndex(function(n){return n.getId()===t});this.layerIndex.splice(u,0,n);n instanceof re||this.userLayers.push({layer:n,before:t});r.onRemove();n.onAdd(this.map)}else{this._addMapboxLayers(n,t);this.map.events._enableLayerEvents(n);u=this.layerIndex.findIndex(function(n){return n.getId()===t});this.layerIndex.splice(u,0,n);n instanceof re||this.userLayers.push({layer:n,before:t});n.onAdd(this.map)}else if(i=this.layerIndex.findIndex(function(t){return t.getId()===n.getId()}),i>=0){r=this.layerIndex[i];this._removeMapboxLayers(r);this._addMapboxLayers(n,i+1);this.map.events._disableLayerEvents(r);this.map.events._enableLayerEvents(n);this.layerIndex[i]=n;r.onRemove();n.onAdd(this.map)}else{this._addMapboxLayers(n);this.map.events._enableLayerEvents(n);this.layerIndex.push(n);n instanceof re||this.userLayers.push({layer:n,before:t});n.onAdd(this.map)}},n.prototype._addMapboxLayers=function(n,t){var u,f,o,r,i,s;if(!(n instanceof pc)||n.getOptions().tileUrl){if(n instanceof re){this.map.events._enableLayerEvents(n);return}n instanceof vc&&this.map._getMap().addSource(n._getSourceId(),n._buildSource());o=this._getMapboxBefore(t);try{for(r=e(n._buildLayers()),i=r.next();!i.done;i=r.next())s=i.value,this.map._getMap().addLayer(s,o)}catch(h){u={error:h}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}this.map.events._enableLayerEvents(n)}},n.prototype._removeMapboxLayers=function(n,t){var u,o,r,i,f;if(n instanceof re&&!t){this.map.events._disableLayerEvents(n);return}try{for(r=e(n._getLayerIds()),i=r.next();!i.done;i=r.next())f=i.value,this.map._getMap().getLayer(f)&&this.map._getMap().removeLayer(f)}catch(s){u={error:s}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(u)throw u.error;}}this.map.events._disableLayerEvents(n);n instanceof vc&&this.map._getMap().getSource(n._getSourceId())&&this.map._getMap().removeSource(n._getSourceId())},n.prototype._getMapboxLayerExists=function(n){var i=this,t=!1;return typeof n=="string"?(n=this.layerIndex.find(function(t){return t.getId()===n}),!n)?!1:!0:(n._getLayerIds().forEach(function(n){var r=i.map._getMap().getLayer(n);r&&(t=!0)}),t)},n.prototype._getMapboxBefore=function(n){var h,l,o,a,c,u,t,s,f,r,i;if(typeof n=="string")if(c=this.layerIndex.find(function(t){return t.getId()===n}),c){try{for(u=e(c._getLayerIds()),t=u.next();!t.done;t=u.next())if(i=t.value,this.map._getMap().getLayer(i))return i}catch(v){h={error:v}}finally{try{t&&!t.done&&(l=u.return)&&l.call(u)}finally{if(h)throw h.error;}}n=this.layerIndex.findIndex(function(t){return t.getId()===n})+1}else return undefined;for(s=n;s<this.layerIndex.length;s++)try{for(f=(o=void 0,e(this.layerIndex[s]._getLayerIds())),r=f.next();!r.done;r=f.next())if(i=r.value,this.map._getMap().getLayer(i))return i}catch(y){o={error:y}}finally{try{r&&!r.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error;}}return undefined},n.prototype.clear=function(){for(var t,n=this.layerIndex.length-1;n>=0;n--)t=this.layerIndex[n],this._removeMapboxLayers(t,!0),this.layerIndex.splice(n,1),t.onRemove();this.userLayers=[]},n.prototype.getLayerById=function(n){var t=this.layerIndex.find(function(t){return t.getId()===n});return t?t:undefined},n.prototype.getLayers=function(){return this.layerIndex.slice(0)},n.prototype._getSourceIds=function(){var i,r,u=new Set,t,n,f;try{for(t=e(this.layerIndex),n=t.next();!n.done;n=t.next())f=n.value,f._getSourceIds().forEach(function(n){return u.add(n)})}catch(o){i={error:o}}finally{try{n&&!n.done&&(r=t.return)&&r.call(t)}finally{if(i)throw i.error;}}return u},n.prototype._getUserLayers=function(){return Array.from(this.userLayers)},n.prototype.move=function(n,t){var r=n instanceof et?n.getId():n,f=t instanceof et?t.getId():t,i,u;if(!this.layerIndex.find(function(n){return n.getId()===r}))throw new Error("The layer '"+r+"' has not been added to the map and cannot be moved.");i=this.layerIndex.findIndex(function(n){return n.getId()===r});this._moveMapboxLayers(this.layerIndex[i],f);n=this.layerIndex[i];this.layerIndex.splice(i,1);u=this.layerIndex.findIndex(function(n){return n.getId()===f});u>-1?this.layerIndex.splice(u,0,n):this.layerIndex.push(n)},n.prototype._moveMapboxLayers=function(n,t){var u,f,s=this._getMapboxBefore(t),r,i,o;try{for(r=e(n._getLayerIds()),i=r.next();!i.done;i=r.next())o=i.value,this.map._getMap().moveLayer(o,s)}catch(h){u={error:h}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}},n.prototype.getRenderedShapes=function(n,t,i){var s,l,p=this,f,o,a,h,u,r,v,y;if(n||(n=[-180,-85.0511,180,85.0511]),Array.isArray(n)?n.length===4||n.length===6?f=this.map.positionsToPixels([c.getSouthWest(n),c.getNorthEast(n)]):(n.length===2||n.length===3)&&(f=this.map.positionsToPixels([n])[0]):f=this.map.positionsToPixels([n.coordinates])[0],t){t=Array.isArray(t)?t:[t];o=[];a=function(n){var t=n instanceof et?n.getId():n,i=h.layerIndex.findIndex(function(n){return n.getId()===t});if(i>-1)o.push.apply(o,dt(h.layerIndex[i]._getLayerIds().filter(function(n){return!!p.map._getMap().getLayer(n)})));else throw new Error("The layer '"+t+"' has not been added to the map and its rendered features cannot be retrieved.");};h=this;try{for(u=e(t),r=u.next();!r.done;r=u.next())v=r.value,a(v)}catch(w){s={error:w}}finally{try{r&&!r.done&&(l=u.return)&&l.call(u)}finally{if(s)throw s.error;}}}return y=this.map._getMap().queryRenderedFeatures(f,{layers:o,filter:i}),this.map.sources._mapFeaturesToShapes(y)},n.prototype.remove=function(n){var r,u,i,t,f;if(Array.isArray(n))try{for(i=e(n),t=i.next();!t.done;t=i.next())f=t.value,this._removeLayer(f)}catch(o){r={error:o}}finally{try{t&&!t.done&&(u=i.return)&&u.call(i)}finally{if(r)throw r.error;}}else this._removeLayer(n)},n.prototype._removeLayer=function(n){var i=n instanceof et?n.getId():n,r,t,u;if(!this.layerIndex.find(function(n){return n.getId()===i}))throw new Error("The layer '"+i+"' has not been added to the map and cannot be removed.");r=this.layerIndex.findIndex(function(n){return n.getId()===i});t=this.layerIndex[r];this._removeMapboxLayers(t);this.layerIndex.splice(r,1);u=this.userLayers.findIndex(function(n){return n.layer.getId()===t.getId()});u>=0&&this.userLayers.splice(u,1);t.onRemove()},n}(),pli=function(){function n(n){var t=this;this._onDrag=function(n){var i,r;n.type==="mousemove"?(n=n,i=n.clientX,r=n.clientY):n.type==="touchmove"&&(n=n,i=n.touches[0].clientX,r=n.touches[0].clientY);t.draggedPopups.forEach(function(n){n._dragToPixel([i,r])})};this._onUp=function(){t.map.getMapContainer().removeEventListener("mousemove",t._onDrag);t.map.getMapContainer().removeEventListener("touchmove",t._onDrag);t.map.getMapContainer().removeEventListener("mouseup",t._onUp);t.map.getMapContainer().removeEventListener("touchend",t._onUp);t.draggedPopups.forEach(function(n){t.draggedPopups.delete(n);n._onUp()})};this.map=n;this.popups=new Set;this.draggedPopups=new Set}return n.prototype.add=function(n){var u,f,i,t,r;n=Array.isArray(n)?n:[n];try{for(i=e(n),t=i.next();!t.done;t=i.next())r=t.value,this.popups.has(r)||(this.popups.add(r),r.attach(this.map))}catch(o){u={error:o}}finally{try{t&&!t.done&&(f=i.return)&&f.call(i)}finally{if(u)throw u.error;}}},n.prototype.clear=function(){var n=this;this.popups.forEach(function(t){n.popups.delete(t);t.remove()})},n.prototype.remove=function(n){var u,f,i,t,r;n=Array.isArray(n)?n:[n];try{for(i=e(n),t=i.next();!t.done;t=i.next())r=t.value,this.popups.has(r)&&(this.popups.delete(r),r.remove())}catch(o){u={error:o}}finally{try{t&&!t.done&&(f=i.return)&&f.call(i)}finally{if(u)throw u.error;}}},n.prototype.getPopups=function(){return Array.from(this.popups)},n.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+n.Css.collection);return t||(t=document.createElement("div"),t.classList.add(n.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},n.prototype._addDraggedPopup=function(n){this.draggedPopups.size===0&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp));this.draggedPopups.add(n)},n.Css={collection:"popup-collection-container"},n}(),yst=function(n){function t(t,i,r){var u=n.call(this,t)||this;return u.source=u._modifySource(i,r),u}return u(t,n),t.prototype._buildSource=function(){return this.source},t.prototype._modifySource=function(n,t){if(n.tiles){var i=n.tiles.map(function(n){if(typeof n=="string")return n;var i=new fr({domain:f.domainPlaceHolder,path:n.path,queryParams:o(o({},t),n.queryParams)});return i.toString()});n.tiles=i}else if(n.url)n.url=typeof n.url=="string"?n.url:new fr({domain:f.domainPlaceHolder,path:n.url.path,queryParams:o(o({},t),n.url.queryParams)}).toString();else throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");return n},t}(ct),wli=function(){function n(n){this.map=n;this.sources=new er}return n.prototype.add=function(n,t){var u,f,r,i,o;if(t===void 0&&(t=!0),Array.isArray(n))try{for(r=e(n),i=r.next();!i.done;i=r.next())o=i.value,this._addSource(o,t)}catch(s){u={error:s}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}else this._addSource(n,t)},n.prototype.getRenderedShapes=function(n,t,i){var r=typeof n=="string"?n:n.getId(),u=this.map._getMap().querySourceFeatures(r,{sourceLayer:i,filter:t});return this.map.sources._mapFeaturesToShapes(u,!0,this.sources.get(r))},n.prototype._buildSources=function(){var n={};return this.sources.forEach(function(t){n[t.getId()]=t._buildSource()}),n},n.prototype.clear=function(){var n=this;this.sources.forEach(function(t){n.remove(t)})},n.prototype.getById=function(n){return this.sources.get(n)},n.prototype.getSources=function(){return Array.from(this.sources.values())},n.prototype.isSourceLoaded=function(n){var t=n instanceof ct?n.getId():n;return this.map._getMap().isSourceLoaded(t)},n.prototype.remove=function(n,t){var u,f,r,i,o;if(t===void 0&&(t=!0),Array.isArray(n))try{for(r=e(n),i=r.next();!i.done;i=r.next())o=i.value,this._removeSource(o,t)}catch(s){u={error:s}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(u)throw u.error;}}else this._removeSource(n,t)},n.prototype._removeSource=function(n,t){var i=n instanceof ct?n.getId():n;if(this.sources.has(i)){if(this.map._getMap().getSource(i)&&t&&this.map._getMap().removeSource(i),this.map._getMap().getSource(i)&&t)throw new Error("One or more layers have a dependency on the source '"+i+"'");else this.sources.get(i)._setMap(null),this.sources.delete(i);return}throw new Error("'"+i+"' is not added to the map");},n.prototype._addSource=function(n,t){if(this.sources.has(n.getId()))if(t)throw new Error("'"+n.getId()+"' is already added to the map");else this.sources.get(n.getId())._setMap(null),this.sources.delete(n.getId());if(t){if(!this.map._isReady())throw new Error("The source '"+n.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(n.getId(),n._buildSource())}this.sources.set(n.getId(),n);n._setMap(this.map)},n.prototype._mapFeaturesToShapes=function(n,t,i){var o,l,s=[],f,r,u,h,c;try{for(f=e(n),r=f.next();!r.done;r=f.next()){if(u=r.value,(i||typeof u.source=="string")&&typeof u.properties[yt._shapeIdPropName]=="string"&&(h=i||this.sources.get(u.source),h instanceof cr&&(c=h.getShapeById(u.properties[yt._shapeIdPropName]),c instanceof yt))){s.push(c);continue}t||s.push(u)}}catch(a){o={error:a}}finally{try{r&&!r.done&&(l=f.return)&&l.call(f)}finally{if(o)throw o.error;}}return s},n.prototype._syncSources=function(n){var t=this;n&&(Object.keys(n).forEach(function(i){var r,u;if(!t.sources.has(i))if(r=n[i],r.type==="vector")u=new yst(i,{name:i,tiles:r.tiles,type:"vector",url:r.url}),t.sources.set(i,u),u._setMap(t.map);else if(r.type==="raster")u=new yst(i,{name:i,tiles:r.tiles,type:"raster",url:r.url}),t.sources.set(i,u),u._setMap(t.map);else throw new Error("Unable to construct source with ID "+i+".");}),Object.keys(this.sources).forEach(function(i){n.hasOwnProperty(i)||(t.sources.get(i)._setMap(null),t.sources.delete(i))}))},n}(),bli=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}return u(t,n),t}(nt),kli=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}return u(t,n),t}(nt),dli=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=undefined,t.maxZoom=20,t.offset=new gt(0,0),t.padding=new kli,t}return u(t,n),t.prototype.merge=function(){for(var r,i,t,f,s,o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];try{for(r=e(o),i=r.next();!i.done;i=r.next())t=i.value,t&&typeof t.padding=="number"&&(t.padding={top:t.padding,bottom:t.padding,left:t.padding,right:t.padding})}catch(h){f={error:h}}finally{try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(f)throw f.error;}}return n.prototype.merge.apply(this,dt(o))},t}(nt),gli=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.zoom=1,t.center=new fi(0,0),t.centerOffset=new gt(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=undefined,t}return u(t,n),t}(nt),kh=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.name=undefined,t.before=undefined,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.opacity=1,t}return u(t,n),t}(nt),nai=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}return u(t,n),t}(kh),tai=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}return u(t,n),t}(kh),iai=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=undefined,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}return u(t,n),t}(kh),rai=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}return u(t,n),t}(kh),uai=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.name="default-raster",t}return u(t,n),t}(kh),fai=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}return u(t,n),t}(nt),pst=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.autoResize=!0,t.language=nrt(),t.light=new fai,t.preserveDrawingBuffer=!1,t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.customAttribution=undefined,t.showTileBoundaries=!1,t.style="road",t.view=rrt(),t.userRegion=t.view,t}return u(t,n),t.prototype.merge=function(){for(var r,i,t,f,s,o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];try{for(r=e(o),i=r.next();!i.done;i=r.next())t=i.value,t&&(t.hasOwnProperty("view")?t.userRegion=t.view:t.hasOwnProperty("userRegion")&&(t.view=t.userRegion),typeof t.language=="string"&&(t.language=gc.getCode(t.language)))}catch(h){f={error:h}}finally{try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(f)throw f.error;}}return n.prototype.merge.apply(this,dt(o))},t}(nt),wst=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}return u(t,n),t}(nt),sb=function(n){return n.length==0?undefined:n.slice(1).reduce(function(n,t){return function(i,r){var u=n(i,r);return o(o({},u),t(u.url,r))}},n[0])},hb=function(t){function i(){var n=t!==null&&t.apply(this,arguments)||this;return n.authOptions=pit(),n.disableTelemetry=!1,n["disable-telemetry"]=n.disableTelemetry,n.domain=ly(),n.staticAssetsDomain=wit(),n.styleDefinitionsPath=bit(),n.styleDefinitionsVersion=kit(),n.enableAccessibility=!1,n["enable-accessibility"]=n.enableAccessibility,n.enableAccessibilityLocationFallback=!0,n.maxParallelImageRequests=git(),n.refreshExpiredTiles=!0,n.subscriptionKey=irt(),n["subscription-key"]=n.subscriptionKey,n.sessionId=trt(),n["session-id"]=n.sessionId,n._transformers=[],n.transformRequest=undefined,n.workerCount=dit(),n}return u(i,t),i.prototype.merge=function(){for(var f,r,i,h,c,u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];try{for(f=e(u),r=f.next();!r.done;r=f.next())i=r.value,i&&(i.authOptions?typeof i.authOptions.subscriptionKey=="string"&&(i.subscriptionKey=i["subscription-key"]=i.authOptions.subscriptionKey):typeof i.subscriptionKey=="string"?(i["subscription-key"]=i.subscriptionKey,i.authOptions={authType:n.AuthenticationType.subscriptionKey,subscriptionKey:i.subscriptionKey}):typeof i["subscription-key"]=="string"&&(i.subscriptionKey=i["subscription-key"],i.authOptions={authType:n.AuthenticationType.subscriptionKey,subscriptionKey:i["subscription-key"]}),typeof i.sessionId=="string"?i["session-id"]=i.sessionId:typeof i["session-id"]=="string"&&(i.sessionId=i["session-id"]),typeof i.disableTelemetry=="boolean"?i["disable-telemetry"]=i.disableTelemetry:typeof i["disable-telemetry"]=="boolean"&&(i.disableTelemetry=i["disable-telemetry"]),typeof i.enableAccessibility=="boolean"?i["enable-accessibility"]=i.enableAccessibility:typeof i["enable-accessibility"]=="boolean"&&(i.enableAccessibility=i["enable-accessibility"]))}catch(a){h={error:a}}finally{try{r&&!r.done&&(c=f.return)&&c.call(f)}finally{if(h)throw h.error;}}var l=this._transformers,v=u?u.filter(function(n){return n!==undefined}).reduce(function(n,t){return dt(n,t._transformers||[])},[]):[],s=t.prototype.merge.apply(this,dt(u));return s.authOptions.authType!==n.AuthenticationType.subscriptionKey&&(s["subscription-key"]=s.subscriptionKey=undefined),this._transformers=dt(l||[],v.filter(function(n){return!l.includes(n)})),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),this.transformRequest=sb(this._transformers),s},i.prototype.addTransformer=function(n){this._transformers||(this._transformers=[]);this._transformers.push(n);this.transformRequest=sb(this._transformers)},i.prototype.removeTransformer=function(n){this._transformers&&(this._transformers=this._transformers.filter(function(t){return n!==t}),this.transformRequest=sb(this._transformers))},i._cloneCustomizer=function(n){if(typeof n=="object")return Object.assign({},n)},i}(nt),eai=function(){function n(){}return n.getLayerGroup=function(n){var t,i,u=(i=(t=n)===null||t===void 0?void 0:t.id)!==null&&i!==void 0?i:n,r;if(u.startsWith("microsoft."))return(r=u.split("."),r.length>=4)?r[3]:void 0},n}(),oai=function(){function n(n,t){this.apiVersion="2.0";this.map=n;this.serviceOptions=t}return n.prototype.initialize=function(){var n=this;return this.initPromise||(this.initPromise=this._request(this.serviceOptions.staticAssetsDomain,f.stylePath+"/"+f.styleResourcePath,"StyleDefinitions").then(function(t){n.definitions=t}).catch(function(n){throw new Error("Failed to retrieve the style definitions: "+n);})),this.styleSet="base",this.initPromise},n.prototype.getStyleUrl=function(n){var t,i=this._lookUp(n),r=new fr({domain:this.serviceOptions.staticAssetsDomain,path:f.stylePath+"/"+f.styleResourcePath+"/"+i.name,queryParams:(t={},t[f.apiVersionQueryParameter]=this.apiVersion,t.version=this.definitions.version,t),protocol:"https"});return r.toString()},n.prototype.setStyleUrl=function(n){var t=this.getStyleUrl(n);try{this.map._getMap().setStyle(t,{diff:!0,stylePatch:this._stylePatch.bind(this)})}catch(i){throw i;}},n.prototype.getTheme=function(n){var t=this._lookUp(n);return t.theme.toLowerCase()||"light"},n.prototype.setStyleSet=function(n){n!==this.styleSet&&(this.styleSet=n,this.setStyleUrl(this.map.getStyle()))},n.prototype.getStyleSet=function(){return this.styleSet},n.prototype.clearStyleSet=function(){"base"!==this.styleSet&&(this.styleSet="base",this.setStyleUrl(this.map.getStyle()))},n.prototype.getDef=function(){var n=Object.assign({},this.definitions);return n.styles=n.styles.filter(function(n){return!n.name.endsWith("_indoor")&&!n.name.endsWith("_indoor_dark")}),n},n.prototype._stylePatch=function(n,t,i,r,u){var f=this,h=this.map.layers.getLayers(),c=[],e="",o=[],l=function(n){c.push(f._buildFundamentalLayerFrom(o,e));e=n;o=[]},w=this.map.getStyle(),y=this.map.getTraffic();t.layers.forEach(function(n){var i,r,f,t=eai.getLayerGroup(n.id);e=e?e:t;w.showBuildingModels||n.type!=="fill-extrusion"?n.type==="fill-extrusion"&&(u(n.id,"visibility","visible"),n.layout=(r=n.layout)!==null&&r!==void 0?r:{},n.layout.visibility="visible"):(u(n.id,"visibility","none"),n.layout=(i=n.layout)!==null&&i!==void 0?i:{},n.layout.visibility="none");y.flow!=="none"&&t&&t==="traffic_"+y.flow&&n.type=="line"&&(u(n.id,"visibility","visible"),n.layout=(f=n.layout)!==null&&f!==void 0?f:{},n.layout.visibility="visible");t?(o.length>0&&t!=e&&l(t),o.push(n)):o.length>0&&l(t)});o.length>0&&l("");var a=this.map.layers._getUserLayers(),v=a[0],b=h.filter(function(n){return c.findIndex(function(t){return n.getId()===t.getId()})<0&&a.findIndex(function(t){return n.getId()===t.layer.getId()})<0}),k=c.filter(function(n){return h.find(function(t){return t.getId()===n.getId()})}),p=k.entries(),s=p.next();c.forEach(function(n){if(s.value&&s.value[1].getId()===n.getId()){var t=h.findIndex(function(t){return t.getId()===n.getId()});f.map.layers.remove(n.getId());f.map.layers.add(n,h[t].getId());s=p.next()}else s.value?f.map.layers.add(n,s.value[1]):f.map.layers.add(n,v===null||v===void 0?void 0:v.layer)});b.forEach(function(n){f.map.layers.remove(n)});a.forEach(function(n){var t=undefined,r;f.map.layers.getLayerById(n.before)&&(r=f.map.layers.getLayerById(n.before)._buildLayers(),t=r.length>0?r[0]:undefined);i(n.layer.getId(),t===null||t===void 0?void 0:t.id)});this.map.sources._syncSources(t.sources);this.map.events.addOnce("styledata",function(){f.map.events.invoke("stylechanged",{style:f._lookUp(f.map.getStyle()).name,map:f.map,type:"stylechanged"})})},n.prototype._buildFundamentalLayerFrom=function(n,t){if(n&&n.length>0){var i=new re(n,t);i.onAdd(this.map);return i}throw new Error("Unable to construct fundamental map layer for ID: "+t+".");},n.prototype._lookUp=function(n){var u,f,s=(n.style||this.definitions.defaultStyle).concat(this.styleSet==="indoor"?"_indoor":"").concat(this.styleSet==="indoor_dark"?"_indoor_dark":""),h=this.definitions.defaultStyle.concat(this.styleSet==="indoor"?"_indoor":"").concat(this.styleSet==="indoor_dark"?"_indoor_dark":""),o,i,t,r;try{for(i=e((this.definitions||{}).styles),t=i.next();!t.done;t=i.next()){if(r=t.value,r.name===s)return r;r.name===h&&(o=r)}}catch(c){u={error:c}}finally{try{t&&!t.done&&(f=i.return)&&f.call(i)}finally{if(u)throw u.error;}}return o},n.prototype._transformStyleRequest=function(n,t){n.includes(f.domainPlaceHolder)&&(t.url=t.url.replace(f.domainPlaceHolder,this.serviceOptions.staticAssetsDomain));n.includes(f.stylePathHolder)&&(t.url=t.url.replace(f.stylePathHolder,f.stylePath));n.includes(f.styleResourcePlaceholder)&&(t.url=t.url.replace(f.styleResourcePlaceholder,f.styleResourcePath));t.url=t.url+(""+(n.includes("?")?"&":"?")+f.apiVersionQueryParameter+"="+this.apiVersion)},n.prototype._request=function(n,t,i){return du(this,void 0,void 0,function(){var r,u,e,s,o;return gu(this,function(h){switch(h.label){case 0:return u=new fr({protocol:"https",domain:n,path:t,queryParams:(o={},o[f.apiVersionQueryParameter]=this.apiVersion,o.version=this.serviceOptions.styleDefinitionsVersion,o)}).toString(),typeof this.serviceOptions.transformRequest=="function"&&i&&(r=this.serviceOptions.transformRequest(u,i)),e={method:"GET",mode:"cors"},r&&(r.credentials&&(e.credentials=r.credentials),r.headers&&(e.headers=r.headers),u=r.url||u),s=new Request(u,e),[4,fetch(s).then(function(n){if(n.ok)return n.json();throw new Error("HTTP "+n.status+": "+n.statusText+" ");})];case 1:return[2,h.sent()]}})})},n}(),sai=function(){return"ENVIRONMENT"in window&&!!window.ENVIRONMENT.hmr},bst=function(t){function i(r,u){var e=t.call(this)||this,h,v,c,y,p,l,a,w;e.styleSourceIds=new Set;e.removed=!1;e.loaded=!1;e.ready=!1;e._windowResizeCallback=function(){return e.resize()};h=!0;e._updateGlobalDefaults(u);e.serviceOptions=(new hb).merge(u);e.styleOptions=(new pst).merge(u);e.trafficOptions=new wst;e.styles=new oai(e,e.serviceOptions);e.insights=new rci(e.serviceOptions);e.serviceOptions.authOptions.subscriptionKey&&(e.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(e.serviceOptions.authOptions.subscriptionKey));v=e.serviceOptions.authOptions.clientId?e.serviceOptions.authOptions.clientId:e.serviceOptions.authOptions.subscriptionKey?e.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting";e.insights&&e.insights.setAuthenticatedUserContext(e.serviceOptions.sessionId,v);arguments[2]&&sai()?(c=arguments[2],e.ready=!0,e.loaded=!0):(y={attributionControl:!1,container:r,preserveDrawingBuffer:e.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:e.serviceOptions.refreshExpiredTiles,renderWorldCopies:e.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(n,t){var i={url:n};return t==="Tile"||t==="Source"?(n.includes(f.legacyDomainPlaceHolder)&&e.insights&&e.insights.trackEvent({name:"TileLoad"}),e._substituteDomainLanguageViewAndSignInRequest(n,i)):(t==="SpriteJSON"||t==="SpriteImage"||t==="Glyphs")&&e.styles._transformStyleRequest(n,i),e.serviceOptions.transformRequest&&nri(i,e.serviceOptions.transformRequest(i.url,t)),i}},c=new wi.Map(y));try{if(e.map=c,e.authentication=new sli(e),e.controls=new hli(e),e.events=new lli(e),e.imageSprite=new vli(e),e.layers=new yli(e),e.markers=new ali(e),e.sources=new wli(e),e.popups=new pli(e),e.map.getContainer().classList.add(i.Css.container),e.map.getCanvasContainer().classList.add(i.Css.canvasContainer),e.map.getCanvas().classList.add(i.Css.canvas),e._detectHighContrast(),e.copyrightControl=new uci({showFeedbackLink:e.styleOptions.showFeedbackLink,showLogo:e.styleOptions.showLogo,customAttribution:e.styleOptions.customAttribution}),e.controls.add(e.copyrightControl,{position:n.ControlPosition.NonFixed}),p=e.authentication?e.authentication.initialize():Promise.resolve(),e.removed)return e;l=function(){e.loaded=!0;e.map.off("load",l)};e.map.on("load",l);a=function(){e.ready=!0;e.map.off("styledata",a);var n={map:e,type:"ready"};e.events.invoke("ready",n)};e.map.on("styledata",a);e._setAutoResize(e.styleOptions.autoResize);e.map.showTileBoundaries=e.styleOptions.showTileBoundaries;e.localizedStringsPromise=gc.getStrings(e.styleOptions.language);w=e.styles.initialize();Promise.all([p,w]).then(function(){if(!e.removed){if(e.authentication&&!e.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");e.serviceOptions["enable-accessibility"]&&e.accessibleMapDelegate.addToMap();e._setStyleComponents(e.styleOptions);e.copyrightDelegate&&e.copyrightDelegate.addToMap()}}).catch(function(n){var t=n instanceof Error?n:new Error(n),i;e.insights&&e.insights.trackException({error:t});i={map:e,type:"error",error:t};e.events.invoke("error",i)});e.setCamera(o(o({},u),{type:"jump",duration:0}));e.incidentDelegate=new vci(e);e.flowDelegate=new cci(e);e.accessibleMapDelegate=new hci(e);e.userInteractionDelegate=new bci(e,u);e.userInteractionDelegate.addToMap();e.copyrightDelegate=new uli(e,e.copyrightControl,e.styleOptions)}catch(s){h=!1;e.insights&&e.insights.trackException({error:s instanceof Error?s:new Error(s)});throw s;}finally{e.insights&&(e.insights.trackEvent({name:"MapLoad"},{success:h,supported:ay(!1),supportedWithPerformance:ay(!0)}),e.insights.flush())}return e}return u(i,t),i.prototype.getCanvas=function(){return this.map.getCanvas()},i.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},i.prototype.getMapContainer=function(){return this.map.getContainer()},i.prototype.getServiceOptions=function(){return w(this.serviceOptions,hb._cloneCustomizer)},i.prototype.setServiceOptions=function(n){this.serviceOptions=(new hb).merge(this.serviceOptions,n);this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},i.prototype.addRequestTransformer=function(n){this.serviceOptions.addTransformer(n)},i.prototype.removeRequestTransformer=function(n){this.serviceOptions.removeTransformer(n)},i.prototype.setCamera=function(n,t){var u,f,r,l,i,h,e;if(t===void 0&&(t=!1),"padding"in n||"offset"in n||"bounds"in n){if(r=(new dli).merge({maxZoom:this.getCamera().maxZoom},n),l=this._generateSafeBounds(r.bounds),u=this.map.cameraForBounds(l,{padding:r.padding,offset:r.offset,maxZoom:r.maxZoom}),!u)throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");this.map.setMaxZoom(r.maxZoom);this._invokeEvent("maxzoomchanged",this.map.getMaxZoom());f=this._generateSafeBounds(r.maxBounds)}else i=(new gli).merge(this.getCamera(),n),i.centerOffset&&i.centerOffset.length>=2&&(h=i.centerOffset,e=us([i.center],i.zoom),e[0][0]+=h[0],e[0][1]+=h[1],i.center=gv(e,i.zoom)[0]),u={center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,around:undefined},this.map.setMinZoom(i.minZoom),this.map.setMaxZoom(i.maxZoom),this._invokeEvent("minzoomchanged",this.map.getMinZoom()),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),f=this._generateSafeBounds(i.maxBounds);f?this.map.setMaxBounds(f):this.map.setMaxBounds(null);var s=(new bli).merge(n),a={duration:s.duration,easing:function(n){return n},offset:[0,0],animate:!0},c={fromControl:t};s.type==="jump"?this.map.jumpTo(u,c):s.type==="ease"?this.map.easeTo(o(o({},u),a),c):s.type==="fly"&&this.map.flyTo(o(o({},u),a),c)},i.prototype.setCameraBounds=function(n){this.setCamera(n)},i.prototype.getCamera=function(){var n=this.map.getBounds().getSouthWest().toArray(),t=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new c(n,t),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},i.prototype.setStyle=function(n){delete n.preserveDrawingBuffer;var t=(new pst).merge(this.styleOptions,n);t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize);t.language!==this.styleOptions.language&&(this.localizedStringsPromise=gc.getStrings(t.language));t.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(t.renderWorldCopies);t.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:t.showFeedbackLink});t.customAttribution!==this.styleOptions.customAttribution&&this.copyrightControl.setOptions({customAttribution:t.customAttribution});t.showLogo!==this.styleOptions.showLogo&&this.copyrightControl.setOptions({showLogo:t.showLogo});t.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=t.showTileBoundaries);this.styleOptions=t;this._setStyleComponents(t)},i.prototype.getStyle=function(){return at(this.styleOptions)},i.prototype.addIcon=function(n,t){this.imageSprite.add(n,t)},i.prototype.addPins=function(n,t){var i=(new iai).merge(t),u=this.layers.getLayerById(i.name),s=!1,f,r,e,o;if(u||(s=!0,u=new yc(i.name+"-source",i.name,{source:i.name+"-source",minZoom:i.minZoom,maxZoom:i.maxZoom,iconOptions:{anchor:"center",size:i.iconSize,image:["case",["has","icon"],["get","icon"],i.icon],ignorePlacement:!i.cluster,opacity:i.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],i.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[i.textFont]]],size:["case",["has","point_count"],20,i.fontSize],ignorePlacement:!i.cluster,opacity:i.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[i.textOffset[0]/16,i.textOffset[1]/16]]],color:i.fontColor}})),!(u instanceof yc))throw new Error("A layer with name '"+i.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");if(r=u.getSource(),typeof r=="string"?(f=r,r=this.sources.getById(f)):f=r.getId(),e=!1,r||(e=!0,r=new cr(f,{cluster:i.cluster})),!(r instanceof cr))throw new Error("The source with name '"+f+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(r);s&&this.layers.add(u,i.before);o=new sf(n);i.overwrite?r.setShapes(o):r.add(o)},i.prototype.addCircles=function(n,t){var i=(new nai).merge(t),u=this.layers.getLayerById(i.name),s=!1,f,r,e,o;if(u||(s=!0,u=new iy(i.name+"-source",i.name,{source:i.name+"-source",minZoom:i.minZoom,maxZoom:i.maxZoom,opacity:i.opacity,radius:["case",["has","radius"],["get","radius"],i.radius],color:["case",["has","color"],["get","color"],i.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],i.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],i.outlineWidth]})),!(u instanceof iy))throw new Error("A layer with name '"+i.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");if(r=u.getSource(),typeof r=="string"?(f=r,r=this.sources.getById(f)):f=r.getId(),e=!1,r||(e=!0,r=new cr(f)),!(r instanceof cr))throw new Error("The source with name '"+f+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(r);s&&this.layers.add(u,i.before);o=new sf(n);i.overwrite?r.setShapes(o):r.add(o)},i.prototype.addLinestrings=function(n,t){var i=(new tai).merge(t),u=this.layers.getLayerById(i.name),s=!1,f,r,e,o;if(u||(s=!0,u=new ry(i.name+"-source",i.name,{source:i.name+"-source",minZoom:i.minZoom,maxZoom:i.maxZoom,lineCap:i.cap,lineJoin:i.join,strokeOpacity:i.opacity,strokeColor:["case",["has","color"],["get","color"],i.color],strokeWidth:["case",["has","width"],["get","width"],i.width]})),!(u instanceof ry))throw new Error("A layer with name '"+i.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");if(r=u.getSource(),typeof r=="string"?(f=r,r=this.sources.getById(f)):f=r.getId(),e=!1,r||(e=!0,r=new cr(f)),!(r instanceof cr))throw new Error("The source with name '"+f+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(r);s&&this.layers.add(u,i.before);o=new sf(n);i.overwrite?r.setShapes(o):r.add(o)},i.prototype.addPolygons=function(n,t){var i=(new rai).merge(t),u=this.layers.getLayerById(i.name),s=!1,f,r,e,o;if(u||(s=!0,u=new uy(i.name+"-source",i.name,{source:i.name+"-source",minZoom:i.minZoom,maxZoom:i.maxZoom,fillOpacity:i.opacity,fillColor:["case",["has","color"],["get","color"],i.color]})),!(u instanceof uy))throw new Error("A layer with name '"+i.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");if(r=u.getSource(),typeof r=="string"?(f=r,r=this.sources.getById(f)):f=r.getId(),e=!1,r||(e=!0,r=new cr(f)),!(r instanceof cr))throw new Error("The source with name '"+f+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(r);s&&this.layers.add(u,i.before);o=new sf(n);i.overwrite?r.setShapes(o):r.add(o)},i.prototype.addRaster=function(n,t){var i=(new uai).merge(t),r=this.layers.getLayerById(i.name),u;if(r||(r=new pc({maxZoom:i.maxZoom,minZoom:i.minZoom,opacity:i.opacity,tileSize:256,tileUrl:"{subdomain}"},i.name)),!(r instanceof pc))throw new Error("A layer with name '"+i.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if(r.getOptions().tileUrl!=="{subdomain}")throw new Error("A TileLayer with name '"+i.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");u=i.overwrite?[]:r.getOptions().subdomains||[];u.push.apply(u,dt(n));r._setOptionsNoUpdate({subdomains:u});this.layers.add(r,i.before)},i.prototype.getLayers=function(){return this.layers.getLayers().map(function(n){return n.getId()})},i.prototype.removeLayers=function(n){var u,o,i,t,r,f;try{for(i=e(n),t=i.next();!t.done;t=i.next())r=t.value,this.layers.getLayerById(r)&&(this.layers.remove(r),f=r+"-source",this.sources.getById(f)&&this.sources.remove(f))}catch(s){u={error:s}}finally{try{t&&!t.done&&(o=i.return)&&o.call(i)}finally{if(u)throw u.error;}}},i.prototype.addHtml=function(n,t){n.id||(n.id="marker_"+ef());var i=new ey({htmlContent:n});return this.markers.add(i,t),n.id},i.prototype.removeHtml=function(n){this.markers.remove(n)},i.prototype.addEventListener=function(n,t,i){this.events._addLegacy(n,t,i)},i.prototype.removeEventListener=function(n,t,i){this.events._removeLegacy(n,t,i)},i.prototype.setUserInteraction=function(n){this.userInteractionDelegate.setOptions(n)},i.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},i.prototype.addControl=function(n,t){this.controls.add(n,t)},i.prototype.removeControl=function(n){this.controls.remove(n)},i.prototype.setTraffic=function(n){var i=this.trafficOptions.incidents,t=this.trafficOptions.flow;if(this.trafficOptions=(new wst).merge(this.trafficOptions,n),this.incidentDelegate&&(this.trafficOptions.incidents?i||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap()),this.trafficOptions.flow&&this.trafficOptions.flow!=="none")try{this.trafficOptions.flow!==t&&this.flowDelegate.addToMap()}catch(r){this.trafficOptions.flow=t;throw r;}else this.flowDelegate.removeFromMap()},i.prototype.getTraffic=function(){return at(this.trafficOptions)},i.prototype.remove=function(){this.dispose()},i.prototype.clear=function(){this.popups.clear();this.layers.clear();this.sources.clear();this.markers.clear()},i.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var n=this.getMapContainer().firstChild;this.getMapContainer().removeChild(n)}},i.prototype.resize=function(n,t,i){var r,u;(typeof n=="number"||typeof n=="string")&&(typeof t=="number"||typeof t=="string")?(r=n,this.getMapContainer().style.height=typeof r=="number"?r+"px":r,this.getMapContainer().style.width=typeof t=="number"?t+"px":t):i=n;u=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden";this.map.resize(i);this.getMapContainer().style.overflow=u},i.prototype.pixelsToPositions=function(n){var r,f,o=[],i,t,s,u;try{for(i=e(n),t=i.next();!t.done;t=i.next())s=t.value,u=this.map.unproject(s),o.push(new fi(u.lng,u.lat))}catch(h){r={error:h}}finally{try{t&&!t.done&&(f=i.return)&&f.call(i)}finally{if(r)throw r.error;}}return o},i.prototype.positionsToPixels=function(n){var r,f,o=[],i,t,s,u;try{for(i=e(n),t=i.next();!t.done;t=i.next())s=t.value,u=this.map.project(s),o.push(new gt(u.x,u.y))}catch(h){r={error:h}}finally{try{t&&!t.done&&(f=i.return)&&f.call(i)}finally{if(r)throw r.error;}}return o},i.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},i.prototype.stop=function(){this.map.stop()},i.prototype._getMap=function(){return this.map},i.prototype._rebuildStyle=function(){return du(this,void 0,void 0,function(){return gu(this,function(){return this.styles.setStyleUrl(this.styleOptions),this.imageSprite._restoreImages(),[2]})})},i.prototype._isLoaded=function(){return this.loaded},i.prototype._isReady=function(){return this.ready},i.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},i.prototype._sendRequest=function(n,t,i){var r;return typeof this.serviceOptions.transformRequest=="function"&&(r=this.serviceOptions.transformRequest(n,t)),r?fetch(r.url||n,{credentials:r.credentials,headers:o(o({},i),r.headers),method:"GET",mode:"cors"}):fetch(n,{headers:i,method:"GET",mode:"cors"})},i.prototype._substituteDomainLanguageViewAndSignInRequest=function(n,t){var i,r;(n.includes(f.legacyDomainPlaceHolder)||n.includes(f.domainPlaceHolder))&&(i=new RegExp("[^{]"+f.legacyDomainPlaceHolder+"[^}]"),n.match(i)&&(t.url=t.url.replace(f.legacyDomainPlaceHolder,f.domainPlaceHolder)),fr.protoRegEx.test(this.serviceOptions.domain)?(r=t.url.indexOf(f.domainPlaceHolder),t.url=this.serviceOptions.domain+t.url.substring(r+f.domainPlaceHolder.length)):t.url=t.url.replace(f.domainPlaceHolder,this.serviceOptions.domain));t.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())&&this.authentication&&this.authentication.signRequest(t);n.includes(f.languagePlaceHolder)&&(t.url=t.url.replace(f.languagePlaceHolder,this.styleOptions.language));n.includes(f.viewPlaceHolder)&&(t.url=this.styleOptions.view?t.url.replace(f.viewPlaceHolder,this.styleOptions.view):t.url.replace(f.viewPlaceHolder,"").replace("&"+f.viewParameter+"=",""))},i.prototype._setAutoResize=function(n){n?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},i.prototype._setStyleComponents=function(n){if(!this.removed){this.styleOptions=n;this._rebuildStyle();return}},i.prototype._updateGlobalDefaults=function(n){n&&(n.authOptions&&!vy()&&urt(n.authOptions),n.domain&&!prt()&&frt(n.domain),n.styleDefinitionsPath&&!wrt()&&ert(n.styleDefinitionsPath),n.styleDefinitionsVersion&&!brt()&&ort(n.styleDefinitionsVersion),n.workerCount&&!krt()&&srt(n.workerCount),n.maxParallelImageRequests&&!drt()&&hrt(n.maxParallelImageRequests),(n.subscriptionKey||n["subscription-key"])&&!vy()&&art(n.subscriptionKey||n["subscription-key"]),(n.sessionId||n["session-id"])&&!nut()&&lrt(n.sessionId||n["session-id"]),n.language&&!grt()&&crt(n.language),(n.userRegion||n.view)&&!tut()&&vrt(n.userRegion||n.view))},i.prototype._generateSafeBounds=function(n){if(n){var r=c.getSouth(n),i=c.getWest(n),u=c.getNorth(n),t=c.getEast(n);if(isNaN(r)||isNaN(i)||isNaN(u)||isNaN(t))throw new Error("The bounds specified are invalid: ["+n+"]");while(i>t)t+=360;return new c([i,r,t,u])}return n},i.prototype._detectHighContrast=function(){var r=vri.getHighContrastMode(),n,t;switch(r){case"invert":n=i.Css.hcLight;t="high_contrast_light";break;case"light":n=i.Css.hcLight;t="high_contrast_light";break;case"dark":n=i.Css.hcDark;t="high_contrast_dark"}n&&this.map.getContainer().classList.add(n);t&&this.styleOptions.style==="road"&&(this.styleOptions.style=t)},i.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},i}(wr),hai=function(){function n(){this.detectHyperlinks=!0;this.parsePropertyPaths=!0}return n.applyTemplate=function(t,i){var o=this,f=document.createElement("div"),u,e,r;return f.classList.add(n.Css.template),t&&(i||(i={}),typeof i.singleDescription!="boolean"&&(i.singleDescription=!0),i.sandboxContent=typeof i.sandboxContent=="boolean"?i.sandboxContent:!0,i.title&&typeof i.content=="string"&&(i.content.includes("{title}")||i.content.includes("{name}"))||(t.title?i.title="{title}":t.name&&(i.title="{name}")),typeof i.detectHyperlinks!="boolean"&&(i.detectHyperlinks=!0),typeof i.parsePropertyPaths!="boolean"&&(i.parsePropertyPaths=!0),i.textColor&&(f.style.color=i.textColor),i.fillColor&&(f.style.backgroundColor=i.fillColor),i.title&&(r=this._applyStringTemplate(t,i.title,i),r.innerText=r.textContent||r.innerText||"",this._appendChild(f,r,n.Css.title)),u=document.createElement("div"),u.classList.add(n.Css.content),Array.isArray(i.content)?i.content.length>0&&i.content[0].propertyPath?this._appendChild(u,this._generateContent(t,i.content,i),n.Css.item):i.content.forEach(function(r){o._appendChild(u,o._generateContent(t,r,i),n.Css.item)}):(e=0,t.description&&Object.keys(t).forEach(function(n){o._ignoreProperty(n,t[n])||e++}),r=void 0,e===1||i.singleDescription&&t.description||e===2&&t.Snippet?(r=document.createElement("div"),r.innerHTML=t.description):r=this._generateContent(t,i.content,i),this._appendChild(u,r,n.Css.item)),u.innerHTML!==""&&(i.sandboxContent?f.appendChild(n._createSandboxedIframe(u,i)):f.appendChild(u))),f},n._createSandboxedIframe=function(t,i){var r=document.createElement("iframe"),h,c,l;r.sandbox.add("allow-popups");var u=t.innerHTML,a=!1,e=100,f=550,o=10,s=0;document.body.scrollWidth<=340&&(f=300,e=50);h=u.split(/<(tr|div|br|li|h[0-9]|p>)/);s=Math.max.apply(Math,dt(h.map(function(n){return n.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})))-1;c=Math.ceil(s*3.5);c<f&&(f=c,e=s);u.includes("<img")||u.includes("<video")?(a=!0,r.width="550px"):(l=u.indexOf(n.Css.table)>-1?25:20,o+=Math.max(h.length*.5*l,Math.ceil(u.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/e)*l));r.width=f+"px";r.height=a||o>280?"280px":o+"px";var y=i.textColor?"color:"+i.textColor+";":"",p=i.fillColor?"background-color:"+i.fillColor+";":"",v='<html><head><title><\/title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" />'+('<link rel="stylesheet" href="'+n._cssUrl+'" type="text/css"/>')+("<style>html, body{margin:0;padding:0;"+y+p+"}<\/style><\/head>")+('<body><div class="'+n.Css.template+'" style="padding:0;width:'+(f-20)+'px">'+u+"<\/div><\/body><\/html>");return r.srcdoc===undefined?r.src="data:text/html;charset=utf-8,"+encodeURI(v):r.srcdoc=v,r},n._appendChild=function(n,t,i){t&&(i&&(t.className=(t.className?t.className+" ":"")+i),n.appendChild(t))},n._generateContent=function(n,t,i){var r,u;return t?Array.isArray(t)?this._generatePropertyInfoTable(n,t,i):this._applyStringTemplate(n,t,i):(r=this._generateDynamicTableHtml(n,null,i),r)?(u=document.createElement("div"),u.innerHTML=r,u):null},n._applyStringTemplate=function(n,t,i){var r,u,e,f;if(t){for(r=t,u=this._placeholderRx.exec(t);u;)u.length>=2&&(e=this._getPropertyValue(n,u[1],i),r=r.replace(u[0],e)),u=this._placeholderRx.exec(t);if(r)return r=r.trim(),r.includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>")),f=document.createElement("div"),f.innerHTML=r,f}return null},n._getPropertyValue=function(n,t,i,r){var a=i.parsePropertyPaths?t.split("/"):[t],y=a.length,v,e,c,o,w,s,h,u,f,l,p,g;if(y>0&&n){if(v=a[0],e=n[v],i.detectHyperlinks&&t==="link"&&(!r||r.hyperlinkFormat)&&(c=[],Array.isArray(e)?e.forEach(function(n){n.href?c.push(n):typeof n=="string"&&c.push({href:n})}):e.href&&c.push(e),c.length>0))return r&&r.hyperlinkFormat?o=r.hyperlinkFormat:i&&i.hyperlinkFormat&&(o=i.hyperlinkFormat),w=o&&o.target?o.target:"_blank",s=[],c.forEach(function(n){n.title||o&&o.label||!n.rel||s.push(n.rel," - ");s.push('<a href="',n.href,'" target="',w,'">');n.title?s.push(n.title):o&&o.label?s.push(o.label):s.push(n.href);s.push("<\/a>","<br/>")}),s.pop(),s.join("");if(e!=null){for(h=void 0,h=1;h<y;h++)if(e=e[a[h]],v=a[h],e==null)break;if(h===y&&e!=null){if(u=void 0,u=typeof e.value!="undefined"?e.value:e,u instanceof Date)return r&&r.dateFormat?u.toLocaleString(undefined,r.dateFormat):i.dateFormat?u.toLocaleString(undefined,i.dateFormat):u.toISOString();if(typeof u=="object")return l=this._generateDynamicTableHtml(u,a.slice(1),i),l?l:"";if(typeof u=="number"){if(r){if(r.dateFormat)return new Date(u).toLocaleString(undefined,r.dateFormat);if(r.numberFormat)return u.toLocaleString(undefined,r.numberFormat)}else if(/(timestamp|date)/gi.test(v))return new Date(u).toISOString();return u.toLocaleString(undefined,i.numberFormat)}if(typeof u=="string"&&u!==""&&!/[\n\r<>\s]/g.test(u)&&(i.detectHyperlinks||r&&r.hyperlinkFormat)){u=u.trim();var b=this._isUrlRx.test(u)||r&&r.hyperlinkFormat,k=this._isImageUrlRx.test(u)&&(b||u.startsWith("data:image")),d=this._emailRx.test(u);if(b||k||d)return f=void 0,r&&r.hyperlinkFormat?f=r.hyperlinkFormat:i&&i.hyperlinkFormat&&(f=i.hyperlinkFormat),l=void 0,l=f&&f.target?' target="'+f.target+'"':' target="_blank"',p=""+(f&&f.label?f.label:u),f&&f.scheme?u=f.scheme+u:d&&(u="mailto:"+u),g=f&&f.label?' alt="'+f.label+'"':"",(f&&f.isImage||k)&&(p='<img src="'+u+'" style="max-width:100%"'+g+'"/>'),'<a href="'+u+'"'+l+">"+p+"<\/a>"}return u.toString()}}}return""},n._generatePropertyInfoTable=function(n,t,i){var r,u,f;return n&&t&&t.length>0?(r=[],u=this,r.push('<table class="'+u.Css.table+'">'),t.forEach(function(t){var f=u._getPropertyValue(n,t.propertyPath,i,t),e;t.hideLabel?r.push('<tr><td colspan="2">',f,"<\/td><\/tr>"):(e=t.label||t.propertyPath.split("/")[0],r.push("<tr><th>",e,"<\/th><td>",f,"<\/td><\/tr>"))}),r.push("<\/table>"),f=document.createElement("div"),f.innerHTML=r.join(""),f):null},n._generateDynamicTableHtml=function(n,t,i){var o=this,r,u,e,f;return n?(r=[],u=this,r.push('<table class="'+u.Css.table+'">'),e=t&&t.length>0?t.join("/")+"/":"",f=0,Object.keys(n).forEach(function(t){o._ignoreProperty(t,n[t])||(r.push("<tr><th>",t,"<\/th><td>",u._getPropertyValue(n,e+t,i),"<\/td><\/tr>"),f++)}),f===0)?null:(r.push("<\/table>"),r.join("")):null},n._ignoreProperty=function(n,t){switch(n){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(n.indexOf("_")===0||t==null||t==="")return!0}return!1},n._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,n._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,n._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,n._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,n._cssUrl=new fr({domain:bi.staticAssetsDomain,path:"sdk/javascript/mapcontrol/"+dh.getEndpointVersion()+"/atlas.min.css"}).toString(),n.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},n}(),cai=new fr({domain:bi.staticAssetsDomain,path:"sdk/javascript/mapcontrol/"+dh.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"});nht(cai.toString(),function(n){n&&console.warn(n)},!0);n.HtmlMarker=ey;n.Map=bst;n.Pixel=gt;n.Popup=bc;n.PopupTemplate=hai;n.Shape=yt;n._getAssetDomain=lri;n._getDomain=ari;n._hasMaxParallelImageRequests=drt;n._hasSetAuthenticationOptions=vy;n._hasSetDomain=prt;n._hasSetLanguage=grt;n._hasSetSessionId=nut;n._hasSetStyleDefinitionsPath=wrt;n._hasSetStyleDefinitionsVersion=brt;n._hasSetView=tut;n._hasWorkerCount=krt;n.addImageTemplate=ori;n.clearPrewarmedResources=cri;n.control=wnt;n.data=vnt;n.getAllImageTemplateNames=sri;n.getAuthenticationOptions=pit;n.getDomain=ly;n.getImageTemplate=yrt;n.getLanguage=nrt;n.getMaxParallelImageRequests=git;n.getSessionId=trt;n.getStaticAssetsDomain=wit;n.getStyleDefinitionsPath=bit;n.getStyleDefinitionsVersion=kit;n.getSubscriptionKey=irt;n.getUserRegion=uri;n.getVersion=fri;n.getView=rrt;n.getWorkerCount=dit;n.internal=rht;n.isSupported=ay;n.layer=eti;n.math=ont;n.prewarm=hri;n.setAuthenticationOptions=urt;n.setDomain=frt;n.setLanguage=crt;n.setMaxParallelImageRequests=hrt;n.setSessionId=lrt;n.setStyleDefinitionsPath=ert;n.setStyleDefinitionsVersion=ort;n.setSubscriptionKey=art;n.setUserRegion=vrt;n.setView=eri;n.setWorkerCount=srt;n.source=nti;Object.defineProperty(n,"__esModule",{value:!0})}),function(n,t){typeof exports=="object"&&typeof module!="undefined"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(n=n||self,t((n.atlas=n.atlas||{},n.atlas.service={})))}(this,function(n){"use strict";function ki(n){return n.toLowerCase()}function hh(n){for(var i="",t=0;t<n.length;t++)i+=String.fromCharCode(n[t]);return btoa(i)}function ch(n){for(var i=atob(n),r=new Uint8Array(i.length),t=0;t<i.length;t++)r[t]=i.charCodeAt(t);return r}function lp(n,t){return t={exports:{}},n(t,t.exports),t.exports}function vp(n,t){var i=t||0,r=lh;return[r[n[i++]],r[n[i++]],r[n[i++]],r[n[i++]],"-",r[n[i++]],r[n[i++]],"-",r[n[i++]],r[n[i++]],"-",r[n[i++]],r[n[i++]],"-",r[n[i++]],r[n[i++]],r[n[i++]],r[n[i++]],r[n[i++]],r[n[i++]]].join("")}function yp(n,t,i){var f=t&&i||0,r,u;if(typeof n=="string"&&(t=n==="binary"?new Array(16):null,n=null),n=n||{},r=n.random||(n.rng||ap)(),r[6]=r[6]&15|64,r[8]=r[8]&63|128,t)for(u=0;u<16;++u)t[f+u]=r[u];return t||ah(r)}function vh(n){var t={};return t.body=n.bodyAsText,t.headers=n.headers,t.status=n.status,t}function pt(n){var t=n.clone();return t.headers&&t.headers.remove("authorization"),t}function wp(n){var t=new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","ig");return t.test(n)}function gi(){return pp()}function wt(n,t){return new Promise(function(i){return setTimeout(function(){return i(t)},n)})}function bp(n,t){var i;return Array.isArray(n)||(n=[n]),i={},i[t]=n,i}function kp(n){return yh.test(n)}function ii(n,t,i){return!n||!t?n:n.split(t).join(i||"")}function dp(n,t){for(var i=n.length;i-1>=0&&n[i-1]===t;)--i;return n.substr(0,i)}function gp(n){if(!n)return undefined;if(!(n instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");var t=hh(n);return dp(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function nw(n){if(!n)return undefined;if(n&&typeof n.valueOf()!="string")throw new Error("Please provide an input of type string for converting to Uint8Array");return n=n.replace(/\-/g,"+").replace(/\_/g,"/"),ch(n)}function vu(n){var f=[],i="",e,r,u,t;if(n)for(e=n.split("."),r=0,u=e;r<u.length;r++)t=u[r],t.charAt(t.length-1)==="\\"?i+=t.substr(0,t.length-1)+".":(i+=t,f.push(i),i="");return f}function tw(n){return n?(typeof n.valueOf()=="string"&&(n=new Date(n)),Math.floor(n.getTime()/1e3)):undefined}function iw(n){return n?new Date(n*1e3):undefined}function rw(n,t,i){if(i!==null&&i!==undefined)if(n.match(/^Number$/ig)!==null){if(typeof i!="number")throw new Error(t+" with value "+i+" must be of type number.");}else if(n.match(/^String$/ig)!==null){if(typeof i.valueOf()!="string")throw new Error(t+' with value "'+i+'" must be of type string.');}else if(n.match(/^Uuid$/ig)!==null){if(!(typeof i.valueOf()=="string"&&wp(i)))throw new Error(t+' with value "'+i+'" must be of type string and a valid uuid.');}else if(n.match(/^Boolean$/ig)!==null){if(typeof i!="boolean")throw new Error(t+" with value "+i+" must be of type boolean.");}else if(n.match(/^Stream$/ig)!==null){var r=typeof i;if(r!=="string"&&r!=="function"&&!(i instanceof ArrayBuffer)&&!ArrayBuffer.isView(i)&&!(typeof Blob=="function"&&i instanceof Blob))throw new Error(t+" must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.");}return i}function uw(n,t,i){if(!t)throw new Error("Please provide a set of allowedValues to validate "+n+" as an Enum Type.");var r=t.some(function(n){return typeof n.valueOf()=="string"?n.toLowerCase()===i.toLowerCase():n===i});if(!r)throw new Error(i+" is not a valid value for "+n+". The valid values are: "+JSON.stringify(t)+".");return i}function fw(n,t){if(t!=undefined){if(!(t instanceof Uint8Array))throw new Error(n+" must be of type Uint8Array.");t=hh(t)}return t}function ew(n,t){if(t!=undefined){if(!(t instanceof Uint8Array))throw new Error(n+" must be of type Uint8Array.");t=gp(t)}return t}function ow(n,t,i){if(t!=undefined)if(n.match(/^Date$/ig)!==null){if(!(t instanceof Date||typeof t.valueOf()=="string"&&!isNaN(Date.parse(t))))throw new Error(i+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(n.match(/^DateTime$/ig)!==null){if(!(t instanceof Date||typeof t.valueOf()=="string"&&!isNaN(Date.parse(t))))throw new Error(i+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(n.match(/^DateTimeRfc1123$/ig)!==null){if(!(t instanceof Date||typeof t.valueOf()=="string"&&!isNaN(Date.parse(t))))throw new Error(i+" must be an instanceof Date or a string in RFC-1123 format.");t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(n.match(/^UnixTime$/ig)!==null){if(!(t instanceof Date||typeof t.valueOf()=="string"&&!isNaN(Date.parse(t))))throw new Error(i+" must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.");t=tw(t)}else if(n.match(/^TimeSpan$/ig)!==null){if(!kp(t))throw new Error(i+' must be a string in ISO 8601 format. Instead was "'+t+'".');t=t}return t}function sw(n,t,i,r){var f,e,u;if(!Array.isArray(i))throw new Error(r+" must be of type Array.");if(f=t.type.element,!f||typeof f!="object")throw new Error('element" metadata for an Array must be defined in the '+('mapper and it must of type "object" in '+r+"."));for(e=[],u=0;u<i.length;u++)e[u]=n.serialize(f,i[u],r);return e}function hw(n,t,i,r){var u,o,f,s,e;if(typeof i!="object")throw new Error(r+" must be of type object.");if(u=t.type.value,!u||typeof u!="object")throw new Error('"value" metadata for a Dictionary must be defined in the '+('mapper and it must of type "object" in '+r+"."));for(o={},f=0,s=Object.keys(i);f<s.length;f++)e=s[f],o[e]=n.serialize(u,i[e],r+"."+e);return o}function ph(n,t,i){var u=t.type.modelProperties,r,f;if(!u){if(r=t.type.className,!r)throw new Error('Class name for model "'+i+'" is not provided in the mapper "'+JSON.stringify(t,undefined,2)+'".');if(f=n.modelMappers[r],!f)throw new Error('mapper() cannot be null or undefined for model "'+r+'".');if(u=f.type.modelProperties,!u)throw new Error("modelProperties cannot be null or undefined in the "+('mapper "'+JSON.stringify(f)+'" of type "'+r+'" for object "'+i+'".'));}return u}function cw(n,t,i,r){var y,h,c,l,p,o,u,e,f,w,a,b,v,g,s,d,tt,it,rt;if(nr(n,t)&&(t=wh(n,t,i,"clientName")),i!=undefined){for(h={},c=ph(n,t,r),l=0,p=Object.keys(c);l<p.length;l++)if(o=p[l],u=c[o],!u.readOnly){if(e=void 0,f=h,n.isXML)e=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else for(w=vu(u.serializedName),e=w.pop(),a=0,b=w;a<b.length;a++)v=b[a],g=f[v],g==undefined&&i[o]!=undefined&&(f[v]={}),f=f[v];if(f!=undefined){var ut=u.serializedName!==""?r+"."+u.serializedName:r,k=i[o],nt=nr(n,t);nt&&nt.clientName===o&&k==undefined&&(k=t.serializedName);s=n.serialize(u,k,ut);s!==undefined&&e!=undefined&&(u.xmlIsAttribute?(f.$=f.$||{},f.$[e]=s):f[e]=u.xmlIsWrapped?(y={},y[u.xmlElementName]=s,y):s)}}if(d=t.type.additionalProperties,d){tt=Object.keys(c);it=function(t){var u=tt.every(function(n){return n!==t});u&&(h[t]=n.serialize(d,i[t],r+'["'+t+'"]'))};for(rt in i)it(rt)}return h}return i}function lw(n){return["$","_"].includes(n)}function aw(n,t,i,r){var y,nt,w,it,b,rt,l,lt,o,at,s,a,k,ut,vt,ft,et,ot,yt,v,d,st,u;nr(n,t)&&(t=wh(n,t,i,"serializedName"));var h=ph(n,t,r),e={},g=[];for(y=0,nt=Object.keys(h);y<nt.length;y++){var u=nt[y],f=h[u],ht=vu(h[u].serializedName);g.push(ht[0]);var p=f.serializedName,tt=f.xmlName,ct=f.xmlElementName,c=r;if(p!==""&&p!==undefined&&(c=r+"."+p),w=f.headerCollectionPrefix,w){for(it={},b=0,rt=Object.keys(i);b<rt.length;b++)l=rt[b],l.startsWith(w)&&(it[l.substring(w.length)]=n.deserialize(f.type.value,i[l],c)),g.push(l);e[u]=it}else if(n.isXML)f.xmlIsAttribute&&i.$?e[u]=n.deserialize(f,i.$[tt],c):(lt=ct||tt||p,o=i[lt],f.xmlIsWrapped&&(o=i[tt],o=o&&o[ct],at=o===undefined,at&&(o=[])),e[u]=n.deserialize(f,o,c));else{for(s=void 0,a=i,k=0,ut=ht;k<ut.length;k++){if(vt=ut[k],!a)break;a=a[vt]}s=a;ft=t.type.polymorphicDiscriminator;ft&&f.serializedName===ft.serializedName&&s==undefined&&(s=t.serializedName);et=void 0;Array.isArray(i[u])&&h[u].serializedName===""?(s=i[u],e=n.deserialize(f,s,c)):s!==undefined&&(et=n.deserialize(f,s,c),e[u]=et)}}if(ot=t.type.additionalProperties,ot){yt=function(n){var t,i;for(t in h)if(i=vu(h[t].serializedName),i[0]===n)return!1;return!0};for(v in i)yt(v)&&(e[v]=n.deserialize(ot,i[v],r+'["'+v+'"]'))}else if(i)for(d=0,st=Object.keys(i);d<st.length;d++)u=st[d],e[u]!==undefined||g.includes(u)||lw(u)||(e[u]=i[u]);return e}function vw(n,t,i,r){var f=t.type.value,e,u,o,s;if(!f||typeof f!="object")throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+r);if(i){for(e={},u=0,o=Object.keys(i);u<o.length;u++)s=o[u],e[s]=n.deserialize(f,i[s],r);return e}return i}function yw(n,t,i,r){var f=t.type.element,e,u;if(!f||typeof f!="object")throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+r);if(i){for(Array.isArray(i)||(i=[i]),e=[],u=0;u<i.length;u++)e[u]=n.deserialize(f,i[u],r+"["+u+"]");return e}return i}function wh(n,t,i,r){var e=nr(n,t),f,u;if(e&&(f=e[r],f!=undefined&&(u=i[f],u!=undefined))){var o=t.type.uberParent||t.type.className,h=u===o?u:o+"."+u,s=n.modelMappers.discriminators[h];s&&(t=s)}return t}function nr(n,t){return t.type.polymorphicDiscriminator||bh(n,t.type.uberParent)||bh(n,t.type.className)}function bh(n,t){return t&&n.modelMappers[t]&&n.modelMappers[t].type.polymorphicDiscriminator}function pw(n){for(var i,r={},t=0,u=n;t<u.length;t++)i=u[t],r[i]=i;return r}function s(n,t){function i(){this.constructor=n}yu(n,t);n.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}function f(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})}function e(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e}function dh(n,t){t&&n.addEventListener("progress",function(n){return t({loadedBytes:n.loaded})})}function gh(n){for(var r=new ot,e=n.getAllResponseHeaders().trim().split(/[\r\n]+/),t=0,u=e;t<u.length;t++){var i=u[t],f=i.indexOf(":"),o=i.slice(0,f),s=i.slice(f+2);r.set(o,s)}return r}function pu(n,t,i){t.addEventListener("error",function(){return i(new l("Failed to send request to "+n.url,l.REQUEST_SEND_ERROR,undefined,n))});t.addEventListener("abort",function(){return i(new l("The request was aborted",l.REQUEST_ABORTED_ERROR,undefined,n))});t.addEventListener("timeout",function(){return i(new l("timeout of "+t.timeout+"ms exceeded",l.REQUEST_SEND_ERROR,undefined,n))})}function g(n){return wu(n.parameterPath,n.mapper)}function wu(n,t){return typeof n=="string"?n:Array.isArray(n)?n.join("."):t.serializedName}function nc(n){var i=!1,r,t;for(r in n.responses)if(t=n.responses[r],t.bodyMapper&&t.bodyMapper.type.name===ri.Stream){i=!0;break}return i}function ww(n){var t,i;try{return t=bu.parseFromString(n,"application/xml"),bw(t),i=tc(t.childNodes[0]),Promise.resolve(i)}catch(r){return Promise.reject(r)}}function bw(n){if(tr){var t=n.getElementsByTagNameNS(tr,"parsererror");if(t.length)throw new Error(t.item(0).innerHTML);}}function kw(n){return!!n.attributes}function dw(n){return kw(n)&&n.hasAttributes()?n:undefined}function tc(n){var t={},e=n.childNodes.length,o=n.childNodes[0],u=o&&e===1&&o.nodeType===Node.TEXT_NODE&&o.nodeValue||undefined,s=dw(n),h,r,i,f;if(s){for(t.$={},r=0;r<s.attributes.length;r++)h=s.attributes[r],t.$[h.nodeName]=h.nodeValue;u&&(t._=u)}else e===0?t="":u&&(t=u);if(!u)for(r=0;r<e;r++)i=n.childNodes[r],i.nodeType!==Node.TEXT_NODE&&(f=tc(i),t[i.nodeName]?Array.isArray(t[i.nodeName])?t[i.nodeName].push(f):t[i.nodeName]=[t[i.nodeName],f]:t[i.nodeName]=f);return t}function rc(n,t){var i=t&&t.rootName||"root",r=ku(n,i)[0];return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+ic.serializeToString(r)}function gw(n){for(var i,r,u=[],t=0,f=Object.keys(n);t<f.length;t++)i=f[t],r=ir.createAttribute(i),r.value=n[i].toString(),u.push(r);return u}function ku(n,t){var c,u,l,w,f,a,i,o,v,r,s,y,b,h,p,e;if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return i=ir.createElement(t),i.textContent=n.toString(),[i];if(Array.isArray(n)){for(c=[],u=0,l=n;u<l.length;u++)for(w=l[u],f=0,a=ku(w,t);f<a.length;f++)e=a[f],c.push(e);return c}if(typeof n=="object"){for(i=ir.createElement(t),o=0,v=Object.keys(n);o<v.length;o++)if(r=v[o],r==="$")for(s=0,y=gw(n[r]);s<y.length;s++)b=y[s],i.attributes.setNamedItem(b);else for(h=0,p=ku(n[r],r);h<p.length;h++)e=p[h],i.appendChild(e);return[i]}throw new Error("Illegal value passed to buildObject: "+n);}function gu(n){return{create:function(t,i){return new ib(t,n,i)}}}function rb(n){var r,u=n.request,t=u.operationSpec,i;return t&&(i=u.operationResponseGetter,r=i?i(t,n):t.responses[n.status]),r}function ub(n){var t=n.request.shouldDeserialize;return t===undefined?!0:typeof t=="boolean"?t:t(n)}function fb(n,t,i){return eb(n,t,i).then(function(n){var p=ub(n),r,v,y,u,t,o,s,e,c;if(p&&(r=n.request.operationSpec,r&&r.responses)){var h=n.status,a=Object.keys(r.responses),w=a.length===0||a.length===1&&a[0]==="default",f=rb(n),b=w?200<=h&&h<300:!!f;if(b){if(f){if(f.bodyMapper){e=n.parsedBody;r.isXML&&f.bodyMapper.type.name===ri.Sequence&&(e=typeof e=="object"?e[f.bodyMapper.xmlElementName]:[]);try{n.parsedBody=r.serializer.deserialize(f.bodyMapper,e,"operationRes.parsedBody")}catch(u){return c=new l("Error "+u+" occurred in deserializing the responseBody - "+n.bodyAsText),c.request=pt(n.request),c.response=vh(n),Promise.reject(c)}}else r.httpMethod==="HEAD"&&(n.parsedBody=i.status>=200&&i.status<300);f.headersMapper&&(n.parsedHeaders=r.serializer.deserialize(f.headersMapper,n.headers.rawHeaders(),"operationRes.parsedHeaders"))}}else if(v=r.responses.default,v){y=nc(r)?"Unexpected status code: "+h:n.bodyAsText;u=new l(y);u.statusCode=h;u.request=pt(n.request);u.response=vh(n);t=n.parsedBody;try{t&&(o=v.bodyMapper,o&&o.serializedName==="CloudError"?(t.error&&(t=t.error),t.code&&(u.code=t.code),t.message&&(u.message=t.message)):(s=t,t.error&&(s=t.error),u.code=s.code,s.message&&(u.message=s.message)),o&&(e=t,r.isXML&&o.type.name===ri.Sequence&&(e=typeof t=="object"?t[o.xmlElementName]:[]),u.body=r.serializer.deserialize(o,e,"error.body")))}catch(k){u.message='Error "'+k.message+'" occurred in deserializing the responseBody - "'+n.bodyAsText+'" for the default response.'}return Promise.reject(u)}}return Promise.resolve(n)})}function eb(n,t,i){var u=function(n){var t='Error "'+n+'" occurred while parsing the response body - '+i.bodyAsText+".",r=n.code||l.PARSE_ERROR,u=new l(t,r,i.status,i.request,i,i.bodyAsText);return Promise.reject(u)};if(!i.request.streamResponseBody&&i.bodyAsText){var f=i.bodyAsText,e=i.headers.get("Content-Type")||"",r=e?e.split(";").map(function(n){return n.toLowerCase()}):[];if(r.length===0||r.some(function(t){return n.indexOf(t)!==-1}))return new Promise(function(n){i.parsedBody=JSON.parse(f);n(i)}).catch(u);if(r.some(function(n){return t.indexOf(n)!==-1}))return ww(f).then(function(n){return i.parsedBody=n,i}).catch(u)}return Promise.resolve(i)}function ob(n,t,i,r){return{create:function(u,f){return new ab(u,f,n,t,i,r)}}}function vb(n,t,i){if(t==undefined||t<500&&t!==408||t===501||t===505)return!1;var r;if(i)r=i&&i.retryCount;else throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null.");return r<n.retryCount}function yb(n,t,i){t||(t={retryCount:0,retryInterval:0});i&&(t.error&&(i.innerError=t.error),t.error=i);t.retryCount++;var r=Math.pow(2,t.retryCount)-1,u=n.retryInterval*.8+Math.floor(Math.random()*(n.retryInterval*1.2-n.retryInterval*.8));return r*=u,t.retryInterval=Math.min(n.minRetryInterval+r,n.maxRetryInterval),t}function rr(n,t,i,r,u){var f,e;return r=yb(n,r,u),f=t.abortSignal&&t.abortSignal.aborted,!f&&vb(n,i&&i.status,r)?wt(r.retryInterval).then(function(){return n._nextPolicy.sendRequest(t.clone())}).then(function(i){return rr(n,t,i,r,undefined)}).catch(function(u){return rr(n,t,i,r,u)}):f||u||!i?(e=r.error||new l("Failed to send the request.",l.REQUEST_SEND_ERROR,i&&i.status,i&&i.request,i),Promise.reject(e)):Promise.resolve(i)}function pb(n){return n===void 0&&(n="x-ms-client-request-id"),{create:function(t,i){return new uc(t,i,n)}}}function fc(){return"x-ms-command-name"}function wb(){var n=window.navigator,t={key:"OS",value:(n.oscpu||n.platform).replace(" ","")};return[t]}function bb(){var n={key:"ms-rest-js",value:k.msRestVersion};return[n]}function kb(n,t,i){return t===void 0&&(t=" "),i===void 0&&(i="/"),n.map(function(n){var t=n.value?""+i+n.value:"";return""+n.key+t}).join(t)}function nf(){var n=bb(),t=wb();return kb(n.concat(t))}function db(n){var t=!n||n.key==undefined?fc():n.key,i=!n||n.value==undefined?nf():n.value;return{create:function(n,r){return new gb(n,r,t,i)}}}function nk(n){var t=n.charCodeAt(0);return 48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122}function tk(n){var t="";return n._currentIndex<n._textLength&&(t=n._text.substring(n._currentIndex),n._currentIndex=n._textLength),t}function rt(n){return n._currentIndex<n._textLength}function ut(n){return n._text[n._currentIndex]}function ur(n,t){rt(n)&&(t||(t=1),n._currentIndex+=t)}function sc(n,t){var i=n._currentIndex+t;return n._textLength<i&&(i=n._textLength),n._text.substring(n._currentIndex,i)}function hc(n,t){for(var r="",i;rt(n);)if(i=ut(n),t(i))r+=i,ur(n);else break;return r}function ik(n){return hc(n,function(n){return nk(n)})}function fr(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return hc(n,function(n){return i.indexOf(n)===-1})}function rk(n){var t=ik(n);n._currentToken=nt.scheme(t);n._currentState=rt(n)?"HOST":"DONE"}function uk(n){var t=fr(n,":","/","?");rt(n)?ut(n)===":"?sc(n,3)==="://"?(n._currentToken=nt.scheme(t),n._currentState="HOST"):(n._currentToken=nt.host(t),n._currentState="PORT"):(n._currentToken=nt.host(t),n._currentState=ut(n)==="/"?"PATH":"QUERY"):(n._currentToken=nt.host(t),n._currentState="DONE")}function fk(n){sc(n,3)==="://"&&ur(n,3);var t=fr(n,":","/","?");n._currentToken=nt.host(t);n._currentState=rt(n)?ut(n)===":"?"PORT":ut(n)==="/"?"PATH":"QUERY":"DONE"}function ek(n){ut(n)===":"&&ur(n);var t=fr(n,"/","?");n._currentToken=nt.port(t);n._currentState=rt(n)?ut(n)==="/"?"PATH":"QUERY":"DONE"}function ok(n){var t=fr(n,"?");n._currentToken=nt.path(t);n._currentState=rt(n)?"QUERY":"DONE"}function sk(n){ut(n)==="?"&&ur(n);var t=tk(n);n._currentToken=nt.query(t);n._currentState="DONE"}function hk(n){return n===void 0&&(n=20),{create:function(t,i){return new cc(t,i,n)}}}function lc(n,t,i){var r=t.request,u=t.status,e=t.headers.get("location"),f;return e&&(u===300||u===307||u===303&&r.method==="POST")&&(!n.maxRetries||i<n.maxRetries)?(f=rf.parse(r.url),f.setPath(e),r.url=f.toString(),u===303&&(r.method="GET"),n._nextPolicy.sendRequest(r).then(function(t){return lc(n,t,i+1)})):Promise.resolve(t)}function ck(n){return n===void 0&&(n=30),{create:function(t,i){return new ac(t,i,n)}}}function lk(n,t,i){var r,u;return i.status===409&&(r=ak(i.bodyAsText),r)?(u=vk(t.url),yk(n,u,r,t).catch(function(){return!1}).then(function(r){return r?(t.headers.set("x-ms-client-request-id",gi()),n._nextPolicy.sendRequest(t.clone())):i})):Promise.resolve(i)}function vc(n,t){t===void 0&&(t=!1);var i=n.clone();return t&&(i.url=n.url),i.headers.set("x-ms-client-request-id",gi()),i.headers.set("Content-Type","application/json; charset=utf-8"),i}function ak(n){var r,t,i;if(n){try{t=JSON.parse(n)}catch(u){}t&&t.error&&t.error.message&&t.error.code&&t.error.code==="MissingSubscriptionRegistration"&&(i=t.error.message.match(/.*'(.*)'/i),i&&(r=i.pop()))}return r}function vk(n){var i,t=n.match(/.*\/subscriptions\/[a-f0-9-]+\//ig);if(t&&t[0])i=t[0];else throw new Error("Unable to extract subscriptionId from the given url - "+n+".");return i}function yk(n,t,i,r){var f=t+"providers/"+i+"/register?api-version=2016-02-01",e=t+"providers/"+i+"?api-version=2016-02-01",u=vc(r);return u.method="POST",u.url=f,n._nextPolicy.sendRequest(u).then(function(t){if(t.status!==200)throw new Error("Autoregistration of "+i+" failed. Please try registering manually.");return yc(n,e,r)})}function yc(n,t,i){var r=vc(i);return r.url=t,r.method="GET",n._nextPolicy.sendRequest(r).then(function(r){var u=r.parsedBody;return r.parsedBody&&u.registrationState&&u.registrationState==="Registered"?!0:wt(n._retryTimeout*1e3).then(function(){return yc(n,t,i)})})}function pk(n){return{create:function(t,i){return new pc(t,i,n)}}}function wk(n,t,i,r){return{create:function(u,f){return new wc(u,f,n,t,i,r)}}}function bk(n,t){var i;if(t)i=t&&t.retryCount;else throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null.");return i<n.retryCount}function kk(n,t,i){t||(t={retryCount:0,retryInterval:0});i&&(t.error&&(i.innerError=t.error),t.error=i);t.retryCount++;var r=Math.pow(2,t.retryCount)-1,u=n.retryInterval*.8+Math.floor(Math.random()*(n.retryInterval*1.2-n.retryInterval*.8));return r*=u,t.retryInterval=Math.min(n.minRetryInterval+r,n.maxRetryInterval),t}function uf(n,t,i,r,u){return r=kk(n,r,u),u&&u.code&&bk(n,r)&&(u.code==="ETIMEDOUT"||u.code==="ESOCKETTIMEDOUT"||u.code==="ECONNREFUSED"||u.code==="ECONNRESET"||u.code==="ENOENT")?wt(r.retryInterval).then(function(){return n._nextPolicy.sendRequest(t.clone())}).then(function(i){return uf(n,t,i,r,u)}).catch(function(u){return uf(n,t,i,r,u)}):u!=undefined?(u=r.error,Promise.reject(u)):Promise.resolve(i)}function dk(){return process?process.env[k.HTTPS_PROXY]?process.env[k.HTTPS_PROXY]:process.env[k.HTTPS_PROXY.toLowerCase()]?process.env[k.HTTPS_PROXY.toLowerCase()]:process.env[k.HTTP_PROXY]?process.env[k.HTTP_PROXY]:process.env[k.HTTP_PROXY.toLowerCase()]?process.env[k.HTTP_PROXY.toLowerCase()]:undefined:undefined}function gk(n){if(!n&&(n=dk(),!n))return undefined;var t=rf.parse(n);return{host:t.getScheme()+"://"+t.getHost(),port:Number.parseInt(t.getPort()||"80")}}function nd(n){return{create:function(t,i){return new bc(t,i,n)}}}function td(){return{create:function(n,t){return new dc(n,t)}}}function id(n,t,i,r){var v,h,o,c,f,l,y;if(r.requestBody&&r.requestBody.mapper){t.body=fi(n,i,r.requestBody,r.serializer);var u=r.requestBody.mapper,p=u.required,s=u.xmlName,w=u.xmlElementName,e=u.serializedName,a=u.type.name;try{(t.body!=undefined||p)&&(v=g(r.requestBody),t.body=r.serializer.serialize(u,t.body,v),h=a===ri.Stream,r.isXML?a===ri.Sequence?t.body=rc(bp(t.body,w||s||e),{rootName:s||e}):h||(t.body=rc(t.body,{rootName:s||e})):h||(t.body=JSON.stringify(t.body)))}catch(b){throw new Error('Error "'+b.message+'" occurred in serializing the payload - '+JSON.stringify(e,undefined,"  ")+".");}}else if(r.formDataParameters&&r.formDataParameters.length>0)for(t.formData={},o=0,c=r.formDataParameters;o<c.length;o++)f=c[o],l=fi(n,i,f,r.serializer),l!=undefined&&(y=f.mapper.serializedName||g(f),t.formData[y]=r.serializer.serialize(f.mapper,l,g(f)))}function rd(n){return typeof n.create=="function"}function nl(n,t){var i;return typeof n=="string"?i=n:(i=t(),typeof n=="function"&&(i=n(i))),i}function ud(n,t){var i=[],r,u,f;return t.generateClientRequestIdHeader&&i.push(pb(t.clientRequestIdHeaderName)),n&&(rd(n)?i.push(n):i.push(pk(n))),r=nl(t.userAgentHeaderName,ec),u=nl(t.userAgent,nf),r&&u&&i.push(db({key:r,value:u})),i.push(hk()),i.push(ck(t.rpRegistrationRetryTimeout)),t.noRetryPolicy||(i.push(ob()),i.push(wk()),i.push(td())),i.push(gu(t.deserializationContentTypes)),f=t.proxySettings||gk(),f&&i.push(nd(f)),i}function fi(n,t,i,r){return tl(n,t,i.parameterPath,i.mapper,r)}function tl(n,t,i,r,u){var f,e,s,l,o;if(typeof i=="string"&&(i=[i]),Array.isArray(i))i.length>0&&(r.isConstant?f=r.defaultValue:(e=il(t,i),e.propertyFound||(e=il(n,i)),s=!1,e.propertyFound||(s=r.required||i[0]==="options"&&i.length===2),f=s?r.defaultValue:e.propertyValue),l=wu(i,r),u.serialize(r,f,l));else{r.required&&(f={});for(o in i){var h=r.type.modelProperties[o],a=i[o],c=tl(n,t,a,h,u),v=wu(a,h);u.serialize(h,c,v);c!==undefined&&(f||(f={}),f[o]=c)}}return f}function il(n,t){for(var r={propertyFound:!1},i=0,u;i<t.length;++i)if(u=t[i],n!=undefined&&u in n)n=n[u];else break;return i===t.length&&(r.propertyValue=n,r.propertyFound=!0),r}function rl(n,i){var r=n.parsedHeaders,h=i&&i.bodyMapper,e=function(t){return Object.defineProperty(t,"_response",{value:n})},f,o,y,s,c,a,l,v,u;if(h){if(f=h.type.name,f==="Stream")return e(t({},r,{blobBody:n.blobBody,readableStreamBody:n.readableStreamBody}));if(o=f==="Composite"&&h.type.modelProperties||{},y=Object.keys(o).some(function(n){return o[n].serializedName===""}),f==="Sequence"||y){for(s=(n.parsedBody||[]).slice(),c=0,a=Object.keys(o);c<a.length;c++)u=a[c],o[u].serializedName&&(s[u]=n.parsedBody[u]);if(r)for(l=0,v=Object.keys(r);l<v.length;l++)u=v[l],s[u]=r[u];return e(s),s}if(f==="Composite"||f==="Dictionary")return e(t({},r,n.parsedBody))}return h||n.request.method==="HEAD"?e(t({},r,{body:n.parsedBody})):e(t({},r,n.parsedBody))}function sd(n,t,i){var u=new RegExp("([?&]+"+t+"=)[^&]*","g"),r=!1;return n=n.replace(u,function(n,t){return r=!0,t+i}),r||(n+=n.includes("?")?"&"+t+"="+i:"?"+t+"="+i),n}function po(n){return new Promise(function(t,i){var r=[];n.on("error",function(n){return i(n)});n.on("data",function(n){return r.push(n)});n.on("end",function(){return t(Buffer.concat(r))})})}function wo(n){return f(this,void 0,void 0,function(){var t;return e(this,function(i){switch(i.label){case 0:return t=Uint8Array.bind,[4,new Response(n).arrayBuffer()];case 1:return[2,new(t.apply(Uint8Array,[void 0,i.sent()]))]}})})}function v(n){for(var t,i=[Infinity,Infinity,-Infinity,-Infinity],r=0,u=n;r<u.length;r++){t=u[r];switch(t.geometry.type){case"Point":fl(i,t.geometry.coordinates);break;case"MultiPoint":t.geometry.coordinates.forEach(function(n){return fl(i,n)});break;case"LineString":el(i,t.geometry.coordinates);break;case"MultiLineString":t.geometry.coordinates.forEach(function(n){return el(i,n)});break;case"Polygon":ol(i,t.geometry.coordinates);break;case"MultiPolygon":t.geometry.coordinates.forEach(function(n){return ol(i,n)});break;default:throw new Error("The geometry type "+t.geometry.type+" isn't supported");}}return i}function fl(n,t){n[0]=Math.min(n[0],t[0]);n[1]=Math.min(n[1],t[1]);n[2]=Math.max(n[2],t[0]);n[3]=Math.max(n[3],t[1])}function el(n,t){for(var i,r=0,u=t;r<u.length;r++)i=u[r],n[0]=Math.min(n[0],i[0]),n[1]=Math.min(n[1],i[1]),n[2]=Math.max(n[2],i[0]),n[3]=Math.max(n[3],i[1])}function ol(n,t){for(var o,u,e,i,r=0,f=t;r<f.length;r++)for(o=f[r],u=0,e=o;u<e.length;u++)i=e[u],n[0]=Math.min(n[0],i[0]),n[1]=Math.min(n[1],i[1]),n[2]=Math.max(n[2],i[0]),n[3]=Math.max(n[3],i[1])}function pd(n,t){var i=t.status,u=n.responses,r=u[i];return r||(i===200?r=u[201]||u[202]:201<=i&&i<=299&&(r={})),r}function wd(n,t){var i=30,r,u;return n.longRunningOperationRetryTimeout!=undefined?i=n.longRunningOperationRetryTimeout:(r=t.headers.get("retry-after"),r&&(u=parseInt(r),Number.isNaN(u)||(i=u))),i}function cr(n){var t;return n&&(n.provisioningState?t=n.provisioningState:n.properties&&(t=n.properties.provisioningState)),t}function ht(n){var i,t;try{n.parsedBody?i=n.parsedBody:n.bodyAsText&&n.bodyAsText.length>0&&(i=JSON.parse(n.bodyAsText))}catch(r){t=new l('Error "'+r+'" occurred in parsing the responseBody " +\n      "while creating the PollingState for Long Running Operation- "'+n.bodyAsText+'"');t.request=n.request;t.response=n;throw t;}return i}function vl(n,t){var i,r;t==undefined&&(t=ht(n));switch(n.status){case 202:i="InProgress";break;case 204:i="Succeeded";break;case 201:i=cr(t)||"InProgress";break;case 200:r=cr(t);i=r?r:vr(n)||ar(n)?"InProgress":"Succeeded";break;default:i="Failed"}return i}function pl(n){for(var u,i=!1,t=0,r=yl;t<r.length;t++)if(u=r[t],lr(n,u)){i=!0;break}return i}function lr(n,t){var i=n&&n.toLowerCase(),r=t&&t.toLowerCase();return i===r}function bd(n,t,i){var e=n.request.method,o=n.status,r,u,f,s;if(vr(n))r="AzureAsyncOperation";else if(ar(n))r="Location";else if(e==="PUT"||e==="PATCH")r="GetResource";else if(o!==201&&o!==202&&!pl(vl(n)))throw new Error("Can't determine long running operation polling strategy.");return r?(f=ht(n),s={pollStrategyType:r,options:i,initialResponse:n,mostRecentResponse:n,mostRecentRequest:n.request,azureAsyncOperationHeaderValue:vr(n),locationHeaderValue:ar(n),resource:f,state:vl(n,f)},u=wl(t,s)):u=undefined,u}function wl(n,t){var i;switch(t.pollStrategyType){case"AzureAsyncOperation":i=new kd(n,t);break;case"Location":i=new bl(n,t);break;case"GetResource":i=new dd(n,t);break;default:throw new Error('Unrecognized LRO poll strategy type: "'+t.pollStrategyType+'"');}return i}function ar(n){return n.headers.get("location")}function vr(n){return n.headers.get("azure-asyncoperation")}function dl(n,t,i){var r=bd(t,n,i);return new kl(r,t)}function gd(n,t){var i=wl(n,t);return new kl(i,t.initialResponse)}function gl(n){var t=n.request,i=t.operationResponseGetter,r=t.operationSpec;return rl(n,i&&r&&i(r,n))}function na(){var n=nf();return"ms-rest-azure-js/"+tg+" "+n}function rg(n){return n||(n={}),n.generateClientRequestIdHeader==undefined&&(n.generateClientRequestIdHeader=!0),n.userAgent||(n.userAgent=na()),n}for(var ah,yh,it,t,l,kh,bu,tr,ir,ic,p,du,uc,ec,oc,cc,ac,pc,wc,a,bc,kc,dc,gc,ff,ef,of,sf,hf,cf,er,lf,af,vf,yf,pf,wf,bf,kf,df,gf,ne,te,ie,re,ue,fe,ee,oe,se,he,ce,le,ae,ve,ye,pe,we,be,ke,de,ge,no,to,io,ro,uo,fo,eo,oo,so,ho,co,lo,ao,vo,yo,yl,bl,ot=function(){function n(n){if(this._headersMap={},n)for(var t in n)this.set(t,n[t])}return n.prototype.set=function(n,t){this._headersMap[ki(n)]={name:n,value:t.toString()}},n.prototype.get=function(n){var t=this._headersMap[ki(n)];return t?t.value:undefined},n.prototype.contains=function(n){return!!this._headersMap[ki(n)]},n.prototype.remove=function(n){var t=this.contains(n);return delete this._headersMap[ki(n)],t},n.prototype.rawHeaders=function(){var t={},i,n;for(i in this._headersMap)n=this._headersMap[i],t[n.name.toLowerCase()]=n.value;return t},n.prototype.headersArray=function(){var n=[];for(var t in this._headersMap)n.push(this._headersMap[t]);return n},n.prototype.headerNames=function(){for(var t=[],i=this.headersArray(),n=0;n<i.length;++n)t.push(i[n].name);return t},n.prototype.headerValues=function(){for(var t=[],i=this.headersArray(),n=0;n<i.length;++n)t.push(i[n].value);return t},n.prototype.toJson=function(){return this.rawHeaders()},n.prototype.toString=function(){return JSON.stringify(this.toJson())},n.prototype.clone=function(){return new n(this.rawHeaders())},n}(),ap=lp(function(n){var r=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),t,i;r?(t=new Uint8Array(16),n.exports=function(){return r(t),t}):(i=new Array(16),n.exports=function(){for(var n=0,t;n<16;n++)(n&3)==0&&(t=Math.random()*4294967296),i[n]=t>>>((n&3)<<3)&255;return i})}),lh=[],di=0;di<256;++di)lh[di]=(di+256).toString(16).substr(1);ah=vp;var pp=yp,k={msRestVersion:"1.8.13",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}},drt=typeof process!="undefined"&&!!process.version&&!!process.versions&&!!process.versions.node;yh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;it=function(){function n(n,t){n===void 0&&(n={});this.modelMappers=n;this.isXML=t}return n.prototype.validateConstraints=function(n,t,i){var r=function(n,r){throw new Error('"'+i+'" with value "'+t+'" should satisfy the constraint "'+n+'": '+r+".");};if(n.constraints&&t!=undefined){var u=n.constraints,f=u.ExclusiveMaximum,e=u.ExclusiveMinimum,o=u.InclusiveMaximum,s=u.InclusiveMinimum,h=u.MaxItems,c=u.MaxLength,l=u.MinItems,a=u.MinLength,v=u.MultipleOf,y=u.Pattern,p=u.UniqueItems;f!=undefined&&t>=f&&r("ExclusiveMaximum",f);e!=undefined&&t<=e&&r("ExclusiveMinimum",e);o!=undefined&&t>o&&r("InclusiveMaximum",o);s!=undefined&&t<s&&r("InclusiveMinimum",s);h!=undefined&&t.length>h&&r("MaxItems",h);c!=undefined&&t.length>c&&r("MaxLength",c);l!=undefined&&t.length<l&&r("MinItems",l);a!=undefined&&t.length<a&&r("MinLength",a);v!=undefined&&t%v!=0&&r("MultipleOf",v);y&&t.match(y)===null&&r("Pattern",y);p&&t.some(function(n,t,i){return i.indexOf(n)!==t})&&r("UniqueItems",p)}},n.prototype.serialize=function(n,t,i){var r={},u=n.type.name,f,e,o;if(i||(i=n.serializedName),u.match(/^Sequence$/ig)!==null&&(r=[]),t==undefined&&(n.defaultValue!=undefined||n.isConstant)&&(t=n.defaultValue),f=n.required,e=n.nullable,f&&e&&t===undefined)throw new Error(i+" cannot be undefined.");if(f&&!e&&t==undefined)throw new Error(i+" cannot be null or undefined.");if(!f&&e===!1&&t===null)throw new Error(i+" cannot be null.");return t==undefined?r=t:(this.validateConstraints(n,t,i),u.match(/^any$/ig)!==null?r=t:u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig)!==null?r=rw(u,i,t):u.match(/^Enum$/ig)!==null?(o=n,r=uw(i,o.type.allowedValues,t)):u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig)!==null?r=ow(u,t,i):u.match(/^ByteArray$/ig)!==null?r=fw(i,t):u.match(/^Base64Url$/ig)!==null?r=ew(i,t):u.match(/^Sequence$/ig)!==null?r=sw(this,n,t,i):u.match(/^Dictionary$/ig)!==null?r=hw(this,n,t,i):u.match(/^Composite$/ig)!==null&&(r=cw(this,n,t,i))),r},n.prototype.deserialize=function(n,t,i){if(t==undefined)return this.isXML&&n.type.name==="Sequence"&&!n.xmlIsWrapped&&(t=[]),t;var r,u=n.type.name;return i||(i=n.serializedName),u.match(/^Composite$/ig)!==null?r=aw(this,n,t,i):(this.isXML&&t.$!=undefined&&t._!=undefined&&(t=t._),u.match(/^Number$/ig)!==null?(r=parseFloat(t),isNaN(r)&&(r=t)):u.match(/^Boolean$/ig)!==null?r=t==="true"?!0:t==="false"?!1:t:u.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig)!==null?r=t:u.match(/^(Date|DateTime|DateTimeRfc1123)$/ig)!==null?r=new Date(t):u.match(/^UnixTime$/ig)!==null?r=iw(t):u.match(/^ByteArray$/ig)!==null?r=ch(t):u.match(/^Base64Url$/ig)!==null?r=nw(t):u.match(/^Sequence$/ig)!==null?r=yw(this,n,t,i):u.match(/^Dictionary$/ig)!==null&&(r=vw(this,n,t,i))),n.isConstant&&(r=n.defaultValue),r},n}();var ri=pw(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]),ui=function(){function n(n,t,i,r,u,f,e,o,s,h,c,l){this.streamResponseBody=f;this.url=n||"";this.method=t||"GET";this.headers=u instanceof ot?u:new ot(u);this.body=i;this.query=r;this.formData=undefined;this.withCredentials=e||!1;this.abortSignal=o;this.timeout=s||0;this.onUploadProgress=h;this.onDownloadProgress=c;this.proxySettings=l}return n.prototype.validateRequestProperties=function(){if(!this.method)throw new Error("WebResource.method is required.");if(!this.url)throw new Error("WebResource.url is required.");},n.prototype.prepare=function(n){var h,u,f,o,e,i,t,y,s,l,a;if(!n)throw new Error("options object is required");if(n.method==undefined||typeof n.method.valueOf()!="string")throw new Error("options.method must be a string.");if(n.url&&n.pathTemplate)throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.");if((n.pathTemplate==undefined||typeof n.pathTemplate.valueOf()!="string")&&(n.url==undefined||typeof n.url.valueOf()!="string"))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(n.url){if(typeof n.url!="string")throw new Error('options.url must be of type "string".');this.url=n.url}if(n.method&&(h=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"],h.indexOf(n.method.toUpperCase())===-1))throw new Error('The provided method "'+n.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(h));if(this.method=n.method.toUpperCase(),n.pathTemplate){if(u=n.pathTemplate,f=n.pathParameters,typeof u!="string")throw new Error('options.pathTemplate must be of type "string".');n.baseUrl||(n.baseUrl="https://management.azure.com");var v=n.baseUrl,r=v+(v.endsWith("/")?"":"/")+(u.startsWith("/")?u.slice(1):u),c=r.match(/({\w*\s*\w*})/ig);if(c&&c.length){if(!f)throw new Error("pathTemplate: "+u+" has been provided. Hence, options.pathParameters must also be provided.");c.forEach(function(n){var i=n.slice(1,-1),t=f[i];if(t===null||t===undefined||!(typeof t=="string"||typeof t=="object"))throw new Error("pathTemplate: "+u+" contains the path parameter "+i+(" however, it is not present in "+f+" - "+JSON.stringify(f,undefined,2)+".")+('The value of the path parameter can either be a "string" of the form { '+i+': "some sample value" } or ')+('it can be an "object" of the form { "'+i+'": { value: "some sample value", skipUrlEncoding: true } }.'));if(typeof t.valueOf()=="string"&&(r=r.replace(n,encodeURIComponent(t))),typeof t.valueOf()=="object"){if(!t.value)throw new Error("options.pathParameters["+i+'] is of type "object" but it does not contain a "value" property.');r=t.skipUrlEncoding?r.replace(n,t.value):r.replace(n,encodeURIComponent(t.value))}})}this.url=r}if(n.queryParameters){if(o=n.queryParameters,typeof o!="object")throw new Error('options.queryParameters must be of type object. It should be a JSON object of "query-parameter-name" as the key and the "query-parameter-value" as the value. The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.');this.url&&this.url.indexOf("?")===-1&&(this.url+="?");e=[];this.query={};for(i in o)if(t=o[i],t)if(typeof t=="string")e.push(i+"="+encodeURIComponent(t)),this.query[i]=encodeURIComponent(t);else if(typeof t=="object"){if(!t.value)throw new Error("options.queryParameters["+i+'] is of type "object" but it does not contain a "value" property.');t.skipUrlEncoding?(e.push(i+"="+t.value),this.query[i]=t.value):(e.push(i+"="+encodeURIComponent(t.value)),this.query[i]=encodeURIComponent(t.value))}this.url+=e.join("&")}if(n.headers)for(y=n.headers,s=0,l=Object.keys(n.headers);s<l.length;s++)a=l[s],this.headers.set(a,y[a]);return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),this.headers.get("x-ms-client-request-id")||n.disableClientRequestId||this.headers.set("x-ms-client-request-id",gi()),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=n.body,n.body!=undefined&&(n.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),this.headers.get("Content-Type")!=="application/octet-stream"&&this.headers.set("Content-Type","application/octet-stream")):(n.serializationMapper&&(this.body=new it(n.mappers).serialize(n.serializationMapper,n.body,"requestBody")),n.disableJsonStringifyOnBody||(this.body=JSON.stringify(n.body)))),this.abortSignal=n.abortSignal,this.onDownloadProgress=n.onDownloadProgress,this.onUploadProgress=n.onUploadProgress,this},n.prototype.clone=function(){var t=new n(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress);return this.formData&&(t.formData=this.formData),this.operationSpec&&(t.operationSpec=this.operationSpec),this.shouldDeserialize&&(t.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(t.operationResponseGetter=this.operationResponseGetter),t},n}(),yu=function(n,t){return yu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},yu(n,t)};t=function(){return t=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},t.apply(this,arguments)};l=function(n){function t(i,r,u,f,e,o){var s=n.call(this,i)||this;return s.code=r,s.statusCode=u,s.request=f,s.response=e,s.body=o,Object.setPrototypeOf(s,t.prototype),s}return s(t,n),t.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",t.REQUEST_ABORTED_ERROR="REQUEST_ABORTED_ERROR",t.PARSE_ERROR="PARSE_ERROR",t}(Error);kh=function(){function n(){}return n.prototype.sendRequest=function(n){var t=new XMLHttpRequest,r,s,u,c,f,i,e,l,o,a,v;if(n.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");if(r=n.abortSignal,r&&(s=function(){t.abort()},r.addEventListener("abort",s),t.addEventListener("readystatechange",function(){t.readyState===XMLHttpRequest.DONE&&r.removeEventListener("abort",s)})),dh(t.upload,n.onUploadProgress),dh(t,n.onDownloadProgress),n.formData){var y=n.formData,h=new FormData,p=function(n,t){t&&t.hasOwnProperty("value")&&t.hasOwnProperty("options")?h.append(n,t.value,t.options):h.append(n,t)};for(u=0,c=Object.keys(y);u<c.length;u++)if(f=c[u],i=y[f],Array.isArray(i))for(e=0;e<i.length;e++)p(f,i[e]);else p(f,i);n.body=h;n.formData=undefined;l=n.headers.get("Content-Type");l&&l.indexOf("multipart/form-data")!==-1&&n.headers.remove("Content-Type")}for(t.open(n.method,n.url),t.timeout=n.timeout,t.withCredentials=n.withCredentials,o=0,a=n.headers.headersArray();o<a.length;o++)v=a[o],t.setRequestHeader(v.name,v.value);return t.responseType=n.streamResponseBody?"blob":"text",t.send(n.body===undefined?null:n.body),n.streamResponseBody?new Promise(function(i,r){t.addEventListener("readystatechange",function(){if(t.readyState===XMLHttpRequest.HEADERS_RECEIVED){var r=new Promise(function(i,r){t.addEventListener("load",function(){i(t.response)});pu(n,t,r)});i({request:n,status:t.status,headers:gh(t),blobBody:r})}});pu(n,t,r)}):new Promise(function(i,r){t.addEventListener("load",function(){return i({request:n,status:t.status,headers:gh(t),bodyAsText:t.responseText})});pu(n,t,r)})},n}(),function(n){n[n.OFF=0]="OFF";n[n.ERROR=1]="ERROR";n[n.WARNING=2]="WARNING";n[n.INFO=3]="INFO"}(n.HttpPipelineLogLevel||(n.HttpPipelineLogLevel={}));bu=new DOMParser;tr="";try{tr=bu.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(grt){}ir=document.implementation.createDocument(null,null,null);ic=new XMLSerializer;p=function(){function n(n,t){this._nextPolicy=n;this._options=t}return n.prototype.shouldLog=function(n){return this._options.shouldLog(n)},n.prototype.log=function(n,t){this._options.log(n,t)},n}();du=function(){function t(n){this._logger=n}return t.prototype.shouldLog=function(t){return!!this._logger&&t!==n.HttpPipelineLogLevel.OFF&&t<=this._logger.minimumLogLevel},t.prototype.log=function(n,t){this._logger&&this.shouldLog(n)&&this._logger.log(n,t)},t}();var nb=["application/json","text/json"],tb=["application/xml","application/atom+xml"],ib=function(n){function t(t,i,r){var u=n.call(this,t,r)||this;return u.jsonContentTypes=i&&i.json||nb,u.xmlContentTypes=i&&i.xml||tb,u}return s(t,n),t.prototype.sendRequest=function(n){return f(this,void 0,void 0,function(){var t=this;return e(this,function(){return[2,this._nextPolicy.sendRequest(n).then(function(n){return fb(t.jsonContentTypes,t.xmlContentTypes,n)})]})})},t}(p);var sb=3e4,hb=3,cb=9e4,lb=3e3,ab=function(n){function t(t,i,r,u,f,e){function s(n){return typeof n=="number"}var o=n.call(this,t,i)||this;return o.retryCount=s(r)?r:hb,o.retryInterval=s(u)?u:sb,o.minRetryInterval=s(f)?f:lb,o.maxRetryInterval=s(e)?e:cb,o}return s(t,n),t.prototype.sendRequest=function(n){var t=this;return this._nextPolicy.sendRequest(n.clone()).then(function(i){return rr(t,n,i)}).catch(function(i){return rr(t,n,i.response,undefined,i)})},t}(p);uc=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u._requestIdHeaderName=r,u}return s(t,n),t.prototype.sendRequest=function(n){return n.headers.contains(this._requestIdHeaderName)||n.headers.set(this._requestIdHeaderName,gi()),this._nextPolicy.sendRequest(n)},t}(p);ec=fc;var gb=function(n){function t(t,i,r,u){var f=n.call(this,t,i)||this;return f._nextPolicy=t,f._options=i,f.headerKey=r,f.headerValue=u,f}return s(t,n),t.prototype.sendRequest=function(n){return this.addUserAgentHeader(n),this._nextPolicy.sendRequest(n)},t.prototype.addUserAgentHeader=function(n){n.headers||(n.headers=new ot);!n.headers.get(this.headerKey)&&this.headerValue&&n.headers.set(this.headerKey,this.headerValue)},t}(p),tf=function(){function n(){this._rawQuery={}}return n.prototype.any=function(){return Object.keys(this._rawQuery).length>0},n.prototype.set=function(n,t){if(n)if(t!=undefined){var i=Array.isArray(t)?t:t.toString();this._rawQuery[n]=i}else delete this._rawQuery[n]},n.prototype.get=function(n){return n?this._rawQuery[n]:undefined},n.prototype.toString=function(){var n="",t,i,u,r,f,e;for(t in this._rawQuery)if(n&&(n+="&"),i=this._rawQuery[t],Array.isArray(i)){for(u=[],r=0,f=i;r<f.length;r++)e=f[r],u.push(t+"="+e);n+=u.join("&")}else n+=t+"="+i;return n},n.parse=function(t){var o=new n,e,f;if(t){t.startsWith("?")&&(t=t.substring(1));var i="ParameterName",r="",u="";for(e=0;e<t.length;++e){f=t[e];switch(i){case"ParameterName":switch(f){case"=":i="ParameterValue";break;case"&":r="";u="";break;default:r+=f}break;case"ParameterValue":switch(f){case"=":r="";u="";i="Invalid";break;case"&":o.set(r,u);r="";u="";i="ParameterName";break;default:u+=f}break;case"Invalid":f==="&"&&(i="ParameterName");break;default:throw new Error("Unrecognized URLQuery parse state: "+i);}}i==="ParameterValue"&&o.set(r,u)}return o},n}(),rf=function(){function n(){}return n.prototype.setScheme=function(n){n?this.set(n,"SCHEME"):this._scheme=undefined},n.prototype.getScheme=function(){return this._scheme},n.prototype.setHost=function(n){n?this.set(n,"SCHEME_OR_HOST"):this._host=undefined},n.prototype.getHost=function(){return this._host},n.prototype.setPort=function(n){n==undefined||n===""?this._port=undefined:this.set(n.toString(),"PORT")},n.prototype.getPort=function(){return this._port},n.prototype.setPath=function(n){n?n.indexOf("://")!==-1?this.set(n,"SCHEME"):this.set(n,"PATH"):this._path=undefined},n.prototype.appendPath=function(n){if(n){var t=this.getPath();t&&(t.endsWith("/")||(t+="/"),n.startsWith("/")&&(n=n.substring(1)),n=t+n);this.set(n,"PATH")}},n.prototype.getPath=function(){return this._path},n.prototype.setQuery=function(n){this._query=n?tf.parse(n):undefined},n.prototype.setQueryParameter=function(n,t){n&&(this._query||(this._query=new tf),this._query.set(n,t))},n.prototype.getQueryParameterValue=function(n){return this._query?this._query.get(n):undefined},n.prototype.getQuery=function(){return this._query?this._query.toString():undefined},n.prototype.set=function(n,t){for(var u=new oc(n,t),i,r;u.next();)if(i=u.current(),i)switch(i.type){case"SCHEME":this._scheme=i.text||undefined;break;case"HOST":this._host=i.text||undefined;break;case"PORT":this._port=i.text||undefined;break;case"PATH":r=i.text||undefined;this._path&&this._path!=="/"&&r==="/"||(this._path=r);break;case"QUERY":this._query=tf.parse(i.text);break;default:throw new Error("Unrecognized URLTokenType: "+i.type);}},n.prototype.toString=function(){var n="";return this._scheme&&(n+=this._scheme+"://"),this._host&&(n+=this._host),this._port&&(n+=":"+this._port),this._path&&(this._path.startsWith("/")||(n+="/"),n+=this._path),this._query&&this._query.any()&&(n+="?"+this._query.toString()),n},n.prototype.replaceAll=function(n,t){n&&(this.setScheme(ii(this.getScheme(),n,t)),this.setHost(ii(this.getHost(),n,t)),this.setPort(ii(this.getPort(),n,t)),this.setPath(ii(this.getPath(),n,t)),this.setQuery(ii(this.getQuery(),n,t)))},n.parse=function(t){var i=new n;return i.set(t,"SCHEME_OR_HOST"),i},n}(),nt=function(){function n(n,t){this.text=n;this.type=t}return n.scheme=function(t){return new n(t,"SCHEME")},n.host=function(t){return new n(t,"HOST")},n.port=function(t){return new n(t,"PORT")},n.path=function(t){return new n(t,"PATH")},n.query=function(t){return new n(t,"QUERY")},n}();oc=function(){function n(n,t){this._text=n;this._textLength=n?n.length:0;this._currentState=t!=undefined?t:"SCHEME_OR_HOST";this._currentIndex=0}return n.prototype.current=function(){return this._currentToken},n.prototype.next=function(){if(rt(this))switch(this._currentState){case"SCHEME":rk(this);break;case"SCHEME_OR_HOST":uk(this);break;case"HOST":fk(this);break;case"PORT":ek(this);break;case"PATH":ok(this);break;case"QUERY":sk(this);break;default:throw new Error("Unrecognized URLTokenizerState: "+this._currentState);}else this._currentToken=undefined;return!!this._currentToken},n}();cc=function(n){function t(t,i,r){r===void 0&&(r=20);var u=n.call(this,t,i)||this;return u.maxRetries=r,u}return s(t,n),t.prototype.sendRequest=function(n){var t=this;return this._nextPolicy.sendRequest(n).then(function(n){return lc(t,n,0)})},t}(p);ac=function(n){function t(t,i,r){r===void 0&&(r=30);var u=n.call(this,t,i)||this;return u._retryTimeout=r,u}return s(t,n),t.prototype.sendRequest=function(n){var t=this;return this._nextPolicy.sendRequest(n.clone()).then(function(i){return lk(t,n,i)})},t}(p);pc=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u.authenticationProvider=r,u}return s(t,n),t.prototype.signRequest=function(n){return this.authenticationProvider.signRequest(n)},t.prototype.sendRequest=function(n){var t=this;return this.signRequest(n).then(function(n){return t._nextPolicy.sendRequest(n)})},t}(p);wc=function(n){function t(t,i,r,u,f,e){var o=n.call(this,t,i)||this;return o.DEFAULT_CLIENT_RETRY_INTERVAL=3e4,o.DEFAULT_CLIENT_RETRY_COUNT=3,o.DEFAULT_CLIENT_MAX_RETRY_INTERVAL=9e4,o.DEFAULT_CLIENT_MIN_RETRY_INTERVAL=3e3,o.retryCount=typeof r=="number"?r:o.DEFAULT_CLIENT_RETRY_COUNT,o.retryInterval=typeof u=="number"?u:o.DEFAULT_CLIENT_RETRY_INTERVAL,o.minRetryInterval=typeof f=="number"?f:o.DEFAULT_CLIENT_MIN_RETRY_INTERVAL,o.maxRetryInterval=typeof e=="number"?e:o.DEFAULT_CLIENT_MAX_RETRY_INTERVAL,o}return s(t,n),t.prototype.sendRequest=function(n){var t=this;return this._nextPolicy.sendRequest(n.clone()).then(function(i){return uf(t,n,i)})},t}(p),function(n){n.Csv=",";n.Ssv=" ";n.Tsv="\t";n.Pipes="|";n.Multi="Multi"}(a||(a={}));bc=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u.proxySettings=r,u}return s(t,n),t.prototype.sendRequest=function(n){return n.proxySettings||(n.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(n)},t}(p);kc=k.HttpConstants.StatusCodes;dc=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u._handleResponse=r||u._defaultResponseHandler,u}return s(t,n),t.prototype.sendRequest=function(n){return f(this,void 0,void 0,function(){var t=this;return e(this,function(){return[2,this._nextPolicy.sendRequest(n.clone()).then(function(i){return i.status!==kc.TooManyRequests?i:t._handleResponse(n,i)})]})})},t.prototype._defaultResponseHandler=function(n,i){return f(this,void 0,void 0,function(){var r,u,f=this;return e(this,function(){return(r=i.headers.get(k.HeaderConstants.RETRY_AFTER),r&&(u=t.parseRetryAfterHeader(r),u))?[2,wt(u).then(function(){return f._nextPolicy.sendRequest(n)})]:[2,i]})})},t.parseRetryAfterHeader=function(n){var i=Number(n);return Number.isNaN(i)?t.parseDateRetryAfterHeader(n):i*1e3},t.parseDateRetryAfterHeader=function(n){try{var i=Date.now(),r=Date.parse(n),t=r-i;return Number.isNaN(t)?undefined:t}catch(u){return undefined}},t}(p);gc=function(){function n(n,t){var i,r;if(t||(t={}),n&&!n.signRequest)throw new Error("credentials argument needs to implement signRequest method");this._withCredentials=t.withCredentials||!1;this._httpClient=t.httpClient||new kh;this._requestPolicyOptions=new du(t.httpPipelineLogger);Array.isArray(t.requestPolicyFactories)?i=t.requestPolicyFactories:(i=ud(n,t),t.requestPolicyFactories&&(r=t.requestPolicyFactories(i),r&&(i=r)));this._requestPolicyFactories=i}return n.prototype.sendRequest=function(n){var t,i,r;if(n===null||n===undefined||typeof n!="object")throw new Error("options cannot be null or undefined and it must be of type object.");try{n instanceof ui?(n.validateRequestProperties(),t=n):(t=new ui,t=t.prepare(n))}catch(u){return Promise.reject(u)}if(i=this._httpClient,this._requestPolicyFactories&&this._requestPolicyFactories.length>0)for(r=this._requestPolicyFactories.length-1;r>=0;--r)i=this._requestPolicyFactories[r].create(i,this._requestPolicyOptions);return i.sendRequest(t)},n.prototype.sendOperationRequest=function(n,t,i){var u,y,nt,v,p,tt,o,c,w,it,e,r,rt,l,ut,b,ft,s,h,et,k,ot,st,f,ht,d;typeof n.options=="function"&&(i=n.options,n.options=undefined);u=new ui;try{if(nt=t.baseUrl||this.baseUri,!nt)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");if(u.method=t.httpMethod,u.operationSpec=t,v=rf.parse(nt),t.path&&v.appendPath(t.path),t.urlParameters&&t.urlParameters.length>0)for(p=0,tt=t.urlParameters;p<tt.length;p++)o=tt[p],c=fi(this,n,o,t.serializer),c=t.serializer.serialize(o.mapper,c,g(o)),o.skipEncoding||(c=encodeURIComponent(c)),v.replaceAll("{"+(o.mapper.serializedName||g(o))+"}",c);if(t.queryParameters&&t.queryParameters.length>0)for(w=0,it=t.queryParameters;w<it.length;w++)if(e=it[w],r=fi(this,n,e,t.serializer),r!=undefined){if(r=t.serializer.serialize(e.mapper,r,g(e)),e.collectionFormat!=undefined)if(e.collectionFormat===a.Multi)if(r.length===0)r="";else for(l in r)rt=r[l],r[l]=rt==undefined?"":rt.toString();else r=r.join(e.collectionFormat);if(!e.skipEncoding)if(Array.isArray(r))for(l in r)r[l]=encodeURIComponent(r[l]);else r=encodeURIComponent(r);v.setQueryParameter(e.mapper.serializedName||g(e),r)}if(u.url=v.toString(),ut=t.contentType||this.requestContentType,ut&&u.headers.set("Content-Type",ut),t.headerParameters)for(b=0,ft=t.headerParameters;b<ft.length;b++)if(s=ft[b],h=fi(this,n,s,t.serializer),h!=undefined)if(h=t.serializer.serialize(s.mapper,h,g(s)),et=s.mapper.headerCollectionPrefix,et)for(k=0,ot=Object.keys(h);k<ot.length;k++)st=ot[k],u.headers.set(et+st,h[st]);else u.headers.set(s.mapper.serializedName||g(s),h);if(f=n.options,f){if(f.customHeaders)for(ht in f.customHeaders)u.headers.set(ht,f.customHeaders[ht]);f.abortSignal&&(u.abortSignal=f.abortSignal);f.timeout&&(u.timeout=f.timeout);f.onUploadProgress&&(u.onUploadProgress=f.onUploadProgress);f.onDownloadProgress&&(u.onDownloadProgress=f.onDownloadProgress)}u.withCredentials=this._withCredentials;id(this,u,n,t);u.streamResponseBody==undefined&&(u.streamResponseBody=nc(t));y=this.sendRequest(u).then(function(n){return rl(n,t.responses[n.status])})}catch(ct){y=Promise.reject(ct)}return d=i,d&&y.then(function(n){return d(null,n._response.parsedBody,n._response.request,n._response)}).catch(function(n){return d(n)}),y},n}(),function(n){n.Country="Country";n.CountrySubdivision="CountrySubdivision";n.CountrySecondarySubdivision="CountrySecondarySubdivision";n.CountryTertiarySubdivision="CountryTertiarySubdivision";n.Municipality="Municipality";n.MunicipalitySubdivision="MunicipalitySubdivision";n.Neighbourhood="Neighbourhood";n.PostalCodeArea="PostalCodeArea"}(ff||(ff={})),function(n){n.Zero="0";n.One="1";n.Two="2";n.Three="3";n.Four="4"}(ef||(ef={})),function(n){n.TURN="TURN";n.ROADCHANGE="ROAD_CHANGE";n.LOCATIONDEPARTURE="LOCATION_DEPARTURE";n.LOCATIONARRIVAL="LOCATION_ARRIVAL";n.DIRECTIONINFO="DIRECTION_INFO";n.LOCATIONWAYPOINT="LOCATION_WAYPOINT"}(of||(of={})),function(n){n.LEFT="LEFT";n.RIGHT="RIGHT"}(sf||(sf={})),function(n){n.ARRIVE="ARRIVE";n.ARRIVELEFT="ARRIVE_LEFT";n.ARRIVERIGHT="ARRIVE_RIGHT";n.DEPART="DEPART";n.STRAIGHT="STRAIGHT";n.KEEPRIGHT="KEEP_RIGHT";n.BEARRIGHT="BEAR_RIGHT";n.TURNRIGHT="TURN_RIGHT";n.SHARPRIGHT="SHARP_RIGHT";n.KEEPLEFT="KEEP_LEFT";n.BEARLEFT="BEAR_LEFT";n.TURNLEFT="TURN_LEFT";n.SHARPLEFT="SHARP_LEFT";n.MAKEUTURN="MAKE_UTURN";n.ENTERMOTORWAY="ENTER_MOTORWAY";n.ENTERFREEWAY="ENTER_FREEWAY";n.ENTERHIGHWAY="ENTER_HIGHWAY";n.TAKEEXIT="TAKE_EXIT";n.MOTORWAYEXITLEFT="MOTORWAY_EXIT_LEFT";n.MOTORWAYEXITRIGHT="MOTORWAY_EXIT_RIGHT";n.TAKEFERRY="TAKE_FERRY";n.ROUNDABOUTCROSS="ROUNDABOUT_CROSS";n.ROUNDABOUTRIGHT="ROUNDABOUT_RIGHT";n.ROUNDABOUTLEFT="ROUNDABOUT_LEFT";n.ROUNDABOUTBACK="ROUNDABOUT_BACK";n.TRYMAKEUTURN="TRY_MAKE_UTURN";n.FOLLOW="FOLLOW";n.SWITCHPARALLELROAD="SWITCH_PARALLEL_ROAD";n.SWITCHMAINROAD="SWITCH_MAIN_ROAD";n.ENTRANCERAMP="ENTRANCE_RAMP";n.WAYPOINTLEFT="WAYPOINT_LEFT";n.WAYPOINTRIGHT="WAYPOINT_RIGHT";n.WAYPOINTREACHED="WAYPOINT_REACHED"}(hf||(hf={})),function(n){n.Bus="Bus";n.CableCar="CableCar";n.Ferry="Ferry";n.Funicular="Funicular";n.Gondola="Gondola";n.Rail="Rail";n.Tram="Tram";n.Subway="Subway"}(cf||(cf={})),function(n){n.Walk="Walk";n.Bicycle="Bicycle";n.Tram="Tram";n.Subway="Subway";n.Rail="Rail";n.Bus="Bus";n.Ferry="Ferry";n.Cable="Cable";n.Gondola="Gondola";n.Funicular="Funicular";n.PathWayWalk="PathWayWalk";n.Wait="Wait";n.WaitOnVehicle="WaitOnVehicle"}(er||(er={})),function(n){n.Depart="depart";n.HardLeft="hardLeft";n.Left="left";n.SlightlyLeft="slightlyLeft";n.Continue="continue";n.SlightlyRight="slightlyRight";n.Right="right";n.HardRight="hardRight";n.CircleClockwise="circleClockwise";n.CircleCounterclockwise="circleCounterclockwise";n.Elevator="elevator";n.UturnLeft="uturnLeft";n.UturnRight="uturnRight"}(lf||(lf={})),function(n){n.North="north";n.Northeast="northeast";n.East="east";n.Southeast="southeast";n.South="south";n.Southwest="southwest";n.West="west";n.Northwest="northwest"}(af||(af={})),function(n){n.ScheduledTime="scheduledTime";n.RealTime="realTime"}(vf||(vf={})),function(n){n.Addr="Addr";n.Geo="Geo";n.PAD="PAD";n.POI="POI";n.Str="Str";n.Xstr="Xstr"}(yf||(yf={})),function(n){n.StandardHouseholdCountrySpecific="StandardHouseholdCountrySpecific";n.IEC62196Type1="IEC62196Type1";n.IEC62196Type1CCS="IEC62196Type1CCS";n.IEC62196Type2CableAttached="IEC62196Type2CableAttached";n.IEC62196Type2Outlet="IEC62196Type2Outlet";n.IEC62196Type2CCS="IEC62196Type2CCS";n.IEC62196Type3="IEC62196Type3";n.Chademo="Chademo";n.IEC60309AC1PhaseBlue="IEC60309AC1PhaseBlue";n.IEC60309DCWhite="IEC60309DCWhite";n.Tesla="Tesla"}(pf||(pf={})),function(n){n.NextSevenDays="nextSevenDays"}(wf||(wf={})),function(n){n.USHazmatClass1="USHazmatClass1";n.USHazmatClass2="USHazmatClass2";n.USHazmatClass3="USHazmatClass3";n.USHazmatClass4="USHazmatClass4";n.USHazmatClass5="USHazmatClass5";n.USHazmatClass6="USHazmatClass6";n.USHazmatClass7="USHazmatClass7";n.USHazmatClass8="USHazmatClass8";n.USHazmatClass9="USHazmatClass9";n.OtherHazmatExplosive="otherHazmatExplosive";n.OtherHazmatGeneral="otherHazmatGeneral";n.OtherHazmatHarmfulToWater="otherHazmatHarmfulToWater"}(bf||(bf={})),function(n){n.Fastest="fastest";n.Shortest="shortest";n.Eco="eco";n.Thrilling="thrilling"}(kf||(kf={})),function(n){n.Low="low";n.Normal="normal";n.High="high"}(df||(df={})),function(n){n.Low="low";n.Normal="normal";n.High="high"}(gf||(gf={})),function(n){n.Car="car";n.Truck="truck";n.Taxi="taxi";n.Bus="bus";n.Van="van";n.Motorcycle="motorcycle";n.Bicycle="bicycle";n.Pedestrian="pedestrian"}(ne||(ne={})),function(n){n.TollRoads="tollRoads";n.Motorways="motorways";n.Ferries="ferries";n.UnpavedRoads="unpavedRoads";n.Carpools="carpools";n.AlreadyUsedRoads="alreadyUsedRoads";n.BorderCrossings="borderCrossings"}(te||(te={})),function(n){n.Combustion="combustion";n.Electric="electric"}(ie||(ie={})),function(n){n.CarTrain="carTrain";n.Country="country";n.Ferry="ferry";n.Motorway="motorway";n.Pedestrian="pedestrian";n.TollRoad="tollRoad";n.TollVignette="tollVignette";n.Traffic="traffic";n.TravelMode="travelMode";n.Tunnel="tunnel"}(re||(re={})),function(n){n.Polyline="polyline";n.SummaryOnly="summaryOnly";n.None="none"}(ue||(ue={})),function(n){n.None="none";n.All="all"}(fe||(fe={})),function(n){n.AnyRoute="anyRoute";n.BetterRoute="betterRoute"}(ee||(ee={})),function(n){n.Coded="coded";n.Text="text";n.Tagged="tagged"}(oe||(oe={})),function(n){n.None="none";n.ZoneInfo="zoneInfo";n.Transitions="transitions";n.All="all"}(se||(se={})),function(n){n.Png="png";n.Pbf="pbf"}(he||(he={})),function(n){n.All="All";n.EnterAndExit="EnterAndExit"}(ce||(ce={})),function(n){n.Basic="basic";n.Hybrid="hybrid";n.Labels="labels"}(le||(le={})),function(n){n.Basic="basic";n.Hybrid="hybrid";n.Labels="labels";n.Terra="terra"}(ae||(ae={})),function(n){n.Main="main";n.ShadedRelief="shaded_relief"}(ve||(ve={})),function(n){n.Position="position";n.CountryCode="countryCode"}(ye||(ye={})),function(n){n.Agencies="agencies";n.Alerts="alerts";n.AlertDetails="alertDetails";n.TransitTypes="transitTypes"}(pe||(pe={})),function(n){n.Stop="stop";n.DocklessBike="docklessBike";n.DocklessElectricBike="docklessElectricBike";n.DocklessElectricScooter="docklessElectricScooter";n.DocklessScooter="docklessScooter";n.DocklessMoped="docklessMoped";n.CarShare="carShare";n.DocklessVehicle="docklessVehicle";n.BikeDock="bikeDock"}(we||(we={})),function(n){n.Alerts="alerts";n.AlertDetails="alertDetails";n.Lines="lines";n.Stops="stops";n.Schedule="schedule";n.Patterns="patterns"}(be||(be={})),function(n){n.StopId="stopId";n.StopKey="stopKey"}(ke||(ke={})),function(n){n.Alerts="alerts";n.AlertDetails="alertDetails";n.Lines="lines";n.LineGroups="lineGroups"}(de||(de={})),function(n){n.Position="position";n.StopId="stopId";n.StopKey="stopKey"}(ge||(ge={})),function(n){n.Position="position";n.StopId="stopId";n.StopKey="stopKey"}(no||(no={})),function(n){n.Walk="walk";n.Bike="bike";n.PublicTransit="publicTransit"}(to||(to={})),function(n){n.Bus="bus";n.CableCar="cableCar";n.Ferry="ferry";n.Funicular="funicular";n.Gondola="gondola";n.Rail="rail";n.Tram="tram";n.Subway="subway"}(io||(io={})),function(n){n.AgencyId="agencyId";n.AgencyKey="agencyKey";n.AgencyName="agencyName"}(ro||(ro={})),function(n){n.Arrival="arrival";n.Departure="departure";n.Last="last"}(uo||(uo={})),function(n){n.Optimal="optimal";n.LeastWalk="leastWalk";n.LeastTransfers="leastTransfers"}(fo||(fo={})),function(n){n.PrivateBike="privateBike";n.DockedBike="dockedBike"}(eo||(eo={})),function(n){n.Geometry="geometry";n.Schedule="schedule"}(oo||(oo={})),function(n){n.Stops="stops";n.Line="line";n.LineAndStop="lineAndStop";n.Position="position"}(so||(so={})),function(n){n.StopId="stopId";n.StopKey="stopKey"}(ho||(ho={})),function(n){n.Main="main";n.Minor="minor"}(co||(co={})),function(n){n.Main="main"}(lo||(lo={})),function(n){n.Yes="yes";n.No="no"}(ao||(ao={})),function(n){n.Yes="yes";n.No="no"}(vo||(vo={})),function(n){n.Yes="yes";n.No="no"}(yo||(yo={}));var fd=Object.freeze({get EntityType(){return ff},get MagnitudeOfDelay(){return ef},get GuidanceInstructionType(){return of},get DrivingSide(){return sf},get GuidanceManeuver(){return hf},get TransitType(){return cf},get LegType(){return er},get RelativeDirection(){return lf},get AbsoluteDirection(){return af},get ScheduleType(){return vf},get SearchIndexSet(){return yf},get ConnectorSet(){return pf},get OpeningHours(){return wf},get VehicleLoadType(){return bf},get RouteType(){return kf},get Windingness(){return df},get Hilliness(){return gf},get TravelMode(){return ne},get Avoid(){return te},get VehicleEngineType(){return ie},get SectionType(){return re},get RouteRepresentation(){return ue},get ComputeTravelTimeFor(){return fe},get AlternativeRouteType(){return ee},get RouteInstructionsType(){return oe},get TimezoneOptions(){return se},get TileFormat(){return he},get GeofenceMode(){return ce},get StaticMapLayer(){return le},get MapTileLayer(){return ae},get MapTileStyle(){return ve},get MetroAreaQueryType(){return ye},get MetroAreaDetailType(){return pe},get ObjectType(){return we},get TransitLineDetailType(){return be},get TransitStopQueryType(){return ke},get TransitStopDetailType(){return de},get OriginType(){return ge},get DestinationType(){return no},get ModeType(){return to},get TransitTypeFilter(){return io},get AgencyType(){return ro},get TimeType(){return uo},get TransitRouteType(){return fo},get BikeType(){return eo},get TransitItineraryDetailType(){return oo},get RealTimeArrivalsQueryType(){return so},get StopQueryType(){return ho},get Type(){return co},get Style(){return lo},get Text(){return ao},get Text1(){return vo},get Text2(){return yo}}),ed=function(){function n(n,t,i,r){var u=this;t===void 0&&(t=0);this._aborted=!1;this.children=[];this.abortEventListeners=[];this.parent=n;this.key=i;this.value=r;t>0&&(this.timer=setTimeout(function(){u.abort.call(u)},t),this.timer&&typeof this.timer.unref=="function"&&this.timer.unref())}return Object.defineProperty(n.prototype,"aborted",{get:function(){return this._aborted},enumerable:!0,configurable:!0}),Object.defineProperty(n,"none",{get:function(){return new n(undefined,0)},enumerable:!0,configurable:!0}),n.timeout=function(t){return new n(undefined,t)},n.prototype.withTimeout=function(t){var i=new n(this,t);return this.children.push(i),i},n.prototype.withValue=function(t,i){var r=new n(this,0,t,i);return this.children.push(r),r},n.prototype.getValue=function(n){for(var t=this;t;t=t.parent)if(t.key===n)return t.value;return undefined},n.prototype.abort=function(){var n=this;this.aborted||(this.cancelTimer(),this.onabort&&this.onabort.call(this),this.abortEventListeners.forEach(function(t){t.call(n,undefined)}),this.children.forEach(function(n){return n.cancelByParent()}),this._aborted=!0)},n.prototype.addEventListener=function(n,t){this.abortEventListeners.push(t)},n.prototype.removeEventListener=function(n,t){var i=this.abortEventListeners.indexOf(t);i>-1&&this.abortEventListeners.splice(i,1)},n.prototype.cancelByParent=function(){this.abort()},n.prototype.cancelTimer=function(){this.timer&&clearTimeout(this.timer)},n}(),or=function(){function n(){}return n.prototype.create=function(){throw new Error("Method should be implemented in children classes.");},n}(),sr=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return s(t,n),t.prototype.sendRequest=function(n){return f(this,void 0,void 0,function(){var t,i;return e(this,function(r){switch(r.label){case 0:return i=(t=this._nextPolicy).sendRequest,[4,this.signRequest(n)];case 1:return[2,i.apply(t,[r.sent()])]}})})},t.prototype.signRequest=function(n){return n},t}(p),ul=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u.map=r,u}return s(t,n),t.prototype.signRequest=function(n){return f(this,void 0,void 0,function(){var t,i,r,u;return e(this,function(f){switch(f.label){case 0:return[4,this.map.authentication.initialize()];case 1:if(f.sent(),t=this.map.authentication.signRequest({url:n.url}),t.headers)for(i=0,r=Object.keys(t.headers);i<r.length;i++)u=r[i],n.headers.set(u,t.headers[u]);return n.url=t.url,[2,n]}})})},t}(sr),od=function(n){function t(t){var i=n.call(this)||this;return i.map=t,i}return s(t,n),t.prototype.create=function(n,t){return new ul(n,t,this.map)},t}(or);var sl=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u.subscriptionKey=r,u}return s(t,n),t.prototype.signRequest=function(n){return n.url=sd(n.url,"subscription-key",this.subscriptionKey),n},t}(sr),hd=function(n){function t(t){var i=n.call(this)||this;return i.subscriptionKey=t,i}return s(t,n),t.prototype.create=function(n,t){return new sl(n,t,this.subscriptionKey)},t}(or),cd="1.0",hr={HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416},st={AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",DATE:"date",MAP_AGENT:"Map-Agent",MS_AM_REQUEST_ORIGIN:"Ms-Am-Request-Origin",SERVICE_MODULE:"ServiceModule",X_MS_CLIENT_ID:"x-ms-client-id"},hl=function(n){function t(t,i,r){var u=n.call(this,t,i)||this;return u.tokenCredential=r,u.authorizationScheme=st.AUTHORIZATION_SCHEME,u}return s(t,n),t.prototype.signRequest=function(n){return n.headers||(n.headers=new ot),n.headers.set(st.AUTHORIZATION,this.authorizationScheme+" "+this.tokenCredential.token),n.headers.set(st.X_MS_CLIENT_ID,this.tokenCredential.clientId),n},t}(sr),ld=function(n){function t(t,i){var r=n.call(this)||this;return r.clientId=t,r.token=i,r}return s(t,n),t.prototype.create=function(n,t){return new hl(n,t,this)},t}(or),cl=function(){function n(n,t){t===void 0&&(t={});this.factories=n;this.options=t}return n.prototype.toServiceClientOptions=function(){return{httpClient:this.options.HTTPClient,httpPipelineLogger:this.options.logger,requestPolicyFactories:this.factories}},n}();(function(n){n.EXPONENTIAL="exponential";n.FIXED="fixed"})(n.RetryPolicyType||(n.RetryPolicyType={}));var bt={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:n.RetryPolicyType.EXPONENTIAL},ad=function(t){function i(n,i,r){r===void 0&&(r=bt);var u=t.call(this,n,i)||this;return u.retryOptions={retryPolicyType:typeof r.retryPolicyType=="string"?r.retryPolicyType:bt.retryPolicyType,maxTries:typeof r.maxTries=="number"&&r.maxTries>=1?Math.floor(r.maxTries):bt.maxTries,retryDelayInMs:typeof r.retryDelayInMs=="number"&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,typeof r.maxRetryDelayInMs=="number"?r.maxRetryDelayInMs:bt.maxRetryDelayInMs):bt.retryDelayInMs,maxRetryDelayInMs:typeof r.maxRetryDelayInMs=="number"&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:bt.maxRetryDelayInMs},u}return s(i,t),i.prototype.sendRequest=function(n){return f(this,void 0,void 0,function(){return e(this,function(){return[2,this.attemptSendRequest(n,1)]})})},i.prototype.attemptSendRequest=function(t,i){return f(this,void 0,void 0,function(){var f,u,r;return e(this,function(e){switch(e.label){case 0:f=t.clone();e.label=1;case 1:return e.trys.push([1,3,,4]),this.logf(n.HttpPipelineLogLevel.INFO,"RetryPolicy: =====> Try="+i),[4,this._nextPolicy.sendRequest(f)];case 2:return(u=e.sent(),!this.shouldRetry(i,u))?[2,u]:[3,4];case 3:if(r=e.sent(),this.logf(n.HttpPipelineLogLevel.ERROR,"RetryPolicy: Caught error, message: "+r.message+", code: "+r.code),!this.shouldRetry(i,u,r))throw r;return[3,4];case 4:return[4,this.delay(i)];case 5:return e.sent(),[4,this.attemptSendRequest(t,++i)];case 6:return[2,e.sent()]}})})},i.prototype.shouldRetry=function(t,i,r){var s,f,o,u,e;if(t>=this.retryOptions.maxTries)return this.logf(n.HttpPipelineLogLevel.INFO,"RetryPolicy: Attempt(s) "+t+" >= maxTries "+this.retryOptions.maxTries+", no further try."),!1;if(s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","REQUEST_SEND_ERROR"],r)for(f=0,o=s;f<o.length;f++)if(u=o[f],r.name.toUpperCase().includes(u)||r.message.toUpperCase().includes(u)||r.code&&r.code.toUpperCase().includes(u))return this.logf(n.HttpPipelineLogLevel.INFO,"RetryPolicy: Network error "+u+" found, will retry."),!0;return(i||r)&&(e=i?i.status:r?r.statusCode:0,e===503||e===500)?(this.logf(n.HttpPipelineLogLevel.INFO,"RetryPolicy: Will retry for status code "+e+"."),!0):!1},i.prototype.logf=function(){},i.prototype.delay=function(t){return f(this,void 0,void 0,function(){var i;return e(this,function(){i=0;switch(this.retryOptions.retryPolicyType){case n.RetryPolicyType.EXPONENTIAL:i=Math.min((Math.pow(2,t)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case n.RetryPolicyType.FIXED:i=this.retryOptions.retryDelayInMs}return this.logf(n.HttpPipelineLogLevel.INFO,"RetryPolicy: Delay for "+i+"ms"),[2,wt(i)]})})},i}(p),ll=function(){function n(n){this.retryOptions=n}return n.prototype.create=function(n,t){return new ad(n,t,this.retryOptions)},n}(),vd={logWarningIfTryOverThreshold:3e3},yd=function(t){function i(n,i,r){r===void 0&&(r=vd);var u=t.call(this,n,i)||this;return u.tryCount=0,u.operationStartTime=new Date,u.requestStartTime=new Date,u.loggingOptions=r,u}return s(i,t),i.prototype.sendRequest=function(t){return f(this,void 0,void 0,function(){var h,i,f,o,c,u,r,l,a,s;return e(this,function(e){switch(e.label){case 0:this.tryCount++;this.requestStartTime=new Date;this.tryCount===1&&(this.operationStartTime=this.requestStartTime);h=t.url;this.log(n.HttpPipelineLogLevel.INFO,"'"+h+"'==> OUTGOING REQUEST (Try number="+this.tryCount+").");e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._nextPolicy.sendRequest(t)];case 2:return i=e.sent(),f=new Date,o=f.getTime()-this.requestStartTime.getTime(),c=f.getTime()-this.operationStartTime.getTime(),u=n.HttpPipelineLogLevel.INFO,r="",this.shouldLog(n.HttpPipelineLogLevel.INFO)&&(r="Successfully Received Response. "),o>=this.loggingOptions.logWarningIfTryOverThreshold&&this.shouldLog(n.HttpPipelineLogLevel.WARNING)&&(u=n.HttpPipelineLogLevel.WARNING,r="SLOW OPERATION. Duration > "+this.loggingOptions.logWarningIfTryOverThreshold+" ms. "),(i.status>=400&&i.status<=499&&i.status!==hr.HTTP_NOT_FOUND&&i.status!==hr.HTTP_CONFLICT&&i.status!==hr.HTTP_PRECON_FAILED&&i.status!==hr.HTTP_RANGE_NOT_SATISFIABLE||i.status>=500&&i.status<=509)&&(l="REQUEST ERROR: HTTP request failed with status code: "+i.status+". ",r=l,u=n.HttpPipelineLogLevel.ERROR),a="Request try:"+this.tryCount+", status:"+i.status+" request duration:"+o+" ms, operation duration:"+c+" ms\n",this.log(u,r+a),[2,i];case 3:s=e.sent();this.log(n.HttpPipelineLogLevel.ERROR,"Unexpected failure attempting to make request. Error message: "+s.message);throw s;case 4:return[2]}})})},i}(p),al=function(){function n(n){this.loggingOptions=n}return n.prototype.create=function(n,t){return new yd(n,t,this.loggingOptions)},n}(),bo=function(){function n(n,t){this._azureServiceClient=n;this._pollState=t}return n.prototype.getOperationStatus=function(){return this._pollState.state},n.prototype.isFinished=function(){return pl(this._pollState.state)},n.prototype.pollUntilFinished=function(){return f(this,void 0,void 0,function(){var n;return e(this,function(t){switch(t.label){case 0:return!this.isFinished()?(n=wd(this._azureServiceClient,this._pollState.mostRecentResponse),[4,wt(n*1e3)]):[3,3];case 1:return t.sent(),[4,this.sendPollRequest()];case 2:return t.sent(),[3,0];case 3:return[2,this.isFinalStatusAcceptable()]}})})},n.prototype.shouldDoFinalGetResourceRequest=function(){var n=this._pollState.initialResponse.request.method;return!this._pollState.resource&&(n==="PUT"||n==="PATCH"||n==="POST")},n.prototype.getMostRecentResponse=function(){return this._pollState.mostRecentResponse},n.prototype.getOperationResponse=function(){return f(this,void 0,void 0,function(){var r,n,i;return e(this,function(u){switch(u.label){case 0:return this.shouldDoFinalGetResourceRequest()?[4,this.doFinalGetResourceRequest()]:[3,2];case 1:u.sent();u.label=2;case 2:return r=this._pollState.mostRecentResponse,n=t({},r,{headers:r.headers.clone()}),i=this._pollState.resource,i?typeof i.valueOf()=="string"?(n.bodyAsText=i,n.parsedBody=JSON.parse(i)):(n.bodyAsText=JSON.stringify(i),n.parsedBody=i):(n.bodyAsText=r.bodyAsText,n.parsedBody=r.parsedBody),[2,n]}})})},n.prototype.getRestError=function(){var n=new l(""),t;return n.request=pt(this._pollState.mostRecentRequest),n.response=this._pollState.mostRecentResponse,n.message='Long running operation failed with status: "'+this._pollState.state+'".',n.body=this._pollState.resource,n.body&&(t=n.body.error,t&&(t.message&&(n.message='Long running operation failed with error: "'+t.message+'".'),t.code&&(n.code=t.code))),n},n.prototype.updateState=function(n,t){var i=this;return this.updateOperationStatus(n,t).then(function(n){i._pollState.state=cr(n.parsedBody)||"Succeeded";i._pollState.mostRecentResponse=n;i._pollState.mostRecentRequest=n.request;i._pollState.resource=ht(n)}).catch(function(n){var t;if(n.response&&n.response.status){if(t=n.response.status,i._pollState.initialResponse.request.method!=="DELETE"||t<400||499<t)throw n;}else throw n;})},n.prototype.updateOperationStatus=function(n,t){var h=n.replace(" ","%20"),i=new ui(h,"GET"),s=this._pollState,r,f,u,e,o;if(i.operationSpec=s.mostRecentRequest.operationSpec,i.shouldDeserialize=t,i.operationResponseGetter=pd,r=s.options,r&&r.customHeaders)for(f=r.customHeaders,u=0,e=Object.keys(f);u<e.length;u++)o=e[u],i.headers.set(o,f[o]);return this._azureServiceClient.sendRequest(i)},n.prototype.getPollState=function(){return this._pollState},n}();yl=["Succeeded","Failed","Canceled","Cancelled"];bl=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return s(t,n),t.prototype.locationStrategyShouldDeserialize=function(n){var r=!1,u=this._pollState.initialResponse,t=u.request.method,i=n.status;return(i===200||i===201&&(t==="PUT"||t==="PATCH")||i===204&&(t==="DELETE"||t==="POST"))&&(r=!0),r},t.prototype.sendPollRequest=function(){var n=this._pollState;return this.updateOperationStatus(n.locationHeaderValue,this.locationStrategyShouldDeserialize.bind(this)).then(function(t){var o=ar(t),u,e,h;o&&(n.locationHeaderValue=o);n.mostRecentResponse=t;n.mostRecentRequest=t.request;var s=n.initialResponse,r=s.request.method,f=s.status,i=t.status;if(i===202)n.state="InProgress";else if(i===200||i===201&&(r==="PUT"||r==="PATCH")||i===204&&(r==="DELETE"||r==="POST"))n.state="Succeeded",n.resource=ht(t);else if(i===404&&r==="POST"&&(f===200||f===201||f===202))n.state="Failed",n.resource=ht(t);else if(400<=i&&i<=499){u=t.bodyAsText;e=u;try{h=JSON.parse(u);e=h.message}catch(c){}throw new l(e,undefined,i,pt(t.request),t,u);}else throw new Error("The response with status code "+i+' from polling for long running operation url "'+n.locationHeaderValue+'" is not valid.');})},t.prototype.isFinalStatusAcceptable=function(){var n=this._pollState,i=n.initialResponse,t=i.status;return lr(n.state,"Succeeded")||i.request.method==="POST"&&n.mostRecentResponse.status===404&&(t===200||t===201||t===202)},t.prototype.shouldDoFinalGetResourceRequest=function(){var i=this._pollState,r=i.initialResponse,u=r.request.method,t=r.status;return u==="POST"&&i.mostRecentResponse.status===404&&(t===200||t===201||t===202)?!1:n.prototype.shouldDoFinalGetResourceRequest.call(this)||u==="POST"&&t===201},t.prototype.doFinalGetResourceRequest=function(){var t=this._pollState,i=t.initialResponse,r,n=i.status,u=i.request;return r=u.method==="POST"&&(n===200||n===201||n===202)?t.locationHeaderValue:u.url,this.updateState(r,!0)},t}(bo);var kd=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return s(t,n),t.prototype.sendPollRequest=function(){var n=this._pollState;return this.updateOperationStatus(n.azureAsyncOperationHeaderValue,!1).then(function(t){var i=t.status,u=t.parsedBody,r,f;if(i!==200&&i!==201&&i!==202&&i!==204){r=new l("Invalid status code ("+i+') with response body "'+t.bodyAsText+'" occurred when polling for operation status.');r.statusCode=i;r.request=pt(t.request);r.response=t;r.body=u;throw r;}if(u){if(!u.status)throw new Error('The response "'+t.bodyAsText+'" from long running operation does not contain the status property.');}else throw new Error("The response from long running operation does not contain a body.");f=vr(t);f&&(n.azureAsyncOperationHeaderValue=f);n.state=u.status;n.mostRecentResponse=t;n.mostRecentRequest=t.request;n.resource=ht(t)})},t.prototype.shouldDoFinalGetResourceRequest=function(){var r=this._pollState,u=r.initialResponse,t=u.request.method,i=!1,n;return t==="PUT"||t==="PATCH"?i=!0:r.locationHeaderValue&&(n=u.status,t==="POST"?i=n===200||n===201:t==="DELETE"&&(i=n===200||n===202)),i},t.prototype.doFinalGetResourceRequest=function(){var u=this._pollState,t=u.locationHeaderValue,f=u.initialResponse,e=f.request,i=e.url,r,n;return t&&(r=e.method,n=f.status,r==="POST"&&(n===200||n===201||n===202)?i=t:r==="DELETE"&&(n===200||n===202)&&(i=t)),this.updateState(i,!0)},t.prototype.isFinalStatusAcceptable=function(){var n=this._pollState,t=n.initialResponse,i=t.status;return lr(n.state,"Succeeded")||t.request.method==="POST"&&(i===200||i===201)},t}(bo),dd=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return s(t,n),t.prototype.sendPollRequest=function(){var n=this._pollState;return this.updateOperationStatus(n.initialResponse.request.url,!1).then(function(t){var r=t.status,u=t.parsedBody,i;if(r!==200&&r!==201&&r!==202&&r!==204){i=new l('Invalid status code with response body "'+t.bodyAsText+'" occurred when polling for operation status.');i.statusCode=r;i.request=pt(t.request);i.response=t;i.body=u;throw i;}if(!t.parsedBody)throw new Error("The response from long running operation does not contain a body.");n.state=cr(t.parsedBody)||"Succeeded";n.mostRecentResponse=t;n.mostRecentRequest=t.request;n.resource=ht(t)})},t.prototype.isFinalStatusAcceptable=function(){return lr(this._pollState.state,"Succeeded")},t.prototype.doFinalGetResourceRequest=function(){return this.sendPollRequest()},t}(bo),kl=function(){function n(n,t){this._lroPollStrategy=n;this._initialResponse=t}return n.prototype.getInitialResponse=function(){return this._initialResponse},n.prototype.getMostRecentResponse=function(){var n=this._lroPollStrategy;return n?n.getMostRecentResponse():this._initialResponse},n.prototype.isFinished=function(){var n=this._lroPollStrategy;return n?n.isFinished():!0},n.prototype.isFinalStatusAcceptable=function(){var n,t=this._lroPollStrategy;return t?t.isFinished()&&(n=t.isFinalStatusAcceptable()):n=!0,n},n.prototype.getOperationStatus=function(){var n=this._lroPollStrategy;return n?n.getOperationStatus():"Succeeded"},n.prototype.getOperationResponse=function(){var t,n=this._lroPollStrategy;if(n)if(n.isFinished())if(n.isFinalStatusAcceptable())t=n.getOperationResponse();else throw n.getRestError();else t=Promise.resolve(undefined);else t=Promise.resolve(this._initialResponse);return t},n.prototype.poll=function(){var n=this._lroPollStrategy;return n?n.sendPollRequest().then(function(){return n.getOperationStatus()}):Promise.resolve("Succeeded")},n.prototype.pollUntilFinished=function(){return f(this,void 0,void 0,function(){var t,n;return e(this,function(){return n=this._lroPollStrategy,t=n?n.pollUntilFinished().then(function(t){if(t)return n.getOperationResponse().then(gl);throw n.getRestError();}):Promise.resolve(gl(this._initialResponse)),[2,t]})})},n.prototype.getPollState=function(){var n=this._lroPollStrategy;return n?n.getPollState():undefined},n}();var ng="en-us",tg="1.3.7",ig=function(n){function t(t,i){var r=n.call(this,t,i=rg(i))||this,u;return r.acceptLanguage=ng,u=t.environment,u&&!r.baseUri&&(r.baseUri=u.resourceManagerEndpointUrl),i.acceptLanguage!=undefined&&(r.acceptLanguage=i.acceptLanguage),i.longRunningOperationRetryTimeout!=undefined&&(r.longRunningOperationRetryTimeout=i.longRunningOperationRetryTimeout),r}return s(t,n),t.prototype.sendLRORequest=function(n,t,i){var r=this;return this.sendOperationRequest(n,t).then(function(n){return dl(r,n._response,i)})},t.prototype.sendLongRunningRequest=function(n,t){return this.beginLongRunningRequest(n,t).then(function(n){return n.pollUntilFinished()}).then(function(n){return n._response})},t.prototype.beginLongRunningRequest=function(n,t){var i=this;return this.sendRequest(n).then(function(n){return dl(i,n,t)})},t.prototype.restoreLROPoller=function(n){return gd(this,n)},t}(gc);var i={serializedName:"CloudError",type:{name:"Composite",className:"CloudError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}},target:{serializedName:"target",type:{name:"String"}},details:{serializedName:"details",type:{name:"Sequence",element:{serializedName:"CloudErrorElementType",type:{name:"Composite",className:"CloudError"}}}},innerError:{required:!1,serializedName:"innererror",type:{name:"Object"}},additionalInfo:{required:!1,serializedName:"additionalInfo",type:{name:"Composite",className:"AdditionalInfoElement",modelProperties:{type:{required:!0,serializedName:"type",type:{name:"String"}},info:{required:!1,serializedName:"info",type:{name:"Object"}}}}}}}},ta={serializedName:"BatchResponse_summary",type:{name:"Composite",className:"BatchResponseSummary",modelProperties:{successfulRequests:{readOnly:!0,serializedName:"successfulRequests",type:{name:"Number"}},totalRequests:{readOnly:!0,serializedName:"totalRequests",type:{name:"Number"}}}}},kt={serializedName:"BatchResponse",type:{name:"Composite",className:"BatchResponse",modelProperties:{summary:{readOnly:!0,serializedName:"summary",type:{name:"Composite",className:"BatchResponseSummary"}},batchItems:{readOnly:!0,serializedName:"batchItems",type:{name:"Sequence",element:{type:{name:"Object"}}}}}}},ia={serializedName:"BatchRequestBody_batchItemsItem",type:{name:"Composite",className:"BatchRequestBodyBatchItemsItem",modelProperties:{query:{serializedName:"query",type:{name:"String"}}}}},dt={serializedName:"BatchRequestBody",type:{name:"Composite",className:"BatchRequestBody",modelProperties:{batchItems:{serializedName:"batchItems",type:{name:"Sequence",element:{type:{name:"Composite",className:"BatchRequestBodyBatchItemsItem"}}}}}}},y={serializedName:"GeoJSONGeometry",type:{name:"Composite",polymorphicDiscriminator:{serializedName:"type",clientName:"type"},uberParent:"GeoJSONGeometry",className:"GeoJSONGeometry",modelProperties:{type:{required:!0,serializedName:"type",type:{name:"String"}}}}},ei={serializedName:"LineString",type:{name:"Composite",polymorphicDiscriminator:y.type.polymorphicDiscriminator,uberParent:"GeoJSONGeometry",className:"LineString",modelProperties:t(t({},y.type.modelProperties),{coordinates:{required:!0,serializedName:"coordinates",type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Number"}}}}}}})}},ra={serializedName:"SearchPolygonResponse",type:{name:"Composite",className:"SearchPolygonResponse",modelProperties:{additionalData:{readOnly:!0,serializedName:"additionalData",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchPolygonResult"}}}}}}},ua={serializedName:"SearchFuzzyResponse",type:{name:"Composite",className:"SearchFuzzyResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchFuzzySummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchFuzzyResult"}}}}}}},fa={serializedName:"SearchPoiResponse",type:{name:"Composite",className:"SearchPoiResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchPoiSummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchPoiResult"}}}}}}},ea={serializedName:"SearchNearbyResponse",type:{name:"Composite",className:"SearchNearbyResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchNearbySummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchNearbyResult"}}}}}}},oa={serializedName:"SearchPoiCategoryResponse",type:{name:"Composite",className:"SearchPoiCategoryResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchPoiCategorySummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchPoiCategoryResult"}}}}}}},sa={serializedName:"SearchAddressResponse",type:{name:"Composite",className:"SearchAddressResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchAddressSummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchAddressResult"}}}}}}},ha={serializedName:"SearchAddressReverseResponse",type:{name:"Composite",className:"SearchAddressReverseResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchAddressReverseSummary"}},addresses:{readOnly:!0,serializedName:"addresses",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchAddressReverseResult"}}}}}}},ca={serializedName:"SearchAddressReverseCrossStreetResponse",type:{name:"Composite",className:"SearchAddressReverseCrossStreetResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchAddressReverseCrossStreetSummary"}},addresses:{readOnly:!0,serializedName:"addresses",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchAddressReverseCrossStreetResult"}}}}}}},la={serializedName:"SearchAddressStructuredResponse",type:{name:"Composite",className:"SearchAddressStructuredResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchAddressStructuredSummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchAddressStructuredResult"}}}}}}},aa={serializedName:"SearchGeometryResponse",type:{name:"Composite",className:"SearchGeometryResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchGeometrySummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchGeometryResult"}}}}}}},va={serializedName:"SearchAlongRouteResponse",type:{name:"Composite",className:"SearchAlongRouteResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"SearchAlongRouteSummary"}},results:{readOnly:!0,serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchAlongRouteResult"}}}}}}},ya={serializedName:"SearchInsideGeometryRequestBody",type:{name:"Composite",className:"SearchInsideGeometryRequestBody",modelProperties:{geometry:{serializedName:"geometry",type:{name:"Object"}}}}},pa={serializedName:"SearchAlongRouteRequestBody",type:{name:"Composite",className:"SearchAlongRouteRequestBody",modelProperties:{route:{serializedName:"route",type:{name:"Composite",className:"LineString"}}}}},oi={serializedName:"MultiPoint",type:{name:"Composite",polymorphicDiscriminator:y.type.polymorphicDiscriminator,uberParent:"GeoJSONGeometry",className:"MultiPoint",modelProperties:t(t({},y.type.modelProperties),{coordinates:{required:!0,serializedName:"coordinates",type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Number"}}}}}}})}},si={serializedName:"Point",type:{name:"Composite",polymorphicDiscriminator:y.type.polymorphicDiscriminator,uberParent:"GeoJSONGeometry",className:"Point",modelProperties:t(t({},y.type.modelProperties),{coordinates:{required:!0,serializedName:"coordinates",type:{name:"Sequence",element:{type:{name:"Number"}}}}})}},hi={serializedName:"MultiPolygon",type:{name:"Composite",polymorphicDiscriminator:y.type.polymorphicDiscriminator,uberParent:"GeoJSONGeometry",className:"MultiPolygon",modelProperties:t(t({},y.type.modelProperties),{coordinates:{required:!0,serializedName:"coordinates",type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Number"}}}}}}}}}}})}},wa={serializedName:"GeoJSONGeometryCollection",type:{name:"Composite",className:"GeoJSONGeometryCollection",modelProperties:{type:{serializedName:"type",type:{name:"String"}},geometries:{required:!0,serializedName:"geometries",type:{name:"Sequence",element:{type:{name:"Composite",className:"GeoJSONGeometry"}}}}}}},ba={serializedName:"Coordinate",type:{name:"Composite",className:"Coordinate",modelProperties:{latitude:{readOnly:!0,serializedName:"latitude",type:{name:"Number"}},longitude:{readOnly:!0,serializedName:"longitude",type:{name:"Number"}}}}},ug={serializedName:"RouteDirectionsRequestBody_supportingPoints",type:{name:"Composite",className:"RouteDirectionsRequestBodySupportingPoints",modelProperties:t({},wa.type.modelProperties)}},ka={serializedName:"RouteDirectionsRequestBody",type:{name:"Composite",className:"RouteDirectionsRequestBody",modelProperties:{supportingPoints:{serializedName:"supportingPoints",type:{name:"Composite",className:"RouteDirectionsRequestBodySupportingPoints"}},avoidVignette:{serializedName:"avoidVignette",type:{name:"Sequence",element:{type:{name:"String"}}}},allowVignette:{serializedName:"allowVignette",type:{name:"Sequence",element:{type:{name:"String"}}}},avoidAreas:{serializedName:"avoidAreas",type:{name:"Composite",className:"MultiPolygon"}}}}},ko={serializedName:"RouteDirectionsResponse",type:{name:"Composite",className:"RouteDirectionsResponse",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},copyright:{readOnly:!0,serializedName:"copyright",type:{name:"String"}},privacy:{readOnly:!0,serializedName:"privacy",type:{name:"String"}},routes:{readOnly:!0,serializedName:"routes",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteDirectionsResult"}}}},optimizedWaypoints:{readOnly:!0,serializedName:"optimizedWaypoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteOptimizedWaypoint"}}}},report:{serializedName:"report",type:{name:"Composite",className:"RouteResponseReport"}}}}},da={serializedName:"RouteRangeResponse",type:{name:"Composite",className:"RouteRangeResponse",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},copyright:{readOnly:!0,serializedName:"copyright",type:{name:"String"}},privacy:{readOnly:!0,serializedName:"privacy",type:{name:"String"}},reachableRange:{serializedName:"reachableRange",type:{name:"Composite",className:"RouteRange"}},report:{serializedName:"report",type:{name:"Composite",className:"RouteResponseReport"}}}}},ga={serializedName:"RouteMatrixResponse",type:{name:"Composite",className:"RouteMatrixResponse",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},matrix:{readOnly:!0,serializedName:"matrix",type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteMatrixResult"}}}}}},summary:{serializedName:"summary",type:{name:"Composite",className:"RouteMatrixSummary"}}}}},nv={serializedName:"RouteMatrixRequestBody",type:{name:"Composite",className:"RouteMatrixRequestBody",modelProperties:{origins:{serializedName:"origins",type:{name:"Composite",className:"MultiPoint"}},destinations:{serializedName:"destinations",type:{name:"Composite",className:"MultiPoint"}}}}},tv={serializedName:"TimezoneByIdResult",type:{name:"Composite",className:"TimezoneByIdResult",modelProperties:{version:{readOnly:!0,serializedName:"Version",type:{name:"String"}},referenceUtcTimestamp:{readOnly:!0,serializedName:"ReferenceUtcTimestamp",type:{name:"DateTime"}},timeZones:{serializedName:"TimeZones",type:{name:"Sequence",element:{type:{name:"Composite",className:"TimezoneById"}}}},count:{readOnly:!0,serializedName:"Count",type:{name:"Number"}}}}},iv={serializedName:"TimezoneByCoordinatesResult",type:{name:"Composite",className:"TimezoneByCoordinatesResult",modelProperties:{version:{readOnly:!0,serializedName:"Version",type:{name:"String"}},referenceUtcTimestamp:{readOnly:!0,serializedName:"ReferenceUtcTimestamp",type:{name:"DateTime"}},timeZones:{serializedName:"TimeZones",type:{name:"Sequence",element:{type:{name:"Composite",className:"TimeZoneByCoordinates"}}}},count:{readOnly:!0,serializedName:"Count",type:{name:"Number"}}}}},rv={serializedName:"TimezoneIanaVersionResult",type:{name:"Composite",className:"TimezoneIanaVersionResult",modelProperties:{version:{readOnly:!0,serializedName:"version",type:{name:"String"}}}}},uv={serializedName:"CopyrightBoundingResult",type:{name:"Composite",className:"CopyrightBoundingResult",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},generalCopyrights:{readOnly:!0,serializedName:"generalCopyrights",type:{name:"Sequence",element:{type:{name:"String"}}}},regions:{readOnly:!0,serializedName:"regions",type:{name:"Sequence",element:{type:{name:"Composite",className:"Region"}}}}}}},fv={serializedName:"CopyrightCaptionResult",type:{name:"Composite",className:"CopyrightCaptionResult",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},copyrightsCaption:{readOnly:!0,serializedName:"copyrightsCaption",type:{name:"String"}}}}},ev={serializedName:"CopyrightWorldResult",type:{name:"Composite",className:"CopyrightWorldResult",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},generalCopyrights:{readOnly:!0,serializedName:"generalCopyrights",type:{name:"Sequence",element:{type:{name:"String"}}}},regions:{readOnly:!0,serializedName:"regions",type:{name:"Sequence",element:{type:{name:"Composite",className:"Region"}}}}}}},ov={serializedName:"CopyrightTileResult",type:{name:"Composite",className:"CopyrightTileResult",modelProperties:{formatVersion:{readOnly:!0,serializedName:"formatVersion",type:{name:"String"}},generalCopyrights:{readOnly:!0,serializedName:"generalCopyrights",type:{name:"Sequence",element:{type:{name:"String"}}}},regions:{readOnly:!0,serializedName:"regions",type:{name:"Sequence",element:{type:{name:"Composite",className:"Region"}}}}}}},ci={serializedName:"Polygon",type:{name:"Composite",polymorphicDiscriminator:y.type.polymorphicDiscriminator,uberParent:"GeoJSONGeometry",className:"Polygon",modelProperties:t(t({},y.type.modelProperties),{coordinates:{required:!0,serializedName:"coordinates",type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Number"}}}}}}}}})}},sv={serializedName:"MetroAreaResponse",type:{name:"Composite",className:"MetroAreaResponse",modelProperties:{results:{serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"MetroAreaResult"}}}}}}},hv={serializedName:"MetroAreaInfoResponse",type:{name:"Composite",className:"MetroAreaInfoResponse",modelProperties:{metroName:{serializedName:"metroName",type:{name:"String"}},transitTypes:{serializedName:"transitTypes",type:{name:"Sequence",element:{type:{name:"Composite",className:"TransitTypeResult"}}}},agencies:{serializedName:"agencies",type:{name:"Sequence",element:{type:{name:"Composite",className:"Agency"}}}},alerts:{serializedName:"alerts",type:{name:"Sequence",element:{type:{name:"Composite",className:"Alert"}}}}}}},cv={serializedName:"NearbyTransitResponse",type:{name:"Composite",className:"NearbyTransitResponse",modelProperties:{results:{serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"TransitObjectResult"}}}}}}},lv={serializedName:"TransitStopInfoResponse",type:{name:"Composite",className:"TransitStopInfoResponse",modelProperties:{stop:{serializedName:"stop",type:{name:"Composite",className:"Stop"}},lines:{serializedName:"lines",type:{name:"Sequence",element:{type:{name:"Composite",className:"Line"}}}},lineGroups:{serializedName:"lineGroups",type:{name:"Sequence",element:{type:{name:"Composite",className:"LineGroup"}}}},alerts:{serializedName:"alerts",type:{name:"Sequence",element:{type:{name:"Composite",className:"Alert"}}}}}}},av={serializedName:"TransitRouteResponse",type:{name:"Composite",className:"TransitRouteResponse",modelProperties:{results:{serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"ItineraryResult"}}}}}}},vv={serializedName:"TransitItineraryResponse",type:{name:"Composite",className:"TransitItineraryResponse",modelProperties:{departureTime:{serializedName:"departureTime",type:{name:"String"}},arrivalTime:{serializedName:"arrivalTime",type:{name:"String"}},legs:{serializedName:"legs",type:{name:"Sequence",element:{type:{name:"Composite",className:"Leg"}}}}}}},yv={serializedName:"CarShareResponse",type:{name:"Composite",className:"CarShareResponse",modelProperties:{name:{serializedName:"name",type:{name:"String"}},model:{serializedName:"model",type:{name:"String"}},seatCount:{serializedName:"seatCount",type:{name:"Number"}},fuelLevel:{serializedName:"fuelLevel",type:{name:"Number"}},batteryLevel:{serializedName:"batteryLevel",type:{name:"Number"}},pricing:{serializedName:"pricing",type:{name:"Composite",className:"Pricing"}},position:{serializedName:"position",type:{name:"Composite",className:"Coordinate"}},operatorInfo:{serializedName:"operatorInfo",type:{name:"Composite",className:"OperatorInfo"}}}}},pv={serializedName:"TransitDockInfoResponse",type:{name:"Composite",className:"TransitDockInfoResponse",modelProperties:{availableVehicles:{serializedName:"availableVehicles",type:{name:"Number"}},vacantLocations:{serializedName:"vacantLocations",type:{name:"Number"}},position:{serializedName:"position",type:{name:"Composite",className:"Coordinate"}},lastUpdated:{serializedName:"lastUpdated",type:{name:"DateTime"}},operatorInfo:{serializedName:"operatorInfo",type:{name:"Composite",className:"OperatorInfo"}}}}},wv={serializedName:"TransitLineInfoResponse",type:{name:"Composite",className:"TransitLineInfoResponse",modelProperties:{lineGroup:{serializedName:"lineGroup",type:{name:"Composite",className:"LineGroup"}},lines:{serializedName:"lines",type:{name:"Sequence",element:{type:{name:"Composite",className:"Line"}}}},stops:{serializedName:"stops",type:{name:"Sequence",element:{type:{name:"Composite",className:"Stop"}}}},patterns:{serializedName:"patterns",type:{name:"Sequence",element:{type:{name:"Composite",className:"Pattern"}}}},schedule:{serializedName:"schedule",type:{name:"Composite",className:"LineArrival"}}}}},bv={serializedName:"RealTimeArrivalsResponse",type:{name:"Composite",className:"RealTimeArrivalsResponse",modelProperties:{results:{serializedName:"results",type:{name:"Sequence",element:{type:{name:"Composite",className:"RealTimeArrivalResult"}}}}}}},yr={serializedName:"GeoJSONFeatureCollection",type:{name:"Composite",className:"GeoJSONFeatureCollection",modelProperties:{type:{required:!0,serializedName:"type",type:{name:"String"}},features:{required:!0,serializedName:"features",type:{name:"Sequence",element:{type:{name:"Composite",className:"GeoJSONFeatureCollectionFeaturesItem"}}}}}}},li={serializedName:"MultiLineString",type:{name:"Composite",polymorphicDiscriminator:y.type.polymorphicDiscriminator,uberParent:"GeoJSONGeometry",className:"MultiLineString",modelProperties:t(t({},y.type.modelProperties),{coordinates:{required:!0,serializedName:"coordinates",type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Sequence",element:{type:{name:"Number"}}}}}}}}})}},go={serializedName:"GeofenceResponse",type:{name:"Composite",className:"GeofenceResponse",modelProperties:{geometries:{readOnly:!0,serializedName:"geometries",type:{name:"Sequence",element:{type:{name:"Composite",className:"GeofenceGeometry"}}}},expiredGeofenceGeometryId:{readOnly:!0,serializedName:"expiredGeofenceGeometryId",type:{name:"Sequence",element:{type:{name:"String"}}}},invalidPeriodGeofenceGeometryId:{readOnly:!0,serializedName:"invalidPeriodGeofenceGeometryId",type:{name:"Sequence",element:{type:{name:"String"}}}},isEventPublished:{readOnly:!0,serializedName:"isEventPublished",type:{name:"Boolean"}}}}},kv={serializedName:"BufferRequestBody",type:{name:"Composite",className:"BufferRequestBody",modelProperties:{geometries:{serializedName:"geometries",type:{name:"Composite",className:"GeoJSONFeatureCollection"}},distances:{serializedName:"distances",type:{name:"Sequence",element:{type:{name:"Number"}}}}}}},ns={serializedName:"BufferResponse",type:{name:"Composite",className:"BufferResponse",modelProperties:{summary:{readOnly:!0,serializedName:"summary",type:{name:"Composite",className:"BufferResponseSummary"}},result:{serializedName:"result",type:{name:"Composite",className:"GeoJSONFeatureCollection"}}}}},dv={serializedName:"GetClosestPointResponse",type:{name:"Composite",className:"GetClosestPointResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"GetClosestPointSummary"}},result:{serializedName:"result",type:{name:"Sequence",element:{type:{name:"Composite",className:"ClosestPointResultEntry"}}}}}}},gv={serializedName:"PostClosestPointResponse",type:{name:"Composite",className:"PostClosestPointResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"PostClosestPointSummary"}},result:{serializedName:"result",type:{name:"Sequence",element:{type:{name:"Composite",className:"ClosestPointResultEntry"}}}}}}},ny={serializedName:"GetPointInPolygonResponse",type:{name:"Composite",className:"GetPointInPolygonResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"GetPointInPolygonSummary"}},result:{serializedName:"result",type:{name:"Composite",className:"PointInPolygonResult"}}}}},ty={serializedName:"PostPointInPolygonResponse",type:{name:"Composite",className:"PostPointInPolygonResponse",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"PostPointInPolygonSummary"}},result:{serializedName:"result",type:{name:"Composite",className:"PointInPolygonResult"}}}}},iy={serializedName:"GreatCircleDistanceResponse",type:{name:"Composite",className:"GreatCircleDistanceResponse",modelProperties:{summary:{readOnly:!0,serializedName:"summary",type:{name:"Composite",className:"GreatCircleDistanceResponseSummary"}},result:{readOnly:!0,serializedName:"result",type:{name:"Composite",className:"GreatCircleDistanceResponseResult"}}}}},ts={serializedName:"search-postsearchfuzzybatchpreview-headers",type:{name:"Composite",className:"SearchPostSearchFuzzyBatchPreviewHeaders",modelProperties:{location:{serializedName:"location",type:{name:"String"}}}}},is={serializedName:"search-postsearchaddressbatchpreview-headers",type:{name:"Composite",className:"SearchPostSearchAddressBatchPreviewHeaders",modelProperties:{location:{serializedName:"location",type:{name:"String"}}}}},rs={serializedName:"search-postsearchaddressreversebatchpreview-headers",type:{name:"Composite",className:"SearchPostSearchAddressReverseBatchPreviewHeaders",modelProperties:{location:{serializedName:"location",type:{name:"String"}}}}},us={serializedName:"route-postroutematrixpreview-headers",type:{name:"Composite",className:"RoutePostRouteMatrixPreviewHeaders",modelProperties:{location:{serializedName:"location",type:{name:"String"}}}}},fs={serializedName:"route-postroutedirectionsbatchpreview-headers",type:{name:"Composite",className:"RoutePostRouteDirectionsBatchPreviewHeaders",modelProperties:{location:{serializedName:"location",type:{name:"String"}}}}},ry={serializedName:"spatial-getgeofence-headers",type:{name:"Composite",className:"SpatialGetGeofenceHeaders",modelProperties:{xCorrelationId:{serializedName:"x-correlation-id",type:{name:"String"}}}}},uy={serializedName:"spatial-postgeofence-headers",type:{name:"Composite",className:"SpatialPostGeofenceHeaders",modelProperties:{xCorrelationId:{serializedName:"x-correlation-id",type:{name:"String"}}}}},gt={GeoJSONGeometry:y,"GeoJSONGeometry.LineString":ei,"GeoJSONGeometry.MultiPoint":oi,"GeoJSONGeometry.Point":si,"GeoJSONGeometry.MultiPolygon":hi,"GeoJSONGeometry.Polygon":ci,"GeoJSONGeometry.MultiLineString":li},fg=Object.freeze({discriminators:gt,BatchRequestBody:dt,BatchRequestBodyBatchItemsItem:ia,BatchResponse:kt,BatchResponseSummary:ta,CloudError:i,CoordinateAbbreviated:{serializedName:"CoordinateAbbreviated",type:{name:"Composite",className:"CoordinateAbbreviated",modelProperties:{lat:{readOnly:!0,serializedName:"lat",type:{name:"Number"}},lon:{readOnly:!0,serializedName:"lon",type:{name:"Number"}}}}},DataSources:{serializedName:"DataSources",type:{name:"Composite",className:"DataSources",modelProperties:{geometry:{serializedName:"geometry",type:{name:"Composite",className:"DataSourcesGeometry"}}}}},DataSourcesGeometry:{serializedName:"DataSourcesGeometry",type:{name:"Composite",className:"DataSourcesGeometry",modelProperties:{id:{readOnly:!0,serializedName:"id",type:{name:"String"}}}}},GeoJSONGeometry:y,LineString:ei,MultiLineString:li,MultiPoint:oi,MultiPolygon:hi,Point:si,Polygon:ci,SearchAddressResponse:sa,SearchAddressResult:{serializedName:"SearchAddressResult",type:{name:"Composite",className:"SearchAddressResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}},dataSources:{serializedName:"dataSources",type:{name:"Composite",className:"DataSources"}}}}},SearchAddressReverseCrossStreetResponse:ca,SearchAddressReverseCrossStreetResult:{serializedName:"SearchAddressReverseCrossStreetResult",type:{name:"Composite",className:"SearchAddressReverseCrossStreetResult",modelProperties:{address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{readOnly:!0,serializedName:"position",type:{name:"String"}}}}},SearchAddressReverseCrossStreetSummary:{serializedName:"SearchAddressReverseCrossStreetSummary",type:{name:"Composite",className:"SearchAddressReverseCrossStreetSummary",modelProperties:{queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}}}}},SearchAddressReverseResponse:ha,SearchAddressReverseResult:{serializedName:"SearchAddressReverseResult",type:{name:"Composite",className:"SearchAddressReverseResult",modelProperties:{address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{readOnly:!0,serializedName:"position",type:{name:"String"}},matchType:{readOnly:!0,serializedName:"matchType",type:{name:"String"}}}}},SearchAddressReverseSummary:{serializedName:"SearchAddressReverseSummary",type:{name:"Composite",className:"SearchAddressReverseSummary",modelProperties:{queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}}}}},SearchAddressStructuredResponse:la,SearchAddressStructuredResult:{serializedName:"SearchAddressStructuredResult",type:{name:"Composite",className:"SearchAddressStructuredResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},dist:{serializedName:"dist",type:{name:"Number"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}},addressRanges:{serializedName:"addressRanges",type:{name:"Composite",className:"SearchResultAddressRanges"}}}}},SearchAddressStructuredSummary:{serializedName:"SearchAddressStructuredSummary",type:{name:"Composite",className:"SearchAddressStructuredSummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},limit:{readOnly:!0,serializedName:"limit",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}},geoBias:{serializedName:"geoBias",type:{name:"Composite",className:"SearchSummaryGeoBias"}}}}},SearchAddressSummary:{serializedName:"SearchAddressSummary",type:{name:"Composite",className:"SearchAddressSummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}}}}},SearchAlongRouteRequestBody:pa,SearchAlongRouteResponse:va,SearchAlongRouteResult:{serializedName:"SearchAlongRouteResult",type:{name:"Composite",className:"SearchAlongRouteResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},info:{readOnly:!0,serializedName:"info",type:{name:"String"}},entityType:{serializedName:"entityType",type:{name:"Enum",allowedValues:["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","Neighbourhood","PostalCodeArea"]}},poi:{serializedName:"poi",type:{name:"Composite",className:"SearchResultPoi"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}},dist:{serializedName:"dist",type:{name:"Number"}},detourTime:{readOnly:!0,serializedName:"detourTime",type:{name:"Number"}}}}},SearchAlongRouteSummary:{serializedName:"SearchAlongRouteSummary",type:{name:"Composite",className:"SearchAlongRouteSummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}}}}},SearchFuzzyResponse:ua,SearchFuzzyResult:{serializedName:"SearchFuzzyResult",type:{name:"Composite",className:"SearchFuzzyResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},info:{readOnly:!0,serializedName:"info",type:{name:"String"}},entityType:{serializedName:"entityType",type:{name:"Enum",allowedValues:["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","Neighbourhood","PostalCodeArea"]}},poi:{serializedName:"poi",type:{name:"Composite",className:"SearchResultPoi"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}},addressRanges:{serializedName:"addressRanges",type:{name:"Composite",className:"SearchResultAddressRanges"}},dataSources:{serializedName:"dataSources",type:{name:"Composite",className:"DataSources"}}}}},SearchFuzzySummary:{serializedName:"SearchFuzzySummary",type:{name:"Composite",className:"SearchFuzzySummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}}}}},SearchGeometryResponse:aa,SearchGeometryResult:{serializedName:"SearchGeometryResult",type:{name:"Composite",className:"SearchGeometryResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},info:{readOnly:!0,serializedName:"info",type:{name:"String"}},entityType:{serializedName:"entityType",type:{name:"Enum",allowedValues:["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","Neighbourhood","PostalCodeArea"]}},poi:{serializedName:"poi",type:{name:"Composite",className:"SearchResultPoi"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}}}}},SearchGeometrySummary:{serializedName:"SearchGeometrySummary",type:{name:"Composite",className:"SearchGeometrySummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}}}}},SearchInsideGeometryRequestBody:ya,SearchNearbyResponse:ea,SearchNearbyResult:{serializedName:"SearchNearbyResult",type:{name:"Composite",className:"SearchNearbyResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},dist:{serializedName:"dist",type:{name:"Number"}},info:{readOnly:!0,serializedName:"info",type:{name:"String"}},poi:{serializedName:"poi",type:{name:"Composite",className:"SearchResultPoi"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}}}}},SearchNearbySummary:{serializedName:"SearchNearbySummary",type:{name:"Composite",className:"SearchNearbySummary",modelProperties:{queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}},geoBias:{serializedName:"geoBias",type:{name:"Composite",className:"SearchSummaryGeoBias"}}}}},SearchPoiCategoryResponse:oa,SearchPoiCategoryResult:{serializedName:"SearchPoiCategoryResult",type:{name:"Composite",className:"SearchPoiCategoryResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},dist:{serializedName:"dist",type:{name:"Number"}},info:{readOnly:!0,serializedName:"info",type:{name:"String"}},entityType:{serializedName:"entityType",type:{name:"Enum",allowedValues:["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","Neighbourhood","PostalCodeArea"]}},poi:{serializedName:"poi",type:{name:"Composite",className:"SearchResultPoi"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}}}}},SearchPoiCategorySummary:{serializedName:"SearchPoiCategorySummary",type:{name:"Composite",className:"SearchPoiCategorySummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}},geoBias:{serializedName:"geoBias",type:{name:"Composite",className:"SearchSummaryGeoBias"}}}}},SearchPoiResponse:fa,SearchPoiResult:{serializedName:"SearchPoiResult",type:{name:"Composite",className:"SearchPoiResult",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},id:{readOnly:!0,serializedName:"id",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}},dist:{serializedName:"dist",type:{name:"Number"}},info:{readOnly:!0,serializedName:"info",type:{name:"String"}},entityType:{serializedName:"entityType",type:{name:"Enum",allowedValues:["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","Neighbourhood","PostalCodeArea"]}},poi:{serializedName:"poi",type:{name:"Composite",className:"SearchResultPoi"}},address:{serializedName:"address",type:{name:"Composite",className:"SearchResultAddress"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"SearchResultViewport"}},entryPoints:{serializedName:"entryPoints",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultEntryPoint"}}}}}}},SearchPoiSummary:{serializedName:"SearchPoiSummary",type:{name:"Composite",className:"SearchPoiSummary",modelProperties:{query:{readOnly:!0,serializedName:"query",type:{name:"String"}},queryType:{readOnly:!0,serializedName:"queryType",type:{name:"String"}},queryTime:{readOnly:!0,serializedName:"queryTime",type:{name:"Number"}},numResults:{readOnly:!0,serializedName:"numResults",type:{name:"Number"}},offset:{readOnly:!0,serializedName:"offset",type:{name:"Number"}},totalResults:{readOnly:!0,serializedName:"totalResults",type:{name:"Number"}},fuzzyLevel:{readOnly:!0,serializedName:"fuzzyLevel",type:{name:"Number"}},geoBias:{serializedName:"geoBias",type:{name:"Composite",className:"SearchSummaryGeoBias"}}}}},SearchPolygonResponse:ra,SearchPolygonResult:{serializedName:"SearchPolygonResult",type:{name:"Composite",className:"SearchPolygonResult",modelProperties:{providerID:{readOnly:!0,serializedName:"providerID",type:{name:"String"}},error:{readOnly:!0,serializedName:"error",type:{name:"String"}},geometryData:{serializedName:"geometryData",type:{name:"Object"}}}}},SearchPostSearchAddressBatchPreviewHeaders:is,SearchPostSearchAddressReverseBatchPreviewHeaders:rs,SearchPostSearchFuzzyBatchPreviewHeaders:ts,SearchResultAddress:{serializedName:"SearchResultAddress",type:{name:"Composite",className:"SearchResultAddress",modelProperties:{buildingNumber:{readOnly:!0,serializedName:"buildingNumber",type:{name:"String"}},street:{readOnly:!0,serializedName:"street",type:{name:"String"}},crossStreet:{readOnly:!0,serializedName:"crossStreet",type:{name:"String"}},streetNumber:{readOnly:!0,serializedName:"streetNumber",type:{name:"String"}},routeNumbers:{readOnly:!0,serializedName:"routeNumbers",type:{name:"Sequence",element:{type:{name:"Number"}}}},streetName:{readOnly:!0,serializedName:"streetName",type:{name:"String"}},streetNameAndNumber:{readOnly:!0,serializedName:"streetNameAndNumber",type:{name:"String"}},municipality:{readOnly:!0,serializedName:"municipality",type:{name:"String"}},municipalitySubdivision:{readOnly:!0,serializedName:"municipalitySubdivision",type:{name:"String"}},countryTertiarySubdivision:{readOnly:!0,serializedName:"countryTertiarySubdivision",type:{name:"String"}},countrySecondarySubdivision:{readOnly:!0,serializedName:"countrySecondarySubdivision",type:{name:"String"}},countrySubdivision:{readOnly:!0,serializedName:"countrySubdivision",type:{name:"String"}},postalCode:{readOnly:!0,serializedName:"postalCode",type:{name:"String"}},extendedPostalCode:{readOnly:!0,serializedName:"extendedPostalCode",type:{name:"String"}},countryCode:{readOnly:!0,serializedName:"countryCode",type:{name:"String"}},country:{readOnly:!0,serializedName:"country",type:{name:"String"}},countryCodeISO3:{readOnly:!0,serializedName:"countryCodeISO3",type:{name:"String"}},freeformAddress:{readOnly:!0,serializedName:"freeformAddress",type:{name:"String"}},countrySubdivisionName:{readOnly:!0,serializedName:"countrySubdivisionName",type:{name:"String"}},localName:{readOnly:!0,serializedName:"localName",type:{name:"String"}}}}},SearchResultAddressRanges:{serializedName:"SearchResultAddressRanges",type:{name:"Composite",className:"SearchResultAddressRanges",modelProperties:{rangeLeft:{serializedName:"rangeLeft",type:{name:"String"}},rangeRight:{serializedName:"rangeRight",type:{name:"String"}},from:{serializedName:"from",type:{name:"Composite",className:"CoordinateAbbreviated"}},to:{serializedName:"to",type:{name:"Composite",className:"CoordinateAbbreviated"}}}}},SearchResultEntryPoint:{serializedName:"SearchResultEntryPoint",type:{name:"Composite",className:"SearchResultEntryPoint",modelProperties:{type:{readOnly:!0,serializedName:"type",type:{name:"String"}},position:{serializedName:"position",type:{name:"Composite",className:"CoordinateAbbreviated"}}}}},SearchResultPoi:{serializedName:"SearchResultPoi",type:{name:"Composite",className:"SearchResultPoi",modelProperties:{name:{readOnly:!0,serializedName:"name",type:{name:"String"}},phone:{readOnly:!0,serializedName:"phone",type:{name:"String"}},url:{readOnly:!0,serializedName:"url",type:{name:"String"}},categories:{readOnly:!0,serializedName:"categories",type:{name:"Sequence",element:{type:{name:"String"}}}},classifications:{readOnly:!0,serializedName:"classifications",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultPoiClassification"}}}},brands:{readOnly:!0,serializedName:"brands",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultPoiBrand"}}}}}}},SearchResultPoiBrand:{serializedName:"SearchResultPoiBrand",type:{name:"Composite",className:"SearchResultPoiBrand",modelProperties:{name:{readOnly:!0,serializedName:"name",type:{name:"String"}}}}},SearchResultPoiClassification:{serializedName:"SearchResultPoiClassification",type:{name:"Composite",className:"SearchResultPoiClassification",modelProperties:{code:{readOnly:!0,serializedName:"code",type:{name:"String"}},names:{readOnly:!0,serializedName:"names",type:{name:"Sequence",element:{type:{name:"Composite",className:"SearchResultPoiClassificationName"}}}}}}},SearchResultPoiClassificationName:{serializedName:"SearchResultPoiClassificationName",type:{name:"Composite",className:"SearchResultPoiClassificationName",modelProperties:{nameLocale:{readOnly:!0,serializedName:"nameLocale",type:{name:"String"}},name:{readOnly:!0,serializedName:"name",type:{name:"String"}}}}},SearchResultViewport:{serializedName:"SearchResultViewport",type:{name:"Composite",className:"SearchResultViewport",modelProperties:{topLeftPoint:{serializedName:"topLeftPoint",type:{name:"Composite",className:"CoordinateAbbreviated"}},btmRightPoint:{serializedName:"btmRightPoint",type:{name:"Composite",className:"CoordinateAbbreviated"}}}}},SearchSummaryGeoBias:{serializedName:"SearchSummaryGeoBias",type:{name:"Composite",className:"SearchSummaryGeoBias",modelProperties:{lat:{readOnly:!0,serializedName:"lat",type:{name:"Number"}},lon:{readOnly:!0,serializedName:"lon",type:{name:"Number"}}}}}}),es={parameterPath:["options","accelerationEfficiency"],mapper:{serializedName:"accelerationEfficiency",type:{name:"Number"}}},u={parameterPath:"acceptLanguage",mapper:{serializedName:"accept-language",defaultValue:"en-US",type:{name:"String"}}},fy={parameterPath:["options","acceptLanguage"],mapper:{serializedName:"Accept-Language",type:{name:"String"}}},ey={parameterPath:["options","agency"],mapper:{serializedName:"agency",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:a.Csv},oy={parameterPath:["options","agencyType"],mapper:{serializedName:"agencyType",type:{name:"Enum",allowedValues:["agencyId","agencyKey","agencyName"]}}},sy={parameterPath:["options","alternativeType"],mapper:{serializedName:"alternativeType",type:{name:"Enum",allowedValues:["anyRoute","betterRoute"]}}},r={parameterPath:"apiVersion",mapper:{required:!0,serializedName:"api-version",type:{name:"String"}}},os={parameterPath:["options","arriveAt"],mapper:{serializedName:"arriveAt",type:{name:"DateTime"}}},ss={parameterPath:["options","auxiliaryPowerInkW"],mapper:{serializedName:"auxiliaryPowerInkW",type:{name:"String"}}},hs={parameterPath:["options","auxiliaryPowerInLitersPerHour"],mapper:{serializedName:"auxiliaryPowerInLitersPerHour",type:{name:"Number"}}},pr={parameterPath:["options","avoid"],mapper:{serializedName:"avoid",type:{name:"Enum",allowedValues:["tollRoads","motorways","ferries","unpavedRoads","carpools","alreadyUsedRoads","borderCrossings"]}}},ai={parameterPath:["options","brandSet"],mapper:{serializedName:"brandSet",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:a.Csv},wr={parameterPath:["options","btmRight"],mapper:{serializedName:"btmRight",type:{name:"String"}}},hy={parameterPath:["options","computeBestOrder"],mapper:{serializedName:"computeBestOrder",type:{name:"Boolean"}}},cs={parameterPath:["options","computeTravelTimeFor"],mapper:{serializedName:"computeTravelTimeFor",type:{name:"Enum",allowedValues:["none","all"]}}},vi={parameterPath:["options","connectorSet"],mapper:{serializedName:"connectorSet",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["StandardHouseholdCountrySpecific","IEC62196Type1","IEC62196Type1CCS","IEC62196Type2CableAttached","IEC62196Type2Outlet","IEC62196Type2CCS","IEC62196Type3","Chademo","IEC60309AC1PhaseBlue","IEC60309DCWhite","Tesla"]}}}},collectionFormat:a.Csv},ls={parameterPath:["options","constantSpeedConsumptionInkWhPerHundredkm"],mapper:{serializedName:"constantSpeedConsumptionInkWhPerHundredkm",type:{name:"String"}}},as={parameterPath:["options","constantSpeedConsumptionInLitersPerHundredkm"],mapper:{serializedName:"constantSpeedConsumptionInLitersPerHundredkm",type:{name:"Number"}}},yi={parameterPath:["options","countrySet"],mapper:{serializedName:"countrySet",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:a.Csv},vs={parameterPath:["options","currentChargeInkWh"],mapper:{serializedName:"currentChargeInkWh",type:{name:"String"}}},ys={parameterPath:["options","currentFuelInLiters"],mapper:{serializedName:"currentFuelInLiters",type:{name:"Number"}}},ps={parameterPath:["options","decelerationEfficiency"],mapper:{serializedName:"decelerationEfficiency",type:{name:"Number"}}},br={parameterPath:["options","departAt"],mapper:{serializedName:"departAt",type:{name:"DateTime"}}},eg={parameterPath:"detailType",mapper:{required:!0,serializedName:"detailType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["agencies","alerts","alertDetails","transitTypes"]}}}},collectionFormat:a.Csv},og={parameterPath:["options","detailType"],mapper:{serializedName:"detailType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["alerts","alertDetails","lines","stops","schedule","patterns"]}}}},collectionFormat:a.Csv},sg={parameterPath:["options","detailType"],mapper:{serializedName:"detailType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["alerts","alertDetails","lines","lineGroups"]}}}},collectionFormat:a.Csv},hg={parameterPath:["options","detailType"],mapper:{serializedName:"detailType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["geometry","schedule"]}}}},collectionFormat:a.Csv},cy={parameterPath:"deviceId",mapper:{required:!0,serializedName:"deviceId",type:{name:"String"}}},ws={parameterPath:["options","downhillEfficiency"],mapper:{serializedName:"downhillEfficiency",type:{name:"Number"}}},ct={parameterPath:["options","extendedPostalCodesFor"],mapper:{serializedName:"extendedPostalCodesFor",type:{name:"String"}}},o={parameterPath:"format",mapper:{required:!0,isConstant:!0,serializedName:"format",defaultValue:"json",type:{name:"String"}}},ly={parameterPath:"format",mapper:{required:!0,isConstant:!0,serializedName:"format",defaultValue:"png",type:{name:"String"}}},bs={parameterPath:["options","fuelEnergyDensityInMJoulesPerLiter"],mapper:{serializedName:"fuelEnergyDensityInMJoulesPerLiter",type:{name:"Number"}}},ay={parameterPath:["options","heading"],mapper:{serializedName:"heading",constraints:{InclusiveMaximum:360,InclusiveMinimum:-360},type:{name:"Number"}}},kr={parameterPath:["options","hilliness"],mapper:{serializedName:"hilliness",type:{name:"Enum",allowedValues:["low","normal","high"]}}},vy={parameterPath:["options","idxSet"],mapper:{serializedName:"idxSet",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Addr","Geo","PAD","POI","Str","Xstr"]}}}},collectionFormat:a.Csv},yy={parameterPath:["options","instructionsType"],mapper:{serializedName:"instructionsType",type:{name:"Enum",allowedValues:["coded","text","tagged"]}}},py={parameterPath:["options","isAsync"],mapper:{serializedName:"isAsync",type:{name:"Boolean"}}},h={parameterPath:["options","language"],mapper:{serializedName:"language",type:{name:"String"}}},dr={parameterPath:["options","lat"],mapper:{serializedName:"lat",type:{name:"Number"}}},lt={parameterPath:"lat",mapper:{required:!0,serializedName:"lat",type:{name:"Number"}}},ni={parameterPath:["options","limit"],mapper:{serializedName:"limit",constraints:{InclusiveMaximum:100,InclusiveMinimum:1},type:{name:"Number"}}},ks={parameterPath:["options","limit"],mapper:{serializedName:"limit",type:{name:"Number"}}},gr={parameterPath:["options","lon"],mapper:{serializedName:"lon",type:{name:"Number"}}},at={parameterPath:"lon",mapper:{required:!0,serializedName:"lon",type:{name:"Number"}}},wy={parameterPath:["options","maxAlternatives"],mapper:{serializedName:"maxAlternatives",constraints:{InclusiveMaximum:5,InclusiveMinimum:0},type:{name:"Number"}}},ds={parameterPath:["options","maxChargeInkWh"],mapper:{serializedName:"maxChargeInkWh",type:{name:"String"}}},pi={parameterPath:"metroId",mapper:{required:!0,serializedName:"metroId",type:{name:"Number"}}},by={parameterPath:["options","minDeviationDistance"],mapper:{serializedName:"minDeviationDistance",type:{name:"Number"}}},ky={parameterPath:["options","minDeviationTime"],mapper:{serializedName:"minDeviationTime",type:{name:"Number"}}},dy={parameterPath:["options","mode"],mapper:{serializedName:"mode",type:{name:"Enum",allowedValues:["All","EnterAndExit"]}}},cg={parameterPath:["options","modeType"],mapper:{serializedName:"modeType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["walk","bike","publicTransit"]}}}},collectionFormat:a.Csv},gy={parameterPath:["options","numberOfClosestPoints"],mapper:{serializedName:"numberOfClosestPoints",type:{name:"Number"}}},lg={parameterPath:["options","objectType"],mapper:{serializedName:"objectType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["stop","docklessBike","docklessElectricBike","docklessElectricScooter","docklessScooter","docklessMoped","carShare","docklessVehicle","bikeDock"]}}}},collectionFormat:a.Csv},gs={parameterPath:["options","ofs"],mapper:{serializedName:"ofs",constraints:{InclusiveMaximum:1900,InclusiveMinimum:0},type:{name:"Number"}}},wi={parameterPath:["options","openingHours"],mapper:{serializedName:"openingHours",type:{name:"Enum",allowedValues:["nextSevenDays"]}}},np={parameterPath:["options","options"],mapper:{serializedName:"options",type:{name:"Enum",allowedValues:["none","zoneInfo","transitions","all"]}}},ag={parameterPath:["options","path"],mapper:{serializedName:"path",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:a.Multi},vg={parameterPath:["options","pins"],mapper:{serializedName:"pins",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:a.Multi},c={parameterPath:"query",mapper:{required:!0,serializedName:"query",type:{name:"String"}}},ft={parameterPath:["options","radius"],mapper:{serializedName:"radius",type:{name:"Number"}}},tp={parameterPath:["options","report"],mapper:{serializedName:"report",type:{name:"String"}}},ip={parameterPath:["options","routeRepresentation"],mapper:{serializedName:"routeRepresentation",type:{name:"Enum",allowedValues:["polyline","summaryOnly","none"]}}},nu={parameterPath:["options","routeType"],mapper:{serializedName:"routeType",type:{name:"Enum",allowedValues:["fastest","shortest","eco","thrilling"]}}},rp={parameterPath:["options","searchBuffer"],mapper:{serializedName:"searchBuffer",constraints:{InclusiveMaximum:500,InclusiveMinimum:0},type:{name:"Number"}}},nh={parameterPath:["options","sectionType"],mapper:{serializedName:"sectionType",type:{name:"Enum",allowedValues:["carTrain","country","ferry","motorway","pedestrian","tollRoad","tollVignette","traffic","travelMode","tunnel"]}}},th={parameterPath:["options","text"],mapper:{serializedName:"text",type:{name:"String"}}},up={parameterPath:["options","timeStamp"],mapper:{serializedName:"timeStamp",type:{name:"DateTime"}}},tu={parameterPath:["options","topLeft"],mapper:{serializedName:"topLeft",type:{name:"String"}}},iu={parameterPath:["options","traffic"],mapper:{serializedName:"traffic",type:{name:"Boolean"}}},fp={parameterPath:["options","transitionsFrom"],mapper:{serializedName:"transitionsFrom",type:{name:"DateTime"}}},ep={parameterPath:["options","transitionsYears"],mapper:{serializedName:"transitionsYears",type:{name:"Number"}}},op={parameterPath:["options","transitType"],mapper:{serializedName:"transitType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["bus","cableCar","ferry","funicular","gondola","rail","tram","subway"]}}}},collectionFormat:a.Csv},ru={parameterPath:["options","travelMode"],mapper:{serializedName:"travelMode",type:{name:"Enum",allowedValues:["car","truck","taxi","bus","van","motorcycle","bicycle","pedestrian"]}}},uu={parameterPath:["options","typeahead"],mapper:{serializedName:"typeahead",type:{name:"Boolean"}}},ih={parameterPath:"udid",mapper:{required:!0,serializedName:"udid",type:{name:"String"}}},rh={parameterPath:["options","uphillEfficiency"],mapper:{serializedName:"uphillEfficiency",type:{name:"Number"}}},sp={parameterPath:["options","userTime"],mapper:{serializedName:"userTime",type:{name:"String"}}},fu={parameterPath:["options","vehicleAxleWeight"],mapper:{serializedName:"vehicleAxleWeight",type:{name:"Number"}}},uh={parameterPath:["options","vehicleCommercial"],mapper:{serializedName:"vehicleCommercial",type:{name:"Boolean"}}},fh={parameterPath:["options","vehicleEngineType"],mapper:{serializedName:"vehicleEngineType",type:{name:"Enum",allowedValues:["combustion","electric"]}}},hp={parameterPath:["options","vehicleHeading"],mapper:{serializedName:"vehicleHeading",constraints:{InclusiveMaximum:359,InclusiveMinimum:0},type:{name:"Number"}}},eu={parameterPath:["options","vehicleHeight"],mapper:{serializedName:"vehicleHeight",type:{name:"Number"}}},ou={parameterPath:["options","vehicleLength"],mapper:{serializedName:"vehicleLength",type:{name:"Number"}}},su={parameterPath:["options","vehicleLoadType"],mapper:{serializedName:"vehicleLoadType",type:{name:"Enum",allowedValues:["USHazmatClass1","USHazmatClass2","USHazmatClass3","USHazmatClass4","USHazmatClass5","USHazmatClass6","USHazmatClass7","USHazmatClass8","USHazmatClass9","otherHazmatExplosive","otherHazmatGeneral","otherHazmatHarmfulToWater"]}}},hu={parameterPath:["options","vehicleMaxSpeed"],mapper:{serializedName:"vehicleMaxSpeed",type:{name:"Number"}}},cu={parameterPath:["options","vehicleWeight"],mapper:{serializedName:"vehicleWeight",type:{name:"Number"}}},lu={parameterPath:["options","vehicleWidth"],mapper:{serializedName:"vehicleWidth",type:{name:"Number"}}},b={parameterPath:["options","view"],mapper:{serializedName:"view",type:{name:"String"}}},au={parameterPath:["options","windingness"],mapper:{serializedName:"windingness",type:{name:"Enum",allowedValues:["low","normal","high"]}}},eh={parameterPath:"xTileIndex",mapper:{required:!0,serializedName:"x",type:{name:"Number"}}},oh={parameterPath:"yTileIndex",mapper:{required:!0,serializedName:"y",type:{name:"Number"}}},sh={parameterPath:"zoom",mapper:{required:!0,serializedName:"zoom",type:{name:"Number"}}},yg=function(){function n(n){this.client=n}return n.prototype.getSearchPolygon=function(n,t,i){return this.client.sendOperationRequest({geometries:n,options:t},pg,i)},n.prototype.getSearchFuzzy=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},wg,i)},n.prototype.getSearchPOI=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},bg,i)},n.prototype.getSearchNearby=function(n,t,i,r){return this.client.sendOperationRequest({lat:n,lon:t,options:i},kg,r)},n.prototype.getSearchPOICategory=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},dg,i)},n.prototype.getSearchAddress=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},gg,i)},n.prototype.getSearchAddressReverse=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},nn,i)},n.prototype.getSearchAddressReverseCrossStreet=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},tn,i)},n.prototype.getSearchAddressStructured=function(n,t,i){return this.client.sendOperationRequest({countryCode:n,options:t},rn,i)},n.prototype.postSearchInsideGeometry=function(n,t,i,r){return this.client.sendOperationRequest({query:n,searchInsideGeometryRequestBody:t,options:i},un,r)},n.prototype.postSearchAlongRoute=function(n,t,i,r,u){return this.client.sendOperationRequest({query:n,maxDetourTime:t,searchAlongRouteRequestBody:i,options:r},fn,u)},n.prototype.postSearchFuzzyBatchPreview=function(n,t){return this.beginPostSearchFuzzyBatchPreview(n,t).then(function(n){return n.pollUntilFinished()})},n.prototype.postSearchAddressBatchPreview=function(n,t){return this.beginPostSearchAddressBatchPreview(n,t).then(function(n){return n.pollUntilFinished()})},n.prototype.postSearchAddressReverseBatchPreview=function(n,t){return this.beginPostSearchAddressReverseBatchPreview(n,t).then(function(n){return n.pollUntilFinished()})},n.prototype.beginPostSearchFuzzyBatchPreview=function(n,t){return this.client.sendLRORequest({searchFuzzyBatchRequestBody:n,options:t},en,t)},n.prototype.beginPostSearchAddressBatchPreview=function(n,t){return this.client.sendLRORequest({searchAddressBatchRequestBody:n,options:t},on,t)},n.prototype.beginPostSearchAddressReverseBatchPreview=function(n,t){return this.client.sendLRORequest({searchAddressReverseBatchRequestBody:n,options:t},sn,t)},n}(),w=new it(fg),pg={httpMethod:"GET",path:"search/polygon/{format}",urlParameters:[o],queryParameters:[r,{parameterPath:"geometries",mapper:{required:!0,serializedName:"geometries",type:{name:"String"}}}],headerParameters:[u],responses:{200:{bodyMapper:ra},"default":{bodyMapper:i}},serializer:w},wg={httpMethod:"GET",path:"search/fuzzy/{format}",urlParameters:[o],queryParameters:[r,c,uu,ni,gs,yi,dr,gr,ft,tu,wr,h,ct,{parameterPath:["options","minFuzzyLevel"],mapper:{serializedName:"minFuzzyLevel",constraints:{InclusiveMaximum:4,InclusiveMinimum:1},type:{name:"Number"}}},{parameterPath:["options","maxFuzzyLevel"],mapper:{serializedName:"maxFuzzyLevel",constraints:{InclusiveMaximum:4,InclusiveMinimum:1},type:{name:"Number"}}},vy,ai,vi,b,wi],headerParameters:[u],responses:{200:{bodyMapper:ua},"default":{bodyMapper:i}},serializer:w},bg={httpMethod:"GET",path:"search/poi/{format}",urlParameters:[o],queryParameters:[r,c,uu,ni,gs,yi,dr,gr,ft,tu,wr,h,ct,ai,vi,b,wi],headerParameters:[u],responses:{200:{bodyMapper:fa},"default":{bodyMapper:i}},serializer:w},kg={httpMethod:"GET",path:"search/nearby/{format}",urlParameters:[o],queryParameters:[r,lt,at,ni,gs,yi,ft,h,ct,ai,vi,b],headerParameters:[u],responses:{200:{bodyMapper:ea},"default":{bodyMapper:i}},serializer:w},dg={httpMethod:"GET",path:"search/poi/category/{format}",urlParameters:[o],queryParameters:[r,c,uu,ni,yi,dr,gr,ft,tu,wr,h,ct,ai,vi,b,wi],headerParameters:[u],responses:{200:{bodyMapper:oa},"default":{bodyMapper:i}},serializer:w},gg={httpMethod:"GET",path:"search/address/{format}",urlParameters:[o],queryParameters:[r,c,uu,ni,{parameterPath:["options","ofs"],mapper:{serializedName:"ofs",constraints:{InclusiveMinimum:0},type:{name:"Number"}}},yi,dr,gr,ft,tu,wr,h,ct,b],headerParameters:[u],responses:{200:{bodyMapper:sa},"default":{bodyMapper:i}},serializer:w},nn={httpMethod:"GET",path:"search/address/reverse/{format}",urlParameters:[o],queryParameters:[r,c,h,{parameterPath:["options","returnSpeedLimit"],mapper:{serializedName:"returnSpeedLimit",type:{name:"Boolean"}}},ay,ft,{parameterPath:["options","number"],mapper:{serializedName:"number",type:{name:"String"}}},{parameterPath:["options","returnRoadUse"],mapper:{serializedName:"returnRoadUse",type:{name:"Boolean"}}},{parameterPath:["options","roadUse"],mapper:{serializedName:"roadUse",type:{name:"String"}}},{parameterPath:["options","allowFreeformNewline"],mapper:{serializedName:"allowFreeformNewline",type:{name:"Boolean"}}},{parameterPath:["options","returnMatchType"],mapper:{serializedName:"returnMatchType",type:{name:"Boolean"}}},{parameterPath:["options","entityType"],mapper:{serializedName:"entityType",type:{name:"Enum",allowedValues:["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","Neighbourhood","PostalCodeArea"]}}},b],headerParameters:[u],responses:{200:{bodyMapper:ha},"default":{bodyMapper:i}},serializer:w},tn={httpMethod:"GET",path:"search/address/reverse/crossStreet/{format}",urlParameters:[o],queryParameters:[r,c,ay,ft,h,b],headerParameters:[u],responses:{200:{bodyMapper:ca},"default":{bodyMapper:i}},serializer:w},rn={httpMethod:"GET",path:"search/address/structured/{format}",urlParameters:[o],queryParameters:[r,h,{parameterPath:"countryCode",mapper:{required:!0,serializedName:"countryCode",type:{name:"String"}}},ks,{parameterPath:["options","ofs"],mapper:{serializedName:"ofs",type:{name:"Number"}}},{parameterPath:["options","streetNumber"],mapper:{serializedName:"streetNumber",type:{name:"String"}}},{parameterPath:["options","streetName"],mapper:{serializedName:"streetName",type:{name:"String"}}},{parameterPath:["options","crossStreet"],mapper:{serializedName:"crossStreet",type:{name:"String"}}},{parameterPath:["options","municipality"],mapper:{serializedName:"municipality",type:{name:"String"}}},{parameterPath:["options","municipalitySubdivision"],mapper:{serializedName:"municipalitySubdivision",type:{name:"String"}}},{parameterPath:["options","countryTertiarySubdivision"],mapper:{serializedName:"countryTertiarySubdivision",type:{name:"String"}}},{parameterPath:["options","countrySecondarySubdivision"],mapper:{serializedName:"countrySecondarySubdivision",type:{name:"String"}}},{parameterPath:["options","countrySubdivision"],mapper:{serializedName:"countrySubdivision",type:{name:"String"}}},{parameterPath:["options","postalCode"],mapper:{serializedName:"postalCode",type:{name:"String"}}},ct,b],headerParameters:[u],responses:{200:{bodyMapper:la},"default":{bodyMapper:i}},serializer:w},un={httpMethod:"POST",path:"search/geometry/{format}",urlParameters:[o],queryParameters:[r,c,ni,h,ct,vy,b,wi],headerParameters:[u],requestBody:{parameterPath:"searchInsideGeometryRequestBody",mapper:t(t({},ya),{required:!0})},responses:{200:{bodyMapper:aa},"default":{bodyMapper:i}},serializer:w},fn={httpMethod:"POST",path:"search/alongRoute/{format}",urlParameters:[o],queryParameters:[r,c,{parameterPath:"maxDetourTime",mapper:{required:!0,serializedName:"maxDetourTime",constraints:{InclusiveMaximum:3600},type:{name:"Number"}}},{parameterPath:["options","limit"],mapper:{serializedName:"limit",constraints:{InclusiveMaximum:20},type:{name:"Number"}}},ai,vi,b,wi],headerParameters:[u],requestBody:{parameterPath:"searchAlongRouteRequestBody",mapper:t(t({},pa),{required:!0})},responses:{200:{bodyMapper:va},"default":{bodyMapper:i}},serializer:w},en={httpMethod:"POST",path:"search/fuzzy/batch/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],requestBody:{parameterPath:"searchFuzzyBatchRequestBody",mapper:t(t({},dt),{required:!0})},responses:{200:{bodyMapper:kt,headersMapper:ts},202:{headersMapper:ts},"default":{bodyMapper:i}},serializer:w},on={httpMethod:"POST",path:"search/address/batch/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],requestBody:{parameterPath:"searchAddressBatchRequestBody",mapper:t(t({},dt),{required:!0})},responses:{200:{bodyMapper:kt,headersMapper:is},202:{headersMapper:is},"default":{bodyMapper:i}},serializer:w},sn={httpMethod:"POST",path:"search/address/reverse/batch/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],requestBody:{parameterPath:"searchAddressReverseBatchRequestBody",mapper:t(t({},dt),{required:!0})},responses:{200:{bodyMapper:kt,headersMapper:rs},202:{headersMapper:rs},"default":{bodyMapper:i}},serializer:w},hn=Object.freeze({discriminators:gt,BatchRequestBody:dt,BatchRequestBodyBatchItemsItem:ia,BatchResponse:kt,BatchResponseSummary:ta,CloudError:i,Coordinate:ba,GeoJSONGeometry:y,GeoJSONGeometryCollection:wa,LineString:ei,MultiLineString:li,MultiPoint:oi,MultiPolygon:hi,Point:si,Polygon:ci,RouteDirectionsRequestBody:ka,RouteDirectionsRequestBodySupportingPoints:ug,RouteDirectionsResponse:ko,RouteDirectionsResult:{serializedName:"RouteDirectionsResult",type:{name:"Composite",className:"RouteDirectionsResult",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"RouteDirectionsSummary"}},legs:{readOnly:!0,serializedName:"legs",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteResultLeg"}}}},sections:{readOnly:!0,serializedName:"sections",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteResultSection"}}}},guidance:{serializedName:"guidance",type:{name:"Composite",className:"RouteResultGuidance"}}}}},RouteDirectionsSummary:{serializedName:"RouteDirectionsSummary",type:{name:"Composite",className:"RouteDirectionsSummary",modelProperties:{lengthInMeters:{readOnly:!0,serializedName:"lengthInMeters",type:{name:"Number"}},travelTimeInSeconds:{readOnly:!0,serializedName:"travelTimeInSeconds",type:{name:"Number"}},trafficDelayInSeconds:{readOnly:!0,serializedName:"trafficDelayInSeconds",type:{name:"Number"}},departureTime:{readOnly:!0,serializedName:"departureTime",type:{name:"String"}},arrivalTime:{readOnly:!0,serializedName:"arrivalTime",type:{name:"String"}}}}},RouteMatrixRequestBody:nv,RouteMatrixResponse:ga,RouteMatrixResult:{serializedName:"RouteMatrixResult",type:{name:"Composite",className:"RouteMatrixResult",modelProperties:{statusCode:{readOnly:!0,serializedName:"statusCode",type:{name:"Number"}},response:{serializedName:"response",type:{name:"Composite",className:"RouteMatrixResultResponse"}}}}},RouteMatrixResultResponse:{serializedName:"RouteMatrixResultResponse",type:{name:"Composite",className:"RouteMatrixResultResponse",modelProperties:{routeSummary:{serializedName:"routeSummary",type:{name:"Composite",className:"RouteResultLegSummary"}}}}},RouteMatrixSummary:{serializedName:"RouteMatrixSummary",type:{name:"Composite",className:"RouteMatrixSummary",modelProperties:{successfulRoutes:{readOnly:!0,serializedName:"successfulRoutes",type:{name:"Number"}},totalRoutes:{readOnly:!0,serializedName:"totalRoutes",type:{name:"Number"}}}}},RouteOptimizedWaypoint:{serializedName:"RouteOptimizedWaypoint",type:{name:"Composite",className:"RouteOptimizedWaypoint",modelProperties:{providedIndex:{readOnly:!0,serializedName:"providedIndex",type:{name:"Number"}},optimizedIndex:{readOnly:!0,serializedName:"optimizedIndex",type:{name:"Number"}}}}},RoutePostRouteDirectionsBatchPreviewHeaders:fs,RoutePostRouteMatrixPreviewHeaders:us,RouteRange:{serializedName:"RouteRange",type:{name:"Composite",className:"RouteRange",modelProperties:{center:{serializedName:"center",type:{name:"Composite",className:"Coordinate"}},boundary:{readOnly:!0,serializedName:"boundary",type:{name:"Sequence",element:{type:{name:"Composite",className:"Coordinate"}}}}}}},RouteRangeResponse:da,RouteResponseReport:{serializedName:"RouteResponseReport",type:{name:"Composite",className:"RouteResponseReport",modelProperties:{effectiveSettings:{readOnly:!0,serializedName:"effectiveSettings",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteResponseReportEffectiveSetting"}}}}}}},RouteResponseReportEffectiveSetting:{serializedName:"RouteResponseReportEffectiveSetting",type:{name:"Composite",className:"RouteResponseReportEffectiveSetting",modelProperties:{key:{readOnly:!0,serializedName:"key",type:{name:"String"}},value:{readOnly:!0,serializedName:"value",type:{name:"String"}}}}},RouteResultGuidance:{serializedName:"RouteResultGuidance",type:{name:"Composite",className:"RouteResultGuidance",modelProperties:{instructions:{readOnly:!0,serializedName:"instructions",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteResultInstruction"}}}},instructionGroups:{readOnly:!0,serializedName:"instructionGroups",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteResultInstructionGroup"}}}}}}},RouteResultInstruction:{serializedName:"RouteResultInstruction",type:{name:"Composite",className:"RouteResultInstruction",modelProperties:{routeOffsetInMeters:{readOnly:!0,serializedName:"routeOffsetInMeters",type:{name:"Number"}},travelTimeInSeconds:{readOnly:!0,serializedName:"travelTimeInSeconds",type:{name:"Number"}},point:{serializedName:"point",type:{name:"Composite",className:"Coordinate"}},instructionType:{serializedName:"instructionType",type:{name:"Enum",allowedValues:["TURN","ROAD_CHANGE","LOCATION_DEPARTURE","LOCATION_ARRIVAL","DIRECTION_INFO","LOCATION_WAYPOINT"]}},street:{readOnly:!0,serializedName:"street",type:{name:"String"}},countryCode:{readOnly:!0,serializedName:"countryCode",type:{name:"String"}},possibleCombineWithNext:{readOnly:!0,serializedName:"possibleCombineWithNext",type:{name:"Boolean"}},drivingSide:{readOnly:!0,serializedName:"drivingSide",type:{name:"Enum",allowedValues:["LEFT","RIGHT"]}},maneuver:{readOnly:!0,serializedName:"maneuver",type:{name:"Enum",allowedValues:["ARRIVE","ARRIVE_LEFT","ARRIVE_RIGHT","DEPART","STRAIGHT","KEEP_RIGHT","BEAR_RIGHT","TURN_RIGHT","SHARP_RIGHT","KEEP_LEFT","BEAR_LEFT","TURN_LEFT","SHARP_LEFT","MAKE_UTURN","ENTER_MOTORWAY","ENTER_FREEWAY","ENTER_HIGHWAY","TAKE_EXIT","MOTORWAY_EXIT_LEFT","MOTORWAY_EXIT_RIGHT","TAKE_FERRY","ROUNDABOUT_CROSS","ROUNDABOUT_RIGHT","ROUNDABOUT_LEFT","ROUNDABOUT_BACK","TRY_MAKE_UTURN","FOLLOW","SWITCH_PARALLEL_ROAD","SWITCH_MAIN_ROAD","ENTRANCE_RAMP","WAYPOINT_LEFT","WAYPOINT_RIGHT","WAYPOINT_REACHED"]}},message:{readOnly:!0,serializedName:"message",type:{name:"String"}}}}},RouteResultInstructionGroup:{serializedName:"RouteResultInstructionGroup",type:{name:"Composite",className:"RouteResultInstructionGroup",modelProperties:{firstInstructionIndex:{readOnly:!0,serializedName:"firstInstructionIndex",type:{name:"Number"}},lastInstructionIndex:{readOnly:!0,serializedName:"lastInstructionIndex",type:{name:"Number"}},groupLengthInMeters:{readOnly:!0,serializedName:"groupLengthInMeters",type:{name:"Number"}},groupMessage:{readOnly:!0,serializedName:"groupMessage",type:{name:"String"}}}}},RouteResultLeg:{serializedName:"RouteResultLeg",type:{name:"Composite",className:"RouteResultLeg",modelProperties:{summary:{serializedName:"summary",type:{name:"Composite",className:"RouteResultLegSummary"}},points:{readOnly:!0,serializedName:"points",type:{name:"Sequence",element:{type:{name:"Composite",className:"Coordinate"}}}}}}},RouteResultLegSummary:{serializedName:"RouteResultLegSummary",type:{name:"Composite",className:"RouteResultLegSummary",modelProperties:{lengthInMeters:{readOnly:!0,serializedName:"lengthInMeters",type:{name:"Number"}},travelTimeInSeconds:{readOnly:!0,serializedName:"travelTimeInSeconds",type:{name:"Number"}},trafficDelayInSeconds:{readOnly:!0,serializedName:"trafficDelayInSeconds",type:{name:"Number"}},departureTime:{readOnly:!0,serializedName:"departureTime",type:{name:"String"}},arrivalTime:{readOnly:!0,serializedName:"arrivalTime",type:{name:"String"}},noTrafficTravelTimeInSeconds:{readOnly:!0,serializedName:"noTrafficTravelTimeInSeconds",type:{name:"Number"}},historicTrafficTravelTimeInSeconds:{readOnly:!0,serializedName:"historicTrafficTravelTimeInSeconds",type:{name:"Number"}},liveTrafficIncidentsTravelTimeInSeconds:{readOnly:!0,serializedName:"liveTrafficIncidentsTravelTimeInSeconds",type:{name:"Number"}},fuelConsumptionInLiters:{readOnly:!0,serializedName:"fuelConsumptionInLiters",type:{name:"Number"}},batteryConsumptionInkWh:{readOnly:!0,serializedName:"batteryConsumptionInkWh",type:{name:"Number"}}}}},RouteResultSection:{serializedName:"RouteResultSection",type:{name:"Composite",className:"RouteResultSection",modelProperties:{startPointIndex:{readOnly:!0,serializedName:"startPointIndex",type:{name:"Number"}},endPointIndex:{readOnly:!0,serializedName:"endPointIndex",type:{name:"Number"}},sectionType:{readOnly:!0,serializedName:"sectionType",type:{name:"String"}},travelMode:{readOnly:!0,serializedName:"travelMode",type:{name:"String"}},simpleCategory:{readOnly:!0,serializedName:"simpleCategory",type:{name:"String"}},effectiveSpeedInKmh:{readOnly:!0,serializedName:"effectiveSpeedInKmh",type:{name:"Number"}},delayInSeconds:{readOnly:!0,serializedName:"delayInSeconds",type:{name:"Number"}},magnitudeOfDelay:{readOnly:!0,serializedName:"magnitudeOfDelay",type:{name:"Enum",allowedValues:["0","1","2","3","4"]}},tec:{serializedName:"tec",type:{name:"Composite",className:"RouteResultSectionTec"}}}}},RouteResultSectionTec:{serializedName:"RouteResultSectionTec",type:{name:"Composite",className:"RouteResultSectionTec",modelProperties:{effectCode:{readOnly:!0,serializedName:"effectCode",type:{name:"Number"}},causes:{serializedName:"causes",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteResultSectionTecCause"}}}}}}},RouteResultSectionTecCause:{serializedName:"RouteResultSectionTecCause",type:{name:"Composite",className:"RouteResultSectionTecCause",modelProperties:{mainCauseCode:{readOnly:!0,serializedName:"mainCauseCode",type:{name:"Number"}},subCauseCode:{readOnly:!0,serializedName:"subCauseCode",type:{name:"Number"}}}}}}),cn=function(){function n(n){this.client=n}return n.prototype.postRouteMatrixPreview=function(n,t){return this.beginPostRouteMatrixPreview(n,t).then(function(n){return n.pollUntilFinished()})},n.prototype.getRouteDirections=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},ln,i)},n.prototype.postRouteDirections=function(n,t,i,r){return this.client.sendOperationRequest({query:n,routeDirectionsRequestBody:t,options:i},an,r)},n.prototype.getRouteRange=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},vn,i)},n.prototype.postRouteDirectionsBatchPreview=function(n,t){return this.beginPostRouteDirectionsBatchPreview(n,t).then(function(n){return n.pollUntilFinished()})},n.prototype.beginPostRouteMatrixPreview=function(n,t){return this.client.sendLRORequest({routeMatrixBody:n,options:t},yn,t)},n.prototype.beginPostRouteDirectionsBatchPreview=function(n,t){return this.client.sendLRORequest({routeDirectionsBatchRequestBody:n,options:t},pn,t)},n}(),bi=new it(hn),ln={httpMethod:"GET",path:"route/directions/{format}",urlParameters:[o],queryParameters:[r,c,wy,sy,by,os,br,ky,yy,h,hy,ip,cs,hp,tp,nh,fu,lu,eu,ou,hu,cu,uh,au,kr,ru,pr,iu,nu,su,fh,as,ys,hs,bs,es,ps,rh,ws,ls,vs,ds,ss],headerParameters:[u],responses:{200:{bodyMapper:ko},"default":{bodyMapper:i}},serializer:bi},an={httpMethod:"POST",path:"route/directions/{format}",urlParameters:[o],queryParameters:[r,c,wy,sy,by,ky,yy,h,hy,ip,cs,hp,tp,nh,os,br,fu,ou,eu,lu,hu,cu,uh,au,kr,ru,pr,iu,nu,su,fh,as,ys,hs,bs,es,ps,rh,ws,ls,vs,ds,ss],headerParameters:[u],requestBody:{parameterPath:"routeDirectionsRequestBody",mapper:t(t({},ka),{required:!0})},responses:{200:{bodyMapper:ko},"default":{bodyMapper:i}},serializer:bi},vn={httpMethod:"GET",path:"route/range/{format}",urlParameters:[o],queryParameters:[r,c,{parameterPath:["options","fuelBudgetInLiters"],mapper:{serializedName:"fuelBudgetInLiters",type:{name:"Number"}}},{parameterPath:["options","energyBudgetInkWh"],mapper:{serializedName:"energyBudgetInkWh",type:{name:"Number"}}},{parameterPath:["options","timeBudgetInSec"],mapper:{serializedName:"timeBudgetInSec",type:{name:"Number"}}},br,nu,iu,pr,ru,kr,au,fu,lu,eu,ou,hu,cu,uh,su,fh,as,ys,hs,bs,es,ps,rh,ws,ls,vs,ds,ss],headerParameters:[u],responses:{200:{bodyMapper:da},"default":{bodyMapper:i}},serializer:bi},yn={httpMethod:"POST",path:"route/matrix/{format}",urlParameters:[o],queryParameters:[r,{parameterPath:["options","waitForResults"],mapper:{serializedName:"waitForResults",type:{name:"Boolean"}}},cs,nh,os,br,fu,ou,eu,lu,hu,cu,au,kr,ru,pr,iu,nu,su],headerParameters:[u],requestBody:{parameterPath:"routeMatrixBody",mapper:t(t({},nv),{required:!0})},responses:{200:{bodyMapper:ga,headersMapper:us},202:{headersMapper:us},"default":{bodyMapper:i}},serializer:bi},pn={httpMethod:"POST",path:"route/directions/batch/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],requestBody:{parameterPath:"routeDirectionsBatchRequestBody",mapper:t(t({},dt),{required:!0})},responses:{200:{bodyMapper:kt,headersMapper:fs},202:{headersMapper:fs},"default":{bodyMapper:i}},serializer:bi},wn=Object.freeze({discriminators:gt,CloudError:i,Country:{serializedName:"Country",type:{name:"Composite",className:"Country",modelProperties:{name:{readOnly:!0,serializedName:"Name",type:{name:"String"}},code:{readOnly:!0,serializedName:"Code",type:{name:"String"}}}}},IanaId:{serializedName:"IanaId",type:{name:"Composite",className:"IanaId",modelProperties:{id:{readOnly:!0,serializedName:"id",type:{name:"String"}},isAlias:{readOnly:!0,serializedName:"isAlias",type:{name:"Boolean"}},aliasOf:{readOnly:!0,serializedName:"aliasOf",type:{name:"String"}},hasZone1970Location:{readOnly:!0,serializedName:"hasZone1970Location",type:{name:"Boolean"}}}}},Names:{serializedName:"Names",type:{name:"Composite",className:"Names",modelProperties:{iSO6391LanguageCode:{readOnly:!0,serializedName:"ISO6391LanguageCode",type:{name:"String"}},generic:{readOnly:!0,serializedName:"Generic",type:{name:"String"}},standard:{readOnly:!0,serializedName:"Standard",type:{name:"String"}},daylight:{readOnly:!0,serializedName:"Daylight",type:{name:"String"}}}}},ReferenceTimeByCoordinates:{serializedName:"ReferenceTimeByCoordinates",type:{name:"Composite",className:"ReferenceTimeByCoordinates",modelProperties:{tag:{readOnly:!0,serializedName:"Tag",type:{name:"String"}},standardOffset:{readOnly:!0,serializedName:"StandardOffset",type:{name:"String"}},daylightSavings:{readOnly:!0,serializedName:"DaylightSavings",type:{name:"String"}},wallTime:{readOnly:!0,serializedName:"WallTime",type:{name:"String"}},posixTzValidYear:{readOnly:!0,serializedName:"PosixTzValidYear",type:{name:"Number"}},posixTz:{readOnly:!0,serializedName:"PosixTz",type:{name:"String"}},sunrise:{readOnly:!0,serializedName:"Sunrise",type:{name:"String"}},sunset:{readOnly:!0,serializedName:"Sunset",type:{name:"String"}}}}},ReferenceTimeById:{serializedName:"ReferenceTimeById",type:{name:"Composite",className:"ReferenceTimeById",modelProperties:{tag:{readOnly:!0,serializedName:"Tag",type:{name:"String"}},standardOffset:{readOnly:!0,serializedName:"StandardOffset",type:{name:"String"}},daylightSavings:{readOnly:!0,serializedName:"DaylightSavings",type:{name:"String"}},wallTime:{readOnly:!0,serializedName:"WallTime",type:{name:"String"}},posixTzValidYear:{readOnly:!0,serializedName:"PosixTzValidYear",type:{name:"Number"}},posixTz:{readOnly:!0,serializedName:"PosixTz",type:{name:"String"}}}}},RepresentativePoint:{serializedName:"RepresentativePoint",type:{name:"Composite",className:"RepresentativePoint",modelProperties:{latitude:{readOnly:!0,serializedName:"Latitude",type:{name:"Number"}},longitude:{readOnly:!0,serializedName:"Longitude",type:{name:"Number"}}}}},TimeTransition:{serializedName:"TimeTransition",type:{name:"Composite",className:"TimeTransition",modelProperties:{tag:{readOnly:!0,serializedName:"Tag",type:{name:"String"}},standardOffset:{readOnly:!0,serializedName:"StandardOffset",type:{name:"String"}},daylightSavings:{readOnly:!0,serializedName:"DaylightSavings",type:{name:"String"}},utcStart:{readOnly:!0,serializedName:"UtcStart",type:{name:"DateTime"}},utcEnd:{readOnly:!0,serializedName:"UtcEnd",type:{name:"DateTime"}}}}},TimeZoneByCoordinates:{serializedName:"TimeZoneByCoordinates",type:{name:"Composite",className:"TimeZoneByCoordinates",modelProperties:{id:{readOnly:!0,serializedName:"Id",type:{name:"String"}},aliases:{readOnly:!0,serializedName:"Aliases",type:{name:"Sequence",element:{type:{name:"String"}}}},countries:{readOnly:!0,serializedName:"Countries",type:{name:"Sequence",element:{type:{name:"Composite",className:"Country"}}}},names:{serializedName:"Names",type:{name:"Composite",className:"Names"}},referenceTime:{serializedName:"ReferenceTime",type:{name:"Composite",className:"ReferenceTimeByCoordinates"}},representativePoint:{serializedName:"RepresentativePoint",type:{name:"Composite",className:"RepresentativePoint"}},timeTransitions:{readOnly:!0,serializedName:"TimeTransitions",type:{name:"Sequence",element:{type:{name:"Composite",className:"TimeTransition"}}}}}}},TimezoneByCoordinatesResult:iv,TimezoneById:{serializedName:"TimezoneById",type:{name:"Composite",className:"TimezoneById",modelProperties:{id:{readOnly:!0,serializedName:"Id",type:{name:"String"}},aliases:{readOnly:!0,serializedName:"Aliases",type:{name:"Sequence",element:{type:{name:"String"}}}},countries:{readOnly:!0,serializedName:"Countries",type:{name:"Sequence",element:{type:{name:"Composite",className:"Country"}}}},names:{serializedName:"Names",type:{name:"Composite",className:"Names"}},referenceTime:{serializedName:"ReferenceTime",type:{name:"Composite",className:"ReferenceTimeById"}},representativePoint:{serializedName:"RepresentativePoint",type:{name:"Composite",className:"RepresentativePoint"}},timeTransitions:{readOnly:!0,serializedName:"TimeTransitions",type:{name:"Sequence",element:{type:{name:"Composite",className:"TimeTransition"}}}}}}},TimezoneByIdResult:tv,TimezoneEnumWindow:{serializedName:"TimezoneEnumWindow",type:{name:"Composite",className:"TimezoneEnumWindow",modelProperties:{windowsId:{readOnly:!0,serializedName:"WindowsId",type:{name:"String"}},territory:{readOnly:!0,serializedName:"Territory",type:{name:"String"}},ianaIds:{serializedName:"IanaIds",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},TimezoneIanaVersionResult:rv}),bn=function(){function n(n){this.client=n}return n.prototype.getTimezoneByID=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},kn,i)},n.prototype.getTimezoneByCoordinates=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},dn,i)},n.prototype.getTimezoneEnumWindows=function(n,t){return this.client.sendOperationRequest({options:n},gn,t)},n.prototype.getTimezoneEnumIANA=function(n,t){return this.client.sendOperationRequest({options:n},ntt,t)},n.prototype.getTimezoneIANAVersion=function(n,t){return this.client.sendOperationRequest({options:n},ttt,t)},n.prototype.getTimezoneWindowsToIANA=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},itt,i)},n}(),ti=new it(wn),kn={httpMethod:"GET",path:"timezone/byId/{format}",urlParameters:[o],queryParameters:[r,np,up,fp,ep,c],headerParameters:[fy],responses:{200:{bodyMapper:tv},"default":{bodyMapper:i}},serializer:ti},dn={httpMethod:"GET",path:"timezone/byCoordinates/{format}",urlParameters:[o],queryParameters:[r,np,up,fp,ep,c],headerParameters:[fy],responses:{200:{bodyMapper:iv},"default":{bodyMapper:i}},serializer:ti},gn={httpMethod:"GET",path:"timezone/enumWindows/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Sequence",element:{type:{name:"Composite",className:"TimezoneEnumWindow"}}}}},"default":{bodyMapper:i}},serializer:ti},ntt={httpMethod:"GET",path:"timezone/enumIana/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Sequence",element:{type:{name:"Composite",className:"IanaId"}}}}},"default":{bodyMapper:i}},serializer:ti},ttt={httpMethod:"GET",path:"timezone/ianaVersion/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],responses:{200:{bodyMapper:rv},"default":{bodyMapper:i}},serializer:ti},itt={httpMethod:"GET",path:"timezone/windowsToIana/{format}",urlParameters:[o],queryParameters:[r,c,{parameterPath:["options","territory"],mapper:{serializedName:"territory",type:{name:"String"}}}],headerParameters:[u],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Sequence",element:{type:{name:"Composite",className:"IanaId"}}}}},"default":{bodyMapper:i}},serializer:ti},rtt=Object.freeze({discriminators:gt,CloudError:i,CopyrightBoundingResult:uv,CopyrightCaptionResult:fv,CopyrightTileResult:ov,CopyrightWorldResult:ev,Region:{serializedName:"Region",type:{name:"Composite",className:"Region",modelProperties:{copyrights:{readOnly:!0,serializedName:"copyrights",type:{name:"Sequence",element:{type:{name:"String"}}}},country:{readOnly:!0,serializedName:"country",type:{name:"Composite",className:"RegionCountry"}}}}},RegionCountry:{serializedName:"Region_country",type:{name:"Composite",className:"RegionCountry",modelProperties:{iSO3:{readOnly:!0,serializedName:"ISO3",type:{name:"String"}},label:{readOnly:!0,serializedName:"label",type:{name:"String"}}}}}}),utt=function(){function n(n){this.client=n}return n.prototype.getMapImage=function(n,t){return this.client.sendOperationRequest({options:n},ftt,t)},n.prototype.getMapTile=function(n,t,i,r,u,f,e,o){return this.client.sendOperationRequest({format:n,layer:t,style:i,zoom:r,xTileIndex:u,yTileIndex:f,options:e},ett,o)},n.prototype.getCopyrightCaption=function(n,t){return this.client.sendOperationRequest({options:n},ott,t)},n.prototype.getMapImageryTile=function(n,t,i,r,u){return this.client.sendOperationRequest({zoom:n,xTileIndex:t,yTileIndex:i,options:r},stt,u)},n.prototype.getCopyrightFromBoundingBox=function(n,t,i,r){return this.client.sendOperationRequest({mincoordinates:n,maxcoordinates:t,options:i},htt,r)},n.prototype.getCopyrightForTile=function(n,t,i,r,u){return this.client.sendOperationRequest({zoom:n,xTileIndex:t,yTileIndex:i,options:r},ctt,u)},n.prototype.getCopyrightForWorld=function(n,t){return this.client.sendOperationRequest({options:n},ltt,t)},n}(),vt=new it(rtt),ftt={httpMethod:"GET",path:"map/static/{format}",urlParameters:[ly],queryParameters:[r,vg,ag,{parameterPath:["options","layer"],mapper:{serializedName:"layer",type:{name:"Enum",allowedValues:["basic","hybrid","labels"]}}},{parameterPath:["options","style"],mapper:{serializedName:"style",type:{name:"String"}}},{parameterPath:["options","zoom"],mapper:{serializedName:"zoom",constraints:{InclusiveMaximum:20,InclusiveMinimum:0},type:{name:"Number"}}},{parameterPath:["options","center"],mapper:{serializedName:"center",type:{name:"String"}}},{parameterPath:["options","bbox"],mapper:{serializedName:"bbox",type:{name:"String"}}},{parameterPath:["options","height"],mapper:{serializedName:"height",constraints:{InclusiveMaximum:8192,InclusiveMinimum:1},type:{name:"Number"}}},{parameterPath:["options","width"],mapper:{serializedName:"width",constraints:{InclusiveMaximum:8192,InclusiveMinimum:1},type:{name:"Number"}}},h,b],headerParameters:[u],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},"default":{bodyMapper:i}},serializer:vt},ett={httpMethod:"GET",path:"map/tile/{format}",urlParameters:[{parameterPath:"format",mapper:{required:!0,serializedName:"format",type:{name:"Enum",allowedValues:["png","pbf"]}}}],queryParameters:[r,{parameterPath:"layer",mapper:{required:!0,serializedName:"layer",type:{name:"Enum",allowedValues:["basic","hybrid","labels","terra"]}}},{parameterPath:"style",mapper:{required:!0,serializedName:"style",type:{name:"Enum",allowedValues:["main","shaded_relief"]}}},sh,eh,oh,{parameterPath:["options","tileSize"],mapper:{serializedName:"tileSize",type:{name:"Number"}}},h,b],headerParameters:[u],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},"default":{bodyMapper:i}},serializer:vt},ott={httpMethod:"GET",path:"map/copyright/caption/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],responses:{200:{bodyMapper:fv},"default":{bodyMapper:i}},serializer:vt},stt={httpMethod:"GET",path:"map/imagery/{format}",urlParameters:[ly],queryParameters:[r,{parameterPath:"style",mapper:{required:!0,isConstant:!0,serializedName:"style",defaultValue:"satellite",type:{name:"String"}}},sh,eh,oh],headerParameters:[u],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},"default":{bodyMapper:i}},serializer:vt},htt={httpMethod:"GET",path:"map/copyright/bounding/{format}",urlParameters:[o],queryParameters:[r,{parameterPath:"mincoordinates",mapper:{required:!0,serializedName:"mincoordinates",type:{name:"String"}}},{parameterPath:"maxcoordinates",mapper:{required:!0,serializedName:"maxcoordinates",type:{name:"String"}}},th],headerParameters:[u],responses:{200:{bodyMapper:uv},"default":{bodyMapper:i}},serializer:vt},ctt={httpMethod:"GET",path:"map/copyright/tile/{format}",urlParameters:[o],queryParameters:[r,sh,eh,oh,th],headerParameters:[u],responses:{200:{bodyMapper:ov},"default":{bodyMapper:i}},serializer:vt},ltt={httpMethod:"GET",path:"map/copyright/world/{format}",urlParameters:[o],queryParameters:[r,th],headerParameters:[u],responses:{200:{bodyMapper:ev},"default":{bodyMapper:i}},serializer:vt},att=Object.freeze({discriminators:gt,Agency:{serializedName:"Agency",type:{name:"Composite",className:"Agency",modelProperties:{agencyId:{serializedName:"agencyId",type:{name:"String"}},agencyKey:{serializedName:"agencyKey",type:{name:"String"}},agencyName:{serializedName:"agencyName",type:{name:"String"}},transitType:{serializedName:"transitType",type:{name:"Composite",className:"TransitTypeResult"}}}}},Alert:{serializedName:"Alert",type:{name:"Composite",className:"Alert",modelProperties:{alertSummary:{serializedName:"alertSummary",type:{name:"String"}},publicationDate:{serializedName:"publicationDate",type:{name:"DateTime"}},category:{serializedName:"category",type:{name:"String"}},alertLevel:{serializedName:"alertLevel",type:{name:"String"}},details:{serializedName:"details",type:{name:"Composite",className:"AlertDetail"}}}}},AlertDescription:{serializedName:"AlertDescription",type:{name:"Composite",className:"AlertDescription",modelProperties:{data:{serializedName:"data",type:{name:"String"}},format:{serializedName:"format",type:{name:"String"}},sourceUrl:{serializedName:"sourceUrl",type:{name:"String"}}}}},AlertDetail:{serializedName:"AlertDetail",type:{name:"Composite",className:"AlertDetail",modelProperties:{agencyId:{serializedName:"agencyId",type:{name:"String"}},agencyName:{serializedName:"agencyName",type:{name:"String"}},title:{serializedName:"title",type:{name:"String"}},description:{serializedName:"description",type:{name:"Composite",className:"AlertDescription"}},activeFrom:{serializedName:"activeFrom",type:{name:"DateTime"}},activeTo:{serializedName:"activeTo",type:{name:"DateTime"}},effect:{serializedName:"effect",type:{name:"String"}}}}},CarShareResponse:yv,CloudError:i,Coordinate:ba,Direction:{serializedName:"Direction",type:{name:"Composite",className:"Direction",modelProperties:{relativeDirection:{serializedName:"relativeDirection",type:{name:"Enum",allowedValues:["depart","hardLeft","left","slightlyLeft","continue","slightlyRight","right","hardRight","circleClockwise","circleCounterclockwise","elevator","uturnLeft","uturnRight"]}},absoluteDirection:{serializedName:"absoluteDirection",type:{name:"Enum",allowedValues:["north","northeast","east","southeast","south","southwest","west","northwest"]}}}}},GeoJSONGeometry:y,ItineraryResult:{serializedName:"ItineraryResult",type:{name:"Composite",className:"ItineraryResult",modelProperties:{itineraryId:{serializedName:"itineraryId",type:{name:"String"}},departureTime:{serializedName:"departureTime",type:{name:"DateTime"}},arrivalTime:{serializedName:"arrivalTime",type:{name:"DateTime"}},travelTimeInSeconds:{serializedName:"travelTimeInSeconds",type:{name:"Number"}},numberOfLegs:{serializedName:"numberOfLegs",type:{name:"Number"}},legs:{serializedName:"legs",type:{name:"Sequence",element:{type:{name:"Composite",className:"RouteItineraryLeg"}}}}}}},Leg:{serializedName:"Leg",type:{name:"Composite",className:"Leg",modelProperties:{legType:{serializedName:"legType",type:{name:"Enum",allowedValues:["Walk","Bicycle","Tram","Subway","Rail","Bus","Ferry","Cable","Gondola","Funicular","PathWayWalk","Wait","WaitOnVehicle"]}},legStartTime:{serializedName:"legStartTime",type:{name:"String"}},legEndTime:{serializedName:"legEndTime",type:{name:"String"}},steps:{serializedName:"steps",type:{name:"Sequence",element:{type:{name:"Composite",className:"Step"}}}},origin:{serializedName:"origin",type:{name:"Composite",className:"LegPoint"}},destination:{serializedName:"destination",type:{name:"Composite",className:"LegPoint"}},geometry:{serializedName:"geometry",type:{name:"Composite",className:"LineString"}},lineGroup:{serializedName:"lineGroup",type:{name:"Composite",className:"LineGroup"}},line:{serializedName:"line",type:{name:"Composite",className:"Line"}},stops:{serializedName:"stops",type:{name:"Sequence",element:{type:{name:"Composite",className:"Stop"}}}},departures:{serializedName:"departures",type:{name:"Sequence",element:{type:{name:"Composite",className:"LineArrival"}}}},waitOnVehicle:{serializedName:"waitOnVehicle",type:{name:"String"}}}}},LegPoint:{serializedName:"LegPoint",type:{name:"Composite",className:"LegPoint",modelProperties:{position:{serializedName:"position",type:{name:"Composite",className:"Coordinate"}}}}},Line:{serializedName:"Line",type:{name:"Composite",className:"Line",modelProperties:{lineId:{serializedName:"lineId",type:{name:"String"}},lineGroupId:{serializedName:"lineGroupId",type:{name:"String"}},direction:{serializedName:"direction",type:{name:"String"}},agencyId:{serializedName:"agencyId",type:{name:"String"}},agencyName:{serializedName:"agencyName",type:{name:"String"}},lineNumber:{serializedName:"lineNumber",type:{name:"String"}},origin:{serializedName:"origin",type:{name:"String"}},lineDestination:{serializedName:"lineDestination",type:{name:"String"}},mostFrequentPatternId:{serializedName:"mostFrequentPatternId",type:{name:"String"}},transitType:{serializedName:"transitType",type:{name:"Enum",allowedValues:["Bus","CableCar","Ferry","Funicular","Gondola","Rail","Tram","Subway"]}}}}},LineArrival:{serializedName:"LineArrival",type:{name:"Composite",className:"LineArrival",modelProperties:{lineId:{serializedName:"lineId",type:{name:"String"}},stopId:{serializedName:"stopId",type:{name:"String"}},scheduleTime:{serializedName:"scheduleTime",type:{name:"DateTime"}},scheduleType:{serializedName:"scheduleType",type:{name:"Enum",allowedValues:["scheduledTime","realTime"]}}}}},LineGroup:{serializedName:"LineGroup",type:{name:"Composite",className:"LineGroup",modelProperties:{lineGroupId:{serializedName:"lineGroupId",type:{name:"String"}},agencyId:{serializedName:"agencyId",type:{name:"String"}},agencyName:{serializedName:"agencyName",type:{name:"String"}},lineNumber:{serializedName:"lineNumber",type:{name:"String"}},caption1:{serializedName:"caption1",type:{name:"String"}},caption2:{serializedName:"caption2",type:{name:"String"}},color:{serializedName:"color",type:{name:"String"}},transitType:{serializedName:"transitType",type:{name:"Enum",allowedValues:["Bus","CableCar","Ferry","Funicular","Gondola","Rail","Tram","Subway"]}}}}},LineString:ei,MetroAreaInfoResponse:hv,MetroAreaResponse:sv,MetroAreaResult:{serializedName:"MetroAreaResult",type:{name:"Composite",className:"MetroAreaResult",modelProperties:{metroId:{serializedName:"metroId",type:{name:"Number"}},metroName:{serializedName:"metroName",type:{name:"String"}},geometry:{serializedName:"geometry",type:{name:"Composite",className:"Polygon"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"ResultViewport"}}}}},MultiLineString:li,MultiPoint:oi,MultiPolygon:hi,NearbyTransitResponse:cv,OperatorInfo:{serializedName:"OperatorInfo",type:{name:"Composite",className:"OperatorInfo",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},description:{serializedName:"description",type:{name:"String"}},siteUrl:{serializedName:"siteUrl",type:{name:"String"}}}}},Pattern:{serializedName:"Pattern",type:{name:"Composite",className:"Pattern",modelProperties:{patternId:{serializedName:"patternId",type:{name:"String"}},lineId:{serializedName:"lineId",type:{name:"String"}},stopIds:{serializedName:"stopIds",type:{name:"Sequence",element:{type:{name:"String"}}}},geometry:{serializedName:"geometry",type:{name:"Composite",className:"LineString"}}}}},Point:si,Polygon:ci,Pricing:{serializedName:"Pricing",type:{name:"Composite",className:"Pricing",modelProperties:{currency:{serializedName:"currency",type:{name:"String"}},usagePrice:{serializedName:"usagePrice",type:{name:"String"}},reservationPrice:{serializedName:"reservationPrice",type:{name:"String"}}}}},RealTimeArrivalResult:{serializedName:"RealTimeArrivalResult",type:{name:"Composite",className:"RealTimeArrivalResult",modelProperties:{arrivalMinutes:{serializedName:"arrivalMinutes",type:{name:"Number"}},scheduleType:{serializedName:"scheduleType",type:{name:"Enum",allowedValues:["scheduledTime","realTime"]}},patternId:{serializedName:"patternId",type:{name:"String"}},line:{serializedName:"line",type:{name:"Composite",className:"Line"}},stop:{serializedName:"stop",type:{name:"Composite",className:"Stop"}}}}},RealTimeArrivalsResponse:bv,ResultViewport:{serializedName:"ResultViewport",type:{name:"Composite",className:"ResultViewport",modelProperties:{topLeftPoint:{serializedName:"topLeftPoint",type:{name:"Composite",className:"Coordinate"}},btmRightPoint:{serializedName:"btmRightPoint",type:{name:"Composite",className:"Coordinate"}}}}},RouteItineraryLeg:{serializedName:"RouteItineraryLeg",type:{name:"Composite",className:"RouteItineraryLeg",modelProperties:{legType:{serializedName:"legType",type:{name:"Enum",allowedValues:["Walk","Bicycle","Tram","Subway","Rail","Bus","Ferry","Cable","Gondola","Funicular","PathWayWalk","Wait","WaitOnVehicle"]}},legStartTime:{serializedName:"legStartTime",type:{name:"String"}},legEndTime:{serializedName:"legEndTime",type:{name:"String"}},caption:{serializedName:"caption",type:{name:"String"}},lengthInMeters:{serializedName:"lengthInMeters",type:{name:"Number"}}}}},Step:{serializedName:"Step",type:{name:"Composite",className:"Step",modelProperties:{direction:{serializedName:"direction",type:{name:"Composite",className:"Direction"}},streetName:{serializedName:"streetName",type:{name:"String"}}}}},Stop:{serializedName:"Stop",type:{name:"Composite",className:"Stop",modelProperties:{stopId:{serializedName:"stopId",type:{name:"String"}},stopKey:{serializedName:"stopKey",type:{name:"String"}},stopName:{serializedName:"stopName",type:{name:"String"}},stopCode:{serializedName:"stopCode",type:{name:"String"}},position:{serializedName:"position",type:{name:"Composite",className:"Coordinate"}},mainTransitType:{serializedName:"mainTransitType",type:{name:"String"}},mainAgencyId:{serializedName:"mainAgencyId",type:{name:"String"}},mainAgencyName:{serializedName:"mainAgencyName",type:{name:"String"}}}}},TransitDockInfoResponse:pv,TransitItineraryResponse:vv,TransitLineInfoResponse:wv,TransitObjectResult:{serializedName:"TransitObjectResult",type:{name:"Composite",className:"TransitObjectResult",modelProperties:{id:{serializedName:"id",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}},objectDetails:{serializedName:"objectDetails",type:{name:"Object"}},position:{serializedName:"position",type:{name:"Composite",className:"Coordinate"}},viewport:{serializedName:"viewport",type:{name:"Composite",className:"ResultViewport"}}}}},TransitRouteResponse:av,TransitStopInfoResponse:lv,TransitTypeResult:{serializedName:"TransitTypeResult",type:{name:"Composite",className:"TransitTypeResult",modelProperties:{transitType:{serializedName:"transitType",type:{name:"Enum",allowedValues:["Bus","CableCar","Ferry","Funicular","Gondola","Rail","Tram","Subway"]}},captionOverride:{serializedName:"captionOverride",type:{name:"String"}}}}}}),vtt=function(){function n(n){this.client=n}return n.prototype.getMetroAreaPreview=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},ytt,i)},n.prototype.getMetroAreaInfoPreview=function(n,t,i,r){return this.client.sendOperationRequest({query:n,detailType:t,options:i},ptt,r)},n.prototype.getNearbyTransitPreview=function(n,t,i,r){return this.client.sendOperationRequest({metroId:n,query:t,options:i},wtt,r)},n.prototype.getTransitDockInfoPreview=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},btt,i)},n.prototype.getCarShareInfoPreview=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},ktt,i)},n.prototype.getTransitLineInfoPreview=function(n,t,i,r){return this.client.sendOperationRequest({metroId:n,query:t,options:i},dtt,r)},n.prototype.getTransitStopInfoPreview=function(n,t,i,r){return this.client.sendOperationRequest({metroId:n,query:t,options:i},gtt,r)},n.prototype.getTransitRoutePreview=function(n,t,i,r,u){return this.client.sendOperationRequest({metroId:n,origin:t,destination:i,options:r},nit,u)},n.prototype.getTransitItineraryPreview=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},tit,i)},n.prototype.getRealTimeArrivalsPreview=function(n,t,i,r){return this.client.sendOperationRequest({metroId:n,query:t,options:i},iit,r)},n}(),d=new it(att),ytt={httpMethod:"GET",path:"mobility/metroArea/id/{format}",urlParameters:[o],queryParameters:[r,c,{parameterPath:["options","queryType"],mapper:{serializedName:"queryType",type:{name:"Enum",allowedValues:["position","countryCode"]}}},h],headerParameters:[u],responses:{200:{bodyMapper:sv},"default":{bodyMapper:i}},serializer:d},ptt={httpMethod:"GET",path:"mobility/metroArea/info/{format}",urlParameters:[o],queryParameters:[r,{parameterPath:"query",mapper:{required:!0,serializedName:"query",type:{name:"Number"}}},eg,h],headerParameters:[u],responses:{200:{bodyMapper:hv},"default":{bodyMapper:i}},serializer:d},wtt={httpMethod:"GET",path:"mobility/transit/nearby/{format}",urlParameters:[o],queryParameters:[r,pi,c,ks,ft,lg,h],headerParameters:[u],responses:{200:{bodyMapper:cv},"default":{bodyMapper:i}},serializer:d},btt={httpMethod:"GET",path:"mobility/transit/dock/{format}",urlParameters:[o],queryParameters:[r,c,h],headerParameters:[u],responses:{200:{bodyMapper:pv},"default":{bodyMapper:i}},serializer:d},ktt={httpMethod:"GET",path:"mobility/transit/carShare/{format}",urlParameters:[o],queryParameters:[r,c,h],headerParameters:[u],responses:{200:{bodyMapper:yv},"default":{bodyMapper:i}},serializer:d},dtt={httpMethod:"GET",path:"mobility/transit/line/{format}",urlParameters:[o],queryParameters:[r,pi,c,og,h],headerParameters:[u],responses:{200:{bodyMapper:wv},"default":{bodyMapper:i}},serializer:d},gtt={httpMethod:"GET",path:"mobility/transit/stop/{format}",urlParameters:[o],queryParameters:[r,pi,c,{parameterPath:["options","queryType"],mapper:{serializedName:"queryType",type:{name:"Enum",allowedValues:["stopId","stopKey"]}}},sg,h],headerParameters:[u],responses:{200:{bodyMapper:lv},"default":{bodyMapper:i}},serializer:d},nit={httpMethod:"GET",path:"mobility/transit/route/{format}",urlParameters:[o],queryParameters:[r,pi,{parameterPath:"origin",mapper:{required:!0,serializedName:"origin",type:{name:"String"}}},{parameterPath:["options","originType"],mapper:{serializedName:"originType",type:{name:"Enum",allowedValues:["position","stopId","stopKey"]}}},{parameterPath:"destination",mapper:{required:!0,serializedName:"destination",type:{name:"String"}}},{parameterPath:["options","destinationType"],mapper:{serializedName:"destinationType",type:{name:"Enum",allowedValues:["position","stopId","stopKey"]}}},cg,op,ey,oy,{parameterPath:["options","time"],mapper:{serializedName:"time",type:{name:"String"}}},{parameterPath:["options","timeType"],mapper:{serializedName:"timeType",type:{name:"Enum",allowedValues:["arrival","departure","last"]}}},{parameterPath:["options","routeType"],mapper:{serializedName:"routeType",type:{name:"Enum",allowedValues:["optimal","leastWalk","leastTransfers"]}}},{parameterPath:["options","bikeType"],mapper:{serializedName:"bikeType",type:{name:"Enum",allowedValues:["privateBike","dockedBike"]}}},h],headerParameters:[u],responses:{200:{bodyMapper:av},"default":{bodyMapper:i}},serializer:d},tit={httpMethod:"GET",path:"mobility/transit/itinerary/{format}",urlParameters:[o],queryParameters:[r,c,hg,h],headerParameters:[u],responses:{200:{bodyMapper:vv},"default":{bodyMapper:i}},serializer:d},iit={httpMethod:"GET",path:"mobility/realtime/arrivals/{format}",urlParameters:[o],queryParameters:[r,pi,c,{parameterPath:["options","queryType"],mapper:{serializedName:"queryType",type:{name:"Enum",allowedValues:["stops","line","lineAndStop","position"]}}},{parameterPath:["options","stopQueryType"],mapper:{serializedName:"stopQueryType",type:{name:"Enum",allowedValues:["stopId","stopKey"]}}},ks,{parameterPath:["options","maxMinutesInFuture"],mapper:{serializedName:"maxMinutesInFuture",type:{name:"Number"}}},op,ey,oy,{parameterPath:["options","timeoutInSeconds"],mapper:{serializedName:"timeoutInSeconds",type:{name:"Number"}}},h],headerParameters:[u],responses:{200:{bodyMapper:bv},"default":{bodyMapper:i}},serializer:d},rit=Object.freeze({discriminators:gt,BufferRequestBody:kv,BufferResponse:ns,BufferResponseSummary:{serializedName:"BufferResponse_summary",type:{name:"Composite",className:"BufferResponseSummary",modelProperties:{udid:{readOnly:!0,serializedName:"udid",type:{name:"String"}},information:{readOnly:!0,serializedName:"information",type:{name:"String"}}}}},ClosestPointResultEntry:{serializedName:"ClosestPointResultEntry",type:{name:"Composite",className:"ClosestPointResultEntry",modelProperties:{distanceInMeters:{readOnly:!0,serializedName:"distanceInMeters",type:{name:"Number"}},position:{serializedName:"position",type:{name:"Composite",className:"SpatialCoordinate"}},geometryId:{readOnly:!0,serializedName:"geometryId",type:{name:"String"}}}}},CloudError:i,GeofenceGeometry:{serializedName:"GeofenceGeometry",type:{name:"Composite",className:"GeofenceGeometry",modelProperties:{deviceId:{readOnly:!0,serializedName:"deviceId",type:{name:"String"}},udId:{readOnly:!0,serializedName:"udId",type:{name:"String"}},geometryId:{readOnly:!0,serializedName:"geometryId",type:{name:"String"}},distance:{readOnly:!0,serializedName:"distance",type:{name:"Number"}},nearestLat:{readOnly:!0,serializedName:"nearestLat",type:{name:"Number"}},nearestLon:{readOnly:!0,serializedName:"nearestLon",type:{name:"Number"}}}}},GeofenceResponse:go,GeoJSONFeatureCollection:yr,GeoJSONFeatureCollectionFeaturesItem:{serializedName:"GeoJSONFeatureCollection_featuresItem",type:{name:"Composite",className:"GeoJSONFeatureCollectionFeaturesItem",modelProperties:{type:{serializedName:"type",type:{name:"String"}},geometry:{serializedName:"geometry",type:{name:"Composite",className:"GeoJSONGeometry"}},properties:{serializedName:"properties",type:{name:"Object"}}}}},GeoJSONGeometry:y,GetClosestPointResponse:dv,GetClosestPointSummary:{serializedName:"GetClosestPointSummary",type:{name:"Composite",className:"GetClosestPointSummary",modelProperties:{sourcePoint:{serializedName:"sourcePoint",type:{name:"Composite",className:"SpatialCoordinate"}},udid:{readOnly:!0,serializedName:"udid",type:{name:"String"}},information:{readOnly:!0,serializedName:"information",type:{name:"String"}}}}},GetPointInPolygonResponse:ny,GetPointInPolygonSummary:{serializedName:"GetPointInPolygonSummary",type:{name:"Composite",className:"GetPointInPolygonSummary",modelProperties:{sourcePoint:{serializedName:"sourcePoint",type:{name:"Composite",className:"SpatialCoordinate"}},udid:{readOnly:!0,serializedName:"udid",type:{name:"String"}},information:{readOnly:!0,serializedName:"information",type:{name:"String"}}}}},GreatCircleDistanceResponse:iy,GreatCircleDistanceResponseResult:{serializedName:"GreatCircleDistanceResponse_result",type:{name:"Composite",className:"GreatCircleDistanceResponseResult",modelProperties:{distanceInMeters:{readOnly:!0,serializedName:"distanceInMeters",type:{name:"Number"}}}}},GreatCircleDistanceResponseSummary:{serializedName:"GreatCircleDistanceResponse_summary",type:{name:"Composite",className:"GreatCircleDistanceResponseSummary",modelProperties:{sourcePoint:{serializedName:"sourcePoint",type:{name:"Composite",className:"SpatialCoordinate"}},targetPoint:{serializedName:"targetPoint",type:{name:"Composite",className:"SpatialCoordinate"}}}}},LineString:ei,MultiLineString:li,MultiPoint:oi,MultiPolygon:hi,Point:si,PointInPolygonResult:{serializedName:"PointInPolygonResult",type:{name:"Composite",className:"PointInPolygonResult",modelProperties:{pointInPolygons:{readOnly:!0,serializedName:"pointInPolygons",type:{name:"Boolean"}},intersectingGeometries:{readOnly:!0,serializedName:"intersectingGeometries",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Polygon:ci,PostClosestPointResponse:gv,PostClosestPointSummary:{serializedName:"PostClosestPointSummary",type:{name:"Composite",className:"PostClosestPointSummary",modelProperties:{sourcePoint:{serializedName:"sourcePoint",type:{name:"Composite",className:"SpatialCoordinate"}},udid:{readOnly:!0,serializedName:"udid",type:{name:"String"}},information:{readOnly:!0,serializedName:"information",type:{name:"String"}}}}},PostPointInPolygonResponse:ty,PostPointInPolygonSummary:{serializedName:"PostPointInPolygonSummary",type:{name:"Composite",className:"PostPointInPolygonSummary",modelProperties:{sourcePoint:{serializedName:"sourcePoint",type:{name:"Composite",className:"SpatialCoordinate"}},udid:{readOnly:!0,serializedName:"udid",type:{name:"String"}},information:{readOnly:!0,serializedName:"information",type:{name:"String"}}}}},SpatialCoordinate:{serializedName:"SpatialCoordinate",type:{name:"Composite",className:"SpatialCoordinate",modelProperties:{lat:{readOnly:!0,serializedName:"lat",type:{name:"Number"}},lon:{readOnly:!0,serializedName:"lon",type:{name:"Number"}}}}},SpatialGetGeofenceHeaders:ry,SpatialPostGeofenceHeaders:uy}),uit=function(){function n(n){this.client=n}return n.prototype.getGeofence=function(n,t,i,r,u,f){return this.client.sendOperationRequest({deviceId:n,udId:t,lat:i,lon:r,options:u},fit,f)},n.prototype.postGeofence=function(n,t,i,r,u,f){return this.client.sendOperationRequest({deviceId:n,lat:t,lon:i,searchGeofenceRequestBody:r,options:u},eit,f)},n.prototype.postBuffer=function(n,t,i){return this.client.sendOperationRequest({bufferRequestBody:n,options:t},oit,i)},n.prototype.getBuffer=function(n,t,i,r){return this.client.sendOperationRequest({udid:n,distances:t,options:i},sit,r)},n.prototype.postClosestPoint=function(n,t,i,r,u){return this.client.sendOperationRequest({lat:n,lon:t,closestPointRequestBody:i,options:r},hit,u)},n.prototype.getClosestPoint=function(n,t,i,r,u){return this.client.sendOperationRequest({udid:n,lat:t,lon:i,options:r},cit,u)},n.prototype.postPointInPolygon=function(n,t,i,r,u){return this.client.sendOperationRequest({lat:n,lon:t,pointInPolygonRequestBody:i,options:r},lit,u)},n.prototype.getPointInPolygon=function(n,t,i,r,u){return this.client.sendOperationRequest({udid:n,lat:t,lon:i,options:r},ait,u)},n.prototype.getGreatCircleDistance=function(n,t,i){return this.client.sendOperationRequest({query:n,options:t},vit,i)},n}(),tt=new it(rit),fit={httpMethod:"GET",path:"spatial/geofence/{format}",urlParameters:[o],queryParameters:[r,cy,{parameterPath:"udId",mapper:{required:!0,serializedName:"udId",type:{name:"String"}}},lt,at,sp,rp,py,dy],headerParameters:[u],responses:{200:{bodyMapper:go,headersMapper:ry},"default":{bodyMapper:i}},serializer:tt},eit={httpMethod:"POST",path:"spatial/geofence/{format}",urlParameters:[o],queryParameters:[r,cy,lt,at,sp,rp,py,dy],headerParameters:[u],requestBody:{parameterPath:"searchGeofenceRequestBody",mapper:t(t({},yr),{required:!0})},responses:{200:{bodyMapper:go,headersMapper:uy},"default":{bodyMapper:i}},serializer:tt},oit={httpMethod:"POST",path:"spatial/buffer/{format}",urlParameters:[o],queryParameters:[r],headerParameters:[u],requestBody:{parameterPath:"bufferRequestBody",mapper:t(t({},kv),{required:!0})},responses:{200:{bodyMapper:ns},"default":{bodyMapper:i}},serializer:tt},sit={httpMethod:"GET",path:"spatial/buffer/{format}",urlParameters:[o],queryParameters:[r,ih,{parameterPath:"distances",mapper:{required:!0,serializedName:"distances",type:{name:"String"}}}],headerParameters:[u],responses:{200:{bodyMapper:ns},"default":{bodyMapper:i}},serializer:tt},hit={httpMethod:"POST",path:"spatial/closestPoint/{format}",urlParameters:[o],queryParameters:[r,lt,at,gy],headerParameters:[u],requestBody:{parameterPath:"closestPointRequestBody",mapper:t(t({},yr),{required:!0})},responses:{200:{bodyMapper:gv},"default":{bodyMapper:i}},serializer:tt},cit={httpMethod:"GET",path:"spatial/closestPoint/{format}",urlParameters:[o],queryParameters:[r,ih,lt,at,gy],headerParameters:[u],responses:{200:{bodyMapper:dv},"default":{bodyMapper:i}},serializer:tt},lit={httpMethod:"POST",path:"spatial/pointInPolygon/{format}",urlParameters:[o],queryParameters:[r,lt,at],headerParameters:[u],requestBody:{parameterPath:"pointInPolygonRequestBody",mapper:t(t({},yr),{required:!0})},responses:{200:{bodyMapper:ty},"default":{bodyMapper:i}},serializer:tt},ait={httpMethod:"GET",path:"spatial/pointInPolygon/{format}",urlParameters:[o],queryParameters:[r,ih,lt,at],headerParameters:[u],responses:{200:{bodyMapper:ny},"default":{bodyMapper:i}},serializer:tt},vit={httpMethod:"GET",path:"spatial/greatCircleDistance/{format}",urlParameters:[o],queryParameters:[r,c],headerParameters:[u],responses:{200:{bodyMapper:iy},"default":{bodyMapper:i}},serializer:tt},yit="2.0.5",pit=function(n){function t(t,i){return n.call(this,t,i)||this}return s(t,n),t.prototype.sendRequest=function(n){return f(this,void 0,void 0,function(){return e(this,function(){return n.headers||(n.headers=new ot),n.headers.set(st.MS_AM_REQUEST_ORIGIN,st.SERVICE_MODULE),n.headers.set(st.MAP_AGENT,st.SERVICE_MODULE+"/"+yit+" (Web)"),[2,this._nextPolicy.sendRequest(n)]})})},t}(p),wit=function(){function n(){}return n.prototype.create=function(n,t){return new pit(n,t)},n}(),bit="",kit="",dit=function(n){function t(t,i){var r=this,u;if(t==undefined)throw new Error("'credentials' cannot be null.");return i||(i={}),i.userAgent||(u=na(),i.userAgent=bit+"/"+kit+" "+u),r=n.call(this,t,i)||this,r.apiVersion="1.0",r.acceptLanguage="en-US",r.longRunningOperationRetryTimeout=30,r.baseUri=i.baseUri||r.baseUri||"https://atlas.microsoft.com",r.requestContentType="application/json; charset=utf-8",r.credentials=t,i.acceptLanguage!==null&&i.acceptLanguage!==undefined&&(r.acceptLanguage=i.acceptLanguage),i.longRunningOperationRetryTimeout!==null&&i.longRunningOperationRetryTimeout!==undefined&&(r.longRunningOperationRetryTimeout=i.longRunningOperationRetryTimeout),r}return s(t,n),t}(ig),yt=function(){function n(n,i){this.pipeline=n;this.mapsUrl=/^\w+:\/\//.test(i)?i:"https://"+i;var r=this.pipeline.toServiceClientOptions();r.requestPolicyFactories.push(new wit);this.mapsClientContext=new dit({signRequest:Promise.resolve},t(t({},r),{baseUri:this.mapsUrl}));this.mapsClientContext.apiVersion=cd;this.mapsClientContext.longRunningOperationRetryTimeout=5}return n.newPipeline=function(n,t){t===void 0&&(t={});var i=[gu(),new ll(t.retryOptions),new al,n];return new cl(i,{HTTPClient:t.httpClient,logger:t.logger})},n}(),git=function(n){function i(t,i){i===void 0&&(i="https://atlas.microsoft.com");var r=n.call(this,t,i)||this;return r.renderContext=new utt(r.mapsClientContext),r}return s(i,n),i.prototype.getMapImageryTile=function(n,t,i,r){return f(this,void 0,void 0,function(){var u,f,o,s,h,c;return e(this,function(e){switch(e.label){case 0:return[4,this.renderContext.getMapImageryTile(t,i,r,{abortSignal:n})];case 1:return(u=e.sent(),!u.readableStreamBody)?[3,3]:(o=(f=Object).assign,[4,po(u.readableStreamBody)]);case 2:return[2,o.apply(f,[e.sent(),{rawResponse:u._response}])];case 3:return u.blobBody?(h=(s=Object).assign,c=wo,[4,u.blobBody]):[3,6];case 4:return[4,c.apply(void 0,[e.sent()])];case 5:return[2,h.apply(s,[e.sent(),{rawResponse:u._response}])];case 6:return[2]}})})},i.prototype.getMapTile=function(n,i,r,u,o,s,h,c){return c===void 0&&(c={}),f(this,void 0,void 0,function(){var f,l,a,v,y,p;return e(this,function(e){switch(e.label){case 0:return[4,this.renderContext.getMapTile(i,r,u,o,s,h,t(t({},c),{abortSignal:n}))];case 1:return(f=e.sent(),!f.readableStreamBody)?[3,3]:(a=(l=Object).assign,[4,po(f.readableStreamBody)]);case 2:return[2,a.apply(l,[e.sent(),{rawResponse:f._response}])];case 3:return f.blobBody?(y=(v=Object).assign,p=wo,[4,f.blobBody]):[3,6];case 4:return[4,p.apply(void 0,[e.sent()])];case 5:return[2,y.apply(v,[e.sent(),{rawResponse:f._response}])];case 6:return[2]}})})},i.prototype.getMapImage=function(n,i){return f(this,void 0,void 0,function(){var r,u,f,o,s,h;return e(this,function(e){switch(e.label){case 0:return[4,this.renderContext.getMapImage(t(t(t(t({},i),i.center&&{center:this.centerToString(i.center)}),i.bbox&&{bbox:this.bboxToString(i.bbox)}),{abortSignal:n}))];case 1:return(r=e.sent(),!r.readableStreamBody)?[3,3]:(f=(u=Object).assign,[4,po(r.readableStreamBody)]);case 2:return[2,f.apply(u,[e.sent(),{rawResponse:r._response}])];case 3:return r.blobBody?(s=(o=Object).assign,h=wo,[4,r.blobBody]):[3,6];case 4:return[4,h.apply(void 0,[e.sent()])];case 5:return[2,s.apply(o,[e.sent(),{rawResponse:r._response}])];case 6:return[2]}})})},i.prototype.centerToString=function(n){if(n.length<2)throw new Error("The center must contain both longitude and latitude, e.g. [longitude, latitude]");return n[0]+","+n[1]},i.prototype.bboxToString=function(n){if(n.length<4)throw new Error("The bbox must contain at least four values, e.g. [south lon, west lat, north lon, east lat]");return n.length<6?n[0]+","+n[1]+","+n[2]+","+n[3]:n[0]+","+n[1]+","+n[3]+","+n[4]},i}(yt),nrt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.routes.map(function(n,i){var u=n.legs.map(function(n){return n.points.map(function(n){return[n.longitude,n.latitude]})}),r=t(t({},n),{legSummaries:n.legs.map(function(n){return n.summary}),resultIndex:i});return delete r.legs,{type:"Feature",geometry:{type:"MultiLineString",coordinates:u},properties:r}});return{type:"FeatureCollection",features:n,bbox:v(n)}},n}(),trt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n={type:"Feature",geometry:{type:"Polygon",coordinates:[this.response.reachableRange.boundary.map(function(n){return[n.longitude,n.latitude]})]},properties:{}},t={type:"Feature",geometry:{type:"Point",coordinates:[this.response.reachableRange.center.longitude,this.response.reachableRange.center.latitude]},properties:{}};return{type:"FeatureCollection",features:[n,t],bbox:v([n])}},n}(),irt=function(n){function i(t,i){i===void 0&&(i="https://atlas.microsoft.com");var r=n.call(this,t,i)||this;return r.routeContext=new cn(r.mapsClientContext),r}return s(i,n),i.prototype.calculateRouteDirections=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var f,u,o;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The coordinates must contain at least two positions");return(f=i.map(function(n){if(n.length<2)throw new Error("The coordinate must contain both longitude and latitude, e.g. [longitude, latitude]");return n[1]+","+n[0]}).join(":"),!r.postBody)?[3,2]:[4,this.routeContext.postRouteDirections(f,r.postBody,t(t({},r),{abortSignal:n}))];case 1:return o=e.sent(),[3,4];case 2:return[4,this.routeContext.getRouteDirections(f,t(t({},r),{abortSignal:n}))];case 3:o=e.sent();e.label=4;case 4:return u=o,[2,t(t({},u),{rawResponse:u._response,geojson:new nrt(u)})]}})})},i.prototype.calculateRouteRange=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var f,u;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The center must contain both longitude and latitude, e.g. [longitude, latitude]");return f=i[1]+","+i[0],[4,this.routeContext.getRouteRange(f,t(t({},r),{abortSignal:n}))];case 1:return u=e.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new trt(u)})]}})})},i.prototype.calculateRouteMatrix=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return[4,this.routeContext.postRouteMatrixPreview(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response})]}})})},i}(yt),et=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){for(var n,f,r,u=[],i=0;i<this.response.results.length;i++)n=this.response.results[i],f=t(t({},n),{resultIndex:i}),delete f.position,r={type:"Feature",geometry:{type:"Point",coordinates:[n.position.lon,n.position.lat]},properties:f},n.id&&(r.id=n.id),n.viewport&&(r.bbox=[n.viewport.topLeftPoint.lon,n.viewport.btmRightPoint.lat,n.viewport.btmRightPoint.lon,n.viewport.topLeftPoint.lat]),u.push(r);return{type:"FeatureCollection",features:u,bbox:v(u)}},n}(),rrt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){for(var u,h,n,f,e,o,i=[],r=0,s=this.response.additionalData;r<s.length;r++)for(u=s[r],h=u.geometryData,n=0,f=h.features;n<f.length;n++)e=f[n],o=t(t({},e.properties),u),delete o.geometryData,i.push({type:"Feature",geometry:e.geometry,properties:o});return{type:"FeatureCollection",features:i,bbox:v(i)}},n}(),cp=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){for(var r,u,i=[],n=0;n<this.response.addresses.length;n++){r=this.response.addresses[n];u=t(t({},r),{resultIndex:n});delete u.position;var f=r.position.split(",").map(Number.parseFloat),e=f[0],o=f[1],s={type:"Feature",geometry:{type:"Point",coordinates:[o,e]},properties:u};i.push(s)}return{type:"FeatureCollection",features:i,bbox:v(i)}},n}(),urt=function(n){function i(t,i){i===void 0&&(i="https://atlas.microsoft.com");var r=n.call(this,t,i)||this;return r.searchContext=new yg(r.mapsClientContext),r}return s(i,n),i.prototype.searchFuzzy=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:if(Array.isArray(i))if(i.length>1)i=i[1]+","+i[0];else throw new Error("The query must contain both longitude and latitude, e.g. [longitude, latitude]");return[4,this.searchContext.getSearchFuzzy(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new et(u)})]}})})},i.prototype.searchPOI=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return[4,this.searchContext.getSearchPOI(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new et(u)})]}})})},i.prototype.searchNearby=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var f,o,u;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The query must contain both longitude and latitude, e.g. [longitude, latitude]");return f=i[0],o=i[1],[4,this.searchContext.getSearchNearby(o,f,t(t({},r),{abortSignal:n}))];case 1:return u=e.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new et(u)})]}})})},i.prototype.searchPOICategory=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return[4,this.searchContext.getSearchPOICategory(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new et(u)})]}})})},i.prototype.searchAddress=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return[4,this.searchContext.getSearchAddress(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new et(u)})]}})})},i.prototype.searchAddressReverse=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var f,u;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The position must contain both longitude and latitude, e.g. [longitude, latitude]");return f=i[1]+","+i[0],[4,this.searchContext.getSearchAddressReverse(f,t(t({},r),{abortSignal:n}))];case 1:return u=e.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new cp(u)})]}})})},i.prototype.searchAddressReverseCrossStreet=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var f,u;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The position must contain both longitude and latitude, e.g. [longitude, latitude]");return f=i[1]+","+i[0],[4,this.searchContext.getSearchAddressReverseCrossStreet(f,t(t({},r),{abortSignal:n}))];case 1:return u=e.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new cp(u)})]}})})},i.prototype.searchAddressStructured=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return[4,this.searchContext.getSearchAddressStructured(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new et(u)})]}})})},i.prototype.searchInsideGeometry=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:return[4,this.searchContext.postSearchInsideGeometry(i,r,t(t({},u),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response,geojson:new et(f)})]}})})},i.prototype.searchAlongRoute=function(n,i,r,u,o){return o===void 0&&(o={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:return[4,this.searchContext.postSearchAlongRoute(i,r,u,t(t({},o),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response,geojson:new et(f)})]}})})},i.prototype.searchPolygon=function(n,i){return f(this,void 0,void 0,function(){var u,r;return e(this,function(f){switch(f.label){case 0:if(i.length<1)throw new Error("At least one geometry UUID must be specified");return u=i.join(","),[4,this.searchContext.getSearchPolygon(u,{abortSignal:n})];case 1:return r=f.sent(),[2,t(t({},r),{rawResponse:r._response,geojson:new rrt(r)})]}})})},i}(yt),frt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.result.map(function(n){var i=t({},n);return delete i.position,{type:"Feature",geometry:{type:"Point",coordinates:[n.position.lon,n.position.lat]},properties:i}});return{type:"FeatureCollection",bbox:v(n),features:n}},n}(),ert=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.geometries.map(function(n){var i=t({},n);return delete i.nearestLat,delete i.nearestLon,{type:"Feature",geometry:{type:"Point",coordinates:[n.nearestLon,n.nearestLat]},properties:i}});return{type:"FeatureCollection",bbox:v(n),features:n}},n}(),ort=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var i=t(t({},this.response.result),this.response.summary),n;return delete i.sourcePoint,n=[{type:"Feature",geometry:{type:"Point",coordinates:[this.response.summary.sourcePoint.lon,this.response.summary.sourcePoint.lat]},properties:i}],{type:"FeatureCollection",bbox:v(n),features:n}},n}(),srt=function(n){function i(t,i){i===void 0&&(i="https://atlas.microsoft.com");var r=n.call(this,t,i)||this;return r.spatialContext=new uit(r.mapsClientContext),r}return s(i,n),i.prototype.getBuffer=function(n,i,r){return f(this,void 0,void 0,function(){var u,f,o;return e(this,function(e){switch(e.label){case 0:if(r.length<1)throw new Error("At least one distance must be specified");return(typeof i=="string")?[4,this.spatialContext.getBuffer(i,r.join(";"),{abortSignal:n})]:[3,2];case 1:return f=e.sent(),[3,4];case 2:return[4,this.spatialContext.postBuffer({geometries:i,distances:r},{abortSignal:n})];case 3:f=e.sent();e.label=4;case 4:return u=f,u.result&&u.result.features&&(o=u.result,o.bbox=v(o.features)),[2,t(t({},u),{rawResponse:u._response})]}})})},i.prototype.getClosestPoint=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var o,s,f,h;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The position must contain both longitude and latitude, e.g. [longitude, latitude]");return(o=i[0],s=i[1],!(typeof r=="string"))?[3,2]:[4,this.spatialContext.getClosestPoint(r,s,o,t(t({},u),{abortSignal:n}))];case 1:return h=e.sent(),[3,4];case 2:return[4,this.spatialContext.postClosestPoint(s,o,r,t(t({},u),{abortSignal:n}))];case 3:h=e.sent();e.label=4;case 4:return f=h,[2,t(t({},f),{rawResponse:f._response,geojson:new frt(f)})]}})})},i.prototype.getGeofence=function(n,i,r,u,o){return o===void 0&&(o={}),f(this,void 0,void 0,function(){var s,h,f,c;return e(this,function(e){switch(e.label){case 0:if(u.length<2)throw new Error("The position must contain both longitude and latitude, e.g. [longitude, latitude]");return(s=u[0],h=u[1],!(typeof r=="string"))?[3,2]:[4,this.spatialContext.getGeofence(i,r,h,s,t(t({},o),{abortSignal:n}))];case 1:return c=e.sent(),[3,4];case 2:return[4,this.spatialContext.postGeofence(i,h,s,r,t(t({},o),{abortSignal:n}))];case 3:c=e.sent();e.label=4;case 4:return f=c,[2,t(t({},f),{rawResponse:f._response,geojson:new ert(f)})]}})})},i.prototype.getGreatCircleDistance=function(n,i){return f(this,void 0,void 0,function(){var u,r;return e(this,function(f){switch(f.label){case 0:if(i.length<2)throw new Error("The coordinates must contain at least two positions");return u=i.map(function(n){if(n.length<2)throw new Error("The coordinate must contain both longitude and latitude, e.g. [longitude, latitude]");return n[1]+","+n[0]}).join(":"),[4,this.spatialContext.getGreatCircleDistance(u,{abortSignal:n})];case 1:return r=f.sent(),[2,t(t({},r),{rawResponse:r._response})]}})})},i.prototype.getPointInPolygon=function(n,i,r){return f(this,void 0,void 0,function(){var f,o,u,s;return e(this,function(e){switch(e.label){case 0:if(r.length<2)throw new Error("The position must contain both longitude and latitude, e.g. [longitude, latitude]");return(f=r[0],o=r[1],!(typeof i=="string"))?[3,2]:[4,this.spatialContext.getPointInPolygon(i,o,f,{abortSignal:n})];case 1:return s=e.sent(),[3,4];case 2:return[4,this.spatialContext.postPointInPolygon(o,f,i,{abortSignal:n})];case 3:s=e.sent();e.label=4;case 4:return u=s,[2,t(t({},u),{rawResponse:u._response,geojson:new ort(u)})]}})})},i}(yt),hrt=function(n){function i(t,i){i===void 0&&(i="https://atlas.microsoft.com");var r=n.call(this,t,i)||this;return r.timezoneContext=new bn(r.mapsClientContext),r}return s(i,n),i.prototype.getTimezoneByCoordinates=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var f,u;return e(this,function(e){switch(e.label){case 0:if(i.length<2)throw new Error("The coordinate must contain both longitude and latitude, e.g. [longitude, latitude]");return f=i[1]+","+i[0],[4,this.timezoneContext.getTimezoneByCoordinates(f,t(t({},r),{abortSignal:n}))];case 1:return u=e.sent(),[2,t(t({},u),{rawResponse:u._response})]}})})},i.prototype.getTimezoneById=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return[4,this.timezoneContext.getTimezoneByID(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response})]}})})},i}(yt),crt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=t({},this.response),i;return delete n.position,delete n._response,i=[{type:"Feature",geometry:{type:"Point",coordinates:[this.response.position.longitude,this.response.position.latitude]},properties:n}],{type:"FeatureCollection",features:i,bbox:v(i)}},n}(),lrt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.results.map(function(n){var i=t({},n);return delete i.geometry,{type:"Feature",geometry:n.geometry,properties:i}});return{type:"FeatureCollection",features:n,bbox:v(n)}},n}(),art=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.results.map(function(n){var i=t({},n);return delete i.position,{type:"Feature",geometry:{type:"Point",coordinates:[n.position.longitude,n.position.latitude]},properties:i}});return{type:"FeatureCollection",features:n,bbox:v(n)}},n}(),vrt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.results.map(function(n){var i=t(t({},n),{stop:t({},n.stop)});return delete i.stop.position,{type:"Feature",geometry:{type:"Point",coordinates:[n.stop.position.longitude,n.stop.position.latitude]},properties:i}});return{type:"FeatureCollection",features:n,bbox:v(n)}},n}(),yrt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=t({},this.response),i;return delete n.position,delete n._response,i=[{type:"Feature",geometry:{type:"Point",coordinates:[this.response.position.longitude,this.response.position.latitude]},properties:n}],{type:"FeatureCollection",features:i,bbox:v(i)}},n}(),prt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=this.response.legs.filter(function(n){return n.legType!==er.Wait}).filter(function(n){return n.geometry||n.origin&&n.destination||n.stops}).map(function(n){var r,u,f,i;return n.geometry?r=n.geometry.coordinates:n.origin&&n.destination?r=[[n.origin.position.longitude,n.origin.position.latitude],[n.destination.position.longitude,n.destination.position.latitude]]:n.stops&&(u=n.stops[0],f=n.stops[n.stops.length-1],r=[[u.position.longitude,u.position.latitude],[f.position.longitude,f.position.latitude]]),i=t({},n),delete i.geometry,delete i.origin,delete i.destination,{type:"Feature",geometry:{type:"LineString",coordinates:r},properties:i}});return{type:"FeatureCollection",features:n,bbox:v(n)}},n}(),wrt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var i=[],r,e,o,u,s,f,n;if(this.response.patterns)for(r=0,e=this.response.patterns;r<e.length;r++)o=e[r],n=t({},o),delete n.geometry,i.push({type:"Feature",geometry:o.geometry,properties:n});if(this.response.stops)for(u=0,s=this.response.stops;u<s.length;u++)f=s[u],n=t({},f),delete n.position,i.push({type:"Feature",geometry:{type:"Point",coordinates:[f.position.longitude,f.position.latitude]},properties:n});return{type:"FeatureCollection",features:i,bbox:v(i)}},n}(),brt=function(){function n(n){this.response=n}return n.prototype.getFeatures=function(){var n=t(t({},this.response),{stop:t({},this.response.stop)}),i;return delete n.stop.position,delete n._response,i=[{type:"Feature",geometry:{type:"Point",coordinates:[this.response.stop.position.longitude,this.response.stop.position.latitude]},properties:n}],{type:"FeatureCollection",features:i,bbox:v(i)}},n}(),krt=function(n){function i(t,i){i===void 0&&(i="https://atlas.microsoft.com");var r=n.call(this,t,i)||this;return r.mobilityContext=new vtt(r.mapsClientContext),r}return s(i,n),i.prototype.getCarShareInfo=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return i=decodeURIComponent(i),[4,this.mobilityContext.getCarShareInfoPreview(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new crt(u)})]}})})},i.prototype.getMetroArea=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:if(Array.isArray(i)&&i.length<2)throw new Error("The query must contain both longitude and latitude, e.g. [longitude, latitude]");return i=typeof i=="string"?i:i[1]+","+i[0],[4,this.mobilityContext.getMetroAreaPreview(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new lrt(u)})]}})})},i.prototype.getMetroAreaInfo=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:return[4,this.mobilityContext.getMetroAreaInfoPreview(i,r,t(t({},u),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response})]}})})},i.prototype.getNearbyTransit=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var o,f;return e(this,function(e){switch(e.label){case 0:if(r.length<2)throw new Error("The location must contain both longitude and latitude, e.g. [longitude, latitude]");return o=r[1]+","+r[0],[4,this.mobilityContext.getNearbyTransitPreview(i,o,t(t({},u),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response,geojson:new art(f)})]}})})},i.prototype.getRealTimeArrivals=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:if(Array.isArray(r)){if(r.length===0)throw new Error("The specified query array must contain at least one element");r=typeof r[0]=="number"?r[1]+","+r[0]:r.join(",")}return r=decodeURIComponent(r),[4,this.mobilityContext.getRealTimeArrivalsPreview(i,r,t(t({},u),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response,geojson:new vrt(f)})]}})})},i.prototype.getTransitDockInfo=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return i=decodeURIComponent(i),[4,this.mobilityContext.getTransitDockInfoPreview(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new yrt(u)})]}})})},i.prototype.getTransitItinerary=function(n,i,r){return r===void 0&&(r={}),f(this,void 0,void 0,function(){var u;return e(this,function(f){switch(f.label){case 0:return i=decodeURIComponent(i),[4,this.mobilityContext.getTransitItineraryPreview(i,t(t({},r),{abortSignal:n}))];case 1:return u=f.sent(),[2,t(t({},u),{rawResponse:u._response,geojson:new prt(u)})]}})})},i.prototype.getTransitLineInfo=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:return r=decodeURIComponent(r),[4,this.mobilityContext.getTransitLineInfoPreview(i,r,t(t({},u),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response,geojson:new wrt(f)})]}})})},i.prototype.getTransitRoute=function(n,i,r,u,o){return o===void 0&&(o={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:if(Array.isArray(r)){if(r.length<2)throw new Error("The origin must contain both longitude and latitude, e.g. [longitude, latitude]");r=r[1]+","+r[0]}if(Array.isArray(u)){if(u.length<2)throw new Error("The destination must contain both longitude and latitude, e.g. [longitude, latitude]");u=u[1]+","+u[0]}return r=decodeURIComponent(r),u=decodeURIComponent(u),[4,this.mobilityContext.getTransitRoutePreview(i,r,u,t(t({},o),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response})]}})})},i.prototype.getTransitStopInfo=function(n,i,r,u){return u===void 0&&(u={}),f(this,void 0,void 0,function(){var f;return e(this,function(e){switch(e.label){case 0:return r=decodeURIComponent(r),[4,this.mobilityContext.getTransitStopInfoPreview(i,r,t(t({},u),{abortSignal:n}))];case 1:return f=e.sent(),[2,t(t({},f),{rawResponse:f._response,geojson:new brt(f)})]}})})},i}(yt);String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(n,t){return this.substring(!t||t<0?0:+t,n.length)===n}});n.Aborter=ed;n.BaseRequestPolicy=p;n.Credential=or;n.CredentialPolicy=sr;n.HttpHeaders=ot;n.LoggingPolicyFactory=al;n.MapControlCredential=od;n.MapControlCredentialPolicy=ul;n.MapsURL=yt;n.MobilityURL=krt;n.Models=fd;n.Pipeline=cl;n.RenderURL=git;n.RequestPolicyOptions=du;n.RestError=l;n.RetryPolicyFactory=ll;n.RouteURL=irt;n.SearchURL=urt;n.SpatialURL=srt;n.SubscriptionKeyCredential=hd;n.SubscriptionKeyCredentialPolicy=sl;n.TimezoneURL=hrt;n.TokenCredential=ld;n.TokenCredentialPolicy=hl;n.WebResource=ui;n.deserializationPolicy=gu;Object.defineProperty(n,"__esModule",{value:!0})})