PageSourceSearch

https://www.buerstner.com/bundles/whitelabelsolutionfrontend/dist/…/buerstner-relaunch/core.f2fc9f4d.js

js buerstner.com collected 2026-10-02 10:34:27 UTC 2,440,674 bytes, 2 lines download raw bytes

1/*! For license information please see core.f2fc9f4d.js.LICENSE.txt */
2(()=>{var t={5125:function(t){t.exports=function(){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){return o(t)||s(t)||a(t)||c()}function o(t){if(Array.isArray(t))return l(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}var h=function(t){return"string"==typeof t?document.querySelector(t):t()},f=function(t,e){var r="string"==typeof t?document.createElement(t):t;for(var n in e){var i=e[n];if("inside"===n)i.append(r);else if("dest"===n)h(i[0]).insertAdjacentElement(i[1],r);else if("around"===n){var o=i;o.parentNode.insertBefore(r,o),r.append(o),null!=o.getAttribute("autofocus")&&o.focus()}else n in r?r[n]=i:r.setAttribute(n,i)}return r},d=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t.value:t.innerHTML},p=function(t,e){return t=String(t).toLowerCase(),e?t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").normalize("NFC"):t},m=function(t,e){var r;return function(){clearTimeout(r),r=setTimeout((function(){return t()}),e)}},g=function(t,e,r){return e?e(t):t.length>=r},y=function(t,r){return f("mark",e({innerHTML:t},"string"==typeof r&&{class:r})).outerHTML},_=function(t){var e=t.name,n=t.options,i=t.resultsList,o=t.resultItem;for(var s in n)if("object"===r(n[s]))for(var a in t[s]||(t[s]={}),n[s])t[s][a]=n[s][a];else t[s]=n[s];t.selector=t.selector||"#"+e,i.destination=i.destination||t.selector,i.id=i.id||e+"_list_"+t.id,o.id=o.id||e+"_result",t.input
vendor: 2,463 bytes, line 2
2=h(t.selector)},v=function(t,e){e.input.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e.feedback,cancelable:!0}))},b=function(t,e,r){var n=r||{},i=n.mode,o=n.diacritics,s=n.highlight,a=p(e,o);if(e=String(e),t=p(t,o),"loose"===i){var l=(t=t.replace(/ /g,"")).length,c=0,u=Array.from(e).map((function(e,r){return c<l&&a[r]===t[c]&&(e=s?y(e,s):e,c++),e})).join("");if(c===l)return u}else{var h=a.indexOf(t);if(~h)return t=e.substring(h,h+t.length),h=s?e.replace(t,y(t,s)):e}},x=function(t,e){return new Promise((function(r,n){var i;return(i=t.data).cache&&i.store?r():new Promise((function(t,r){return"function"==typeof i.src?i.src(e).then(t,r):t(i.src)})).then((function(e){try{return t.feedback=i.store=e,v("response",t),r()}catch(t){return n(t)}}),n)}))},w=function(t,e){var r=e.data,n=e.searchEngine,i=[];r.store.forEach((function(o,s){var a=function(r){var s=r?o[r]:o,a="function"==typeof n?n(t,s):b(t,s,{mode:n,diacritics:e.diacritics,highlight:e.resultItem.highlight});if(a){var l={match:a,value:o};r&&(l.key=r),i.push(l)}};if(r.keys){var l,c=u(r.keys);try{for(c.s();!(l=c.n()).done;)a(l.value)}catch(t){c.e(t)}finally{c.f()}}else a()})),r.filter&&(i=r.filter(i));var o=i.slice(0,e.resultsList.maxResults);e.feedback={query:t,matches:i,results:o},v("results",e)},E="aria-expanded",S="aria-activedescendant",T="aria-selected",A=function(t,r){t.feedback.selection=e({index:r},t.feedback.results[r])},O=function(t){var r=t.resultsList,n=t.list,i=t.resultItem,o=t.feedback,s=o.matches,a=o.results;if(t.cursor=-1,n.innerHTML="",s.length||r.noResults){var l=new DocumentFragment;a.forEach((function(t,r){var n=f(i.tag,e({id:"".concat(i.id,"_").concat(r),role:"option",innerHTML:t.match,inside:l},i.class&&{class:i.class}));i.element&&i.element(n,t)})),n.append(l),r.element&&r.element(n,o),C(t)}else M(t)},C=function(t){t.isOpen||((t.wrapper||t.input).setAttribute(E,!0),t.list.removeAttribute("hidden"),t.isOpen=!0,v("open",t))},M=function(t){t.isOpen&&((t.wrapper||t.input).setAttribute(E,!1),t.input.setAttribute(S,""),t.list.setAttribute("hidden",""),t.isOpen=!1,v("close",t))},k=function(t,e){var r=e.resultItem,n=e.list.getElementsByTagName(r.tag),o=!!r.selected&&r.selected.split(" ");if(e.isOpen&&n.length){var s,a,l=e.cursor;t>=n.length&&(t=0),t<0&&(t=n.length-1),e.cursor=t,l>-1&&(n[l].removeAttribute(T),o&&(a=n[l].classList).remove.apply(a,i(o))),n[t].setAttribute(T,!0),o&&(s=n[t].classList).add.apply(s,i(o)),e.input.setAttribute(S,n[e.cursor].id
2),e.list.scrollTop=n[t].offsetTop-e.list.clientHeight+n[t].clientHeight+5,e.feedback.cursor=e.cursor,A(e,t),v("navigate",e)}},I=function(t){k(t.cursor+1,t)},P=function(t){k(t.cursor-1,t)},L=function(t,e,r){(r=r>=0?r:t.cursor)<0||(t.feedback.event=e,A(t,r),v("selection",t),M(t))},R=function(t,e){var r=e.resultItem.tag.toUpperCase(),n=Array.from(e.list.querySelectorAll(r)),i=t.target.closest(r);i&&i.nodeName===r&&L(e,t,n.indexOf(i))},D=function(t,e){switch(t.keyCode){case 40:case 38:t.preventDefault(),40===t.keyCode?I(e):P(e);break;case 13:e.submit||t.preventDefault(),e.cursor>=0&&L(e,t);break;case 9:e.resultsList.tabSelect&&e.cursor>=0&&L(e,t);break;case 27:e.input.value="",M(e)}};function z(t,e){var r=this;return new Promise((function(n,i){var o;return o=e||d(t.input),o=t.query?t.query(o):o,g(o,t.trigger,t.threshold)?x(t,o).then((function(e){try{return t.feedback instanceof Error?n():(w(o,t),t.resultsList&&O(t),s.call(r))}catch(t){return i(t)}}),i):(M(t),s.call(r));function s(){return n()}}))}var B=function(t,e){for(var r in t)for(var n in t[r])e(r,n)},j=function(t){var r=t.events,n=m((function(){return z(t)}),t.debounce),i=t.events=e({input:e({},r&&r.input)},t.resultsList&&{list:r?e({},r.list):{}}),o={input:{input:function(){n()},keydown:function(e){D(e,t)},blur:function(){M(t)}},list:{mousedown:function(t){t.preventDefault()},click:function(e){R(e,t)}}};B(o,(function(e,r){(t.resultsList||"input"===r)&&(i[e][r]||(i[e][r]=o[e][r]))})),B(i,(function(e,r){t[e].addEventListener(r,i[e][r])}))},F=function(t){B(t.events,(function(e,r){t[e].removeEventListener(r,t.events[e][r])}))};function N(t){var r=this;return new Promise((function(n,i){var o,s,a;if(o=t.placeHolder,a={role:"combobox","aria-owns":(s=t.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},f(t.input,e(e({"aria-controls":s.id,"aria-autocomplete":"both"},o&&{placeholder:o}),!t.wrapper&&e({},a))),t.wrapper&&(t.wrapper=f("div",e({around:t.input,class:t.name+"_wrapper"},a))),s&&(t.list=f(s.tag,e({dest:[s.destination,s.position],id:s.id,role:"listbox",hidden:"hidden"},s.class&&{class:s.class}))),j(t),t.data.cache)return x(t).then((function(t){try{return l.call(r)}catch(t){return i(t)}}),i);function l(){return v("init",t),n()}return l.call(r)}))}function $(t){var e=t.prototype;e.init=function(){N(this)},e.start=function(t){z(this,t)},e.unInit=function(){if(this.wrapper){var t=this.wrapper.parentNode;t.insertBefore(this.input,this.wrapper),t.removeChild(this.wrapper)}F(this)},e.open=function(){C(this)},e.close=function(){M(this)},e.goTo=function(t){k(t,this)},e.next=function(){I(this)},e.previous=function(){P(this)},e.select=function(t){L(this,null,t)},e.search=function(t,e,r){return b(t,e,r)}}function U(t){this.options=t,this.id=U.instances=(U.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},_(this),$.call(this,U),N(this)}return U}()},9662:(t,e,r)=>{var n=r(614),i=r(6330),o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),i=r(6330),o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),i=r(30),o=r(3070).f,s=n("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:(t,e,r)=>{var n=r(7976),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(111),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not an object")}},7556:(t,e,r)=>{var n=r(7293);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},8533:(t,e,r)=>{"use strict";
vendor: 4,387 bytes, line 2
2var n=r(2092).forEach,i=r(9341)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,r)=>{"use strict";var n=r(9974),i=r(6916),o=r(7908),s=r(3411),a=r(7659),l=r(4411),c=r(6244),u=r(6135),h=r(8554),f=r(1246),d=Array;t.exports=function(t){var e=o(t),r=l(this),p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m;g&&(m=n(m,p>2?arguments[2]:void 0));var y,_,v,b,x,w,E=f(e),S=0;if(!E||this===d&&a(E))for(y=c(e),_=r?new this(y):d(y);y>S;S++)w=g?m(e[S],S):e[S],u(_,S,w);else for(x=(b=h(e,E)).next,_=r?new this:[];!(v=i(x,b)).done;S++)w=g?s(b,m,[v.value,S],!0):v.value,u(_,S,w);return _.length=S,_}},1318:(t,e,r)=>{var n=r(5656),i=r(1400),o=r(6244),s=function(t){return function(e,r,s){var a,l=n(e),c=o(l),u=i(s,c);if(t&&r!=r){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===r)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,e,r)=>{var n=r(9974),i=r(1702),o=r(8361),s=r(7908),a=r(6244),l=r(5417),c=i([].push),u=function(t){var e=1==t,r=2==t,i=3==t,u=4==t,h=6==t,f=7==t,d=5==t||h;return function(p,m,g,y){for(var _,v,b=s(p),x=o(b),w=n(m,g),E=a(x),S=0,T=y||l,A=e?T(p,E):r||f?T(p,0):void 0;E>S;S++)if((d||S in x)&&(v=w(_=x[S],S,b),t))if(e)A[S]=v;else if(v)switch(t){case 3:return!0;case 5:return _;case 6:return S;case 2:c(A,_)}else switch(t){case 4:return!1;case 7:c(A,_)}return h?-1:i||u?u:A}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,r)=>{var n=r(7293),i=r(5112),o=r(7392),s=i("species");t.exports=function(t){return o>=51||!n((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},3671:(t,e,r)=>{var n=r(9662),i=r(7908),o=r(8361),s=r(6244),a=TypeError,l=function(t){return function(e,r,l,c){n(r);var u=i(e),h=o(u),f=s(u),d=t?f-1:0,p=t?-1:1;if(l<2)for(;;){if(d in h){c=h[d],d+=p;break}if(d+=p,t?d<0:f<=d)throw a("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=p)d in h&&(c=r(c,h[d],d,u));return c}};t.exports={left:l(!1),right:l(!0)}},1589:(t,e,r)=>{var n=r(1400),i=r(6244),o=r(6135),s=Array,a=Math.max;t.exports=function(t,e,r){for(var l=i(t),c=n(e,l),u=n(void 0===r?l:r,l),h=s(a(u-c,0)),f=0;c<u;c++,f++)o(h,f,t[c]);return h.length=f,h}},206:(t,e,r)=>{var n=r(1702);t.exports=n([].slice)},4362:(t,e,r)=>{var n=r(1589),i=Math.floor,o=function(t,e){var r=t.length,l=i(r/2);return r<8?s(t,e):a(t,o(n(t,0,l),e),o(n(t,l),e),e)},s=function(t,e){for(var r,n,i=t.length,o=1;o<i;){for(n=o,r=t[o];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==o++&&(t[n]=r)}return t},a=function(t,e,r,n){for(var i=e.length,o=r.length,s=0,a=0;s<i||a<o;)t[s+a]=s<i&&a<o?n(e[s],r[a])<=0?e[s++]:r[a++]:s<i?e[s++]:r[a++];return t};t.exports=o},7475:(t,e,r)=>{var n=r(3157),i=r(4411),o=r(111),s=r(5112)("species"),a=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===a||n(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},5417:(t,e,r)=>{var n=r(7475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},3411:(t,e,r)=>{var n=r(9670),i=r(9212);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},7072:(t,e,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},4326:(t,e,r)=>{var n=r(1702),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:(t,e,r)=>{var n=r(1694),i=r(614),o=r(4326),s=r(5112)("toStringTag"),a=Object,l="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?r:l?o(e):"Object"==(n=o(e))&&i(e.callee)?"Arguments":n}},7741:(t,e,r)=>{var n=r(1702),i=Error,o=n("".replace),s=String(i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);t.exports=function(t,e){if(l&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,a,"");return t}},5631:(t,e,r)=>{"use strict";
vendor: 5,962 bytes, line 2
2var n=r(3070).f,i=r(30),o=r(9190),s=r(9974),a=r(5787),l=r(612),c=r(654),u=r(6340),h=r(9781),f=r(2423).fastKey,d=r(9909),p=d.set,m=d.getterFor;t.exports={getConstructor:function(t,e,r,c){var u=t((function(t,n){a(t,d),p(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),h||(t.size=0),null!=n&&l(n,t[c],{that:t,AS_ENTRIES:r})})),d=u.prototype,g=m(e),y=function(t,e,r){var n,i,o=g(t),s=_(t,e);return s?s.value=r:(o.last=s={index:i=f(e,!0),key:e,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),h?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},_=function(t,e){var r,n=g(t),i=f(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return o(d,{clear:function(){for(var t=g(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,h?t.size=0:this.size=0},delete:function(t){var e=this,r=g(e),n=_(e,t);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),h?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=g(this),n=s(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!_(this,t)}}),o(d,r?{get:function(t){var e=_(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),h&&n(d,"size",{get:function(){return g(this).size}}),u},setStrong:function(t,e,r){var n=e+" Iterator",i=m(e),o=m(n);c(t,e,(function(t,e){p(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),u(e)}}},9320:(t,e,r)=>{"use strict";var n=r(1702),i=r(9190),o=r(2423).getWeakData,s=r(9670),a=r(111),l=r(5787),c=r(612),u=r(2092),h=r(2597),f=r(9909),d=f.set,p=f.getterFor,m=u.find,g=u.findIndex,y=n([].splice),_=0,v=function(t){return t.frozen||(t.frozen=new b)},b=function(){this.entries=[]},x=function(t,e){return m(t.entries,(function(t){return t[0]===e}))};b.prototype={get:function(t){var e=x(this,t);if(e)return e[1]},has:function(t){return!!x(this,t)},set:function(t,e){var r=x(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var u=t((function(t,i){l(t,f),d(t,{type:e,id:_++,frozen:void 0}),null!=i&&c(i,t[n],{that:t,AS_ENTRIES:r})})),f=u.prototype,m=p(e),g=function(t,e,r){var n=m(t),i=o(s(e),!0);return!0===i?v(n).set(e,r):i[n.id]=r,t};return i(f,{delete:function(t){var e=m(this);if(!a(t))return!1;var r=o(t);return!0===r?v(e).delete(t):r&&h(r,e.id)&&delete r[e.id]},has:function(t){var e=m(this);if(!a(t))return!1;var r=o(t);return!0===r?v(e).has(t):r&&h(r,e.id)}}),i(f,r?{get:function(t){var e=m(this);if(a(t)){var r=o(t);return!0===r?v(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),u}}},7710:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1702),s=r(4705),a=r(8052),l=r(2423),c=r(612),u=r(5787),h=r(614),f=r(111),d=r(7293),p=r(7072),m=r(8003),g=r(9587);t.exports=function(t,e,r){var y=-1!==t.indexOf("Map"),_=-1!==t.indexOf("Weak"),v=y?"set":"add",b=i[t],x=b&&b.prototype,w=b,E={},S=function(t){var e=o(x[t]);a(x,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(_&&!f(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return _&&!f(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(_&&!f(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(s(t,!h(b)||!(_||x.forEach&&!d((function(){(new b).entries().next()})))))w=r.getConstructor(e,t,y,v),l.enable();else if(s(t,!0)){var T=new w,A=T[v](_?{}:-0,1)!=T,O=d((function(){T.has(1)})),C=p((function(t){new b(t)})),M=!_&&d((function(){for(var t=new b,e=5;e--;)t[v](e,e);return!t.has(-0)}));C||((w=e((function(t,e){u(t,x);var r=g(new b,t,w);return null!=e&&c(e,r[v],{that:r,AS_ENTRIES:y}),r}))).prototype=x,x.constructor=w),(O||M)&&(S("delete"),S("has"),y&&S("get")),(M||A)&&S(v),_&&x.clear&&delete x.clear}return E[t]=w,n({global:!0,constructor:!0,forced:w!=b},E),m(w,t),_||r.setStrong(w,t,y),w}},9920:(t,e,r)=>{var n=r(2597),i=r(3887),o=r(1236),s=r(3070);t.exports=function(t,e,r){for(var a=i(e),l=s.f,c=o.f,u=0;u<a.length;u++){var h=a[u];n(t,h)||r&&n(r,h)||l(t,h,c(e,h))}}},4964:(t,e,r)=>{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),s=r(8003),a=r(7497),l=function(){return this};t.exports=function(t,e,r,c){var u=e+" Iterator";return t.prototype=i(n,{next:o(+!c,r)}),s(t,u,!1,!0),a[u]=l,t}},8880:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(9114);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);t.exports=function(t,e,r){var s=n(e);s in t?i.f(t,s,o(0,r)):t[s]=r}},7045:(t,e,r)=>{var n=r(6339),i=r(3070);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},8052:(t,e,r)=>{var n=r(614),i=r(3070),o=r(6339),s=r(3072);t.exports=function(t,e,r,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(n(r)&&o(r,c,a),a.global)l?t[e]=r:s(e,r);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}
vendor: 3,183 bytes, line 2
2l?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9190:(t,e,r)=>{var n=r(8052);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},3072:(t,e,r)=>{var n=r(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},654:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(1913),s=r(6530),a=r(614),l=r(4994),c=r(9518),u=r(7674),h=r(8003),f=r(8880),d=r(8052),p=r(5112),m=r(7497),g=r(3383),y=s.PROPER,_=s.CONFIGURABLE,v=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,x=p("iterator"),w="keys",E="values",S="entries",T=function(){return this};t.exports=function(t,e,r,s,p,g,A){l(r,e,s);var O,C,M,k=function(t){if(t===p&&D)return D;if(!b&&t in L)return L[t];switch(t){case w:case E:case S:return function(){return new r(this,t)}}return function(){return new r(this)}},I=e+" Iterator",P=!1,L=t.prototype,R=L[x]||L["@@iterator"]||p&&L[p],D=!b&&R||k(p),z="Array"==e&&L.entries||R;if(z&&(O=c(z.call(new t)))!==Object.prototype&&O.next&&(o||c(O)===v||(u?u(O,v):a(O[x])||d(O,x,T)),h(O,I,!0,!0),o&&(m[I]=T)),y&&p==E&&R&&R.name!==E&&(!o&&_?f(L,"name",E):(P=!0,D=function(){return i(R,this)})),p)if(C={values:k(E),keys:g?D:k(w),entries:k(S)},A)for(M in C)(b||P||!(M in L))&&d(L,M,C[M]);else n({target:e,proto:!0,forced:b||P},C);return o&&!A||L[x]===D||d(L,x,D,{name:p}),m[e]=D,C}},7235:(t,e,r)=>{var n=r(857),i=r(2597),o=r(6061),s=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||s(e,t,{value:o.f(t)})}},5117:(t,e,r)=>{"use strict";var n=r(6330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+n(e)+" of "+n(t))}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var n=r(7854),i=r(111),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8886:(t,e,r)=>{var n=r(8113).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},7871:(t,e,r)=>{var n=r(3823),i=r(5268);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,e,r)=>{var n=r(8113);t.exports=/MSIE|Trident/.test(n)},1528:(t,e,r)=>{var n=r(8113),i=r(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(t,e,r)=>{var n=r(8113);
2t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),i=r(7854);t.exports="process"==n(i.process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,i,o=r(7854),s=r(8113),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},8008:(t,e,r)=>{var n=r(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:(t,e,r)=>{var n=r(7293),i=r(9114);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},2109:(t,e,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),s=r(8052),a=r(3072),l=r(9920),c=r(4705);t.exports=function(t,e){var r,u,h,f,d,p=t.target,m=t.global,g=t.stat;if(r=m?n:g?n[p]||a(p,{}):(n[p]||{}).prototype)for(u in e){if(f=e[u],h=t.dontCallGetSet?(d=i(r,u))&&d.value:r[u],!c(m?u:p+(g?".":"#")+u,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;l(f,h)}(t.sham||h&&h.sham)&&o(f,"sham",!0),s(r,u,f,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1702),i=r(8052),o=r(2261),s=r(7293),a=r(5112),l=r(8880),c=a("species"),u=RegExp.prototype;t.exports=function(t,e,r,h){var f=a(t),d=!s((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d&&!s((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!p||r){var m=n(/./[f]),g=e(f,""[t],(function(t,e,r,i,s){var a=n(t),l=e.exec;return l===o||l===u.exec?d&&!s?{done:!0,value:m(e,r,i)}:{done:!0,value:a(r,e,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(u,f,g[1])}h&&l(u[f],"sham",!0)}},6677:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:(t,e,r)=>{var n=r(4374),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},9974:(t,e,r)=>{var n=r(1702),i=r(9662),o=r(4374),s=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},7065:(t,e,r)=>{"use strict";var n=r(1702),i=r(9662),o=r(111),s=r(2597),a=r(206),l=r(4374),c=Function,u=n([].concat),h=n([].join),f={},d=function(t,e,r){if(!s(f,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";f[e]=c("C,a","return new C("+h(n,",")+")")}return f[e](t,r)};t.exports=l?c.bind:function(t){var e=i(this),r=e.prototype,n=a(arguments,1),s=function(){var r=u(n,a(arguments));return this instanceof s?d(e,r.length,r):e.apply(t,r)};return o(r)&&(s.prototype=r),s}},6916:(t,e,r)=>{var n=r(4374),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},6530:(t,e,r)=>{var n=r(9781),i=r(2597),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},1702:(t,e,r)=>{var n=r(4374),i=Function.prototype,o=i.bind,s=i.call,a=n&&o.bind(s,s);t.exports=n?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},5005:(t,e,r)=>{var n=r(7854),i=r(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},1246:(t,e,r)=>{var n=r(648),i=r(8173),o=r(7497),s=r(5112)("iterator");t.exports=function(t){if(null!=t)return i(t,s)||i(t,"@@iterator")||o[n(t)]}},8554:(t,e,r)=>{var n=r(6916),i=r(9662),o=r(9670),s=r(6330),a=r(1246),l=TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(i(r))return o(n(r,t));throw l(s(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},647:(t,e,r)=>{var n=r(1702),i=r(7908),o=Math.floor,s=n("".charAt),a=n("".replace),l=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,h,f){var d=r+t.length,p=n.length,m=u;return void 0!==h&&(h=i(h),m=c),a(f,m,(function(i,a){var c;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,r);case"'":return l(e,d);case"<":c=h[l(a,1,-1)];break;default:var u=+a;if(0===u)return i;if(u>p){var f=o(u/10);return 0===f?i:f<=p?void 0===n[f-1]?s(a,1):n[f-1]+s(a,1):i}c=n[u-1]}return void 0===c?"":c}))}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(t,e,r)=>{var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),i=r(7293),o=r(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(1702),i=r(7293),o=r(4326),s=Object,a=n("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},9587:(t,e,r)=>{var n=r(614),i=r(111),o=r(7674);t.exports=function(t,e,r){var s,a;return o&&n(s=e.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(t,a),t}},2788:(t,e,r)=>{var n=r(1702),i=r(614),o=r(5465),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},8340:(t,e,r)=>{var n=r(111),i=r(8880);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},2423:(t,e,r)=>{var n=r(2109),i=r(1702),o=r(3501),s=r(111),a=r(2597),l=r(3070).f,c=r(8006),u=r(1156),h=r(2050),f=r(9711),d=r(6677),p=!1,m=f("meta"),g=0,y=function(t){l(t,m,{value:{objectID:"O"+g++,weakData:{}}})},_=t.exports={enable:function(){_.enable=function(){},p=!0;var t=c.f,e=i([].splice),r={};r[m]=1,t(r).length&&(c.f=function(r){for(var n=t(r),i=0,o=n.length;i<o;
vendor: 5,889 bytes, line 2
2i++)if(n[i]===m){e(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},fastKey:function(t,e){if(!s(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,m)){if(!h(t))return"F";if(!e)return"E";y(t)}return t[m].objectID},getWeakData:function(t,e){if(!a(t,m)){if(!h(t))return!0;if(!e)return!1;y(t)}return t[m].weakData},onFreeze:function(t){return d&&p&&h(t)&&!a(t,m)&&y(t),t}};o[m]=!0},9909:(t,e,r)=>{var n,i,o,s=r(8536),a=r(7854),l=r(1702),c=r(111),u=r(8880),h=r(2597),f=r(5465),d=r(6200),p=r(3501),m="Object already initialized",g=a.TypeError,y=a.WeakMap;if(s||f.state){var _=f.state||(f.state=new y),v=l(_.get),b=l(_.has),x=l(_.set);n=function(t,e){if(b(_,t))throw new g(m);return e.facade=t,x(_,t,e),e},i=function(t){return v(_,t)||{}},o=function(t){return b(_,t)}}else{var w=d("state");p[w]=!0,n=function(t,e){if(h(t,w))throw new g(m);return e.facade=t,u(t,w,e),e},i=function(t){return h(t,w)?t[w]:{}},o=function(t){return h(t,w)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),i=r(7293),o=r(614),s=r(648),a=r(5005),l=r(2788),c=function(){},u=[],h=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),p=!f.exec(c),m=function(t){if(!o(t))return!1;try{return h(c,u,t),!0}catch(t){return!1}},g=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(f,l(t))}catch(t){return!0}};g.sham=!0,t.exports=!h||i((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?g:m},5032:(t,e,r)=>{var n=r(2597);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},4705:(t,e,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,s=function(t,e){var r=l[a(t)];return r==u||r!=c&&(i(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},111:(t,e,r)=>{var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,r)=>{var n=r(5005),i=r(614),o=r(7976),s=r(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,a(t))}},612:(t,e,r)=>{var n=r(9974),i=r(6916),o=r(9670),s=r(6330),a=r(7659),l=r(6244),c=r(7976),u=r(8554),h=r(1246),f=r(9212),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},m=p.prototype;t.exports=function(t,e,r){var g,y,_,v,b,x,w,E=r&&r.that,S=!(!r||!r.AS_ENTRIES),T=!(!r||!r.IS_RECORD),A=!(!r||!r.IS_ITERATOR),O=!(!r||!r.INTERRUPTED),C=n(e,E),M=function(t){return g&&f(g,"normal",t),new p(!0,t)},k=function(t){return S?(o(t),O?C(t[0],t[1],M):C(t[0],t[1])):O?C(t,M):C(t)};if(T)g=t.iterator;else if(A)g=t;else{if(!(y=h(t)))throw d(s(t)+" is not iterable");if(a(y)){for(_=0,v=l(t);v>_;_++)if((b=k(t[_]))&&c(m,b))return b;return new p(!1)}g=u(t,y)}for(x=T?t.next:g.next;!(w=i(x,g)).done;){try{b=k(w.value)}catch(t){f(g,"throw",t)}if("object"==typeof b&&b&&c(m,b))return b}return new p(!1)}},9212:(t,e,r)=>{var n=r(6916),i=r(9670),o=r(8173);t.exports=function(t,e,r){var s,a;i(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw r;return r}s=n(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw r;if(a)throw s;return i(s),r}},3383:(t,e,r)=>{"use strict";var n,i,o,s=r(7293),a=r(614),l=r(30),c=r(9518),u=r(8052),h=r(5112),f=r(1913),d=h("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=c(c(o)))!==Object.prototype&&(n=i):p=!0),null==n||s((function(){var t={};return n[d].call(t)!==t}))?n={}:f&&(n=l(n)),a(n[d])||u(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},6339:(t,e,r)=>{var n=r(7293),i=r(614),o=r(2597),s=r(9781),a=r(6530).CONFIGURABLE,l=r(2788),c=r(9909),u=c.enforce,h=c.get,f=Object.defineProperty,d=s&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),p=String(String).split("String"),m=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?f(t,"name",{value:e,configurable:!0}):t.name=e),d&&r&&o(r,"arity")&&t.length!==r.arity&&f(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?s&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=u(t);return o(n,"source")||(n.source=p.join("string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return i(this)&&h(this).source||l(this)}),"toString")},4758:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},5948:(t,e,r)=>{var n,i,o,s,a,l,c,u,h=r(7854),f=r(9974),d=r(1236).f,p=r(261).set,m=r(6833),g=r(1528),y=r(1036),_=r(5268),v=h.MutationObserver||h.WebKitMutationObserver,b=h.document,x=h.process,w=h.Promise,E=d(h,"queueMicrotask"),S=E&&E.value;S||(n=function(){var t,e;for(_&&(t=x.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?s():o=void 0,t}}o=void 0,t&&t.enter()},m||_||y||!v||!b?!g&&w&&w.resolve?((c=w.resolve(void 0)).constructor=w,u=f(c.then,c),s=function(){u(n)}):_?s=function(){x.nextTick(n)}:(p=f(p,h),s=function(){p(n)}):(a=!0,l=b.createTextNode(""),new v(n).observe(l,{characterData:!0}
2),s=function(){l.data=a=!a})),t.exports=S||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,s()),o=e}},735:(t,e,r)=>{var n=r(133);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},133:(t,e,r)=>{var n=r(7392),i=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},590:(t,e,r)=>{var n=r(7293),i=r(5112),o=r(1913),s=i("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},8536:(t,e,r)=>{var n=r(7854),i=r(614),o=r(2788),s=n.WeakMap;t.exports=i(s)&&/native code/.test(o(s))},8523:(t,e,r)=>{"use strict";var n=r(9662),i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(t)}},6277:(t,e,r)=>{var n=r(1340);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},3929:(t,e,r)=>{var n=r(7850),i=TypeError;t.exports=function(t){if(n(t))throw i("The method doesn't accept regular expressions");return t}},3009:(t,e,r)=>{var n=r(7854),i=r(7293),o=r(1702),s=r(1340),a=r(3111).trim,l=r(1361),c=n.parseInt,u=n.Symbol,h=u&&u.iterator,f=/^[+-]?0x/i,d=o(f.exec),p=8!==c(l+"08")||22!==c(l+"0x16")||h&&!i((function(){c(Object(h))}));t.exports=p?function(t,e){var r=a(s(t));return c(r,e>>>0||(d(f,r)?16:10))}:c},1574:(t,e,r)=>{"use strict";var n=r(9781),i=r(1702),o=r(6916),s=r(7293),a=r(1956),l=r(5181),c=r(5296),u=r(7908),h=r(8361),f=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!f||s((function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!=f({},t)[r]||a(f({},e)).join("")!=i}))?function(t,e){for(var r=u(t),i=arguments.length,s=1,f=l.f,d=c.f;i>s;)for(var m,g=h(arguments[s++]),y=f?p(a(g),f(g)):a(g),_=y.length,v=0;_>v;
2)m=y[v++],n&&!o(d,g,m)||(r[m]=g[m]);return r}:f},30:(t,e,r)=>{var n,i=r(9670),o=r(6048),s=r(748),a=r(3501),l=r(490),c=r(317),u=r(6200),h=u("IE_PROTO"),f=function(){},d=function(t){return"<script>"+t+"</"+"script>"},p=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;m="undefined"!=typeof document?document.domain&&n?p(n):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):p(n);for(var r=s.length;r--;)delete m.prototype[s[r]];return m()};a[h]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(f.prototype=i(t),r=new f,f.prototype=null,r[h]=t):r=m(),void 0===e?r:o.f(r,e)}},6048:(t,e,r)=>{var n=r(9781),i=r(3353),o=r(3070),s=r(9670),a=r(5656),l=r(1956);e.f=n&&!i?Object.defineProperties:function(t,e){s(t);for(var r,n=a(e),i=l(e),c=i.length,u=0;c>u;)o.f(t,r=i[u++],n[r]);return t}},3070:(t,e,r)=>{var n=r(9781),i=r(4664),o=r(3353),s=r(9670),a=r(4948),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=n?o?function(t,e,r){if(s(t),e=a(e),s(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r.writable){var n=u(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:f in r?r.configurable:n.configurable,enumerable:h in r?r.enumerable:n.enumerable,writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(s(t),e=a(e),s(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),i=r(6916),o=r(5296),s=r(9114),a=r(5656),l=r(4948),c=r(2597),u=r(4664),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},1156:(t,e,r)=>{var n=r(4326),i=r(5656),o=r(8006).f,s=r(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==n(t)?function(t){try{return o(t)}catch(t){return s(a)}}(t):o(i(t))}},8006:(t,e,r)=>{var n=r(6324),i=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,r)=>{var n=r(2597),i=r(614),o=r(7908),s=r(6200),a=r(8544),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(n(e,l))return e[l];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?u:null}},2050:(t,e,r)=>{var n=r(7293),i=r(111),o=r(4326),s=r(7556),a=Object.isExtensible,l=n((function(){a(1)}));t.exports=l||s?function(t){return!!i(t)&&((!s||"ArrayBuffer"!=o(t))&&(!a||a(t)))}:a},7976:(t,e,r)=>{var n=r(1702);t.exports=n({}.isPrototypeOf)},6324:(t,e,r)=>{var n=r(1702),i=r(2597),o=r(5656),s=r(1318).indexOf,a=r(3501),l=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,u=[];for(r in n)!i(a,r)&&i(n,r)&&l(u,r);for(;e.length>c;)i(n,r=e[c++])&&(~s(u,r)||l(u,r));return u}},1956:(t,e,r)=>{var n=r(6324),i=r(748);t.exports=Object.keys||function(t){return n(t,i)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:(t,e,r)=>{var n=r(1702),i=r(9670),o=r(6077);
vendor: 4,426 bytes, line 2
2t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),o(n),e?t(r,n):r.__proto__=n,r}}():void 0)},4699:(t,e,r)=>{var n=r(9781),i=r(1702),o=r(1956),s=r(5656),a=i(r(5296).f),l=i([].push),c=function(t){return function(e){for(var r,i=s(e),c=o(i),u=c.length,h=0,f=[];u>h;)r=c[h++],n&&!a(i,r)||l(f,t?[r,i[r]]:i[r]);return f}};t.exports={entries:c(!0),values:c(!1)}},288:(t,e,r)=>{"use strict";var n=r(1694),i=r(648);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,r)=>{var n=r(6916),i=r(614),o=r(111),s=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!o(a=n(r,t)))return a;if(i(r=t.valueOf)&&!o(a=n(r,t)))return a;if("string"!==e&&i(r=t.toString)&&!o(a=n(r,t)))return a;throw s("Can't convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),i=r(1702),o=r(8006),s=r(5181),a=r(9670),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=s.f;return r?l(e,r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,e,r)=>{var n=r(7854),i=r(2492),o=r(614),s=r(4705),a=r(2788),l=r(5112),c=r(7871),u=r(3823),h=r(1913),f=r(7392),d=i&&i.prototype,p=l("species"),m=!1,g=o(n.PromiseRejectionEvent),y=s("Promise",(function(){var t=a(i),e=t!==String(i);if(!e&&66===f)return!0;if(h&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[p]=n,!(m=r.then((function(){}))instanceof n))return!0}return!e&&(c||u)&&!g}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:g,SUBCLASSING:m}},2492:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},9478:(t,e,r)=>{var n=r(9670),i=r(111),o=r(8523);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},8368:(t,e,r)=>{var n=r(2492),i=r(7072),o=r(3702).CONSTRUCTOR;t.exports=o||!i((function(t){n.all(t).then(void 0,(function(){}))}))},2626:(t,e,r)=>{var n=r(3070).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},7651:(t,e,r)=>{var n=r(6916),i=r(9670),o=r(614),s=r(4326),a=r(2261),l=TypeError;t.exports=function(t,e){var r=t.exec;if(o(r)){var c=n(r,t,e);return null!==c&&i(c),c}if("RegExp"===s(t))return n(a,t,e);throw l("RegExp#exec called on incompatible receiver")}},2261:(t,e,r)=>{"use strict";var n,i,o=r(6916),s=r(1702),a=r(1340),l=r(7066),c=r(2999),u=r(2309),h=r(30),f=r(9909).get,d=r(9441),p=r(7168),m=u("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,y=g,_=s("".charAt),v=s("".indexOf),b=s("".replace),x=s("".slice),w=(i=/b*/g,o(g,n=/a/,"a"),o(g,i,"a"),0!==n.lastIndex||0!==i.lastIndex),E=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(w||S||E||d||p)&&(y=function(t){var e,r,n,i,s,c,u,d=this,p=f(d),T=a(t),A=p.raw;if(A)return A.lastIndex=d.lastIndex,e=o(y,A,T),d.lastIndex=A.lastIndex,e;var O=p.groups,C=E&&d.sticky,M=o(l,d),k=d.source,I=0,P=T;if(C&&(M=b(M,"y",""),-1===v(M,"g")&&(M+="g"),P=x(T,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==_(T,d.lastIndex-1))&&(k="(?: "+k+")",P=" "+P,I++),r=new RegExp("^(?:"+k+")",M)),S&&(r=new RegExp("^"+k+"$(?!\\s)",M)),w&&(n=d.lastIndex),i=o(g,C?r:d,P),C?i?(i.input=x(i.input,I),i[0]=x(i[0],I),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:w&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),S&&i&&i.length>1&&o(m,i[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&O)for(i.groups=c=h(null),s=0;s<O.length;s++)c[(u=O[s])[0]]=i[u[1]];return i}),t.exports=y},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4706:(t,e,r)=>{var n=r(6916),i=r(2597),o=r(7976),s=r(7066),a=RegExp.prototype;
2t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||i(t,"flags")||!o(a,t)?e:n(s,t)}},2999:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp,o=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),s=o||n((function(){return!i("a","y").sticky})),a=o||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},9441:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:t=>{var e=TypeError;t.exports=function(t){if(null==t)throw e("Can't call method on "+t);return t}},1150:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},6340:(t,e,r)=>{"use strict";var n=r(5005),i=r(3070),o=r(5112),s=r(9781),a=o("species");t.exports=function(t){var e=n(t),r=i.f;s&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,i=r(2597),o=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),i=r(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,r)=>{var n=r(7854),i=r(3072),o="__core-js_shared__",s=n[o]||i(o,{});t.exports=s},2309:(t,e,r)=>{var n=r(1913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.24.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,r)=>{var n=r(9670),i=r(9483),o=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[o])?e:i(r)}},8710:(t,e,r)=>{var n=r(1702),i=r(9303),o=r(1340),s=r(4488),a=n("".charAt),l=n("".charCodeAt),c=n("".slice),u=function(t){return function(e,r){var n,u,h=o(s(e)),f=i(r),d=h.length;return f<0||f>=d?t?"":void 0:(n=l(h,f))<55296||n>56319||f+1===d||(u=l(h,f+1))<56320||u>57343?t?a(h,f):n:t?c(h,f,f+2):u-56320+(n-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},4986:(t,e,r)=>{var n=r(8113);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},6650:(t,e,r)=>{var n=r(1702),i=r(7466),o=r(1340),s=r(8415),a=r(4488),l=n(s),c=n("".slice),u=Math.ceil,h=function(t){return function(e,r,n){var s,h,f=o(a(e)),d=i(r),p=f.length,m=void 0===n?" ":o(n);return d<=p||""==m?f:((h=l(m,u((s=d-p)/m.length))).length>s&&(h=c(h,0,s)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},3197:(t,e,r)=>{"use strict";var n=r(1702),i=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",l=RangeError,c=n(s.exec),u=Math.floor,h=String.fromCharCode,f=n("".charCodeAt),d=n([].join),p=n([].push),m=n("".replace),g=n("".split),y=n("".toLowerCase),_=function(t){return t+22+75*(t<26)},v=function(t,e,r){var n=0;for(t=r?u(t/700):t>>1,t+=u(t/e);t>455;)t=u(t/35),n+=36;return u(n+36*t/(t+38))},b=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var i=f(t,r++);if(i>=55296&&i<=56319&&r<n){var o=f(t,r++);56320==(64512&o)?p(e,((1023&i)<<10)+(1023&o)+65536):(p(e,i),r--)}else p(e,i)}return e}(t);var r,n,o=t.length,s=128,c=0,m=72;for(r=0;r<t.length;r++)(n=t[r])<128&&p(e,h(n));var g=e.length,y=g;for(g&&p(e,"-");y<o;){var b=i;for(r=0;r<t.length;r++)(n=t[r])>=s&&n<b&&(b=n);var x=y+1;if(b-s>u((i-c)/x))throw l(a);for(c+=(b-s)*x,s=b,r=0;r<t.length;r++){if((n=t[r])<s&&++c>
2i)throw l(a);if(n==s){for(var w=c,E=36;;){var S=E<=m?1:E>=m+26?26:E-m;if(w<S)break;var T=w-S,A=36-S;p(e,h(_(S+T%A))),w=u(T/A),E+=36}p(e,h(_(w))),m=v(c,x,y==g),c=0,y++}}c++,s++}return d(e,"")};t.exports=function(t){var e,r,n=[],i=g(m(y(t),s,"."),".");for(e=0;e<i.length;e++)r=i[e],p(n,c(o,r)?"xn--"+b(r):r);return d(n,".")}},8415:(t,e,r)=>{"use strict";var n=r(9303),i=r(1340),o=r(4488),s=RangeError;t.exports=function(t){var e=i(o(this)),r="",a=n(t);if(a<0||a==1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(r+=e);return r}},6091:(t,e,r)=>{var n=r(6530).PROPER,i=r(7293),o=r(1361);t.exports=function(t){return i((function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||n&&o[t].name!==t}))}},3111:(t,e,r)=>{var n=r(1702),i=r(4488),o=r(1340),s=r(1361),a=n("".replace),l="["+s+"]",c=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),h=function(t){return function(e){var r=o(i(e));return 1&t&&(r=a(r,c,"")),2&t&&(r=a(r,u,"")),r}};t.exports={start:h(1),end:h(2),trim:h(3)}},6532:(t,e,r)=>{var n=r(6916),i=r(5005),o=r(5112),s=r(8052);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,a=o("toPrimitive");e&&!e[a]&&s(e,a,(function(t){return n(r,this)}),{arity:1})}},261:(t,e,r)=>{var n,i,o,s,a=r(7854),l=r(2104),c=r(9974),u=r(614),h=r(2597),f=r(7293),d=r(490),p=r(206),m=r(317),g=r(8053),y=r(6833),_=r(5268),v=a.setImmediate,b=a.clearImmediate,x=a.process,w=a.Dispatch,E=a.Function,S=a.MessageChannel,T=a.String,A=0,O={},C="onreadystatechange";try{n=a.location}catch(t){}var M=function(t){if(h(O,t)){var e=O[t];delete O[t],e()}},k=function(t){return function(){M(t)}},I=function(t){M(t.data)},P=function(t){a.postMessage(T(t),n.protocol+"//"+n.host)};v&&b||(v=function(t){g(arguments.length,1);var e=u(t)?t:E(t),r=p(arguments,1);return O[++A]=function(){l(e,void 0,r)},i(A),A},b=function(t){delete O[t]},_?i=function(t){x.nextTick(k(t))}:w&&w.now?i=function(t){w.now(k(t))}:S&&!y?(s=(o=new S).port2,o.port1.onmessage=I,i=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!f(P)?(i=P,a.addEventListener("message",I,!1)):i=C in m("script")?function(t){d.appendChild(m("script")).onreadystatechange=function(){d.removeChild(this),M(t)}}:function(t){setTimeout(k(t),0)}),t.exports={set:v,clear:b}},863:(t,e,r)=>{var n=r(1702);t.exports=n(1..valueOf)},1400:(t,e,r)=>{var n=r(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5656:(t,e,r)=>{var n=r(8361),i=r(4488);t.exports=function(t){return n(i(t))}},9303:(t,e,r)=>{var n=r(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},7466:(t,e,r)=>{var n=r(9303),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488),i=Object;t.exports=function(t){return i(n(t))}},7593:(t,e,r)=>{var n=r(6916),i=r(111),o=r(2190),s=r(8173),a=r(2140),l=r(5112),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,l=s(t,u);if(l){if(void 0===e&&(e="default"),r=n(l,t,e),!i(r)||o(r))return r;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,r)=>{var n=r(7593),i=r(2190);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,e,r)=>{var n=r(648),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,r)=>{var n=r(1702),i=0,o=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},3307:(t,e,r)=>{var n=r(133);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,r)=>{var n=r(9781),i=r(7293);t.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var e=TypeError;t.exports=function(t,r){if(t<r)throw e("Not enough arguments");return t}},6061:(t,e,r)=>{var n=r(5112);e.f=n},5112:(t,e,r)=>{var n=r(7854),i=r(2309),o=r(2597),s=r(9711),a=r(133),l=r(3307),c=i("wks"),u=n.Symbol,h=u&&u.for,f=l?u:u&&u.withoutSetter||s;t.exports=function(t){if(!o(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&o(u,t)?c[t]=u[t]:c[t]=l&&h?h(e):f(e)}return c[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},9191:(t,e,r)=>{"use strict";var n=r(5005),i=r(2597),o=r(8880),s=r(7976),a=r(7674),l=r(9920),c=r(2626),u=r(9587),h=r(6277),f=r(8340),d=r(7741),p=r(2914),m=r(9781),g=r(1913);t.exports=function(t,e,r,y){var _="stackTraceLimit",v=y?2:1,b=t.split("."),x=b[b.length-1],w=n.apply(null,b);if(w){var E=w.prototype;if(!g&&i(E,"cause")&&delete E.cause,!r)return w;var S=n("Error"),T=e((function(t,e){var r=h(y?e:t,void 0),n=y?new w(t):new w;return void 0!==r&&o(n,"message",r),p&&o(n,"stack",d(n.stack,2)),this&&s(E,this)&&u(n,this,T),arguments.length>v&&f(n,arguments[v]),n}));if(T.prototype=E,"Error"!==x?a?a(T,S):l(T,S,{name:!0}):m&&_ in w&&(c(T,w,_),c(T,w,"prepareStackTrace")),l(T,w),!g)try{E.name!==x&&o(E,"name",x),E.constructor=T}catch(t){}return T}}},2222:(t,e,r)=>{"use strict";var n=r(2109),i=r(7293),o=r(3157),s=r(111),a=r(7908),l=r(6244),c=r(7207),u=r(6135),h=r(5417),f=r(1194),d=r
vendor: 2,038 bytes, line 2
2(5112),p=r(7392),m=d("isConcatSpreadable"),g=p>=51||!i((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),y=f("concat"),_=function(t){if(!s(t))return!1;var e=t[m];return void 0!==e?!!e:o(t)};n({target:"Array",proto:!0,arity:1,forced:!g||!y},{concat:function(t){var e,r,n,i,o,s=a(this),f=h(s,0),d=0;for(e=-1,n=arguments.length;e<n;e++)if(_(o=-1===e?s:arguments[e]))for(i=l(o),c(d+i),r=0;r<i;r++,d++)r in o&&u(f,d,o[r]);else c(d+1),u(f,d++,o);return f.length=d,f}})},7327:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},4553:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).findIndex,o=r(1223),s="findIndex",a=!0;s in[]&&Array(1).findIndex((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},9826:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),s="find",a=!0;s in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},1038:(t,e,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(t){Array.from(t)}))},{from:i})},6699:(t,e,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(7293),s=r(1223);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},6992:(t,e,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),s=r(9909),a=r(3070).f,l=r(654),c=r(1913),u=r(9781),h="Array Iterator",f=s.set,d=s.getterFor(h);t.exports=l(Array,"Array",(function(t,e){f(this,{type:h,target:n(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");var p=o.Arguments=o.Array;
vendor: 1,898 bytes, line 2
2if(i("keys"),i("values"),i("entries"),!c&&u&&"values"!==p.name)try{a(p,"name",{value:"values"})}catch(t){}},9600:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(8361),s=r(5656),a=r(9341),l=i([].join),c=o!=Object,u=a("join",",");n({target:"Array",proto:!0,forced:c||!u},{join:function(t){return l(s(this),void 0===t?",":t)}})},1249:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},5827:(t,e,r)=>{"use strict";var n=r(2109),i=r(3671).left,o=r(9341),s=r(7392),a=r(5268);n({target:"Array",proto:!0,forced:!o("reduce")||!a&&s>79&&s<83},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},5069:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3157),s=i([].reverse),a=[1,2];n({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),s(this)}})},7042:(t,e,r)=>{"use strict";var n=r(2109),i=r(3157),o=r(4411),s=r(111),a=r(1400),l=r(6244),c=r(5656),u=r(6135),h=r(5112),f=r(1194),d=r(206),p=f("slice"),m=h("species"),g=Array,y=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var r,n,h,f=c(this),p=l(f),_=a(t,p),v=a(void 0===e?p:e,p);if(i(f)&&(r=f.constructor,(o(r)&&(r===g||i(r.prototype))||s(r)&&null===(r=r[m]))&&(r=void 0),r===g||void 0===r))return d(f,_,v);for(n=new(void 0===r?g:r)(y(v-_,0)),h=0;_<v;_++,h++)_ in f&&u(n,h,f[_]);return n.length=h,n}})},2707:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(9662),s=r(7908),a=r(6244),l=r(5117),c=r(1340),u=r(7293),h=r(4362),f=r(9341),d=r(8886),p=r(256),m=r(7392),g=r(8008),y=[],_=i(y.sort),v=i(y.push),b=u((function(){y.sort(void 0)})),x=u((function(){y.sort(null)})),w=f("sort"),E=!u((function(){if(m)return m<70;if(!(d&&d>3)){if(p)return!0;if(g)return g<603;var t,e,r,n,i="";for(t=65;t<76;
vendor: 5,152 bytes, line 2
2t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)y.push({k:e+n,v:r})}for(y.sort((function(t,e){return e.v-t.v})),n=0;n<y.length;n++)e=y[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:b||!x||!w||!E},{sort:function(t){void 0!==t&&o(t);var e=s(this);if(E)return void 0===t?_(e):_(e,t);var r,n,i=[],u=a(e);for(n=0;n<u;n++)n in e&&v(i,e[n]);for(h(i,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=i.length,n=0;n<r;)e[n]=i[n++];for(;n<u;)l(e,n++);return e}})},561:(t,e,r)=>{"use strict";var n=r(2109),i=r(7908),o=r(1400),s=r(9303),a=r(6244),l=r(7207),c=r(5417),u=r(6135),h=r(5117),f=r(1194)("splice"),d=Math.max,p=Math.min;n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,f,m,g,y,_=i(this),v=a(_),b=o(t,v),x=arguments.length;for(0===x?r=n=0:1===x?(r=0,n=v-b):(r=x-2,n=p(d(s(e),0),v-b)),l(v+r-n),f=c(_,n),m=0;m<n;m++)(g=b+m)in _&&u(f,m,_[g]);if(f.length=n,r<n){for(m=b;m<v-n;m++)y=m+r,(g=m+n)in _?_[y]=_[g]:h(_,y);for(m=v;m>v-n+r;m--)h(_,m-1)}else if(r>n)for(m=v-n;m>b;m--)y=m+r-1,(g=m+n-1)in _?_[y]=_[g]:h(_,y);for(m=0;m<r;m++)_[m+b]=arguments[m+2];return _.length=v-n+r,f}})},1703:(t,e,r)=>{var n=r(2109),i=r(7854),o=r(2104),s=r(9191),a="WebAssembly",l=i.WebAssembly,c=7!==Error("e",{cause:7}).cause,u=function(t,e){var r={};r[t]=s(t,e,c),n({global:!0,constructor:!0,arity:1,forced:c},r)},h=function(t,e){if(l&&l[t]){var r={};r[t]=s("WebAssembly."+t,e,c),n({target:a,stat:!0,constructor:!0,arity:1,forced:c},r)}};u("Error",(function(t){return function(e){return o(t,this,arguments)}})),u("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),u("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),u("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),u("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),u("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),u("URIError",(function(t){return function(e){return o(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},8309:(t,e,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(1702),s=r(3070).f,a=Function.prototype,l=o(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=o(c.exec);n&&!i&&s(a,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},8862:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(2104),s=r(6916),a=r(1702),l=r(7293),c=r(3157),u=r(614),h=r(111),f=r(2190),d=r(206),p=r(133),m=i("JSON","stringify"),g=a(/./.exec),y=a("".charAt),_=a("".charCodeAt),v=a("".replace),b=a(1..toString),x=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,S=!p||l((function(){var t=i("Symbol")();return"[null]"!=m([t])||"{}"!=m({a:t})||"{}"!=m(Object(t))})),T=l((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),A=function(t,e){var r=d(arguments),n=e;if((h(e)||void 0!==t)&&!f(t))return c(e)||(e=function(t,e){if(u(n)&&(e=s(n,this,t,e)),!f(e))return e}),r[1]=e,o(m,null,r)},O=function(t,e,r){var n=y(r,e-1),i=y(r,e+1);return g(w,t)&&!g(E,i)||g(E,t)&&!g(w,n)?"\\u"+b(_(t,0),16):t};m&&n({target:"JSON",stat:!0,arity:3,forced:S||T},{stringify:function(t,e,r){var n=d(arguments),i=o(S?A:m,null,n);return T&&"string"==typeof i?v(i,x,O):i}})},3706:(t,e,r)=>{var n=r(7854);r(8003)(n.JSON,"JSON",!0)},408:(t,e,r)=>{r(8003)(Math,"Math",!0)},9653:(t,e,r)=>{"use strict";var n=r(9781),i=r(7854),o=r(1702),s=r(4705),a=r(8052),l=r(2597),c=r(9587),u=r(7976),h=r(2190),f=r(7593),d=r(7293),p=r(8006).f,m=r(1236).f,g=r(3070).f,y=r(863),_=r(3111).trim,v="Number",b=i.Number,x=b.prototype,w=i.TypeError,E=o("".slice),S=o("".charCodeAt),T=function(t){var e=f(t,"number");return"bigint"==typeof e?e:A(e)},A=function(t){var e,r,n,i,o,s,a,l,c=f(t,"number");if(h(c))throw w("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=_(c),43===(e=S(c,0))||45===e){if(88===(r=S(c,2))||120===r)return NaN}else if(48===e){switch(S(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(s=(o=E(c,2)).length,a=0;a<s;a++)if((l=S(o,a))<48||l>i)return NaN;return parseInt(o,n)}return+c};if(s(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var O,C=function(t){var e=arguments.length<1?0:b(T(t)),r=this;return u(x,r)&&d((function(){y(r)}))?c(Object(e),r,C):e},M=n?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),k=0;M.length>k;k++)l(b,O=M[k])&&!l(C,O)&&g(C,O,m(b,O));C.prototype=x,x.constructor=C,a(i,v,C,{constructor:!0})}},4048:(t,e,r)=>{r(2109)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},4363:(t,e,r)=>{r(2109)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0}
vendor: 4,085 bytes, line 2
2,{MAX_SAFE_INTEGER:9007199254740991})},9494:(t,e,r)=>{var n=r(2109),i=r(3009);n({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},9601:(t,e,r)=>{var n=r(2109),i=r(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9720:(t,e,r)=>{var n=r(2109),i=r(4699).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},5003:(t,e,r)=>{var n=r(2109),i=r(7293),o=r(5656),s=r(1236).f,a=r(9781),l=i((function(){s(1)}));n({target:"Object",stat:!0,forced:!a||l,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},9337:(t,e,r)=>{var n=r(2109),i=r(9781),o=r(3887),s=r(5656),a=r(1236),l=r(6135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=s(t),i=a.f,c=o(n),u={},h=0;c.length>h;)void 0!==(r=i(n,e=c[h++]))&&l(u,e,r);return u}})},9660:(t,e,r)=>{var n=r(2109),i=r(133),o=r(7293),s=r(5181),a=r(7908);n({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(t){var e=s.f;return e?e(a(t)):[]}})},489:(t,e,r)=>{var n=r(2109),i=r(7293),o=r(7908),s=r(9518),a=r(8544);n({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},7941:(t,e,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,r)=>{var n=r(1694),i=r(8052),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(t,e,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},1058:(t,e,r)=>{var n=r(2109),i=r(3009);n({global:!0,forced:parseInt!=i},{parseInt:i})},821:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(9662),s=r(8523),a=r(2534),l=r(612);n({target:"Promise",stat:!0,forced:r(8368)},{all:function(t){var e=this,r=s.f(e),n=r.resolve,c=r.reject,u=a((function(){var r=o(e.resolve),s=[],a=0,u=1;l(t,(function(t){var o=a++,l=!1;u++,i(r,e,t).then((function(t){l||(l=!0,s[o]=t,--u||n(s))}),c)})),--u||n(s)}));return u.error&&c(u.value),r.promise}})},4164:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3702).CONSTRUCTOR,s=r(2492),a=r(5005),l=r(614),c=r(8052),u=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&l(s)){var h=a("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},3401:(t,e,r)=>{"use strict";var n,i,o,s=r(2109),a=r(1913),l=r(5268),c=r(7854),u=r(6916),h=r(8052),f=r(7674),d=r(8003),p=r(6340),m=r(9662),g=r(614),y=r(111),_=r(5787),v=r(6707),b=r(261).set,x=r(5948),w=r(842),E=r(2534),S=r(8572),T=r(9909),A=r(2492),O=r(3702),C=r(8523),M="Promise",k=O.CONSTRUCTOR,I=O.REJECTION_EVENT,P=O.SUBCLASSING,L=T.getterFor(M),R=T.set,D=A&&A.prototype,z=A,B=D,j=c.TypeError,F=c.document,N=c.process,$=C.f,U=$,V=!!(F&&F.createEvent&&c.dispatchEvent),G="unhandledrejection",q=function(t){var e;return!(!y(t)||!g(e=t.then))&&e},H=function(t,e){var r,n,i,o=e.value,s=1==e.state,a=s?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&K(e),e.rejection=1),!0===a?r=o:(h&&h.enter(),r=a(o),h&&(h.exit(),i=!0)),r===t.promise?c(j("Promise-chain cycle")):(n=q(r))?u(n,r,l,c):l(r)):c(o)}catch(t){h&&!i&&h.exit(),c(t)}},W=function(t,e){t.notified||(t.notified=!0,x((function(){for(var r,n=t.reactions;r=n.get();)H(r,t);t.notified=!1,e&&!t.rejection&&X(t)})))},Z=function(t,e,r){var n,i;V?((n=F.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!I&&(i=c["on"+t])?i(n):t===G&&w("Unhandled promise rejection",r)},X=function(t){u(b,c,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=E((function(){l?N.emit("unhandledRejection",n,r):Z(G,r,n)})),t.rejection=l||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},K=function(t){u(b,c,(function(){var e=t.facade;l?N.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},J=function(t,e,r){return function(n){t(e,n,r)}},Q=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,W(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);
vendor: 7,514 bytes, line 2
2try{if(t.facade===e)throw j("Promise can't be resolved itself");var n=q(e);n?x((function(){var r={done:!1};try{u(n,e,J(tt,r,t),J(Q,r,t))}catch(e){Q(r,e,t)}})):(t.value=e,t.state=1,W(t,!1))}catch(e){Q({done:!1},e,t)}}};if(k&&(B=(z=function(t){_(this,B),m(t),u(n,this);var e=L(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(n=function(t){R(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=h(B,"then",(function(t,e){var r=L(this),n=$(v(this,z));return r.parent=!0,n.ok=!g(t)||t,n.fail=g(e)&&e,n.domain=l?N.domain:void 0,0==r.state?r.reactions.add(n):x((function(){H(n,r)})),n.promise})),i=function(){var t=new n,e=L(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},C.f=$=function(t){return t===z||undefined===t?new i(t):U(t)},!a&&g(A)&&D!==Object.prototype)){o=D.then,P||h(D,"then",(function(t,e){var r=this;return new z((function(t,e){u(o,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,B)}s({global:!0,constructor:!0,wrap:!0,forced:k},{Promise:z}),d(z,M,!1,!0),p(M)},7727:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(2492),s=r(7293),a=r(5005),l=r(614),c=r(6707),u=r(9478),h=r(8052),f=o&&o.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,a("Promise")),r=l(t);return this.then(r?function(r){return u(e,t()).then((function(){return r}))}:t,r?function(r){return u(e,t()).then((function(){throw r}))}:t)}}),!i&&l(o)){var d=a("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},8674:(t,e,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(9662),s=r(8523),a=r(2534),l=r(612);n({target:"Promise",stat:!0,forced:r(8368)},{race:function(t){var e=this,r=s.f(e),n=r.reject,c=a((function(){var s=o(e.resolve);l(t,(function(t){i(s,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},683:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(8523);n({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},6294:(t,e,r)=>{"use strict";var n=r(2109),i=r(5005),o=r(1913),s=r(2492),a=r(3702).CONSTRUCTOR,l=r(9478),c=i("Promise"),u=o&&!a;n({target:"Promise",stat:!0,forced:o||a},{resolve:function(t){return l(u&&this===c?s:this,t)}})},2419:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(2104),s=r(7065),a=r(9483),l=r(9670),c=r(111),u=r(30),h=r(7293),f=i("Reflect","construct"),d=Object.prototype,p=[].push,m=h((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),g=!h((function(){f((function(){}))})),y=m||g;n({target:"Reflect",stat:!0,forced:y,sham:y},{construct:function(t,e){a(t),l(e);var r=arguments.length<3?t:a(arguments[2]);if(g&&!m)return f(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return o(p,n,e),new(o(s,t,n))}var i=r.prototype,h=u(c(i)?i:d),y=o(t,h,e);return c(y)?y:h}})},4819:(t,e,r)=>{var n=r(2109),i=r(6916),o=r(111),s=r(9670),a=r(5032),l=r(1236),c=r(9518);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,u,h=arguments.length<3?e:arguments[2];return s(e)===h?e[r]:(n=l.f(e,r))?a(n)?n.value:void 0===n.get?void 0:i(n.get,h):o(u=c(e))?t(u,r,h):void 0}})},1299:(t,e,r)=>{var n=r(2109),i=r(7854),o=r(8003);n({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},4603:(t,e,r)=>{var n=r(9781),i=r(7854),o=r(1702),s=r(4705),a=r(9587),l=r(8880),c=r(8006).f,u=r(7976),h=r(7850),f=r(1340),d=r(4706),p=r(2999),m=r(2626),g=r(8052),y=r(7293),_=r(2597),v=r(9909).enforce,b=r(6340),x=r(5112),w=r(9441),E=r(7168),S=x("match"),T=i.RegExp,A=T.prototype,O=i.SyntaxError,C=o(A.exec),M=o("".charAt),k=o("".replace),I=o("".indexOf),P=o("".slice),L=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,D=/a/g,z=new T(R)!==R,B=p.MISSED_STICKY,j=p.UNSUPPORTED_Y,F=n&&(!z||B||w||E||y((function(){return D[S]=!1,T(R)!=R||T(D)==D||"/a/i"!=T(R,"i")})));if(s("RegExp",F)){for(var N=function(t,e){var r,n,i,o,s,c,p=u(A,this),m=h(t),g=void 0===e,y=[],b=t;if(!p&&m&&g&&t.constructor===N)return t;if((m||u(A,t))&&(t=t.source,g&&(e=d(b))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),b=t,w&&"dotAll"in R&&(n=!!e&&I(e,"s")>-1)&&(e=k(e,/s/g,"")),r=e,B&&"sticky"in R&&(i=!!e&&I(e,"y")>-1)&&j&&(e=k(e,/y/g,"")),E&&(o=function(t){for(var e,r=t.length,n=0,i="",o=[],s={},a=!1,l=!1,c=0,u="";n<=r;n++){if("\\"===(e=M(t,n)))e+=M(t,++n);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:C(L,P(t,n+1))&&(n+=2,l=!0),i+=e,c++;continue;case">"===e&&l:if(""===u||_(s,u))throw new O("Invalid capture group name");s[u]=!0,o[o.length]=[u,c],l=!1,u="";continue}l?u+=e:i+=e}return[i,o]}(t),t=o[0],y=o[1]),s=a(T(t,e),p?this:A,N),(n||i||y.length)&&(c=v(s),n&&(c.dotAll=!0,c.raw=N(function(t){for(var e,r=t.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(e=M(t,n))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+M(t,++n);return i}(t),r)),i&&(c.sticky=!0),y.length&&(c.groups=y)),t!==b)try{l(s,"source",""===b?"(?:)":b)}catch(t){}return s},$=c(T),U=0;$.length>U;)m(N,T,$[U++]);A.constructor=N,N.prototype=A,g(i,"RegExp",N,{constructor:!0})}b("RegExp")},8450:(t,e,r)=>{var n=r(9781),i=r(9441),o=r(4326),s=r(7045),a=r(9909).get,l=RegExp.prototype,c=TypeError;n&&i&&s(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!a(this).dotAll;throw c("Incompatible receiver, RegExp required")}}})},4916:(t,e,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},8386:(t,e,r)=>{var n=r(9781),i=r(2999).MISSED_STICKY,o=r(4326),s=r(7045),a=r(9909).get,l=RegExp.prototype,c=TypeError;n&&i&&s(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!a(this).sticky;throw c("Incompatible receiver, RegExp required")}}})},7601:(t,e,r)=>{"use strict";r(4916);var n,i,o=r(2109),s=r(6916),a=r(1702),l=r(614),c=r(111),u=(n=!1,(i=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&n),h=TypeError,f=a(/./.test);o({target:"RegExp",proto:!0,forced:!u},{test:function(t){var e=this.exec;if(!l(e))return f(this,t);var r=s(e,this,t);if(null!==r&&!c(r))throw new h("RegExp exec method returned something other than an Object or null");return!!r}})},9714:(t,e,r)=>{"use strict";var n=r(6530).PROPER,i=r(8052),o=r(9670),s=r(1340),a=r(7293),l=r(4706),c="toString",u=RegExp.prototype.toString,h=a((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),f=n&&u.name!=c;(h||f)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+s(t.source)+"/"+s(l(t))}),{unsafe:!0})},7227:(t,e,r)=>{"use strict";r(7710)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(5631))},189:(t,e,r)=>{r(7227)},7852:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1702),s=r(1236).f,a=r(7466),l=r(1340),c=r(3929),u=r(4488),h=r(4964),f=r(1913),d=o("".endsWith),p=o("".slice),m=Math.min,g=h("endsWith");i({target:"String",proto:!0,forced:!!(f||g||(n=s(String.prototype,"endsWith"),!n||n.writable))&&!g},{endsWith:function(t){var e=l(u(this));c(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:m(a(r),n),o=l(t);return d?d(e,o,i):p(e,i-o.length,i)===o}})},2023:(t,e,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3929),s=r(4488),a=r(1340),l=r(4964),c=i("".indexOf);n({target:"String",proto:!0,forced:!l("includes")}
vendor: 5,660 bytes, line 2
2,{includes:function(t){return!!~c(a(s(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),s=r(654),a="String Iterator",l=o.set,c=o.getterFor(a);s(String,"String",(function(t){l(this,{type:a,string:i(t),index:0})}),(function(){var t,e=c(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=n(r,i),e.index+=t.length,{value:t,done:!1})}))},4723:(t,e,r)=>{"use strict";var n=r(6916),i=r(7007),o=r(9670),s=r(7466),a=r(1340),l=r(4488),c=r(8173),u=r(1530),h=r(7651);i("match",(function(t,e,r){return[function(e){var r=l(this),i=null==e?void 0:c(e,t);return i?n(i,e,r):new RegExp(e)[t](a(r))},function(t){var n=o(this),i=a(t),l=r(e,n,i);if(l.done)return l.value;if(!n.global)return h(n,i);var c=n.unicode;n.lastIndex=0;for(var f,d=[],p=0;null!==(f=h(n,i));){var m=a(f[0]);d[p]=m,""===m&&(n.lastIndex=u(i,s(n.lastIndex),c)),p++}return 0===p?null:d}]}))},3112:(t,e,r)=>{"use strict";var n=r(2109),i=r(6650).start;n({target:"String",proto:!0,forced:r(4986)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},8757:(t,e,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(1702),s=r(4488),a=r(614),l=r(7850),c=r(1340),u=r(8173),h=r(4706),f=r(647),d=r(5112),p=r(1913),m=d("replace"),g=TypeError,y=o("".indexOf),_=o("".replace),v=o("".slice),b=Math.max,x=function(t,e,r){return r>t.length?-1:""===e?r:y(t,e,r)};n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,o,d,w,E,S,T,A,O=s(this),C=0,M=0,k="";if(null!=t){if((r=l(t))&&(n=c(s(h(t))),!~y(n,"g")))throw g("`.replaceAll` does not allow non-global regexes");if(o=u(t,m))return i(o,t,O,e);if(p&&r)return _(c(O),t,e)}for(d=c(O),w=c(t),(E=a(e))||(e=c(e)),S=w.length,T=b(1,S),C=x(d,w,0);-1!==C;)A=E?c(e(w,C,d)):f(w,d,C,[],void 0,e),k+=v(d,M,C)+A,M=C+S,C=x(d,w,C+T);return M<d.length&&(k+=v(d,M)),k}})},5306:(t,e,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),s=r(7007),a=r(7293),l=r(9670),c=r(614),u=r(9303),h=r(7466),f=r(1340),d=r(4488),p=r(1530),m=r(8173),g=r(647),y=r(7651),_=r(5112)("replace"),v=Math.max,b=Math.min,x=o([].concat),w=o([].push),E=o("".indexOf),S=o("".slice),T="$0"==="a".replace(/./,"$0"),A=!!/./[_]&&""===/./[_]("a","$0");s("replace",(function(t,e,r){var o=A?"$":"$0";return[function(t,r){var n=d(this),o=null==t?void 0:m(t,_);return o?i(o,t,n,r):i(e,f(n),t,r)},function(t,i){var s=l(this),a=f(t);if("string"==typeof i&&-1===E(i,o)&&-1===E(i,"$<")){var d=r(e,s,a,i);if(d.done)return d.value}var m=c(i);m||(i=f(i));var _=s.global;if(_){var T=s.unicode;s.lastIndex=0}for(var A=[];;){var O=y(s,a);if(null===O)break;if(w(A,O),!_)break;""===f(O[0])&&(s.lastIndex=p(a,h(s.lastIndex),T))}for(var C,M="",k=0,I=0;I<A.length;I++){for(var P=f((O=A[I])[0]),L=v(b(u(O.index),a.length),0),R=[],D=1;D<O.length;D++)w(R,void 0===(C=O[D])?C:String(C));var z=O.groups;if(m){var B=x([P],R,L,a);void 0!==z&&w(B,z);var j=f(n(i,void 0,B))}else j=g(P,a,L,R,z,i);L>=k&&(M+=S(a,k,L)+j,k=L+P.length)}return M+S(a,k)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!T||A)},4765:(t,e,r)=>{"use strict";var n=r(6916),i=r(7007),o=r(9670),s=r(4488),a=r(1150),l=r(1340),c=r(8173),u=r(7651);i("search",(function(t,e,r){return[function(e){var r=s(this),i=null==e?void 0:c(e,t);return i?n(i,e,r):new RegExp(e)[t](l(r))},function(t){var n=o(this),i=l(t),s=r(e,n,i);if(s.done)return s.value;var c=n.lastIndex;a(c,0)||(n.lastIndex=0);var h=u(n,i);return a(n.lastIndex,c)||(n.lastIndex=c),null===h?-1:h.index}]}))},3123:(t,e,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),s=r(7007),a=r(7850),l=r(9670),c=r(4488),u=r(6707),h=r(1530),f=r(7466),d=r(1340),p=r(8173),m=r(1589),g=r(7651),y=r(2261),_=r(2999),v=r(7293),b=_.UNSUPPORTED_Y,x=4294967295,w=Math.min,E=[].push,S=o(/./.exec),T=o(E),A=o("".slice);s("split",(function(t,e,r){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var o=d(c(this)),s=void 0===r?x:r>>>0;if(0===s)return[];if(void 0===t)return[o];if(!a(t))return i(e,o,t,s);for(var l,u,h,f=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,_=new RegExp(t.source,p+"g");(l=i(y,_,o))&&!((u=_.lastIndex)>g&&(T(f,A(o,g,l.index)),l.length>1&&l.index<o.length&&n(E,f,m(l,1)),h=l[0].length,g=u,f.length>=s));)_.lastIndex===l.index&&_.lastIndex++;return g===o.length?!h&&S(_,"")||T(f,""):T(f,A(o,g)),f.length>s?m(f,0,s):f}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:i(e,this,t,r)}:e,[function(e,r){var n=c(this),s=null==e?void 0:p(e,t);return s?i(s,e,n,r):i(o,d(n),e,r)},function(t,n){var i=l(this),s=d(t),a=r(o,i,s,n,o!==e);if(a.done)return a.value;var c=u(i,RegExp),p=i.unicode,m=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(b?"g":"y"),y=new c(b?"^(?:"+i.source+")":i,m),_=void 0===n?x:n>>>0;if(0===_)return[];if(0===s.length)return null===g(y,s)?[s]:[];for(var v=0,E=0,S=[];E<s.length;){y.lastIndex=b?0:E;var O,C=g(y,b?A(s,E):s);if(null===C||(O=w(f(y.lastIndex+(b?E:0)),s.length))===v)E=h(s,E,p);else{if(T(S,A(s,v,E)),S.length===_)return S;for(var M=1;M<=C.length-1;M++)if(T(S,C[M]),S.length===_)return S;E=v=O}}return T(S,A(s,v)),S}]}),!!v((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),b)},6755:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1702),s=r(1236).f,a=r(7466),l=r(1340),c=r(3929),u=r(4488),h=r(4964),f=r(1913),d=o("".startsWith),p=o("".slice),m=Math.min,g=h("startsWith");
vendor: 4,994 bytes, line 2
2i({target:"String",proto:!0,forced:!!(f||g||(n=s(String.prototype,"startsWith"),!n||n.writable))&&!g},{startsWith:function(t){var e=l(u(this));c(t);var r=a(m(arguments.length>1?arguments[1]:void 0,e.length)),n=l(t);return d?d(e,n,r):p(e,r,r+n.length)===n}})},3210:(t,e,r)=>{"use strict";var n=r(2109),i=r(3111).trim;n({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return i(this)}})},2443:(t,e,r)=>{r(7235)("asyncIterator")},4032:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(6916),s=r(1702),a=r(1913),l=r(9781),c=r(133),u=r(7293),h=r(2597),f=r(7976),d=r(9670),p=r(5656),m=r(4948),g=r(1340),y=r(9114),_=r(30),v=r(1956),b=r(8006),x=r(1156),w=r(5181),E=r(1236),S=r(3070),T=r(6048),A=r(5296),O=r(8052),C=r(2309),M=r(6200),k=r(3501),I=r(9711),P=r(5112),L=r(6061),R=r(7235),D=r(6532),z=r(8003),B=r(9909),j=r(2092).forEach,F=M("hidden"),N="Symbol",$=B.set,U=B.getterFor(N),V=Object.prototype,G=i.Symbol,q=G&&G.prototype,H=i.TypeError,W=i.QObject,Z=E.f,X=S.f,Y=x.f,K=A.f,J=s([].push),Q=C("symbols"),tt=C("op-symbols"),et=C("wks"),rt=!W||!W.prototype||!W.prototype.findChild,nt=l&&u((function(){return 7!=_(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Z(V,e);n&&delete V[e],X(t,e,r),n&&t!==V&&X(V,e,n)}:X,it=function(t,e){var r=Q[t]=_(q);return $(r,{type:N,tag:t,description:e}),l||(r.description=e),r},ot=function(t,e,r){t===V&&ot(tt,e,r),d(t);var n=m(e);return d(r),h(Q,n)?(r.enumerable?(h(t,F)&&t[F][n]&&(t[F][n]=!1),r=_(r,{enumerable:y(0,!1)})):(h(t,F)||X(t,F,y(1,{})),t[F][n]=!0),nt(t,n,r)):X(t,n,r)},st=function(t,e){d(t);var r=p(e),n=v(r).concat(ut(r));return j(n,(function(e){l&&!o(at,r,e)||ot(t,e,r[e])})),t},at=function(t){var e=m(t),r=o(K,this,e);return!(this===V&&h(Q,e)&&!h(tt,e))&&(!(r||!h(this,e)||!h(Q,e)||h(this,F)&&this[F][e])||r)},lt=function(t,e){var r=p(t),n=m(e);if(r!==V||!h(Q,n)||h(tt,n)){var i=Z(r,n);return!i||!h(Q,n)||h(r,F)&&r[F][n]||(i.enumerable=!0),i}},ct=function(t){var e=Y(p(t)),r=[];return j(e,(function(t){h(Q,t)||h(k,t)||J(r,t)})),r},ut=function(t){var e=t===V,r=Y(e?tt:p(t)),n=[];return j(r,(function(t){!h(Q,t)||e&&!h(V,t)||J(n,Q[t])})),n};c||(O(q=(G=function(){if(f(q,this))throw H("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=I(t),r=function(t){this===V&&o(r,tt,t),h(this,F)&&h(this[F],e)&&(this[F][e]=!1),nt(this,e,y(1,t))};return l&&rt&&nt(V,e,{configurable:!0,set:r}),it(e,t)}).prototype,"toString",(function(){return U(this).tag})),O(G,"withoutSetter",(function(t){return it(I(t),t)})),A.f=at,S.f=ot,T.f=st,E.f=lt,b.f=x.f=ct,w.f=ut,L.f=function(t){return it(P(t),t)},l&&(X(q,"description",{configurable:!0,get:function(){return U(this).description}}),a||O(V,"propertyIsEnumerable",at,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),j(v(et),(function(t){R(t)})),n({target:N,stat:!0,forced:!c},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?_(t):st(_(t),e)},defineProperty:ot,defineProperties:st,getOwnPropertyDescriptor:lt}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ct}),D(),z(G,N),k[F]=!0},1817:(t,e,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),s=r(1702),a=r(2597),l=r(614),c=r(7976),u=r(1340),h=r(3070).f,f=r(9920),d=o.Symbol,p=d&&d.prototype;if(i&&l(d)&&(!("description"in p)||void 0!==d().description)){var m={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(p,this)?new d(t):void 0===t?d():d(t);return""===t&&(m[e]=!0),e};f(g,d),g.prototype=p,p.constructor=g;var y="Symbol(test)"==String(d("test")),_=s(p.toString),v=s(p.valueOf),b=/^Symbol\((.*)\)[^)]+$/,x=s("".replace),w=s("".slice);h(p,"description",{configurable:!0,get:function(){var t=v(this),e=_(t);if(a(m,t))return"";var r=y?w(e,7,-1):x(e,b,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:g})}},763:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(2597),s=r(1340),a=r(2309),l=r(735),c=a("string-to-symbol-registry"),u=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=s(t);if(o(c,e))return c[e];var r=i("Symbol")(e);return c[e]=r,u[r]=e,r}})},2165:(t,e,r)=>{r(7235)("iterator")},2526:(t,e,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(t,e,r)=>{var n=r(2109),i=r(2597),o=r(2190),s=r(6330),a=r(2309),l=r(735),c=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!o(t))throw TypeError(s(t)+" is not a symbol");if(i(c,t))return c[t]}})},3680:(t,e,r)=>{var n=r(5005),i=r(7235),o=r(8003);i("toStringTag"),o(n("Symbol"),"Symbol")},1202:(t,e,r)=>{"use strict";var n,i=r(7854),o=r(1702),s=r(9190),a=r(2423),l=r(7710),c=r(9320),u=r(111),h=r(2050),f=r(9909).enforce,d=r(8536),p=!i.ActiveXObject&&"ActiveXObject"in i,m=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},g=l("WeakMap",m,c);if(d&&p){n=c.getConstructor(m,"WeakMap",!0),a.enable();
vendor: 4,563 bytes, line 2
2var y=g.prototype,_=o(y.delete),v=o(y.has),b=o(y.get),x=o(y.set);s(y,{delete:function(t){if(u(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new n),_(this,t)||e.frozen.delete(t)}return _(this,t)},has:function(t){if(u(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new n),v(this,t)||e.frozen.has(t)}return v(this,t)},get:function(t){if(u(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new n),v(this,t)?b(this,t):e.frozen.get(t)}return b(this,t)},set:function(t,e){if(u(t)&&!h(t)){var r=f(this);r.frozen||(r.frozen=new n),v(this,t)?x(this,t,e):r.frozen.set(t,e)}else x(this,t,e);return this}})}},4129:(t,e,r)=>{r(1202)},4747:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(8533),a=r(8880),l=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in i)i[c]&&l(n[c]&&n[c].prototype);l(o)},3948:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(6992),a=r(8880),l=r(5112),c=l("iterator"),u=l("toStringTag"),h=s.values,f=function(t,e){if(t){if(t[c]!==h)try{a(t,c,h)}catch(e){t[c]=h}if(t[u]||a(t,u,e),i[e])for(var r in s)if(t[r]!==s[r])try{a(t,r,s[r])}catch(e){t[r]=s[r]}}};for(var d in i)f(n[d]&&n[d].prototype,d);f(o,"DOMTokenList")},5556:(t,e,r)=>{"use strict";r(6992);var n=r(2109),i=r(7854),o=r(6916),s=r(1702),a=r(9781),l=r(590),c=r(8052),u=r(9190),h=r(8003),f=r(4994),d=r(9909),p=r(5787),m=r(614),g=r(2597),y=r(9974),_=r(648),v=r(9670),b=r(111),x=r(1340),w=r(30),E=r(9114),S=r(8554),T=r(1246),A=r(8053),O=r(5112),C=r(4362),M=O("iterator"),k="URLSearchParams",I="URLSearchParamsIterator",P=d.set,L=d.getterFor(k),R=d.getterFor(I),D=Object.getOwnPropertyDescriptor,z=function(t){if(!a)return i[t];var e=D(i,t);return e&&e.value},B=z("fetch"),j=z("Request"),F=z("Headers"),N=j&&j.prototype,$=F&&F.prototype,U=i.RegExp,V=i.TypeError,G=i.decodeURIComponent,q=i.encodeURIComponent,H=s("".charAt),W=s([].join),Z=s([].push),X=s("".replace),Y=s([].shift),K=s([].splice),J=s("".split),Q=s("".slice),tt=/\+/g,et=Array(4),rt=function(t){return et[t-1]||(et[t-1]=U("((?:%[\\da-f]{2}){"+t+"})","gi"))},nt=function(t){try{return G(t)}catch(e){return t}},it=function(t){var e=X(t,tt," "),r=4;try{return G(e)}catch(t){for(;r;)e=X(e,rt(r--),nt);return e}},ot=/[!'()~]|%20/g,st={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},at=function(t){return st[t]},lt=function(t){return X(q(t),ot,at)},ct=f((function(t,e){P(this,{type:I,iterator:S(L(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),ut=function(t){this.entries=[],this.url=null,void 0!==t&&(b(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===H(t,0)?Q(t,1):t:x(t)))};ut.prototype={type:k,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,s,a,l,c=T(t);if(c)for(r=(e=S(t,c)).next;!(n=o(r,e)).done;){if(s=(i=S(v(n.value))).next,(a=o(s,i)).done||(l=o(s,i)).done||!o(s,i).done)throw V("Expected sequence with length 2");Z(this.entries,{key:x(a.value),value:x(l.value)})}else for(var u in t)g(t,u)&&Z(this.entries,{key:u,value:x(t[u])})},parseQuery:function(t){if(t)for(var e,r,n=J(t,"&"),i=0;i<n.length;)(e=n[i++]).length&&(r=J(e,"="),Z(this.entries,{key:it(Y(r)),value:it(W(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],Z(r,lt(t.key)+"="+lt(t.value));return W(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ht=function(){p(this,ft);var t=arguments.length>0?arguments[0]:void 0;P(this,new ut(t))},ft=ht.prototype;if(u(ft,{append:function(t,e){A(arguments.length,2);var r=L(this);Z(r.entries,{key:x(t),value:x(e)}),r.updateURL()},delete:function(t){A(arguments.length,1);for(var e=L(this),r=e.entries,n=x(t),i=0;i<r.length;)r[i].key===n?K(r,i,1):i++;e.updateURL()},get:function(t){A(arguments.length,1);for(var e=L(this).entries,r=x(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){A(arguments.length,1);for(var e=L(this).entries,r=x(t),n=[],i=0;i<e.length;i++)e[i].key===r&&Z(n,e[i].value);return n},has:function(t){A(arguments.length,1);for(var e=L(this).entries,r=x(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){A(arguments.length,1);for(var r,n=L(this),i=n.entries,o=!1,s=x(t),a=x(e),l=0;l<i.length;l++)(r=i[l]).key===s&&(o?K(i,l--,1):(o=!0,r.value=a));o||Z(i,{key:s,value:a}),n.updateURL()},sort:function(){var t=L(this);C(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()}
vendor: 5,792 bytes, line 2
2,forEach:function(t){for(var e,r=L(this).entries,n=y(t,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((e=r[i++]).value,e.key,this)},keys:function(){return new ct(this,"keys")},values:function(){return new ct(this,"values")},entries:function(){return new ct(this,"entries")}},{enumerable:!0}),c(ft,M,ft.entries,{name:"entries"}),c(ft,"toString",(function(){return L(this).serialize()}),{enumerable:!0}),h(ht,k),n({global:!0,constructor:!0,forced:!l},{URLSearchParams:ht}),!l&&m(F)){var dt=s($.has),pt=s($.set),mt=function(t){if(b(t)){var e,r=t.body;if(_(r)===k)return e=t.headers?new F(t.headers):new F,dt(e,"content-type")||pt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),w(t,{body:E(0,x(r)),headers:E(0,e)})}return t};if(m(B)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return B(t,arguments.length>1?mt(arguments[1]):{})}}),m(j)){var gt=function(t){return p(this,N),new j(t,arguments.length>1?mt(arguments[1]):{})};N.constructor=gt,gt.prototype=N,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:gt})}}t.exports={URLSearchParams:ht,getState:L}},1637:(t,e,r)=>{r(5556)},8789:(t,e,r)=>{"use strict";r(8783);var n,i=r(2109),o=r(9781),s=r(590),a=r(7854),l=r(9974),c=r(1702),u=r(8052),h=r(7045),f=r(5787),d=r(2597),p=r(1574),m=r(8457),g=r(1589),y=r(8710).codeAt,_=r(3197),v=r(1340),b=r(8003),x=r(8053),w=r(5556),E=r(9909),S=E.set,T=E.getterFor("URL"),A=w.URLSearchParams,O=w.getState,C=a.URL,M=a.TypeError,k=a.parseInt,I=Math.floor,P=Math.pow,L=c("".charAt),R=c(/./.exec),D=c([].join),z=c(1..toString),B=c([].pop),j=c([].push),F=c("".replace),N=c([].shift),$=c("".split),U=c("".slice),V=c("".toLowerCase),G=c([].unshift),q="Invalid scheme",H="Invalid host",W="Invalid port",Z=/[a-z]/i,X=/[\d+-.a-z]/i,Y=/\d/,K=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,nt=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,it=/[\t\n\r]/g,ot=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)G(e,t%256),t=I(t/256);return D(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,o=0;o<8;o++)0!==t[o]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(e=n,r=i),e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=z(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},st={},at=p({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),lt=p({},at,{"#":1,"?":1,"{":1,"}":1}),ct=p({},lt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(t,e){var r=y(t,0);return r>32&&r<127&&!d(e,t)?t:encodeURIComponent(t)},ht={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ft=function(t,e){var r;return 2==t.length&&R(Z,L(t,0))&&(":"==(r=L(t,1))||!e&&"|"==r)},dt=function(t){var e;return t.length>1&&ft(U(t,0,2))&&(2==t.length||"/"===(e=L(t,2))||"\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===V(t)},mt={},gt={},yt={},_t={},vt={},bt={},xt={},wt={},Et={},St={},Tt={},At={},Ot={},Ct={},Mt={},kt={},It={},Pt={},Lt={},Rt={},Dt={},zt=function(t,e,r){var n,i,o,s=v(t);if(e){if(i=this.parse(s))throw M(i);this.searchParams=null}else{if(void 0!==r&&(n=new zt(r,!0)),i=this.parse(s,null,n))throw M(i);(o=O(new A)).bindURL(this),this.searchParams=o}};zt.prototype={type:"URL",parse:function(t,e,r){var i,o,s,a,l,c=this,u=e||mt,h=0,f="",p=!1,y=!1,_=!1;for(t=v(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=F(t,nt,"")),t=F(t,it,""),i=m(t);h<=i.length;){switch(o=i[h],u){case mt:if(!o||!R(Z,o)){if(e)return q;u=yt;continue}f+=V(o),u=gt;break;case gt:if(o&&(R(X,o)||"+"==o||"-"==o||"."==o))f+=V(o);else{if(":"!=o){if(e)return q;f="",u=yt,h=0;continue}if(e&&(c.isSpecial()!=d(ht,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,e)return void(c.isSpecial()&&ht[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?u=Ct:c.isSpecial()&&r&&r.scheme==c.scheme?u=_t:c.isSpecial()?u=wt:"/"==i[h+1]?(u=vt,h++):(c.cannotBeABaseURL=!0,j(c.path,""),u=Lt)}break;case yt:if(!r||r.cannotBeABaseURL&&"#"!=o)return q;if(r.cannotBeABaseURL&&"#"==o){c.scheme=r.scheme,c.path=g(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=Dt;break}u="file"==r.scheme?Ct:bt;continue;case _t:if("/"!=o||"/"!=i[h+1]){u=bt;continue}u=Et,h++;break;case vt:if("/"==o){u=St;break}u=Pt;continue;case bt:if(c.scheme=r.scheme,o==n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=g(r.path),c.query=r.query;else if("/"==o||"\\"==o&&c.isSpecial())u=xt;else if("?"==o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=g(r.path),c.query="",u=Rt;else{if("#"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=g(r.path),c.path.length--,u=Pt;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=g(r.path),c.query=r.query,c.fragment="",u=Dt}break;case xt:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=Pt;continue}u=St}else u=Et;break;case wt:if(u=Et,"/"!=o||"/"!=L(f,h+1))continue;h++;break;case Et:if("/"!=o&&"\\"!=o){u=St;continue}break;case St:if("@"==o){p&&(f="%40"+f),p=!0,s=m(f);for(var b=0;b<s.length;b++){var x=s[b];if(":"!=x||_){var w=ut(x,ct);_?c.password+=w:c.username+=w}else _=!0}f=""}else if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(p&&""==f)return"Invalid authority";h-=m(f).length+1,f="",u=Tt}else f+=o;break;case Tt:case At:if(e&&"file"==c.scheme){u=kt;continue}if(":"!=o||y){if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==f)return H;if(e&&""==f&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(f))return a;
vendor: 5,297 bytes, line 2
2if(f="",u=It,e)return;continue}"["==o?y=!0:"]"==o&&(y=!1),f+=o}else{if(""==f)return H;if(a=c.parseHost(f))return a;if(f="",u=Ot,e==At)return}break;case Ot:if(!R(Y,o)){if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||e){if(""!=f){var E=k(f,10);if(E>65535)return W;c.port=c.isSpecial()&&E===ht[c.scheme]?null:E,f=""}if(e)return;u=It;continue}return W}f+=o;break;case Ct:if(c.scheme="file","/"==o||"\\"==o)u=Mt;else{if(!r||"file"!=r.scheme){u=Pt;continue}if(o==n)c.host=r.host,c.path=g(r.path),c.query=r.query;else if("?"==o)c.host=r.host,c.path=g(r.path),c.query="",u=Rt;else{if("#"!=o){dt(D(g(i,h),""))||(c.host=r.host,c.path=g(r.path),c.shortenPath()),u=Pt;continue}c.host=r.host,c.path=g(r.path),c.query=r.query,c.fragment="",u=Dt}}break;case Mt:if("/"==o||"\\"==o){u=kt;break}r&&"file"==r.scheme&&!dt(D(g(i,h),""))&&(ft(r.path[0],!0)?j(c.path,r.path[0]):c.host=r.host),u=Pt;continue;case kt:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!e&&ft(f))u=Pt;else if(""==f){if(c.host="",e)return;u=It}else{if(a=c.parseHost(f))return a;if("localhost"==c.host&&(c.host=""),e)return;f="",u=It}continue}f+=o;break;case It:if(c.isSpecial()){if(u=Pt,"/"!=o&&"\\"!=o)continue}else if(e||"?"!=o)if(e||"#"!=o){if(o!=n&&(u=Pt,"/"!=o))continue}else c.fragment="",u=Dt;else c.query="",u=Rt;break;case Pt:if(o==n||"/"==o||"\\"==o&&c.isSpecial()||!e&&("?"==o||"#"==o)){if(".."===(l=V(l=f))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||j(c.path,"")):pt(f)?"/"==o||"\\"==o&&c.isSpecial()||j(c.path,""):("file"==c.scheme&&!c.path.length&&ft(f)&&(c.host&&(c.host=""),f=L(f,0)+":"),j(c.path,f)),f="","file"==c.scheme&&(o==n||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)N(c.path);"?"==o?(c.query="",u=Rt):"#"==o&&(c.fragment="",u=Dt)}else f+=ut(o,lt);break;case Lt:"?"==o?(c.query="",u=Rt):"#"==o?(c.fragment="",u=Dt):o!=n&&(c.path[0]+=ut(o,st));break;case Rt:e||"#"!=o?o!=n&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":ut(o,st)):(c.fragment="",u=Dt);break;case Dt:o!=n&&(c.fragment+=ut(o,at))}h++}},parseHost:function(t){var e,r,n;if("["==L(t,0)){if("]"!=L(t,t.length-1))return H;if(e=function(t){var e,r,n,i,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,f=function(){return L(t,h)};if(":"==f()){if(":"!=L(t,1))return;h+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(e=r=0;r<4&&R(tt,f());)e=16*e+k(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!R(Y,f()))return;for(;R(Y,f());){if(o=k(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}l[c]=256*l[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[c++]=e}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(s=c-u,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a;else if(8!=c)return;return l}(U(t,1,-1)),!e)return H;this.host=e}else if(this.isSpecial()){if(t=_(t),R(et,t))return H;if(e=function(t){var e,r,n,i,o,s,a,l=$(t,".");if(l.length&&""==l[l.length-1]&&l.length--,(e=l.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(i=l[n]))return t;if(o=10,i.length>1&&"0"==L(i,0)&&(o=R(K,i)?16:8,i=U(i,8==o?1:2)),""===i)s=0;else{if(!R(10==o?Q:8==o?J:tt,i))return t;s=k(i,o)}j(r,s)}for(n=0;n<e;n++)if(s=r[n],n==e-1){if(s>=P(256,5-e))return null}else if(s>255)return null;for(a=B(r),n=0;n<r.length;n++)a+=r[n]*P(256,3-n);return a}(t),null===e)return H;this.host=e}else{if(R(rt,t))return H;for(e="",r=m(t),n=0;n<r.length;n++)e+=ut(r[n],st);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return d(ht,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&ft(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,i=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==i?(c+="//",t.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=ot(i),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+D(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(t){var e=this.parse(t);if(e)throw M(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Bt(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ot(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(v(t)+":",mt)},getUsername:function(){return this.username},setUsername:function(t){var e=m(v(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=ut(e[r],ct)}},getPassword:function(){return this.password},setPassword:function(t){var e=m(v(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=ut(e[r],ct)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ot(t):ot(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Tt)},getHostname:function(){var t=this.host;return null===t?"":ot(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,At)},getPort:function(){var t=this.port;return null===t?"":v(t)}
2,setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=v(t))?this.port=null:this.parse(t,Ot))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+D(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,It))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=v(t))?this.query=null:("?"==L(t,0)&&(t=U(t,1)),this.query="",this.parse(t,Rt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=v(t))?("#"==L(t,0)&&(t=U(t,1)),this.fragment="",this.parse(t,Dt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Bt=function(t){var e=f(this,jt),r=x(arguments.length,1)>1?arguments[1]:void 0,n=S(e,new zt(t,!1,r));o||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},jt=Bt.prototype,Ft=function(t,e){return{get:function(){return T(this)[t]()},set:e&&function(t){return T(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(jt,"href",Ft("serialize","setHref")),h(jt,"origin",Ft("getOrigin")),h(jt,"protocol",Ft("getProtocol","setProtocol")),h(jt,"username",Ft("getUsername","setUsername")),h(jt,"password",Ft("getPassword","setPassword")),h(jt,"host",Ft("getHost","setHost")),h(jt,"hostname",Ft("getHostname","setHostname")),h(jt,"port",Ft("getPort","setPort")),h(jt,"pathname",Ft("getPathname","setPathname")),h(jt,"search",Ft("getSearch","setSearch")),h(jt,"searchParams",Ft("getSearchParams")),h(jt,"hash",Ft("getHash","setHash"))),u(jt,"toJSON",(function(){return T(this).serialize()}),{enumerable:!0}),u(jt,"toString",(function(){return T(this).serialize()}),{enumerable:!0}),C){var Nt=C.createObjectURL,$t=C.revokeObjectURL;Nt&&u(Bt,"createObjectURL",l(Nt,C)),$t&&u(Bt,"revokeObjectURL",l($t,C))}b(Bt,"URL"),i({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Bt})},285:(t,e,r)=>{r(8789)},9127:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ScrollToPlugin:()=>b,default:()=>b});var n,i,o,s,a,l,c,u,h=function(){return"undefined"!=typeof window},f=function(){return n||h()&&(n=window.gsap)&&n.registerPlugin&&n},d=function(t){return"string"==typeof t},p=function(t){return"function"==typeof t},m=function(t,e){var r="x"===e?"Width":"Height",n="scroll"+r,i="client"+r;return t===o||t===s||t===a?Math.max(s[n],a[n])-(o["inner"+r]||s[i]||a[i]):t[n]-t["offset"+r]},g=function(t,e){var r="scroll"+("x"===e?"Left":"Top");return t===o&&(null!=t.pageXOffset?r="page"+e.toUpperCase()+"Offset":t=null!=s[r]?s:a),function(){return t[r]}},y=function(t,e){if(!(t=l(t)[0])||!t.getBoundingClientRect)return console.warn("scrollTo target doesn't exist. Using 0")||{x:0,y:0};var r=t.getBoundingClientRect(),n=!e||e===o||e===a,i=n?{top:s.clientTop-(o.pageYOffset||s.scrollTop||a.scrollTop||0),left:s.clientLeft-(o.pageXOffset||s.scrollLeft||a.scrollLeft||0)}:e.getBoundingClientRect(),c={x:r.left-i.left,y:r.top-i.top};return!n&&e&&(c.x+=g(e,"x")(),c.y+=g(e,"y")()),c},_=function(t,e,r,n,i){return isNaN(t)||"object"==typeof t?d(t)&&"="===t.charAt(1)?parseFloat(t.substr(2))*("-"===t.charAt(0)?-1:1)+n-i:"max"===t?m(e,r)-i:Math.min(m(e,r),y(t,e)[r]-i):parseFloat(t)-i},v=function(){n=f(),h()&&n&&"undefined"!=typeof document&&document.body&&(o=window,a=document.body,s=document.documentElement,l=n.utils.toArray,n.config({autoKillThreshold:7}),c=n.config(),i=1)},b={version:"3.14.2",name:"scrollTo",rawVars:1,register:function(t){n=t,v()},init:function(t,e,r,s,a){i||v();var l=this,h=n.getProperty(t,"scrollSnapType");l.isWin=t===o,l.target=t,l.tween=r,e=function(t,e,r,n){if(p(t)&&(t=t(e,r,n)),"object"!=typeof t)return d(t)&&"max"!==t&&"="!==t.charAt(1)?{x:t,y:t}:{y:t};if(t.nodeType)return{y:t,x:t};var i,o={};for(i in t)o[i]="onAutoKill"!==i&&p(t[i])?t[i](e,r,n):t[i];return o}(e,s,t,a),l.vars=e,l.autoKill=!!("autoKill"in e?e:c).autoKill,l.getX=g(t,"x"),l.getY=g(t,"y"),l.x=l.xPrev=l.getX(),l.y=l.yPrev=l.getY(),u||(u=n.core.globals().ScrollTrigger),"smooth"===n.getProperty(t,"scrollBehavior")&&n.set(t,{scrollBehavior:"auto"}
2),h&&"none"!==h&&(l.snap=1,l.snapInline=t.style.scrollSnapType,t.style.scrollSnapType="none"),null!=e.x?(l.add(l,"x",l.x,_(e.x,t,"x",l.x,e.offsetX||0),s,a),l._props.push("scrollTo_x")):l.skipX=1,null!=e.y?(l.add(l,"y",l.y,_(e.y,t,"y",l.y,e.offsetY||0),s,a),l._props.push("scrollTo_y")):l.skipY=1},render:function(t,e){for(var r,n,i,s,a,l=e._pt,h=e.target,f=e.tween,d=e.autoKill,p=e.xPrev,g=e.yPrev,y=e.isWin,_=e.snap,v=e.snapInline;l;)l.r(t,l.d),l=l._next;r=y||!e.skipX?e.getX():p,i=(n=y||!e.skipY?e.getY():g)-g,s=r-p,a=c.autoKillThreshold,e.x<0&&(e.x=0),e.y<0&&(e.y=0),d&&(!e.skipX&&(s>a||s<-a)&&r<m(h,"x")&&(e.skipX=1),!e.skipY&&(i>a||i<-a)&&n<m(h,"y")&&(e.skipY=1),e.skipX&&e.skipY&&(f.kill(),e.vars.onAutoKill&&e.vars.onAutoKill.apply(f,e.vars.onAutoKillParams||[]))),y?o.scrollTo(e.skipX?r:e.x,e.skipY?n:e.y):(e.skipY||(h.scrollTop=e.y),e.skipX||(h.scrollLeft=e.x)),!_||1!==t&&0!==t||(n=h.scrollTop,r=h.scrollLeft,v?h.style.scrollSnapType=v:h.style.removeProperty("scroll-snap-type"),h.scrollTop=n+1,h.scrollLeft=r+1,h.scrollTop=n,h.scrollLeft=r),e.xPrev=e.x,e.yPrev=e.y,u&&u.update()},kill:function(t){var e="scrollTo"===t,r=this._props.indexOf(t);return(e||"scrollTo_x"===t)&&(this.skipX=1),(e||"scrollTo_y"===t)&&(this.skipY=1),r>-1&&this._props.splice(r,1),!this._props.length}};b.max=m,b.getOffset=y,b.buildGetter=g,b.config=function(t){for(var e in c||v()||(c=n.config()),t)c[e]=t[e]},f()&&n.registerPlugin(b)},9092:(t,e,r)=>{"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}r.r(e),r.d(e,{ScrollTrigger:()=>ir,default:()=>ir});var i,o,s,a,l,c,u,h,f,d,p,m,g,y=function(){return i||"undefined"!=typeof window&&(i=window.gsap)&&i.registerPlugin&&i},_=1,v=[],b=[],x=[],w=Date.now,E=function(t,e){return e},S=function(t,e){return~x.indexOf(t)&&x[x.indexOf(t)+1][e]},T=function(t){return!!~d.indexOf(t)},A=function(t,e,r,n,i){return t.addEventListener(e,r,{passive:!1!==n,capture:!!i})},O=function(t,e,r,n){return t.removeEventListener(e,r,!!n)},C="scrollLeft",M="scrollTop",k=function(){return p&&p.isPressed||b.cache++},I=function(t,e){var r=function r(n){if(n||0===n){_&&(s.history.scrollRestoration="manual");var i=p&&p.isPressed;n=r.v=Math.round(n)||(p&&p.iOS?1:0),t(n),r.cacheID=b.cache,i&&E("ss",n)}else(e||b.cache!==r.cacheID||E("ref"))&&(r.cacheID=b.cache,r.v=t());return r.v+r.offset};return r.offset=0,t&&r},P={s:C,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:I((function(t){return arguments.length?s.scrollTo(t,L.sc()):s.pageXOffset||a.scrollLeft||l.scrollLeft||c.scrollLeft||0}))},L={s:M,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:P,sc:I((function(t){return arguments.length?s.scrollTo(P.sc(),t):s.pageYOffset||a.scrollTop||l.scrollTop||c.scrollTop||0}))},R=function(t,e){return(e&&e._ctx&&e._ctx.selector||i.utils.toArray)(t)[0]||("string"==typeof t&&!1!==i.config().nullTargetWarn?console.warn("Element not found:",t):null)},D=function(t,e){var r=e.s,n=e.sc;T(t)&&(t=a.scrollingElement||l);var o=b.indexOf(t),s=n===L.sc?1:2;!~o&&(o=b.push(t)-1),b[o+s]||A(t,"scroll",k);var c=b[o+s],u=c||(b[o+s]=I(S(t,r),!0)||(T(t)?n:I((function(e){return arguments.length?t[r]=e:t[r]}))));return u.target=t,c||(u.smooth="smooth"===i.getProperty(t,"scrollBehavior")),u},z=function(t,e,r){var n=t,i=t,o=w(),s=o,a=e||50,l=Math.max(500,3*a),c=function(t,e){var l=w();e||l-o>a?(i=n,n=t,s=o,o=l):r?n+=t:n=i+(t-i)/(l-s)*(o-s)};return{update:c,reset:function(){i=n=r?0:n,s=o=0},getVelocity:function(t){var e=s,a=i,u=w();return(t||0===t)&&t!==n&&c(t),o===s||u-s>
vendor: 69,080 bytes, line 2
2l?0:(n+(r?a:-a))/((r?u:o)-e)*1e3}}},B=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},j=function(t){var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(r)?e:r},F=function(){var t,e,r,n;(f=i.core.globals().ScrollTrigger)&&f.core&&(t=f.core,e=t.bridge||{},r=t._scrollers,n=t._proxies,r.push.apply(r,b),n.push.apply(n,x),b=r,x=n,E=function(t,r){return e[t](r)})},N=function(t){return i=t||y(),!o&&i&&"undefined"!=typeof document&&document.body&&(s=window,a=document,l=a.documentElement,c=a.body,d=[s,a,l,c],i.utils.clamp,g=i.core.context||function(){},h="onpointerenter"in c?"pointer":"mouse",u=$.isTouch=s.matchMedia&&s.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in s||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,m=$.eventTypes=("ontouchstart"in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return _=0}),500),F(),o=1),o};P.op=L,b.cache=0;var $=function(){function t(t){this.init(t)}var e,r,d;return t.prototype.init=function(t){o||N(i)||console.warn("Please gsap.registerPlugin(Observer)"),f||F();var e=t.tolerance,r=t.dragMinimum,n=t.type,d=t.target,y=t.lineHeight,_=t.debounce,b=t.preventDefault,x=t.onStop,E=t.onStopDelay,S=t.ignore,C=t.wheelSpeed,M=t.event,I=t.onDragStart,$=t.onDragEnd,U=t.onDrag,V=t.onPress,G=t.onRelease,q=t.onRight,H=t.onLeft,W=t.onUp,Z=t.onDown,X=t.onChangeX,Y=t.onChangeY,K=t.onChange,J=t.onToggleX,Q=t.onToggleY,tt=t.onHover,et=t.onHoverEnd,rt=t.onMove,nt=t.ignoreCheck,it=t.isNormalizer,ot=t.onGestureStart,st=t.onGestureEnd,at=t.onWheel,lt=t.onEnable,ct=t.onDisable,ut=t.onClick,ht=t.scrollSpeed,ft=t.capture,dt=t.allowClicks,pt=t.lockAxis,mt=t.onLockAxis;this.target=d=R(d)||l,this.vars=t,S&&(S=i.utils.toArray(S)),e=e||1e-9,r=r||0,C=C||1,ht=ht||1,n=n||"wheel,touch,pointer",_=!1!==_,y||(y=parseFloat(s.getComputedStyle(c).lineHeight)||22);var gt,yt,_t,vt,bt,xt,wt,Et=this,St=0,Tt=0,At=t.passive||!b&&!1!==t.passive,Ot=D(d,P),Ct=D(d,L),Mt=Ot(),kt=Ct(),It=~n.indexOf("touch")&&!~n.indexOf("pointer")&&"pointerdown"===m[0],Pt=T(d),Lt=d.ownerDocument||a,Rt=[0,0,0],Dt=[0,0,0],zt=0,Bt=function(){return zt=w()},jt=function(t,e){return(Et.event=t)&&S&&function(t,e){for(var r=e.length;r--;)if(e[r]===t||e[r].contains(t))return!0;return!1}(t.target,S)||e&&It&&"touch"!==t.pointerType||nt&&nt(t,e)},Ft=function(){var t=Et.deltaX=j(Rt),r=Et.deltaY=j(Dt),n=Math.abs(t)>=e,i=Math.abs(r)>=e;K&&(n||i)&&K(Et,t,r,Rt,Dt),n&&(q&&Et.deltaX>0&&q(Et),H&&Et.deltaX<0&&H(Et),X&&X(Et),J&&Et.deltaX<0!=St<0&&J(Et),St=Et.deltaX,Rt[0]=Rt[1]=Rt[2]=0),i&&(Z&&Et.deltaY>0&&Z(Et),W&&Et.deltaY<0&&W(Et),Y&&Y(Et),Q&&Et.deltaY<0!=Tt<0&&Q(Et),Tt=Et.deltaY,Dt[0]=Dt[1]=Dt[2]=0),(vt||_t)&&(rt&&rt(Et),_t&&(I&&1===_t&&I(Et),U&&U(Et),_t=0),vt=!1),xt&&!(xt=!1)&&mt&&mt(Et),bt&&(at(Et),bt=!1),gt=0},Nt=function(t,e,r){Rt[r]+=t,Dt[r]+=e,Et._vx.update(t),Et._vy.update(e),_?gt||(gt=requestAnimationFrame(Ft)):Ft()},$t=function(t,e){pt&&!wt&&(Et.axis=wt=Math.abs(t)>Math.abs(e)?"x":"y",xt=!0),"y"!==wt&&(Rt[2]+=t,Et._vx.update(t,!0)),"x"!==wt&&(Dt[2]+=e,Et._vy.update(e,!0)),_?gt||(gt=requestAnimationFrame(Ft)):Ft()},Ut=function(t){if(!jt(t,1)){var e=(t=B(t,b)).clientX,n=t.clientY,i=e-Et.x,o=n-Et.y,s=Et.isDragging;Et.x=e,Et.y=n,(s||(i||o)&&(Math.abs(Et.startX-e)>=r||Math.abs(Et.startY-n)>=r))&&(_t||(_t=s?2:1),s||(Et.isDragging=!0),$t(i,o))}},Vt=Et.onPress=function(t){jt(t,1)||t&&t.button||(Et.axis=wt=null,yt.pause(),Et.isPressed=!0,t=B(t),St=Tt=0,Et.startX=Et.x=t.clientX,Et.startY=Et.y=t.clientY,Et._vx.reset(),Et._vy.reset(),A(it?d:Lt,m[1],Ut,At,!0),Et.deltaX=Et.deltaY=0,V&&V(Et))},Gt=Et.onRelease=function(t){if(!jt(t,1)){O(it?d:Lt,m[1],Ut,!0);var e=!isNaN(Et.y-Et.startY),r=Et.isDragging,n=r&&(Math.abs(Et.x-Et.startX)>3||Math.abs(Et.y-Et.startY)>3),o=B(t);!n&&e&&(Et._vx.reset(),Et._vy.reset(),b&&dt&&i.delayedCall(.08,(function(){if(w()-zt>300&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(Lt.createEvent){var e=Lt.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,s,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}}))),Et.isDragging=Et.isGesturing=Et.isPressed=!1,x&&r&&!it&&yt.restart(!0),_t&&Ft(),$&&r&&$(Et),G&&G(Et,n)}},qt=function(t){return t.touches&&t.touches.length>1&&(Et.isGesturing=!0)&&ot(t,Et.isDragging)},Ht=function(){return(Et.isGesturing=!1)||st(Et)},Wt=function(t){if(!jt(t)){var e=Ot(),r=Ct();Nt((e-Mt)*ht,(r-kt)*ht,1),Mt=e,kt=r,x&&yt.restart(!0)}},Zt=function(t){if(!jt(t)){t=B(t,b),at&&(bt=!0);var e=(1===t.deltaMode?y:2===t.deltaMode?s.innerHeight:1)*C;Nt(t.deltaX*e,t.deltaY*e,0),x&&!it&&yt.restart(!0)}},Xt=function(t){if(!jt(t)){var e=t.clientX,r=t.clientY,n=e-Et.x,i=r-Et.y;Et.x=e,Et.y=r,vt=!0,x&&yt.restart(!0),(n||i)&&$t(n,i)}},Yt=function(t){Et.event=t,tt(Et)},Kt=function(t){Et.event=t,et(Et)},Jt=function(t){return jt(t)||B(t,b)&&ut(Et)};yt=Et._dc=i.delayedCall(E||.25,(function(){Et._vx.reset(),Et._vy.reset(),yt.pause(),x&&x(Et)})).pause(),Et.deltaX=Et.deltaY=0,Et._vx=z(0,50,!0),Et._vy=z(0,50,!0),Et.scrollX=Ot,Et.scrollY=Ct,Et.isDragging=Et.isGesturing=Et.isPressed=!1,g(this),Et.enable=function(t){return Et.isEnabled||(A(Pt?Lt:d,"scroll",k),n.indexOf("scroll")>=0&&A(Pt?Lt:d,"scroll",Wt,At,ft),n.indexOf("wheel")>=0&&A(d,"wheel",Zt,At,ft),(n.indexOf("touch")>=0&&u||n.indexOf("pointer")>=0)&&(A(d,m[0],Vt,At,ft),A(Lt,m[2],Gt),A(Lt,m[3],Gt),dt&&A(d,"click",Bt,!0,!0),ut&&A(d,"click",Jt),ot&&A(Lt,"gesturestart",qt),st&&A(Lt,"gestureend",Ht),tt&&A(d,h+"enter",Yt),et&&A(d,h+"leave",Kt),rt&&A(d,h+"move",Xt)),Et.isEnabled=!0,Et.isDragging=Et.isGesturing=Et.isPressed=vt=_t=!1,Et._vx.reset(),Et._vy.reset(),Mt=Ot(),kt=Ct(),t&&t.type&&Vt(t),lt&&lt(Et)),Et},Et.disable=function(){Et.isEnabled&&(v.filter((function(t){return t!==Et&&T(t.target)})).length||O(Pt?Lt:d,"scroll",k),Et.isPressed&&(Et._vx.reset(),Et._vy.reset(),O(it?d:Lt,m[1],Ut,!0)),O(Pt?Lt:d,"scroll",Wt,ft),O(d,"wheel",Zt,ft),O(d,m[0],Vt,ft),O(Lt,m[2],Gt),O(Lt,m[3],Gt),O(d,"click",Bt,!0),O(d,"click",Jt),O(Lt,"gesturestart",qt),O(Lt,"gestureend",Ht),O(d,h+"enter",Yt),O(d,h+"leave",Kt),O(d,h+"move",Xt),Et.isEnabled=Et.isPressed=Et.isDragging=!1,ct&&ct(Et))},Et.kill=Et.revert=function(){Et.disable();var t=v.indexOf(Et);t>=0&&v.splice(t,1),p===Et&&(p=0)},v.push(Et),it&&T(d)&&(p=Et),Et.enable(M)},e=t,(r=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&n(e.prototype,r),d&&n(e,d),t}();$.version="3.14.2",$.create=function(t){return new $(t)},$.register=N,$.getAll=function(){return v.slice()},$.getById=function(t){return v.filter((function(e){return e.vars.id===t}))[0]},y()&&i.registerPlugin($);var U,V,G,q,H,W,Z,X,Y,K,J,Q,tt,et,rt,nt,it,ot,st,at,lt,ct,ut,ht,ft,dt,pt,mt,gt,yt,_t,vt,bt,xt,wt,Et,St,Tt,At=1,Ot=Date.now,Ct=Ot(),Mt=0,kt=0,It=function(t,e,r){var n=qt(t)&&("clamp("===t.substr(0,6)||t.indexOf("max")>-1);return r["_"+e+"Clamp"]=n,n?t.substr(6,t.length-7):t},Pt=function(t,e){return!e||qt(t)&&"clamp("===t.substr(0,6)?t:"clamp("+t+")"},Lt=function t(){return kt&&requestAnimationFrame(t)},Rt=function(){return et=1},Dt=function(){return et=0},zt=function(t){return t},Bt=function(t){return Math.round(1e5*t)/1e5||0},jt=function(){return"undefined"!=typeof window},Ft=function(){return U||jt()&&(U=window.gsap)&&U.registerPlugin&&U},Nt=function(t){return!!~Z.indexOf(t)},$t=function(t){return("Height"===t?_t:G["inner"+t])||H["client"+t]||W["client"+t]},Ut=function(t){return S(t,"getBoundingClientRect")||(Nt(t)?function(){return Ke.width=G.innerWidth,Ke.height=_t,Ke}:function(){return ce(t)})},Vt=function(t,e){var r=e.s,n=e.d2,i=e.d,o=e.a;return Math.max(0,(r="scroll"+n)&&(o=S(t,r))?o()-Ut(t)()[i]:Nt(t)?(H[r]||W[r])-$t(n):t[r]-t["offset"+n])},Gt=function(t,e){for(var r=0;r<st.length;r+=3)(!e||~e.indexOf(st[r+1]))&&t(st[r],st[r+1],st[r+2])},qt=function(t){return"string"==typeof t},Ht=function(t){return"function"==typeof t},Wt=function(t){return"number"==typeof t},Zt=function(t){return"object"==typeof t},Xt=function(t,e,r){return t&&t.progress(e?0:1)&&r&&t.pause()},Yt=function(t,e){if(t.enabled){var r=t._ctx?t._ctx.add((function(){return e(t)})):e(t);r&&r.totalTime&&(t.callbackAnimation=r)}},Kt=Math.abs,Jt="left",Qt="right",te="bottom",ee="width",re="height",ne="padding",ie="margin",oe="Width",se="px",ae=function(t){return G.getComputedStyle(t)},le=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},ce=function(t,e){var r=e&&"matrix(1, 0, 0, 1, 0, 0)"!==ae(t)[rt]&&U.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),n=t.getBoundingClientRect();return r&&r.progress(0).kill(),n},ue=function(t,e){var r=e.d2;return t["offset"+r]||t["client"+r]||0},he=function(t){var e,r=[],n=t.labels,i=t.duration();for(e in n)r.push(n[e]/i);return r},fe=function(t){var e=U.utils.snap(t),r=Array.isArray(t)&&t.slice(0).sort((function(t,e){return t-e}));return r?function(t,n,i){var o;if(void 0===i&&(i=.001),!n)return e(t);if(n>0){for(t-=i,o=0;o<r.length;o++)if(r[o]>=t)return r[o];return r[o-1]}for(o=r.length,t+=i;o--;)if(r[o]<=t)return r[o];return r[0]}:function(r,n,i){void 0===i&&(i=.001);var o=e(r);return!n||Math.abs(o-r)<i||o-r<0==n<0?o:e(n<0?r-t:r+t)}},de=function(t,e,r,n){return r.split(",").forEach((function(r){return t(e,r,n)}))},pe=function(t,e,r,n,i){return t.addEventListener(e,r,{passive:!n,capture:!!i})},me=function(t,e,r,n){return t.removeEventListener(e,r,!!n)},ge=function(t,e,r){(r=r&&r.wheelHandler)&&(t(e,"wheel",r),t(e,"touchmove",r))},ye={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},_e={toggleActions:"play",anticipatePin:0},ve={top:0,left:0,center:.5,bottom:1,right:1},be=function(t,e){if(qt(t)){var r=t.indexOf("="),n=~r?+(t.charAt(r-1)+1)*parseFloat(t.substr(r+1)):0;~r&&(t.indexOf("%")>r&&(n*=e/100),t=t.substr(0,r-1)),t=n+(t in ve?ve[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},xe=function(t,e,r,n,i,o,s,a){var l=i.startColor,c=i.endColor,u=i.fontSize,h=i.indent,f=i.fontWeight,d=q.createElement("div"),p=Nt(r)||"fixed"===S(r,"pinType"),m=-1!==t.indexOf("scroller"),g=p?W:r,y=-1!==t.indexOf("start"),_=y?l:c,v="border-color:"+_+";font-size:"+u+";color:"+_+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return v+="position:"+((m||a)&&p?"fixed;":"absolute;"),(m||a||!p)&&(v+=(n===L?Qt:te)+":"+(o+parseFloat(h))+"px;"),s&&(v+="box-sizing:border-box;text-align:left;width:"+s.offsetWidth+"px;"),d._isStart=y,d.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),d.style.cssText=v,d.innerText=e||0===e?t+"-"+e:t,g.children[0]?g.insertBefore(d,g.children[0]):g.appendChild(d),d._offset=d["offset"+n.op.d2],we(d,0,n,y),d},we=function(t,e,r,n){var i={display:"block"},o=r[n?"os2":"p2"],s=r[n?"p2":"os2"];t._isFlipped=n,i[r.a+"Percent"]=n?-100:0,i[r.a]=n?"1px":0,i["border"+o+oe]=1,i["border"+s+oe]=0,i[r.p]=e+"px",U.set(t,i)},Ee=[],Se={},Te=function(){return Ot()-Mt>34&&(wt||(wt=requestAnimationFrame(Ge)))},Ae=function(){(!ut||!ut.isPressed||ut.startX>W.clientWidth)&&(b.cache++,ut?wt||(wt=requestAnimationFrame(Ge)):Ge(),Mt||Pe("scrollStart"),Mt=Ot())},Oe=function(){dt=G.innerWidth,ft=G.innerHeight},Ce=function(t){b.cache++,(!0===t||!tt&&!ct&&!q.fullscreenElement&&!q.webkitFullscreenElement&&(!ht||dt!==G.innerWidth||Math.abs(G.innerHeight-ft)>.25*G.innerHeight))&&X.restart(!0)},Me={},ke=[],Ie=function t(){return me(ir,"scrollEnd",t)||$e(!0)},Pe=function(t){return Me[t]&&Me[t].map((function(t){return t()}))||ke},Le=[],Re=function(t){for(var e=0;e<Le.length;e+=5)(!t||Le[e+4]&&Le[e+4].query===t)&&(Le[e].style.cssText=Le[e+1],Le[e].getBBox&&Le[e].setAttribute("transform",Le[e+2]||""),Le[e+3].uncache=1)},De=function(){return b.forEach((function(t){return Ht(t)&&++t.cacheID&&(t.rec=t())}))},ze=function(t,e){var r;for(nt=0;nt<Ee.length;nt++)!(r=Ee[nt])||e&&r._ctx!==e||(t?r.kill(1):r.revert(!0,!0));vt=!0,e&&Re(e),e||Pe("revert")},Be=function(t,e){b.cache++,(e||!Et)&&b.forEach((function(t){return Ht(t)&&t.cacheID++&&(t.rec=0)})),qt(t)&&(G.history.scrollRestoration=gt=t)},je=0,Fe=function(){W.appendChild(yt),_t=!ut&&yt.offsetHeight||G.innerHeight,W.removeChild(yt)},Ne=function(t){return Y(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach((function(e){return e.style.display=t?"none":"block"}))},$e=function(t,e){if(H=q.documentElement,W=q.body,Z=[G,q,H,W],!Mt||t||vt){Fe(),Et=ir.isRefreshing=!0,vt||De();var r=Pe("refreshInit");at&&ir.sort(),e||ze(),b.forEach((function(t){Ht(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))})),Ee.slice(0).forEach((function(t){return t.refresh()})),vt=!1,Ee.forEach((function(t){if(t._subPinOffset&&t.pin){var e=t.vars.horizontal?"offsetWidth":"offsetHeight",r=t.pin[e];t.revert(!0,1),t.adjustPinSpacing(t.pin[e]-r),t.refresh()}})),bt=1,Ne(!0),Ee.forEach((function(t){var e=Vt(t.scroller,t._dir),r="max"===t.vars.end||t._endClamp&&t.end>e,n=t._startClamp&&t.start>=e;(r||n)&&t.setPositions(n?e-1:t.start,r?Math.max(n?e:t.start+1,e):t.end,!0)})),Ne(!1),bt=0,r.forEach((function(t){return t&&t.render&&t.render(-1)})),b.forEach((function(t){Ht(t)&&(t.smooth&&requestAnimationFrame((function(){return t.target.style.scrollBehavior="smooth"})),t.rec&&t(t.rec))})),Be(gt,1),X.pause(),je++,Et=2,Ge(2),Ee.forEach((function(t){return Ht(t.vars.onRefresh)&&t.vars.onRefresh(t)})),Et=ir.isRefreshing=!1,Pe("refresh")}else pe(ir,"scrollEnd",Ie)},Ue=0,Ve=1,Ge=function(t){if(2===t||!Et&&!vt){ir.isUpdating=!0,Tt&&Tt.update(0);var e=Ee.length,r=Ot(),n=r-Ct>=50,i=e&&Ee[0].scroll();if(Ve=Ue>i?-1:1,Et||(Ue=i),n&&(Mt&&!et&&r-Mt>200&&(Mt=0,Pe("scrollEnd")),J=Ct,Ct=r),Ve<0){for(nt=e;nt-- >0;)Ee[nt]&&Ee[nt].update(0,n);Ve=1}else for(nt=0;nt<e;nt++)Ee[nt]&&Ee[nt].update(0,n);ir.isUpdating=!1}wt=0},qe=[Jt,"top",te,Qt,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],He=qe.concat([ee,re,"boxSizing","maxWidth","maxHeight","position",ie,ne,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),We=function(t,e,r,n){if(!t._gsap.swappedIn){for(var i,o=qe.length,s=e.style,a=t.style;o--;)s[i=qe[o]]=r[i];s.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(s.display="inline-block"),a.bottom=a.right="auto",s.flexBasis=r.flexBasis||"auto",s.overflow="visible",s.boxSizing="border-box",s.width=ue(t,P)+se,s.height=ue(t,L)+se,s.padding=a.margin=a.top=a.left="0",Xe(n),a.width=a.maxWidth=r.width,a.height=a.maxHeight=r.height,a.padding=r.padding,t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},Ze=/([A-Z])/g,Xe=function(t){if(t){var e,r,n=t.t.style,i=t.length,o=0;for((t.t._gsap||U.core.getCache(t.t)).uncache=1;o<i;o+=2)r=t[o+1],e=t[o],r?n[e]=r:n[e]&&n.removeProperty(e.replace(Ze,"-$1").toLowerCase())}},Ye=function(t){for(var e=He.length,r=t.style,n=[],i=0;i<e;i++)n.push(He[i],r[He[i]]);return n.t=t,n},Ke={left:0,top:0},Je=function(t,e,r,n,i,o,s,a,l,c,u,h,f,d){Ht(t)&&(t=t(a)),qt(t)&&"max"===t.substr(0,3)&&(t=h+("="===t.charAt(4)?be("0"+t.substr(3),r):0));var p,m,g,y=f?f.time():0;if(f&&f.seek(0),isNaN(t)||(t=+t),Wt(t))f&&(t=U.utils.mapRange(f.scrollTrigger.start,f.scrollTrigger.end,0,h,t)),s&&we(s,r,n,!0);else{Ht(e)&&(e=e(a));var _,v,b,x,w=(t||"0").split(" ");g=R(e,a)||W,(_=ce(g)||{})&&(_.left||_.top)||"none"!==ae(g).display||(x=g.style.display,g.style.display="block",_=ce(g),x?g.style.display=x:g.style.removeProperty("display")),v=be(w[0],_[n.d]),b=be(w[1]||"0",r),t=_[n.p]-l[n.p]-c+v+i-b,s&&we(s,b,n,r-b<20||s._isStart&&b>20),r-=r-b}if(d&&(a[d]=t||-.001,t<0&&(t=0)),o){var E=t+r,S=o._isStart;p="scroll"+n.d2,we(o,E,n,S&&E>20||!S&&(u?Math.max(W[p],H[p]):o.parentNode[p])<=E+1),u&&(l=ce(s),u&&(o.style[n.op.p]=l[n.op.p]-n.op.m-o._offset+se))}return f&&g&&(p=ce(g),f.seek(h),m=ce(g),f._caScrollDist=p[n.p]-m[n.p],t=t/f._caScrollDist*h),f&&f.seek(y),f?t:Math.round(t)},Qe=/(webkit|moz|length|cssText|inset)/i,tr=function(t,e,r,n){if(t.parentNode!==e){var i,o,s=t.style;if(e===W){for(i in t._stOrig=s.cssText,o=ae(t))+i||Qe.test(i)||!o[i]||"string"!=typeof s[i]||"0"===i||(s[i]=o[i]);s.top=r,s.left=n}else s.cssText=t._stOrig;U.core.getCache(t).uncache=1,e.appendChild(t)}},er=function(t,e,r){var n=e,i=n;return function(e){var o=Math.round(t());return o!==n&&o!==i&&Math.abs(o-n)>3&&Math.abs(o-i)>3&&(e=o,r&&r()),i=n,n=Math.round(e)}},rr=function(t,e,r){var n={};n[e.p]="+="+r,U.set(t,n)},nr=function(t,e){var r=D(t,e),n="_scroll"+e.p2,i=function e(i,o,s,a,l){var c=e.tween,u=o.onComplete,h={};s=s||r();var f=er(r,s,(function(){c.kill(),e.tween=0}));return l=a&&l||0,a=a||i-s,c&&c.kill(),o[n]=i,o.inherit=!1,o.modifiers=h,h[n]=function(){return f(s+a*c.ratio+l*c.ratio*c.ratio)},o.onUpdate=function(){b.cache++,e.tween&&Ge()},o.onComplete=function(){e.tween=0,u&&u.call(c)},c=e.tween=U.to(t,o)};return t[n]=r,r.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},pe(t,"wheel",r.wheelHandler),ir.isTouch&&pe(t,"touchmove",r.wheelHandler),i},ir=function(){function t(e,r){V||t.register(U)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),mt(this),this.init(e,r)}return t.prototype.init=function(e,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),kt){var n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,w,E,T,A,O,C,M,k,I,z,B,j,F,N,$,V,Z,X,Q,rt,it,ot,st,ct,ut,ht=e=le(qt(e)||Wt(e)||e.nodeType?{trigger:e}:e,_e),ft=ht.onUpdate,dt=ht.toggleClass,pt=ht.id,mt=ht.onToggle,gt=ht.onRefresh,yt=ht.scrub,_t=ht.trigger,vt=ht.pin,wt=ht.pinSpacing,Ct=ht.invalidateOnRefresh,Lt=ht.anticipatePin,Rt=ht.onScrubComplete,Dt=ht.onSnapComplete,jt=ht.once,Ft=ht.snap,Gt=ht.pinReparent,Jt=ht.pinSpacer,Qt=ht.containerAnimation,te=ht.fastScrollEnd,ee=ht.preventOverlaps,re=e.horizontal||e.containerAnimation&&!1!==e.horizontal?P:L,de=!yt&&0!==yt,ge=R(e.scroller||G),ve=U.core.getCache(ge),we=Nt(ge),Te="fixed"===("pinType"in e?e.pinType:S(ge,"pinType")||we&&"fixed"),Oe=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],Me=de&&e.toggleActions.split(" "),ke="markers"in e?e.markers:_e.markers,Pe=we?0:parseFloat(ae(ge)["border"+re.p2+oe])||0,Le=this,Re=e.onRefreshInit&&function(){return e.onRefreshInit(Le)},De=function(t,e,r){var n=r.d,i=r.d2,o=r.a;return(o=S(t,"getBoundingClientRect"))?function(){return o()[n]}:function(){return(e?$t(i):t["client"+i])||0}}(ge,we,re),ze=function(t,e){return!e||~x.indexOf(t)?Ut(t):function(){return Ke}}(ge,we),Be=0,Fe=0,Ne=0,Ue=D(ge,re);if(Le._startClamp=Le._endClamp=!1,Le._dir=re,Lt*=45,Le.scroller=ge,Le.scroll=Qt?Qt.time.bind(Qt):Ue,s=Ue(),Le.vars=e,r=r||e.animation,"refreshPriority"in e&&(at=1,-9999===e.refreshPriority&&(Tt=Le)),ve.tweenScroll=ve.tweenScroll||{top:nr(ge,L),left:nr(ge,P)},Le.tweenTo=n=ve.tweenScroll[re.p],Le.scrubDuration=function(t){(V=Wt(t)&&t)?$?$.duration(t):$=U.to(r,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:V,paused:!0,onComplete:function(){return Rt&&Rt(Le)}}):($&&$.progress(1).kill(),$=0)},r&&(r.vars.lazy=!1,r._initted&&!Le.isReverted||!1!==r.vars.immediateRender&&!1!==e.immediateRender&&r.duration()&&r.render(0,!0,!0),Le.animation=r.pause(),r.scrollTrigger=Le,Le.scrubDuration(yt),F=0,pt||(pt=r.vars.id)),Ft&&(Zt(Ft)&&!Ft.push||(Ft={snapTo:Ft}),"scrollBehavior"in W.style&&U.set(we?[W,H]:ge,{scrollBehavior:"auto"}),b.forEach((function(t){return Ht(t)&&t.target===(we?q.scrollingElement||H:ge)&&(t.smooth=!1)})),o=Ht(Ft.snapTo)?Ft.snapTo:"labels"===Ft.snapTo?function(t){return function(e){return U.utils.snap(he(t),e)}}(r):"labelsDirectional"===Ft.snapTo?(st=r,function(t,e){return fe(he(st))(t,e.direction)}):!1!==Ft.directional?function(t,e){return fe(Ft.snapTo)(t,Ot()-Fe<500?0:e.direction)}:U.utils.snap(Ft.snapTo),Z=Ft.duration||{min:.1,max:2},Z=Zt(Z)?K(Z.min,Z.max):K(Z,Z),X=U.delayedCall(Ft.delay||V/2||.1,(function(){var t=Ue(),e=Ot()-Fe<500,i=n.tween;if(!(e||Math.abs(Le.getVelocity())<10)||i||et||Be===t)Le.isActive&&Be!==t&&X.restart(!0);else{var s,a,u=(t-l)/g,h=r&&!de?r.totalProgress():u,f=e?0:(h-N)/(Ot()-J)*1e3||0,d=U.utils.clamp(-u,1-u,Kt(f/2)*f/.185),p=u+(!1===Ft.inertia?0:d),m=Ft,y=m.onStart,_=m.onInterrupt,v=m.onComplete;if(s=o(p,Le),Wt(s)||(s=p),a=Math.max(0,Math.round(l+s*g)),t<=c&&t>=l&&a!==t){if(i&&!i._initted&&i.data<=Kt(a-t))return;!1===Ft.inertia&&(d=s-u),n(a,{duration:Z(Kt(.185*Math.max(Kt(p-h),Kt(s-h))/f/.05||0)),ease:Ft.ease||"power3",data:Kt(a-t),onInterrupt:function(){return X.restart(!0)&&_&&_(Le)},onComplete:function(){Le.update(),Be=Ue(),r&&!de&&($?$.resetTo("totalProgress",s,r._tTime/r._tDur):r.progress(s)),F=N=r&&!de?r.totalProgress():Le.progress,Dt&&Dt(Le),v&&v(Le)}},t,d*g,a-t-d*g),y&&y(Le,n.tween)}}})).pause()),pt&&(Se[pt]=Le),(ot=(_t=Le.trigger=R(_t||!0!==vt&&vt))&&_t._gsap&&_t._gsap.stRevert)&&(ot=ot(Le)),vt=!0===vt?_t:R(vt),qt(dt)&&(dt={targets:_t,className:dt}),vt&&(!1===wt||wt===ie||(wt=!(!wt&&vt.parentNode&&vt.parentNode.style&&"flex"===ae(vt.parentNode).display)&&ne),Le.pin=vt,(i=U.core.getCache(vt)).spacer?y=i.pinState:(Jt&&((Jt=R(Jt))&&!Jt.nodeType&&(Jt=Jt.current||Jt.nativeElement),i.spacerIsNative=!!Jt,Jt&&(i.spacerState=Ye(Jt))),i.spacer=w=Jt||q.createElement("div"),w.classList.add("pin-spacer"),pt&&w.classList.add("pin-spacer-"+pt),i.pinState=y=Ye(vt)),!1!==e.force3D&&U.set(vt,{force3D:!0}),Le.spacer=w=i.spacer,j=ae(vt),M=j[wt+re.os2],T=U.getProperty(vt),A=U.quickSetter(vt,re.a,se),We(vt,w,j),v=Ye(vt)),ke){p=Zt(ke)?le(ke,ye):ye,f=xe("scroller-start",pt,ge,re,p,0),d=xe("scroller-end",pt,ge,re,p,0,f),E=f["offset"+re.op.d2];var Ge=R(S(ge,"content")||ge);u=this.markerStart=xe("start",pt,Ge,re,p,E,0,Qt),h=this.markerEnd=xe("end",pt,Ge,re,p,E,0,Qt),Qt&&(it=U.quickSetter([u,h],re.a,se)),Te||x.length&&!0===S(ge,"fixedMarkers")||(ut=ae(ct=we?W:ge).position,ct.style.position="absolute"===ut||"fixed"===ut?ut:"relative",U.set([f,d],{force3D:!0}),I=U.quickSetter(f,re.a,se),B=U.quickSetter(d,re.a,se))}if(Qt){var qe=Qt.vars.onUpdate,He=Qt.vars.onUpdateParams;Qt.eventCallback("onUpdate",(function(){Le.update(0,0,1),qe&&qe.apply(Qt,He||[])}))}if(Le.previous=function(){return Ee[Ee.indexOf(Le)-1]},Le.next=function(){return Ee[Ee.indexOf(Le)+1]},Le.revert=function(t,e){if(!e)return Le.kill(!0);var n=!1!==t||!Le.enabled,i=tt;n!==Le.isReverted&&(n&&(Q=Math.max(Ue(),Le.scroll.rec||0),Ne=Le.progress,rt=r&&r.progress()),u&&[u,h,f,d].forEach((function(t){return t.style.display=n?"none":"block"})),n&&(tt=Le,Le.update(n)),!vt||Gt&&Le.isActive||(n?function(t,e,r){Xe(r);var n=t._gsap;if(n.spacerIsNative)Xe(n.spacerState);else if(t._gsap.swappedIn){var i=e.parentNode;i&&(i.insertBefore(t,e),i.removeChild(e))}t._gsap.swappedIn=!1}(vt,w,y):We(vt,w,ae(vt),k)),n||Le.update(n),tt=i,Le.isReverted=n)},Le.refresh=function(i,o,p,b){if(!tt&&Le.enabled||o)if(vt&&i&&Mt)pe(t,"scrollEnd",Ie);else{!Et&&Re&&Re(Le),tt=Le,n.tween&&!p&&(n.tween.kill(),n.tween=0),$&&$.pause(),Ct&&r&&(r.revert({kill:!1}).invalidate(),r.getChildren?r.getChildren(!0,!0,!1).forEach((function(t){return t.vars.immediateRender&&t.render(0,!0,!0)})):r.vars.immediateRender&&r.render(0,!0,!0)),Le.isReverted||Le.revert(!0,!0),Le._subPinOffset=!1;var x,E,S,A,M,I,B,j,F,N,V,G,Z,Y=De(),K=ze(),J=Qt?Qt.duration():Vt(ge,re),et=g<=.01||!g,nt=0,it=b||0,ot=Zt(p)?p.end:e.end,st=e.endTrigger||_t,at=Zt(p)?p.start:e.start||(0!==e.start&&_t?vt?"0 0":"0 100%":0),ct=Le.pinnedContainer=e.pinnedContainer&&R(e.pinnedContainer,Le),ut=_t&&Math.max(0,Ee.indexOf(Le))||0,ht=ut;for(ke&&Zt(p)&&(G=U.getProperty(f,re.p),Z=U.getProperty(d,re.p));ht-- >0;)(I=Ee[ht]).end||I.refresh(0,1)||(tt=Le),!(B=I.pin)||B!==_t&&B!==vt&&B!==ct||I.isReverted||(N||(N=[]),N.unshift(I),I.revert(!0,!0)),I!==Ee[ht]&&(ut--,ht--);for(Ht(at)&&(at=at(Le)),at=It(at,"start",Le),l=Je(at,_t,Y,re,Ue(),u,f,Le,K,Pe,Te,J,Qt,Le._startClamp&&"_startClamp")||(vt?-.001:0),Ht(ot)&&(ot=ot(Le)),qt(ot)&&!ot.indexOf("+=")&&(~ot.indexOf(" ")?ot=(qt(at)?at.split(" ")[0]:"")+ot:(nt=be(ot.substr(2),Y),ot=qt(at)?at:(Qt?U.utils.mapRange(0,Qt.duration(),Qt.scrollTrigger.start,Qt.scrollTrigger.end,l):l)+nt,st=_t)),ot=It(ot,"end",Le),c=Math.max(l,Je(ot||(st?"100% 0":J),st,Y,re,Ue()+nt,h,d,Le,K,Pe,Te,J,Qt,Le._endClamp&&"_endClamp"))||-.001,nt=0,ht=ut;ht--;)(B=(I=Ee[ht]||{}).pin)&&I.start-I._pinPush<=l&&!Qt&&I.end>0&&(x=I.end-(Le._startClamp?Math.max(0,I.start):I.start),(B===_t&&I.start-I._pinPush<l||B===ct)&&isNaN(at)&&(nt+=x*(1-I.progress)),B===vt&&(it+=x));if(l+=nt,c+=nt,Le._startClamp&&(Le._startClamp+=nt),Le._endClamp&&!Et&&(Le._endClamp=c||-.001,c=Math.min(c,Vt(ge,re))),g=c-l||(l-=.01)&&.001,et&&(Ne=U.utils.clamp(0,1,U.utils.normalize(l,c,Q))),Le._pinPush=it,u&&nt&&((x={})[re.a]="+="+nt,ct&&(x[re.p]="-="+Ue()),U.set([u,h],x)),!vt||bt&&Le.end>=Vt(ge,re)){if(_t&&Ue()&&!Qt)for(E=_t.parentNode;E&&E!==W;)E._pinOffset&&(l-=E._pinOffset,c-=E._pinOffset),E=E.parentNode}else x=ae(vt),A=re===L,S=Ue(),O=parseFloat(T(re.a))+it,!J&&c>1&&(V={style:V=(we?q.scrollingElement||H:ge).style,value:V["overflow"+re.a.toUpperCase()]},we&&"scroll"!==ae(W)["overflow"+re.a.toUpperCase()]&&(V.style["overflow"+re.a.toUpperCase()]="scroll")),We(vt,w,x),v=Ye(vt),E=ce(vt,!0),j=Te&&D(ge,A?P:L)(),wt?((k=[wt+re.os2,g+it+se]).t=w,(ht=wt===ne?ue(vt,re)+g+it:0)&&(k.push(re.d,ht+se),"auto"!==w.style.flexBasis&&(w.style.flexBasis=ht+se)),Xe(k),ct&&Ee.forEach((function(t){t.pin===ct&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)})),Te&&Ue(Q)):(ht=ue(vt,re))&&"auto"!==w.style.flexBasis&&(w.style.flexBasis=ht+se),Te&&((M={top:E.top+(A?S-l:j)+se,left:E.left+(A?j:S-l)+se,boxSizing:"border-box",position:"fixed"}).width=M.maxWidth=Math.ceil(E.width)+se,M.height=M.maxHeight=Math.ceil(E.height)+se,M.margin=M.marginTop=M.marginRight=M.marginBottom=M.marginLeft="0",M.padding=x.padding,M.paddingTop=x.paddingTop,M.paddingRight=x.paddingRight,M.paddingBottom=x.paddingBottom,M.paddingLeft=x.paddingLeft,_=function(t,e,r){for(var n,i=[],o=t.length,s=r?8:0;s<o;s+=2)n=t[s],i.push(n,n in e?e[n]:t[s+1]);return i.t=t.t,i}(y,M,Gt),Et&&Ue(0)),r?(F=r._initted,lt(1),r.render(r.duration(),!0,!0),C=T(re.a)-O+g+it,z=Math.abs(g-C)>1,Te&&z&&_.splice(_.length-2,2),r.render(0,!0,!0),F||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),lt(0)):C=g,V&&(V.value?V.style["overflow"+re.a.toUpperCase()]=V.value:V.style.removeProperty("overflow-"+re.a));N&&N.forEach((function(t){return t.revert(!1,!0)})),Le.start=l,Le.end=c,s=a=Et?Q:Ue(),Qt||Et||(s<Q&&Ue(Q),Le.scroll.rec=0),Le.revert(!1,!0),Fe=Ot(),X&&(Be=-1,X.restart(!0)),tt=0,r&&de&&(r._initted||rt)&&r.progress()!==rt&&r.progress(rt||0,!0).render(r.time(),!0,!0),(et||Ne!==Le.progress||Qt||Ct||r&&!r._initted)&&(r&&!de&&(r._initted||Ne||!1!==r.vars.immediateRender)&&r.totalProgress(Qt&&l<-.001&&!Ne?U.utils.normalize(l,c,0):Ne,!0),Le.progress=et||(s-l)/g===Ne?0:Ne),vt&&wt&&(w._pinOffset=Math.round(Le.progress*C)),$&&$.invalidate(),isNaN(G)||(G-=U.getProperty(f,re.p),Z-=U.getProperty(d,re.p),rr(f,re,G),rr(u,re,G-(b||0)),rr(d,re,Z),rr(h,re,Z-(b||0))),et&&!Et&&Le.update(),!gt||Et||m||(m=!0,gt(Le),m=!1)}},Le.getVelocity=function(){return(Ue()-a)/(Ot()-J)*1e3||0},Le.endAnimation=function(){Xt(Le.callbackAnimation),r&&($?$.progress(1):r.paused()?de||Xt(r,Le.direction<0,1):Xt(r,r.reversed()))},Le.labelToScroll=function(t){return r&&r.labels&&(l||Le.refresh()||l)+r.labels[t]/r.duration()*g||0},Le.getTrailing=function(t){var e=Ee.indexOf(Le),r=Le.direction>0?Ee.slice(0,e).reverse():Ee.slice(e+1);return(qt(t)?r.filter((function(e){return e.vars.preventOverlaps===t})):r).filter((function(t){return Le.direction>0?t.end<=l:t.start>=c}))},Le.update=function(t,e,i){if(!Qt||i||t){var o,u,h,d,p,m,y,b=!0===Et?Q:Le.scroll(),x=t?0:(b-l)/g,E=x<0?0:x>1?1:x||0,S=Le.progress;if(e&&(a=s,s=Qt?Ue():b,Ft&&(N=F,F=r&&!de?r.totalProgress():E)),Lt&&vt&&!tt&&!At&&Mt&&(!E&&l<b+(b-a)/(Ot()-J)*Lt?E=1e-4:1===E&&c>b+(b-a)/(Ot()-J)*Lt&&(E=.9999)),E!==S&&Le.enabled){if(d=(p=(o=Le.isActive=!!E&&E<1)!==(!!S&&S<1))||!!E!=!!S,Le.direction=E>S?1:-1,Le.progress=E,d&&!tt&&(u=E&&!S?0:1===E?1:1===S?2:3,de&&(h=!p&&"none"!==Me[u+1]&&Me[u+1]||Me[u],y=r&&("complete"===h||"reset"===h||h in r))),ee&&(p||y)&&(y||yt||!r)&&(Ht(ee)?ee(Le):Le.getTrailing(ee).forEach((function(t){return t.endAnimation()}))),de||(!$||tt||At?r&&r.totalProgress(E,!(!tt||!Fe&&!t)):($._dp._time-$._start!==$._time&&$.render($._dp._time-$._start),$.resetTo?$.resetTo("totalProgress",E,r._tTime/r._tDur):($.vars.totalProgress=E,$.invalidate().restart()))),vt)if(t&&wt&&(w.style[wt+re.os2]=M),Te){if(d){if(m=!t&&E>S&&c+1>b&&b+1>=Vt(ge,re),Gt)if(t||!o&&!m)tr(vt,w);else{var T=ce(vt,!0),k=b-l;tr(vt,W,T.top+(re===L?k:0)+se,T.left+(re===L?0:k)+se)}Xe(o||m?_:v),z&&E<1&&o||A(O+(1!==E||m?0:C))}}else A(Bt(O+C*E));Ft&&!n.tween&&!tt&&!At&&X.restart(!0),dt&&(p||jt&&E&&(E<1||!xt))&&Y(dt.targets).forEach((function(t){return t.classList[o||jt?"add":"remove"](dt.className)})),ft&&!de&&!t&&ft(Le),d&&!tt?(de&&(y&&("complete"===h?r.pause().totalProgress(1):"reset"===h?r.restart(!0).pause():"restart"===h?r.restart(!0):r[h]()),ft&&ft(Le)),!p&&xt||(mt&&p&&Yt(Le,mt),Oe[u]&&Yt(Le,Oe[u]),jt&&(1===E?Le.kill(!1,1):Oe[u]=0),p||Oe[u=1===E?1:3]&&Yt(Le,Oe[u])),te&&!o&&Math.abs(Le.getVelocity())>(Wt(te)?te:2500)&&(Xt(Le.callbackAnimation),$?$.progress(1):Xt(r,"reverse"===h?1:!E,1))):de&&ft&&!tt&&ft(Le)}if(B){var P=Qt?b/Qt.duration()*(Qt._caScrollDist||0):b;I(P+(f._isFlipped?1:0)),B(P)}it&&it(-b/Qt.duration()*(Qt._caScrollDist||0))}},Le.enable=function(e,r){Le.enabled||(Le.enabled=!0,pe(ge,"resize",Ce),we||pe(ge,"scroll",Ae),Re&&pe(t,"refreshInit",Re),!1!==e&&(Le.progress=Ne=0,s=a=Be=Ue()),!1!==r&&Le.refresh())},Le.getTween=function(t){return t&&n?n.tween:$},Le.setPositions=function(t,e,r,n){if(Qt){var i=Qt.scrollTrigger,o=Qt.duration(),s=i.end-i.start;t=i.start+s*t/o,e=i.start+s*e/o}Le.refresh(!1,!1,{start:Pt(t,r&&!!Le._startClamp),end:Pt(e,r&&!!Le._endClamp)},n),Le.update()},Le.adjustPinSpacing=function(t){if(k&&t){var e=k.indexOf(re.d)+1;k[e]=parseFloat(k[e])+t+se,k[1]=parseFloat(k[1])+t+se,Xe(k)}},Le.disable=function(e,r){if(!1!==e&&Le.revert(!0,!0),Le.enabled&&(Le.enabled=Le.isActive=!1,r||$&&$.pause(),Q=0,i&&(i.uncache=1),Re&&me(t,"refreshInit",Re),X&&(X.pause(),n.tween&&n.tween.kill()&&(n.tween=0)),!we)){for(var o=Ee.length;o--;)if(Ee[o].scroller===ge&&Ee[o]!==Le)return;me(ge,"resize",Ce),we||me(ge,"scroll",Ae)}},Le.kill=function(t,n){Le.disable(t,n),$&&!n&&$.kill(),pt&&delete Se[pt];var o=Ee.indexOf(Le);o>=0&&Ee.splice(o,1),o===nt&&Ve>0&&nt--,o=0,Ee.forEach((function(t){return t.scroller===Le.scroller&&(o=1)})),o||Et||(Le.scroll.rec=0),r&&(r.scrollTrigger=null,t&&r.revert({kill:!1}),n||r.kill()),u&&[u,h,f,d].forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),Tt===Le&&(Tt=0),vt&&(i&&(i.uncache=1),o=0,Ee.forEach((function(t){return t.pin===vt&&o++})),o||(i.spacer=0)),e.onKill&&e.onKill(Le)},Ee.push(Le),Le.enable(!1,!1),ot&&ot(Le),r&&r.add&&!g){var Ze=Le.update;Le.update=function(){Le.update=Ze,b.cache++,l||c||Le.refresh()},U.delayedCall(.01,Le.update),g=.01,l=c=0}else Le.refresh();vt&&function(){if(St!==je){var t=St=je;requestAnimationFrame((function(){return t===je&&$e(!0)}))}}()}else this.update=this.refresh=this.kill=zt},t.register=function(e){return V||(U=e||Ft(),jt()&&window.document&&t.enable(),V=kt),V},t.defaults=function(t){if(t)for(var e in t)_e[e]=t[e];return _e},t.disable=function(t,e){kt=0,Ee.forEach((function(r){return r[e?"kill":"disable"](t)})),me(G,"wheel",Ae),me(q,"scroll",Ae),clearInterval(Q),me(q,"touchcancel",zt),me(W,"touchstart",zt),de(me,q,"pointerdown,touchstart,mousedown",Rt),de(me,q,"pointerup,touchend,mouseup",Dt),X.kill(),Gt(me);for(var r=0;r<b.length;r+=3)ge(me,b[r],b[r+1]),ge(me,b[r],b[r+2])},t.enable=function(){if(G=window,q=document,H=q.documentElement,W=q.body,U&&(Y=U.utils.toArray,K=U.utils.clamp,mt=U.core.context||zt,lt=U.core.suppressOverwrites||zt,gt=G.history.scrollRestoration||"auto",Ue=G.pageYOffset||0,U.core.globals("ScrollTrigger",t),W)){kt=1,(yt=document.createElement("div")).style.height="100vh",yt.style.position="absolute",Fe(),Lt(),$.register(U),t.isTouch=$.isTouch,pt=$.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),ht=1===$.isTouch,pe(G,"wheel",Ae),Z=[G,q,H,W],U.matchMedia?(t.matchMedia=function(t){var e,r=U.matchMedia();for(e in t)r.add(e,t[e]);return r},U.addEventListener("matchMediaInit",(function(){De(),ze()})),U.addEventListener("matchMediaRevert",(function(){return Re()})),U.addEventListener("matchMedia",(function(){$e(0,1),Pe("matchMedia")})),U.matchMedia().add("(orientation: portrait)",(function(){return Oe(),Oe}))):console.warn("Requires GSAP 3.11.0 or later"),Oe(),pe(q,"scroll",Ae);var e,r,n=W.hasAttribute("style"),i=W.style,o=i.borderTopStyle,s=U.core.Animation.prototype;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",e=ce(W),L.m=Math.round(e.top+L.sc())||0,P.m=Math.round(e.left+P.sc())||0,o?i.borderTopStyle=o:i.removeProperty("border-top-style"),n||(W.setAttribute("style",""),W.removeAttribute("style")),Q=setInterval(Te,250),U.delayedCall(.5,(function(){return At=0})),pe(q,"touchcancel",zt),pe(W,"touchstart",zt),de(pe,q,"pointerdown,touchstart,mousedown",Rt),de(pe,q,"pointerup,touchend,mouseup",Dt),rt=U.utils.checkPrefix("transform"),He.push(rt),V=Ot(),X=U.delayedCall(.2,$e).pause(),st=[q,"visibilitychange",function(){var t=G.innerWidth,e=G.innerHeight;q.hidden?(it=t,ot=e):it===t&&ot===e||Ce()},q,"DOMContentLoaded",$e,G,"load",$e,G,"resize",Ce],Gt(pe),Ee.forEach((function(t){return t.enable(0,1)})),r=0;r<b.length;r+=3)ge(me,b[r],b[r+1]),ge(me,b[r],b[r+2])}},t.config=function(e){"limitCallbacks"in e&&(xt=!!e.limitCallbacks);var r=e.syncInterval;r&&clearInterval(Q)||(Q=r)&&setInterval(Te,r),"ignoreMobileResize"in e&&(ht=1===t.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Gt(me)||Gt(pe,e.autoRefreshEvents||"none"),ct=-1===(e.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function(t,e){var r=R(t),n=b.indexOf(r),i=Nt(r);~n&&b.splice(n,i?6:2),e&&(i?x.unshift(G,e,W,e,H,e):x.unshift(r,e))},t.clearMatchMedia=function(t){Ee.forEach((function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)}))},t.isInViewport=function(t,e,r){var n=(qt(t)?R(t):t).getBoundingClientRect(),i=n[r?ee:re]*e||0;return r?n.right-i>0&&n.left+i<G.innerWidth:n.bottom-i>0&&n.top+i<G.innerHeight},t.positionInViewport=function(t,e,r){qt(t)&&(t=R(t));var n=t.getBoundingClientRect(),i=n[r?ee:re],o=null==e?i/2:e in ve?ve[e]*i:~e.indexOf("%")?parseFloat(e)*i/100:parseFloat(e)||0;return r?(n.left+o)/G.innerWidth:(n.top+o)/G.innerHeight},t.killAll=function(t){if(Ee.slice(0).forEach((function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()})),!0!==t){var e=Me.killAll||[];Me={},e.forEach((function(t){return t()}))}},t}();ir.version="3.14.2",ir.saveStyles=function(t){return t?Y(t).forEach((function(t){if(t&&t.style){var e=Le.indexOf(t);e>=0&&Le.splice(e,5),Le.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),U.core.getCache(t),mt())}})):Le},ir.revert=function(t,e){return ze(!t,e)},ir.create=function(t,e){return new ir(t,e)},ir.refresh=function(t){return t?Ce(!0):(V||ir.register())&&$e(!0)},ir.update=function(t){return++b.cache&&Ge(!0===t?2:0)},ir.clearScrollMemory=Be,ir.maxScroll=function(t,e){return Vt(t,e?P:L)},ir.getScrollFunc=function(t,e){return D(R(t),e?P:L)},ir.getById=function(t){return Se[t]},ir.getAll=function(){return Ee.filter((function(t){return"ScrollSmoother"!==t.vars.id}))},ir.isScrolling=function(){return!!Mt},ir.snapDirectional=fe,ir.addEventListener=function(t,e){var r=Me[t]||(Me[t]=[]);~r.indexOf(e)||r.push(e)},ir.removeEventListener=function(t,e){var r=Me[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},ir.batch=function(t,e){var r,n=[],i={},o=e.interval||.016,s=e.batchMax||1e9,a=function(t,e){var r=[],n=[],i=U.delayedCall(o,(function(){e(r,n),r=[],n=[]})).pause();return function(t){r.length||i.restart(!0),r.push(t.trigger),n.push(t),s<=r.length&&i.progress(1)}};for(r in e)i[r]="on"===r.substr(0,2)&&Ht(e[r])&&"onRefreshInit"!==r?a(0,e[r]):e[r];return Ht(s)&&(s=s(),pe(ir,"refresh",(function(){return s=e.batchMax()}))),Y(t).forEach((function(t){var e={};for(r in i)e[r]=i[r];e.trigger=t,n.push(ir.create(e))})),n};var or,sr=function(t,e,r,n){return e>n?t(n):e<0&&t(0),r>n?(n-e)/(r-e):r<0?e/(e-r):1},ar=function t(e,r){!0===r?e.style.removeProperty("touch-action"):e.style.touchAction=!0===r?"auto":r?"pan-"+r+($.isTouch?" pinch-zoom":""):"none",e===H&&t(W,r)},lr={auto:1,scroll:1},cr=function(t){var e,r=t.event,n=t.target,i=t.axis,o=(r.changedTouches?r.changedTouches[0]:r).target,s=o._gsap||U.core.getCache(o),a=Ot();if(!s._isScrollT||a-s._isScrollT>2e3){for(;o&&o!==W&&(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth||!lr[(e=ae(o)).overflowY]&&!lr[e.overflowX]);)o=o.parentNode;s._isScroll=o&&o!==n&&!Nt(o)&&(lr[(e=ae(o)).overflowY]||lr[e.overflowX]),s._isScrollT=a}(s._isScroll||"x"===i)&&(r.stopPropagation(),r._gsapAllow=!0)},ur=function(t,e,r,n){return $.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:n=n&&cr,onPress:n,onDrag:n,onScroll:n,onEnable:function(){return r&&pe(q,$.eventTypes[0],fr,!1,!0)},onDisable:function(){return me(q,$.eventTypes[0],fr,!0)}})},hr=/(input|label|select|textarea)/i,fr=function(t){var e=hr.test(t.target.tagName);(e||or)&&(t._gsapAllow=!0,or=e)},dr=function(t){Zt(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,r,n,i,o,s,a,l,c=t,u=c.normalizeScrollX,h=c.momentum,f=c.allowNestedScroll,d=c.onRelease,p=R(t.target)||H,m=U.core.globals().ScrollSmoother,g=m&&m.get(),y=pt&&(t.content&&R(t.content)||g&&!1!==t.content&&!g.smooth()&&g.content()),_=D(p,L),v=D(p,P),x=1,w=($.isTouch&&G.visualViewport?G.visualViewport.scale*G.visualViewport.width:G.outerWidth)/G.innerWidth,E=0,S=Ht(h)?function(){return h(e)}:function(){return h||2.8},T=ur(p,t.type,!0,f),A=function(){return i=!1},O=zt,C=zt,M=function(){r=Vt(p,L),C=K(pt?1:0,r),u&&(O=K(0,Vt(p,P))),n=je},k=function(){y._gsap.y=Bt(parseFloat(y._gsap.y)+_.offset)+"px",y.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(y._gsap.y)+", 0, 1)",_.offset=_.cacheID=0},I=function(){M(),o.isActive()&&o.vars.scrollY>r&&(_()>r?o.progress(1)&&_(r):o.resetTo("scrollY",r))};return y&&U.set(y,{y:"+=0"}),t.ignoreCheck=function(t){return pt&&"touchmove"===t.type&&function(){if(i){requestAnimationFrame(A);var t=Bt(e.deltaY/2),r=C(_.v-t);if(y&&r!==_.v+_.offset){_.offset=r-_.v;var n=Bt((parseFloat(y&&y._gsap.y)||0)-_.offset);y.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+n+", 0, 1)",y._gsap.y=n+"px",_.cacheID=b.cache,Ge()}return!0}_.offset&&k(),i=!0}()||x>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){i=!1;var t=x;x=Bt((G.visualViewport&&G.visualViewport.scale||1)/w),o.pause(),t!==x&&ar(p,x>1.01||!u&&"x"),s=v(),a=_(),M(),n=je},t.onRelease=t.onGestureStart=function(t,e){if(_.offset&&k(),e){b.cache++;var n,i,s=S();u&&(i=(n=v())+.05*s*-t.velocityX/.227,s*=sr(v,n,i,Vt(p,P)),o.vars.scrollX=O(i)),i=(n=_())+.05*s*-t.velocityY/.227,s*=sr(_,n,i,Vt(p,L)),o.vars.scrollY=C(i),o.invalidate().duration(s).play(.01),(pt&&o.vars.scrollY>=r||n>=r-1)&&U.to({},{onUpdate:I,duration:s})}else l.restart(!0);d&&d(t)},t.onWheel=function(){o._ts&&o.pause(),Ot()-E>1e3&&(n=0,E=Ot())},t.onChange=function(t,e,r,i,o){if(je!==n&&M(),e&&u&&v(O(i[2]===e?s+(t.startX-t.x):v()+e-i[1])),r){_.offset&&k();var l=o[2]===r,c=l?a+t.startY-t.y:_()+r-o[1],h=C(c);l&&c!==h&&(a+=h-c),_(h)}(r||e)&&Ge()},t.onEnable=function(){ar(p,!u&&"x"),ir.addEventListener("refresh",I),pe(G,"resize",I),_.smooth&&(_.target.style.scrollBehavior="auto",_.smooth=v.smooth=!1),T.enable()},t.onDisable=function(){ar(p,!0),me(G,"resize",I),ir.removeEventListener("refresh",I),T.kill()},t.lockAxis=!1!==t.lockAxis,(e=new $(t)).iOS=pt,pt&&!_()&&_(1),pt&&U.ticker.add(zt),l=e._dc,o=U.to(e,{ease:"power4",paused:!0,inherit:!1,scrollX:u?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:er(_,_(),(function(){return o.pause()}))},onUpdate:Ge,onComplete:l.vars.onComplete}),e};ir.sort=function(t){if(Ht(t))return Ee.sort(t);var e=G.pageYOffset||0;return ir.getAll().forEach((function(t){return t._sortY=t.trigger?e+t.trigger.getBoundingClientRect().top:t.start+G.innerHeight})),Ee.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+(t.vars.containerAnimation?1e6:t._sortY)-((e.vars.containerAnimation?1e6:e._sortY)+-1e6*(e.vars.refreshPriority||0))})},ir.observe=function(t){return new $(t)},ir.normalizeScroll=function(t){if(void 0===t)return ut;if(!0===t&&ut)return ut.enable();if(!1===t)return ut&&ut.kill(),void(ut=t);var e=t instanceof $?t:dr(t);return ut&&ut.target===e.target&&ut.kill(),Nt(e.target)&&(ut=e),e},ir.core={_getVelocityProp:z,_inputObserver:ur,_scrollers:b,_proxies:x,bridge:{ss:function(){Mt||Pe("scrollStart"),Mt=Ot()},ref:function(){return tt}}},Ft()&&U.registerPlugin(ir)},9521:function(t,e){!function(t){"use strict";function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},x={duration:.5,overwrite:!1,delay:0},w=1e8,E=1/w,S=2*Math.PI,T=S/4,A=0,O=Math.sqrt,C=Math.cos,M=Math.sin,k=function(t){return"string"==typeof t},I=function(t){return"function"==typeof t},P=function(t){return"number"==typeof t},L=function(t){return void 0===t},R=function(t){return"object"==typeof t},D=function(t){return!1!==t},z=function(){return"undefined"!=typeof window},B=function(t){return I(t)||k(t)},j="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},F=Array.isArray,N=/random\([^)]+\)/g,$=/,\s*/g,U=/(?:-?\.?\d|\.)+/gi,V=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,G=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,q=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,H=/[+-]=-?[.\d]+/,W=/[^,'"\[\]\s]+/gi,Z=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,X={},Y={},K=function(t){return(Y=Ct(t,X))&&Hr},J=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Q=function(t,e){return!e&&console.warn(t)},tt=function(t,e){return t&&(X[t]=e)&&Y&&(Y[t]=e)||X},et=function(){return 0},rt={suppressEvents:!0,isStart:!0,kill:!1},nt={suppressEvents:!0,kill:!1},it={suppressEvents:!0},ot={},st=[],at={},lt={},ct={},ut=30,ht=[],ft="",dt=function(t){var e,r,n=t[0];if(R(n)||I(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(r=ht.length;r--&&!ht[r].targetTest(n););e=ht[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new rr(t[r],e)))||t.splice(r,1);return t},pt=function(t){return t._gsap||dt(he(t))[0]._gsap},mt=function(t,e,r){return(r=t[e])&&I(r)?t[e]():L(r)&&t.getAttribute&&t.getAttribute(e)||r},gt=function(t,e){return(t=t.split(",")).forEach(e)||t},yt=function(t){return Math.round(1e5*t)/1e5||0},_t=function(t){return Math.round(1e7*t)/1e7||0},vt=function(t,e){var r=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+n:"-"===r?t-n:"*"===r?t*n:t/n},bt=function(t,e){for(var r=e.length,n=0;t.indexOf(e[n])<0&&++n<r;);return n<r},xt=function(){var t,e,r=st.length,n=st.slice(0);for(at={},st.length=0,t=0;t<r;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},wt=function(t){return!!(t._initted||t._startAt||t.add)},Et=function(t,e,r,n){st.length&&!i&&xt(),t.render(e,r,n||!!(i&&e<0&&wt(t))),st.length&&!i&&xt()},St=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(W).length<2?e:k(t)?t.trim():t},Tt=function(t){return t},At=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},Ot=function(t){return function(e,r){for(var n in r)n in e||"duration"===n&&t||"ease"===n||(e[n]=r[n])}},Ct=function(t,e){for(var r in e)t[r]=e[r];return t},Mt=function t(e,r){for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=R(r[n])?t(e[n]||(e[n]={}),r[n]):r[n]);return e},kt=function(t,e){var r,n={};for(r in t)r in e||(n[r]=t[r]);return n},It=function(t){var e=t.parent||s,r=t.keyframes?Ot(F(t.keyframes)):At;if(D(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t},Pt=function(t,e){for(var r=t.length,n=r===e.length;n&&r--&&t[r]===e[r];);return r<0},Lt=function(t,e,r,n,i){void 0===r&&(r="_first"),void 0===n&&(n="_last");var o,s=t[n];if(i)for(o=e[i];s&&s[i]>o;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[n]=e,e._prev=s,e.parent=e._dp=t,e},Rt=function(t,e,r,n){void 0===r&&(r="_first"),void 0===n&&(n="_last");var i=e._prev,o=e._next;i?i._next=o:t[r]===e&&(t[r]=o),o?o._prev=i:t[n]===e&&(t[n]=i),e._next=e._prev=e.parent=null},Dt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},zt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},Bt=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},jt=function(t,e,r,n){return t._startAt&&(i?t._startAt.revert(nt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},Ft=function t(e){return!e||e._ts&&t(e.parent)},Nt=function(t){return t._repeat?$t(t._tTime,t=t.duration()+t._rDelay)*t:0},$t=function(t,e){var r=Math.floor(t=_t(t/e));return t&&r===t?r-1:r},Ut=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Vt=function(t){return t._end=_t(t._start+(t._tDur/Math.abs(t._ts||t._rts||E)||0))},Gt=function(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=_t(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Vt(t),r._dirty||zt(r,t)),t},qt=function(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ut(t.rawTime(),e),(!e._dur||oe(0,e.totalDuration(),r)-e._tTime>E)&&e.render(r,!0)),zt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-E}},Ht=function(t,e,r,n){return e.parent&&Dt(e),e._start=_t((P(r)?r:r||t!==s?re(t,r,e):t._time)+e._delay),e._end=_t(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Lt(t,e,"_first","_last",t._sort?"_start":0),Yt(e)||(t._recent=e),n||qt(t,e),t._ts<0&&Gt(t,t._tTime),t},Wt=function(t,e){return(X.ScrollTrigger||J("scrollTrigger",e))&&X.ScrollTrigger.create(e,t)},Zt=function(t,e,r,n,o){return hr(t,e,o),t._initted?!r&&t._pt&&!i&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&h!==$e.frame?(st.push(t),t._lazy=[o,n],1):void 0:1},Xt=function t(e){var r=e.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||t(r))},Yt=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},Kt=function(t,e,r,n){var o,s,a,l=t.ratio,c=e<0||!e&&(!t._start&&Xt(t)&&(t._initted||!Yt(t))||(t._ts<0||t._dp._ts<0)&&!Yt(t))?0:1,u=t._rDelay,h=0;if(u&&t._repeat&&(h=oe(0,t._tDur,e),s=$t(h,u),t._yoyo&&1&s&&(c=1-c),s!==$t(t._tTime,u)&&(l=1-c,t.vars.repeatRefresh&&t._initted&&t.invalidate())),c!==l||i||n||t._zTime===E||!e&&t._zTime){if(!t._initted&&Zt(t,e,n,r,h))return;for(a=t._zTime,t._zTime=e||(r?E:0),r||(r=e&&!a),t.ratio=c,t._from&&(c=1-c),t._time=0,t._tTime=h,o=t._pt;o;)o.r(c,o.d),o=o._next;e<0&&jt(t,e,r,!0),t._onUpdate&&!r&&Ce(t,"onUpdate"),h&&t._repeat&&!r&&t.parent&&Ce(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===c&&(c&&Dt(t,1),r||i||(Ce(t,c?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},Jt=function(t,e,r){var n;if(r>e)for(n=t._first;n&&n._start<=r;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=r;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}},Qt=function(t,e,r,n){var i=t._repeat,o=_t(e)||0,s=t._tTime/t._tDur;return s&&!n&&(t._time*=o/t._dur),t._dur=o,t._tDur=i?i<0?1e10:_t(o*(i+1)+t._rDelay*i):o,s>0&&!n&&Gt(t,t._tTime=t._tDur*s),t.parent&&Vt(t),r||zt(t.parent,t),t},te=function(t){return t instanceof ir?zt(t):Qt(t,t._dur)},ee={_start:0,endTime:et,totalDuration:et},re=function t(e,r,n){var i,o,s,a=e.labels,l=e._recent||ee,c=e.duration()>=w?l.endTime(!1):e._dur;return k(r)&&(isNaN(r)||r in a)?(o=r.charAt(0),s="%"===r.substr(-1),i=r.indexOf("="),"<"===o||">"===o?(i>=0&&(r=r.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(r.substr(1))||0)*(s?(i<0?l:n).totalDuration()/100:1)):i<0?(r in a||(a[r]=c),a[r]):(o=parseFloat(r.charAt(i-1)+r.substr(i+1)),s&&n&&(o=o/100*(F(n)?n[0]:n).totalDuration()),i>1?t(e,r.substr(0,i-1),n)+o:c+o)):null==r?c:+r},ne=function(t,e,r){var n,i,o=P(e[1]),s=(o?2:1)+(t<2?0:1),a=e[s];if(o&&(a.duration=e[1]),a.parent=r,t){for(n=a,i=r;i&&!("immediateRender"in n);)n=i.vars.defaults||{},i=D(i.vars.inherit)&&i.parent;a.immediateRender=D(n.immediateRender),t<2?a.runBackwards=1:a.startAt=e[s-1]}return new _r(e[0],a,e[s+1])},ie=function(t,e){return t||0===t?e(t):e},oe=function(t,e,r){return r<t?t:r>e?e:r},se=function(t,e){return k(t)&&(e=Z.exec(t))?e[1]:""},ae=function(t,e,r){return ie(r,(function(r){return oe(t,e,r)}))},le=[].slice,ce=function(t,e){return t&&R(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&R(t[0]))&&!t.nodeType&&t!==a},ue=function(t,e,r){return void 0===r&&(r=[]),t.forEach((function(t){var n;return k(t)&&!e||ce(t,1)?(n=r).push.apply(n,he(t)):r.push(t)}))||r},he=function(t,e,r){return o&&!e&&o.selector?o.selector(t):!k(t)||r||!l&&Ue()?F(t)?ue(t,r):ce(t)?le.call(t,0):t?[t]:[]:le.call((e||c).querySelectorAll(t),0)},fe=function(t){return t=he(t)[0]||Q("Invalid scope")||{},function(e){var r=t.current||t.nativeElement||t;return he(e,r.querySelectorAll?r:r===t?Q("Invalid scope")||c.createElement("div"):t)}},de=function(t){return t.sort((function(){return.5-Math.random()}))},pe=function(t){if(I(t))return t;var e=R(t)?t:{each:t},r=Ke(e.ease),n=e.from||0,i=parseFloat(e.base)||0,o={},s=n>0&&n<1,a=isNaN(n)||s,l=e.axis,c=n,u=n;return k(n)?c=u={center:.5,edges:.5,end:1}[n]||0:!s&&a&&(c=n[0],u=n[1]),function(t,s,h){var f,d,p,m,g,y,_,v,b,x=(h||e).length,E=o[x];if(!E){if(!(b="auto"===e.grid?0:(e.grid||[1,w])[1])){for(_=-w;_<(_=h[b++].getBoundingClientRect().left)&&b<x;);b<x&&b--}for(E=o[x]=[],f=a?Math.min(b,x)*c-.5:n%b,d=b===w?0:a?x*u/b-.5:n/b|0,_=0,v=w,y=0;y<x;y++)p=y%b-f,m=d-(y/b|0),E[y]=g=l?Math.abs("y"===l?m:p):O(p*p+m*m),g>_&&(_=g),g<v&&(v=g);"random"===n&&de(E),E.max=_-v,E.min=v,E.v=x=(parseFloat(e.amount)||parseFloat(e.each)*(b>x?x-1:l?"y"===l?x/b:b:Math.max(b,x/b))||0)*("edges"===n?-1:1),E.b=x<0?i-x:i,E.u=se(e.amount||e.each)||0,r=r&&x<0?Xe(r):r}return x=(E[t]-E.min)/E.max||0,_t(E.b+(r?r(x):x)*E.v)+E.u}},me=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var n=_t(Math.round(parseFloat(r)/t)*t*e);return(n-n%1)/e+(P(r)?0:se(r))}},ge=function(t,e){var r,n,i=F(t);return!i&&R(t)&&(r=i=t.radius||w,t.values?(t=he(t.values),(n=!P(t[0]))&&(r*=r)):t=me(t.increment)),ie(e,i?I(t)?function(e){return n=t(e),Math.abs(n-e)<=r?n:e}:function(e){for(var i,o,s=parseFloat(n?e.x:e),a=parseFloat(n?e.y:0),l=w,c=0,u=t.length;u--;)(i=n?(i=t[u].x-s)*i+(o=t[u].y-a)*o:Math.abs(t[u]-s))<l&&(l=i,c=u);return c=!r||l<=r?t[c]:e,n||c===e||P(e)?c:c+se(e)}:me(t))},ye=function(t,e,r,n){return ie(F(t)?!e:!0===r?!!(r=0):!n,(function(){return F(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*n)/n}))},_e=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},ve=function(t,e){return function(r){return t(parseFloat(r))+(e||se(r))}},be=function(t,e,r){return Te(t,e,0,1,r)},xe=function(t,e,r){return ie(r,(function(r){return t[~~e(r)]}))},we=function t(e,r,n){var i=r-e;return F(e)?xe(e,t(0,e.length),r):ie(n,(function(t){return(i+(t-e)%i)%i+e}))},Ee=function t(e,r,n){var i=r-e,o=2*i;return F(e)?xe(e,t(0,e.length-1),r):ie(n,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},Se=function(t){return t.replace(N,(function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split($);return ye(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)}))},Te=function(t,e,r,n,i){var o=e-t,s=n-r;return ie(i,(function(e){return r+((e-t)/o*s||0)}))},Ae=function t(e,r,n,i){var o=isNaN(e+r)?0:function(t){return(1-t)*e+t*r};if(!o){var s,a,l,c,u,h=k(e),f={};if(!0===n&&(i=1)&&(n=null),h)e={p:e},r={p:r};else if(F(e)&&!F(r)){for(l=[],c=e.length,u=c-2,a=1;a<c;a++)l.push(t(e[a-1],e[a]));c--,o=function(t){t*=c;var e=Math.min(u,~~t);return l[e](t-e)},n=r}else i||(e=Ct(F(e)?[]:{},e));if(!l){for(s in r)lr.call(f,e,s,"get",r[s]);o=function(t){return Or(t,f)||(h?e.p:e)}}}return ie(n,o)},Oe=function(t,e,r){var n,i,o,s=t.labels,a=w;for(n in s)(i=s[n]-e)<0==!!r&&i&&a>(i=Math.abs(i))&&(o=n,a=i);return o},Ce=function(t,e,r){var n,i,s,a=t.vars,l=a[e],c=o,u=t._ctx;if(l)return n=a[e+"Params"],i=a.callbackScope||t,r&&st.length&&xt(),u&&(o=u),s=n?l.apply(i,n):l.call(i),o=c,s},Me=function(t){return Dt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!i),t.progress()<1&&Ce(t,"onInterrupt"),t},ke=[],Ie=function(t){if(t)if(t=!t.name&&t.default||t,z()||t.headless){var e=t.name,r=I(t),n=e&&!r&&t.init?function(){this._props=[]}:t,i={init:et,render:Or,add:lr,kill:Mr,modifier:Cr,rawVars:0},o={targetTest:0,get:0,getSetter:Er,aliases:{},register:0};if(Ue(),t!==n){if(lt[e])return;At(n,At(kt(t,i),o)),Ct(n.prototype,Ct(i,kt(t,o))),lt[n.prop=e]=n,t.targetTest&&(ht.push(n),ot[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}tt(e,n),t.register&&t.register(Hr,n,Pr)}else ke.push(t)},Pe=255,Le={aqua:[0,Pe,Pe],lime:[0,Pe,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Pe],navy:[0,0,128],white:[Pe,Pe,Pe],olive:[128,128,0],yellow:[Pe,Pe,0],orange:[Pe,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Pe,0,0],pink:[Pe,192,203],cyan:[0,Pe,Pe],transparent:[Pe,Pe,Pe,0]},Re=function(t,e,r){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*Pe+.5|0},De=function(t,e,r){var n,i,o,s,a,l,c,u,h,f,d=t?P(t)?[t>>16,t>>8&Pe,t&Pe]:0:Le.black;if(!d){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Le[t])d=Le[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),i=t.charAt(2),o=t.charAt(3),t="#"+n+n+i+i+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(d=parseInt(t.substr(1,6),16))>>16,d>>8&Pe,d&Pe,parseInt(t.substr(7),16)/255];d=[(t=parseInt(t.substr(1),16))>>16,t>>8&Pe,t&Pe]}else if("hsl"===t.substr(0,3))if(d=f=t.match(U),e){if(~t.indexOf("="))return d=t.match(V),r&&d.length<4&&(d[3]=1),d}else s=+d[0]%360/360,a=+d[1]/100,n=2*(l=+d[2]/100)-(i=l<=.5?l*(a+1):l+a-l*a),d.length>3&&(d[3]*=1),d[0]=Re(s+1/3,n,i),d[1]=Re(s,n,i),d[2]=Re(s-1/3,n,i);else d=t.match(U)||Le.transparent;d=d.map(Number)}return e&&!f&&(n=d[0]/Pe,i=d[1]/Pe,o=d[2]/Pe,l=((c=Math.max(n,i,o))+(u=Math.min(n,i,o)))/2,c===u?s=a=0:(h=c-u,a=l>.5?h/(2-c-u):h/(c+u),s=c===n?(i-o)/h+(i<o?6:0):c===i?(o-n)/h+2:(n-i)/h+4,s*=60),d[0]=~~(s+.5),d[1]=~~(100*a+.5),d[2]=~~(100*l+.5)),r&&d.length<4&&(d[3]=1),d},ze=function(t){var e=[],r=[],n=-1;return t.split(je).forEach((function(t){var i=t.match(G)||[];e.push.apply(e,i),r.push(n+=i.length+1)})),e.c=r,e},Be=function(t,e,r){var n,i,o,s,a="",l=(t+a).match(je),c=e?"hsla(":"rgba(",u=0;if(!l)return t;if(l=l.map((function(t){return(t=De(t,e,1))&&c+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),r&&(o=ze(t),(n=r.c).join(a)!==o.c.join(a)))for(s=(i=t.replace(je,"1").split(G)).length-1;u<s;u++)a+=i[u]+(~n.indexOf(u)?l.shift()||c+"0,0,0,0)":(o.length?o:l.length?l:r).shift());if(!i)for(s=(i=t.split(je)).length-1;u<s;u++)a+=i[u]+l[u];return a+i[s]},je=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Le)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Fe=/hsl[a]?\(/,Ne=function(t){var e,r=t.join(" ");if(je.lastIndex=0,je.test(r))return e=Fe.test(r),t[1]=Be(t[1],e),t[0]=Be(t[0],e,ze(t[1])),!0},$e=function(){var t,e,r,n,i,o,s=Date.now,h=500,f=33,p=s(),m=p,g=1e3/240,y=g,_=[],v=function r(a){var l,c,u,d,v=s()-m,b=!0===a;if((v>h||v<0)&&(p+=v-f),((l=(u=(m+=v)-p)-y)>0||b)&&(d=++n.frame,i=u-1e3*n.time,n.time=u/=1e3,y+=l+(l>=g?4:g-l),c=1),b||(t=e(r)),c)for(o=0;o<_.length;o++)_[o](u,i,d,a)};return n={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(t){return i/(1e3/(t||60))},wake:function(){u&&(!l&&z()&&(a=l=window,c=a.document||{},X.gsap=Hr,(a.gsapVersions||(a.gsapVersions=[])).push(Hr.version),K(Y||a.GreenSockGlobals||!a.gsap&&a||{}),ke.forEach(Ie)),r="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=r||function(t){return setTimeout(t,y-1e3*n.time+1|0)},d=1,v(2))},sleep:function(){(r?cancelAnimationFrame:clearTimeout)(t),d=0,e=et},lagSmoothing:function(t,e){h=t||1/0,f=Math.min(e||33,h)},fps:function(t){g=1e3/(t||240),y=1e3*n.time+g},add:function(t,e,r){var i=e?function(e,r,o,s){t(e,r,o,s),n.remove(i)}:t;return n.remove(t),_[r?"unshift":"push"](i),Ue(),i},remove:function(t,e){~(e=_.indexOf(t))&&_.splice(e,1)&&o>=e&&o--},_listeners:_}}(),Ue=function(){return!d&&$e.wake()},Ve={},Ge=/^[\d.\-M][\d.\-,\s]/,qe=/["']/g,He=function(t){for(var e,r,n,i={},o=t.substr(1,t.length-3).split(":"),s=o[0],a=1,l=o.length;a<l;a++)r=o[a],e=a!==l-1?r.lastIndexOf(","):r.length,n=r.substr(0,e),i[s]=isNaN(n)?n.replace(qe,"").trim():+n,s=r.substr(e+1).trim();return i},We=function(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),n=t.indexOf("(",e);return t.substring(e,~n&&n<r?t.indexOf(")",r+1):r)},Ze=function(t){var e=(t+"").split("("),r=Ve[e[0]];return r&&e.length>1&&r.config?r.config.apply(null,~t.indexOf("{")?[He(e[1])]:We(t).split(",").map(St)):Ve._CE&&Ge.test(t)?Ve._CE("",t):r},Xe=function(t){return function(e){return 1-t(1-e)}},Ye=function t(e,r){for(var n,i=e._first;i;)i instanceof ir?t(i,r):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===r||(i.timeline?t(i.timeline,r):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=r)),i=i._next},Ke=function(t,e){return t&&(I(t)?t:Ve[t]||Ze(t))||e},Je=function(t,e,r,n){void 0===r&&(r=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var i,o={easeIn:e,easeOut:r,easeInOut:n};return gt(t,(function(t){for(var e in Ve[t]=X[t]=o,Ve[i=t.toLowerCase()]=r,o)Ve[i+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ve[t+"."+e]=o[e]})),o},Qe=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},tr=function t(e,r,n){var i=r>=1?r:1,o=(n||(e?.3:.45))/(r<1?r:1),s=o/S*(Math.asin(1/i)||0),a=function(t){return 1===t?1:i*Math.pow(2,-10*t)*M((t-s)*o)+1},l="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:Qe(a);return o=S/o,l.config=function(r,n){return t(e,r,n)},l},er=function t(e,r){void 0===r&&(r=1.70158);var n=function(t){return t?--t*t*((r+1)*t+r)+1:0},i="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:Qe(n);return i.config=function(r){return t(e,r)},i};gt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var r=e<5?e+1:e;Je(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},(function(t){return 1-Math.pow(1-t,r)}),(function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2}))})),Ve.Linear.easeNone=Ve.none=Ve.Linear.easeIn,Je("Elastic",tr("in"),tr("out"),tr()),p=7.5625,y=2*(g=1/(m=2.75)),_=2.5*g,Je("Bounce",(function(t){return 1-v(1-t)}),v=function(t){return t<g?p*t*t:t<y?p*Math.pow(t-1.5/m,2)+.75:t<_?p*(t-=2.25/m)*t+.9375:p*Math.pow(t-2.625/m,2)+.984375}),Je("Expo",(function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)})),Je("Circ",(function(t){return-(O(1-t*t)-1)})),Je("Sine",(function(t){return 1===t?1:1-C(t*T)})),Je("Back",er("in"),er("out"),er()),Ve.SteppedEase=Ve.steps=X.SteppedEase={config:function(t,e){void 0===t&&(t=1);var r=1/t,n=t+(e?0:1),i=e?1:0,o=1-E;return function(t){return((n*oe(0,o,t)|0)+i)*r}}},x.ease=Ve["quad.out"],gt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return ft+=t+","+t+"Params,"}));var rr=function(t,e){this.id=A++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:mt,this.set=e?e.getSetter:Er},nr=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Qt(this,+t.duration,1,1),this.data=t.data,o&&(this._ctx=o,o.data.push(this)),d||$e.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,Qt(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Ue(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Gt(this,t),!r._dp||r.parent||qt(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Ht(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===E||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Et(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Nt(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Nt(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?$t(this._tTime,r)+1:1},e.timeScale=function(t,e){if(!arguments.length)return this._rts===-E?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ut(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-E?0:this._rts,this.totalTime(oe(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Vt(this),Bt(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ue(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==E&&(this._tTime-=E)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=_t(t);var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Ht(e,this,this._start-this._delay),this}return this._start},e.endTime=function(t){return this._start+(D(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ut(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=it);var e=i;return i=t,wt(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),i=e,this},e.globalTime=function(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,te(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,te(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(re(this,t),D(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,D(e)),this._dur||(this._zTime=-E),this},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-E:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-E,this},e.isActive=function(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-E))},e.eventCallback=function(t,e,r){var n=this.vars;return arguments.length>1?(e?(n[t]=e,r&&(n[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this,r=e._prom;return new Promise((function(n){var i=I(t)?t:Tt,o=function(){var t=e.then;e.then=null,r&&r(),I(i)&&(i=i(e))&&(i.then||i===e)&&(e.then=t),n(i),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?o():e._prom=o}))},e.kill=function(){Me(this)},t}();At(nr.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-E,_prom:0,_ps:!1,_rts:1});var ir=function(t){function n(e,n){var i;return void 0===e&&(e={}),(i=t.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=D(e.sortChildren),s&&Ht(e.parent||s,r(i),n),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&Wt(r(i),e.scrollTrigger),i}e(n,t);var o=n.prototype;return o.to=function(t,e,r){return ne(0,arguments,this),this},o.from=function(t,e,r){return ne(1,arguments,this),this},o.fromTo=function(t,e,r,n){return ne(2,arguments,this),this},o.set=function(t,e,r){return e.duration=0,e.parent=this,It(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new _r(t,e,re(this,r),1),this},o.call=function(t,e,r){return Ht(this,_r.delayedCall(0,t,e),r)},o.staggerTo=function(t,e,r,n,i,o,s){return r.duration=e,r.stagger=r.stagger||n,r.onComplete=o,r.onCompleteParams=s,r.parent=this,new _r(t,r,re(this,i)),this},o.staggerFrom=function(t,e,r,n,i,o,s){return r.runBackwards=1,It(r).immediateRender=D(r.immediateRender),this.staggerTo(t,e,r,n,i,o,s)},o.staggerFromTo=function(t,e,r,n,i,o,s,a){return n.startAt=r,It(n).immediateRender=D(n.immediateRender),this.staggerTo(t,e,n,i,o,s,a)},o.render=function(t,e,r){var n,o,a,l,c,u,h,f,d,p,m,g,y=this._time,_=this._dirty?this.totalDuration():this._tDur,v=this._dur,b=t<=0?0:_t(t),x=this._zTime<0!=t<0&&(this._initted||!v);if(this!==s&&b>_&&t>=0&&(b=_),b!==this._tTime||r||x){if(y!==this._time&&v&&(b+=this._time-y,t+=this._time-y),n=b,d=this._start,u=!(f=this._ts),x&&(v||(y=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(m=this._yoyo,c=v+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*c+t,e,r);if(n=_t(b%c),b===_?(l=this._repeat,n=v):((l=~~(p=_t(b/c)))&&l===p&&(n=v,l--),n>v&&(n=v)),p=$t(this._tTime,c),!y&&this._tTime&&p!==l&&this._tTime-p*c-this._dur<=0&&(p=l),m&&1&l&&(n=v-n,g=1),l!==p&&!this._lock){var w=m&&1&p,S=w===(m&&1&l);if(l<p&&(w=!w),y=w?0:b%v?v:b,this._lock=1,this.render(y||(g?0:_t(l*c)),e,!v)._lock=0,this._tTime=b,!e&&this.parent&&Ce(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1,p=l),y&&y!==this._time||u!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,_=this._tDur,S&&(this._lock=2,y=w?v:-1e-4,this.render(y,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Ye(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=Jt(this,_t(y),_t(n)))&&(b-=n-(n=h._start)),this._tTime=b,this._time=n,this._act=!f,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,y=0),!y&&b&&v&&!e&&!p&&(Ce(this,"onStart"),this._tTime!==b))return this;if(n>=y&&t>=0)for(o=this._first;o;){if(a=o._next,(o._act||n>=o._start)&&o._ts&&h!==o){if(o.parent!==this)return this.render(t,e,r);if(o.render(o._ts>0?(n-o._start)*o._ts:(o._dirty?o.totalDuration():o._tDur)+(n-o._start)*o._ts,e,r),n!==this._time||!this._ts&&!u){h=0,a&&(b+=this._zTime=-E);break}}o=a}else{o=this._last;for(var T=t<0?t:n;o;){if(a=o._prev,(o._act||T<=o._end)&&o._ts&&h!==o){if(o.parent!==this)return this.render(t,e,r);if(o.render(o._ts>0?(T-o._start)*o._ts:(o._dirty?o.totalDuration():o._tDur)+(T-o._start)*o._ts,e,r||i&&wt(o)),n!==this._time||!this._ts&&!u){h=0,a&&(b+=this._zTime=T?-E:E);break}}o=a}}if(h&&!e&&(this.pause(),h.render(n>=y?0:-E)._zTime=n>=y?1:-1,this._ts))return this._start=d,Vt(this),this.render(t,e,r);this._onUpdate&&!e&&Ce(this,"onUpdate",!0),(b===_&&this._tTime>=this.totalDuration()||!b&&y)&&(d!==this._start&&Math.abs(f)===Math.abs(this._ts
vendor: 4,482 bytes, line 2
2)||this._lock||((t||!v)&&(b===_&&this._ts>0||!b&&this._ts<0)&&Dt(this,1),e||t<0&&!y||!b&&!y&&_||(Ce(this,b===_&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(b<_&&this.timeScale()>0)&&this._prom())))}return this},o.add=function(t,e){var r=this;if(P(e)||(e=re(this,e,t)),!(t instanceof nr)){if(F(t))return t.forEach((function(t){return r.add(t,e)})),this;if(k(t))return this.addLabel(t,e);if(!I(t))return this;t=_r.delayedCall(0,t)}return this!==t?Ht(this,t,e):this},o.getChildren=function(t,e,r,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=-w);for(var i=[],o=this._first;o;)o._start>=n&&(o instanceof _r?e&&i.push(o):(r&&i.push(o),t&&i.push.apply(i,o.getChildren(!0,e,r)))),o=o._next;return i},o.getById=function(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},o.remove=function(t){return k(t)?this.removeLabel(t):I(t)?this.killTweensOf(t):(t.parent===this&&Rt(this,t),t===this._recent&&(this._recent=this._last),zt(this))},o.totalTime=function(e,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_t($e.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,r),this._forcing=0,this):this._tTime},o.addLabel=function(t,e){return this.labels[t]=re(this,e),this},o.removeLabel=function(t){return delete this.labels[t],this},o.addPause=function(t,e,r){var n=_r.delayedCall(0,e||et,r);return n.data="isPause",this._hasPause=1,Ht(this,n,re(this,t))},o.removePause=function(t){var e=this._first;for(t=re(this,t);e;)e._start===t&&"isPause"===e.data&&Dt(e),e=e._next},o.killTweensOf=function(t,e,r){for(var n=this.getTweensOf(t,r),i=n.length;i--;)or!==n[i]&&n[i].kill(t,e);return this},o.getTweensOf=function(t,e){for(var r,n=[],i=he(t),o=this._first,s=P(e);o;)o instanceof _r?bt(o._targets,i)&&(s?(!or||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&n.push(o):(r=o.getTweensOf(i,e)).length&&n.push.apply(n,r),o=o._next;return n},o.tweenTo=function(t,e){e=e||{};var r,n=this,i=re(n,t),o=e,s=o.startAt,a=o.onStart,l=o.onStartParams,c=o.immediateRender,u=_r.to(n,At({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:e.duration||Math.abs((i-(s&&"time"in s?s.time:n._time))/n.timeScale())||E,onStart:function(){if(n.pause(),!r){var t=e.duration||Math.abs((i-(s&&"time"in s?s.time:n._time))/n.timeScale());u._dur!==t&&Qt(u,t,0,1).render(u._time,!0,!0),r=1}a&&a.apply(u,l||[])}},e));return c?u.render(0):u},o.tweenFromTo=function(t,e,r){return this.tweenTo(e,At({startAt:{time:re(this,t)}},r))},o.recent=function(){return this._recent},o.nextLabel=function(t){return void 0===t&&(t=this._time),Oe(this,re(this,t))},o.previousLabel=function(t){return void 0===t&&(t=this._time),Oe(this,re(this,t),1)},o.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+E)},o.shiftChildren=function(t,e,r){void 0===r&&(r=0);var n,i=this._first,o=this.labels;for(t=_t(t);i;)i._start>=r&&(i._start+=t,i._end+=t),i=i._next;if(e)for(n in o)o[n]>=r&&(o[n]+=t);return zt(this)},o.invalidate=function(e){var r=this._first;for(this._lock=0;r;)r.invalidate(e),r=r._next;return t.prototype.invalidate.call(this,e)},o.clear=function(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),zt(this)},o.totalDuration=function(t){var e,r,n,i=0,o=this,a=o._last,l=w;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-t:t));if(o._dirty){for(n=o.parent;a;)e=a._prev,a._dirty&&a.totalDuration(),(r=a._start)>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Ht(o,a,r-a._delay,1)._lock=0):l=r,r<0&&a._ts&&(i-=r,(!n&&!o._dp||n&&n.smoothChildTiming)&&(o._start+=_t(r/o._ts),o._time-=r,o._tTime-=r),o.shiftChildren(-r,!1,-Infinity),l=0),a._end>i&&a._ts&&(i=a._end),a=e;Qt(o,o===s&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},n.updateRoot=function(t){if(s._ts&&(Et(s,Ut(t,s)),h=$e.frame),$e.frame>=ut){ut+=b.autoSleep||120;var e=s._first;if((!e||!e._ts)&&b.autoSleep&&$e._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||$e.sleep()}}},n}(nr);At(ir.prototype,{_lock:0,_hasPause:0,_forcing:0});var or,sr,ar=function(t,e,r,n,i,o,s){var a,l,c,u,h,f,d,p,m=new Pr(this._pt,t,e,0,1,Ar,null,i),g=0,y=0;for(m.b=r,m.e=n,r+="",(d=~(n+="").indexOf("random("))&&(n=Se(n)),o&&(o(p=[r,n],t,e),r=p[0],n=p[1]),l=r.match(q)||[];a=q.exec(n);
vendor: 24,345 bytes, line 2
2)u=a[0],h=n.substring(g,a.index),c?c=(c+1)%5:"rgba("===h.substr(-5)&&(c=1),u!==l[y++]&&(f=parseFloat(l[y-1])||0,m._pt={_next:m._pt,p:h||1===y?h:",",s:f,c:"="===u.charAt(1)?vt(f,u)-f:parseFloat(u)-f,m:c&&c<4?Math.round:0},g=q.lastIndex);return m.c=g<n.length?n.substring(g,n.length):"",m.fp=s,(H.test(n)||d)&&(m.e=0),this._pt=m,m},lr=function(t,e,r,n,i,o,s,a,l,c){I(n)&&(n=n(i||0,t,o));var u,h=t[e],f="get"!==r?r:I(h)?l?t[e.indexOf("set")||!I(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():h,d=I(h)?l?xr:br:vr;if(k(n)&&(~n.indexOf("random(")&&(n=Se(n)),"="===n.charAt(1)&&((u=vt(f,n)+(se(f)||0))||0===u)&&(n=u)),!c||f!==n||sr)return isNaN(f*n)||""===n?(!h&&!(e in t)&&J(e,n),ar.call(this,t,e,f,n,d,a||b.stringFilter,l)):(u=new Pr(this._pt,t,e,+f||0,n-(f||0),"boolean"==typeof h?Tr:Sr,0,d),l&&(u.fp=l),s&&u.modifier(s,this,t),this._pt=u)},cr=function(t,e,r,n,i){if(I(t)&&(t=mr(t,i,e,r,n)),!R(t)||t.style&&t.nodeType||F(t)||j(t))return k(t)?mr(t,i,e,r,n):t;var o,s={};for(o in t)s[o]=mr(t[o],i,e,r,n);return s},ur=function(t,e,r,n,i,o){var s,a,l,c;if(lt[t]&&!1!==(s=new lt[t]).init(i,s.rawVars?e[t]:cr(e[t],n,i,o,r),r,n,o)&&(r._pt=a=new Pr(r._pt,i,t,0,1,s.render,s,0,s.priority),r!==f))for(l=r._ptLookup[r._targets.indexOf(i)],c=s._props.length;c--;)l[s._props[c]]=a;return s},hr=function t(e,r,o){var a,l,c,u,h,f,d,p,m,g,y,_,v,b=e.vars,S=b.ease,T=b.startAt,A=b.immediateRender,O=b.lazy,C=b.onUpdate,M=b.runBackwards,k=b.yoyoEase,I=b.keyframes,P=b.autoRevert,L=e._dur,R=e._startAt,z=e._targets,B=e.parent,j=B&&"nested"===B.data?B.vars.targets:z,F="auto"===e._overwrite&&!n,N=e.timeline;if(N&&(!I||!S)&&(S="none"),e._ease=Ke(S,x.ease),e._yEase=k?Xe(Ke(!0===k?S:k,x.ease)):0,k&&e._yoyo&&!e._repeat&&(k=e._yEase,e._yEase=e._ease,e._ease=k),e._from=!N&&!!b.runBackwards,!N||I&&!b.stagger){if(_=(p=z[0]?pt(z[0]).harness:0)&&b[p.prop],a=kt(b,ot),R&&(R._zTime<0&&R.progress(1),r<0&&M&&A&&!P?R.render(-1,!0):R.revert(M&&L?nt:rt),R._lazy=0),T){if(Dt(e._startAt=_r.set(z,At({data:"isStart",overwrite:!1,parent:B,immediateRender:!0,lazy:!R&&D(O),startAt:null,delay:0,onUpdate:C&&function(){return Ce(e,"onUpdate")},stagger:0},T))),e._startAt._dp=0,e._startAt._sat=e,r<0&&(i||!A&&!P)&&e._startAt.revert(nt),A&&L&&r<=0&&o<=0)return void(r&&(e._zTime=r))}else if(M&&L&&!R)if(r&&(A=!1),c=At({overwrite:!1,data:"isFromStart",lazy:A&&!R&&D(O),immediateRender:A,stagger:0,parent:B},a),_&&(c[p.prop]=_),Dt(e._startAt=_r.set(z,c)),e._startAt._dp=0,e._startAt._sat=e,r<0&&(i?e._startAt.revert(nt):e._startAt.render(-1,!0)),e._zTime=r,A){if(!r)return}else t(e._startAt,E,E);for(e._pt=e._ptCache=0,O=L&&D(O)||O&&!L,l=0;l<z.length;l++){if(d=(h=z[l])._gsap||dt(z)[l]._gsap,e._ptLookup[l]=g={},at[d.id]&&st.length&&xt(),y=j===z?l:j.indexOf(h),p&&!1!==(m=new p).init(h,_||a,e,y,j)&&(e._pt=u=new Pr(e._pt,h,m.name,0,1,m.render,m,0,m.priority),m._props.forEach((function(t){g[t]=u})),m.priority&&(f=1)),!p||_)for(c in a)lt[c]&&(m=ur(c,a,e,y,h,j))?m.priority&&(f=1):g[c]=u=lr.call(e,h,c,"get",a[c],y,j,0,b.stringFilter);e._op&&e._op[l]&&e.kill(h,e._op[l]),F&&e._pt&&(or=e,s.killTweensOf(h,g,e.globalTime(r)),v=!e.parent,or=0),e._pt&&O&&(at[d.id]=1)}f&&Ir(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!v,I&&r<=0&&N.render(w,!0,!0)},fr=function(t,e,r,n,i,o,s,a){var l,c,u,h,f=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!f)for(f=t._ptCache[e]=[],u=t._ptLookup,h=t._targets.length;h--;){if((l=u[h][e])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==e&&l.fp!==e;)l=l._next;if(!l)return sr=1,t.vars[e]="+=0",hr(t,s),sr=0,a?Q(e+" not eligible for reset"):1;f.push(l)}for(h=f.length;h--;)(l=(c=f[h])._pt||c).s=!n&&0!==n||i?l.s+(n||0)+o*l.c:n,l.c=r-l.s,c.e&&(c.e=yt(r)+se(c.e)),c.b&&(c.b=l.s+se(c.b))},dr=function(t,e){var r,n,i,o,s=t[0]?pt(t[0]).harness:0,a=s&&s.aliases;if(!a)return e;for(n in r=Ct({},e),a)if(n in r)for(i=(o=a[n].split(",")).length;i--;)r[o[i]]=r[n];return r},pr=function(t,e,r,n){var i,o,s=e.ease||n||"power1.inOut";if(F(e))o=r[t]||(r[t]=[]),e.forEach((function(t,r){return o.push({t:r/(e.length-1)*100,v:t,e:s})}));else for(i in e)o=r[i]||(r[i]=[]),"ease"===i||o.push({t:parseFloat(t),v:e[i],e:s})},mr=function(t,e,r,n,i){return I(t)?t.call(e,r,n,i):k(t)&&~t.indexOf("random(")?Se(t):t},gr=ft+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",yr={};gt(gr+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return yr[t]=1}));var _r=function(t){function o(e,i,o,a){var l;"number"==typeof i&&(o.duration=i,i=o,o=null);var c,u,h,f,d,p,m,g,y=(l=t.call(this,a?i:It(i))||this).vars,_=y.duration,v=y.delay,x=y.immediateRender,w=y.stagger,S=y.overwrite,T=y.keyframes,A=y.defaults,O=y.scrollTrigger,C=y.yoyoEase,M=i.parent||s,k=(F(e)||j(e)?P(e[0]):"length"in i)?[e]:he(e);if(l._targets=k.length?dt(k):Q("GSAP target "+e+" not found. https://gsap.com",!b.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=S,T||w||B(_)||B(v)){if(i=l.vars,(c=l.timeline=new ir({data:"nested",defaults:A||{},targets:M&&"nested"===M.data?M.vars.targets:k})).kill(),c.parent=c._dp=r(l),c._start=0,w||B(_)||B(v)){if(f=k.length,m=w&&pe(w),R(w))for(d in w)~gr.indexOf(d)&&(g||(g={}),g[d]=w[d]);for(u=0;u<f;u++)(h=kt(i,yr)).stagger=0,C&&(h.yoyoEase=C),g&&Ct(h,g),p=k[u],h.duration=+mr(_,r(l),u,p,k),h.delay=(+mr(v,r(l),u,p,k)||0)-l._delay,!w&&1===f&&h.delay&&(l._delay=v=h.delay,l._start+=v,h.delay=0),c.to(p,h,m?m(u,p,k):0),c._ease=Ve.none;c.duration()?_=v=0:l.timeline=0}else if(T){It(At(c.vars.defaults,{ease:"none"})),c._ease=Ke(T.ease||i.ease||"none");var I,L,z,N=0;if(F(T))T.forEach((function(t){return c.to(k,t,">")})),c.duration();else{for(d in h={},T)"ease"===d||"easeEach"===d||pr(d,T[d],h,T.easeEach);for(d in h)for(I=h[d].sort((function(t,e){return t.t-e.t})),N=0,u=0;u<I.length;u++)(z={ease:(L=I[u]).e,duration:(L.t-(u?I[u-1].t:0))/100*_})[d]=L.v,c.to(k,z,N),N+=z.duration;c.duration()<_&&c.to({},{duration:_-c.duration()})}}_||l.duration(_=c.duration())}else l.timeline=0;return!0!==S||n||(or=r(l),s.killTweensOf(k),or=0),Ht(M,r(l),o),i.reversed&&l.reverse(),i.paused&&l.paused(!0),(x||!_&&!T&&l._start===_t(M._time)&&D(x)&&Ft(r(l))&&"nested"!==M.data)&&(l._tTime=-E,l.render(Math.max(0,-v)||0)),O&&Wt(r(l),O),l}e(o,t);var a=o.prototype;return a.render=function(t,e,r){var n,i,o,s,a,l,c,u,h,f=this._time,d=this._tDur,p=this._dur,m=t<0,g=t>d-E&&!m?d:t<E?0:t;if(p){if(g!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m||this._lazy){if(n=g,u=this.timeline,this._repeat){if(s=p+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*s+t,e,r);if(n=_t(g%s),g===d?(o=this._repeat,n=p):(o=~~(a=_t(g/s)))&&o===a?(n=p,o--):n>p&&(n=p),(l=this._yoyo&&1&o)&&(h=this._yEase,n=p-n),a=$t(this._tTime,s),n===f&&!r&&this._initted&&o===a)return this._tTime=g,this;o!==a&&(u&&this._yEase&&Ye(u,l),this.vars.repeatRefresh&&!l&&!this._lock&&n!==s&&this._initted&&(this._lock=r=1,this.render(_t(s*o),!0).invalidate()._lock=0))}if(!this._initted){if(Zt(this,m?t:n,r,e,g))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&o!==a))return this;if(p!==this._dur)return this.render(t,e,r)}if(this._tTime=g,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(h||this._ease)(n/p),this._from&&(this.ratio=c=1-c),!f&&g&&!e&&!a&&(Ce(this,"onStart"),this._tTime!==g))return this;for(i=this._pt;i;)i.r(c,i.d),i=i._next;u&&u.render(t<0?t:u._dur*u._ease(n/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(m&&jt(this,t,e,r),Ce(this,"onUpdate")),this._repeat&&o!==a&&this.vars.onRepeat&&!e&&this.parent&&Ce(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(m&&!this._onUpdate&&jt(this,t,!0,!0),(t||!p)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&Dt(this,1),e||m&&!f||!(g||f||l)||(Ce(this,g===d?"onComplete":"onReverseComplete",!0),this._prom&&!(g<d&&this.timeScale()>0)&&this._prom()))}}else Kt(this,t,e,r);return this},a.targets=function(){return this._targets},a.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},a.resetTo=function(t,e,r,n,i){d||$e.wake(),this._ts||this.play();var o,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||hr(this,s),o=this._ease(s/this._dur),fr(this,t,e,r,n,o,s,i)?this.resetTo(t,e,r,n,1):(Gt(this,0),this.parent||Lt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},a.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Me(this):this.scrollTrigger&&this.scrollTrigger.kill(!!i),this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,or&&!0!==or.vars.overwrite)._first||Me(this),this.parent&&r!==this.timeline.totalDuration()&&Qt(this,this._dur*this.timeline._tDur/r,0,1),this}var n,o,s,a,l,c,u,h=this._targets,f=t?he(t):h,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&Pt(h,f))return"all"===e&&(this._pt=0),Me(this);for(n=this._op=this._op||[],"all"!==e&&(k(e)&&(l={},gt(e,(function(t){return l[t]=1})),e=l),e=dr(h,e)),u=h.length;u--;)if(~f.indexOf(h[u]))for(l in o=d[u],"all"===e?(n[u]=e,a=o,s={}):(s=n[u]=n[u]||{},a=e),a)(c=o&&o[l])&&("kill"in c.d&&!0!==c.d.kill(l)||Rt(this,c,"_pt"),delete o[l]),"all"!==s&&(s[l]=1);return this._initted&&!this._pt&&p&&Me(this),this},o.to=function(t,e){return new o(t,e,arguments[2])},o.from=function(t,e){return ne(1,arguments)},o.delayedCall=function(t,e,r,n){return new o(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:n})},o.fromTo=function(t,e,r){return ne(2,arguments)},o.set=function(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new o(t,e)},o.killTweensOf=function(t,e,r){return s.killTweensOf(t,e,r)},o}(nr);At(_r.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),gt("staggerTo,staggerFrom,staggerFromTo",(function(t){_r[t]=function(){var e=new ir,r=le.call(arguments,0);return r.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,r)}}));var vr=function(t,e,r){return t[e]=r},br=function(t,e,r){return t[e](r)},xr=function(t,e,r,n){return t[e](n.fp,r)},wr=function(t,e,r){return t.setAttribute(e,r)},Er=function(t,e){return I(t[e])?br:L(t[e])&&t.setAttribute?wr:vr},Sr=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},Tr=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Ar=function(t,e){var r=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+n,r=r._next;n+=e.c}e.set(e.t,e.p,n,e)},Or=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},Cr=function(t,e,r,n){for(var i,o=this._pt;o;)i=o._next,o.p===n&&o.modifier(t,e,r),o=i},Mr=function(t){for(var e,r,n=this._pt;n;)r=n._next,n.p===t&&!n.op||n.op===t?Rt(this,n,"_pt"):n.dep||(e=1),n=r;return!e},kr=function(t,e,r,n){n.mSet(t,e,n.m.call(n.tween,r,n.mt),n)},Ir=function(t){for(var e,r,n,i,o=t._pt;o;){for(e=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:i=o,o=e}t._pt=n},Pr=function(){function t(t,e,r,n,i,o,s,a,l){this.t=e,this.s=n,this.c=i,this.p=r,this.r=o||Sr,this.d=s||this,this.set=a||vr,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,r){this.mSet=this.mSet||this.set,this.set=kr,this.m=t,this.mt=r,this.tween=e},t}();gt(ft+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return ot[t]=1})),X.TweenMax=X.TweenLite=_r,X.TimelineLite=X.TimelineMax=ir,s=new ir({sortChildren:!1,defaults:x,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),b.stringFilter=Ne;var Lr=[],Rr={},Dr=[],zr=0,Br=0,jr=function(t){return(Rr[t]||Dr).map((function(t){return t()}))},Fr=function(){var t=Date.now(),e=[];t-zr>2&&(jr("matchMediaInit"),Lr.forEach((function(t){var r,n,i,o,s=t.queries,l=t.conditions;for(n in s)(r=a.matchMedia(s[n]).matches)&&(i=1),r!==l[n]&&(l[n]=r,o=1);o&&(t.revert(),i&&e.push(t))})),jr("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),zr=t,jr("matchMedia"))},Nr=function(){function t(t,e){this.selector=e&&fe(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Br++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,r){I(t)&&(r=e,e=t,t=I);var n=this,i=function(){var t,i=o,s=n.selector;return i&&i!==n&&i.data.push(n),r&&(n.selector=fe(r)),o=n,t=e.apply(n,arguments),I(t)&&n._r.push(t),o=i,n.selector=s,n.isReverted=!1,t};return n.last=i,t===I?i(n,(function(t){return n.add(null,t)})):t?n[t]=i:i},e.ignore=function(t){var e=o;o=null,t(this),o=e},e.getTweens=function(){var e=[];return this.data.forEach((function(r){return r instanceof t?e.push.apply(e,r.getTweens()):r instanceof _r&&!(r.parent&&"nested"===r.parent.data)&&e.push(r)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var r=this;if(t?function(){for(var e,n=r.getTweens(),i=r.data.length;i--;)"isFlip"===(e=r.data[i]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),i=r.data.length;i--;)(e=r.data[i])instanceof ir?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof _r)&&e.revert&&e.revert(t);r._r.forEach((function(e){return e(t,r)})),r.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=Lr.length;n--;)Lr[n].id===this.id&&Lr.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),$r=function(){function t(t){this.contexts=[],this.scope=t,o&&o.data.push(this)}var e=t.prototype;return e.add=function(t,e,r){R(t)||(t={matches:t});var n,i,s,l=new Nr(0,r||this.scope),c=l.conditions={};for(i in o&&!l.selector&&(l.selector=o.selector),this.contexts.push(l),e=l.add("onMatch",e),l.queries=t,t)"all"===i?s=1:(n=a.matchMedia(t[i]))&&(Lr.indexOf(l)<0&&Lr.push(l),(c[i]=n.matches)&&(s=1),n.addListener?n.addListener(Fr):n.addEventListener("change",Fr));return s&&e(l,(function(t){return l.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Ur={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach((function(t){return Ie(t)}))},timeline:function(t){return new ir(t)},getTweensOf:function(t,e){return s.getTweensOf(t,e)},getProperty:function(t,e,r,n){k(t)&&(t=he(t)[0]);var i=pt(t||{}).get,o=r?Tt:St;return"native"===r&&(r=""),t?e?o((lt[e]&&lt[e].get||i)(t,e,r,n)):function(e,r,n){return o((lt[e]&&lt[e].get||i)(t,e,r,n))}:t},quickSetter:function(t,e,r){if((t=he(t)).length>1){var n=t.map((function(t){return Hr.quickSetter(t,e,r)})),i=n.length;return function(t){for(var e=i;e--;)n[e](t)}}t=t[0]||{};var o=lt[e],s=pt(t),a=s.harness&&(s.harness.aliases||{})[e]||e,l=o?function(e){var n=new o;f._pt=0,n.init(t,r?e+r:e,f,0,[t]),n.render(1,n),f._pt&&Or(1,f)}:s.set(t,a);return o?l:function(e){return l(t,a,r?e+r:e,s,1)}},quickTo:function(t,e,r){var n,i=Hr.to(t,At(((n={})[e]="+=0.1",n.paused=!0,n.stagger=0,n),r||{})),o=function(t,r,n){return i.resetTo(e,t,r,n)};return o.tween=i,o},isTweening:function(t){return s.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Ke(t.ease,x.ease)),Mt(x,t||{})},config:function(t){return Mt(b,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,n=t.plugins,i=t.defaults,o=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!lt[t]&&!X[t]&&Q(e+" effect requires "+t+" plugin.")})),ct[e]=function(t,e,n){return r(he(t),At(e||{},i),n)},o&&(ir.prototype[e]=function(t,r,n){return this.add(ct[e](t,R(r)?r:(n=r)&&{},this),n)})},registerEase:function(t,e){Ve[t]=Ke(e)},parseEase:function(t,e){return arguments.length?Ke(t,e):Ve},getById:function(t){return s.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var r,n,i=new ir(t);for(i.smoothChildTiming=D(t.smoothChildTiming),s.remove(i),i._dp=0,i._time=i._tTime=s._time,r=s._first;r;)n=r._next,!e&&!r._dur&&r instanceof _r&&r.vars.onComplete===r._targets[0]||Ht(i,r,r._start-r._delay),r=n;return Ht(s,i,0),i},context:function(t,e){return t?new Nr(t,e):o},matchMedia:function(t){return new $r(t)},matchMediaRefresh:function(){return Lr.forEach((function(t){var e,r,n=t.conditions;for(r in n)n[r]&&(n[r]=!1,e=1);e&&t.revert()}))||Fr()},addEventListener:function(t,e){var r=Rr[t]||(Rr[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function(t,e){var r=Rr[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},utils:{wrap:we,wrapYoyo:Ee,distribute:pe,random:ye,snap:ge,normalize:be,getUnit:se,clamp:ae,splitColor:De,toArray:he,selector:fe,mapRange:Te,pipe:_e,unitize:ve,interpolate:Ae,shuffle:de},install:K,effects:ct,ticker:$e,updateRoot:ir.updateRoot,plugins:lt,globalTimeline:s,core:{PropTween:Pr,globals:tt,Tween:_r,Timeline:ir,Animation:nr,getCache:pt,_removeLinkedListItem:Rt,reverting:function(){return i},context:function(t){return t&&o&&(o.data.push(t),t._ctx=o),o},suppressOverwrites:function(t){return n=t}}};gt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Ur[t]=_r[t]})),$e.add(ir.updateRoot),f=Ur.to({},{duration:0});var Vr=function(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r},Gr=function(t,e){var r,n,i,o=t._targets;for(r in e)for(n=o.length;n--;)(i=t._ptLookup[n][r])&&(i=i.d)&&(i._pt&&(i=Vr(i,r)),i&&i.modifier&&i.modifier(e[r],t,o[n],r))},qr=function(t,e){return{name:t,headless:1,rawVars:1,init:function(t,r,n){n._onInit=function(t){var n,i;if(k(r)&&(n={},gt(r,(function(t){return n[t]=1})),r=n),e){for(i in n={},r)n[i]=e(r[i]);r=n}Gr(t,r)}}}},Hr=Ur.registerPlugin({name:"attr",init:function(t,e,r,n,i){var o,s,a;for(o in this.tween=r,e)a=t.getAttribute(o)||"",(s=this.add(t,"setAttribute",(a||0)+"",e[o],n,i,0,0,o)).op=o,s.b=a,this._props.push(o)},render:function(t,e){for(var r=e._pt;r;)i?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},qr("roundProps",me),qr("modifiers"),qr("snap",ge))||Ur;_r.version=ir.version=Hr.version="3.14.2",u=1,z()&&Ue();var Wr,Zr,Xr,Yr,Kr,Jr,Qr,tn,en=Ve.Power0,rn=Ve.Power1,nn=Ve.Power2,on=Ve.Power3,sn=Ve.Power4,an=Ve.Linear,ln=Ve.Quad,cn=Ve.Cubic,un=Ve.Quart,hn=Ve.Quint,fn=Ve.Strong,dn=Ve.Elastic,pn=Ve.Back,mn=Ve.SteppedEase,gn=Ve.Bounce,yn=Ve.Sine,_n=Ve.Expo,vn=Ve.Circ,bn=function(){return"undefined"!=typeof window},xn={},wn=180/Math.PI,En=Math.PI/180,Sn=Math.atan2,Tn=1e8,An=/([A-Z])/g,On=/(left|right|width|margin|padding|x)/i,Cn=/[\s,\(]\S/,Mn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kn=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},In=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Pn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},Ln=function(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},Rn=function(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)},Dn=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},zn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},Bn=function(t,e,r){return t.style[e]=r},jn=function(t,e,r){return t.style.setProperty(e,r)},Fn=function(t,e,r){return t._gsap[e]=r},Nn=function(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r},$n=function(t,e,r,n,i){var o=t._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},Un=function(t,e,r,n,i){var o=t._gsap;o[e]=r,o.renderTransform(i,o)},Vn="transform",Gn=Vn+"Origin",qn=function t(e,r){var n=this,i=this.target,o=i.style,s=i._gsap;if(e in xn&&o){if(this.tfm=this.tfm||{},"transform"===e)return Mn.transform.split(",").forEach((function(e){return t.call(n,e,r)}));if(~(e=Mn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=ci(i,t)})):this.tfm[e]=s.x?s[e]:ci(i,e),e===Gn&&(this.tfm.zOrigin=s.zOrigin),this.props.indexOf(Vn)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Gn,r,"")),e=Vn}(o||r)&&this.props.push(e,r,o[e])},Hn=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},Wn=function(){var t,e,r=this.props,n=this.target,i=n.style,o=n._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?n[r[t]](r[t+2]):n[r[t]]=r[t+2]:r[t+2]?i[r[t]]=r[t+2]:i.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(An,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)o[e]=this.tfm[e];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(t=Qr())&&t.isStart||i[Vn]||(Hn(i),o.zOrigin&&i[Gn]&&(i[Gn]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},Zn=function(t,e){var r={target:t,props:[],revert:Wn,save:qn};return t._gsap||Hr.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach((function(t){return r.save(t)})),r},Xn=function(t,e){var r=Zr.createElementNS?Zr.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Zr.createElement(t);return r&&r.style?r:Zr.createElement(t)},Yn=function t(e,r,n){var i=getComputedStyle(e);return i[r]||i.getPropertyValue(r.replace(An,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&t(e,Jn(r)||r,1)||""},Kn="O,Moz,ms,Ms,Webkit".split(","),Jn=function(t,e,r){var n=(e||Kr).style,i=5;if(t in n&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);i--&&!(Kn[i]+t in n););return i<0?null:(3===i?"ms":i>=0?Kn[i]:"")+t},Qn=function(){bn()&&window.document&&(Wr=window,Zr=Wr.document,Xr=Zr.documentElement,Kr=Xn("div")||{style:{}},Xn("div"),Vn=Jn(Vn),Gn=Vn+"Origin",Kr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",tn=!!Jn("perspective"),Qr=Hr.core.reverting,Yr=1)},ti=function(t){var e,r=t.ownerSVGElement,n=Xn("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=t.cloneNode(!0);i.style.display="block",n.appendChild(i),Xr.appendChild(n);try{e=i.getBBox()}catch(t){}return n.removeChild(i),Xr.removeChild(n),e},ei=function(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])},ri=function(t){var e,r;try{e=t.getBBox()}catch(n){e=ti(t),r=1}return e&&(e.width||e.height)||r||(e=ti(t)),!e||e.width||e.x||e.y?e:{x:+ei(t,["x","cx","x1"])||0,y:+ei(t,["y","cy","y1"])||0,width:0,height:0}},ni=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!ri(t))},ii=function(t,e){if(e){var r,n=t.style;e in xn&&e!==Gn&&(e=Vn),n.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty("--"===r?e:e.replace(An,"-$1").toLowerCase())):n.removeAttribute(e)}},oi=function(t,e,r,n,i,o){var s=new Pr(t._pt,e,r,0,1,o?zn:Dn);return t._pt=s,s.b=n,s.e=i,t._props.push(r),s},si={deg:1,rad:1,turn:1},ai={grid:1,flex:1},li=function t(e,r,n,i){var o,s,a,l,c=parseFloat(n)||0,u=(n+"").trim().substr((c+"").length)||"px",h=Kr.style,f=On.test(r),d="svg"===e.tagName.toLowerCase(),p=(d?"client":"offset")+(f?"Width":"Height"),m=100,g="px"===i,y="%"===i;if(i===u||!c||si[i]||si[u])return c;if("px"!==u&&!g&&(c=t(e,r,n,"px")),l=e.getCTM&&ni(e),(y||"%"===u)&&(xn[r]||~r.indexOf("adius")))return o=l?e.getBBox()[f?"width":"height"]:e[p],yt(y?c/o*m:c/100*o);if(h[f?"width":"height"]=m+(g?u:i),s="rem"!==i&&~r.indexOf("adius")||"em"===i&&e.appendChild&&!d?e:e.parentNode,l&&(s=(e.ownerSVGElement||{}).parentNode),s&&s!==Zr&&s.appendChild||(s=Zr.body),(a=s._gsap)&&y&&a.width&&f&&a.time===$e.time&&!a.uncache)return yt(c/a.width*m);if(!y||"height"!==r&&"width"!==r)(y||"%"===u)&&!ai[Yn(s,"display")]&&(h.position=Yn(e,"position")),s===e&&(h.position="static"),s.appendChild(Kr),o=Kr[p],s.removeChild(Kr),h.position="absolute";else{var _=e.style[r];e.style[r]=m+i,o=e[p],_?e.style[r]=_:ii(e,r)}return f&&y&&((a=pt(s)).time=$e.time,a.width=s[p]),yt(g?o*c/m:o&&c?m/o*c:0)},ci=function(t,e,r,n){var i;return Yr||Qn(),e in Mn&&"transform"!==e&&~(e=Mn[e]).indexOf(",")&&(e=e.split(",")[0]),xn[e]&&"transform"!==e?(i=xi(t,n),i="transformOrigin"!==e?i[e]:i.svg?i.origin:wi(Yn(t,Gn))+" "+i.zOrigin+"px"):(!(i=t.style[e])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=pi[e]&&pi[e](t,e,r)||Yn(t,e)||mt(t,e)||("op
2acity"===e?1:0)),r&&!~(i+"").trim().indexOf(" ")?li(t,e,i,r)+r:i},ui=function(t,e,r,n){if(!r||"none"===r){var i=Jn(e,t,1),o=i&&Yn(t,i,1);o&&o!==r?(e=i,r=o):"borderColor"===e&&(r=Yn(t,"borderTopColor"))}var s,a,l,c,u,h,f,d,p,m,g,y=new Pr(this._pt,t.style,e,0,1,Ar),_=0,v=0;if(y.b=r,y.e=n,r+="","var(--"===(n+="").substring(0,6)&&(n=Yn(t,n.substring(4,n.indexOf(")")))),"auto"===n&&(h=t.style[e],t.style[e]=n,n=Yn(t,e)||n,h?t.style[e]=h:ii(t,e)),Ne(s=[r,n]),r=s[0],n=s[1],l=r.match(G)||[],(n.match(G)||[]).length){for(;a=G.exec(n);)f=a[0],p=n.substring(_,a.index),u?u=(u+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(u=1),f!==(h=l[v++]||"")&&(c=parseFloat(h)||0,g=h.substr((c+"").length),"="===f.charAt(1)&&(f=vt(c,f)+g),d=parseFloat(f),m=f.substr((d+"").length),_=G.lastIndex-m.length,m||(m=m||b.units[e]||g,_===n.length&&(n+=m,y.e+=m)),g!==m&&(c=li(t,e,h,m)||0),y._pt={_next:y._pt,p:p||1===v?p:",",s:c,c:d-c,m:u&&u<4||"zIndex"===e?Math.round:0});y.c=_<n.length?n.substring(_,n.length):""}else y.r="display"===e&&"none"===n?zn:Dn;return H.test(n)&&(y.e=0),this._pt=y,y},hi={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},fi=function(t){var e=t.split(" "),r=e[0],n=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==n&&"right"!==n||(t=r,r=n,n=t),e[0]=hi[r]||r,e[1]=hi[n]||n,e.join(" ")},di=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,n,i,o=e.t,s=o.style,a=e.u,l=o._gsap;if("all"===a||!0===a)s.cssText="",n=1;else for(i=(a=a.split(",")).length;--i>-1;)r=a[i],xn[r]&&(n=1,r="transformOrigin"===r?Gn:Vn),ii(o,r);n&&(ii(o,Vn),l&&(l.svg&&o.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",xi(o,1),l.uncache=1,Hn(s)))}},pi={clearProps:function(t,e,r,n,i){if("isFromStart"!==i.data){var o=t._pt=new Pr(t._pt,e,r,0,0,di);return o.u=n,o.pr=-10,o.tween=i,t._props.push(r),1}}},mi=[1,0,0,1,0,0],gi={},yi=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},_i=function(t){var e=Yn(t,Vn);return yi(e)?mi:e.substr(7).match(V).map(yt)},vi=function(t,e){var r,n,i,o,s=t._gsap||pt(t),a=t.style,l=_i(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(i=t.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?mi:l:(l!==mi||t.offsetParent||t===Xr||s.svg||(i=a.display,a.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(o=1,n=t.nextElementSibling,Xr.appendChild(t)),l=_i(t),i?a.display=i:ii(t,"display"),o&&(n?r.insertBefore(t,n):r?r.appendChild(t):Xr.removeChild(t))),e&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},bi=function(t,e,r,n,i,o){var s,a,l,c=t._gsap,u=i||vi(t,!0),h=c.xOrigin||0,f=c.yOrigin||0,d=c.xOffset||0,p=c.yOffset||0,m=u[0],g=u[1],y=u[2],_=u[3],v=u[4],b=u[5],x=e.split(" "),w=parseFloat(x[0])||0,E=parseFloat(x[1])||0;r?u!==mi&&(a=m*_-g*y)&&(l=w*(-g/a)+E*(m/a)-(m*b-g*v)/a,w=w*(_/a)+E*(-y/a)+(y*b-_*v)/a,E=l):(w=(s=ri(t)).x+(~x[0].indexOf("%")?w/100*s.width:w),E=s.y+(~(x[1]||x[0]).indexOf("%")?E/100*s.height:E)),n||!1!==n&&c.smooth?(v=w-h,b=E-f,c.xOffset=d+(v*m+b*y)-v,c.yOffset=p+(v*g+b*_)-b):c.xOffset=c.yOffset=0,c.xOrigin=w,c.yOrigin=E,c.smooth=!!n,c.origin=e,c.originIsAbsolute=!!r,t.style[Gn]="0px 0px",o&&(oi(o,c,"xOrigin",h,w),oi(o,c,"yOrigin",f,E),oi(o,c,"xOffset",d,c.xOffset),oi(o,c,"yOffset",p,c.yOffset)),t.setAttribute("data-svg-origin",w+" "+E)},xi=function(t,e){var r=t._gsap||new rr(t);if("x"in r&&!e&&!r.uncache)return r;var n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,x,w,E,S,T,A,O,C,M,k,I,P,L,R,D,z=t.style,B=r.scaleX<0,j="px",F="deg",N=getComputedStyle(t),$=Yn(t,Gn)||"0";return n=i=o=l=c=u=h=f=d=0,s=a=1,r.svg=!(!t.getCTM||!ni(t)),N.translate&&("none"===N.translate&&"none"===N.scale&&"none"===N.rotate||(z[Vn]=("none"!==N.translate?"translate3d("+(N.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==N.rotate?"rotate("+N.rotate+") ":"")+("none"!==N.scale?"scale("+N.scale.split(" ").join(",")+") ":"")+("none"!==N[Vn]?N[Vn]:"")),z.scale=z.rotate=z.translate="none"),g=vi(t,r.svg),r.svg&&(r.uncache?(C=t.getBBox(),$=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",O=""):O=!e&&t.getAttribute("data-svg-origin"),bi(t,O||$,!!O||r.originIsAbsolute,!1!==r.smooth,g)),p=r.xOrigin||0,m=r.yOrigin||0,g!==mi&&(x=g[0],w=g[1],E=g[2],S=g[3],n=T=g[4],i=A=g[5],6===g.length?(s=Math.sqrt(x*x+w*w),a=Math.sqrt(S*S+E*E),l=x||w?Sn(w,x)*wn:0,(h=E||S?Sn(E,S)*wn+l:0)&&(a*=Math.abs(Math.cos(h*En))),r.svg&&(n-=p-(p*x+m*E),i-=m-(p*w+m*S))):(D=g[6],L=g[7],k=g[8],I=g[9],P=g[10],R=g[11],n=g[12],i=g[13],o=g[14],c=(y=Sn(D,P))*wn,y&&(O=T*(_=Math.cos(-y))+k*(v=Math.sin(-y)),C=A*_+I*v,M=D*_+P*v,k=T*-v+k*_,I=A*-v+I*_,P=D*-v+P*_,R=L*-v+R*_,T=O,A=C,D=M),u=(y=Sn(-E,P))*wn,y&&(_=Math.cos(-y),R=S*(v=M
vendor: 4,278 bytes, line 2
2ath.sin(-y))+R*_,x=O=x*_-k*v,w=C=w*_-I*v,E=M=E*_-P*v),l=(y=Sn(w,x))*wn,y&&(O=x*(_=Math.cos(y))+w*(v=Math.sin(y)),C=T*_+A*v,w=w*_-x*v,A=A*_-T*v,x=O,T=C),c&&Math.abs(c)+Math.abs(l)>359.9&&(c=l=0,u=180-u),s=yt(Math.sqrt(x*x+w*w+E*E)),a=yt(Math.sqrt(A*A+D*D)),y=Sn(T,A),h=Math.abs(y)>2e-4?y*wn:0,d=R?1/(R<0?-R:R):0),r.svg&&(O=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!yi(Yn(t,Vn)),O&&t.setAttribute("transform",O))),Math.abs(h)>90&&Math.abs(h)<270&&(B?(s*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(a*=-1,h+=h<=0?180:-180)),e=e||r.uncache,r.x=n-((r.xPercent=n&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+j,r.y=i-((r.yPercent=i&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-i)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+j,r.z=o+j,r.scaleX=yt(s),r.scaleY=yt(a),r.rotation=yt(l)+F,r.rotationX=yt(c)+F,r.rotationY=yt(u)+F,r.skewX=h+F,r.skewY=f+F,r.transformPerspective=d+j,(r.zOrigin=parseFloat($.split(" ")[2])||!e&&r.zOrigin||0)&&(z[Gn]=wi($)),r.xOffset=r.yOffset=0,r.force3D=b.force3D,r.renderTransform=r.svg?Mi:tn?Ci:Si,r.uncache=0,r},wi=function(t){return(t=t.split(" "))[0]+" "+t[1]},Ei=function(t,e,r){var n=se(e);return yt(parseFloat(e)+parseFloat(li(t,"x",r+"px",n)))+n},Si=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Ci(t,e)},Ti="0deg",Ai="0px",Oi=") ",Ci=function(t,e){var r=e||this,n=r.xPercent,i=r.yPercent,o=r.x,s=r.y,a=r.z,l=r.rotation,c=r.rotationY,u=r.rotationX,h=r.skewX,f=r.skewY,d=r.scaleX,p=r.scaleY,m=r.transformPerspective,g=r.force3D,y=r.target,_=r.zOrigin,v="",b="auto"===g&&t&&1!==t||!0===g;if(_&&(u!==Ti||c!==Ti)){var x,w=parseFloat(c)*En,E=Math.sin(w),S=Math.cos(w);w=parseFloat(u)*En,x=Math.cos(w),o=Ei(y,o,E*x*-_),s=Ei(y,s,-Math.sin(w)*-_),a=Ei(y,a,S*x*-_+_)}m!==Ai&&(v+="perspective("+m+Oi),(n||i)&&(v+="translate("+n+"%, "+i+"%) "),(b||o!==Ai||s!==Ai||a!==Ai)&&(v+=a!==Ai||b?"translate3d("+o+", "+s+", "+a+") ":"translate("+o+", "+s+Oi),l!==Ti&&(v+="rotate("+l+Oi),c!==Ti&&(v+="rotateY("+c+Oi),u!==Ti&&(v+="rotateX("+u+Oi),h===Ti&&f===Ti||(v+="skew("+h+", "+f+Oi),1===d&&1===p||(v+="scale("+d+", "+p+Oi),y.style[Vn]=v||"translate(0, 0)"},Mi=function(t,e){var r,n,i,o,s,a=e||this,l=a.xPercent,c=a.yPercent,u=a.x,h=a.y,f=a.rotation,d=a.skewX,p=a.skewY,m=a.scaleX,g=a.scaleY,y=a.target,_=a.xOrigin,v=a.yOrigin,b=a.xOffset,x=a.yOffset,w=a.forceCSS,E=parseFloat(u),S=parseFloat(h);f=parseFloat(f),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),f+=p),f||d?(f*=En,d*=En,r=Math.cos(f)*m,n=Math.sin(f)*m,i=Math.sin(f-d)*-g,o=Math.cos(f-d)*g,d&&(p*=En,s=Math.tan(d-p),i*=s=Math.sqrt(1+s*s),o*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),n*=s)),r=yt(r),n=yt(n),i=yt(i),o=yt(o)):(r=m,o=g,n=i=0),(E&&!~(u+"").indexOf("px")||S&&!~(h+"").indexOf("px"))&&(E=li(y,"x",u,"px"),S=li(y,"y",h,"px")),(_||v||b||x)&&(E=yt(E+_-(_*r+v*i)+b),S=yt(S+v-(_*n+v*o)+x)),(l||c)&&(s=y.getBBox(),E=yt(E+l/100*s.width),S=yt(S+c/100*s.height)),s="matrix("+r+","+n+","+i+","+o+","+E+","+S+")",y.setAttribute("transform",s),w&&(y.style[Vn]=s)},ki=function(t,e,r,n,i){var o,s,a=360,l=k(i),c=parseFloat(i)*(l&&~i.indexOf("rad")?wn:1)-n,u=n+c+"deg";return l&&("short"===(o=i.split("_")[1])&&(c%=a)!=c%(a/2)&&(c+=c<0?a:-a),"cw"===o&&c<0?c=(c+a*Tn)%a-~~(c/a)*a:"ccw"===o&&c>0&&(c=(c-a*Tn)%a-~~(c/a)*a)),t._pt=s=new Pr(t._pt,e,r,n,c,In),s.e=u,s.u="deg",t._props.push(r),s},Ii=function(t,e){for(var r in e)t[r]=e[r];return t},Pi=function(t,e,r){var n,i,o,s,a,l,c,u=Ii({},r._gsap),h="perspective,force3D,transformOrigin,svgOrigin",f=r.style;for(i in u.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),f[Vn]=e,n=xi(r,1),ii(r,Vn),r.setAttribute("transform",o)):(o=getComputedStyle(r)[Vn],f[Vn]=e,n=xi(r,1),f[Vn]=o),xn)(o=u[i])!==(s=n[i])&&h.indexOf(i)<0&&(a=se(o)!==(c=se(s))?li(r,i,o,c):parseFloat(o),l=parseFloat(s),t._pt=new Pr(t._pt,n,i,a,l-a,kn),t._pt.u=c||0,t._props.push(i));Ii(n,u)};gt("padding,margin,Width,Radius",(function(t,e){var r="Top",n="Right",i="Bottom",o="Left",s=(e<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return e<2?t+r:"border"+r+t}));pi[e>1?"border"+t:t]=function(t,e,r,n,i){var o,a;if(arguments.length<4)return o=s.map((function(e){return ci(t,e,r)})),5===(a=o.join(" ")).split(o[0]).length?o[0]:a;o=(n+"").split(" "),a={}
vendor: 4,512 bytes, line 2
2,s.forEach((function(t,e){return a[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,a,i)}}));var Li,Ri,Di,zi,Bi={name:"css",register:Qn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,r,n,i){var o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,x,w,E=this._props,S=t.style,T=r.vars.startAt;for(h in Yr||Qn(),this.styles=this.styles||Zn(t),x=this.styles.props,this.tween=r,e)if("autoRound"!==h&&(s=e[h],!lt[h]||!ur(h,e,r,n,t,i)))if(c=typeof s,u=pi[h],"function"===c&&(c=typeof(s=s.call(r,n,t,i))),"string"===c&&~s.indexOf("random(")&&(s=Se(s)),u)u(this,t,h,s,r)&&(v=1);else if("--"===h.substr(0,2))o=(getComputedStyle(t).getPropertyValue(h)+"").trim(),s+="",je.lastIndex=0,je.test(o)||(f=se(o),(d=se(s))?f!==d&&(o=li(t,h,o,d)+d):f&&(s+=f)),this.add(S,"setProperty",o,s,n,i,0,0,h),E.push(h),x.push(h,0,S[h]);else if("undefined"!==c){if(T&&h in T?(o="function"==typeof T[h]?T[h].call(r,n,t,i):T[h],k(o)&&~o.indexOf("random(")&&(o=Se(o)),se(o+"")||"auto"===o||(o+=b.units[h]||se(ci(t,h))||""),"="===(o+"").charAt(1)&&(o=ci(t,h))):o=ci(t,h),l=parseFloat(o),(p="string"===c&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),a=parseFloat(s),h in Mn&&("autoAlpha"===h&&(1===l&&"hidden"===ci(t,"visibility")&&a&&(l=0),x.push("visibility",0,S.visibility),oi(this,S,"visibility",l?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==h&&"transform"!==h&&~(h=Mn[h]).indexOf(",")&&(h=h.split(",")[0])),m=h in xn){if(this.styles.save(h),w=s,"string"===c&&"var(--"===s.substring(0,6)){if("calc("===(s=Yn(t,s.substring(4,s.indexOf(")")))).substring(0,5)){var A=t.style.perspective;t.style.perspective=s,s=Yn(t,"perspective"),A?t.style.perspective=A:ii(t,"perspective")}a=parseFloat(s)}if(g||((y=t._gsap).renderTransform&&!e.parseTransform||xi(t,e.parseTransform),_=!1!==e.smoothOrigin&&y.smooth,(g=this._pt=new Pr(this._pt,S,Vn,0,1,y.renderTransform,y,0,-1)).dep=1),"scale"===h)this._pt=new Pr(this._pt,y,"scaleY",y.scaleY,(p?vt(y.scaleY,p+a):a)-y.scaleY||0,kn),this._pt.u=0,E.push("scaleY",h),h+="X";else{if("transformOrigin"===h){x.push(Gn,0,S[Gn]),s=fi(s),y.svg?bi(t,s,0,_,0,this):((d=parseFloat(s.split(" ")[2])||0)!==y.zOrigin&&oi(this,y,"zOrigin",y.zOrigin,d),oi(this,S,h,wi(o),wi(s)));continue}if("svgOrigin"===h){bi(t,s,1,_,0,this);continue}if(h in gi){ki(this,y,h,l,p?vt(l,p+s):s);continue}if("smoothOrigin"===h){oi(this,y,"smooth",y.smooth,s);continue}if("force3D"===h){y[h]=s;continue}if("transform"===h){Pi(this,s,t);continue}}}else h in S||(h=Jn(h)||h);if(m||(a||0===a)&&(l||0===l)&&!Cn.test(s)&&h in S)a||(a=0),(f=(o+"").substr((l+"").length))!==(d=se(s)||(h in b.units?b.units[h]:f))&&(l=li(t,h,o,d)),this._pt=new Pr(this._pt,m?y:S,h,l,(p?vt(l,p+a):a)-l,m||"px"!==d&&"zIndex"!==h||!1===e.autoRound?kn:Rn),this._pt.u=d||0,m&&w!==s?(this._pt.b=o,this._pt.e=w,this._pt.r=Ln):f!==d&&"%"!==d&&(this._pt.b=o,this._pt.r=Pn);else if(h in S)ui.call(this,t,h,o,p?p+s:s);else if(h in t)this.add(t,h,o||t[h],p?p+s:s,n,i);else if("parseTransform"!==h){J(h,s);continue}m||(h in S?x.push(h,0,S[h]):"function"==typeof t[h]?x.push(h,2,t[h]()):x.push(h,1,o||t[h])),E.push(h)}v&&Ir(this)},render:function(t,e){if(e.tween._time||!Qr())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:ci,aliases:Mn,getSetter:function(t,e,r){var n=Mn[e];return n&&n.indexOf(",")<0&&(e=n),e in xn&&e!==Gn&&(t._gsap.x||ci(t,"x"))?r&&Jr===r?"scale"===e?Nn:Fn:(Jr=r||{})&&("scale"===e?$n:Un):t.style&&!L(t.style[e])?Bn:~e.indexOf("-")?jn:Er(t,e)},core:{_removeProperty:ii,_getMatrix:vi}};Hr.utils.checkPrefix=Jn,Hr.core.getStyleSaver=Zn,Di="0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",zi=gt((Li="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ri="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){xn[t]=1})),gt(Ri,(function(t){b.units[t]="deg",gi[t]=1})),Mn[zi[13]]=Li+","+Ri,gt(Di,(function(t){var e=t.split(":");Mn[e[1]]=zi[e[0]]})),gt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){b.units[t]="px"})),Hr.registerPlugin(Bi);var ji=Hr.registerPlugin(Bi)||Hr,Fi=ji.core.Tween;t.Back=pn,t.Bounce=gn,t.CSSPlugin=Bi,t.Circ=vn,t.Cubic=cn,t.Elastic=dn,t.Expo=_n,t.Linear=an,t.Power0=en,t.Power1=rn,t.Power2=nn,t.Power3=on,t.Power4=sn,t.Quad=ln,t.Quart=un,t.Quint=hn,t.Sine=yn,t.SteppedEase=mn,t.Strong=fn,t.TimelineLite=ir,t.TimelineMax=ir,t.TweenLite=_r,t.TweenMax=Fi,t.default=ji,t.gsap=ji,"undefined"==typeof window||window!==t?Object.defineProperty(t,"__esMo
vendor: 22,433 bytes, line 2
2dule",{value:!0}):delete window.default}(e)},5317:(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}r.r(e),r.d(e,{Animation:()=>Ke,Back:()=>Xr,Bounce:()=>Kr,Circ:()=>tn,Cubic:()=>Gr,Elastic:()=>Zr,Expo:()=>Qr,GSCache:()=>Ye,Linear:()=>Ur,Power0:()=>Br,Power1:()=>jr,Power2:()=>Fr,Power3:()=>Nr,Power4:()=>$r,PropTween:()=>Er,Quad:()=>Vr,Quart:()=>qr,Quint:()=>Hr,Sine:()=>Jr,SteppedEase:()=>Yr,Strong:()=>Wr,Timeline:()=>Je,TimelineLite:()=>Je,TimelineMax:()=>Je,Tween:()=>cr,TweenLite:()=>cr,TweenMax:()=>cr,_checkPlugin:()=>nr,_colorExp:()=>Re,_colorStringFilter:()=>ze,_config:()=>b,_forEachName:()=>gt,_getCache:()=>pt,_getProperty:()=>mt,_getSetter:()=>pr,_isString:()=>k,_isUndefined:()=>L,_missingPlugin:()=>J,_numExp:()=>V,_numWithUnitExp:()=>G,_parseRelative:()=>vt,_plugins:()=>lt,_relExp:()=>H,_removeLinkedListItem:()=>Pt,_renderComplexString:()=>yr,_replaceRandom:()=>be,_round:()=>yt,_roundModifier:()=>he,_setDefaults:()=>At,_sortPropTweensByPriority:()=>wr,_ticker:()=>Be,clamp:()=>ne,default:()=>zr,distribute:()=>ue,getUnit:()=>re,gsap:()=>zr,interpolate:()=>we,mapRange:()=>xe,normalize:()=>ge,pipe:()=>pe,random:()=>de,selector:()=>le,shuffle:()=>ce,snap:()=>fe,splitColor:()=>Ie,toArray:()=>ae,unitize:()=>me,wrap:()=>_e,wrapYoyo:()=>ve});var o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},x={duration:.5,overwrite:!1,delay:0},w=1e8,E=1e-8,S=2*Math.PI,T=S/4,A=0,O=Math.sqrt,C=Math.cos,M=Math.sin,k=function(t){return"string"==typeof t},I=function(t){return"function"==typeof t},P=function(t){return"number"==typeof t},L=function(t){return void 0===t},R=function(t){return"object"==typeof t},D=function(t){return!1!==t},z=function(){return"undefined"!=typeof window},B=function(t){return I(t)||k(t)},j="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},F=Array.isArray,N=/random\([^)]+\)/g,$=/,\s*/g,U=/(?:-?\.?\d|\.)+/gi,V=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,G=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,q=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,H=/[+-]=-?[.\d]+/,W=/[^,'"\[\]\s]+/gi,Z=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,X={},Y={},K=function(t){return(Y=Ot(t,X))&&zr},J=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Q=function(t,e){return!e&&console.warn(t)},tt=function(t,e){return t&&(X[t]=e)&&Y&&(Y[t]=e)||X},et=function(){return 0},rt={suppressEvents:!0,isStart:!0,kill:!1},nt={suppressEvents:!0,kill:!1},it={suppressEvents:!0},ot={},st=[],at={},lt={},ct={},ut=30,ht=[],ft="",dt=function(t){var e,r,n=t[0];if(R(n)||I(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(r=ht.length;r--&&!ht[r].targetTest(n););e=ht[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Ye(t[r],e)))||t.splice(r,1);return t},pt=function(t){return t._gsap||dt(ae(t))[0]._gsap},mt=function(t,e,r){return(r=t[e])&&I(r)?t[e]():L(r)&&t.getAttribute&&t.getAttribute(e)||r},gt=function(t,e){return(t=t.split(",")).forEach(e)||t},yt=function(t){return Math.round(1e5*t)/1e5||0},_t=function(t){return Math.round(1e7*t)/1e7||0},vt=function(t,e){var r=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+n:"-"===r?t-n:"*"===r?t*n:t/n},bt=function(t,e){for(var r=e.length,n=0;t.indexOf(e[n])<0&&++n<r;);return n<r},xt=function(){var t,e,r=st.length,n=st.slice(0);for(at={},st.length=0,t=0;t<r;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},wt=function(t){return!!(t._initted||t._startAt||t.add)},Et=function(t,e,r,n){st.length&&!s&&xt(),t.render(e,r,n||!!(s&&e<0&&wt(t))),st.length&&!s&&xt()},St=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(W).length<2?e:k(t)?t.trim():t},Tt=function(t){return t},At=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},Ot=function(t,e){for(var r in e)t[r]=e[r];return t},Ct=function t(e,r){for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=R(r[n])?t(e[n]||(e[n]={}),r[n]):r[n]);return e},Mt=function(t,e){var r,n={};for(r in t)r in e||(n[r]=t[r]);return n},kt=function(t){var e,r=t.parent||l,n=t.keyframes?(e=F(t.keyframes),function(t,r){for(var n in r)n in t||"duration"===n&&e||"ease"===n||(t[n]=r[n])}):At;if(D(t.inherit))for(;r;)n(t,r.vars.defaults),r=r.parent||r._dp;return t},It=function(t,e,r,n,i){void 0===r&&(r="_first"),void 0===n&&(n="_last");var o,s=t[n];if(i)for(o=e[i];s&&s[i]>o;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[n]=e,e._prev=s,e.parent=e._dp=t,e},Pt=function(t,e,r,n){void 0===r&&(r="_first"),void 0===n&&(n="_last");var i=e._prev,o=e._next;i?i._next=o:t[r]===e&&(t[r]=o),o?o._prev=i:t[n]===e&&(t[n]=i),e._next=e._prev=e.parent=null},Lt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Rt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},Dt=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},zt=function(t,e,r,n){return t._startAt&&(s?t._startAt.revert(nt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},Bt=function t(e){return!e||e._ts&&t(e.parent)},jt=function(t){return t._repeat?Ft(t._tTime,t=t.duration()+t._rDelay)*t:0},Ft=function(t,e){var r=Math.floor(t=_t(t/e));return t&&r===t?r-1:r},Nt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},$t=function(t){return t._end=_t(t._start+(t._tDur/Math.abs(t._ts||t._rts||E)||0))},Ut=function(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=_t(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),$t(t),r._dirty||Rt(r,t)),t},Vt=function(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Nt(t.rawTime(),e),(!e._dur||ee(0,e.totalDuration(),r)-e._tTime>E)&&e.render(r,!0)),Rt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-1e-8}},Gt=function(t,e,r,n){return e.parent&&Lt(e),e._start=_t((P(r)?r:r||t!==l?Jt(t,r,e):t._time)+e._delay),e._end=_t(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),It(t,e,"_first","_last",t._sort?"_start":0),Zt(e)||(t._recent=e),n||Vt(t,e),t._ts<0&&Ut(t,t._tTime),t},qt=function(t,e){return(X.ScrollTrigger||J("scrollTrigger",e))&&X.ScrollTrigger.create(e,t)},Ht=function(t,e,r,n,i){return ir(t,e,i),t._initted?!r&&t._pt&&!s&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&d!==Be.frame?(st.push(t),t._lazy=[i,n],1):void 0:1},Wt=function t(e){var r=e.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||t(r))},Zt=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},Xt=function(t,e,r,n){var i=t._repeat,o=_t(e)||0,s=t._tTime/t._tDur;return s&&!n&&(t._time*=o/t._dur),t._dur=o,t._tDur=i?i<0?1e10:_t(o*(i+1)+t._rDelay*i):o,s>0&&!n&&Ut(t,t._tTime=t._tDur*s),t.parent&&$t(t),r||Rt(t.parent,t),t},Yt=function(t){return t instanceof Je?Rt(t):Xt(t,t._dur)},Kt={_start:0,endTime:et,totalDuration:et},Jt=function t(e,r,n){var i,o,s,a=e.labels,l=e._recent||Kt,c=e.duration()>=w?l.endTime(!1):e._dur;return k(r)&&(isNaN(r)||r in a)?(o=r.charAt(0),s="%"===r.substr(-1),i=r.indexOf("="),"<"===o||">"===o?(i>=0&&(r=r.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(r.substr(1))||0)*(s?(i<0?l:n).totalDuration()/100:1)):i<0?(r in a||(a[r]=c),a[r]):(o=parseFloat(r.charAt(i-1)+r.substr(i+1)),s&&n&&(o=o/100*(F(n)?n[0]:n).totalDuration()),i>1?t(e,r.substr(0,i-1),n)+o:c+o)):null==r?c:+r},Qt=function(t,e,r){var n,i,o=P(e[1]),s=(o?2:1)+(t<2?0:1),a=e[s];if(o&&(a.duration=e[1]),a.parent=r,t){for(n=a,i=r;i&&!("immediateRender"in n);)n=i.vars.defaults||{},i=D(i.vars.inherit)&&i.parent;a.immediateRender=D(n.immediateRender),t<2?a.runBackwards=1:a.startAt=e[s-1]}return new cr(e[0],a,e[s+1])},te=function(t,e){return t||0===t?e(t):e},ee=function(t,e,r){return r<t?t:r>e?e:r},re=function(t,e){return k(t)&&(e=Z.exec(t))?e[1]:""},ne=function(t,e,r){return te(r,(function(r){return ee(t,e,r)}))},ie=[].slice,oe=function(t,e){return t&&R(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&R(t[0]))&&!t.nodeType&&t!==c},se=function(t,e,r){return void 0===r&&(r=[]),t.forEach((function(t){var n;return k(t)&&!e||oe(t,1)?(n=r).push.apply(n,ae(t)):r.push(t)}))||r},ae=function(t,e,r){return a&&!e&&a.selector?a.selector(t):!k(t)||r||!u&&je()?F(t)?se(t,r):oe(t)?ie.call(t,0):t?[t]:[]:ie.call((e||h).querySelectorAll(t),0)},le=function(t){return t=ae(t)[0]||Q("Invalid scope")||{},function(e){var r=t.current||t.nativeElement||t;return ae(e,r.querySelectorAll?r:r===t?Q("Invalid scope")||h.createElement("div"):t)}},ce=function(t){return t.sort((function(){return.5-Math.random()}))},ue=function(t){if(I(t))return t;var e=R(t)?t:{each:t},r=qe(e.ease),n=e.from||0,i=parseFloat(e.base)||0,o={},s=n>0&&n<1,a=isNaN(n)||s,l=e.axis,c=n,u=n;return k(n)?c=u={center:.5,edges:.5,end:1}[n]||0:!s&&a&&(c=n[0],u=n[1]),function(t,s,h){var f,d,p,m,g,y,_,v,b,x=(h||e).length,E=o[x];if(!E){if(!(b="auto"===e.grid?0:(e.grid||[1,w])[1])){for(_=-w;_<(_=h[b++].getBoundingClientRect().left)&&b<x;);b<x&&b--}for(E=o[x]=[],f=a?Math.min(b,x)*c-.5:n%b,d=b===w?0:a?x*u/b-.5:n/b|0,_=0,v=w,y=0;y<x;y++)p=y%b-f,m=d-(y/b|0),E[y]=g=l?Math.abs("y"===l?m:p):O(p*p+m*m),g>_&&(_=g),g<v&&(v=g);"random"===n&&ce(E),E.max=_-v,E.min=v,E.v=x=(parseFloat(e.amount)||parseFloat(e.each)*(b>x?x-1:l?"y"===l?x/b:b:Math.max(b,x/b))||0)*("edges"===n?-1:1),E.b=x<0?i-x:i,E.u=re(e.amount||e.each)||0,r=r&&x<0?Ve(r):r}return x=(E[t]-E.min)/E.max||0,_t(E.b+(r?r(x):x)*E.v)+E.u}},he=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var n=_t(Math.round(parseFloat(r)/t)*t*e);return(n-n%1)/e+(P(r)?0:re(r))}},fe=function(t,e){var r,n,i=F(t);return!i&&R(t)&&(r=i=t.radius||w,t.values?(t=ae(t.values),(n=!P(t[0]))&&(r*=r)):t=he(t.increment)),te(e,i?I(t)?function(e){return n=t(e),Math.abs(n-e)<=r?n:e}:function(e){for(var i,o,s=parseFloat(n?e.x:e),a=parseFloat(n?e.y:0),l=w,c=0,u=t.length;u--;)(i=n?(i=t[u].x-s)*i+(o=t[u].y-a)*o:Math.abs(t[u]-s))<l&&(l=i,c=u);return c=!r||l<=r?t[c]:e,n||c===e||P(e)?c:c+re(e)}:he(t))},de=function(t,e,r,n){return te(F(t)?!e:!0===r?!!(r=0):!n,(function(){return F(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*n)/n}))},pe=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},me=function(t,e){return function(r){return t(parseFloat(r))+(e||re(r))}},ge=function(t,e,r){return xe(t,e,0,1,r)},ye=function(t,e,r){return te(r,(function(r){return t[~~e(r)]}))},_e=function t(e,r,n){var i=r-e;return F(e)?ye(e,t(0,e.length),r):te(n,(function(t){return(i+(t-e)%i)%i+e}))},ve=function t(e,r,n){var i=r-e,o=2*i;return F(e)?ye(e,t(0,e.length-1),r):te(n,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},be=function(t){return t.replace(N,(function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split($);return de(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)}))},xe=function(t,e,r,n,i){var o=e-t,s=n-r;return te(i,(function(e){return r+((e-t)/o*s||0)}))},we=function t(e,r,n,i){var o=isNaN(e+r)?0:function(t){return(1-t)*e+t*r};if(!o){var s,a,l,c,u,h=k(e),f={};if(!0===n&&(i=1)&&(n=null),h)e={p:e},r={p:r};else if(F(e)&&!F(r)){for(l=[],c=e.length,u=c-2,a=1;a<c;a++)l.push(t(e[a-1],e[a]));c--,o=function(t){t*=c;var e=Math.min(u,~~t);return l[e](t-e)},n=r}else i||(e=Ot(F(e)?[]:{},e));if(!l){for(s in r)rr.call(f,e,s,"get",r[s]);o=function(t){return _r(t,f)||(h?e.p:e)}}}return te(n,o)},Ee=function(t,e,r){var n,i,o,s=t.labels,a=w;for(n in s)(i=s[n]-e)<0==!!r&&i&&a>(i=Math.abs(i))&&(o=n,a=i);return o},Se=function(t,e,r){var n,i,o,s=t.vars,l=s[e],c=a,u=t._ctx;if(l)return n=s[e+"Params"],i=s.callbackScope||t,r&&st.length&&xt(),u&&(a=u),o=n?l.apply(i,n):l.call(i),a=c,o},Te=function(t){return Lt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!s),t.progress()<1&&Se(t,"onInterrupt"),t},Ae=[],Oe=function(t){if(t)if(t=!t.name&&t.default||t,z()||t.headless){var e=t.name,r=I(t),n=e&&!r&&t.init?function(){this._props=[]}:t,i={init:et,render:_r,add:rr,kill:br,modifier:vr,rawVars:0},o={targetTest:0,get:0,getSetter:pr,aliases:{},register:0};if(je(),t!==n){if(lt[e])return;At(n,At(Mt(t,i),o)),Ot(n.prototype,Ot(i,Mt(t,o))),lt[n.prop=e]=n,t.targetTest&&(ht.push(n),ot[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}tt(e,n),t.register&&t.register(zr,n,Er)}else Ae.push(t)},Ce=255,Me={aqua:[0,Ce,Ce],lime:[0,Ce,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ce],navy:[0,0,128],white:[Ce,Ce,Ce],olive:[128,128,0],yellow:[Ce,Ce,0],orange:[Ce,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ce,0,0],pink:[Ce,192,203],cyan:[0,Ce,Ce],transparent:[Ce,Ce,Ce,0]},ke=function(t,e,r){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*Ce+.5|0},Ie=function(t,e,r){var n,i,o,s,a,l,c,u,h,f,d=t?P(t)?[t>>16,t>>8&Ce,t&Ce]:0:Me.black;if(!d){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Me[t])d=Me[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),i=t.charAt(2),o=t.charAt(3),t="#"+n+n+i+i+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(d=parseInt(t.substr(1,6),16))>>16,d>>8&Ce,d&Ce,parseInt(t.substr(7),16)/255];d=[(t=parseInt(t.substr(1),16))>>16,t>>8&Ce,t&Ce]}else if("hsl"===t.substr(0,3))if(d=f=t.match(U),e){if(~t.indexOf("="))return d=t.match(V),r&&d.length<4&&(d[3]=1),d}else s=+d[0]%360/360,a=+d[1]/100,n=2*(l=+d[2]/100)-(i=l<=.5?l*(a+1):l+a-l*a),d.length>3&&(d[3]*=1),d[0]=ke(s+1/3,n,i),d[1]=ke(s,n,i),d[2]=ke(s-1/3,n,i);else d=t.match(U)||Me.transparent;d=d.map(Number)}return e&&!f&&(n=d[0]/Ce,i=d[1]/Ce,o=d[2]/Ce,l=((c=Math.max(n,i,o))+(u=Math.min(n,i,o)))/2,c===u?s=a=0:(h=c-u,a=l>.5?h/(2-c-u):h/(c+u),s=c===n?(i-o)/h+(i<o?6:0):c===i?(o-n)/h+2:(n-i)/h+4,s*=60),d[0]=~~(s+.5),d[1]=~~(100*a+.5),d[2]=~~(100*l+.5)),r&&d.length<4&&(d[3]=1),d},Pe=function(t){var e=[],r=[],n=-1;return t.split(Re).forEach((function(t){var i=t.match(G)||[];e.push.apply(e,i),r.push(n+=i.length+1)})),e.c=r,e},Le=function(t,e,r){var n,i,o,s,a="",l=(t+a).match(Re),c=e?"hsla(":"rgba(",u=0;if(!l)return t;if(l=l.map((function(t){return(t=Ie(t,e,1))&&c+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),r&&(o=Pe(t),(n=r.c).join(a)!==o.c.join(a)))for(s=(i=t.replace(Re,"1").split(G)).length-1;u<s;u++)a+=i[u]+(~n.indexOf(u)?l.shift()||c+"0,0,0,0)":(o.length?o:l.length?l:r).shift());if(!i)for(s=(i=t.split(Re)).length-1;u<s;u++)a+=i[u]+l[u];return a+i[s]},Re=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Me)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),De=/hsl[a]?\(/,ze=function(t){var e,r=t.join(" ");if(Re.lastIndex=0,Re.test(r))return e=De.test(r),t[1]=Le(t[1],e),t[0]=Le(t[0],e,Pe(t[1])),!0},Be=function(){var t,e,r,n,i,o,s=Date.now,a=500,l=33,d=s(),p=d,g=1e3/240,y=g,_=[],v=function r(c){var u,h,f,m,v=s()-p,b=!0===c;if((v>a||v<0)&&(d+=v-l),((u=(f=(p+=v)-d)-y)>0||b)&&(m=++n.frame,i=f-1e3*n.time,n.time=f/=1e3,y+=u+(u>=g?4:g-u),h=1),b||(t=e(r)),h)for(o=0;o<_.length;o++)_[o](f,i,m,c)};return n={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(t){return i/(1e3/(t||60))},wake:function(){f&&(!u&&z()&&(c=u=window,h=c.document||{},X.gsap=zr,(c.gsapVersions||(c.gsapVersions=[])).push(zr.version),K(Y||c.GreenSockGlobals||!c.gsap&&c||{}),Ae.forEach(Oe)),r="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=r||function(t){return setTimeout(t,y-1e3*n.time+1|0)},m=1,v(2))},sleep:function(){(r?cancelAnimationFrame:clearTimeout)(t),m=0,e=et},lagSmoothing:function(t,e){a=t||1/0,l=Math.min(e||33,a)},fps:function(t){g=1e3/(t||240),y=1e3*n.time+g},add:function(t,e,r){var i=e?function(e,r,o,s){t(e,r,o,s),n.remove(i)}:t;return n.remove(t),_[r?"unshift":"push"](i),je(),i},remove:function(t,e){~(e=_.indexOf(t))&&_.splice(e,1)&&o>=e&&o--},_listeners:_}}(),je=function(){return!m&&Be.wake()},Fe={},Ne=/^[\d.\-M][\d.\-,\s]/,$e=/["']/g,Ue=function(t){for(var e,r,n,i={},o=t.substr(1,t.length-3).split(":"),s=o[0],a=1,l=o.length;a<l;a++)r=o[a],e=a!==l-1?r.lastIndexOf(","):r.length,n=r.substr(0,e),i[s]=isNaN(n)?n.replace($e,"").trim():+n,s=r.substr(e+1).trim();return i},Ve=function(t){return function(e){return 1-t(1-e)}},Ge=function t(e,r){for(var n,i=e._first;i;)i instanceof Je?t(i,r):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===r||(i.timeline?t(i.timeline,r):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=r)),i=i._next},qe=function(t,e){return t&&(I(t)?t:Fe[t]||function(t){var e,r,n,i,o=(t+"").split("("),s=Fe[o[0]];return s&&o.length>1&&s.config?s.config.apply(null,~t.indexOf("{")?[Ue(o[1])]:(e=t,r=e.indexOf("(")+1,n=e.indexOf(")"),i=e.indexOf("(",r),e.substring(r,~i&&i<n?e.indexOf(")",n+1):n)).split(",").map(St)):Fe._CE&&Ne.test(t)?Fe._CE("",t):s}(t))||e},He=function(t,e,r,n){void 0===r&&(r=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var i,o={easeIn:e,easeOut:r,easeInOut:n};return gt(t,(function(t){for(var e in Fe[t]=X[t]=o,Fe[i=t.toLowerCase()]=r,o)Fe[i+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Fe[t+"."+e]=o[e]})),o},We=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Ze=function t(e,r,n){var i=r>=1?r:1,o=(n||(e?.3:.45))/(r<1?r:1),s=o/S*(Math.asin(1/i)||0),a=function(t){return 1===t?1:i*Math.pow(2,-10*t)*M((t-s)*o)+1},l="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:We(a);return o=S/o,l.config=function(r,n){return t(e,r,n)},l},Xe=function t(e,r){void 0===r&&(r=1.70158);var n=function(t){return t?--t*t*((r+1)*t+r)+1:0},i="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:We(n);return i.config=function(r){return t(e,r)},i};gt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var r=e<5?e+1:e;He(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},(function(t){return 1-Math.pow(1-t,r)}),(function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2}))})),Fe.Linear.easeNone=Fe.none=Fe.Linear.easeIn,He("Elastic",Ze("in"),Ze("out"),Ze()),g=7.5625,_=1/(y=2.75),He("Bounce",(function(t){return 1-v(1-t)}),v=function(t){return t<_?g*t*t:t<.7272727272727273?g*Math.pow(t-1.5/y,2)+.75:t<.9090909090909092?g*(t-=2.25/y)*t+.9375:g*Math.pow(t-2.625/y,2)+.984375}),He("Expo",(function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)})),He("Circ",(function(t){return-(O(1-t*t)-1)})),He("Sine",(function(t){return 1===t?1:1-C(t*T)})),He("Back",Xe("in"),Xe("out"),Xe()),Fe.SteppedEase=Fe.steps=X.SteppedEase={config:function(t,e){void 0===t&&(t=1);var r=1/t,n=t+(e?0:1),i=e?1:0;return function(t){return((n*ee(0,.99999999,t)|0)+i)*r}}},x.ease=Fe["quad.out"],gt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return ft+=t+","+t+"Params,"}));var Ye=function(t,e){this.id=A++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:mt,this.set=e?e.getSetter:pr},Ke=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Xt(this,+t.duration,1,1),this.data=t.data,a&&(this._ctx=a,a.data.push(this)),m||Be.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,Xt(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(je(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Ut(this,t),!r._dp||r.parent||Vt(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Gt(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===E||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Et(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+jt(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+jt(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?Ft(this._tTime,r)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Nt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(ee(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),$t(this),Dt(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(je(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==E&&(this._tTime-=E)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=_t(t);var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Gt(e,this,this._start-this._delay),this}return this._start},e.endTime=function(t){return this._start+(D(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?
vendor: 9,173 bytes, line 2
2Nt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=it);var e=s;return s=t,wt(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),s=e,this},e.globalTime=function(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,Yt(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,Yt(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(Jt(this,t),D(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,D(e)),this._dur||(this._zTime=-1e-8),this},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-E))},e.eventCallback=function(t,e,r){var n=this.vars;return arguments.length>1?(e?(n[t]=e,r&&(n[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this,r=e._prom;return new Promise((function(n){var i=I(t)?t:Tt,o=function(){var t=e.then;e.then=null,r&&r(),I(i)&&(i=i(e))&&(i.then||i===e)&&(e.then=t),n(i),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?o():e._prom=o}))},e.kill=function(){Te(this)},t}();At(Ke.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Je=function(t){function e(e,r){var i;return void 0===e&&(e={}),(i=t.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=D(e.sortChildren),l&&Gt(e.parent||l,n(i),r),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&qt(n(i),e.scrollTrigger),i}i(e,t);var r=e.prototype;return r.to=function(t,e,r){return Qt(0,arguments,this),this},r.from=function(t,e,r){return Qt(1,arguments,this),this},r.fromTo=function(t,e,r,n){return Qt(2,arguments,this),this},r.set=function(t,e,r){return e.duration=0,e.parent=this,kt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new cr(t,e,Jt(this,r),1),this},r.call=function(t,e,r){return Gt(this,cr.delayedCall(0,t,e),r)},r.staggerTo=function(t,e,r,n,i,o,s){return r.duration=e,r.stagger=r.stagger||n,r.onComplete=o,r.onCompleteParams=s,r.parent=this,new cr(t,r,Jt(this,i)),this},r.staggerFrom=function(t,e,r,n,i,o,s){return r.runBackwards=1,kt(r).immediateRender=D(r.immediateRender),this.staggerTo(t,e,r,n,i,o,s)},r.staggerFromTo=function(t,e,r,n,i,o,s,a){return n.startAt=r,kt(n).immediateRender=D(n.immediateRender),this.staggerTo(t,e,n,i,o,s,a)},r.render=function(t,e,r){var n,i,o,a,c,u,h,f,d,p,m,g,y=this._time,_=this._dirty?this.totalDuration():this._tDur,v=this._dur,b=t<=0?0:_t(t),x=this._zTime<0!=t<0&&(this._initted||!v);if(this!==l&&b>_&&t>=0&&(b=_),b!==this._tTime||r||x){if(y!==this._time&&v&&(b+=this._time-y,t+=this._time-y),n=b,d=this._start,u=!(f=this._ts),x&&(v||(y=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(m=this._yoyo,c=v+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*c+t,e,r);if(n=_t(b%c),b===_?(a=this._repeat,n=v):((a=~~(p=_t(b/c)))&&a===p&&(n=v,a--),n>v&&(n=v)),p=Ft(this._tTime,c),!y&&this._tTime&&p!==a&&this._tTime-p*c-this._dur<=0&&(p=a),m&&1&a&&(n=v-n,g=1),a!==p&&!this._lock){var w=m&&1&p,S=w===(m&&1&a);if(a<p&&(w=!w),y=w?0:b%v?v:b,this._lock=1,this.render(y||(g?0:_t(a*c)),e,!v)._lock=0,this._tTime=b,!e&&this.parent&&Se(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1,p=a),y&&y!==this._time||u!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,_=this._tDur,S&&(this._lock=2,y=w?v:-1e-4,this.render(y,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Ge(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function(t,e,r){var n;if(r>e)for(n=t._first;n&&n._start<=r;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=r;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}}(this,_t(y),_t(n)),h&&(b-=n-(n=h._start))),this._tTime=b,this._time=n,this._act=!f,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,y=0),!y&&b&&v&&!e&&!p&&(Se(this,"onStart"),this._tTime!==b))return this;if(n>=y&&t>=0)for(i=this._first;i;){if(o=i._next,(i._act||n>=i._start)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,r);if(i.render(i._ts>0?(n-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(n-i._start)*i._ts,e,r),n!==this._time||!this._ts&&!u){h=0,o&&(b+=this._zTime=-1e-8);break}}i=o}else{i=this._last;for(var T=t<0?t:n;i;){if(o=i._prev,(i._act||T<=i._end)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,r);if(i.render(i._ts>0?(T-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(T-i._start)*i._ts,e,r||s&&wt(i)),n!==this._time||!this._ts&&!u){h=0,o&&(b+=this._zTime=T?-1e-8:E);break}}i=o}}if(h&&!e&&(this.pause(),h.render(n>=y?0:-1e-8)._zTime=n>=y?1:-1,this._ts))return this._start=d,$t(this),this.render(t,e,r);this._onUpdate&&!e&&Se(this,"onUpdate",!0),(b===_&&this._tTime>=this.totalDuration()||!b&&y)&&(d!==this._start&&Math.abs(f)===Math.abs(this._ts)||this._lock||((t||!v)&&(b===_&&this._ts>0||!b&&this._ts<0)&&Lt(this,1),e||t<0&&!y||!b&&!y&&_||(Se(this,b===_&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(b<_&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(t,e){var r=this;if(P(e)||(e=Jt(this,e,t)),!(t instanceof Ke)){if(F(t))return t.forEach((function(t){return r.add(t,e)})),this;if(k(t))return this.addLabel(t,e);if(!I(t))return this;t=cr.delayedCall(0,t)}return this!==t?Gt(this,t,e):this},r.getChildren=function(t,e,r,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=-w);for(var i=[],o=this._first;o;)o._start>=n&&(o instanceof cr?e&&i.push(o):(r&&i.push(o),t&&i.push.apply(i,o.getChildren(!0,e,r)))),o=o._next;return i},r.getById=function(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},r.remove=function(t){return k(t)?this.removeLabel(t):I(t)?this.killTweensOf(t):(t.parent===this&&Pt(this,t),t===this._recent&&(this._recent=this._last),Rt(this))},r.totalTime=function(e,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_t(Be.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,r),this._forcing=0,this):this._tTime},r.addLabel=function(t,e){return this.labels[t]=Jt(this,e),this},r.removeLabel=function(t){return delete this.labels[t],this},r.addPause=function(t,e,r){var n=cr.delayedCall(0,e||et,r);return n.data="isPause",this._hasPause=1,Gt(this,n,Jt(this,t))},r.removePause=function(t){var e=this._first;for(t=Jt(this,t);e;)e._start===t&&"isPause"===e.data&&Lt(e),e=e._next},r.killTweensOf=function(t,e,r){for(var n=this.getTweensOf(t,r),i=n.length;i--;)Qe!==n[i]&&n[i].kill(t,e);return this},r.getTweensOf=function(t,e){for(var r,n=[],i=ae(t),o=this._first,s=P(e);o;)o instanceof cr?bt(o._targets,i)&&(s?(!Qe||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&n.push(o):(r=o.getTweensOf(i,e)).length&&n.push.apply(n,r),o=o._next;return n},r.tweenTo=function(t,e){e=e||{};var r,n=this,i=Jt(n,t),o=e,s=o.startAt,a=o.onStart,l=o.onStartParams,c=o.immediateRender,u=cr.to(n,At({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:e.duration||Math.abs((i-(s&&"time"in s?s.time:n._time))/n.timeScale())||E,onStart:function(){if(n.pause(),!r){var t=e.duration||Math.abs((i-(s&&"time"in s?s.time:n._time))/n.timeScale());u._dur!==t&&Xt(u,t,0,1).render(u._time,!0,!0),r=1}a&&a.apply(u,l||[])}},e));return c?u.render(0):u},r.tweenFromTo=function(t,e,r){return this.tweenTo(e,At({startAt:{time:Jt(this,t)}},r))},r.recent=function(){return this._recent},r.nextLabel=function(t){return void 0===t&&(t=this._time),Ee(this,Jt(this,t))},r.previousLabel=function(t){return void 0===t&&(t=this._time),Ee(this,Jt(this,t),1)},r.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+E)},r.shiftChildren=function(t,e,r){void 0===r&&(r=0);var n,i=this._first,o=this.labels;for(t=_t(t);i;)i._start>=r&&(i._start+=t,i._end+=t),i=i._next;if(e)for(n in o)o[n]>=r&&(o[n]+=t);return Rt(this)},r.invalidate=function(e){var r=this._first;for(this._lock=0;r;
vendor: 16,482 bytes, line 2
2)r.invalidate(e),r=r._next;return t.prototype.invalidate.call(this,e)},r.clear=function(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Rt(this)},r.totalDuration=function(t){var e,r,n,i=0,o=this,s=o._last,a=w;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-t:t));if(o._dirty){for(n=o.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),(r=s._start)>a&&o._sort&&s._ts&&!o._lock?(o._lock=1,Gt(o,s,r-s._delay,1)._lock=0):a=r,r<0&&s._ts&&(i-=r,(!n&&!o._dp||n&&n.smoothChildTiming)&&(o._start+=_t(r/o._ts),o._time-=r,o._tTime-=r),o.shiftChildren(-r,!1,-Infinity),a=0),s._end>i&&s._ts&&(i=s._end),s=e;Xt(o,o===l&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(t){if(l._ts&&(Et(l,Nt(t,l)),d=Be.frame),Be.frame>=ut){ut+=b.autoSleep||120;var e=l._first;if((!e||!e._ts)&&b.autoSleep&&Be._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Be.sleep()}}},e}(Ke);At(Je.prototype,{_lock:0,_hasPause:0,_forcing:0});var Qe,tr,er=function(t,e,r,n,i,o,s){var a,l,c,u,h,f,d,p,m=new Er(this._pt,t,e,0,1,yr,null,i),g=0,y=0;for(m.b=r,m.e=n,r+="",(d=~(n+="").indexOf("random("))&&(n=be(n)),o&&(o(p=[r,n],t,e),r=p[0],n=p[1]),l=r.match(q)||[];a=q.exec(n);)u=a[0],h=n.substring(g,a.index),c?c=(c+1)%5:"rgba("===h.substr(-5)&&(c=1),u!==l[y++]&&(f=parseFloat(l[y-1])||0,m._pt={_next:m._pt,p:h||1===y?h:",",s:f,c:"="===u.charAt(1)?vt(f,u)-f:parseFloat(u)-f,m:c&&c<4?Math.round:0},g=q.lastIndex);return m.c=g<n.length?n.substring(g,n.length):"",m.fp=s,(H.test(n)||d)&&(m.e=0),this._pt=m,m},rr=function(t,e,r,n,i,o,s,a,l,c){I(n)&&(n=n(i||0,t,o));var u,h=t[e],f="get"!==r?r:I(h)?l?t[e.indexOf("set")||!I(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():h,d=I(h)?l?fr:hr:ur;if(k(n)&&(~n.indexOf("random(")&&(n=be(n)),"="===n.charAt(1)&&((u=vt(f,n)+(re(f)||0))||0===u)&&(n=u)),!c||f!==n||tr)return isNaN(f*n)||""===n?(!h&&!(e in t)&&J(e,n),er.call(this,t,e,f,n,d,a||b.stringFilter,l)):(u=new Er(this._pt,t,e,+f||0,n-(f||0),"boolean"==typeof h?gr:mr,0,d),l&&(u.fp=l),s&&u.modifier(s,this,t),this._pt=u)},nr=function(t,e,r,n,i,o){var s,a,l,c;if(lt[t]&&!1!==(s=new lt[t]).init(i,s.rawVars?e[t]:function(t,e,r,n,i){if(I(t)&&(t=sr(t,i,e,r,n)),!R(t)||t.style&&t.nodeType||F(t)||j(t))return k(t)?sr(t,i,e,r,n):t;var o,s={};for(o in t)s[o]=sr(t[o],i,e,r,n);return s}(e[t],n,i,o,r),r,n,o)&&(r._pt=a=new Er(r._pt,i,t,0,1,s.render,s,0,s.priority),r!==p))for(l=r._ptLookup[r._targets.indexOf(i)],c=s._props.length;c--;)l[s._props[c]]=a;return s},ir=function t(e,r,n){var i,a,c,u,h,f,d,p,m,g,y,_,v,b=e.vars,S=b.ease,T=b.startAt,A=b.immediateRender,O=b.lazy,C=b.onUpdate,M=b.runBackwards,k=b.yoyoEase,I=b.keyframes,P=b.autoRevert,L=e._dur,R=e._startAt,z=e._targets,B=e.parent,j=B&&"nested"===B.data?B.vars.targets:z,F="auto"===e._overwrite&&!o,N=e.timeline;if(N&&(!I||!S)&&(S="none"),e._ease=qe(S,x.ease),e._yEase=k?Ve(qe(!0===k?S:k,x.ease)):0,k&&e._yoyo&&!e._repeat&&(k=e._yEase,e._yEase=e._ease,e._ease=k),e._from=!N&&!!b.runBackwards,!N||I&&!b.stagger){if(_=(p=z[0]?pt(z[0]).harness:0)&&b[p.prop],i=Mt(b,ot),R&&(R._zTime<0&&R.progress(1),r<0&&M&&A&&!P?R.render(-1,!0):R.revert(M&&L?nt:rt),R._lazy=0),T){if(Lt(e._startAt=cr.set(z,At({data:"isStart",overwrite:!1,parent:B,immediateRender:!0,lazy:!R&&D(O),startAt:null,delay:0,onUpdate:C&&function(){return Se(e,"onUpdate")},stagger:0},T))),e._startAt._dp=0,e._startAt._sat=e,r<0&&(s||!A&&!P)&&e._startAt.revert(nt),A&&L&&r<=0&&n<=0)return void(r&&(e._zTime=r))}else if(M&&L&&!R)if(r&&(A=!1),c=At({overwrite:!1,data:"isFromStart",lazy:A&&!R&&D(O),immediateRender:A,stagger:0,parent:B},i),_&&(c[p.prop]=_),Lt(e._startAt=cr.set(z,c)),e._startAt._dp=0,e._startAt._sat=e,r<0&&(s?e._startAt.revert(nt):e._startAt.render(-1,!0)),e._zTime=r,A){if(!r)return}else t(e._startAt,E,E);for(e._pt=e._ptCache=0,O=L&&D(O)||O&&!L,a=0;a<z.length;a++){if(d=(h=z[a])._gsap||dt(z)[a]._gsap,e._ptLookup[a]=g={},at[d.id]&&st.length&&xt(),y=j===z?a:j.indexOf(h),p&&!1!==(m=new p).init(h,_||i,e,y,j)&&(e._pt=u=new Er(e._pt,h,m.name,0,1,m.render,m,0,m.priority),m._props.forEach((function(t){g[t]=u})),m.priority&&(f=1)),!p||_)for(c in i)lt[c]&&(m=nr(c,i,e,y,h,j))?m.priority&&(f=1):g[c]=u=rr.call(e,h,c,"get",i[c],y,j,0,b.stringFilter);e._op&&e._op[a]&&e.kill(h,e._op[a]),F&&e._pt&&(Qe=e,l.killTweensOf(h,g,e.globalTime(r)),v=!e.parent,Qe=0),e._pt&&O&&(at[d.id]=1)}f&&wr(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!v,I&&r<=0&&N.render(w,!0,!0)},or=function(t,e,r,n){var i,o,s=e.ease||n||"power1.inOut";if(F(e))o=r[t]||(r[t]=[]),e.forEach((function(t,r){return o.push({t:r/(e.length-1)*100,v:t,e:s})}));else for(i in e)o=r[i]||(r[i]=[]),"ease"===i||o.push({t:parseFloat(t),v:e[i],e:s})},sr=function(t,e,r,n,i){return I(t)?t.call(e,r,n,i):k(t)&&~t.indexOf("random(")?be(t):t},ar=ft+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",lr={};gt(ar+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return lr[t]=1}));var cr=function(t){function e(e,r,i,s){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var c,u,h,f,d,p,m,g,y=(a=t.call(this,s?r:kt(r))||this).vars,_=y.duration,v=y.delay,x=y.immediateRender,w=y.stagger,E=y.overwrite,S=y.keyframes,T=y.defaults,A=y.scrollTrigger,O=y.yoyoEase,C=r.parent||l,M=(F(e)||j(e)?P(e[0]):"length"in r)?[e]:ae(e);if(a._targets=M.length?dt(M):Q("GSAP target "+e+" not found. https://gsap.com",!b.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=E,S||w||B(_)||B(v)){if(r=a.vars,(c=a.timeline=new Je({data:"nested",defaults:T||{},targets:C&&"nested"===C.data?C.vars.targets:M})).kill(),c.parent=c._dp=n(a),c._start=0,w||B(_)||B(v)){if(f=M.length,m=w&&ue(w),R(w))for(d in w)~ar.indexOf(d)&&(g||(g={}),g[d]=w[d]);for(u=0;u<f;u++)(h=Mt(r,lr)).stagger=0,O&&(h.yoyoEase=O),g&&Ot(h,g),p=M[u],h.duration=+sr(_,n(a),u,p,M),h.delay=(+sr(v,n(a),u,p,M)||0)-a._delay,!w&&1===f&&h.delay&&(a._delay=v=h.delay,a._start+=v,h.delay=0),c.to(p,h,m?m(u,p,M):0),c._ease=Fe.none;c.duration()?_=v=0:a.timeline=0}else if(S){kt(At(c.vars.defaults,{ease:"none"})),c._ease=qe(S.ease||r.ease||"none");var k,I,L,z=0;if(F(S))S.forEach((function(t){return c.to(M,t,">")})),c.duration();else{for(d in h={},S)"ease"===d||"easeEach"===d||or(d,S[d],h,S.easeEach);for(d in h)for(k=h[d].sort((function(t,e){return t.t-e.t})),z=0,u=0;u<k.length;u++)(L={ease:(I=k[u]).e,duration:(I.t-(u?k[u-1].t:0))/100*_})[d]=I.v,c.to(M,L,z),z+=L.duration;c.duration()<_&&c.to({},{duration:_-c.duration()})}}_||a.duration(_=c.duration())}else a.timeline=0;return!0!==E||o||(Qe=n(a),l.killTweensOf(M),Qe=0),Gt(C,n(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(x||!_&&!S&&a._start===_t(C._time)&&D(x)&&Bt(n(a))&&"nested"!==C.data)&&(a._tTime=-1e-8,a.render(Math.max(0,-v)||0)),A&&qt(n(a),A),a}i(e,t);var r=e.prototype;return r.render=function(t,e,r){var n,i,o,a,l,c,u,h,f,d=this._time,p=this._tDur,m=this._dur,g=t<0,y=t>p-E&&!g?p:t<E?0:t;if(m){if(y!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g||this._lazy){if(n=y,h=this.timeline,this._repeat){if(a=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*a+t,e,r);if(n=_t(y%a),y===p?(o=this._repeat,n=m):(o=~~(l=_t(y/a)))&&o===l?(n=m,o--):n>m&&(n=m),(c=this._yoyo&&1&o)&&(f=this._yEase,n=m-n),l=Ft(this._tTime,a),n===d&&!r&&this._initted&&o===l)return this._tTime=y,this;o!==l&&(h&&this._yEase&&Ge(h,c),this.vars.repeatRefresh&&!c&&!this._lock&&n!==a&&this._initted&&(this._lock=r=1,this.render(_t(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(Ht(this,g?t:n,r,e,y))return this._tTime=0,this;if(!(d===this._time||r&&this.vars.repeatRefresh&&o!==l))return this;if(m!==this._dur)return this.render(t,e,r)}if(this._tTime=y,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(f||this._ease)(n/m),this._from&&(this.ratio=u=1-u),!d&&y&&!e&&!l&&(Se(this,"onStart"),this._tTime!==y))return this;for(i=this._pt;i;)i.r(u,i.d),i=i._next;h&&h.render(t<0?t:h._dur*h._ease(n/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&zt(this,t,0,r),Se(this,"onUpdate")),this._repeat&&o!==l&&this.vars.onRepeat&&!e&&this.parent&&Se(this,"onRepeat"),y!==this._tDur&&y||this._tTime!==y||(g&&!this._onUpdate&&zt(this,t,0,!0),(t||!m)&&(y===this._tDur&&this._ts>0||!y&&this._ts<0)&&Lt(this,1),e||g&&!d||!(y||d||c)||(Se(this,y===p?"onComplete":"onReverseComplete",!0),this._prom&&!(y<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,r,n){var i,o,a,l=t.ratio,c=e<0||!e&&(!t._start&&Wt(t)&&(t._initted||!Zt(t))||(t._ts<0||t._dp._ts<0)&&!Zt(t))?0:1,u=t._rDelay,h=0;if(u&&t._repeat&&(h=ee(0,t._tDur,e),o=Ft(h,u),t._yoyo&&1&o&&(c=1-c),o!==Ft(t._tTime,u)&&(l=1-c,t.vars.repeatRefresh&&t._initted&&t.invalidate())),c!==l||s||n||t._zTime===E||!e&&t._zTime){if(!t._initted&&Ht(t,e,n,r,h))return;for(a=t._zTime,t._zTime=e||(r?E:0),r||(r=e&&!a),t.ratio=c,t._from&&(c=1-c),t._time=0,t._tTime=h,i=t._pt;i;)i.r(c,i.d),i=i._next;e<0&&zt(t,e,0,!0),t._onUpdate&&!r&&Se(t,"onUpdate"),h&&t._repeat&&!r&&t.parent&&Se(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===c&&(c&&Lt(t,1),r||s||(Se(t,c?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},r.targets=function(){return this._targets},r.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},r.resetTo=function(t,e,r,n,i){m||Be.wake(),this._ts||this.play();var o=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ir(this,o),function(t,e,r,n,i,o,s,a){var l,c,u,h,f=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!f)for(f=t._ptCache[e]=[],u=t._ptLookup,h=t._targets.length;h--;){if((l=u[h][e])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==e&&l.fp!==e;)l=l._next;if(!l)return tr=1,t.vars[e]="+=0",ir(t,s),tr=0,a?Q(e+" not eligible for reset"):1;f.push(l)}for(h=f.length;h--;)(l=(c=f[h])._pt||c).s=!n&&0!==n||i?l.s+(n||0)+o*l.c:n,l.c=r-l.s,c.e&&(c.e=yt(r)+re(c.e)),c.b&&(c.b=l.s+re(c.b))}(this,t,e,r,n,this._ease(o/this._dur),o,i)?this.resetTo(t,e,r,n,1):(Ut(this,0),this.parent||It(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Te(this):this.scrollTrigger&&this.scrollTrigger.kill(!!s),this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Qe&&!0!==Qe.vars.overwrite)._first||Te(this),this.parent&&r!==this.timeline.totalDuration()&&Xt(this,this._dur*this.timeline._tDur/r,0,1),this}var n,i,o,a,l,c,u,h=this._targets,f=t?ae(t):h,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var r=t.length,n=r===e.length;n&&r--&&t[r]===e[r];);return r<0}(h,f))return"all"===e&&(this._pt=0),Te(this);for(n=this._op=this._op||[],"all"!==e&&(k(e)&&(l={},gt(e,(function(t){return l[t]=1})),e=l),e=function(t,e){var r,n,i,o,s=t[0]?pt(t[0]).harness:0,a=s&&s.aliases;if(!a)return e;for(n in r=Ot({},e),a)if(n in r)for(i=(o=a[n].split(",")).length;i--;)r[o[i]]=r[n];return r}(h,e)),u=h.length;u--;)if(~f.indexOf(h[u]))for(l in i=d[u],"all"===e?(n[u]=e,a=i,o={}):(o=n[u]=n[u]||{},a=e),a)(c=i&&i[l])&&("kill"in c.d&&!0!==c.d.kill(l)||Pt(this,c,"_pt"),delete i[l]),"all"!==o&&(o[l]=1);return this._initted&&!this._pt&&p&&Te(this),this},e.to=function(t,r){return new e(t,r,arguments[2])},e.from=function(t,e){return Qt(1,arguments)},e.delayedCall=function(t,r,n,i){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:r,onReverseComplete:r,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:i})},e.fromTo=function(t,e,r){return Qt(2,arguments)},e.set=function(t,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(t,r)},e.killTweensOf=function(t,e,r){return l.killTweensOf(t,e,r)},e}(Ke);At(cr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),gt("staggerTo,staggerFrom,staggerFromTo",(function(t){cr[t]=function(){var e=new Je,r=ie.call(arguments,0);return r.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,r)}}));var ur=function(t,e,r){return t[e]=r},hr=function(t,e,r){return t[e](r)},fr=function(t,e,r,n){return t[e](n.fp,r)},dr=function(t,e,r){return t.setAttribute(e,r)},pr=function(t,e){return I(t[e])?hr:L(t[e])&&t.setAttribute?dr:ur},mr=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},gr=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},yr=function(t,e){var r=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+n,r=r._next;n+=e.c}e.set(e.t,e.p,n,e)},_r=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},vr=function(t,e,r,n){for(var i,o=this._pt;o;)i=o._next,o.p===n&&o.modifier(t,e,r),o=i},br=function(t){for(var e,r,n=this._pt;n;)r=n._next,n.p===t&&!n.op||n.op===t?Pt(this,n,"_pt"):n.dep||(e=1),n=r;return!e},xr=function(t,e,r,n){n.mSet(t,e,n.m.call(n.tween,r,n.mt),n)},wr=function(t){for(var e,r,n,i,o=t._pt;o;){for(e=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:i=o,o=e}t._pt=n},Er=function(){function t(t,e,r,n,i,o,s,a,l){this.t=e,this.s=n,this.c=i,this.p=r,this.r=o||mr,this.d=s||this,this.set=a||ur,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,r){this.mSet=this.mSet||this.set,this.set=xr,this.m=t,this.mt=r,this.tween=e},t}();gt(ft+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return ot[t]=1})),X.TweenMax=X.TweenLite=cr,X.TimelineLite=X.TimelineMax=Je,l=new Je({sortChildren:!1,defaults:x,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),b.stringFilter=ze;var Sr=[],Tr={},Ar=[],Or=0,Cr=0,Mr=function(t){return(Tr[t]||Ar).map((function(t){return t()}))},kr=function(){var t=Date.now(),e=[];t-Or>2&&(Mr("matchMediaInit"),Sr.forEach((function(t){var r,n,i,o,s=t.queries,a=t.conditions;for(n in s)(r=c.matchMedia(s[n]).matches)&&(i=1),r!==a[n]&&(a[n]=r,o=1);o&&(t.revert(),i&&e.push(t))})),Mr("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),Or=t,Mr("matchMedia"))},Ir=function(){function t(t,e){this.selector=e&&le(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Cr++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,r){I(t)&&(r=e,e=t,t=I);var n=this,i=function(){var t,i=a,o=n.selector;return i&&i!==n&&i.data.push(n),r&&(n.selector=le(r)),a=n,t=e.apply(n,arguments),I(t)&&n._r.push(t),a=i,n.selector=o,n.isReverted=!1,t};return n.last=i,t===I?i(n,(function(t){return n.add(null,t)})):t?n[t]=i:i},e.ignore=function(t){var e=a;a=null,t(this),a=e},e.getTweens=function(){var e=[];return this.data.forEach((function(r){return r instanceof t?e.push.apply(e,r.getTweens()):r instanceof cr&&!(r.parent&&"nested"===r.parent.data)&&e.push(r)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var r=this;if(t?function(){for(var e,n=r.getTweens(),i=r.data.length;i--;)"isFlip"===(e=r.data[i]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),i=r.data.length;i--;)(e=r.data[i])instanceof Je?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof cr)&&e.revert&&e.revert(t);r._r.forEach((function(e){return e(t,r)})),r.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=Sr.length;n--;)Sr[n].id===this.id&&Sr.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),Pr=function(){function t(t){this.contexts=[],this.scope=t,a&&a.data.push(this)}var e=t.prototype;return e.add=function(t,e,r){R(t)||(t={matches:t});var n,i,o,s=new Ir(0,r||this.scope),l=s.conditions={};for(i in a&&!s.selector&&(s.selector=a.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t,t)"all"===i?o=1:(n=c.matchMedia(t[i]))&&(Sr.indexOf(s)<0&&Sr.push(s),(l[i]=n.matches)&&(o=1),n.addListener?n.addListener(kr):n.addEventListener("change",kr));return o&&e(s,(function(t){return s.add(null,t)})),this},e.revert=function(t){this.kill(t||{})}
2,e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Lr={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach((function(t){return Oe(t)}))},timeline:function(t){return new Je(t)},getTweensOf:function(t,e){return l.getTweensOf(t,e)},getProperty:function(t,e,r,n){k(t)&&(t=ae(t)[0]);var i=pt(t||{}).get,o=r?Tt:St;return"native"===r&&(r=""),t?e?o((lt[e]&&lt[e].get||i)(t,e,r,n)):function(e,r,n){return o((lt[e]&&lt[e].get||i)(t,e,r,n))}:t},quickSetter:function(t,e,r){if((t=ae(t)).length>1){var n=t.map((function(t){return zr.quickSetter(t,e,r)})),i=n.length;return function(t){for(var e=i;e--;)n[e](t)}}t=t[0]||{};var o=lt[e],s=pt(t),a=s.harness&&(s.harness.aliases||{})[e]||e,l=o?function(e){var n=new o;p._pt=0,n.init(t,r?e+r:e,p,0,[t]),n.render(1,n),p._pt&&_r(1,p)}:s.set(t,a);return o?l:function(e){return l(t,a,r?e+r:e,s,1)}},quickTo:function(t,e,r){var n,i=zr.to(t,At(((n={})[e]="+=0.1",n.paused=!0,n.stagger=0,n),r||{})),o=function(t,r,n){return i.resetTo(e,t,r,n)};return o.tween=i,o},isTweening:function(t){return l.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=qe(t.ease,x.ease)),Ct(x,t||{})},config:function(t){return Ct(b,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,n=t.plugins,i=t.defaults,o=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!lt[t]&&!X[t]&&Q(e+" effect requires "+t+" plugin.")})),ct[e]=function(t,e,n){return r(ae(t),At(e||{},i),n)},o&&(Je.prototype[e]=function(t,r,n){return this.add(ct[e](t,R(r)?r:(n=r)&&{},this),n)})},registerEase:function(t,e){Fe[t]=qe(e)},parseEase:function(t,e){return arguments.length?qe(t,e):Fe},getById:function(t){return l.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var r,n,i=new Je(t);for(i.smoothChildTiming=D(t.smoothChildTiming),l.remove(i),i._dp=0,i._time=i._tTime=l._time,r=l._first;r;)n=r._next,!e&&!r._dur&&r instanceof cr&&r.vars.onComplete===r._targets[0]||Gt(i,r,r._start-r._delay),r=n;return Gt(l,i,0),i},context:function(t,e){return t?new Ir(t,e):a},matchMedia:function(t){return new Pr(t)},matchMediaRefresh:function(){return Sr.forEach((function(t){var e,r,n=t.conditions;for(r in n)n[r]&&(n[r]=!1,e=1);e&&t.revert()}))||kr()},addEventListener:function(t,e){var r=Tr[t]||(Tr[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function(t,e){var r=Tr[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},utils:{wrap:_e,wrapYoyo:ve,distribute:ue,random:de,snap:fe,normalize:ge,getUnit:re,clamp:ne,splitColor:Ie,toArray:ae,selector:le,mapRange:xe,pipe:pe,unitize:me,interpolate:we,shuffle:ce},install:K,effects:ct,ticker:Be,updateRoot:Je.updateRoot,plugins:lt,globalTimeline:l,core:{PropTween:Er,globals:tt,Tween:cr,Timeline:Je,Animation:Ke,getCache:pt,_removeLinkedListItem:Pt,reverting:function(){return s},context:function(t){return t&&a&&(a.data.push(t),t._ctx=a),a},suppressOverwrites:function(t){return o=t}}};gt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Lr[t]=cr[t]})),Be.add(Je.updateRoot),p=Lr.to({},{duration:0});var Rr=function(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r},Dr=function(t,e){return{name:t,headless:1,rawVars:1,init:function(t,r,n){n._onInit=function(t){var n,i;if(k(r)&&(n={},gt(r,(function(t){return n[t]=1})),r=n),e){for(i in n={},r)n[i]=e(r[i]);r=n}!function(t,e){var r,n,i,o=t._targets;for(r in e)for(n=o.length;n--;)(i=t._ptLookup[n][r])&&(i=i.d)&&(i._pt&&(i=Rr(i,r)),i&&i.modifier&&i.modifier(e[r],t,o[n],r))}(t,r)}}}},zr=Lr.registerPlugin({name:"attr",init:function(t,e,r,n,i){var o,s,a;for(o in this.tween=r,e)a=t.getAttribute(o)||"",(s=this.add(t,"setAttribute",(a||0)+"",e[o],n,i,0,0,o)).op=o,s.b=a,this._props.push(o)},render:function(t,e){for(var r=e._pt;r;)s?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Dr("roundProps",he),Dr("modifiers"),Dr("snap",fe))||Lr;cr.version=Je.version=zr.version="3.14.2",f=1,z()&&je();var Br=Fe.Power0,jr=Fe.Power1,Fr=Fe.Power2,Nr=Fe.Power3,$r=Fe.Power4,Ur=Fe.Linear,Vr=Fe.Quad,Gr=Fe.Cubic,qr=Fe.Quart,Hr=Fe.Quint,Wr=Fe.Strong,Zr=Fe.Elastic,Xr=Fe.Back,Yr=Fe.SteppedEase,Kr=Fe.Bounce,Jr=Fe.Sine,Qr=Fe.Expo,tn=Fe.Circ},5303:(t,e,r)=>{t.exports=r(9457)},9402:t=>{!function(e){if("undefined"!=typeof window){var r=!0,n="",i=0,o="",s=null,a="",l=!1,c={resize:1,click:1},u=128,h=!0,f=1,d="bodyOffset",p=d,m=!0,g="",y={},_=32,v=null,b=!1,x=!1,w="[iFrameSizer]",E=w.length,S="",T={max:1,min:1,bodyScroll:1,documentElementScroll:1},A="child",O=window.parent,C="*",M=0,k=!1,I=null,P=16,L=1,R="scroll",D=R,z=window,B=function(){ot("onMessage function not defined")},j=function(){},F=function(){},N={height:function(){return ot("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return ot("Custom width calculation function not defined"),document.body.scrollWidth}},$={},U=!1;try{var V=Object.create({},{passive:{get:function(){U=!0}}});window.addEventListener("test",tt,V),window.removeEventListener("test",tt,V)}catch(t){}var G,q,H,W,Z,X,Y,K={bodyOffset:function(){return document.body.offsetHeight+gt("marginTop")+gt("marginBottom")},offset:function(){return K.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return N.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,_t(K))},min:function(){return Math.min.apply(null,_t(K))},grow:function(){return K.max()},lowestElement:function(){return Math.max(K.bodyOffset()||K.documentElementOffset(),yt("bottom",bt()))},taggedElement:function(){return vt("bottom","data-iframe-height")}},J={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return N.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(J.bodyScroll(),J.documentElementScroll())},max:function(){return Math.max.apply(null,_t(J))},min:function(){return Math.min.apply(null,_t(J))},rightMostElement:function(){return yt("right",bt())},taggedElement:function(){return vt("right","data-iframe-width")}}
2,Q=(G=xt,Z=null,X=0,Y=function(){X=Date.now(),Z=null,W=G.apply(q,H),Z||(q=H=null)},function(){var t=Date.now();X||(X=t);var e=P-(t-X);return q=this,H=arguments,e<=0||e>P?(Z&&(clearTimeout(Z),Z=null),X=t,W=G.apply(q,H),Z||(q=H=null)):Z||(Z=setTimeout(Y,e)),W});et(window,"message",(function(e){var r={init:function(){g=e.data,O=e.source,st(),h=!1,setTimeout((function(){m=!1}),u)},reset:function(){m?it("Page reset ignored by init"):(it("Page size reset by host page"),St("resetPage"))},resize:function(){wt("resizeParent","Parent window requested size check")},moveToAnchor:function(){y.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var t=i();it("PageInfoFromParent called from parent: "+t),F(JSON.parse(t)),it(" --")},message:function(){var t=i();it("onMessage called from parent: "+t),B(JSON.parse(t)),it(" --")}};function n(){return e.data.split("]")[1].split(":")[0]}function i(){return e.data.substr(e.data.indexOf(":")+1)}function o(){return e.data.split(":")[2]in{true:1,false:1}}function s(){var i=n();i in r?r[i]():!t.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||o()||ot("Unexpected message ("+e.data+")")}w===(""+e.data).substr(0,E)&&(!1===h?s():o()?r.init():it('Ignored message of type "'+n()+'". Received before initialization.'))})),et(window,"readystatechange",Ot),Ot()}function tt(){}function et(t,e,r,n){t.addEventListener(e,r,!!U&&(n||{}))}function rt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function nt(t){return w+"["+S+"] "+t}function it(t){b&&"object"==typeof window.console&&console.log(nt(t))}function ot(t){"object"==typeof window.console&&console.warn(nt(t))}function st(){var t;!function(){function t(t){return"true"===t}var s=g.substr(E).split(":");S=s[0],i=e!==s[1]?Number(s[1]):i,l=e!==s[2]?t(s[2]):l,b=e!==s[3]?t(s[3]):b,_=e!==s[4]?Number(s[4]):_,r=e!==s[6]?t(s[6]):r,o=s[7],p=e!==s[8]?s[8]:p,n=s[9],a=s[10],M=e!==s[11]?Number(s[11]):M,y.enable=e!==s[12]&&t(s[12]),A=e!==s[13]?s[13]:A,D=e!==s[14]?s[14]:D,x=e!==s[15]?Boolean(s[15]):x}(),it("Initialising iFrame ("+window.location.href+")"),function(){function t(){var t=window.iFrameResizer;it("Reading data from page: "+JSON.stringify(t)),Object.keys(t).forEach(at,t),B="onMessage"in t?t.onMessage:B,j="onReady"in t?t.onReady:j,C="targetOrigin"in t?t.targetOrigin:C,p="heightCalculationMethod"in t?t.heightCalculationMethod:p,D="widthCalculationMethod"in t?t.widthCalculationMethod:D}function e(t,e){return"function"==typeof t&&(it("Setup custom "+e+"CalcMethod"),N[e]=t,t="custom"),t}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(t(),p=e(p,"height"),D=e(D,"width"));it("TargetOrigin for parent set to: "+C)}(),function(){e===o&&(o=i+"px");lt("margin",function(t,e){-1!==e.indexOf("-")&&(ot("Negative CSS value ignored for "+t),e="");return e}("margin",o))}(),lt("background",n),lt("padding",a),(t=document.createElement("div")).style.clear="both",t.style.display="block",t.style.height="0",document.body.appendChild(t),ft(),dt(),document.documentElement.style.height="",document.body.style.height="",it('HTML & body height set to "auto"'),it("Enable public methods"),z.parentIFrame={autoResize:function(t){return!0===t&&!1===r?(r=!0,pt()):!1===t&&!0===r&&(r=!1,ut("remove"),null!==s&&s.disconnect(),clearInterval(v)),At(0,0,"autoResize",JSON.stringify(r)),r},close:function(){At(0,0,"close")},getId:function(){return S},getPageInfo:function(t){"function"==typeof t?(F=t,At(0,0,"pageInfo")):(F=function(){},At(0,0,"pageInfoStop"))},moveToAnchor:function(t){y.findTarget(t)},reset:function(){Tt("parentIFrame.reset")},scrollTo:function(t,e){At(e,t,"scrollTo")},scrollToOffset:function(t,e){At(e,t,"scrollToOffset")},sendMessage:function(t,e){At(0,0,"message",JSON.stringify(t),e)},setHeightCalculationMethod:function(t){p=t,ft()},setWidthCalculationMethod:function(t){D=t,dt()},setTargetOrigin:function(t){it("Set targetOrigin: "+t),C=t},size:function(t,e){wt("size","parentIFrame.size("+(t||"")+(e?","+e:"")+")",t,e)}},function(){if(!0!==x)return;function t(t){At(0,0,t.type,t.screenY+":"+t.screenX)}function e(e,r){it("Add event listener: "+r),et(window.document,e,t)}
vendor: 4,834 bytes, line 2
2e("mouseenter","Mouse Enter"),e("mouseleave","Mouse Leave")}(),pt(),y=function(){function t(){return{x:window.pageXOffset!==e?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==e?window.pageYOffset:document.documentElement.scrollTop}}function r(e){var r=e.getBoundingClientRect(),n=t();return{x:parseInt(r.left,10)+parseInt(n.x,10),y:parseInt(r.top,10)+parseInt(n.y,10)}}function n(t){function n(t){var e=r(t);it("Moving to in page link (#"+i+") at x: "+e.x+" y: "+e.y),At(e.y,e.x,"scrollToOffset")}var i=t.split("#")[1]||t,o=decodeURIComponent(i),s=document.getElementById(o)||document.getElementsByName(o)[0];e!==s?n(s):(it("In page link (#"+i+") not found in iFrame, so sending to parent"),At(0,0,"inPageLink","#"+i))}function i(){var t=window.location.hash,e=window.location.href;""!==t&&"#"!==t&&n(e)}function o(){function t(t){function e(t){t.preventDefault(),n(this.getAttribute("href"))}"#"!==t.getAttribute("href")&&et(t,"click",e)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),t)}function s(){et(window,"hashchange",i)}function a(){setTimeout(i,u)}function l(){Array.prototype.forEach&&document.querySelectorAll?(it("Setting up location.hash handlers"),o(),s(),a()):ot("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}y.enable?l():it("In page linking not enabled");return{findTarget:n}}(),wt("init","Init message from host page"),j()}function at(t){var e=t.split("Callback");if(2===e.length){var r="on"+e[0].charAt(0).toUpperCase()+e[0].slice(1);this[r]=this[t],delete this[t],ot("Deprecated: '"+t+"' has been renamed '"+r+"'. The old method will be removed in the next major version.")}}function lt(t,r){e!==r&&""!==r&&"null"!==r&&(document.body.style[t]=r,it("Body "+t+' set to "'+r+'"'))}function ct(t){var e={add:function(e){function r(){wt(t.eventName,t.eventType)}$[e]=r,et(window,e,r,{passive:!0})},remove:function(t){var e,r,n,i=$[t];delete $[t],e=window,r=t,n=i,e.removeEventListener(r,n,!1)}};t.eventNames&&Array.prototype.map?(t.eventName=t.eventNames[0],t.eventNames.map(e[t.method])):e[t.method](t.eventName),it(rt(t.method)+" event listener: "+t.eventType)}function ut(t){ct({method:t,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),ct({method:t,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),ct({method:t,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),ct({method:t,eventType:"Input",eventName:"input"}),ct({method:t,eventType:"Mouse Up",eventName:"mouseup"}),ct({method:t,eventType:"Mouse Down",eventName:"mousedown"}),ct({method:t,eventType:"Orientation Change",eventName:"orientationchange"}),ct({method:t,eventType:"Print",eventName:["afterprint","beforeprint"]}),ct({method:t,eventType:"Ready State Change",eventName:"readystatechange"}),ct({method:t,eventType:"Touch Start",eventName:"touchstart"}),ct({method:t,eventType:"Touch End",eventName:"touchend"}),ct({method:t,eventType:"Touch Cancel",eventName:"touchcancel"}),ct({method:t,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),ct({method:t,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),ct({method:t,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===A&&ct({method:t,eventType:"IFrame Resized",eventName:"resize"})}function ht(t,e,r,n){return e!==t&&(t in r||(ot(t+" is not a valid option for "+n+"CalculationMethod."),t=e),it(n+' calculation method set to "'+t+'"')),t}function ft(){p=ht(p,d,K,"height")}function dt(){D=ht(D,R,J,"width")}function pt(){var t;!0===r?(ut("add"),t=0>_,window.MutationObserver||window.WebKitMutationObserver?t?mt():s=function(){function t(t){function e(t){!1===t.complete&&(it("Attach listeners to "+t.src),t.addEventListener("load",i,!1),t.addEventListener("error",o,!1),l.push(t))}"attributes"===t.type&&"src"===t.attributeName?e(t.target):"childList"===t.type&&Array.prototype.forEach.call(t.target.querySelectorAll("img"),e)}function e(t){l.splice(l.indexOf(t),1)}function r(t){it("Remove listeners from "+t.src),t.removeEventListener("load",i,!1),t.removeEventListener("error",o,!1),e(t)}function n(t,e,n){r(t.target),wt(e,n+": "+t.target.src)}function i(t){n(t,"imageLoad","Image loaded")}function o(t){n(t,"imageLoadFailed","Image load failed")}function s(e){wt("mutationObserver","mutationObserver: "+e[0].target+" "+e[0].type),e.forEach(t)}function a(){var t=document.querySelector("body"),e={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};
2return u=new c(s),it("Create body MutationObserver"),u.observe(t,e),u}var l=[],c=window.MutationObserver||window.WebKitMutationObserver,u=a();return{disconnect:function(){"disconnect"in u&&(it("Disconnect body MutationObserver"),u.disconnect(),l.forEach(r))}}}():(it("MutationObserver not supported in this browser!"),mt())):it("Auto Resize disabled")}function mt(){0!==_&&(it("setInterval: "+_+"ms"),v=setInterval((function(){wt("interval","setInterval: "+_)}),Math.abs(_)))}function gt(t,e){var r=0;return e=e||document.body,r=null!==(r=document.defaultView.getComputedStyle(e,null))?r[t]:0,parseInt(r,10)}function yt(t,e){for(var r=e.length,n=0,i=0,o=rt(t),s=Date.now(),a=0;a<r;a++)(n=e[a].getBoundingClientRect()[t]+gt("margin"+o,e[a]))>i&&(i=n);return s=Date.now()-s,it("Parsed "+r+" HTML elements"),it("Element position calculated in "+s+"ms"),function(t){t>P/2&&it("Event throttle increased to "+(P=2*t)+"ms")}(s),i}function _t(t){return[t.bodyOffset(),t.bodyScroll(),t.documentElementOffset(),t.documentElementScroll()]}function vt(t,e){var r=document.querySelectorAll("["+e+"]");return 0===r.length&&(ot("No tagged elements ("+e+") found on page"),document.querySelectorAll("body *")),yt(t,r)}function bt(){return document.querySelectorAll("body *")}function xt(t,r,n,i){var o,s;!function(){function t(t,e){return!(Math.abs(t-e)<=M)}return o=e!==n?n:K[p](),s=e!==i?i:J[D](),t(f,o)||l&&t(L,s)}()&&"init"!==t?!(t in{init:1,interval:1,size:1})&&(p in T||l&&D in T)?Tt(r):t in{interval:1}||it("No change in size detected"):(Et(),At(f=o,L=s,t))}function wt(t,e,r,n){k&&t in c?it("Trigger event cancelled: "+t):(t in{reset:1,resetPage:1,init:1}||it("Trigger event: "+e),"init"===t?xt(t,e,r,n):Q(t,e,r,n))}function Et(){k||(k=!0,it("Trigger event lock on")),clearTimeout(I),I=setTimeout((function(){k=!1,it("Trigger event lock off"),it("--")}),u)}function St(t){f=K[p](),L=J[D](),At(f,L,t)}function Tt(t){var e=p;p=d,it("Reset trigger event: "+t),Et(),St("reset"),p=e}function At(t,r,n,i,o){var s;e===o?o=C:it("Message targetOrigin: "+o),it("Sending message to host page ("+(s=S+":"+t+":"+r+":"+n+(e!==i?":"+i:""))+")"),O.postMessage(w+s,o)}function Ot(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()},6702:(t,e)=>{var r,n,i;!function(o){if("undefined"!=typeof window){var s,a=0,l=!1,c=!1,u="message".length,h="[iFrameSizer]",f=h.length,d=null,p=window.requestAnimationFrame,m={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},g={},y=null,_={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){O("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},v={};window.jQuery&&((s=window.jQuery).fn?s.fn.iFrameResize||(s.fn.iFrameResize=function(t){return this.filter("iframe").each((function(e,r){$(r,t)})).end()}):A("","Unable to bind to jQuery, it is not fully loaded.")),n=[],(i="function"==typeof(r=H)?r.apply(e,n):r)===o||(t.exports=i),window.iFrameResize=window.iFrameResize||H()}function b(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function x(t,e,r){t.addEventListener(e,r,!1)}function w(t,e,r){t.removeEventListener(e,r,!1)}function E(t){return h+"["+function(t){var e="Host page: "+t;return window.top!==window.self&&(e=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+t:"Nested host page: "+t),e}(t)+"]"}function S(t){return g[t]?g[t].log:l}function T(t,e){C("log",t,e,S(t))}function A(t,e){C("info",t,e,S(t))}function O(t,e){C("warn",t,e,!0)}function C(t,e,r,n){!0===n&&"object"==typeof window.console&&console[t](E(e),r)}function M(t){function e(){i("Height"),i("Width"),j((function(){B(I),R($),m("onResized",I)}),I,"init")}function r(t){return"border-box"!==t.boxSizing?0:(t.paddingTop?parseInt(t.paddingTop,10):0)+(t.paddingBottom?parseInt(t.paddingBottom,10):0)}function n(t){return"border-box"!==t.boxSizing?0:(t.borderTopWidth?parseInt(t.borderTopWidth,10):0)+(t.borderBottomWidth?parseInt(t.borderBottomWidth,10):0)}function i(t){var e=Number(g[$]["max"+t]),r=Number(g[$]["min"+t]),n=t.toLowerCase(),i=Number(I[n]);T($,"Checking "+n+" is in range "+r+"-"+e),i<r&&(i=r,T($,"Set "+n+" to min value")),i>e&&(i=e,T($,"Set "+n+" to max value")),I[n]=""+i}function o(t){return M.substr(M.indexOf(":")+u+t)}function s(t,e){var r,n,i;r=function(){var r,n;F("Send Page Info","pageInfo:"+(r=document.body.getBoundingClientRect(),n=I.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-r.top,10),offsetLeft:parseInt(n.left-r.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),t,e)},n=32,v[i=e]||(v[i]=setTimeout((function(){v[i]=null,r()}),n))}function a(t){var e=t.getBoundingClientRect();return L($),{x:Math.floor(Number(e.left)+Number(d.x)),y:Math.floor(Number(e.top)+Number(d.y))}}function l(t){var e=t?a(I.iframe):{x:0,y:0},r={x:Number(I.width)+e.x,y:Number(I.height)+e.y};T($,"Reposition requested from iFrame (offset x:"+e.x+" y:"+e.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(t?"Offset":"")](r.x,r.y):O($,"Unable to scroll to requested position, window.parentIFrame not found"):(d=r,c(),T($,"--"))}function c(){!1!==m("onScroll",d)?R($):D()}function p(t){var e={};if(0===Number(I.width)&&0===Number(I.height)){var r=o(9).split(":");e={x:r[1],y:r[0]}}else e={x:I.width,y:I.height};m(t,{iframe:I.iframe,screenX:Number(e.x),screenY:Number(e.y),type:I.type})}function m(t,e){return k($,t,e)}var y,_,b,E,S,C,M=t.data,I={},$=null;"[iFrameResizerChild]Ready"===M?function(){for(var t in g)F("iFrame requested init",N(t),g[t].iframe,t)}():h===(""+M).substr(0,f)&&M.substr(f).split(":")[0]in g?(b=M.substr(f).split(":"),E=b[1]?parseInt(b[1],10):0,S=g[b[0]]&&g[b[0]].iframe,C=getComputedStyle(S),I={iframe:S,id:b[0],height:E+r(C)+n(C),width:b[2],t
2ype:b[3]},$=I.id,g[$]&&(g[$].loaded=!0),(_=I.type in{true:1,false:1,undefined:1})&&T($,"Ignoring init message from meta parent page"),!_&&function(t){var e=!0;return g[t]||(e=!1,O(I.type+" No settings for "+t+". Message was: "+M)),e}($)&&(T($,"Received: "+M),y=!0,null===I.iframe&&(O($,"IFrame ("+I.id+") not found"),y=!1),y&&function(){var e,r=t.origin,n=g[$]&&g[$].checkOrigin;if(n&&""+r!="null"&&!(n.constructor===Array?function(){var t=0,e=!1;for(T($,"Checking connection is from allowed list of origins: "+n);t<n.length;t++)if(n[t]===r){e=!0;break}return e}():(e=g[$]&&g[$].remoteHost,T($,"Checking connection is from: "+e),r===e)))throw new Error("Unexpected message received from: "+r+" for "+I.iframe.id+". Message was: "+t.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(g[$]&&g[$].firstRun&&g[$]&&(g[$].firstRun=!1),I.type){case"close":P(I.iframe);break;case"message":t=o(6),T($,"onMessage passed: {iframe: "+I.iframe.id+", message: "+t+"}"),m("onMessage",{iframe:I.iframe,message:JSON.parse(t)}),T($,"--");break;case"mouseenter":p("onMouseEnter");break;case"mouseleave":p("onMouseLeave");break;case"autoResize":g[$].autoResize=JSON.parse(o(9));break;case"scrollTo":l(!1);break;case"scrollToOffset":l(!0);break;case"pageInfo":s(g[$]&&g[$].iframe,$),function(){function t(t,n){function i(){g[r]?s(g[r].iframe,r):e()}["scroll","resize"].forEach((function(e){T(r,t+e+" listener for sendPageInfo"),n(window,e,i)}))}function e(){t("Remove ",w)}var r=$;t("Add ",x),g[r]&&(g[r].stopPageInfo=e)}();break;case"pageInfoStop":g[$]&&g[$].stopPageInfo&&(g[$].stopPageInfo(),delete g[$].stopPageInfo);break;case"inPageLink":!function(t){var e,r=t.split("#")[1]||"",n=decodeURIComponent(r),i=document.getElementById(n)||document.getElementsByName(n)[0];i?(e=a(i),T($,"Moving to in page link (#"+r+") at x: "+e.x+" y: "+e.y),d={x:e.x,y:e.y},c(),T($,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(r):T($,"In page link #"+r+" not found and window.parentIFrame not found"):T($,"In page link #"+r+" not found")}(o(9));break;case"reset":z(I);break;case"init":e(),m("onInit",I.iframe);break;default:0===Number(I.width)&&0===Number(I.height)?O("Unsupported message received ("+I.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):e()}var t}())):A($,"Ignored: "+M)}function k(t,e,r){var n=null,i=null;if(g[t]){if("function"!=typeof(n=g[t][e]))throw new TypeError(e+" on iFrame["+t+"] is not a function");i=n(r)}return i}function I(t){var e=t.id;delete g[e]}function P(t){var e=t.id;if(!1!==k(e,"onClose",e)){T(e,"Removing iFrame: "+e);try{t.parentNode&&t.parentNode.removeChild(t)}catch(t){O(t)}k(e,"onClosed",e),T(e,"--"),I(t)}else T(e,"Close iframe cancelled by onClose event")}function L(t){null===d&&T(t,"Get page position: "+(d={x:window.pageXOffset!==o?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==o?window.pageYOffset:document.documentElement.scrollTop}).x+","+d.y)}function R(t){null!==d&&(window.scrollTo(d.x,d.y),T(t,"Set page position: "+d.x+","+d.y),D())}function D(){d=null}function z(t){T(t.id,"Size reset requested by "+("init"===t.type?"host page":"iFrame")),L(t.id),j((function(){B(t),F("reset","reset",t.iframe,t.id)}),t,"reset")}function B(t){function e(e){c||"0"!==t[e]||(c=!0,T(n,"Hidden iFrame detected, creating visibility listener"),function(){function t(){function t(t){function e(e){return"0px"===(g[t]&&g[t].iframe.style[e])}function r(t){return null!==t.offsetParent}g[t]&&r(g[t].iframe)&&(e("height")||e("width"))&&F("Visibility change","resize",g[t].iframe,t)}Object.keys(g).forEach((function(e){t(e)}))}function e(e){T("window","Mutation observed: "+e[0].target+" "+e[0].type),U(t,16)}function r(){var t=document.querySelector("body"),r={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new n(e).observe(t,r)}var n=b();n&&r()}())}function r(r){!function(e){t.id?(t.iframe.style[e]=t[e]+"px",T(t.id,"IFrame ("+n+") "+e+" set to "+t[e]+"px")):T("undefined","messageData id not set")}(r),e(r)}var n=t.iframe.id;g[n]&&(g[n].sizeHeight&&r("height"),g[n].sizeWidth&&r("width"))}function j(t,e,r){r!==e.type&&p&&!window.jasmine?(T(e.id,"Requesting animation frame"),p(t)):t()}function F(t,e,r,n,i){var o,s=!1;n=n||r.id,g[n]&&(r&&"contentWindow"in r&&null!==r.contentWindow?(o=g[n]&&g[n].targetOrigin,T(n,"["+t+"] Sending msg to iframe["+n+"] ("+e+") targetOrigin: "+o),r.contentWindow.postMessage(h+e,o)):O(n,"["+t+"] IFrame("+n+") not found"),i&&g[n]&&g[n].warningTimeout&&(g[n].msgTimeout=setTimeout((function(){!g[n]||g[n].loaded||s||(s=!0,O(n,"IFrame has not responded within "+g[n].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),g[n].warningTimeout)))}function N(t){return t+":"+g[t].bodyMarginV1+":"+g[t].sizeWidth+":"+g[t].log+":"+g[t].interval+":"+g[t].enablePublicMethods+":"+g[t].autoResize+":"+g[t].bodyMargin+":"+g[t].heightCalculationMethod+":"+g[t].bodyBackgroun
2d+":"+g[t].bodyPadding+":"+g[t].tolerance+":"+g[t].inPageLinks+":"+g[t].resizeFrom+":"+g[t].widthCalculationMethod+":"+g[t].mouseEvents}function $(t,e){function r(t){var e=t.split("Callback");if(2===e.length){var r="on"+e[0].charAt(0).toUpperCase()+e[0].slice(1);this[r]=this[t],delete this[t],O(n,"Deprecated: '"+t+"' has been renamed '"+r+"'. The old method will be removed in the next major version.")}}var n=function(r){var n;return""===r&&(t.id=(n=e&&e.id||_.id+a++,null!==document.getElementById(n)&&(n+=a++),r=n),l=(e||{}).log,T(r,"Added missing iframe ID: "+r+" ("+t.src+")")),r}(t.id);n in g&&"iFrameResizer"in t?O(n,"Ignored iFrame, already setup."):(!function(e){var i;e=e||{},g[n]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(t){if("object"!=typeof t)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(r,e),function(t){for(var e in _)Object.prototype.hasOwnProperty.call(_,e)&&(g[n][e]=Object.prototype.hasOwnProperty.call(t,e)?t[e]:_[e])}(e),g[n]&&(g[n].targetOrigin=!0===g[n].checkOrigin?""===(i=g[n].remoteHost)||null!==i.match(/^(about:blank|javascript:|file:\/\/)/)?"*":i:"*")}(e),function(){switch(T(n,"IFrame scrolling "+(g[n]&&g[n].scrolling?"enabled":"disabled")+" for "+n),t.style.overflow=!1===(g[n]&&g[n].scrolling)?"hidden":"auto",g[n]&&g[n].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=g[n]?g[n].scrolling:"no"}}(),function(){function e(e){var r=g[n][e];1/0!==r&&0!==r&&(t.style[e]="number"==typeof r?r+"px":r,T(n,"Set "+e+" = "+t.style[e]))}function r(t){if(g[n]["min"+t]>g[n]["max"+t])throw new Error("Value for min"+t+" can not be greater than max"+t)}r("Height"),r("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(g[n]&&g[n].bodyMargin)&&"0"!==(g[n]&&g[n].bodyMargin)||(g[n].bodyMarginV1=g[n].bodyMargin,g[n].bodyMargin=g[n].bodyMargin+"px"),function(e){var r=b();r&&function(e){t.parentNode&&new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&P(t)}))}))})).observe(t.parentNode,{childList:!0})}(r),x(t,"load",(function(){var r,i;F("iFrame.onload",e,t,o,!0),r=g[n]&&g[n].firstRun,i=g[n]&&g[n].heightCalculationMethod in m,!r&&i&&z({iframe:t,height:0,width:0,type:"init"})})),F("init",e,t,o,!0)}(N(n)),g[n]&&(g[n].iframe.iFrameResizer={close:P.bind(null,g[n].iframe),removeListeners:I.bind(null,g[n].iframe),resize:F.bind(null,"Window resize","resize",g[n].iframe),moveToAnchor:function(t){F("Move to anchor","moveToAnchor:"+t,g[n].iframe,n)},sendMessage:function(t){F("Send Message","message:"+(t=JSON.stringify(t)),g[n].iframe,n)}}))}function U(t,e){null===y&&(y=setTimeout((function(){y=null,t()}),e))}function V(){"hidden"!==document.visibilityState&&(T("document","Trigger event: Visiblity change"),U((function(){G("Tab Visable","resize")}),16))}function G(t,e){Object.keys(g).forEach((function(r){(function(t){return g[t]&&"parent"===g[t].resizeFrom&&g[t].autoResize&&!g[t].firstRun})(r)&&F(t,e,g[r].iframe,r)}))}function q(){x(window,"message",M),x(window,"resize",(function(){var t;T("window","Trigger event: "+(t="resize")),U((function(){G("Window "+t,"resize")}),16)})),x(document,"visibilitychange",V),x(document,"-webkit-visibilitychange",V)}function H(){function t(t,r){r&&(!function(){if(!r.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==r.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+r.tagName+">")}(),$(r,t),e.push(r))}var e;return function(){var t,e=["moz","webkit","o","ms"];for(t=0;t<e.length&&!p;t+=1)p=window[e[t]+"RequestAnimationFrame"];p?p=p.bind(window):T("setup","RequestAnimationFrame not supported")}
2(),q(),function(r,n){switch(e=[],function(t){t&&t.enablePublicMethods&&O("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(r),typeof n){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(n||"iframe"),t.bind(o,r));break;case"object":t(r,n);break;default:throw new TypeError("Unexpected data type ("+typeof n+")")}return e}}}()},9457:(t,e,r)=>{var n=r(6702);e.iframeResize=n,e.iframeResizer=n,e.iframeResizerContentWindow=r(9402)},7090:t=>{!function(e,r){var n=function(t,e,r){"use strict";var n,i;if(function(){var e,r={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in i=t.lazySizesConfig||t.lazysizesConfig||{},r)e in i||(i[e]=r[e])}(),!e||!e.getElementsByClassName)return{init:function(){},cfg:i,noSupport:!0};var o=e.documentElement,s=t.HTMLPictureElement,a="addEventListener",l="getAttribute",c=t[a].bind(t),u=t.setTimeout,h=t.requestAnimationFrame||u,f=t.requestIdleCallback,d=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],m={},g=Array.prototype.forEach,y=function(t,e){return m[e]||(m[e]=new RegExp("(\\s|^)"+e+"(\\s|$)")),m[e].test(t[l]("class")||"")&&m[e]},_=function(t,e){y(t,e)||t.setAttribute("class",(t[l]("class")||"").trim()+" "+e)},v=function(t,e){var r;(r=y(t,e))&&t.setAttribute("class",(t[l]("class")||"").replace(r," "))},b=function(t,e,r){var n=r?a:"removeEventListener";r&&b(t,e),p.forEach((function(r){t[n](r,e)}))},x=function(t,r,i,o,s){var a=e.createEvent("Event");return i||(i={}),i.instance=n,a.initEvent(r,!o,!s),a.detail=i,t.dispatchEvent(a),a},w=function(e,r){var n;!s&&(n=t.picturefill||i.pf)?(r&&r.src&&!e[l]("srcset")&&e.setAttribute("srcset",r.src),n({reevaluate:!0,elements:[e]})):r&&r.src&&(e.src=r.src)},E=function(t,e){return(getComputedStyle(t,null)||{})[e]},S=function(t,e,r){for(r=r||t.offsetWidth;r<i.minSize&&e&&!t._lazysizesWidth;)r=e.offsetWidth,e=e.parentNode;return r},T=(_t=[],vt=[],bt=_t,xt=function(){var t=bt;for(bt=_t.length?vt:_t,gt=!0,yt=!1;t.length;)t.shift()();gt=!1},wt=function(t,r){gt&&!r?t.apply(this,arguments):(bt.push(t),yt||(yt=!0,(e.hidden?u:h)(xt)))},wt._lsFlush=xt,wt),A=function(t,e){return e?function(){T(t)}:function(){var e=this,r=arguments;T((function(){t.apply(e,r)}))}},O=function(t){var e,n=0,o=i.throttleDelay,s=i.ricTimeout,a=function(){e=!1,n=r.now(),t()},l=f&&s>49?function(){f(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:A((function(){u(a)}),!0);return function(t){var i;(t=!0===t)&&(s=33),e||(e=!0,(i=o-(r.now()-n))<0&&(i=0),t||i<9?l():u(l,i))}},C=function(t){var e,n,i=99,o=function(){e=null,t()},s=function(){var t=r.now()-n;t<i?u(s,i-t):(f||o)(o)};return function(){n=r.now(),e||(e=u(s,i))}},M=(Z=/^img$/i,X=/^iframe$/i,Y="onscroll"in t&&!/(gle|ing)bot/.test(navigator.userAgent),K=0,J=0,Q=0,tt=-1,et=function(t){Q--,(!t||Q<0||!t.target)&&(Q=0)},rt=function(t){return null==W&&(W="hidden"==E(e.body,"visibility")),W||!("hidden"==E(t.parentNode,"visibility")&&"hidden"==E(t,"visibility"))},nt=function(t,r){var n,i=t,s=rt(t);for(V-=r,H+=r,G-=r,q+=r;s&&(i=i.offsetParent)&&i!=e.body&&i!=o;)(s=(E(i,"opacity")||1)>0)&&"visible"!=E(i,"overflow")&&(n=i.getBoundingClientRect(),s=q>n.left&&G<n.right&&H>n.top-1&&V<n.bottom+1);return s},it=function(){var t,r,s,a,c,u,h,f,d,p,m,g,y=n.elements;if((F=i.loadMode)&&Q<8&&(t=y.length)){for(r=0,tt++;r<t;r++)if(y[r]&&!y[r]._lazyRace)if(!Y||n.prematureUnveil&&n.prematureUnveil(y[r]))ft(y[r]);else if((f=y[r][l]("data-expand"))&&(u=1*f)||(u=J),p||(p=!i.expand||i.expand<1?o.clientHeight>500&&o.clientWidth>500?500:370:i.expand,n._defEx=p,m=p*i.expFactor,g=i.hFac,W=null,J<m&&Q<1&&tt>2&&F>2&&!e.hidden?(J=m,tt=0):J=F>1&&tt>1&&Q<6?p:K),d!==u&&($=innerWidth+u*g,U=innerHeight+u,h=-1*u,d=u),s=y[r].getBoundingClientRect(),(H=s.bottom)>=h&&(V=s.top)<=U&&(q=s.right)>=h*g&&(G=s.left)<=$&&(H||q||G||V)&&(i.loadHidden||rt(y[r]))&&(B&&Q<3&&!f&&(F<3||tt<4)||nt(y[r],u))){if(ft(y[r]),c=!0,Q>9)break}else!c&&B&&!a&&Q<4&&tt<4&&F>
22&&(z[0]||i.preloadAfterLoad)&&(z[0]||!f&&(H||q||G||V||"auto"!=y[r][l](i.sizesAttr)))&&(a=z[0]||y[r]);a&&!c&&ft(a)}},ot=O(it),st=function(t){var e=t.target;e._lazyCache?delete e._lazyCache:(et(t),_(e,i.loadedClass),v(e,i.loadingClass),b(e,lt),x(e,"lazyloaded"))},at=A(st),lt=function(t){at({target:t.target})},ct=function(t,e){var r=t.getAttribute("data-load-mode")||i.iframeLoadMode;0==r?t.contentWindow.location.replace(e):1==r&&(t.src=e)},ut=function(t){var e,r=t[l](i.srcsetAttr);(e=i.customMedia[t[l]("data-media")||t[l]("media")])&&t.setAttribute("media",e),r&&t.setAttribute("srcset",r)},ht=A((function(t,e,r,n,o){var s,a,c,h,f,p;(f=x(t,"lazybeforeunveil",e)).defaultPrevented||(n&&(r?_(t,i.autosizesClass):t.setAttribute("sizes",n)),a=t[l](i.srcsetAttr),s=t[l](i.srcAttr),o&&(h=(c=t.parentNode)&&d.test(c.nodeName||"")),p=e.firesLoad||"src"in t&&(a||s||h),f={target:t},_(t,i.loadingClass),p&&(clearTimeout(j),j=u(et,2500),b(t,lt,!0)),h&&g.call(c.getElementsByTagName("source"),ut),a?t.setAttribute("srcset",a):s&&!h&&(X.test(t.nodeName)?ct(t,s):t.src=s),o&&(a||h)&&w(t,{src:s})),t._lazyRace&&delete t._lazyRace,v(t,i.lazyClass),T((function(){var e=t.complete&&t.naturalWidth>1;p&&!e||(e&&_(t,i.fastLoadedClass),st(f),t._lazyCache=!0,u((function(){"_lazyCache"in t&&delete t._lazyCache}),9)),"lazy"==t.loading&&Q--}),!0)})),ft=function(t){if(!t._lazyRace){var e,r=Z.test(t.nodeName),n=r&&(t[l](i.sizesAttr)||t[l]("sizes")),o="auto"==n;(!o&&B||!r||!t[l]("src")&&!t.srcset||t.complete||y(t,i.errorClass)||!y(t,i.lazyClass))&&(e=x(t,"lazyunveilread").detail,o&&k.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,Q++,ht(t,e,o,n,r))}},dt=C((function(){i.loadMode=3,ot()})),pt=function(){3==i.loadMode&&(i.loadMode=2),dt()},mt=function(){B||(r.now()-N<999?u(mt,999):(B=!0,i.loadMode=3,ot(),c("scroll",pt,!0)))},{_:function(){N=r.now(),n.elements=e.getElementsByClassName(i.lazyClass),z=e.getElementsByClassName(i.lazyClass+" "+i.preloadClass),c("scroll",ot,!0),c("resize",ot,!0),c("pageshow",(function(t){if(t.persisted){var r=e.querySelectorAll("."+i.loadingClass);r.length&&r.forEach&&h((function(){r.forEach((function(t){t.complete&&ft(t)}))}))}})),t.MutationObserver?new MutationObserver(ot).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o[a]("DOMNodeInserted",ot,!0),o[a]("DOMAttrModified",ot,!0),setInterval(ot,999)),c("hashchange",ot,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(t){e[a](t,ot,!0)})),/d$|^c/.test(e.readyState)?mt():(c("load",mt),e[a]("DOMContentLoaded",ot),u(mt,2e4)),n.elements.length?(it(),T._lsFlush()):ot()},checkElems:ot,unveil:ft,_aLSL:pt}),k=(L=A((function(t,e,r,n){var i,o,s;if(t._lazysizesWidth=n,n+="px",t.setAttribute("sizes",n),d.test(e.nodeName||""))for(o=0,s=(i=e.getElementsByTagName("source")).length;o<s;o++)i[o].setAttribute("sizes",n);r.detail.dataAttr||w(t,r.detail)})),R=function(t,e,r){var n,i=t.parentNode;i&&(r=S(t,i,r),(n=x(t,"lazybeforesizes",{width:r,dataAttr:!!e})).defaultPrevented||(r=n.detail.width)&&r!==t._lazysizesWidth&&L(t,i,n,r))},D=C((function(){var t,e=P.length;if(e)for(t=0;t<e;t++)R(P[t])})),{_:function(){P=e.getElementsByClassName(i.autosizesClass),c("resize",D)},checkElems:D,updateElem:R}),I=function(){!I.i&&e.getElementsByClassName&&(I.i=!0,k._(),M._())};var P,L,R,D;var z,B,j,F,N,$,U,V,G,q,H,W,Z,X,Y,K,J,Q,tt,et,rt,nt,it,ot,st,at,lt,ct,ut,ht,ft,dt,pt,mt;var gt,yt,_t,vt,bt,xt,wt;return u((function(){i.init&&I()})),n={cfg:i,autoSizer:k,loader:M,init:I,uP:w,aC:_,rC:v,hC:y,fire:x,gW:S,rAF:T}}(e,e.document,Date);e.lazySizes=n,t.exports&&(t.exports=n)}("undefined"!=typeof window?window:{})},7274:(t,e,r)=>{var n,i,o;!function(s,a){if(s){a=a.bind(null,s,s.document),t.exports?a(r(7090)):(i=[r(7090)],void 0===(o="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=o))}}("undefined"!=typeof window?window:0,(function(t,e,r){"use strict";var n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v=r.cfg,b=e.createElement("img"),x="sizes"in b&&"srcset"in b,w=/\s+\d+h/g,E=(i=/\s+(\d+)(w|h)\s+(\d+)(w|h)/,o=Array.prototype.forEach,function(){var t=e.createElement("img"),n=function(t){var e,r,n=t.getAttribute(v.srcsetAttr);n&&(r=n.match(i))&&((e="w"==r[2]?r[1]/r[3]:r[3]/r[1])&&t.setAttribute("data-aspectratio",e),t.setAttribute(v.srcsetAttr,n.replace(w,"")))},s=function(t){if(t.detail.instance==r){var e=t.target.parentNode;e&&"PICTURE"==e.nodeName&&o.call(e.getElementsByTagName("source"),n),n(t.target)}},a=function(){t.currentSrc&&e.removeEventListener("lazybeforeunveil",s)};e.addEventListener("lazybeforeunveil",s),t.onload=a,t.onerror=a,t.srcset="data:,a 1w 1h",t.complete&&a()});(v.supportsType||(v.supportsType=function(t){return!t}),t.HTMLPictureElement&&x)?!r.hasHDescriptorFix&&e.msElementsFromPoint&&(r.hasHDescriptorFix=!0,E()):t.picturefill||v.pf||(v.pf=function(e){var r,i;if(!t.picturefill)for(r=0,i=e.elements.length;r<i;r++)n(e.elements[r])},u=function(t,e){return t.w-e.w},h=/^\s*\d+\.*\d*px\s*$/,a=/(([^,\s].[^\s]+)\s+(\d+)w)/g,l=/\s/,c=function(t,e,r,n){s.push({c:e,u:r,w:1*n})},d=function(){var t,r,i;d.init||(d.init=!0,addEventListener("resize",(r=e.getElementsByClassName("lazymatchmedia"),i=function(){var t,e;for(t=0,e=r.length;t<e;t++)n(r[t])},function(){clearTimeout(t),t=setTimeout(i,66)})))},p=function(e,n){var i,o=e.getAttribute("srcset")||e.getAttribute(v.srcsetAttr);!o&&n&&(o=e._lazypolyfill?e._lazypolyfill._set:e.getAttribute(v.srcAttr)||e.getAttribute("src")),e._lazypolyfill&&e._lazypolyfill._set==o||(i=f(o||""),n&&e.parentNode&&(i.isPicture="PICTURE"==e.parentNode.nodeName.toUpperCase(),i.isPicture&&t.matchMedia&&(r.aC(e,"lazymatchmedia"),d())),i._set=o,Object.defineProperty(e,"_lazypolyfill",{value:i,writable:!0}))},m=function(e){return t.matchMedia?(m=function(t){return!t||(matchMedia(t)||{}).matches},m(e)):!e},g=function(e){var n,i,o,s,a,l,c;if(p(s=e,!0),(a=s._lazypolyfill).isPicture)for(i=0,o=(n=e.parentNode.getElementsByTagName("source")).length;i<o;i++)if(v.supportsType(n[i].getAttribute("type"),e)&&m(n[i].getAttribute("media"))){s=n[i],p(s),a=s._lazypolyfill;break}return a.length>1?(c=s.getAttribute("sizes")||"",c=h.test(c)&&parseInt(c,10)||r.gW(e,e.parentNode),a.d=function(e){var n=t.devicePixelRatio||1,i=r.getX&&r.getX(e);return Math.min(i||n,2.5,n)}(e),!a.src||!a.w||a.w<c?(a.w=c,l=function(t){for(var e,r,n=t.length,i=t[n-1],o=0;o<n;o++)if((i=t[o]).d=i.w/t.w,i.d>=t.d){!i.cached&&(e=t[o-1])&&e.d>t.d-.13*Math.pow(t.d,2.2)&&(r=Math.pow(e.d-.6,1.6),e.cached&&(e.d+=.15*r),e.d+(i.d-t.d)*r>t.d&&(i=e));break}return i}(a.sort(u)),a.src=l):l=a.src):l=a[0],l},(y=function(t){if(!x||!t.parentNode||"PICTURE"==t.parentNode.nodeName.toUpperCase()){var e=g(t);e&&e.u&&t._lazypolyfill.cur!=e.u&&(t._lazypolyfill.cur=e.u,e.cached=!0,t.setAttribute(v.srcAttr,e.u),t.setAttribute("src",e.u))}}).parse=f=function(t){return s=[],(t=t.trim()).replace(w,"").replace(a,c),s.length||!t||l.test(t)||s.push({c:t,u:t,w:99}),s},n=y,v.loadedClass&&v.loadingClass&&(_=[],['img[sizes$="px"][srcset].',"picture > img:not([srcset])."].forEach((function(t){_.push(t+v.loadedClass),_.push(t+v.loadingClass)})),v.pf({elements:e.querySelectorAll(_.join(", "))})))}))},6486:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,c=32,u=64,h=128,f=256,d=1/0,p=9007199254740991,m=NaN,g=4294967295,y=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",u],["rearg",f]],_="[object Arguments]",v="[object Array]",b="[object Boolean]",x="[object Date]",w="[object Error]",E="[object Function]",S="[object GeneratorFunction]",T="[object Map]",A="[object Number]",O="[object Object]",C="[object Promise]",M="[object RegExp]",k="[object Set]",I="[object String]",P="[object Symbol]",L="[object WeakMap]",R="[object ArrayBuffer]",D="[object DataView]",z="[object Float32Array]",B="[object Float64Array
vendor: 8,472 bytes, line 2
2]",j="[object Int8Array]",F="[object Int16Array]",N="[object Int32Array]",$="[object Uint8Array]",U="[object Uint8ClampedArray]",V="[object Uint16Array]",G="[object Uint32Array]",q=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,Y=RegExp(Z.source),K=RegExp(X.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),st=/^\s+/,at=/\s/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,xt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wt=/($^)/,Et=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Tt="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Ot="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",Mt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kt="['’]",It="[\\ud800-\\udfff]",Pt="["+Mt+"]",Lt="["+St+"]",Rt="\\d+",Dt="[\\u2700-\\u27bf]",zt="["+At+"]",Bt="[^\\ud800-\\udfff"+Mt+Rt+Tt+At+Ot+"]",jt="\\ud83c[\\udffb-\\udfff]",Ft="[^\\ud800-\\udfff]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",$t="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+Ot+"]",Vt="(?:"+zt+"|"+Bt+")",Gt="(?:"+Ut+"|"+Bt+")",qt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ht="(?:['’](?:D|LL|M|RE|S|T|VE))?",Wt="(?:"+Lt+"|"+jt+")"+"?",Zt="[\\ufe0e\\ufe0f]?",Xt=Zt+Wt+("(?:\\u200d(?:"+[Ft,Nt,$t].join("|")+")"+Zt+Wt+")*"),Yt="(?:"+[Dt,Nt,$t].join("|")+")"+Xt,Kt="(?:"+[Ft+Lt+"?",Lt,Nt,$t,It].join("|")+")",Jt=RegExp(kt,"g"),Qt=RegExp(Lt,"g"),te=RegExp(jt+"(?="+jt+")|"+Kt+Xt,"g"),ee=RegExp([Ut+"?"+zt+"+"+qt+"(?="+[Pt,Ut,"$"].join("|")+")",Gt+"+"+Ht+"(?="+[Pt,Ut+Vt,"$"].join("|")+")",Ut+"?"+Vt+"+"+qt,Ut+"+"+Ht,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,Yt].join("|"),"g"),re=RegExp("[\\u200d\\ud800-\\udfff"+St+Ct+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ie=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,se={};se[z]=se[B]=se[j]=se[F]=se[N]=se[$]=se[U]=se[V]=se[G]=!0,se[_]=se[v]=se[R]=se[b]=se[D]=se[x]=se[w]=se[E]=se[T]=se[A]=se[O]=se[M]=se[k]=se[I]=se[L]=!1;var ae={};ae[_]=ae[v]=ae[R]=ae[D]=ae[b]=ae[x]=ae[z]=ae[B]=ae[j]=ae[F]=ae[N]=ae[T]=ae[A]=ae[O]=ae[M]=ae[k]=ae[I]=ae[P]=ae[$]=ae[U]=ae[V]=ae[G]=!0,ae[w]=ae[E]=ae[L]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ce=parseFloat,ue=parseInt,he="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,fe="object"==typeof self&&self&&self.Object===Object&&self,de=he||fe||Function("return this")(),pe=e&&!e.nodeType&&e,me=pe&&t&&!t.nodeType&&t,ge=me&&me.exports===pe,ye=ge&&he.process,_e=function(){try{var t=me&&me.require&&me.require("util").types;return t||ye&&ye.binding&&ye.binding("util")}catch(t){}}(),ve=_e&&_e.isArrayBuffer,be=_e&&_e.isDate,xe=_e&&_e.isMap,we=_e&&_e.isRegExp,Ee=_e&&_e.isSet,Se=_e&&_e.isTypedArray;function Te(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Ae(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}function Oe(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function Ce(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Me(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function ke(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Ie(t,e){return!!(null==t?0:t.length)&&$e(t,e,0)>-1}function Pe(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Le(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Re(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function De(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function ze(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Be(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var je=qe("length");function Fe(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Ne(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function $e(t,e,r){return e==e?function(t,e,r){var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Ne(t,Ve,r)}function Ue(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Ve(t){return t!=t}function Ge(t,e){var r=null==t?0:t.length;return r?Ze(t,e)/r:m}function qe(t){return function(e){return null==e?i:e[t]}}function He(t){return function(e){return null==t?i:t[e]}}function We(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ze(t,e){for(var r,n=-1,o=t.length;++n<o;){var s=e(t[n]);s!==i&&(r=r===i?s:r+s)}return r}function Xe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ye(t){return t?t.slice(0,pr(t)+1).replace(st,""):t}function Ke(t){return function(e){return t(e)}}function Je(t,e){return Le(e,(function(e){return t[e]}))}function Qe(t,e){return t.has(e)}function tr(t,e){for(var r=-1,n=t.length;++r<n&&$e(e,t[r],0)>-1;);return r}function er(t,e){for(var r=t.length;r--&&$e(e,t[r],0)>-1;);return r}function rr(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var nr=He({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ir=He({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function or(t){return"\\"+le[t]}function sr(t){return re.test(t)}function ar(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function lr(t,e){return function(r){return t(e(r))}}function cr(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r];s!==e&&s!==a||(t[r]=a,o[i++]=r)}return o}function ur(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function hr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function fr(t){return sr(t)?function(t){var e=te.lastIndex=0;for(;te.test(t);)++e;return e}(t):je(t)}function dr(t){return sr(t)?function(t){return t.match(te)||[]}(t):function(t){return t.split("")}(t)}function pr(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}
vendor: 10,256 bytes, line 2
2var mr=He({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gr=function t(e){var r,n=(e=null==e?de:gr.defaults(de.Object(),e,gr.pick(de,ie))).Array,at=e.Date,St=e.Error,Tt=e.Function,At=e.Math,Ot=e.Object,Ct=e.RegExp,Mt=e.String,kt=e.TypeError,It=n.prototype,Pt=Tt.prototype,Lt=Ot.prototype,Rt=e["__core-js_shared__"],Dt=Pt.toString,zt=Lt.hasOwnProperty,Bt=0,jt=(r=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ft=Lt.toString,Nt=Dt.call(Ot),$t=de._,Ut=Ct("^"+Dt.call(zt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=ge?e.Buffer:i,Gt=e.Symbol,qt=e.Uint8Array,Ht=Vt?Vt.allocUnsafe:i,Wt=lr(Ot.getPrototypeOf,Ot),Zt=Ot.create,Xt=Lt.propertyIsEnumerable,Yt=It.splice,Kt=Gt?Gt.isConcatSpreadable:i,te=Gt?Gt.iterator:i,re=Gt?Gt.toStringTag:i,le=function(){try{var t=po(Ot,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=e.clearTimeout!==de.clearTimeout&&e.clearTimeout,fe=at&&at.now!==de.Date.now&&at.now,pe=e.setTimeout!==de.setTimeout&&e.setTimeout,me=At.ceil,ye=At.floor,_e=Ot.getOwnPropertySymbols,je=Vt?Vt.isBuffer:i,He=e.isFinite,yr=It.join,_r=lr(Ot.keys,Ot),vr=At.max,br=At.min,xr=at.now,wr=e.parseInt,Er=At.random,Sr=It.reverse,Tr=po(e,"DataView"),Ar=po(e,"Map"),Or=po(e,"Promise"),Cr=po(e,"Set"),Mr=po(e,"WeakMap"),kr=po(Ot,"create"),Ir=Mr&&new Mr,Pr={},Lr=$o(Tr),Rr=$o(Ar),Dr=$o(Or),zr=$o(Cr),Br=$o(Mr),jr=Gt?Gt.prototype:i,Fr=jr?jr.valueOf:i,Nr=jr?jr.toString:i;function $r(t){if(ia(t)&&!Ws(t)&&!(t instanceof qr)){if(t instanceof Gr)return t;if(zt.call(t,"__wrapped__"))return Uo(t)}return new Gr(t)}var Ur=function(){function t(){}return function(e){if(!na(e))return{};if(Zt)return Zt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Vr(){}function Gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function qr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Zr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Xr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Zr;++e<r;)this.add(t[e])}function Yr(t){var e=this.__data__=new Wr(t);this.size=e.size}function Kr(t,e){var r=Ws(t),n=!r&&Hs(t),i=!r&&!n&&Ks(t),o=!r&&!n&&!i&&fa(t),s=r||n||i||o,a=s?Xe(t.length,Mt):[],l=a.length;for(var c in t)!e&&!zt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||xo(c,l))||a.push(c);return a}function Jr(t){var e=t.length;return e?t[Yn(0,e-1)]:i}function Qr(t,e){return jo(Ii(t),cn(e,0,t.length))}function tn(t){return jo(Ii(t))}function en(t,e,r){(r!==i&&!Vs(t[e],r)||r===i&&!(e in t))&&an(t,e,r)}function rn(t,e,r){var n=t[e];zt.call(t,e)&&Vs(n,r)&&(r!==i||e in t)||an(t,e,r)}function nn(t,e){for(var r=t.length;r--;)if(Vs(t[r][0],e))return r;return-1}function on(t,e,r,n){return pn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function sn(t,e){return t&&Pi(e,Ra(e),t)}function an(t,e,r){"__proto__"==e&&le?le(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ln(t,e){for(var r=-1,o=e.length,s=n(o),a=null==t;++r<o;)s[r]=a?i:Ma(t,e[r]);return s}function cn(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function un(t,e,r,n,o,s){var a,l=1&e,c=2&e,u=4&e;if(r&&(a=o?r(t,n,o,s):r(t)),a!==i)return a;if(!na(t))return t;var h=Ws(t);if(h){if(a=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&zt.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!l)return Ii(t,a)}else{var f=yo(t),d=f==E||f==S;if(Ks(t))return Ti(t,l);if(f==O||f==_||d&&!o){if(a=c||d?{}:vo(t),!l)return c?function(t,e){return Pi(t,go(t),e)}(t,function(t,e){return t&&Pi(e,Da(e),t)}(a,t)):function(t,e){return Pi(t,mo(t),e)}(t,sn(a,t))}else{if(!ae[f])return o?t:{};a=function(t,e,r){var n=t.constructor;switch(e){case R:return Ai(t);case b:case x:return new n(+t);case D:return function(t,e){var r=e?Ai(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case z:case B:case j:case F:case N:case $:case U:case V:case G:return Oi(t,r);case T:return new n;case A:case I:return new n(t);case M:return function(t){var e=new t.constructor(t.source,mt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case k:return new n;case P:return i=t,Fr?Ot(Fr.call(i)):{}}var i}(t,f,l)}}s||(s=new Yr);var p=s.get(t);if(p)return p;s.set(t,a),ca(t)?t.forEach((function(n){a.add(un(n,e,r,n,t,s))})):oa(t)&&t.forEach((function(n,i){a.set(i,un(n,e,r,i,t,s))}));var m=h?i:(u?c?so:oo:c?Da:Ra)(t);return Oe(m||t,(function(n,i){m&&(n=t[i=n]),rn(a,i,un(n,e,r,i,t,s))})),a}function hn(t,e,r){var n=r.length;if(null==t)return!n;for(t=Ot(t);n--;){var o=r[n],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function fn(t,e,r){if("function"!=typeof t)throw new kt(o);return Ro((function(){t.apply(i,r)}),e)}function dn(t,e,r,n){var i=-1,o=Ie,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;r&&(e=Le(e,Ke(r))),n?(o=Pe,s=!1):e.length>=200&&(o=Qe,s=!1,e=new Xr(e));t:for(;++i<a;){var u=t[i],h=null==r?u:r(u);if(u=n||0!==u?u:0,s&&h==h){for(var f=c;f--;)if(e[f]===h)continue t;l.push(u)}else o(e,h,n)||l.push(u)}return l}$r.templateSettings={escape:J,evaluate:Q,interpolate:tt,variable:"",imports:{_:$r}},$r.prototype=Vr.prototype,$r.prototype.constructor=$r,Gr.prototype=Ur(Vr.prototype),Gr.prototype.constructor=Gr,qr.prototype=Ur(Vr.prototype),qr.prototype.constructor=qr,Hr.prototype.clear=function(){this.__data__=kr?kr(null):{},this.size=0},Hr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hr.prototype.get=function(t){var e=this.__data__;if(kr){var r=e[t];return r===s?i:r}return zt.call(e,t)?e[t]:i},Hr.prototype.has=function(t){var e=this.__data__;return kr?e[t]!==i:zt.call(e,t)},Hr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kr&&e===i?s:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=nn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Yt.call(e,r,1),--this.size,!0)},Wr.prototype.get=function(t){var e=this.__data__,r=nn(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return nn(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=nn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Ar||Wr),string:new Hr}},Zr.prototype.delete=function(t){var e=ho(this,t).delete(t);return this.size-=e?1:0,e},Zr.prototype.get=function(t){return ho(this,t).get(t)},Zr.prototype.has=function(t){return ho(this,t).has(t)},Zr.prototype.set=function(t,e){var r=ho(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Xr.prototype.add=Xr.prototype.push=function(t){return this.__data__.set(t,s),this},Xr.prototype.has=function(t){return this.__data__.has(t)},Yr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Yr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Yr.prototype.get=function(t){return this.__data__.get(t)},Yr.prototype.has=function(t){return this.__data__.has(t)},Yr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Ar||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Zr(n)}return r.set(t,e),this.size=r.size,this};var pn=Di(wn),mn=Di(En,!0);function gn(t,e){var r=!0;return pn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function yn(t,e,r){for(var n=-1,o=t.length;++n<o;){var s=t[n],a=e(s);if(null!=a&&(l===i?a==a&&!ha(a):r(a,l)))var l=a,c=s}return c}function _n(t,e){var r=[];return pn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function vn(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=bo),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?vn(a,e-1,r,n,i):Re(i,a):n||(i[i.length]=a)}return i}var bn=zi(),xn=zi(!0);function wn(t,e){return t&&bn(t,e,Ra)}function En(t,e){return t&&xn(t,e,Ra)}function Sn(t,e){return ke(e,(function(e){return ta(t[e])}))}function Tn(t,e){for(var r=0,n=(e=xi(e,t)).length;null!=t&&r<n;)t=t[No(e[r++])];return r&&r==n?t:i}function An(t,e,r){var n=e(t);return Ws(t)?n:Re(n,r(t))}function On(t){return null==t?t===i?"[object Undefined]":"[object Null]":re&&re in Ot(t)?function(t){var e=zt.call(t,re),r=t[re];try{t[re]=i;var n=!0}catch(t){}var o=Ft.call(t);n&&(e?t[re]=r:delete t[re]);return o}(t):function(t){return Ft.call(t)}(t)}function Cn(t,e){return t>e}function Mn(t,e){return null!=t&&zt.call(t,e)}function kn(t,e){return null!=t&&e in Ot(t)}function In(t,e,r){for(var o=r?Pe:Ie,s=t[0].length,a=t.length,l=a,c=n(a),u=1/0,h=[];l--;){var f=t[l];l&&e&&(f=Le(f,Ke(e))),u=br(f.length,u),c[l]=!r&&(e||s>=120&&f.length>=120)?new Xr(l&&f):i}f=t[0];var d=-1,p=c[0];t:for(;++d<s&&h.length<u;){var m=f[d],g=e?e(m):m;if(m=r||0!==m?m:0,!(p?Qe(p,g):o(h,g,r))){for(l=a;--l;){var y=c[l];if(!(y?Qe(y,g):o(t[l],g,r)))continue t}p&&p.push(g),h.push(m)}}return h}function Pn(t,e,r){var n=null==(t=ko(t,e=xi(e,t)))?t:t[No(Qo(e))];return null==n?i:Te(n,t,r)}function Ln(t){return ia(t)&&On(t)==_}function Rn(t,e,r,n,o){return t===e||(null==t||null==e||!ia(t)&&!ia(e)?t!=t&&e!=e:function(t,e,r,n,o,s){var a=Ws(t),l=Ws(e),c=a?v:yo(t),u=l?v:yo(e),h=(c=c==_?O:c)==O,f=(u=u==_?O:u)==O,d=c==u;if(d&&Ks(t)){if(!Ks(e))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new Yr),a||fa(t)?no(t,e,r,n,o,s):function(t,e,r,n,i,o,s){switch(r){case D:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!o(new qt(t),new qt(e)));case b:case x:case A:return Vs(+t,+e);case w:return t.name==e.name&&t.message==e.message;case M:case I:return t==e+"";case T:var a=ar;case k:var l=1&n;if(a||(a=ur),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;n|=2,s.set(t,e);var u=no(a(t),a(e),n,i,o,s);return s.delete(t),u;case P:if(Fr)return Fr.call(t)==Fr.call(e)}return!1}(t,e,c,r,n,o,s);if(!(1&r)){var p=h&&zt.call(t,"__wrapped__"),m=f&&zt.call(e,"__wrapped__");
vendor: 4,929 bytes, line 2
2if(p||m){var g=p?t.value():t,y=m?e.value():e;return s||(s=new Yr),o(g,y,r,n,s)}}if(!d)return!1;return s||(s=new Yr),function(t,e,r,n,o,s){var a=1&r,l=oo(t),c=l.length,u=oo(e).length;if(c!=u&&!a)return!1;var h=c;for(;h--;){var f=l[h];if(!(a?f in e:zt.call(e,f)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var m=!0;s.set(t,e),s.set(e,t);var g=a;for(;++h<c;){var y=t[f=l[h]],_=e[f];if(n)var v=a?n(_,y,f,e,t,s):n(y,_,f,t,e,s);if(!(v===i?y===_||o(y,_,r,n,s):v)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var b=t.constructor,x=e.constructor;b==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(m=!1)}return s.delete(t),s.delete(e),m}(t,e,r,n,o,s)}(t,e,r,n,Rn,o))}function Dn(t,e,r,n){var o=r.length,s=o,a=!n;if(null==t)return!s;for(t=Ot(t);o--;){var l=r[o];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<s;){var c=(l=r[o])[0],u=t[c],h=l[1];if(a&&l[2]){if(u===i&&!(c in t))return!1}else{var f=new Yr;if(n)var d=n(u,h,c,t,e,f);if(!(d===i?Rn(h,u,3,n,f):d))return!1}}return!0}function zn(t){return!(!na(t)||(e=t,jt&&jt in e))&&(ta(t)?Ut:_t).test($o(t));var e}function Bn(t){return"function"==typeof t?t:null==t?sl:"object"==typeof t?Ws(t)?Vn(t[0],t[1]):Un(t):ml(t)}function jn(t){if(!Ao(t))return _r(t);var e=[];for(var r in Ot(t))zt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Fn(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var r in Ot(t))e.push(r);return e}(t);var e=Ao(t),r=[];for(var n in t)("constructor"!=n||!e&&zt.call(t,n))&&r.push(n);return r}function Nn(t,e){return t<e}function $n(t,e){var r=-1,i=Xs(t)?n(t.length):[];return pn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Un(t){var e=fo(t);return 1==e.length&&e[0][2]?Co(e[0][0],e[0][1]):function(r){return r===t||Dn(r,t,e)}}function Vn(t,e){return Eo(t)&&Oo(e)?Co(No(t),e):function(r){var n=Ma(r,t);return n===i&&n===e?ka(r,t):Rn(e,n,3)}}function Gn(t,e,r,n,o){t!==e&&bn(e,(function(s,a){if(o||(o=new Yr),na(s))!function(t,e,r,n,o,s,a){var l=Po(t,r),c=Po(e,r),u=a.get(c);if(u)return void en(t,r,u);var h=s?s(l,c,r+"",t,e,a):i,f=h===i;if(f){var d=Ws(c),p=!d&&Ks(c),m=!d&&!p&&fa(c);h=c,d||p||m?Ws(l)?h=l:Ys(l)?h=Ii(l):p?(f=!1,h=Ti(c,!0)):m?(f=!1,h=Oi(c,!0)):h=[]:aa(c)||Hs(c)?(h=l,Hs(l)?h=ba(l):na(l)&&!ta(l)||(h=vo(c))):f=!1}f&&(a.set(c,h),o(h,c,n,s,a),a.delete(c));en(t,r,h)}(t,e,a,r,Gn,n,o);else{var l=n?n(Po(t,a),s,a+"",t,e,o):i;l===i&&(l=s),en(t,a,l)}}),Da)}function qn(t,e){var r=t.length;if(r)return xo(e+=e<0?r:0,r)?t[e]:i}function Hn(t,e,r){e=e.length?Le(e,(function(t){return Ws(t)?function(e){return Tn(e,1===t.length?t[0]:t)}:t})):[sl];var n=-1;e=Le(e,Ke(uo()));var i=$n(t,(function(t,r,i){var o=Le(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(i,(function(t,e){return function(t,e,r){var n=-1,i=t.criteria,o=e.criteria,s=i.length,a=r.length;for(;++n<s;){var l=Ci(i[n],o[n]);if(l)return n>=a?l:l*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}))}function Wn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=Tn(t,s);r(a,s)&&ei(o,xi(s,t),a)}return o}function Zn(t,e,r,n){var i=n?Ue:$e,o=-1,s=e.length,a=t;for(t===e&&(e=Ii(e)),r&&(a=Le(t,Ke(r)));++o<s;)for(var l=0,c=e[o],u=r?r(c):c;(l=i(a,u,l,n))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,1);return t}function Xn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;xo(i)?Yt.call(t,i,1):di(t,i)}}return t}function Yn(t,e){return t+ye(Er()*(e-t+1))}function Kn(t,e){var r="";if(!t||e<1||e>p)return r;do{e%2&&(r+=t),(e=ye(e/2))&&(t+=t)}while(e);return r}function Jn(t,e){return Do(Mo(t,e,sl),t+"")}function Qn(t){return Jr(Va(t))}function ti(t,e){var r=Va(t);return jo(r,cn(e,0,r.length))}function ei(t,e,r,n){if(!na(t))return t;for(var o=-1,s=(e=xi(e,t)).length,a=s-1,l=t;null!=l&&++o<s;){var c=No(e[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=l[c];(u=n?n(h,c,l):i)===i&&(u=na(h)?h:xo(e[o+1])?[]:{})}rn(l,c,u),l=l[c]}return t}var ri=Ir?function(t,e){return Ir.set(t,e),t}:sl,ni=le?function(t,e){return le(t,"toString",{configurable:!0,enumerable:!1,value:nl(e),writable:!0})}:sl;function ii(t){return jo(Va(t))}function oi(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=n(o);++i<o;)s[i]=t[i+e];return s}function si(t,e){var r;return pn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ai(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=t[o];null!==s&&!ha(s)&&(r?s<=e:s<e)?n=o+1:i=o}return i}return li(t,e,sl,r)}function li(t,e,r,n){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=r(e))!=e,l=null===e,c=ha(e),u=e===i;o<s;){var h=ye((o+s)/2),f=r(t[h]),d=f!==i,p=null===f,m=f==f,g=ha(f);if(a)var y=n||m;else y=u?m&&(n||d):l?m&&d&&(n||!p):c?m&&d&&!p&&(n||!g):!p&&!g&&(n?f<=e:f<e);
vendor: 6,765 bytes, line 2
2y?o=h+1:s=h}return br(s,4294967294)}function ci(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r],a=e?e(s):s;if(!r||!Vs(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function ui(t){return"number"==typeof t?t:ha(t)?m:+t}function hi(t){if("string"==typeof t)return t;if(Ws(t))return Le(t,hi)+"";if(ha(t))return Nr?Nr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fi(t,e,r){var n=-1,i=Ie,o=t.length,s=!0,a=[],l=a;if(r)s=!1,i=Pe;else if(o>=200){var c=e?null:Ki(t);if(c)return ur(c);s=!1,i=Qe,l=new Xr}else l=e?[]:a;t:for(;++n<o;){var u=t[n],h=e?e(u):u;if(u=r||0!==u?u:0,s&&h==h){for(var f=l.length;f--;)if(l[f]===h)continue t;e&&l.push(h),a.push(u)}else i(l,h,r)||(l!==a&&l.push(h),a.push(u))}return a}function di(t,e){return null==(t=ko(t,e=xi(e,t)))||delete t[No(Qo(e))]}function pi(t,e,r,n){return ei(t,e,r(Tn(t,e)),n)}function mi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?oi(t,n?0:o,n?o+1:i):oi(t,n?o+1:0,n?i:o)}function gi(t,e){var r=t;return r instanceof qr&&(r=r.value()),De(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),r)}function yi(t,e,r){var i=t.length;if(i<2)return i?fi(t[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=t[o],l=-1;++l<i;)l!=o&&(s[o]=dn(s[o]||a,t[l],e,r));return fi(vn(s,1),e,r)}function _i(t,e,r){for(var n=-1,o=t.length,s=e.length,a={};++n<o;){var l=n<s?e[n]:i;r(a,t[n],l)}return a}function vi(t){return Ys(t)?t:[]}function bi(t){return"function"==typeof t?t:sl}function xi(t,e){return Ws(t)?t:Eo(t,e)?[t]:Fo(xa(t))}var wi=Jn;function Ei(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:oi(t,e,r)}var Si=he||function(t){return de.clearTimeout(t)};function Ti(t,e){if(e)return t.slice();var r=t.length,n=Ht?Ht(r):new t.constructor(r);return t.copy(n),n}function Ai(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Oi(t,e){var r=e?Ai(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ci(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,s=ha(t),a=e!==i,l=null===e,c=e==e,u=ha(e);if(!l&&!u&&!s&&t>e||s&&a&&c&&!l&&!u||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!u&&t<e||u&&r&&o&&!n&&!s||l&&r&&o||!a&&o||!c)return-1}return 0}function Mi(t,e,r,i){for(var o=-1,s=t.length,a=r.length,l=-1,c=e.length,u=vr(s-a,0),h=n(c+u),f=!i;++l<c;)h[l]=e[l];for(;++o<a;)(f||o<s)&&(h[r[o]]=t[o]);for(;u--;)h[l++]=t[o++];return h}function ki(t,e,r,i){for(var o=-1,s=t.length,a=-1,l=r.length,c=-1,u=e.length,h=vr(s-l,0),f=n(h+u),d=!i;++o<h;)f[o]=t[o];for(var p=o;++c<u;)f[p+c]=e[c];for(;++a<l;)(d||o<s)&&(f[p+r[a]]=t[o++]);return f}function Ii(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Pi(t,e,r,n){var o=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var l=e[s],c=n?n(r[l],t[l],l,r,t):i;c===i&&(c=t[l]),o?an(r,l,c):rn(r,l,c)}return r}function Li(t,e){return function(r,n){var i=Ws(r)?Ae:on,o=e?e():{};return i(r,t,uo(n,2),o)}}function Ri(t){return Jn((function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&wo(r[0],r[1],a)&&(s=o<3?i:s,o=1),e=Ot(e);++n<o;){var l=r[n];l&&t(e,l,n,s)}return e}))}function Di(t,e){return function(r,n){if(null==r)return r;if(!Xs(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Ot(r);(e?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function zi(t){return function(e,r,n){for(var i=-1,o=Ot(e),s=n(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===r(o[l],l,o))break}return e}}function Bi(t){return function(e){var r=sr(e=xa(e))?dr(e):i,n=r?r[0]:e.charAt(0),o=r?Ei(r,1).join(""):e.slice(1);return n[t]()+o}}function ji(t){return function(e){return De(tl(Ha(e).replace(Jt,"")),t,"")}}function Fi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Ur(t.prototype),n=t.apply(r,e);return na(n)?n:r}}function Ni(t){return function(e,r,n){var o=Ot(e);if(!Xs(e)){var s=uo(r,3);e=Ra(e),r=function(t){return s(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[s?e[a]:a]:i}}function $i(t){return io((function(e){var r=e.length,n=r,s=Gr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new kt(o);if(s&&!l&&"wrapper"==lo(a))var l=new Gr([],!0)}for(n=l?n:r;++n<r;){var c=lo(a=e[n]),u="wrapper"==c?ao(a):i;l=u&&So(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[lo(u[0])].apply(l,u[3]):1==a.length&&So(a)?l[c]():l.thru(a)}return function(){var t=arguments,n=t[0];if(l&&1==t.length&&Ws(n))return l.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ui(t,e,r,o,s,a,l,c,u,f){var d=e&h,p=1&e,m=2&e,g=24&e,y=512&e,_=m?i:Fi(t);return function i(){for(var h=arguments.length,v=n(h),b=h;b--;)v[b]=arguments[b];if(g)var x=co(i),w=rr(v,x);if(o&&(v=Mi(v,o,s,g)),a&&(v=ki(v,a,l,g)),h-=w,g&&h<f){var E=cr(v,x);return Xi(t,e,Ui,i.placeholder,r,v,E,c,u,f-h)}var S=p?r:this,T=m?S[t]:t;return h=v.length,c?v=Io(v,c):y&&h>1&&v.reverse(),d&&u<h&&(v.length=u),this&&this!==de&&this instanceof i&&(T=_||Fi(T)),T.apply(S,v)}}function Vi(t,e){return function(r,n){return function(t,e,r,n){return wn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Gi(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=hi(r),n=hi(n)):(r=ui(r),n=ui(n)),o=t(r,n)}return o}}function qi(t){return io((function(e){return e=Le(e,Ke(uo())),Jn((function(r){var n=this;return t(e,(function(t){return Te(t,n,r)}))}))}))}function Hi(t,e){var r=(e=e===i?" ":hi(e)).length;if(r<2)return r?Kn(e,t):e;var n=Kn(e,me(t/fr(e)));return sr(e)?Ei(dr(n),0,t).join(""):n.slice(0,t)}function Wi(t){return function(e,r,o){return o&&"number"!=typeof o&&wo(e,r,o)&&(r=o=i),e=ga(e),r===i?(r=e,e=0):r=ga(r),function(t,e,r,i){for(var o=-1,s=vr(me((e-t)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:ga(o),t)}}function Zi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=va(e),r=va(r)),t(e,r)}}function Xi(t,e,r,n,o,s,a,l,h,f){var d=8&e;e|=d?c:u,4&(e&=~(d?u:c))||(e&=-4);var p=[t,e,o,d?s:i,d?a:i,d?i:s,d?i:a,l,h,f],m=r.apply(i,p);return So(t)&&Lo(m,p),m.placeholder=n,zo(m,t,e)}function Yi(t){var e=At[t];return function(t,r){if(t=va(t),(r=null==r?0:br(ya(r),292))&&He(t)){var n=(xa(t)+"e").split("e");return+((n=(xa(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Ki=Cr&&1/ur(new Cr([,-0]))[1]==d?function(t){return new Cr(t)}:hl;function Ji(t){return function(e){var r=yo(e);return r==T?ar(e):r==k?hr(e):function(t,e){return Le(e,(function(e){return[e,t[e]
vendor: 32,605 bytes, line 2
2]}))}(e,t(e))}}function Qi(t,e,r,s,d,p,m,g){var y=2&e;if(!y&&"function"!=typeof t)throw new kt(o);var _=s?s.length:0;if(_||(e&=-97,s=d=i),m=m===i?m:vr(ya(m),0),g=g===i?g:ya(g),_-=d?d.length:0,e&u){var v=s,b=d;s=d=i}var x=y?i:ao(t),w=[t,e,r,s,d,v,b,p,m,g];if(x&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,s=n==h&&8==r||n==h&&r==f&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var l=e[3];if(l){var c=t[3];t[3]=c?Mi(c,l,e[4]):l,t[4]=c?cr(t[3],a):e[4]}(l=e[5])&&(c=t[5],t[5]=c?ki(c,l,e[6]):l,t[6]=c?cr(t[5],a):e[6]);(l=e[7])&&(t[7]=l);n&h&&(t[8]=null==t[8]?e[8]:br(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(w,x),t=w[0],e=w[1],r=w[2],s=w[3],d=w[4],!(g=w[9]=w[9]===i?y?0:t.length:vr(w[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)E=8==e||e==l?function(t,e,r){var o=Fi(t);return function s(){for(var a=arguments.length,l=n(a),c=a,u=co(s);c--;)l[c]=arguments[c];var h=a<3&&l[0]!==u&&l[a-1]!==u?[]:cr(l,u);return(a-=h.length)<r?Xi(t,e,Ui,s.placeholder,i,l,h,i,i,r-a):Te(this&&this!==de&&this instanceof s?o:t,this,l)}}(t,e,g):e!=c&&33!=e||d.length?Ui.apply(i,w):function(t,e,r,i){var o=1&e,s=Fi(t);return function e(){for(var a=-1,l=arguments.length,c=-1,u=i.length,h=n(u+l),f=this&&this!==de&&this instanceof e?s:t;++c<u;)h[c]=i[c];for(;l--;)h[c++]=arguments[++a];return Te(f,o?r:this,h)}}(t,e,r,s);else var E=function(t,e,r){var n=1&e,i=Fi(t);return function e(){return(this&&this!==de&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return zo((x?ri:Lo)(E,w),t,e)}function to(t,e,r,n){return t===i||Vs(t,Lt[r])&&!zt.call(n,r)?e:t}function eo(t,e,r,n,o,s){return na(t)&&na(e)&&(s.set(e,t),Gn(t,e,i,eo,s),s.delete(e)),t}function ro(t){return aa(t)?i:t}function no(t,e,r,n,o,s){var a=1&r,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(t),h=s.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=2&r?new Xr:i;for(s.set(t,e),s.set(e,t);++f<l;){var m=t[f],g=e[f];if(n)var y=a?n(g,m,f,e,t,s):n(m,g,f,t,e,s);if(y!==i){if(y)continue;d=!1;break}if(p){if(!Be(e,(function(t,e){if(!Qe(p,e)&&(m===t||o(m,t,r,n,s)))return p.push(e)}))){d=!1;break}}else if(m!==g&&!o(m,g,r,n,s)){d=!1;break}}return s.delete(t),s.delete(e),d}function io(t){return Do(Mo(t,i,Zo),t+"")}function oo(t){return An(t,Ra,mo)}function so(t){return An(t,Da,go)}var ao=Ir?function(t){return Ir.get(t)}:hl;function lo(t){for(var e=t.name+"",r=Pr[e],n=zt.call(Pr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function co(t){return(zt.call($r,"placeholder")?$r:t).placeholder}function uo(){var t=$r.iteratee||al;return t=t===al?Bn:t,arguments.length?t(arguments[0],arguments[1]):t}function ho(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=Ra(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Oo(i)]}return e}function po(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return zn(r)?r:i}var mo=_e?function(t){return null==t?[]:(t=Ot(t),ke(_e(t),(function(e){return Xt.call(t,e)})))}:_l,go=_e?function(t){for(var e=[];t;)Re(e,mo(t)),t=Wt(t);return e}:_l,yo=On;function _o(t,e,r){for(var n=-1,i=(e=xi(e,t)).length,o=!1;++n<i;){var s=No(e[n]);if(!(o=null!=t&&r(t,s)))break;t=t[s]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&ra(i)&&xo(s,i)&&(Ws(t)||Hs(t))}function vo(t){return"function"!=typeof t.constructor||Ao(t)?{}:Ur(Wt(t))}function bo(t){return Ws(t)||Hs(t)||!!(Kt&&t&&t[Kt])}function xo(t,e){var r=typeof t;return!!(e=null==e?p:e)&&("number"==r||"symbol"!=r&&bt.test(t))&&t>-1&&t%1==0&&t<e}function wo(t,e,r){if(!na(r))return!1;var n=typeof e;return!!("number"==n?Xs(r)&&xo(e,r.length):"string"==n&&e in r)&&Vs(r[e],t)}function Eo(t,e){if(Ws(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!ha(t))||(rt.test(t)||!et.test(t)||null!=e&&t in Ot(e))}function So(t){var e=lo(t),r=$r[e];if("function"!=typeof r||!(e in qr.prototype))return!1;if(t===r)return!0;var n=ao(r);return!!n&&t===n[0]}(Tr&&yo(new Tr(new ArrayBuffer(1)))!=D||Ar&&yo(new Ar)!=T||Or&&yo(Or.resolve())!=C||Cr&&yo(new Cr)!=k||Mr&&yo(new Mr)!=L)&&(yo=function(t){var e=On(t),r=e==O?t.constructor:i,n=r?$o(r):"";if(n)switch(n){case Lr:return D;case Rr:return T;case Dr:return C;case zr:return k;case Br:return L}return e});var To=Rt?ta:vl;function Ao(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function Oo(t){return t==t&&!na(t)}function Co(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==i||t in Ot(r)))}}function Mo(t,e,r){return e=vr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=vr(i.length-e,0),a=n(s);++o<s;)a[o]=i[e+o];o=-1;for(var l=n(e+1);++o<e;)l[o]=i[o];return l[e]=r(a),Te(t,this,l)}}function ko(t,e){return e.length<2?t:Tn(t,oi(e,0,-1))}function Io(t,e){for(var r=t.length,n=br(e.length,r),o=Ii(t);n--;){var s=e[n];t[n]=xo(s,r)?o[s]:i}return t}function Po(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Lo=Bo(ri),Ro=pe||function(t,e){return de.setTimeout(t,e)},Do=Bo(ni);function zo(t,e,r){var n=e+"";return Do(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(lt,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Oe(y,(function(r){var n="_."+r[0];e&r[1]&&!Ie(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(ut):[]}(n),r)))}function Bo(t){var e=0,r=0;return function(){var n=xr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function jo(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var s=Yn(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=e,t}var Fo=function(t){var e=Bs(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,r,n,i){e.push(n?i.replace(dt,"$1"):r||t)})),e}));function No(t){if("string"==typeof t||ha(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function $o(t){if(null!=t){try{return Dt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Uo(t){if(t instanceof qr)return t.clone();var e=new Gr(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vo=Jn((function(t,e){return Ys(t)?dn(t,vn(e,1,Ys,!0)):[]})),Go=Jn((function(t,e){var r=Qo(e);return Ys(r)&&(r=i),Ys(t)?dn(t,vn(e,1,Ys,!0),uo(r,2)):[]})),qo=Jn((function(t,e){var r=Qo(e);return Ys(r)&&(r=i),Ys(t)?dn(t,vn(e,1,Ys,!0),i,r):[]}));function Ho(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ya(r);return i<0&&(i=vr(n+i,0)),Ne(t,uo(e,3),i)}function Wo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ya(r),o=r<0?vr(n+o,0):br(o,n-1)),Ne(t,uo(e,3),o,!0)}function Zo(t){return(null==t?0:t.length)?vn(t,1):[]}function Xo(t){return t&&t.length?t[0]:i}var Yo=Jn((function(t){var e=Le(t,vi);return e.length&&e[0]===t[0]?In(e):[]})),Ko=Jn((function(t){var e=Qo(t),r=Le(t,vi);return e===Qo(r)?e=i:r.pop(),r.length&&r[0]===t[0]?In(r,uo(e,2)):[]})),Jo=Jn((function(t){var e=Qo(t),r=Le(t,vi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?In(r,i,e):[]}));function Qo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var ts=Jn(es);function es(t,e){return t&&t.length&&e&&e.length?Zn(t,e):t}var rs=io((function(t,e){var r=null==t?0:t.length,n=ln(t,e);return Xn(t,Le(e,(function(t){return xo(t,r)?+t:t})).sort(Ci)),n}));function ns(t){return null==t?t:Sr.call(t)}var is=Jn((function(t){return fi(vn(t,1,Ys,!0))})),os=Jn((function(t){var e=Qo(t);return Ys(e)&&(e=i),fi(vn(t,1,Ys,!0),uo(e,2))})),ss=Jn((function(t){var e=Qo(t);return e="function"==typeof e?e:i,fi(vn(t,1,Ys,!0),i,e)}));function as(t){if(!t||!t.length)return[];var e=0;return t=ke(t,(function(t){if(Ys(t))return e=vr(t.length,e),!0})),Xe(e,(function(e){return Le(t,qe(e))}))}function ls(t,e){if(!t||!t.length)return[];var r=as(t);return null==e?r:Le(r,(function(t){return Te(e,i,t)}))}var cs=Jn((function(t,e){return Ys(t)?dn(t,e):[]})),us=Jn((function(t){return yi(ke(t,Ys))})),hs=Jn((function(t){var e=Qo(t);return Ys(e)&&(e=i),yi(ke(t,Ys),uo(e,2))})),fs=Jn((function(t){var e=Qo(t);return e="function"==typeof e?e:i,yi(ke(t,Ys),i,e)})),ds=Jn(as);var ps=Jn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,ls(t,r)}));function ms(t){var e=$r(t);return e.__chain__=!0,e}function gs(t,e){return e(t)}var ys=io((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return ln(e,t)};return!(e>1||this.__actions__.length)&&n instanceof qr&&xo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:gs,args:[o],thisArg:i}),new Gr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var _s=Li((function(t,e,r){zt.call(t,r)?++t[r]:an(t,r,1)}));var vs=Ni(Ho),bs=Ni(Wo);function xs(t,e){return(Ws(t)?Oe:pn)(t,uo(e,3))}function ws(t,e){return(Ws(t)?Ce:mn)(t,uo(e,3))}var Es=Li((function(t,e,r){zt.call(t,r)?t[r].push(e):an(t,r,[e])}));var Ss=Jn((function(t,e,r){var i=-1,o="function"==typeof e,s=Xs(t)?n(t.length):[];return pn(t,(function(t){s[++i]=o?Te(e,t,r):Pn(t,e,r)})),s})),Ts=Li((function(t,e,r){an(t,r,e)}));function As(t,e){return(Ws(t)?Le:$n)(t,uo(e,3))}var Os=Li((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var Cs=Jn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&wo(t,e[0],e[1])?e=[]:r>2&&wo(e[0],e[1],e[2])&&(e=[e[0]]),Hn(t,vn(e,1),[])})),Ms=fe||function(){return de.Date.now()};function ks(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Qi(t,h,i,i,i,i,e)}function Is(t,e){var r;if("function"!=typeof e)throw new kt(o);return t=ya(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Ps=Jn((function(t,e,r){var n=1;if(r.length){var i=cr(r,co(Ps));n|=c}return Qi(t,n,e,r,i)})),Ls=Jn((function(t,e,r){var n=3;if(r.length){var i=cr(r,co(Ls));n|=c}return Qi(e,n,t,r,i)}));function Rs(t,e,r){var n,s,a,l,c,u,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new kt(o);function m(e){var r=n,o=s;return n=s=i,h=e,l=t.apply(o,r)}function g(t){return h=t,c=Ro(_,e),f?m(t):l}function y(t){var r=t-u;return u===i||r>=e||r<0||d&&t-h>=a}function _(){var t=Ms();if(y(t))return v(t);c=Ro(_,function(t){var r=e-(t-u);return d?br(r,a-(t-h)):r}(t))}function v(t){return c=i,p&&n?m(t):(n=s=i,l)}function b(){var t=Ms(),r=y(t);if(n=arguments,s=this,u=t,r){if(c===i)return g(u);if(d)return Si(c),c=Ro(_,e),m(u)}return c===i&&(c=Ro(_,e)),l}return e=va(e)||0,na(r)&&(f=!!r.leading,a=(d="maxWait"in r)?vr(va(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),b.cancel=function(){c!==i&&Si(c),h=0,n=u=s=c=i},b.flush=function(){return c===i?l:v(Ms())},b}var Ds=Jn((function(t,e){return fn(t,1,e)})),zs=Jn((function(t,e,r){return fn(t,va(e)||0,r)}));function Bs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Bs.Cache||Zr),r}function js(t){if("function"!=typeof t)throw new kt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Bs.Cache=Zr;var Fs=wi((function(t,e){var r=(e=1==e.length&&Ws(e[0])?Le(e[0],Ke(uo())):Le(vn(e,1),Ke(uo()))).length;return Jn((function(n){for(var i=-1,o=br(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return Te(t,this,n)}))})),Ns=Jn((function(t,e){var r=cr(e,co(Ns));return Qi(t,c,i,e,r)})),$s=Jn((function(t,e){var r=cr(e,co($s));return Qi(t,u,i,e,r)})),Us=io((function(t,e){return Qi(t,f,i,i,i,e)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Gs=Zi(Cn),qs=Zi((function(t,e){return t>=e})),Hs=Ln(function(){return arguments}())?Ln:function(t){return ia(t)&&zt.call(t,"callee")&&!Xt.call(t,"callee")},Ws=n.isArray,Zs=ve?Ke(ve):function(t){return ia(t)&&On(t)==R};function Xs(t){return null!=t&&ra(t.length)&&!ta(t)}function Ys(t){return ia(t)&&Xs(t)}var Ks=je||vl,Js=be?Ke(be):function(t){return ia(t)&&On(t)==x};function Qs(t){if(!ia(t))return!1;var e=On(t);return e==w||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!na(t))return!1;var e=On(t);return e==E||e==S||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ea(t){return"number"==typeof t&&t==ya(t)}function ra(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ia(t){return null!=t&&"object"==typeof t}var oa=xe?Ke(xe):function(t){return ia(t)&&yo(t)==T};function sa(t){return"number"==typeof t||ia(t)&&On(t)==A}function aa(t){if(!ia(t)||On(t)!=O)return!1;var e=Wt(t);if(null===e)return!0;var r=zt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Dt.call(r)==Nt}var la=we?Ke(we):function(t){return ia(t)&&On(t)==M};var ca=Ee?Ke(Ee):function(t){return ia(t)&&yo(t)==k};function ua(t){return"string"==typeof t||!Ws(t)&&ia(t)&&On(t)==I}function ha(t){return"symbol"==typeof t||ia(t)&&On(t)==P}var fa=Se?Ke(Se):function(t){return ia(t)&&ra(t.length)&&!!se[On(t)]};var da=Zi(Nn),pa=Zi((function(t,e){return t<=e}));function ma(t){if(!t)return[];if(Xs(t))return ua(t)?dr(t):Ii(t);if(te&&t[te])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[te]());var e=yo(t);return(e==T?ar:e==k?ur:Va)(t)}function ga(t){return t?(t=va(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var e=ga(t),r=e%1;return e==e?r?e-r:e:0}function _a(t){return t?cn(ya(t),0,g):0}function va(t){if("number"==typeof t)return t;if(ha(t))return m;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ye(t);var r=yt.test(t);return r||vt.test(t)?ue(t.slice(2),r?2:8):gt.test(t)?m:+t}function ba(t){return Pi(t,Da(t))}function xa(t){return null==t?"":hi(t)}var wa=Ri((function(t,e){if(Ao(e)||Xs(e))Pi(e,Ra(e),t);else for(var r in e)zt.call(e,r)&&rn(t,r,e[r])})),Ea=Ri((function(t,e){Pi(e,Da(e),t)})),Sa=Ri((function(t,e,r,n){Pi(e,Da(e),t,n)})),Ta=Ri((function(t,e,r,n){Pi(e,Ra(e),t,n)})),Aa=io(ln);var Oa=Jn((function(t,e){t=Ot(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&wo(e[0],e[1],o)&&(n=1);++r<n;)for(var s=e[r],a=Da(s),l=-1,c=a.length;++l<c;){var u=a[l],h=t[u];(h===i||Vs(h,Lt[u])&&!zt.call(t,u))&&(t[u]=s[u])}return t})),Ca=Jn((function(t){return t.push(i,eo),Te(Ba,i,t)}));function Ma(t,e,r){var n=null==t?i:Tn(t,e);return n===i?r:n}function ka(t,e){return null!=t&&_o(t,e,kn)}var Ia=Vi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),t[e]=r}),nl(sl)),Pa=Vi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),zt.call(t,e)?t[e].push(r):t[e]=[r]}),uo),La=Jn(Pn);function Ra(t){return Xs(t)?Kr(t):jn(t)}function Da(t){return Xs(t)?Kr(t,!0):Fn(t)}var za=Ri((function(t,e,r){Gn(t,e,r)})),Ba=Ri((function(t,e,r,n){Gn(t,e,r,n)})),ja=io((function(t,e){var r={};if(null==t)return r;var n=!1;e=Le(e,(function(e){return e=xi(e,t),n||(n=e.length>1),e})),Pi(t,so(t),r),n&&(r=un(r,7,ro));for(var i=e.length;i--;)di(r,e[i]);return r}));var Fa=io((function(t,e){return null==t?{}:function(t,e){return Wn(t,e,(function(e,r){return ka(t,r)}))}(t,e)}));function Na(t,e){if(null==t)return{};var r=Le(so(t),(function(t){return[t]}));return e=uo(e),Wn(t,r,(function(t,r){return e(t,r[0])}))}var $a=Ji(Ra),Ua=Ji(Da);function Va(t){return null==t?[]:Je(t,Ra(t))}var Ga=ji((function(t,e,r){return e=e.toLowerCase(),t+(r?qa(e):e)}));function qa(t){return Qa(xa(t).toLowerCase())}function Ha(t){return(t=xa(t))&&t.replace(xt,nr).replace(Qt,"")}var Wa=ji((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Za=ji((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Xa=Bi("toLowerCase");var Ya=ji((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var Ka=ji((function(t,e,r){return t+(r?" ":"")+Qa(e)}));var Ja=ji((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Qa=Bi("toUpperCase");function tl(t,e,r){return t=xa(t),(e=r?i:e)===i?function(t){return ne.test(t)}(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(e)||[]}var el=Jn((function(t,e){try{return Te(t,i,e)}catch(t){return Qs(t)?t:new St(t)}})),rl=io((function(t,e){return Oe(e,(function(e){e=No(e),an(t,e,Ps(t[e],t))})),t}));function nl(t){return function(){return t}}var il=$i(),ol=$i(!0);function sl(t){return t}function al(t){return Bn("function"==typeof t?t:un(t,1))}var ll=Jn((function(t,e){return function(r){return Pn(r,t,e)}})),cl=Jn((function(t,e){return function(r){return Pn(t,r,e)}}));function ul(t,e,r){var n=Ra(e),i=Sn(e,n);null!=r||na(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=Sn(e,Ra(e)));var o=!(na(r)&&"chain"in r&&!r.chain),s=ta(t);return Oe(i,(function(r){var n=e[r];t[r]=n,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=Ii(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Re([this.value()],arguments))})})),t}function hl(){}var fl=qi(Le),dl=qi(Me),pl=qi(Be);function ml(t){return Eo(t)?qe(No(t)):function(t){return function(e){return Tn(e,t)}}(t)}var gl=Wi(),yl=Wi(!0);function _l(){return[]}function vl(){return!1}var bl=Gi((function(t,e){return t+e}),0),xl=Yi("ceil"),wl=Gi((function(t,e){return t/e}),1),El=Yi("floor");var Sl,Tl=Gi((function(t,e){return t*e}),1),Al=Yi("round"),Ol=Gi((function(t,e){return t-e}),0);return $r.after=function(t,e){if("function"!=typeof e)throw new kt(o);return t=ya(t),function(){if(--t<1)return e.apply(this,arguments)}},$r.ary=ks,$r.assign=wa,$r.assignIn=Ea,$r.assignInWith=Sa,$r.assignWith=Ta,$r.at=Aa,$r.before=Is,$r.bind=Ps,$r.bindAll=rl,$r.bindKey=Ls,$r.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ws(t)?t:[t]},$r.chain=ms,$r.chunk=function(t,e,r){e=(r?wo(t,e,r):e===i)?1:vr(ya(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,l=n(me(o/e));s<o;)l[a++]=oi(t,s,s+=e);return l},$r.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},$r.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Re(Ws(r)?Ii(r):[r],vn(e,1))},$r.cond=function(t){var e=null==t?0:t.length,r=uo();return t=e?Le(t,(function(t){if("function"!=typeof t[1])throw new kt(o);return[r(t[0]),t[1]]})):[],Jn((function(r){for(var n=-1;++n<e;){var i=t[n];if(Te(i[0],this,r))return Te(i[1],this,r)}}))},$r.conforms=function(t){return function(t){var e=Ra(t);return function(r){return hn(r,t,e)}}(un(t,1))},$r.constant=nl,$r.countBy=_s,$r.create=function(t,e){var r=Ur(t);return null==e?r:sn(r,e)},$r.curry=function t(e,r,n){var o=Qi(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},$r.curryRight=function t(e,r,n){var o=Qi(e,l,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},$r.debounce=Rs,$r.defaults=Oa,$r.defaultsDeep=Ca,$r.defer=Ds,$r.delay=zs,$r.difference=Vo,$r.differenceBy=Go,$r.differenceWith=qo,$r.drop=function(t,e,r){var n=null==t?0:t.length;return n?oi(t,(e=r||e===i?1:ya(e))<0?0:e,n):[]},$r.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?oi(t,0,(e=n-(e=r||e===i?1:ya(e)))<0?0:e):[]},$r.dropRightWhile=function(t,e){return t&&t.length?mi(t,uo(e,3),!0,!0):[]},$r.dropWhile=function(t,e){return t&&t.length?mi(t,uo(e,3),!0):[]},$r.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ya(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ya(n))<0&&(n+=o),n=r>n?0:_a(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},$r.filter=function(t,e){return(Ws(t)?ke:_n)(t,uo(e,3))},$r.flatMap=function(t,e){return vn(As(t,e),1)},$r.flatMapDeep=function(t,e){return vn(As(t,e),d)},$r.flatMapDepth=function(t,e,r){return r=r===i?1:ya(r),vn(As(t,e),r)},$r.flatten=Zo,$r.flattenDeep=function(t){return(null==t?0:t.length)?vn(t,d):[]},$r.flattenDepth=function(t,e){return(null==t?0:t.length)?vn(t,e=e===i?1:ya(e)):[]},$r.flip=function(t){return Qi(t,512)},$r.flow=il,$r.flowRight=ol,$r.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},$r.functions=function(t){return null==t?[]:Sn(t,Ra(t))},$r.functionsIn=function(t){return null==t?[]:Sn(t,Da(t))},$r.groupBy=Es,$r.initial=function(t){return(null==t?0:t.length)?oi(t,0,-1):[]},$r.intersection=Yo,$r.intersectionBy=Ko,$r.intersectionWith=Jo,$r.invert=Ia,$r.invertBy=Pa,$r.invokeMap=Ss,$r.iteratee=al,$r.keyBy=Ts,$r.keys=Ra,$r.keysIn=Da,$r.map=As,$r.mapKeys=function(t,e){var r={};return e=uo(e,3),wn(t,(function(t,n,i){an(r,e(t,n,i),t)})),r},$r.mapValues=function(t,e){var r={};return e=uo(e,3),wn(t,(function(t,n,i){an(r,n,e(t,n,i))})),r},$r.matches=function(t){return Un(un(t,1))},$r.matchesProperty=function(t,e){return Vn(t,un(e,1))},$r.memoize=Bs,$r.merge=za,$r.mergeWith=Ba,$r.method=ll,$r.methodOf=cl,$r.mixin=ul,$r.negate=js,$r.nthArg=function(t){return t=ya(t),Jn((function(e){return qn(e,t)}))},$r.omit=ja,$r.omitBy=function(t,e){return Na(t,js(uo(e)))},$r.once=function(t){return Is(2,t)},$r.orderBy=function(t,e,r,n){return null==t?[]:(Ws(e)||(e=null==e?[]:[e]),Ws(r=n?i:r)||(r=null==r?[]:[r]),Hn(t,e,r))},$r.over=fl,$r.overArgs=Fs,$r.overEvery=dl,$r.overSome=pl,$r.partial=Ns,$r.partialRight=$s,$r.partition=Os,$r.pick=Fa,$r.pickBy=Na,$r.property=ml,$r.propertyOf=function(t){return function(e){return null==t?i:Tn(t,e)}},$r.pull=ts,$r.pullAll=es,$r.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Zn(t,e,uo(r,2)):t},$r.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Zn(t,e,i,r):t},$r.pullAt=rs,$r.range=gl,$r.rangeRight=yl,$r.rearg=Us,$r.reject=function(t,e){return(Ws(t)?ke:_n)(t,js(uo(e,3)))},$r.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=uo(e,3);++n<o;){var s=t[n];e(s,n,t)&&(r.push(s),i.push(n))}return Xn(t,i),r},$r.rest=function(t,e){if("function"!=typeof t)throw new kt(o);return Jn(t,e=e===i?e:ya(e))},$r.reverse=ns,$r.sampleSize=function(t,e,r){return e=(r?wo(t,e,r):e===i)?1:ya(e),(Ws(t)?Qr:ti)(t,e)},$r.set=function(t,e,r){return null==t?t:ei(t,e,r)},$r.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:ei(t,e,r,n)},$r.shuffle=function(t){return(Ws(t)?tn:ii)(t)},$r.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&wo(t,e,r)?(e=0,r=n):(e=null==e?0:ya(e),r=r===i?n:ya(r)),oi(t,e,r)):[]},$r.sortBy=Cs,$r.sortedUniq=function(t){return t&&t.length?ci(t):[]},$r.sortedUniqBy=function(t,e){return t&&t.length?ci(t,uo(e,2)):[]},$r.split=function(t,e,r){return r&&"number"!=typeof r&&wo(t,e,r)&&(e=r=i),(r=r===i?g:r>>>0)?(t=xa(t))&&("string"==typeof e||null!=e&&!la(e))&&!(e=hi(e))&&sr(t)?Ei(dr(t),0,r):t.split(e,r):[]},$r.spread=function(t,e){if("function"!=typeof t)throw new kt(o);return e=null==e?0:vr(ya(e),0),Jn((function(r){var n=r[e],i=Ei(r,0,e);return n&&Re(i,n),Te(t,this,i)}))},$r.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},$r.take=function(t,e,r){return t&&t.length?oi(t,0,(e=r||e===i?1:ya(e))<0?0:e):[]},$r.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?oi(t,(e=n-(e=r||e===i?1:ya(e)))<0?0:e,n):[]},$r.takeRightWhile=function(t,e){return t&&t.length?mi(t,uo(e,3),!1,!0):[]},$r.takeWhile=function(t,e){return t&&t.length?mi(t,uo(e,3)):[]},$r.tap=function(t,e){return e(t),t},$r.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new kt(o);return na(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Rs(t,e,{leading:n,maxWait:e,trailing:i})},$r.thru=gs,$r.toArray=ma,$r.toPairs=$a,$r.toPairsIn=Ua,$r.toPath=function(t){return Ws(t)?Le(t,No):ha(t)?[t]:Ii(Fo(xa(t)))},$r.toPlainObject=ba,$r.transform=function(t,e,r){var n=Ws(t),i=n||Ks(t)||fa(t);if(e=uo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:na(t)&&ta(o)?Ur(Wt(t)):{}}return(i?Oe:wn)(t,(function(t,n,i){return e(r,t,n,i)})),r},$r.unary=function(t){return ks(t,1)},$r.union=is,$r.unionBy=os,$r.unionWith=ss,$r.uniq=function(t){return t&&t.length?fi(t):[]},$r.uniqBy=function(t,e){return t&&t.length?fi(t,uo(e,2)):[]},$r.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?fi(t,i,e):[]},$r.unset=function(t,e){return null==t||di(t,e)},$r.unzip=as,$r.unzipWith=ls,$r.update=function(t,e,r){return null==t?t:pi(t,e,bi(r))},$r.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:pi(t,e,bi(r),n)},$r.values=Va,$r.valuesIn=function(t){return null==t?[]:Je(t,Da(t))},$r.without=cs,$r.words=tl,$r.wrap=function(t,e){return Ns(bi(e),t)},$r.xor=us,$r.xorBy=hs,$r.xorWith=fs,$r.zip=ds,$r.zipObject=function(t,e){return _i(t||[],e||[],rn)},$r.zipObjectDeep=function(t,e){return _i(t||[],e||[],ei)},$r.zipWith=ps,$r.entries=$a,$r.entriesIn=Ua,$r.extend=Ea,$r.extendWith=Sa,ul($r,$r),$r.add=bl,$r.attempt=el,$r.camelCase=Ga,$r.capitalize=qa,$r.ceil=xl,$r.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=va(r))==r?r:0),e!==i&&(e=(e=va(e))==e?e:0),cn(va(t),e,r)},$r.clone=function(t){return un(t,4)},$r.cloneDeep=function(t){return un(t,5)},$r.cloneDeepWith=function(t,e){return un(t,5,e="function"==typeof e?e:i)},$r.cloneWith=function(t,e){return un(t,4,e="function"==typeof e?e:i)},$r.conformsTo=function(t,e){return null==e||hn(t,e,Ra(e))},$r.deburr=Ha,$r.defaultTo=function(t,e){return null==t||t!=t?e:t},$r.divide=wl,$r.endsWith=function(t,e,r){t=xa(t),e=hi(e);var n=t.length,o=r=r===i?n:cn(ya(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},$r.eq=Vs,$r.escape=function(t){return(t=xa(t))&&K.test(t)?t.replace(X,ir):t},$r.escapeRegExp=function(t){return(t=xa(t))&&ot.test(t)?t.replace(it,"\\$&"):t},$r.every=function(t,e,r){var n=Ws(t)?Me:gn;return r&&wo(t,e,r)&&(e=i),n(t,uo(e,3))},$r.find=vs,$r.findIndex=Ho,$r.findKey=function(t,e){return Fe(t,uo(e,3),wn)},$r.findLast=bs,$r.findLastIndex=Wo,$r.findLastKey=function(t,e){return Fe(t,uo(e,3),En)},$r.floor=El,$r.forEach=xs,$r.forEachRight=ws,$r.forIn=function(t,e){return null==t?t:bn(t,uo(e,3),Da)},$r.forInRight=function(t,e){return null==t?t:xn(t,uo(e,3),Da)},$r.forOwn=function(t,e){return t&&wn(t,uo(e,3))},$r.forOwnRight=function(t,e){return t&&En(t,uo(e,3))},$r.get=Ma,$r.gt=Gs,$r.gte=qs,$r.has=function(t,e){return null!=t&&_o(t,e,Mn)},$r.hasIn=ka,$r.head=Xo,$r.identity=sl,$r.includes=function(t,e,r,n){t=Xs(t)?t:Va(t),r=r&&!n?ya(r):0;var i=t.length;return r<0&&(r=vr(i+r,0)),ua(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&$e(t,e,r)>-1},$r.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ya(r);return i<0&&(i=vr(n+i,0)),$e(t,e,i)},$r.inRange=function(t,e,r){return e=ga(e),r===i?(r=e,e=0):r=ga(r),function(t,e,r){return t>=br(e,r)&&t<vr(e,r)}(t=va(t),e,r)},$r.invoke=La,$r.isArguments=Hs,$r.isArray=Ws,$r.isArrayBuffer=Zs,$r.isArrayLike=Xs,$r.isArrayLikeObject=Ys,$r.isBoolean=function(t){return!0===t||!1===t||ia(t)&&On(t)==b},$r.isBuffer=Ks,$r.isDate=Js,$r.isElement=function(t){return ia(t)&&1===t.nodeType&&!aa(t)},$r.isEmpty=function(t){if(null==t)return!0;if(Xs(t)&&(Ws(t)||"string"==typeof t||"function"==typeof t.splice||Ks(t)||fa(t)||Hs(t)))return!t.length;var e=yo(t);if(e==T||e==k)return!t.size;if(Ao(t))return!jn(t).length;for(var r in t)if(zt.call(t,r))return!1;return!0},$r.isEqual=function(t,e){return Rn(t,e)},$r.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Rn(t,e,i,r):!!n},$r.isError=Qs,$r.isFinite=function(t){return"number"==typeof t&&He(t)},$r.isFunction=ta,$r.isInteger=ea,$r.isLength=ra,$r.isMap=oa,$r.isMatch=function(t,e){return t===e||Dn(t,e,fo(e))},$r.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Dn(t,e,fo(e),r)},$r.isNaN=function(t){return sa(t)&&t!=+t},$r.isNative=function(t){if(To(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return zn(t)},$r.isNil=function(t){return null==t},$r.isNull=function(t){return null===t},$r.isNumber=sa,$r.isObject=na,$r.isObjectLike=ia,$r.isPlainObject=aa,$r.isRegExp=la,$r.isSafeInteger=function(t){return ea(t)&&t>=-9007199254740991&&t<=p},$r.isSet=ca,$r.isString=ua,$r.isSymbol=ha,$r.isTypedArray=fa,$r.isUndefined=function(t){return t===i},$r.isWeakMap=function(t){return ia(t)&&yo(t)==L},$r.isWeakSet=function(t){return ia(t)&&"[object WeakSet]"==On(t)},$r.join=function(t,e){return null==t?"":yr.call(t,e)},$r.kebabCase=Wa,$r.last=Qo,$r.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ya(r))<0?vr(n+o,0):br(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Ne(t,Ve,o,!0)},$r.lowerCase=Za,$r.lowerFirst=Xa,$r.lt=da,$r.lte=pa,$r.max=function(t){return t&&t.length?yn(t,sl,Cn):i},$r.maxBy=function(t,e){return t&&t.length?yn(t,uo(e,2),Cn):i},$r.mean=function(t){return Ge(t,sl)},$r.meanBy=function(t,e){return Ge(t,uo(e,2))},$r.min=function(t){return t&&t.length?yn(t,sl,Nn):i},$r.minBy=function(t,e){return t&&t.length?yn(t,uo(e,2),Nn):i},$r.stubArray=_l,$r.stubFalse=vl,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=Tl,$r.nth=function(t,e){return t&&t.length?qn(t,ya(e)):i},$r.noConflict=function(){return de._===this&&(de._=$t),this},$r.noop=hl,$r.now=Ms,$r.pad=function(t,e,r){t=xa(t);var n=(e=ya(e))?fr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Hi(ye(i),r)+t+Hi(me(i),r)},$r.padEnd=function(t,e,r){t=xa(t);var n=(e=ya(e))?fr(t):0;return e&&n<e?t+Hi(e-n,r):t},$r.padStart=function(t,e,r){t=xa(t);var n=(e=ya(e))?fr(t):0;return e&&n<e?Hi(e-n,r)+t:t},$r.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),wr(xa(t).replace(st,""),e||0)},$r.random=function(t,e,r){if(r&&"boolean"!=typeof r&&wo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=ga(t),e===i?(e=t,t=0):e=ga(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=Er();return br(t+o*(e-t+ce("1e-"+((o+"").length-1))),e)}return Yn(t,e)},$r.reduce=function(t,e,r){var n=Ws(t)?De:We,i=arguments.length<3;return n(t,uo(e,4),r,i,pn)},$r.reduceRight=function(t,e,r){var n=Ws(t)?ze:We,i=arguments.length<3;return n(t,uo(e,4),r,i,mn)},$r.repeat=function(t,e,r){return e=(r?wo(t,e,r):e===i)?1:ya(e),Kn(xa(t),e)},$r.replace=function(){var t=arguments,e=xa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$r.result=function(t,e,r){var n=-1,o=(e=xi(e,t)).length;for(o||(o=1,t=i);++n<o;){var s=null==t?i:t[No(e[n])];s===i&&(n=o,s=r),t=ta(s)?s.call(t):s}return t},$r.round=Al,$r.runInContext=t,$r.sample=function(t){return(Ws(t)?Jr:Qn)(t)},$r.size=function(t){if(null==t)return 0;if(Xs(t))return ua(t)?fr(t):t.length;var e=yo(t);return e==T||e==k?t.size:jn(t).length},$r.snakeCase=Ya,$r.some=function(t,e,r){var n=Ws(t)?Be:si;return r&&wo(t,e,r)&&(e=i),n(t,uo(e,3))},$r.sortedIndex=function(t,e){return ai(t,e)},$r.sortedIndexBy=function(t,e,r){return li(t,e,uo(r,2))},$r.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ai(t,e);if(n<r&&Vs(t[n],e))return n}return-1},$r.sortedLastIndex=function(t,e){return ai(t,e,!0)},$r.sortedLastIndexBy=function(t,e,r){return li(t,e,uo(r,2),!0)},$r.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var r=ai(t,e,!0)-1;if(Vs(t[r],e))return r}return-1},$r.startCase=Ka,$r.startsWith=function(t,e,r){return t=xa(t),r=null==r?0:cn(ya(r),0,t.length),e=hi(e),t.slice(r,r+e.length)==e},$r.subtract=Ol,$r.sum=function(t){return t&&t.length?Ze(t,sl):0},$r.sumBy=function(t,e){return t&&t.length?Ze(t,uo(e,2)):0},$r.template=function(t,e,r){var n=$r.templateSettings;r&&wo(t,e,r)&&(e=i),t=xa(t),e=Sa({},e,n,to);var o,s,a=Sa({},e.imports,n.imports,to),l=Ra(a),c=Je(a,l),u=0,h=e.interpolate||wt,f="__p += '",d=Ct((e.escape||wt).source+"|"+h.source+"|"+(h===tt?pt:wt).source+"|"+(e.evaluate||wt).source+"|$","g"),p="//# sourceURL="+(zt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";t.replace(d,(function(e,r,n,i,a,l){return n||(n=i),f+=t.slice(u,l).replace(Et,or),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=l+e.length,e})),f+="';\n";var m=zt.call(e,"variable")&&e.variable;if(m){if(ft.test(m))throw new St("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(q,""):f).replace(H,"$1").replace(W,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";
2\n")+f+"return __p\n}";var g=el((function(){return Tt(l,p+"return "+f).apply(i,c)}));if(g.source=f,Qs(g))throw g;return g},$r.times=function(t,e){if((t=ya(t))<1||t>p)return[];var r=g,n=br(t,g);e=uo(e),t-=g;for(var i=Xe(n,e);++r<t;)e(r);return i},$r.toFinite=ga,$r.toInteger=ya,$r.toLength=_a,$r.toLower=function(t){return xa(t).toLowerCase()},$r.toNumber=va,$r.toSafeInteger=function(t){return t?cn(ya(t),-9007199254740991,p):0===t?t:0},$r.toString=xa,$r.toUpper=function(t){return xa(t).toUpperCase()},$r.trim=function(t,e,r){if((t=xa(t))&&(r||e===i))return Ye(t);if(!t||!(e=hi(e)))return t;var n=dr(t),o=dr(e);return Ei(n,tr(n,o),er(n,o)+1).join("")},$r.trimEnd=function(t,e,r){if((t=xa(t))&&(r||e===i))return t.slice(0,pr(t)+1);if(!t||!(e=hi(e)))return t;var n=dr(t);return Ei(n,0,er(n,dr(e))+1).join("")},$r.trimStart=function(t,e,r){if((t=xa(t))&&(r||e===i))return t.replace(st,"");if(!t||!(e=hi(e)))return t;var n=dr(t);return Ei(n,tr(n,dr(e))).join("")},$r.truncate=function(t,e){var r=30,n="...";if(na(e)){var o="separator"in e?e.separator:o;r="length"in e?ya(e.length):r,n="omission"in e?hi(e.omission):n}var s=(t=xa(t)).length;if(sr(t)){var a=dr(t);s=a.length}if(r>=s)return t;var l=r-fr(n);if(l<1)return n;var c=a?Ei(a,0,l).join(""):t.slice(0,l);if(o===i)return c+n;
vendor: 5,520 bytes, line 2
2if(a&&(l+=c.length-l),la(o)){if(t.slice(l).search(o)){var u,h=c;for(o.global||(o=Ct(o.source,xa(mt.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var f=u.index;c=c.slice(0,f===i?l:f)}}else if(t.indexOf(hi(o),l)!=l){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},$r.unescape=function(t){return(t=xa(t))&&Y.test(t)?t.replace(Z,mr):t},$r.uniqueId=function(t){var e=++Bt;return xa(t)+e},$r.upperCase=Ja,$r.upperFirst=Qa,$r.each=xs,$r.eachRight=ws,$r.first=Xo,ul($r,(Sl={},wn($r,(function(t,e){zt.call($r.prototype,e)||(Sl[e]=t)})),Sl),{chain:!1}),$r.VERSION="4.17.21",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$r[t].placeholder=$r})),Oe(["drop","take"],(function(t,e){qr.prototype[t]=function(r){r=r===i?1:vr(ya(r),0);var n=this.__filtered__&&!e?new qr(this):this.clone();return n.__filtered__?n.__takeCount__=br(r,n.__takeCount__):n.__views__.push({size:br(r,g),type:t+(n.__dir__<0?"Right":"")}),n},qr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Oe(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;qr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:uo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Oe(["head","last"],(function(t,e){var r="take"+(e?"Right":"");qr.prototype[t]=function(){return this[r](1).value()[0]}})),Oe(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");qr.prototype[t]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(sl)},qr.prototype.find=function(t){return this.filter(t).head()},qr.prototype.findLast=function(t){return this.reverse().find(t)},qr.prototype.invokeMap=Jn((function(t,e){return"function"==typeof t?new qr(this):this.map((function(r){return Pn(r,t,e)}))})),qr.prototype.reject=function(t){return this.filter(js(uo(t)))},qr.prototype.slice=function(t,e){t=ya(t);var r=this;return r.__filtered__&&(t>0||e<0)?new qr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ya(e))<0?r.dropRight(-e):r.take(e-t)),r)},qr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qr.prototype.toArray=function(){return this.take(g)},wn(qr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=$r[n?"take"+("last"==e?"Right":""):e],s=n||/^find/.test(e);o&&($r.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,l=e instanceof qr,c=a[0],u=l||Ws(e),h=function(t){var e=o.apply($r,Re([t],a));return n&&f?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,m=l&&!d;if(!s&&u){e=m?e:new qr(this);var g=t.apply(e,a);return g.__actions__.push({func:gs,args:[h],thisArg:i}),new Gr(g,f)}return p&&m?t.apply(this,a):(g=this.thru(h),p?n?g.value()[0]:g.value():g)})})),Oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=It[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);$r.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Ws(i)?i:[],t)}return this[r]((function(r){return e.apply(Ws(r)?r:[],t)}))}})),wn(qr.prototype,(function(t,e){var r=$r[e];if(r){var n=r.name+"";zt.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:e,func:r})}})),Pr[Ui(i,2).name]=[{name:"wrapper",func:i}],qr.prototype.clone=function(){var t=new qr(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},qr.prototype.reverse=function(){if(this.__filtered__){var t=new qr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Ws(t),n=e<0,i=r?t.length:0,o=function(t,e,r){var n=-1,i=r.length;for(;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=br(e,t+s);break;case"takeRight":t=vr(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,c=n?a:s-1,u=this.__iteratees__,h=u.length,f=0,d=br(l,this.__takeCount__);if(!r||!n&&i==l&&d==l)return gi(t,this.__actions__);var p=[];t:for(;l--&&f<d;){for(var m=-1,g=t[c+=e];++m<h;){var y=u[m],_=y.iteratee,v=y.type,b=_(g);if(2==v)g=b;else if(!b){if(1==v)continue t;break t}}p[f++]=g}return p},$r.prototype.at=ys,$r.prototype.chain=function(){return ms(this)},$r.prototype.commit=function(){return new Gr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===i&&(this.__values__=ma(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},$r.prototype.plant=function(t){for(var e,r=this;r instanceof Vr;){var n=Uo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},$r.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qr){var e=t;return this.__actions__.length&&(e=new qr(this)),(e=e.reverse()).__actions__.push({func:gs,args:[ns],thisArg:i}),new Gr(e,this.__chain__)}return this.thru(ns)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,te&&($r.prototype[te]=function(){return this}),$r}();de._=gr,(n=function(){return gr}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},5596:function(t){t.exports=function(){"use strict";var t,e,r;
2function n(n,i){if(t)if(e){var o="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk); self.onerror = null;",s={};t(s),r=i(s),"undefined"!=typeof window&&window&&window.URL&&window.URL.createObjectURL&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else e=i;else t=i}return n(["exports"],(function(t){var e="undefined"!=typeof self?self:{},r="3.1.2";let n;const i={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==n){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{n=null!=process.env.API_URL_REGEX?new RegExp(process.env.API_URL_REGEX):t}catch(e){n=t}}return n},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!i.API_URL)return null;try{const t=new URL(i.API_URL);return"api.mapbox.cn"===t.hostname?"https://events.mapbox.cn/events/v2":"api.mapbox.com"===t.hostname?"https://events.mapbox.com/events/v2":null}catch(t){return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},o={supported:!1,testSupport:u};let s,a,l=!1,c=!1;function u(t){!l&&a&&(c?h(t):s=t)}function h(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),t.isContextLost())return;o.supported=!0}
2catch(t){}t.deleteTexture(e),l=!0}e.document&&(a=e.document.createElement("img"),a.onload=function(){s&&h(s),s=null,c=!0},a.onerror=function(){l=!0,s=null},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const f="01";function d(){const t="1",e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let r="";for(let t=0;t<10;t++)r+=e[Math.floor(62*Math.random())];const n=432e5;return{token:[t,f,r].join(""),tokenExpiresAt:Date.now()+n}}function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m=g;function g(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=r,this.p2y=n}g.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var r=t,n=0;n<8;n++){var i=this.sampleCurveX(r)-t;if(Math.abs(i)<e)return r;var o=this.sampleCurveDerivativeX(r);if(Math.abs(o)<1e-6)break;r-=i/o}var s=0,a=1;for(r=t,n=0;n<20&&(i=this.sampleCurveX(r),!(Math.abs(i-t)<e));n++)t>i?s=r:a=r,r=.5*(a-s)+s;return r},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var y=p(m),_=v;function v(t,e){this.x=t,this.y=e}v.prototype={clone:function(){return new v(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),o=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},v.convert=function(t){return t instanceof v?t:Array.isArray(t)?new v(t[0],t[1]):t};var b=p(_);function x(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!x(t[r],e[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!x(t[r],e[r]))return!1;return!0}return t===e}const w=Math.PI/180,E=180/Math.PI;function S(t){return t*w}function T(t){return t*E}const A=[[0,0],[1,0],[1,1],[0,1]];function O(t){const e=(t+45+360)%360,r=Math.round(e/90)%4;return A[r]}function C(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,r=e*t;
2return 4*(t<.5?r:3*(t-e)+r-.75)}function M(t){let e=1/0,r=1/0,n=-1/0,i=-1/0;for(const o of t)e=Math.min(e,o.x),r=Math.min(r,o.y),n=Math.max(n,o.x),i=Math.max(i,o.y);return{min:new b(e,r),max:new b(n,i)}}function k(t,e,r){let n=0;for(let i=0;i<2;++i){const o=r?r[i]:0;t[i]>o&&(n+=(t[i]-o)*(t[i]-o)),e[i]<o&&(n+=(o-e[i])*(o-e[i]))}return n}function I(t,e,r=0,n=!0){const i=new b(r,r),o=t.sub(i),s=e.add(i),a=[o,new b(s.x,o.y),s,new b(o.x,s.y)];return n&&a.push(o.clone()),a}function P(t,e){const r=[];for(let n=0;n<t.length;n++){const i=B(n-1,-1,t.length-1),o=B(n+1,-1,t.length-1),s=t[i],a=t[n],l=t[o],c=s.sub(a).unit(),u=l.sub(a).unit(),h=u.angleWithSep(c.x,c.y),f=c.add(u).unit().mult(-1*e/Math.sin(h/2));r.push(a.add(f))}return r}function L(t,e,r,n){const i=new y(t,e,r,n);return function(t){return i.solve(t)}}const R=L(.25,.1,.25,1);function D(t,e,r){return Math.min(r,Math.max(e,t))}function z(t,e,r){return(r=D((r-t)/(e-t),0,1))*r*(3-2*r)}function B(t,e,r){const n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function j(t,e){const r=(e-t+180)%360-180;return r<-180?r+360:r}function F(t,e,r){if(!t.length)return r(null,[]);let n=t.length;const i=new Array(t.length);let o=null;t.forEach(((t,s)=>{e(t,((t,e)=>{t&&(o=t),i[s]=e,0==--n&&r(o,i)}))}))}function N(t){const e=[];for(const r in t)e.push(t[r]);return e}function $(t,e){const r=[];for(const n in t)n in e||r.push(n);return r}function U(t,...e){for(const r of e)for(const e in r)t[e]=r[e];return t}function V(t,e){const r={};for(let n=0;n<e.length;n++){const i=e[n];i in t&&(r[i]=t[i])}return r}let G=1;function q(){return G++}function H(){function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}return t()}function W(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Z(t){return t<=1?1:Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function X(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function Y(t,e){t.forEach((t=>{e[t]&&(e[t]=e[t].bind(e))}))}function K(t,e){return-1!==t.indexOf(e,t.length-e.length)}function J(t,e,r){const n={};for(const i in t)n[i]=e.call(r||this,t[i],i,t);return n}function Q(t,e,r){const n={};for(const i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function tt(t){return Array.isArray(t)?t.map(tt):"object"==typeof t&&t?J(t,tt):t}function et(t,e,r,n,i){return D((t-e)/(r-e)*(i-n)+n,n,i)}function rt(t,e){for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}const nt={};function it(t){nt[t]||("undefined"!=typeof console&&console.warn(t),nt[t]=!0)}function ot(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function st(t){let e=0;for(let r,n,i=0,o=t.length,s=o-1;i<o;s=i++)r=t[i],n=t[s],e+=(n.x-r.x)*(r.y+n.y);return e}function at([t,e,r]){const n=S(e+90),i=S(r);return{x:t*Math.cos(n)*Math.sin(i),y:t*Math.sin(n)*Math.sin(i),z:t*Math.cos(i),azimuthal:e,polar:r}}function lt([t,e]){const r=at([1,t,e]);return{x:r.x,y:r.y,z:r.z}}function ct(t,e,r){const n=Math.sqrt(t*t+e*e+r*r),i=n>0?Math.acos(r/n)*E:0;let o=0!==t||0!==e?Math.atan2(-e,-t)*E+90:0;return o<0&&(o+=360),[n,o,i]}function ut(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function ht(t){const e=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(t.replace(e,((t,e,n,i)=>{const o=n||i;return r[e]=!o||o.toLowerCase(),""})),r["max-age"]){const t=parseInt(r["max-age"],10);isNaN(t)?delete r["max-age"]:r["max-age"]=t}return r}let ft=null;function dt(t){if(null==ft){const e=t.navigator?t.navigator.userAgent:null;ft=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return ft}function pt(t){const e=t.navigator?t.navigator.userAgent:null;return!!dt(t)&&e&&(e.match("Version/15.4")||e.match("Version/15.5")||e.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))}function mt(){return!!e.document.fullscreenElement||!!e.document.webkitFullscreenElement}function gt(t){try{const r=e[t];return r.setItem("_mapbox_test_",1),r.removeItem("_mapbox_test_"),!0}catch(t){return!1}}function yt(t){return e.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,((t,e)=>
2String.fromCharCode(Number("0x"+e)))))}function _t(t){return decodeURIComponent(e.atob(t).split("").map((t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2))).join(""))}function vt(t){const e=atob(t),r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.codePointAt(t);return r}function bt(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function xt(t,e,r){t[4*e+0]=r[0],t[4*e+1]=r[1],t[4*e+2]=r[2],t[4*e+3]=r[3]}function wt(t,e){return[Math.pow(t[0],2.2)*e,Math.pow(t[1],2.2)*e,Math.pow(t[2],2.2)*e]}function Et(t){return[Math.pow(t[0],1/2.2),Math.pow(t[1],1/2.2),Math.pow(t[2],1/2.2)]}const St="mapbox-tiles";let Tt=500,At=50;const Ot=42e4;let Ct,Mt;function kt(){try{return e.caches}catch(t){}}function It(){kt()&&!Ct&&(Ct=e.caches.open(St))}function Pt(t,e){if(void 0===Mt)try{new Response(new ReadableStream),Mt=!0}catch(t){Mt=!1}Mt?e(t.body):t.blob().then(e)}function Lt(t,r,n){if(It(),!Ct)return;const i={status:r.status,statusText:r.statusText,headers:new e.Headers};r.headers.forEach(((t,e)=>i.headers.set(e,t)));const o=ht(r.headers.get("Cache-Control")||"");if(o["no-store"])return;o["max-age"]&&i.headers.set("Expires",new Date(n+1e3*o["max-age"]).toUTCString());const s=i.headers.get("Expires");s&&(new Date(s).getTime()-n<Ot||Pt(r,(r=>{const n=new e.Response(r,i);It(),Ct&&Ct.then((e=>e.put(Dt(t.url),n))).catch((t=>it(t.message)))})))}function Rt(t){const e=t.indexOf("?");return e>0?t.slice(e+1).split("&"):[]}function Dt(t){const e=t.indexOf("?");if(e<0)return t;const r=Rt(t).filter((t=>{const e=t.split("=");return"language"===e[0]||"worldview"===e[0]}));return r.length?`${t.slice(0,e)}?${r.join("&")}`:t.slice(0,e)}function zt(t,e){if(It(),!Ct)return e(null);const r=Dt(t.url);Ct.then((t=>{t.match(r).then((n=>{const i=Bt(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}function Bt(t){if(!t)return!1;const e=new Date(t.headers.get("Expires")||0),r=ht(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}let jt=1/0;function Ft(t){jt++,jt>At&&(t.getActor().send("enforceCacheSizeLimit",Tt),jt=0)}function Nt(t){It(),Ct&&Ct.then((e=>{e.keys().then((r=>{for(let n=0;n<r.length-t;n++)e.delete(r[n])}))}))}function $t(t){if(!kt())return;const r=e.caches.delete(St);t&&r.catch(t).then((()=>t()))}function Ut(t,e){Tt=t,At=e}const Vt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image",Model:"Model"};"function"==typeof Object.freeze&&Object.freeze(Vt);class Gt extends Error{constructor(t,e,r){401===e&&he(r)&&(t+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(t),this.status=e,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const qt=ut()?()=>self.worker&&self.worker.referrer:()=>("blob:"===e.location.protocol?e.parent:e).location.href,Ht=t=>/^file:/.test(t)||/^file:/.test(qt())&&!/^\w+:/.test(t);function Wt(t,r){const n=new e.AbortController,i=new e.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:qt(),referrerPolicy:t.referrerPolicy,signal:n.signal});let o=!1,s=!1;const a=ye(i.url);"json"===t.type&&i.headers.set("Accept","application/json");const l=(n,o,l)=>{if(s)return;if(n&&"SecurityError"!==n.message&&it(n.toString()),o&&l)return c(o);const u=Date.now();e.fetch(i).then((e=>{if(e.ok){const t=a?e.clone():null;return c(e,t,u)}return r(new Gt(e.statusText,e.status,t.url))})).catch((e=>{"AbortError"!==e.name&&r(new Error(`${e.message} ${t.url}`))}))},c=(e,n,a)=>{("arrayBuffer"===t.type?e.arrayBuffer():"json"===t.type?e.json():e.text()).then((t=>{s||(n&&a&&Lt(i,n,a),o=!0,r(null,t,e.headers.get("Cache-Control"),e.headers.get("Expires")))})).catch((t=>{s||r(new Error(t.message))}))};return a?zt(i,l):l(null,null),{cancel:()=>{s=!0,o||n.abort()}}}function Zt(t,r){const n=new e.XMLHttpRequest;n.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(n.responseType="arraybuffer");for(const e in t.headers)n.setRequestHeader(e,t.headers[e]);return"json"===t.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===t.credentials,n.onerror=()=>{r(new Error(n.statusText))},n.onload=()=>
2{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let e=n.response;if("json"===t.type)try{e=JSON.parse(n.response)}catch(t){return r(t)}r(null,e,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else r(new Gt(n.statusText,n.status,t.url))},n.send(t.body),{cancel:()=>n.abort()}}const Xt=function(t,r){if(!Ht(t.url)){if(e.fetch&&e.Request&&e.AbortController&&e.Request.prototype.hasOwnProperty("signal"))return Wt(t,r);if(ut()&&self.worker&&self.worker.actor){const e=!0;return self.worker.actor.send("getResource",t,r,void 0,e)}}return Zt(t,r)},Yt=function(t,e){return Xt(U(t,{type:"json"}),e)},Kt=function(t,e){return Xt(U(t,{type:"arrayBuffer"}),e)},Jt=function(t,e){return Xt(U(t,{method:"POST"}),e)},Qt=function(t,e){return Xt(U(t,{method:"GET"}),e)};function te(t){const r=e.document.createElement("a");return r.href=t,r.protocol===e.document.location.protocol&&r.host===e.document.location.host}const ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function re(t,r){const n=new e.Image,i=e.URL;n.onload=()=>{r(null,n),i.revokeObjectURL(n.src),n.onload=null,e.requestAnimationFrame((()=>{n.src=ee}))},n.onerror=()=>r(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const o=new e.Blob([new Uint8Array(t)],{type:"image/png"});n.src=t.byteLength?i.createObjectURL(o):ee}function ne(t,r){const n=new e.Blob([new Uint8Array(t)],{type:"image/png"});e.createImageBitmap(n).then((t=>{r(null,t)})).catch((t=>{r(new Error(`Could not load image because of ${t.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))}let ie,oe;ie=[],oe=0;const se=function(t,r){if(o.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),oe>=i.MAX_PARALLEL_IMAGE_REQUESTS){const e={requestParameters:t,callback:r,cancelled:!1,cancel(){this.cancelled=!0}};return ie.push(e),e}oe++;let n=!1;const s=()=>
2{if(!n)for(n=!0,oe--;ie.length&&oe<i.MAX_PARALLEL_IMAGE_REQUESTS;){const t=ie.shift(),{requestParameters:e,callback:r,cancelled:n}=t;n||(t.cancel=se(e,r).cancel)}},a=Kt(t,((t,n,i,o)=>{s(),t?r(t):n&&(e.createImageBitmap?ne(n,((t,e)=>r(t,e,i,o))):re(n,((t,e)=>r(t,e,i,o))))}));return{cancel:()=>{a.cancel(),s()}}},ae=function(t,r){const n=e.document.createElement("video");n.muted=!0,n.onloadstart=function(){r(null,n)};for(let r=0;r<t.length;r++){const i=e.document.createElement("source");te(t[r])||(n.crossOrigin="Anonymous"),i.src=t[r],n.appendChild(i)}return{cancel:()=>{}}},le="NO_ACCESS_TOKEN";class ce{constructor(t,e,r){this._transformRequestFn=t,this._customAccessToken=e,this._silenceAuthErrors=!!r,this._createSkuToken()}_createSkuToken(){const t=d();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}}normalizeStyleURL(t,e){if(!ue(t))return t;const n=be(t);return n.params.push(`sdk=js-${r}`),n.path=`/styles/v1${n.path}`,this._makeAPIURL(n,this._customAccessToken||e)}normalizeGlyphsURL(t,e){if(!ue(t))return t;const r=be(t);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||e)}normalizeModelURL(t,e){if(!ue(t))return t;const r=be(t);return r.path=`/models/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||e)}normalizeSourceURL(t,e,r,n){if(!ue(t))return t;const i=be(t);return i.path=`/v4/${i.authority}.json`,i.params.push("secure"),r&&i.params.push(`language=${r}`),n&&i.params.push(`worldview=${n}`),this._makeAPIURL(i,this._customAccessToken||e)}normalizeSpriteURL(t,e,r,n){const i=be(t);return ue(t)?(i.path=`/styles/v1${i.path}/sprite${e}${r}`,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=`${e}${r}`,xe(i))}normalizeTileURL(t,e,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!ue(t))return t;const n=be(t),s=/(\.(png|jpg)\d*)(?=$)/,a=o.supported?".webp":"$1",l=r&&"raster"!==n.authority&&512===r,c=e||l?"@2x":"";if(n.path=n.path.replace(s,`${c}${a}`),"raster"===n.authority)n.path=`/${i.RASTER_URL_PREFIX}${n.path}`;else{const t=/^.+\/v4\//;n.path=n.path.replace(t,"/"),n.path=`/${i.TILE_URL_VERSION}${n.path}`}const u=this._customAccessToken||_e(n.params)||i.ACCESS_TOKEN;return i.REQUIRE_ACCESS_TOKEN&&u&&this._skuToken&&n.params.push(`sku=${this._skuToken}`),this._makeAPIURL(n,u)}canonicalizeTileURL(t,e){const r=/\.[\w]+$/,n=be(t);if(!n.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!n.path.match(r))return t;let o="mapbox://";if(n.path.match(/^\/raster\/v1\//)){const t=`/${i.RASTER_URL_PREFIX}/`;o+=`raster/${n.path.replace(t,"")}`}else{const t=`/${i.TILE_URL_VERSION}/`;o+=`tiles/${n.path.replace(t,"")}`}let s=n.params;return e&&(s=s.filter((t=>!t.match(/^access_token=/)))),s.length&&(o+=`?${s.join("&")}`),o}canonicalizeTileset(t,e){const r=!!e&&ue(e),n=[];for(const e of t.tiles||[])he(e)?n.push(this.canonicalizeTileURL(e,r)):n.push(e);return n}_makeAPIURL(t,e){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",n=be(i.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"http"===t.protocol){const e=t.params.indexOf("secure");e>=0&&t.params.splice(e,1)}if("/"!==n.path&&(t.path=`${n.path}${t.path}`),!i.REQUIRE_ACCESS_TOKEN)return xe(t);if(e=e||i.ACCESS_TOKEN,!this._silenceAuthErrors){if(!e)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if("s"===e[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return t.params=t.params.filter((t=>-1===t.indexOf("access_token"))),t.params.push(`access_token=${e||""}`),xe(t)}}function ue(t){return 0===t.indexOf("mapbox:")}function he(t){return i.API_URL_REGEX.test(t)}function fe(t){return i.API_CDN_URL_REGEX.test(t)}function de(t){return i.API_STYLE_REGEX.test(t)&&!me(t)}function pe(t){return i.API_TILEJSON_REGEX.test(t)}function me(t){return i.API_SPRITE_REGEX.test(t)}function ge(t){return i.API_FONTS_REGEX.test(t)}function ye(t){return t.indexOf("sku=")>0&&he(t)}function _e(t){for(const e of t){const t=e.match(/^access_token=(.*)$/);if(t)return t[1]}return null}const ve=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function be(t){const e=t.match(ve);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function xe(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}const we="mapbox.eventData";function Ee(t){if(!t)return null;const e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(_t(e[1]))}catch(t){return null}}class Se{constructor(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(t){const e=Ee(i.ACCESS_TOKEN);let r="";return r=e&&e.u?yt(e.u):i.ACCESS_TOKEN||"",t?`${we}.${t}:${r}`:`${we}:${r}`}fetchEventData(){const t=gt("localStorage"),r=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{const t=e.localStorage.getItem(r);t&&(this.eventData=JSON.parse(t));const i=e.localStorage.getItem(n);i&&(this.anonId=i)}catch(t){it("Unable to read from LocalStorage")}}saveEventData(){const t=gt("localStorage"),r=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{e.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&e.localStorage.setItem(r,JSON.stringify(this.eventData))}catch(t){it("Unable to write to LocalStorage")}}processRequests(t){}postEvent(t,e,r,n){if(!i.EVENTS_URL)return;const o=be(i.EVENTS_URL);o.params.push(`access_token=${n||i.ACCESS_TOKEN||""}`);const s={event:this.type,created:new Date(t).toISOString()},a=e?U(s,e):s,l={url:xe(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=Jt(l,(t=>{this.pendingRequest=null,r(t),this.saveEventData(),this.processRequests(n)}))}queueRequest(t,e){this.queue.push(t),this.processRequests(e)}}class Te extends Se{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){i.EVENTS_URL&&(t||i.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{timestamp:e,performanceData:r}=this.queue.shift(),n=We(r);for(const t of n.metadata);for(const t of n.counters);for(const t of n.attributes);this.postEvent(e,n,(()=>{}),t)}}class Ae extends Se{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,r,n){this.skuToken=e,this.errorCb=n,i.EVENTS_URL&&(r||i.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},r):this.errorCb(new Error(le)))}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{id:e,timestamp:n}=this.queue.shift();if(e&&this.success[e])return;this.anonId||this.fetchEventData(),X(this.anonId)||(this.anonId=H());const i={sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:f,skuToken:this.skuToken,userId:this.anonId};this.postEvent(n,i,(t=>{t?this.errorCb(t):e&&(this.success[e]=!0)}),t)}}class Oe extends Se{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,r,n){if(!i.API_URL||!i.SESSION_PATH)return;const o=be(i.API_URL+i.SESSION_PATH);o.params.push(`sku=${e||""}`),o.params.push(`access_token=${n||i.ACCESS_TOKEN||""}`);const s={url:xe(o),headers:{"Content-Type":"text/plain"}};this.pendingRequest=Qt(s,(t=>{this.pendingRequest=null,r(t),this.saveEventData(),this.processRequests(n)}))}getSessionAPI(t,e,r,n){this.skuToken=e,this.errorCb=n,i.SESSION_PATH&&i.API_URL&&(r||i.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},r):this.errorCb(new Error(le)))}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{id:e,timestamp:r}=this.queue.shift();
2e&&this.success[e]||this.getSession(r,this.skuToken,(t=>{t?this.errorCb(t):e&&(this.success[e]=!0)}),t)}}class Ce extends Se{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){i.EVENTS_URL&&i.ACCESS_TOKEN&&Array.isArray(t)&&t.some((t=>ue(t)||he(t)))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=Ee(i.ACCESS_TOKEN),n=e?e.u:i.ACCESS_TOKEN;let o=n!==this.eventData.tokenU;X(this.anonId)||(this.anonId=H(),o=!0);const s=this.queue.shift();if(this.eventData.lastSuccess){const t=new Date(this.eventData.lastSuccess),e=new Date(s),r=(s-this.eventData.lastSuccess)/864e5;o=o||r>=1||r<-1||t.getDate()!==e.getDate()}else o=!0;if(!o)return void this.processRequests();const a={sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:f,"enabled.telemetry":!1,userId:this.anonId};this.postEvent(s,a,(t=>{t||(this.eventData.lastSuccess=s,this.eventData.tokenU=n)}),t)}}const Me=new Ce,ke=Me.postTurnstileEvent.bind(Me),Ie=new Ae,Pe=Ie.postMapLoadEvent.bind(Ie),Le=new Te,Re=Le.postPerformanceEvent.bind(Le),De=new Oe,ze=De.getSessionAPI.bind(De),Be=new Set;function je(t,e){e?Be.add(t):Be.delete(t)}function Fe(t){return Be.has(t)}function Ne(t){Be.delete(t)}const $e={create:"create",load:"load",fullLoad:"fullLoad"},Ue={mark(t){e.performance.mark(t)},measure(t,r,n){e.performance.measure(t,r,n)}};function Ve(t,e){const r={};if(t)for(const n of t){const t=e(n);void 0===r[t]&&(r[t]=[]),r[t].push(n)}return r}function Ge(t){const e={};if(t)for(const r in t)if("other"!==r)for(const n of t[r]){const t=`${r}ResolveRangeMin`,i=`${r}ResolveRangeMax`,o=`${r}RequestCount`,s=`${r}RequestCachedCount`;e[t]=Math.min(e[t]||1/0,n.startTime),e[i]=Math.max(e[i]||-1/0,n.responseEnd);const a=t=>{void 0===e[t]&&(e[t]=0),++e[t]};void 0!==n.transferSize&&0===n.transferSize&&a(s),a(o)}return e}function qe(t){const e=t.name.split("?")[0];return fe(e)&&e.includes("mapbox-gl.js")?"javascript":fe(e)&&e.includes("mapbox-gl.css")?"css":ge(e)?"fontRange":me(e)?"sprite":de(e)?"style":pe(e)?"tilejson":"other"}function He(t){if(t)for(const e of t){const t=e.name.split("?")[0];if(de(t)){const e=t.split("/").slice(-2);if(2===e.length)return`mapbox://styles/${e[0]}/${e[1]}`}}}function We(t){const n=e.performance.getEntriesByType("resource"),i=e.performance.getEntriesByType("mark"),o=Ge(Ve(n,qe)),s=e.devicePixelRatio,a=e.navigator.connection||e.navigator.mozConnection||e.navigator.webkitConnection,l={counters:[],metadata:[],attributes:[]},c=(t,e,r)=>{null!=r&&t.push({name:e,value:r.toString()})};for(const t in o)c(l.counters,t,o[t]);if(t.interactionRange[0]!==1/0&&t.interactionRange[1]!==-1/0&&(c(l.counters,"interactionRangeMin",t.interactionRange[0]),c(l.counters,"interactionRangeMax",t.interactionRange[1])),i)for(const t of Object.keys($e)){const e=$e[t],r=i.find((t=>t.name===e));r&&c(l.counters,e,r.startTime)}return c(l.counters,"visibilityHidden",t.visibilityHidden),c(l.attributes,"style",He(n)),c(l.attributes,"terrainEnabled",t.terrainEnabled?"true":"false"),c(l.attributes,"fogEnabled",t.fogEnabled?"true":"false"),c(l.attributes,"projection",t.projection),c(l.attributes,"zoom",t.zoom),c(l.metadata,"devicePixelRatio",s),c(l.metadata,"connectionEffectiveType",a?a.effectiveType:void 0),c(l.metadata,"navigatorUserAgent",e.navigator.userAgent),c(l.metadata,"screenWidth",e.screen.width),c(l.metadata,"screenHeight",e.screen.height),c(l.metadata,"windowWidth",e.innerWidth),c(l.metadata,"windowHeight",e.innerHeight),c(l.metadata,"mapWidth",t.width/s),c(l.metadata,"mapHeight",t.height/s),c(l.metadata,"webglRenderer",t.renderer),c(l.metadata,"webglVendor",t.vendor),c(l.metadata,"sdkVersion",r),c(l.metadata,"sdkIdentifier","mapbox-gl-js"),l}const Ze=e.performance;function Xe(t){const e=t?t.url.toString():void 0;return Ze.getEntriesByName(e)}var Ye=Ke;function Ke(t){return!Je(t)}function Je(t){return Qe()?tr()?er()?rr()?nr()?ir()?or()?sr()?ar()?cr(t&&t.failIfMajorPerformanceCaveat)?fr()?void 0:"insufficient ECMAScript 6 support":"insufficient WebGL support":"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray supp
2ort":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support":"not a browser"}function Qe(){return"undefined"!=typeof window&&"undefined"!=typeof document}function tr(){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 er(){return Function.prototype&&Function.prototype.bind}function rr(){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 nr(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function ir(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}function or(){return"Uint8ClampedArray"in window}function sr(){return ArrayBuffer.isView}function ar(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var r=e.getImageData(0,0,1,1);return r&&r.width===t.width}var lr={};function cr(t){return void 0===lr[t]&&(lr[t]=hr(t)),lr[t]}function ur(t){var e=document.createElement("canvas"),r=Object.create(Ke.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}function hr(t){var e,r=ur(t);if(!r)return!1;try{e=r.createShader(r.VERTEX_SHADER)}catch(t){return!1}return!(!e||r.isContextLost())&&(r.shaderSource(e,"void main() {}"),r.compileShader(e),!0===r.getShaderParameter(e,r.COMPILE_STATUS))}function fr(){return!document.documentMode}let dr,pr,mr,gr,yr;function _r(){return null==dr&&(dr=e.OffscreenCanvas&&new e.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof e.createImageBitmap),dr}Ke.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const vr={now:()=>void 0!==gr?gr:e.performance.now(),setNow(t){gr=t},restoreNow(){gr=void 0},frame(t){const r=e.requestAnimationFrame(t);return{cancel:()=>e.cancelAnimationFrame(r)}},getImageData(t,r=0){const{width:n,height:i}=t;yr||(yr=e.document.createElement("canvas"));const o=yr.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return(n>yr.width||i>yr.height)&&(yr.width=n,yr.height=i),o.clearRect(-r,-r,n+2*r,i+2*r),o.drawImage(t,0,0,n,i),o.getImageData(-r,-r,n+2*r,i+2*r)},resolveURL:t=>(pr||(pr=e.document.createElement("a")),pr.href=t,pr.href),get devicePixelRatio(){return e.devicePixelRatio},get prefersReducedMotion(){return!!e.matchMedia&&(null==mr&&(mr=e.matchMedia("(prefers-reduced-motion: reduce)")),mr.matches)},hasCanvasFingerprintNoise(){if(!_r())return!1;const t=new e.OffscreenCanvas(85,1),r=t.getContext("2d",{willReadFrequently:!0});let n=0;for(let e=0;e<t.width;++e)r.fillStyle=`rgba(${n++},${n++},${n++}, 255)`,r.fillRect(e,0,1,1);const i=r.getImageData(0,0,t.width,t.height);n=0;for(let t=0;t<i.data.length;++t)if(t%4!=3&&n++!==i.data[t])return!0;return!1}};function br(t,r,n){const i=e.document.createElement(t);return void 0!==r&&(i.className=r),n&&n.appendChild(i),i}function xr(t,r,n){const i=e.document.createElementNS("http://www.w3.org/2000/svg",t);for(const t of Object.keys(r))i.setAttributeNS(null,t,r[t]);return n&&n.appendChild(i),i}const wr=e.document&&e.document.documentElement.style,Er=wr&&void 0!==wr.userSelect?"userSelect":"WebkitUserSelect";let Sr;function Tr(){wr&&Er&&(Sr=wr[Er],wr[Er]="none")}function Ar(){wr&&Er&&(wr[Er]=Sr)}function Or(t){t.preventDefault(),t.stopPropagation(),e.removeEventListener("click",Or,!0)}function Cr(){e.addEventListener("click",Or,!0),e.setTimeout((()=>{e.removeEventListener("click",Or,!0)}),0)}function Mr(t,e){const r=t.getBoundingClientRect();return Pr(t,r,e)}function kr(t,e){const r=t.getBoundingClientRect(),n=[];for(let i=0;i<e.length;i++)n.push(Pr(t,r,e[i]));return n}function Ir(t){return void 0!==e.InstallTrigger&&2===t.button&&t.ctrlKey&&e.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button}function Pr(t,e,r){const n=t.offsetWidth===e.width?1:t.offsetWidth/e.width;return new b((r.clientX-e.left)*n,(r.clientY-e.top)*n)}function Lr(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function Rr(t,e,r){if(r&&r[t]){const n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}class Dr{constructor(t,e={}){U(this,e),this.type=t}}class zr extends Dr{constructor(t,e={}){super("error",U({error:t},e))}}class Br{on(t,e){return this._listeners=this._listeners||{},Lr(t,e,this._listeners),this}off(t,e){return Rr(t,e,this._listeners),Rr(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},Lr(t,e,this._oneTimeListeners),this):new Promise((e=>this.once(t,e)))}fire(t,e){"string"==typeof t&&(t=new Dr(t,e||{}));const r=t.type;if(this.listens(r)){t.target=this;const e=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const r of e)r.call(this,t);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const e of n)Rr(r,e,this._oneTimeListeners),e.call(this,t);const i=this._eventedParent;i&&(U(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(t))}else t instanceof zr&&console.error(t.error);return this}listens(t){return!!(this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var jr=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"required":false,"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"camera":{"type":"camera"},"imports":{"type":"array","value":"import"},"schema":{"type":"schema"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"},"models":{"type":"models"}},"model":{"type":"string","required":true},"import":{"id":{"type":"string","required":true},"url":{"type":"string","required":true},"config":{"type":"config"},"data":{"type":"$root"}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","required":true},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}}
2,"light-3d":{"id":{"type":"string","required":true},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false,"expression":{},"property-type":"data-constant"},"shadow-intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":1}},"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":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":1}},"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},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":1}},"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},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"required":true,"type":"enum","values":{"raster-array":1}},"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},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0}
2,"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":1}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":1}},"url":{"required":false,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"required":true,"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"}
2,"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"}
2,"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","default":[0,1],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":[
2"feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');class Fr{constructor(t,e,r,n){this.message=(t?`${t}: `:"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)}}class Nr extends Fr{}function $r(t,...e){for(const r of e)for(const e in r)t[e]=r[e];return t}function Ur(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Vr(t){if(Array.isArray(t))return t.map(Vr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const r in t)e[r]=Vr(t[r]);return e}return Ur(t)}class Gr extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}var qr=Gr;class Hr{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,r]of e)this.bindings[t]=r}concat(t){return new Hr(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}var Wr=Hr;const Zr={kind:"null"},Xr={kind:"number"},Yr={kind:"string"},Kr={kind:"boolean"},Jr={kind:"color"},Qr={kind:"object"},tn={kind:"value"},en={kind:"error"},rn={kind:"collator"},nn={kind:"formatted"},on={kind:"resolvedImage"};function sn(t,e){return{kind:"array",itemType:t,N:e}}function an(t){if("array"===t.kind){const e=an(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const ln=[Zr,Xr,Yr,Kr,Jr,nn,Qr,sn(tn),on];function cn(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!cn(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of ln)if(!cn(t,e))return null}return`Expected ${an(t)} but found ${an(e)} instead.`}function un(t,e){return e.some((e=>e.kind===t.kind))}function hn(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var fn,dn={},pn={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function mn(t){return(t=Math.round(t))<0?0:t>255?255:t}function gn(t){return t<0?0:t>1?1:t}function yn(t){return"%"===t[t.length-1]?mn(parseFloat(t)/100*255):mn(parseInt(t))}function _n(t){return"%"===t[t.length-1]?gn(parseFloat(t)/100):gn(parseFloat(t))}function vn(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function bn(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in pn)return pn[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=r.indexOf("("),i=r.indexOf(")");if(-1!==n&&i+1===r.length){var o=r.substr(0,n),s=r.substr(n+1,i-(n+1)).split(","),a=1;switch(o){case"rgba":if(4!==s.length)return null;a=_n(s.pop());case"rgb":return 3!==s.length?null:[yn(s[0]),yn(s[1]),yn(s[2]),a];case"hsla":if(4!==s.length)return null;a=_n(s.pop());case"hsl":if(3!==s.length)return null;var l=(parseFloat(s[0])%360+360)%360/360,c=_n(s[1]),u=_n(s[2]),h=u<=.5?u*(c+1):u+c-u*c,f=2*u-h;return[mn(255*vn(f,h,l+1/3)),mn(255*vn(f,h,l)),mn(255*vn(f,h,l-1/3)),a];default:return null}}return null}try{fn=dn.parseCSSColor=bn}catch(t){}class xn{constructor(t,e,r,n=1){this.r=t,this.g=e,this.b=r,this.a=n}static parse(t){if(!t)return;if(t instanceof xn)return t;if("string"!=typeof t)return;const e=fn(t);return e?new xn(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,r,n]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(r)},${n})`}toArray(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]}toArray01(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[t/n,e/n,r/n,n]}toArray01Scaled(t){const{r:e,g:r,b:n,a:i}=this;return 0===i?[0,0,0]:[e/i*t,r/i*t,n/i*t]}toArray01PremultipliedAlpha(){const{r:t,g:e,b:r,a:n}=this;return[t,e,r,n]}toArray01Linear(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[Math.pow(t/n,2.2),Math.pow(e/n,2.2),Math.pow(r/n,2.2),n]}}xn.black=new xn(0,0,0,1),xn.white=new xn(1,1,1,1),xn.transparent=new xn(0,0,0,0),xn.red=new xn(1,0,0,1),xn.blue=new xn(0,0,1,1);var wn=xn;class En{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Sn{constructor(t,e,r,n,i){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i}}class Tn{constructor(t){this.sections=t}static fromString(t){return new Tn([new Sn(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.namePrimary.length))}static factory(t){return t instanceof Tn?t:Tn.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.namePrimary]);continue}t.push(e.text);const r={};e.fontStack&&(r["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(r["font-scale"]=e.scale),e.textColor&&(r["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(r)}return t}}class An{constructor(t){this.namePrimary=t.namePrimary,t.nameSecondary&&(this.nameSecondary=t.nameSecondary),this.available=t.available}toString(){return this.nameSecondary?`[${this.namePrimary},${this.nameSecondary}]`:this.namePrimary}static fromString(t,e){return t?new An({namePrimary:t,nameSecondary:e,available:!1}):null}serialize(){return this.nameSecondary?["image",this.namePrimary,this.nameSecondary]:["image",this.namePrimary]}}function On(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Cn(t,e,r,n){return"number"==typeof t&&t>=0&&t<=360?"number"==typeof e&&e>=0&&e<=100&&"number"==typeof r&&r>=0&&r<=100?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid hsla value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 'h' must be between 0 and 360.`}function Mn(t){if(null===t)return!0;
2if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof wn)return!0;if(t instanceof En)return!0;if(t instanceof Tn)return!0;if(t instanceof An)return!0;if(Array.isArray(t)){for(const e of t)if(!Mn(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Mn(t[e]))return!1;return!0}return!1}function kn(t){if(null===t)return Zr;if("string"==typeof t)return Yr;if("boolean"==typeof t)return Kr;if("number"==typeof t)return Xr;if(t instanceof wn)return Jr;if(t instanceof En)return rn;if(t instanceof Tn)return nn;if(t instanceof An)return on;if(Array.isArray(t)){const e=t.length;let r;for(const e of t){const t=kn(e);if(r){if(r===t)continue;r=tn;break}r=t}return sn(r||tn,e)}return Qr}function In(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof wn||t instanceof Tn||t instanceof An?t.toString():JSON.stringify(t)}class Pn{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Mn(t[1]))return e.error("invalid value");const r=t[1];let n=kn(r);const i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new Pn(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof wn?["rgba"].concat(this.value.toArray()):this.value instanceof Tn?this.value.serialize():this.value}}var Ln=Pn;class Rn{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}var Dn=Rn;const zn={string:Yr,number:Xr,boolean:Kr,object:Qr};class Bn{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r,n=1;const i=t[0];if("array"===i){let i,o;if(t.length>2){const r=t[1];if("string"!=typeof r||!(r in zn)||"object"===r)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=zn[r],n++}else i=tn;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}r=sn(i,o)}else r=zn[i];const o=[];for(;n<t.length;n++){const r=e.parse(t[n],n,tn);if(!r)return null;o.push(r)}return new Bn(r,o)}evaluate(t){for(let e=0;e<this.args.length;e++){const r=this.args[e].evaluate(t);if(!cn(this.type,kn(r)))return r;if(e===this.args.length-1)throw new Dn(`Expected value to be of type ${an(this.type)}, but found ${an(kn(r))} instead.`)}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);const n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((t=>t.serialize())))}}var jn=Bn;class Fn{constructor(t){this.type=nn,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");const n=[];let i=!1;for(let r=1;r<=t.length-1;++r){const o=t[r];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;let t=null;if(o["font-scale"]&&(t=e.parse(o["font-scale"],1,Xr),!t))return null;let r=null;if(o["text-font"]&&(r=e.parse(o["text-font"],1,sn(Yr)),!r))return null;let s=null;if(o["text-color"]&&(s=e.parse(o["text-color"],1,Jr),!s))return null;const a=n[n.length-1];a.scale=t,a.font=r,a.textColor=s}else{const o=e.parse(t[r],1,tn);if(!o)return null;const s=o.type.kind;if("string"!==s&&"value"!==s&&"null"!==s&&"resolvedImage"!==s)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:o,scale:null,font:null,textColor:null})}}return new Fn(n)}evaluate(t){const e=e=>{const r=e.content.evaluate(t);return kn(r)===on?new Sn("",r,null,null,null):new Sn(In(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)};return new Tn(this.sections.map(e))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const r={};e.scale&&(r["font-scale"]=e.scale.serialize()),e.font&&(r["text-font"]=e.font.serialize()),e.textColor&&(r["text-color"]=e.textColor.serialize()),t.push(r)}return t}}class Nn{constructor(t,e){this.type=on,this.inputPrimary=t,this.inputSecondary=e}static parse(t,e){if(t.length<2)return e.error("Expected two or more arguments.");const r=e.parse(t[1],1,Yr);if(!r)return e.error("No image name provided.");if(2===t.length)return new Nn(r);const n=e.parse(t[2],1,Yr);return n?new Nn(r,n):e.error("Secondary image variant is not a string.")}evaluate(t){const e=An.fromString(this.inputPrimary.evaluate(t),this.inputSecondary?this.inputSecondary.evaluate(t):void 0);return e&&t.availableImages&&(e.available=t.availableImages.indexOf(e.namePrimary)>-1,e.nameSecondary&&e.available&&t.availableImages&&(e.available=t.availableImages.indexOf(e.nameSecondary)>-1)),e}eachChild(t){t(this.inputPrimary),this.inputSecondary&&t(this.inputSecondary)}outputDefined(){return!1}serialize(){return this.inputSecondary?["image",this.inputPrimary.serialize(),this.inputSecondary.serialize()]:["image",this.inputPrimary.serialize()]}}function $n(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}const Un={"to-boolean":Kr,"to-color":Jr,"to-number":Xr,"to-string":Yr};class Vn{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[0],n=[];let i=Zr;if("to-array"===r){if(!Array.isArray(t[1]))return null;const r=t[1].length;if(e.expectedType){if("array"!==e.expectedType.kind)return e.error(`Expected ${e.expectedType.kind} but found array.`);i=sn(e.expectedType.itemType,r)}else{if(!(r>0&&Mn(t[1][0])))return null;i=sn(kn(t[1][0]),r)}for(let o=0;o<r;o++){const r=t[1][o];let s;if("array"===$n(r))s=e.parse(r,void 0,i.itemType);else{const t=$n(r);if(t!==i.itemType.kind)return e.error(`Expected ${i.itemType.kind} but found ${t}.`);s=e.registry.literal.parse(["literal",void 0===r?null:r],e)}if(!s)return null;n.push(s)}}else{if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");i=Un[r];for(let r=1;r<t.length;r++){const i=e.parse(t[r],r,tn);if(!i)return null;n.push(i)}}return new Vn(i,n)}evaluate(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){let e,r;for(const n of this.args){if(e=n.evaluate(t),r=null,e instanceof wn)return e;if("string"==typeof e){const r=t.parseColor(e);
2if(r)return r}else if(Array.isArray(e)&&(r=e.length<3||e.length>4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:On(e[0],e[1],e[2],e[3]),!r))return new wn(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Dn(r||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const r of this.args){if(e=r.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new Dn(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?Tn.fromString(In(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?An.fromString(In(this.args[0].evaluate(t))):"array"===this.type.kind?this.args.map((e=>e.evaluate(t))):In(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new Fn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Nn(this.args[0]).serialize();const t="array"===this.type.kind?[]:[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Gn=Vn;const qn=["Unknown","Point","LineString","Polygon"];class Hn{constructor(t){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.options=t}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?qn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}measureLight(t){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:r,y:n}=this.featureTileCoord,i=r*e-t[0],o=n*e-t[1];return this.featureDistanceData.bearing[0]*i+this.featureDistanceData.bearing[1]*o}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=wn.parse(t)),e}getConfig(t){return this.options?this.options.get(t):null}}var Wn=Hn;class Zn{constructor(t,e,r,n,i){this.name=t,this.type=e,this._evaluate=r,this.args=n,this._overloadIndex=i}evaluate(t){if(!this._evaluate){const t=Zn.definitions[this.name];this._evaluate=Array.isArray(t)?t[2]:t.overloads[this._overloadIndex][1]}return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const r=t[0],n=Zn.definitions[r];if(!n)return e.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=[];let a=null,l=-1;for(const[n,c]of o){if(Array.isArray(n)&&n.length!==t.length-1)continue;s.push(n),l++,a=new Eo(e.registry,e.path,null,e.scope,void 0,e.options);const o=[];let u=!1;for(let e=1;e<t.length;e++){const r=t[e],i=Array.isArray(n)?n[e-1]:n.type,s=a.parse(r,1+o.length,i);if(!s){u=!0;break}o.push(s)}if(!u)if(Array.isArray(n)&&n.length!==o.length)a.error(`Expected ${n.length} arguments, but found ${o.length} instead.`);else{for(let t=0;t<o.length;t++){const e=Array.isArray(n)?n[t]:n.type,r=o[t];a.concat(t+1).checkSubtype(e,r.type)}if(0===a.errors.length)return new Zn(r,i,c,o,l)}}if(1===s.length)e.errors.push(...a.errors);else{const r=(s.length?s:o.map((([t])=>t))).map(Xn).join(" | "),n=[];for(let r=1;r<t.length;r++){const i=e.parse(t[r],1+n.length);if(!i)return null;n.push(an(i.type))}e.error(`Expected arguments of type ${r}, but found (${n.join(", ")}) instead.`)}return null}static register(t,e){Zn.definitions=e;for(const r in e)t[r]=Zn}}function Xn(t){return Array.isArray(t)?`(${t.map(an).join(", ")})`:`(${an(t.type)}...)`}var Yn=Zn;class Kn{constructor(t,e,r){this.type=rn,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");const n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Kr);if(!n)return null;const i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Kr);if(!i)return null;let o=null;return r.locale&&(o=e.parse(r.locale,1,Yr),!o)?null:new Kn(n,i,o)}evaluate(t){return new En(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}serialize(){const t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}
2var Jn={exports:{}};!function(t,e){!function(e,r){t.exports=r()}(0,(function(){function t(t,r,i,o,s){e(t,r,i||0,o||t.length-1,s||n)}function e(t,n,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=n-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);e(t,n,Math.max(i,Math.floor(n-l*u/a+h)),Math.min(o,Math.floor(n+(a-l)*u/a+h)),s)}var f=t[n],d=i,p=o;for(r(t,i,n),s(t[o],f)>0&&r(t,i,o);d<p;){for(r(t,d,p),d++,p--;s(t[d],f)<0;)d++;for(;s(t[p],f)>0;)p--}0===s(t[i],f)?r(t,i,p):r(t,++p,o),p<=n&&(i=p+1),n<=p&&(o=p-1)}}function r(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function n(t,e){return t<e?-1:t>e?1:0}return t}))}(Jn);var Qn=p(Jn.exports);function ti(t){let e=0;for(let r,n,i=0,o=t.length,s=o-1;i<o;s=i++)r=t[i],n=t[s],e+=(n.x-r.x)*(r.y+n.y);return e}function ei(t,e){return e.area-t.area}function ri(t,e){const r=t.length;if(r<=1)return[t];const n=[];let i,o;for(let e=0;e<r;e++){const r=ti(t[e]);0!==r&&(t[e].area=Math.abs(r),void 0===o&&(o=r<0),o===r<0?(i&&n.push(i),i=[t[e]]):i.push(t[e]))}if(i&&n.push(i),e>1)for(let t=0;t<n.length;t++)n[t].length<=e||(Qn(n[t],e,1,n[t].length-1,ei),n[t]=n[t].slice(0,e));return n}function ni(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ii(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function oi(t,e,r){const n=t[0]-e[0],i=t[1]-e[1],o=t[0]-r[0],s=t[1]-r[1];return n*s-o*i==0&&n*o<=0&&i*s<=0}function si(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function ai(t,e,r=!1){let n=!1;for(let i=0,o=e.length;i<o;i++){const o=e[i];for(let e=0,i=o.length,s=i-1;e<i;s=e++){const i=o[s],a=o[e];if(oi(t,i,a))return r;si(t,i,a)&&(n=!n)}}return n}function li(t,e){return t[0]*e[1]-t[1]*e[0]}function ci(t,e,r,n){const i=t[0]-r[0],o=t[1]-r[1],s=e[0]-r[0],a=e[1]-r[1],l=n[0]-r[0],c=n[1]-r[1],u=i*c-l*o,h=s*c-l*a;return u>0&&h<0||u<0&&h>0}function ui(t,e,r,n){const i=[e[0]-t[0],e[1]-t[1]];return 0!==li([n[0]-r[0],n[1]-r[1]],i)&&!(!ci(t,e,r,n)||!ci(r,n,t,e))}const hi=8192;function fi(t){return(180+t)/360}function di(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function pi(t,e){const r=fi(t[0]),n=di(t[1]),i=Math.pow(2,e.z);return[Math.round(r*i*hi),Math.round(n*i*hi)]}function mi(t,e){for(let r=0;r<e.length;r++)if(ai(t,e[r]))return!0;return!1}function gi(t,e,r){for(const n of r)for(let r=0,i=n.length,o=i-1;r<i;o=r++)if(ui(t,e,n[o],n[r]))return!0;return!1}function yi(t,e){for(let r=0;r<t.length;++r)if(!ai(t[r],e))return!1;for(let r=0;r<t.length-1;++r)if(gi(t[r],t[r+1],e))return!1;return!0}function _i(t,e){for(let r=0;r<e.length;r++)if(yi(t,e[r]))return!0;return!1}function vi(t,e,r){const n=[];for(let i=0;i<t.length;i++){const o=[];for(let n=0;n<t[i].length;n++){const s=pi(t[i][n],r);ni(e,s),o.push(s)}n.push(o)}return n}function bi(t,e,r){const n=[];for(let i=0;i<t.length;i++){const o=vi(t[i],e,r);n.push(o)}return n}function xi(t,e,r,n){if(t[0]<r[0]||t[0]>r[2]){const e=.5*n;let i=t[0]-r[0]>e?-n:r[0]-t[0]>e?n:0;0===i&&(i=t[0]-r[2]>e?-n:r[2]-t[0]>e?n:0),t[0]+=i}ni(e,t)}function wi(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function Ei(t,e,r,n){const i=Math.pow(2,n.z)*hi,o=[n.x*hi,n.y*hi],s=[];if(!t)return s;for(const n of t)for(const t of n){const n=[t.x+o[0],t.y+o[1]];xi(n,e,r,i),s.push(n)}return s}function Si(t,e,r,n){const i=Math.pow(2,n.z)*hi,o=[n.x*hi,n.y*hi],s=[];if(!t)return s;for(const r of t){const t=[];for(const n of r){const r=[n.x+o[0],n.y+o[1]];ni(e,r),t.push(r)}s.push(t)}if(e[2]-e[0]<=i/2){wi(e);for(const t of s)for(const n of t)xi(n,e,r,i)}return s}function Ti(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if("Polygon"===e.type){const o=vi(e.coordinates,n,i),s=Ei(t.geometry(),r,n,i);if(!ii(r,n))return!1;for(const t of s)if(!ai(t,o))return!1}if("MultiPolygon"===e.type){const o=bi(e.coordinates,n,i),s=Ei(t.geometry(),r,n,i);if(!ii(r,n))return!1;for(const t of s)if(!mi(t,o))return!1}return!0}function Ai(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if("Polygon"===e.type){const o=vi(e.coordinates,n,i),s=Si(t.geometry(),r,n,i);if(!ii(r,n))return!1;for(const t of s)if(!yi(t,o))return!1}if("MultiPolygon"===e.type){const o=bi(e.coordinates,n,i),s=Si(t.geometry(),r,n,i);if(!ii(r,n))return!1;for(const t of s)if(!_i(t,o))return!1}return!0}class Oi{constructor(t,e){this.type=Kr,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Mn(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t<e.features.length;++t){const r=e.features[t].geometry.type;if("Polygon"===r||"MultiPolygon"===r)return new Oi(e,e.features[t].geometry)}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new Oi(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new Oi(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return Ti(t,this.geometries);if("LineString"===t.geometryType())return Ai(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var Ci=Oi,Mi={exports:{}};!function(t,e){!function(e,r){t.exports=r()}(0,(function(){var t={kilometers:1,miles:1e3/1609.344,nauticalmiles:1e3/1852,meters:1e3,metres:1e3,yards:1e3/.9144,feet:1e3/.3048,inches:1e3/.0254},e=6378.137,r=1/298.257223563,n=r*(2-r),i=Math.PI/180,o=function(r,o){if(void 0===r)throw new Error("No latitude given.");if(o&&!t[o])throw new Error("Unknown unit "+o+". Use one of: "+Object.keys(t).join(", "));var s=i*e*(o?t[o]:1),a=Math.cos(r*i),l=1/(1-n*(1-a*a)),c=Math.sqrt(l);this.kx=s*c*a,this.ky=s*c*l*(1-n)},s={units:{configurable:!0}};function a(t,e){return t[0]===e[0]&&t[1]===e[1]}function l(t,e,r){var n=c(e[0]-t[0]),i=e[1]-t[1];return[t[0]+n*r,t[1]+i*r]}function c(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}return o.fromTile=function(t,e,r){var n=Math.PI*(1-2*(t+.5)/Math.pow(2,e)),s=Math.atan(.5*(Math.exp(n)-Math.exp(-n)))
2/i;return new o(s,r)},s.units.get=function(){return t},o.prototype.distance=function(t,e){var r=c(t[0]-e[0])*this.kx,n=(t[1]-e[1])*this.ky;return Math.sqrt(r*r+n*n)},o.prototype.bearing=function(t,e){var r=c(e[0]-t[0])*this.kx,n=(e[1]-t[1])*this.ky;return Math.atan2(r,n)/i},o.prototype.destination=function(t,e,r){var n=r*i;return this.offset(t,Math.sin(n)*e,Math.cos(n)*e)},o.prototype.offset=function(t,e,r){return[t[0]+e/this.kx,t[1]+r/this.ky]},o.prototype.lineDistance=function(t){for(var e=0,r=0;r<t.length-1;r++)e+=this.distance(t[r],t[r+1]);return e},o.prototype.area=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=t[r],i=0,o=n.length,s=o-1;i<o;s=i++)e+=c(n[i][0]-n[s][0])*(n[i][1]+n[s][1])*(r?-1:1);return Math.abs(e)/2*this.kx*this.ky},o.prototype.along=function(t,e){var r=0;if(e<=0)return t[0];for(var n=0;n<t.length-1;n++){var i=t[n],o=t[n+1],s=this.distance(i,o);if((r+=s)>e)return l(i,o,(e-(r-s))/s)}return t[t.length-1]},o.prototype.pointToSegmentDistance=function(t,e,r){var n=e[0],i=e[1],o=c(r[0]-n)*this.kx,s=(r[1]-i)*this.ky,a=0;return 0===o&&0===s||((a=(c(t[0]-n)*this.kx*o+(t[1]-i)*this.ky*s)/(o*o+s*s))>1?(n=r[0],i=r[1]):a>0&&(n+=o/this.kx*a,i+=s/this.ky*a)),o=c(t[0]-n)*this.kx,s=(t[1]-i)*this.ky,Math.sqrt(o*o+s*s)},o.prototype.pointOnLine=function(t,e){for(var r,n,i,o,s=1/0,a=0;a<t.length-1;a++){var l=t[a][0],u=t[a][1],h=c(t[a+1][0]-l)*this.kx,f=(t[a+1][1]-u)*this.ky,d=0;0===h&&0===f||((d=(c(e[0]-l)*this.kx*h+(e[1]-u)*this.ky*f)/(h*h+f*f))>1?(l=t[a+1][0],u=t[a+1][1]):d>0&&(l+=h/this.kx*d,u+=f/this.ky*d));var p=(h=c(e[0]-l)*this.kx)*h+(f=(e[1]-u)*this.ky)*f;p<s&&(s=p,r=l,n=u,i=a,o=d)}return{point:[r,n],index:i,t:Math.max(0,Math.min(1,o))}},o.prototype.lineSlice=function(t,e,r){var n=this.pointOnLine(r,t),i=this.pointOnLine(r,e);if(n.index>i.index||n.index===i.index&&n.t>i.t){var o=n;n=i,i=o}var s=[n.point],l=n.index+1,c=i.index;!a(r[l],s[0])&&l<=c&&s.push(r[l]);for(var u=l+1;u<=c;u++)s.push(r[u]);return a(r[c],i.point)||s.push(i.point),s},o.prototype.lineSliceAlong=function(t,e,r){for(var n=0,i=[],o=0;o<r.length-1;o++){var s=r[o],a=r[o+1],c=this.distance(s,a);if((n+=c)>t&&0===i.length&&i.push(l(s,a,(t-(n-c))/c)),n>=e)return i.push(l(s,a,(e-(n-c))/c)),i;n>t&&i.push(a)}return i},o.prototype.bufferPoint=function(t,e){var r=e/this.ky,n=e/this.kx;return[t[0]-n,t[1]-r,t[0]+n,t[1]+r]},o.prototype.bufferBBox=function(t,e){var r=e/this.ky,n=e/this.kx;return[t[0]-n,t[1]-r,t[2]+n,t[3]+r]},o.prototype.insideBBox=function(t,e){return c(t[0]-e[0])>=0&&c(t[0]-e[2])<=0&&t[1]>=e[1]&&t[1]<=e[3]},Object.defineProperties(o,s),o}))}(Mi);var ki=p(Mi.exports),Ii={exports:{}};!function(t,e){!function(e,r){t.exports=r()}(0,(function(){var t=function(t,r){if(void 0===t&&(t=[]),void 0===r&&(r=e),this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function e(t,e){return t<e?-1:t>e?1:0}return t.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(t){for(var e=this,r=e.data,n=e.compare,i=r[t];t>0;){var o=t-1>>1,s=r[o];if(n(i,s)>=0)break;r[t]=s,t=o}r[t]=i},t.prototype._down=function(t){for(var e=this,r=e.data,n=e.compare,i=this.length>>1,o=r[t];t<i;){var s=1+(t<<1),a=r[s],l=s+1;if(l<this.length&&n(r[l],a)<0&&(s=l,a=r[l]),n(a,o)>=0)break;r[t]=a,t=s}r[t]=o},t}))}(Ii);var Pi=p(Ii.exports),Li=8192;function Ri(t,e){return e.dist-t.dist}const Di=100,zi=50;function Bi(t){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function ji(t){return t[1]-t[0]+1}function Fi(t,e){const r=t[1]>=t[0]&&t[1]<e;return r||console.warn("Distance Expression: Index is out of range"),r}function Ni(t,e){if(t[0]>t[1])return[null,null];const r=ji(t);if(e){if(2===r)return[t,null];const e=Math.floor(r/2);return[[t[0],t[0]+e],[t[0]+e,t[1]]]}{if(1===r)return[t,null];const e=Math.floor(r/2)-1;return[[t[0],t[0]+e],[t[0]+e+1,t[1]]]}}function $i(t,e){const r=[1/0,1/0,-1/0,-1/0];if(!Fi(e,t.length))return r;for(let n=e[0];n<=e[1];++n)ni(r,t[n]);return r}function Ui(t){const e=[1/0,1/0,-1/0,-1/0];for(let r=0;r<t.length;++r)for(let n=0;n<t[r].length;++n)ni(e,t[r][n]);return e}function Vi(t,e,r){if(Bi(t)||Bi(e))return NaN;let n=0,i=0;return t[2]<e[0]&&(n=e[0]-t[2]),t[0]>e[2]&&(n=t[0]-e[2]),t[1]>e[3]&&(i=t[1]-e[3]),t[3]<e[1]&&(i=e[1]-t[3]),r.distance([0,0],[n,i])}function Gi(t){return 360*t-180}function qi(t){const e=180-360*t;
2return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Hi(t,e){const r=Math.pow(2,e.z),n=(t.x/Li+e.x)/r,i=(t.y/Li+e.y)/r;return[Gi(n),qi(i)]}function Wi(t,e){const r=[];for(let n=0;n<t.length;++n)r.push(Hi(t[n],e));return r}function Zi(t,e,r){const n=r.pointOnLine(e,t).point;return r.distance(t,n)}function Xi(t,e,r,n,i){const o=r.slice(n[0],n[1]+1);let s=1/0;for(let r=e[0];r<=e[1];++r)if(0===(s=Math.min(s,Zi(t[r],o,i))))return 0;return s}function Yi(t,e,r,n,i){const o=Math.min(i.pointToSegmentDistance(t,r,n),i.pointToSegmentDistance(e,r,n)),s=Math.min(i.pointToSegmentDistance(r,t,e),i.pointToSegmentDistance(n,t,e));return Math.min(o,s)}function Ki(t,e,r,n,i){if(!Fi(e,t.length)||!Fi(n,r.length))return NaN;let o=1/0;for(let s=e[0];s<e[1];++s)for(let e=n[0];e<n[1];++e){if(ui(t[s],t[s+1],r[e],r[e+1]))return 0;o=Math.min(o,Yi(t[s],t[s+1],r[e],r[e+1],i))}return o}function Ji(t,e,r,n,i){if(!Fi(e,t.length)||!Fi(n,r.length))return NaN;let o=1/0;for(let s=e[0];s<=e[1];++s)for(let e=n[0];e<=n[1];++e)if(0===(o=Math.min(o,i.distance(t[s],r[e]))))return o;return o}function Qi(t,e,r){if(ai(t,e,!0))return 0;let n=1/0;for(const i of e){const e=i.length;if(e<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(i[0]!==i[e-1]&&0===(n=Math.min(n,r.pointToSegmentDistance(t,i[e-1],i[0]))))return n;if(0===(n=Math.min(n,Zi(t,i,r))))return n}return n}function to(t,e,r,n){if(!Fi(e,t.length))return NaN;for(let n=e[0];n<=e[1];++n)if(ai(t[n],r,!0))return 0;let i=1/0;for(let o=e[0];o<e[1];++o)for(const e of r)for(let r=0,s=e.length,a=s-1;r<s;a=r++){if(ui(t[o],t[o+1],e[a],e[r]))return 0;i=Math.min(i,Yi(t[o],t[o+1],e[a],e[r],n))}return i}function eo(t,e){for(const r of t)for(let t=0;t<=r.length-1;++t)if(ai(r[t],e,!0))return!0;return!1}function ro(t,e,r,n=1/0){const i=Ui(t),o=Ui(e);if(n!==1/0&&Vi(i,o,r)>=n)return n;if(ii(i,o)){if(eo(t,e))return 0}else if(eo(e,t))return 0;let s=n;for(const n of t)for(let t=0,i=n.length,o=i-1;t<i;o=t++)for(const i of e)for(let e=0,a=i.length,l=a-1;e<a;l=e++){if(ui(n[o],n[t],i[l],i[e]))return 0;s=Math.min(s,Yi(n[o],n[t],i[l],i[e],r))}return s}function no(t,e,r,n,i,o,s){if(null===o||null===s)return;const a=Vi($i(n,o),$i(i,s),r);a<e&&t.push({dist:a,range1:o,range2:s})}function io(t,e,r,n,i=1/0){let o=Math.min(n.distance(t[0],r[0][0]),i);if(0===o)return o;const s={dist:0,range1:[0,t.length-1],range2:[0,0]},a=new Pi([s],Ri),l=e?zi:Di,c=Ui(r);for(;a.length;){const i=a.pop();if(i.dist>=o)continue;const s=i.range1;if(ji(s)<=l){if(!Fi(s,t.length))return NaN;if(e){const e=to(t,s,r,n);if(0===(o=Math.min(o,e)))return o}else for(let e=s[0];e<=s[1];++e){const i=Qi(t[e],r,n);if(0===(o=Math.min(o,i)))return o}}else{const r=Ni(s,e);if(null!==r[0]){const e=Vi($i(t,r[0]),c,n);e<o&&a.push({dist:e,range1:r[0],range2:[0,0]})}if(null!==r[1]){const e=Vi($i(t,r[1]),c,n);e<o&&a.push({dist:e,range1:r[1],range2:[0,0]})}}}return o}function oo(t,e,r,n,i,o=1/0){let s=Math.min(o,i.distance(t[0],r[0]));if(0===s)return s;const a={dist:0,range1:[0,t.length-1],range2:[0,r.length-1]},l=new Pi([a],Ri),c=e?zi:Di,u=n?zi:Di;for(;l.length;){const o=l.pop();if(o.dist>=s)continue;const a=o.range1,h=o.range2;if(ji(a)<=c&&ji(h)<=u){if(!Fi(a,t.length)||!Fi(h,r.length))return NaN;if(e&&n?s=Math.min(s,Ki(t,a,r,h,i)):e||n?e&&!n?s=Math.min(s,Xi(r,h,t,a,i)):!e&&n&&(s=Math.min(s,Xi(t,a,r,h,i))):s=Math.min(s,Ji(t,a,r,h,i)),0===s)return s}else{const o=Ni(a,e),c=Ni(h,n);no(l,s,i,t,r,o[0],c[0]),no(l,s,i,t,r,o[0],c[1]),no(l,s,i,t,r,o[1],c[0]),no(l,s,i,t,r,o[1],c[1])}}return s}function so(t,e,r,n,i=1/0){let o=i;const s=$i(t,[0,t.length-1]);for(const i of r)if(!(o!==1/0&&Vi(s,$i(i,[0,i.length-1]),n)>=o)&&(o=Math.min(o,oo(t,e,i,!0,n,o)),0===o))return o;return o}function ao(t,e,r,n,i=1/0){let o=i;const s=$i(t,[0,t.length-1]);for(const i of r){if(o!==1/0&&Vi(s,Ui(i),n)>=o)continue;const r=io(t,e,i,n,o);if(isNaN(r))return r;if(0===(o=Math.min(o,r)))return o}return o}function lo(t,e,r){let n=1/0;for(const i of t)for(const t of e){const e=ro(i,t,r,n);if(isNaN(e))return e;if(0===(n=Math.min(n,e)))return n}return n}function co(t,e,r){const n=[];for(const r of t)for(const t of r)n.push(Hi(t,e));const i=new ki(n[0][1],"meters");return"Point"===r.type||"MultiPoint"===r.type||"LineString"===r.type?oo(n,!1,"Point"===r.type?[r.coordinates]:r.coordinates,"LineString"===r.type,i):"MultiLineString"===r.type?so(n,!1,r.coordinates,i):"Polygon"===r.type||"MultiPolygon"===r.type?ao(n,!1,"Polygon"===r.type?[r.coordinates]:r.coordinates,i):null}function uo(t,e,r){const n=[];for(const r of t){const t=[];for(const n of r)t.push(Hi(n,e));n.push(t)}const i=new ki(n[0][0][1],"meters");if("Point"===r.type||"MultiPoint"===r.type||"LineString"===r.type)return so("Point"===r.type?[r.coordinates]:r.coordinates,"LineString"===r.type,n,i);if("MultiLineString"===r.type){let t=1/0;for(let e=0;e<r.coordinates.length;e++){const o=so(r.coordinates[e],!0,n,i,t);
2if(isNaN(o))return o;if(0===(t=Math.min(t,o)))return t}return t}if("Polygon"===r.type||"MultiPolygon"===r.type){let t=1/0;for(let e=0;e<n.length;e++){const o=ao(n[e],!0,"Polygon"===r.type?[r.coordinates]:r.coordinates,i,t);if(isNaN(o))return o;if(0===(t=Math.min(t,o)))return t}return t}return null}function ho(t,e,r){const n=[];for(const r of ri(t,0)){const t=[];for(let n=0;n<r.length;++n)t.push(Wi(r[n],e));n.push(t)}const i=new ki(n[0][0][0][1],"meters");if("Point"===r.type||"MultiPoint"===r.type||"LineString"===r.type)return ao("Point"===r.type?[r.coordinates]:r.coordinates,"LineString"===r.type,n,i);if("MultiLineString"===r.type){let t=1/0;for(let e=0;e<r.coordinates.length;e++){const o=ao(r.coordinates[e],!0,n,i,t);if(isNaN(o))return o;if(0===(t=Math.min(t,o)))return t}return t}return"Polygon"===r.type||"MultiPolygon"===r.type?lo("Polygon"===r.type?[r.coordinates]:r.coordinates,n,i):null}function fo(t){return"Point"===t||"MultiPoint"===t||"LineString"===t||"MultiLineString"===t||"Polygon"===t||"MultiPolygon"===t}class po{constructor(t,e){this.type=Xr,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'distance' expression requires either one argument, but found ' ${t.length-1} instead.`);if(Mn(t[1])){const e=t[1];if("FeatureCollection"===e.type){for(let t=0;t<e.features.length;++t)if(fo(e.features[t].geometry.type))return new po(e,e.features[t].geometry)}else if("Feature"===e.type){if(fo(e.geometry.type))return new po(e,e.geometry)}else if(fo(e.type))return new po(e,e)}return e.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(t){const e=t.geometry(),r=t.canonicalID();if(null!=e&&null!=r){if("Point"===t.geometryType())return co(e,r,this.geometries);if("LineString"===t.geometryType())return uo(e,r,this.geometries);if("Polygon"===t.geometryType())return ho(e,r,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}var mo=po;function go(t){if(t instanceof Yn){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Ci)return!1;if(t instanceof mo)return!1;let e=!0;return t.eachChild((t=>{e&&!go(t)&&(e=!1)})),e}function yo(t){if(t instanceof Yn&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!yo(t)&&(e=!1)})),e}function _o(t){if(t instanceof Yn&&"config"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!_o(t)&&(e=!1)})),e}function vo(t,e){if(t instanceof Yn&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild((t=>{r&&!vo(t,e)&&(r=!1)})),r}class bo{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const r=t[1];return e.scope.has(r)?new bo(r,e.scope.get(r)):e.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var xo=bo;class wo{constructor(t,e=[],r,n=new Wr,i=[],o){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=n,this.errors=i,this.expectedType=r,this.options=o}parse(t,e,r,n,i={}){return e||r?this.concat(e,r,n)._parse(t,i):this._parse(t,i)}_parse(t,e){function r(t,e,r){return"assert"===r?new jn(e,[t]):"coerce"===r?new Gn(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n="string"==typeof t[0]?this.registry[t[0]]:void 0;if(n){let i=n.parse(t,this);if(!i)return null;if(this.expectedType){const t=this.expectedType,n=i.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==n.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(t,n))return null}else i=r(i,t,e.typeAnnotation||"coerce");else i=r(i,t,e.typeAnnotation||"assert")}if(!(i instanceof Ln)&&"resolvedImage"!==i.type.kind&&So(i)){const t=new Wn(this.options);try{i=new Ln(i.type,i.evaluate(t))}catch(t){return this.error(t.message),null}}return i}return Gn.parse(["to-array",t],this)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,r){const n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new wo(this.registry,n,e||null,i,this.errors,this.options)}error(t,...e){const r=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new qr(r,t))}checkSubtype(t,e){const r=cn(t,e);return r&&this.error(r),r}}var Eo=wo;function So(t){if(t instanceof xo)return So(t.boundExpression);if(t instanceof Yn&&"error"===t.name)return!1;if(t instanceof Yn&&"config"===t.name)return!1;if(t instanceof Kn)return!1;if(t instanceof Ci)return!1;if(t instanceof mo)return!1;const e=t instanceof Gn||t instanceof jn;let r=!0;return t.eachChild((t=>{r=e?r&&So(t):r&&t instanceof Ln})),!!r&&go(t)&&vo(t,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light"])}function To(t,e){const r=t.length-1;let n,i,o=0,s=r,a=0;for(;o<=s;)if(a=Math.floor((o+s)/2),n=t[a],i=t[a+1],n<=e){if(a===r||e<i)return a;o=a+1}else{if(!(n>e))throw new Dn("Input is not a number.");s=a-1}return 0}class Ao{constructor(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of r)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const r=e.parse(t[1],1,Xr);if(!r)return null;const n=[];let i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(let r=1;r<t.length;r+=2){const o=1===r?-1/0:t[r],s=t[r+1],a=r,l=r+1;if("number"!=typeof o)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not c
2omputed expressions) for the input values.',a);if(n.length&&n[n.length-1][0]>=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);const c=e.parse(s,l,i);if(!c)return null;i=i||c.type,n.push([o,c])}return new Ao(i,r,n)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[To(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var Oo=Ao;function Co(t,e,r){return t*(1-r)+e*r}function Mo(t,e,r){return new wn(Co(t.r,e.r,r),Co(t.g,e.g,r),Co(t.b,e.b,r),Co(t.a,e.a,r))}function ko(t,e,r){return t.map(((t,n)=>Co(t,e[n],r)))}var Io=Object.freeze({__proto__:null,array:ko,color:Mo,number:Co});const Po=.95047,Lo=1,Ro=1.08883,Do=4/29,zo=6/29,Bo=3*zo*zo,jo=zo*zo*zo,Fo=Math.PI/180,No=180/Math.PI;function $o(t){return t>jo?Math.pow(t,1/3):t/Bo+Do}function Uo(t){return t>zo?t*t*t:Bo*(t-Do)}
vendor: 18,677 bytes, line 2
2function Vo(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Go(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qo(t){const e=Go(t.r),r=Go(t.g),n=Go(t.b),i=$o((.4124564*e+.3575761*r+.1804375*n)/Po),o=$o((.2126729*e+.7151522*r+.072175*n)/Lo);return{l:116*o-16,a:500*(i-o),b:200*(o-$o((.0193339*e+.119192*r+.9503041*n)/Ro)),alpha:t.a}}function Ho(t){let e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Lo*Uo(e),r=Po*Uo(r),n=Ro*Uo(n),new wn(Vo(3.2404542*r-1.5371385*e-.4985314*n),Vo(-.969266*r+1.8760108*e+.041556*n),Vo(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function Wo(t,e,r){return{l:Co(t.l,e.l,r),a:Co(t.a,e.a,r),b:Co(t.b,e.b,r),alpha:Co(t.alpha,e.alpha,r)}}function Zo(t){const{l:e,a:r,b:n}=qo(t),i=Math.atan2(n,r)*No;return{h:i<0?i+360:i,c:Math.sqrt(r*r+n*n),l:e,alpha:t.a}}function Xo(t){const e=t.h*Fo,r=t.c;return Ho({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})}function Yo(t,e,r){const n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function Ko(t,e,r){return{h:Yo(t.h,e.h,r),c:Co(t.c,e.c,r),l:Co(t.l,e.l,r),alpha:Co(t.alpha,e.alpha,r)}}const Jo={forward:qo,reverse:Ho,interpolate:Wo},Qo={forward:Zo,reverse:Xo,interpolate:Ko};var ts=Object.freeze({__proto__:null,hcl:Qo,lab:Jo});class es{constructor(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,r,n){let i=0;if("exponential"===t.name)i=rs(e,t.base,r,n);else if("linear"===t.name)i=rs(e,1,r,n);else if("cubic-bezier"===t.name){const o=t.controlPoints;i=new y(o[0],o[1],o[2],o[3]).solve(rs(e,1,r,n))}return i}static parse(t,e){let[r,n,i,...o]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t}}else{if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(i=e.parse(i,2,Xr),!i)return null;const s=[];let a=null;"interpolate-hcl"===r||"interpolate-lab"===r?a=Jr:e.expectedType&&"value"!==e.expectedType.kind&&(a=e.expectedType);for(let t=0;t<o.length;t+=2){const r=o[t],n=o[t+1],i=t+3,l=t+4;if("number"!=typeof r)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',i);if(s.length&&s[s.length-1][0]>=r)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const c=e.parse(n,l,a);if(!c)return null;a=a||c.type,s.push([r,c])}return"number"===a.kind||"color"===a.kind||"array"===a.kind&&"number"===a.itemType.kind&&"number"==typeof a.N?new es(a,r,n,i,s):e.error(`Type ${an(a)} is not interpolatable.`)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);const o=To(e,n),s=e[o],a=e[o+1],l=es.interpolationFactor(this.interpolation,n,s,a),c=r[o].evaluate(t),u=r[o+1].evaluate(t);return"interpolate"===this.operator?Io[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?Qo.reverse(Qo.interpolate(Qo.forward(c),Qo.forward(u),l)):Jo.reverse(Jo.interpolate(Jo.forward(c),Jo.forward(u),l))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let t=0;t<this.labels.length;t++)e.push(this.labels[t],this.outputs[t].serialize());return e}}function rs(t,e,r,n){const i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}var ns=es;class is{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let r=null;const n=e.expectedType;n&&"value"!==n.kind&&(r=n);const i=[];for(const n of t.slice(1)){const t=e.parse(n,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!t)return null;r=r||t.type,i.push(t)}const o=n&&i.some((t=>cn(n,t.type)));return new is(o?tn:r,i)}evaluate(t){let e,r=null,n=0;for(const i of this.args){if(n++,r=i.evaluate(t),r&&r instanceof An&&!r.available&&(e||(e=r),r=null,n===this.args.length))return e;if(null!==r)break}return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var os=is;class ss{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const r=[];for(let n=1;n<t.length-1;n+=2){const i=t[n];if("string"!=typeof i)return e.error(`Expected string, but found ${typeof i} instead.`,n);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);const o=e.parse(t[n+1],n+1);if(!o)return null;r.push([i,o])}const n=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return n?new ss(r,n):null}outputDefined(){return this.result.outputDefined()}serialize(){const t=["let"];for(const[e,r]of this.bindings)t.push(e,r.serialize());return t.push(this.result.serialize()),t}}var as=ss;class ls{constructor(t,e,r){this.type=t,this.index=e,this.input=r}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,Xr),n=e.parse(t[2],2,sn(e.expectedType||tn));if(!r||!n)return null;const i=n.type;return new ls(i.itemType,r,n)}evaluate(t){const e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new Dn(`Array index out of bounds: ${e} < 0.`);if(e>=r.length)throw new Dn(`Array index out of bounds: ${e} > ${r.length-1}.`);if(e!==Math.floor(e))throw new Dn(`Array index must be an integer, but found ${e} instead.`);return r[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var cs=ls;class us{constructor(t,e){this.type=Kr,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,tn),n=e.parse(t[2],2,tn);return r&&n?un(r.type,[Kr,Yr,Xr,Zr,tn])?new us(r,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${an(r.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(null==r)return!1;if(!hn(e,["boolean","string","number","null"]))throw new Dn(`Expected first argument to be of type boolean, string, number or null, but found ${an(kn(e))} instead.`);if(!hn(r,["string","array"]))throw new Dn(`Expected second argument to be of type array or string, but found ${an(kn(r))} instead.`);return r.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var hs=us;class fs{constructor(t,e,r){this.type=Xr,this.needle=t,this.haystack=e,this.fromIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,tn),n=e.parse(t[2],2,tn);if(!r||!n)return null;if(!un(r.type,[Kr,Yr,Xr,Zr,tn]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${an(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,Xr);return i?new fs(r,n,i):null}return new fs(r,n)}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!hn(e,["boolean","string","number","null"]))throw new Dn(`Expected first argument to be of type boolean, string, number or null, but found ${an(kn(e))} instead.`);if(!hn(r,["string","array"]))throw new Dn(`Expected second argument to be of type array or string, but found ${an(kn(r))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var ds=fs;class ps{constructor(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const i={},o=[];for(let s=2;s<t.length-1;s+=2){let a=t[s];const l=t[s+1];Array.isArray(a)||(a=[a]);const c=e.concat(s);if(0===a.length)return c.error("Expected at least one branch label.");for(const t of a){if("number"!=typeof t&&"string"!=typeof t)return c.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,kn(t)))return null}else r=kn(t);if(void 0!==i[String(t)])return c.error("Branch labels must be unique.");i[String(t)]=o.length}const u=e.parse(l,s,n);if(!u)return null;n=n||u.type,o.push(u)}const s=e.parse(t[1],1,tn);if(!s)return null;const a=e.parse(t[t.length-1],t.length-1,n);return a?"value"!==s.type.kind&&e.concat(1).checkSubtype(r,s.type)?null:new ps(r,n,s,i,o,a):null}evaluate(t){const e=this.input.evaluate(t);return(kn(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),r=[],n={};for(const t of e){const e=n[this.cases[t]];void 0===e?(n[this.cases[t]]=r.length,r.push([this.cases[t],[t]])):r[e][1].push(t)}const i=t=>"number"===this.inputType.kind?Number(t):t;for(const[e,n]of r)1===n.length?t.push(i(n[0])):t.push(n.map(i)),t.push(this.outputs[e].serialize());return t.push(this.otherwise.serialize()),t}}var ms=ps;class gs{constructor(t,e,r){this.type=t,this.branches=e,this.otherwise=r}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const n=[];for(let i=1;i<t.length-1;i+=2){const o=e.parse(t[i],i,Kr);if(!o)return null;const s=e.parse(t[i+1],i+1,r);if(!s)return null;n.push([o,s]),r=r||s.type}const i=e.parse(t[t.length-1],t.length-1,r);return i?new gs(r,n,i):null}evaluate(t){for(const[e,r]of this.branches)if(e.evaluate(t))return r.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,r]of this.branches)t(e),t(r);t(this.otherwise)}outputDefined(){return this.branches.every((([t,e])=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var ys=gs;class _s{constructor(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,tn),n=e.parse(t[2],2,Xr);if(!r||!n)return null;if(!un(r.type,[sn(tn),Yr,tn]))return e.error(`Expected first argument to be of type array or string, but found ${an(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,Xr);return i?new _s(r.type,r,n,i):null}return new _s(r.type,r,n)}evaluate(t){const e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!hn(e,["string","array"]))throw new Dn(`Expected first argument to be of type array or string, but found ${an(kn(e))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var vs=_s;function bs(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function xs(t,e,r){return e===r}function ws(t,e,r){return e!==r}function Es(t,e,r){return e<r}function Ss(t,e,r){return e>r}function Ts(t,e,r){return e<=r}function As(t,e,r){return e>=r}function Os(t,e,r,n){return 0===n.compare(e,r)}function Cs(t,e,r,n){return!Os(t,e,r,n)}function Ms(t,e,r,n){return n.compare(e,r)<0}function ks(t,e,r,n){return n.compare(e,r)>0}function Is(t,e,r,n){return n.compare(e,r)<=0}function Ps(t,e,r,n){return n.compare(e,r)>=0}function Ls(t,e,r){const n="=="!==t&&"!="!==t;return class i{constructor(t,e,r){this.type=Kr,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const r=t[0];let o=e.parse(t[1],1,tn);if(!o)return null;if(!bs(r,o.type))return e.concat(1).error(`"${r}" comparisons are not supported for type '${an(o.type)}'.`);let s=e.parse(t[2],2,tn);if(!s)return null;if(!bs(r,s.type))return e.concat(2).error(`"${r}" comparisons are not supported for type '${an(s.type)}'.`);if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error(`Cannot compare types '${an(o.type)}' and '${an(s.type)}'.`);n&&("value"===o.type.kind&&"value"!==s.type.kind?o=new jn(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new jn(o.type,[s])));let a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error("Cannot use collator to compare non-string types.");if(a=e.parse(t[3],3,rn),!a)return null}return new i(o,s,a)}evaluate(i){const o=this.lhs.evaluate(i),s=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){const e=kn(o),r=kn(s);if(e.kind!==r.kind||"string"!==e.kind&&"number"!==e.kind)throw new Dn(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=kn(o),r=kn(s);if("string"!==t.kind||"string"!==r.kind)return e(i,o,s)}return this.collator?r(i,o,s,this.collator.evaluate(i)):e(i,o,s)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Rs=Ls("==",xs,Os),Ds=Ls("!=",ws,Cs),zs=Ls("<",Es,Ms),Bs=Ls(">",Ss,ks),js=Ls("<=",Ts,Is),Fs=Ls(">=",As,Ps);class Ns{constructor(t,e,r,n,i,o){this.type=Yr,this.number=t,this.locale=e,this.currency=r,this.unit=n,this.minFractionDigits=i,this.maxFractionDigits=o}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,Xr);if(!r)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let i=null;if(n.locale&&(i=e.parse(n.locale,1,Yr),!i))return null;let o=null;if(n.currency&&(o=e.parse(n.currency,1,Yr),!o))return null;let s=null;if(n.unit&&(s=e.parse(n.unit,1,Yr),!s))return null;let a=null;if(n["min-fraction-digits"]&&(a=e.parse(n["min-fraction-digits"],1,Xr),!a))return null;let l=null;return n["max-fraction-digits"]&&(l=e.parse(n["max-fraction-digits"],1,Xr),!l)?null:new Ns(r,i,o,s,a,l)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class $s{constructor(t){this.type=Xr,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error(`Expected argument of type string or array, but found ${an(r.type)} instead.`):new $s(r):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Dn(`Expected value to be of type string or array, but found ${an(kn(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}
2function Us(t){return function(){t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const Vs={"==":Rs,"!=":Ds,">":Bs,"<":zs,">=":Fs,"<=":js,array:jn,at:cs,boolean:jn,case:ys,coalesce:os,collator:Kn,format:Fn,image:Nn,in:hs,"index-of":ds,interpolate:ns,"interpolate-hcl":ns,"interpolate-lab":ns,length:$s,let:as,literal:Ln,match:ms,number:jn,"number-format":Ns,object:jn,slice:vs,step:Oo,string:jn,"to-boolean":Gn,"to-color":Gn,"to-number":Gn,"to-string":Gn,var:xo,within:Ci,distance:mo};function Gs(t,[e,r,n,i]){e=e.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);const o=i?i.evaluate(t):1,s=On(e,r,n,o);if(s)throw new Dn(s);return new wn(e/255*o,r/255*o,n/255*o,o)}function qs(t,[e,r,n,i]){e=e.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);const o=i?i.evaluate(t):1,s=Cn(e,r,n,o);if(s)throw new Dn(s);const a=`hsla(${e}, ${r}%, ${n}%, ${o})`,l=wn.parse(a);if(!l)throw new Dn(`Failed to parse HSLA color: ${a}`);return l}function Hs(t,e){return t in e}function Ws(t,e){const r=e[t];return void 0===r?null:r}function Zs(t,e){switch(t){case"string":return String(e);case"number":return+e;case"boolean":return!!e;case"color":return wn.parse(e)}return e}function Xs(t,e,r,n){return void 0!==n&&(t=n*Math.round(t/n)),void 0!==e&&t<e&&(t=e),void 0!==r&&t>r&&(t=r),t}function Ys(t,e,r){r.length&&(e+=`�${r}`);const n=t.getConfig(e);if(!n)return null;const{type:i,value:o,values:s,minValue:a,maxValue:l,stepValue:c}=n,u=n.default.evaluate(t);let h=o?o.evaluate(t):u;return i&&(h=Zs(i,h)),void 0!==o&&void 0!==h&&s&&!s.includes(h)&&(h=u,i&&(h=Zs(i,h))),void 0===h||void 0===a&&void 0===l&&void 0===c||("number"==typeof h?h=Xs(h,a,l,c):Array.isArray(h)&&(h=h.map((t=>"number"==typeof t?Xs(t,a,l,c):t)))),h}function Ks(t,e,r,n){for(;r<=n;){const i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}function Js(t){return{type:t}}function Qs(t){let e=0;if(0===t.length)return e;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e&=e;return e}Yn.register(Vs,{error:[en,[Yr],(t,[e])=>{throw new Dn(e.evaluate(t))}],typeof:[Yr,[tn],(t,[e])=>an(kn(e.evaluate(t)))],"to-rgba":[sn(Xr,4),[Jr],(t,[e])=>e.evaluate(t).toArray()],rgb:[Jr,[Xr,Xr,Xr],Gs],rgba:[Jr,[Xr,Xr,Xr,Xr],Gs],hsl:[Jr,[Xr,Xr,Xr],qs],hsla:[Jr,[Xr,Xr,Xr,Xr],qs],has:{type:Kr,overloads:[[[Yr],(t,[e])=>Hs(e.evaluate(t),t.properties())],[[Yr,Qr],(t,[e,r])=>Hs(e.evaluate(t),r.evaluate(t))]]},get:{type:tn,overloads:[[[Yr],(t,[e])=>Ws(e.evaluate(t),t.properties())],[[Yr,Qr],(t,[e,r])=>Ws(e.evaluate(t),r.evaluate(t))]]},config:{type:tn,overloads:[[[Yr],(t,[e])=>Ys(t,e.evaluate(t),"")],[[Yr,Yr],(t,[e,r])=>Ys(t,e.evaluate(t),r.evaluate(t))]]},"feature-state":[tn,[Yr],(t,[e])=>Ws(e.evaluate(t),t.featureState||{})],properties:[Qr,[],t=>t.properties()],"geometry-type":[Yr,[],t=>t.geometryType()],id:[tn,[],t=>t.id()],zoom:[Xr,[],t=>t.globals.zoom],pitch:[Xr,[],t=>t.globals.pitch||0],"distance-from-center":[Xr,[],t=>t.distanceFromCenter()],"measure-light":[Xr,[Yr],(t,[e])=>t.measureLight(e.evaluate(t))],"heatmap-density":[Xr,[],t=>t.globals.heatmapDensity||0],"line-progress":[Xr,[],t=>t.globals.lineProgress||0],"raster-value":[Xr,[],t=>t.globals.rasterValue||0],"sky-radial-progress":[Xr,[],t=>t.globals.skyRadialProgress||0],accumulated:[tn,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[Xr,Js(Xr),(t,e)=>{let r=0;for(const n of e)r+=n.evaluate(t);return r}],"*":[Xr,Js(Xr),(t,e)=>{let r=1;for(const n of e)r*=n.evaluate(t);return r}],"-":{type:Xr,overloads:[[[Xr,Xr],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[Xr],(t,[e])=>-e.evaluate(t)]]},"/":[Xr,[Xr,Xr],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[Xr,[Xr,Xr],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[Xr,[],()=>Math.LN2],pi:[Xr,[],()=>Math.PI],e:[Xr,[],()=>Math.E],"^":[Xr,[Xr,Xr],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[Xr,[Xr],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[Xr,[Xr],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[Xr,[Xr],(t,[e])=>Math.log(e.evaluate(t))],log2:[Xr,[Xr],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[Xr,[Xr],(t,[e])=>Math.sin(e.evaluate(t))],cos:[Xr,[Xr],(t,[e])=>Math.cos(e.evaluate(t))],tan:[Xr,[Xr],(t,[e])=>Math.tan(e.evaluate(t))],asin:[Xr,[Xr],(t,[e])=>Math.asin(e.evaluate(t))],acos:[Xr,[Xr],(t,[e])=>Math.acos(e.evaluate(t))],atan:[Xr,[Xr],(t,[e])=>Math.atan(e.evaluate(t))],min:[Xr,Js(Xr),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[Xr,Js(Xr),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[Xr,[Xr],(t,[e])=>Math.abs(e.evaluate(t))],round:[Xr,[Xr],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Xr,[Xr],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[Xr,[Xr],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Kr,[Yr,tn],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[Kr,[tn],(t,[e])=>t.id()===e.value],"filter-type-==":[Kr,[Yr],(t,[e])=>t.geometryType()===e.value],"filter-<":[Kr,[Yr,tn],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<i}],"filter-id-<":[Kr,[tn],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<n}],"filter->":[Kr,[Yr,tn],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[Kr,[tn],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>n}],"filter-<=":[Kr,[Yr,tn],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[Kr,[tn],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<=n}],"filter->=":[Kr,[Yr,tn],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[Kr,[tn],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>=n}],"filter-has":[Kr,[tn],(t,[e])=>e.value in t.properties()],"filter-has-id":[Kr,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[Kr,[sn(Yr)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Kr,[sn(tn)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Kr,[Yr,sn(tn)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Kr,[Yr,sn(tn)],(t,[e,r])=>Ks(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Kr,overloads:[[[Kr,Kr],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[Js(Kr),(t,e)=>{for(const r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:Kr,overloads:[[[Kr,Kr],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[Js(Kr),(t,e)=>{for(const r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[Kr,[Kr],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Kr,[Yr],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[Yr,[Yr],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Yr,[Yr],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Yr,Js(tn),(t,e)=>e.map((e=>In(e.evaluate(t)))).join("")],"resolved-locale":[Yr,[rn],(t,[e])=>e.evaluate(t).resolvedLocale()],random:[Xr,[Xr,Xr,tn],(t,e)=>{const[r,n,i]=e.map((e=>e.evaluate(t)));if(r>n)return r;if(r===n)return r;let o;if("string"==typeof i)o=Qs(i);else{if("number"!=typeof i)throw new Dn(`Invalid seed input: ${i}`);o=i}return r+Us(o)()*(n-r)}]});var ta=Vs;function ea(t){return{result:"success",value:t}}function ra(t){return{result:"error",value:t}}function na(t,e){return!!t&&!!t.parameters&&t.parameters.indexOf(e)>-1}function ia(t){return"data-driven"===t["property-type"]}function oa(t){return na(t.expression,"measure-light")}function sa(t){return na(t.expression,"zoom")}function aa(t){return!!t.expression&&t.expression.interpolated}function la(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ca(t){return t}function ua(t,e){const r="color"===e.type,n=t.stops&&"object"==typeof t.stops[0][0],i=n||void 0!==t.property,o=n||!i,s=t.type||(aa(e)?"exponential":"interval");if(r&&((t=$r({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],wn.parse(t[1])]))),t.default?t.default=wn.parse(t.default):t.default=wn.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!ts[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let a,l,c;if("exponential"===s)a=pa;else if("interval"===s)a=da;else if("categorical"===s){a=fa,l=Object.create(null);for(const e of t.stops)l[e[0]]=e[1];c=typeof t.stops[0][0]}else{if("identity"!==s)throw new Error(`Unknown function type "${s}"`);a=ma}if(n){const r={},n=[];for(let e=0;e<t.stops.length;e++){const i=t.stops[e],o=i[0].zoom;void 0===r[o]&&(r[o]={zoom:o,type:t.type,property:t.property,default:t.default,stops:[]},n.push(o)),r[o].stops.push([i[0].value,i[1]])}const i=[];for(const t of n)i.push([r[t].zoom,ua(r[t],e)]);const o={name:"linear"};return{kind:"composite",interpolationType:o,interpolationFactor:ns.interpolationFactor.bind(void 0,o),zoomStops:i.map((t=>t[0])),evaluate:({zoom:r},n)=>pa({stops:i,base:t.base},e,r).evaluate(r,n)}}if(o){const r="exponential"===s?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:ns.interpolationFactor.bind(void 0,r),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:r})=>a(t,e,r,l,c)}}return{kind:"source",evaluate(r,n){const i=n&&n.properties?n.properties[t.property]:void 0;return void 0===i?ha(t.default,e.default):a(t,e,i,l,c)}}}function ha(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function fa(t,e,r,n,i){return ha(typeof r===i?n[r]:void 0,t.default,e.default)}function da(t,e,r){if("number"!==$n(r))return ha(t.default,e.default);const n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];const i=To(t.stops.map((t=>t[0])),r);return t.stops[i][1]}function pa(t,e,r){const n=void 0!==t.base?t.base:1;if("number"!==$n(r))return ha(t.default,e.default);const i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];const o=To(t.stops.map((t=>t[0])),r),s=ga(r,n,t.stops[o][0],t.stops[o+1][0]),a=t.stops[o][1],l=t.stops[o+1][1];let c=Io[e.type]||ca;if(t.colorSpace&&"rgb"!==t.colorSpace){const e=ts[t.colorSpace];c=(t,r)=>e.reverse(e.interpolate(e.forward(t),e.forward(r),s))}return"function"==typeof a.evaluate?{evaluate(...t){const e=a.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);
2if(void 0!==e&&void 0!==r)return c(e,r,s)}}:c(a,l,s)}function ma(t,e,r){return"color"===e.type?r=wn.parse(r):"formatted"===e.type?r=Tn.fromString(r.toString()):"resolvedImage"===e.type?r=An.fromString(r.toString()):$n(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),ha(r,t.default,e.default)}function ga(t,e,r,n){const i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}class ya{constructor(t,e,r){this.expression=t,this._warningHistory={},this._evaluator=new Wn(r),this._defaultValue=e?Oa(e):null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,r,n,i,o,s,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=a||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,n,i,o,s,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=a||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new Dn(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function _a(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in ta}function va(t,e,r){const n=new Eo(ta,[],e?Aa(e):void 0,void 0,void 0,r),i=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?ea(new ya(i,e,r)):ra(n.errors)}class ba{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isLightConstant=r,this.isStateDependent="constant"!==t&&!yo(e.expression),this.isConfigDependent=!_o(e.expression)}evaluateWithoutErrorHandling(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)}evaluate(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)}}class xa{constructor(t,e,r,n,i){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!yo(e.expression),this.isLightConstant=i,this.isConfigDependent=!_o(e.expression),this.interpolationType=n}evaluateWithoutErrorHandling(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)}evaluate(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)}interpolationFactor(t,e,r){return this.interpolationType?ns.interpolationFactor(this.interpolationType,t,e,r):0}}function wa(t,e,r){if("error"===(t=va(t,e,r)).result)return t;const n=t.value.expression,i=go(n);if(!i&&!ia(e))return ra([new qr("","data expressions not supported")]);const o=vo(n,["zoom","pitch","distance-from-center"]);if(!o&&!sa(e))return ra([new qr("","zoom expressions not supported")]);const s=vo(n,["measure-light"]);if(!s&&!oa(e))return ra([new qr("","measure-light expression not supported")]);const a=e.expression&&e.expression.relaxZoomRestriction,l=Ta(n);if(!(l||o||a))return ra([new qr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')]);if(l instanceof qr)return ra([l]);if(l instanceof ns&&!aa(e))return ra([new qr("",'"interpolate" expressions cannot be used with this property')]);if(!l)return ea(new ba(i?"constant":"source",t.value,s));const c=l instanceof ns?l.interpolation:void 0;return ea(new xa(i?"camera":"composite",t.value,l.labels,c,s))}class Ea{constructor(t,e){this._parameters=t,this._specification=e,$r(this,ua(this._parameters,this._specification))}static deserialize(t){return new Ea(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Sa(t,e,r){if(la(t))return new Ea(t,e);if(_a(t)||Array.isArray(t)&&t.length>0){const n=wa(t,e,r);
2if("error"===n.result)throw new Error(n.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return n.value}{let r=t;return"string"==typeof t&&"color"===e.type&&(r=wn.parse(t)),{kind:"constant",isConfigDependent:!1,evaluate:()=>r}}}function Ta(t){let e=null;if(t instanceof as)e=Ta(t.result);else if(t instanceof os){for(const r of t.args)if(e=Ta(r),e)break}else(t instanceof Oo||t instanceof ns)&&t.input instanceof Yn&&"zoom"===t.input.name&&(e=t);return e instanceof qr||t.eachChild((t=>{const r=Ta(t);r instanceof qr?e=r:e&&r&&e!==r&&(e=new qr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Aa(t){const e={color:Jr,string:Yr,number:Xr,enum:Yr,boolean:Kr,formatted:nn,resolvedImage:on};return"array"===t.type?sn(e[t.value]||tn,t.length):e[t.type]}function Oa(t){return"color"===t.type&&(la(t.default)||Array.isArray(t.default))?new wn(0,0,0,0):"color"===t.type?wn.parse(t.default)||null:void 0===t.default?null:t.default}function Ca(t){const e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,s=t.styleSpec;let a=[];const l=$n(r);if("object"!==l)return[new Fr(e,r,`object expected, ${l} found`)];for(const t in r){const l=t.split(".")[0],c=n[l]||n["*"];let u;i[l]?u=i[l]:n[l]?u=wl:i["*"]?u=i["*"]:n["*"]&&(u=wl),u?a=a.concat(u({key:(e?`${e}.`:e)+t,value:r[t],valueSpec:c,style:o,styleSpec:s,object:r,objectKey:t},r)):a.push(new Nr(e,r[t],`unknown property "${t}"`))}for(const t in n)i[t]||n[t].required&&void 0===n[t].default&&void 0===r[t]&&a.push(new Fr(e,r,`missing required property "${t}"`));return a}function Ma(t){const{value:e,styleSpec:r}=t,{data:n,...i}=e;Object.defineProperty(i,"__line__",{value:e.__line__,enumerable:!1});let o=Ca($r({},t,{value:i,valueSpec:r.import}));if(""===Ur(i.id)){const e=`${t.key}.id`;o.push(new Fr(e,i,"import id can't be an empty string"))}if(n){const e=`${t.key}.data`;o=o.concat(Sl(n,r,{key:e}))}return o}function ka(t){const e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,o=t.key,s=t.arrayElementValidator||wl;if("array"!==$n(e))return[new Fr(o,e,`array expected, ${$n(e)} found`)];if(r.length&&e.length!==r.length)return[new Fr(o,e,`array length ${r.length} expected, length ${e.length} found`)];if(r["min-length"]&&e.length<r["min-length"])return[new Fr(o,e,`array length at least ${r["min-length"]} expected, length ${e.length} found`)];let a={type:r.value,values:r.values,minimum:r.minimum,maximum:r.maximum,function:void 0};i.$version<7&&(a.function=r.function),"object"===$n(r.value)&&(a=r.value);let l=[];for(let t=0;t<e.length;t++)l=l.concat(s({array:e,arrayIndex:t,value:e[t],valueSpec:a,style:n,styleSpec:i,key:`${o}[${t}]`},!0));return l}function Ia(t){const e=t.key,r=t.value,n=t.valueSpec;let i=$n(r);if("number"===i&&r!=r&&(i="NaN"),"number"!==i)return[new Fr(e,r,`number expected, ${i} found`)];if("minimum"in n){let i=n.minimum;if("array"===$n(n.minimum)){const e=t.arrayIndex;i=n.minimum[e]}if(r<i)return[new Fr(e,r,`${r} is less than the minimum value ${i}`)]}if("maximum"in n){let i=n.maximum;if("array"===$n(n.maximum)){const e=t.arrayIndex;i=n.maximum[e]}if(r>i)return[new Fr(e,r,`${r} is greater than the maximum value ${i}`)]}return[]}function Pa(t){const e=t.valueSpec,r=Ur(t.value.type);let n,i,o,s={};const a="categorical"!==r&&void 0===t.value.property,l=!a,c="array"===$n(t.value.stops)&&"array"===$n(t.value.stops[0])&&"object"===$n(t.value.stops[0][0]),u=Ca({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:h,default:p}});return"identity"===r&&a&&u.push(new Fr(t.key,t.value,'missing required property "property"')),"identity"===r||t.value.stops||u.push(new Fr(t.key,t.value,'missing required property "stops"')),"exponential"===r&&t.valueSpec.expression&&!aa(t.valueSpec)&&u.push(new Fr(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ia(t.valueSpec)?u.push(new Fr(t.key,t.value,"property functions not supported")):a&&!sa(t.valueSpec)&&u.push(new Fr(t.key,t.value,"zoom functions not supported"))),"categorical"!==r&&!c||void 0!==t.value.property||u.push(new Fr(t.key,t.value,'"property" property is required')),u;function h(t){if("identity"===r)return[new Fr(t.key,t.value,'identity function may not have a "stops" property')];let e=[];const n=t.value;return e=e.concat(ka({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===$n(n)&&0===n.length&&e.push(new Fr(t.key,n,"array must have at least one stop")),e}function f(t){let r=[];const n=t.value,a=t.key;if("array"!==$n(n))return[new Fr(a,n,`array expected, ${$n(n)} found`)];if(2!==n.length)return[new Fr(a,n,`array length 2 expected, length ${n.length} found`)];if(c){if("object"!==$n(n[0]))return[new Fr(a,n,`object expected, ${$n(n[0])} found`)];if(void 0===n[0].zoom)return[new Fr(a,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new Fr(a,n,"object stop key must have value")];const e=Ur(n[0].zoom);if("number"!=typeof e)return[new Fr(a,n[0].zoom,"stop zoom values must be numbers")];if(o&&o>e)return[new Fr(a,n[0].zoom,"stop zoom values must appear in ascending order")];e!==o&&(o=e,i=void 0,s={}),r=r.concat(Ca({key:`${a}[0]`,value:n[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Ia,value:d}}))}else r=r.concat(d({key:`${a}[0]`,value:n[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},n));return _a(Vr(n[1]))?r.concat([new Fr(`${a}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(wl({key:`${a}[1]`,value:n[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function d(t,o){const a=$n(t.value),l=Ur(t.value),c=null!==t.value?t.value:o;if(n){if(a!==n)return[new Fr(t.key,c,`${a} stop domain type must match previous stop domain type ${n}`)]}else n=a;if("number"!==a&&"string"!==a&&"boolean"!==a&&"number"!=typeof l&&"string"!=typeof l&&"boolean"!=typeof l)return[new Fr(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==r){let n=`number expected, ${a} found`;return ia(e)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Fr(t.key,c,n)]}return"categorical"!==r||"number"!==a||"number"==typeof l&&isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===a&&"number"==typeof l&&"number"==typeof i&&void 0!==i&&l<i?[new Fr(t.key,c,"stop domain values must appear in ascending order")]:(i=l,"categorical"===r&&l in s?[new Fr(t.key,c,"stop domain values must be unique")]:(s[l]=!0,[])):[new Fr(t.key,c,`integer expected, found ${String(l)}
2`)]}function p(t){return wl({key:t.key,value:t.value,valueSpec:e,style:t.style,styleSpec:t.styleSpec})}}function La(t){const e=("property"===t.expressionContext?wa:va)(Vr(t.value),t.valueSpec);if("error"===e.result)return e.value.map((e=>new Fr(`${t.key}${e.key}`,t.value,e.message)));const r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new Fr(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===t.expressionContext&&"layout"===t.propertyType&&!yo(r))return[new Fr(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext)return Ra(r,t);if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!vo(r,["zoom","feature-state"]))return[new Fr(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!go(r))return[new Fr(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ra(t,e){const r=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const t of e.valueSpec.expression.parameters)r.delete(t);if(0===r.size)return[];const n=[];return t instanceof Yn&&r.has(t.name)?[new Fr(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild((t=>{n.push(...Ra(t,e))})),n)}function Da(t){const e=t.value,r=t.key,n=$n(e);return"boolean"!==n?[new Fr(r,e,`boolean expected, ${n} found`)]:[]}function za(t){const e=t.key,r=t.value,n=$n(r);return"string"!==n?[new Fr(e,r,`color expected, ${n} found`)]:null===fn(r)?[new Fr(e,r,`color expected, "${r}" found`)]:[]}function Ba(t){const e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Ur(r))&&i.push(new Fr(e,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(Ur(r))&&i.push(new Fr(e,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function ja(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!ja(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function Fa(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};ja(t)||(t=Xa(t));const r=t;let n=!0;try{n=Na(r)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n        `)}const i=jr[`filter_${e}`],o=va(n,i);let s=null;if("error"===o.result)throw new Error(o.value.map((t=>`${t.key}: ${t.message}`)).join(", "));s=(t,e,r)=>o.value.evaluate(t,e,{},r);let a=null,l=null;if(n!==r){const t=va(r,i);if("error"===t.result)throw new Error(t.value.map((t=>`${t.key}: ${t.message}`)).join(", "));a=(e,r,n,i,o)=>t.value.evaluate(e,r,{},n,void 0,void 0,i,o),l=!go(t.value.expression)}return{filter:s,dynamicFilter:a||void 0,needGeometry:Za(n),needFeature:!!l}}function Na(t){if(!Va(t))return t;let e=Vr(t);return Ua(e),e=$a(e),e}function $a(t){if(!Array.isArray(t))return t;const e=Ha(t);return!0===e?e:e.map((t=>$a(t)))}function Ua(t){let e=!1;const r=[];if("case"===t[0]){for(let n=1;n<t.length-1;n+=2)e=e||Va(t[n]),r.push(t[n+1]);r.push(t[t.length-1])}else if("match"===t[0]){e=e||Va(t[1]);for(let e=2;e<t.length-1;e+=2)r.push(t[e+1]);r.push(t[t.length-1])}else if("step"===t[0]){e=e||Va(t[1]);for(let e=1;e<t.length-1;e+=2)r.push(t[e+1])}e&&(t.length=0,t.push("any",...r));for(let e=1;e<t.length;e++)Ua(t[e])}function Va(t){if(!Array.isArray(t))return!1;if(Ga(t[0]))return!0;for(let e=1;e<t.length;e++)if(Va(t[e]))return!0;return!1}function Ga(t){return"pitch"===t||"distance-from-center"===t}const qa=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Ha(t){if(qa.has(t[0]))for(let e=1;e<t.length;e++)if(Va(t[e]))return!0;return t}function Wa(t,e){return t<e?-1:t>e?1:0}function Za(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let e=1;e<t.length;e++)if(Za(t[e]))return!0;return!1}function Xa(t){if(!t)return!0;const e=t[0];return t.length<=1?"any"!==e:"=="===e?Ya(t[1],t[2],"=="):"!="===e?tl(Ya(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?Ya(t[1],t[2],e):"any"===e?Ka(t.slice(1)):"all"===e?["all"].concat(t.slice(1).map(Xa)):"none"===e?["all"].concat(t.slice(1).map(Xa).map(tl)):"in"===e?Ja(t[1],t.slice(2)):"!in"===e?tl(Ja(t[1],t.slice(2))):"has"===e?Qa(t[1]):"!has"!==e||tl(Qa(t[1]))}function Ya(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function Ka(t){return["any"].concat(t.map(Xa))}function Ja(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(Wa)]]:["filter-in-small",t,["literal",e]]}}function Qa(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function tl(t){return["!",t]}function el(t){if(ja(Vr(t.value))){const e=t.layerType||"fill";return La($r({},t,{expressionContext:"filter",valueSpec:t.styleSpec[`filter_${e}`]}))}return rl(t)}function rl(t){const e=t.value,r=t.key;if("array"!==$n(e))return[new Fr(r,e,`array expected, ${$n(e)} found`)];const n=t.styleSpec;let i,o=[];if(e.length<1)return[new Fr(r,e,"filter array must have at least 1 element")];switch(o=o.concat(Ba({key:`${r}[0]`,value:e[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ur(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===Ur(e[1])&&o.push(new Fr(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":3!==e.length&&o.push(new Fr(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(i=$n(e[1]),"string"!==i&&o.push(new Fr(`${r}[1]`,e[1],`string expected, ${i} found`)));for(let s=2;s<e.length;s++)i=$n(e[s]),"$type"===Ur(e[1])?o=o.concat(Ba({key:`${r}[${s}]`,value:e[s],valueSpec:n.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&o.push(new Fr(`${r}[${s}]`,e[s],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let n=1;n<e.length;n++)o=o.concat(rl({key:`${r}[${n}]`,value:e[n],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":i=$n(e[1]),2!==e.length?o.push(new Fr(r,e,`filter array for "${e[0]}" operator must have 2 elements`)):"string"!==i&&o.push(new Fr(`${r}[1]`,e[1],`string expected, ${i} found`))}return o}function nl(t,e){const r=t.key,n=t.style,i=t.layer,o=t.styleSpec,s=t.value,a=t.objectKey,l=o[`${e}_${t.layerType}`];if(!l)return[];const c=a.match(/^(.*)-transition$/);if("paint"===e&&c&&l[c[1]]&&l[c[1]].transition)return wl({key:r,value:s,valueSpec:o.transition,style:n,styleSpec:o});const u=t.valueSpec||l[a];if(!u)return[new Nr(r,s,`unknown property "${a}"`)];let h;if("string"===$n(s)&&ia(u)&&!u.tokens&&(h=/^{([^}]+)}$/.exec(s))){const t=`\`{ "type": "identity", "property": ${h?JSON.stringify(h[1]):'"_"'} }\``;return[new Fr(r,s,`"${a}" does not support interpolation syntax\nUse an identity property function instead: ${t}.`)]}const f=[];if("symbol"===t.layerType)"text-field"!==a||!n||n.glyphs||n.imports||f.push(new Fr(r,s,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&la(Vr(s))&&"identity"===Ur(s.type)&&f.push(new Fr(r,s,'"text-font" does not support identity functions'));else if("model"===t.layerType&&"paint"===e&&i&&i.layout&&i.layout.hasOwnProperty("model-id")&&ia(u)&&(oa(u)||sa(u))){const t=wa(Vr(s),u),e=t.value.expression||t.value._styleExpression.expression;e&&!vo(e,["measure-light"])&&("model-emissive-strength"===a&&go(e)&&yo(e)||f.push(new Fr(r,s,`${a} does not support measure-light expressions when the model layer source is vector tile or GeoJSON.`)))}return f.concat(wl({key:t.key,value:s,valueSpec:u,style:n,styleSpec:o,expressionContext:"property",propertyType:e,propertyKey:a}))}function il(t){return nl(t,"paint")}function ol(t){return nl(t,"layout")}function sl(t){let e=[];const r=t.value,n=t.key,i=t.style,o=t.styleSpec;r.type||r.ref||e.push(new Fr(n,r,'either "type" or "ref" is required'));let s=Ur(r.type);const a=Ur(r.ref);if(r.id){const o=Ur(r.id);for(let s=0;s<t.arrayIndex;s++){const t=i.layers[s];Ur(t.id)===o&&e.push(new Fr(n,r.id,`duplicate layer id "${r.id}", previously used at line ${t.id.__line__}`))}}if("ref"in r){let t;["type","source","source-layer","filter","layout"].forEach((t=>{t in r&&e.push(new Fr(n,r[t],`"${t}" is prohibited for ref layers`))}
2)),i.layers.forEach((e=>{Ur(e.id)===a&&(t=e)})),t?t.ref?e.push(new Fr(n,r.ref,"ref cannot reference another ref layer")):s=Ur(t.type):"string"==typeof a&&e.push(new Fr(n,r.ref,`ref layer "${a}" not found`))}else if("background"!==s&&"sky"!==s&&"slot"!==s)if(r.source){const t=i.sources&&i.sources[r.source],o=t&&Ur(t.type);t?"vector"===o&&"raster"===s?e.push(new Fr(n,r.source,`layer "${r.id}" requires a raster source`)):"raster"===o&&"raster"!==s?e.push(new Fr(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==o||r["source-layer"]?"raster-dem"===o&&"hillshade"!==s?e.push(new Fr(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]&&!r.paint["line-trim-offset"]||"geojson"===o&&t.lineMetrics||e.push(new Fr(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Fr(n,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new Fr(n,r.source,`source "${r.source}" not found`))}else e.push(new Fr(n,r,'missing required property "source"'));return e=e.concat(Ca({key:n,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":()=>[],type:()=>wl({key:`${n}.type`,value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"}),filter:t=>el($r({layerType:s},t)),layout:t=>Ca({layer:r,key:t.key,value:t.value,valueSpec:{},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>ol($r({layerType:s},t))}}),paint:t=>Ca({layer:r,key:t.key,value:t.value,valueSpec:{},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>il($r({layerType:s,layer:r},t))}})}})),e}function al(t){const e=t.value,r=t.key,n=$n(e);return"string"!==n?[new Fr(r,e,`string expected, ${n} found`)]:[]}const ll={promoteId:hl};function cl(t){const e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new Fr(r,e,'"type" is required')];const o=Ur(e.type);let s=[];switch(["vector","raster","raster-dem"].includes(o)&&(e.url||e.tiles||s.push(new Fr(r,e,'Either "url" or "tiles" is required.'))),o){case"vector":case"raster":case"raster-dem":return s=s.concat(Ca({key:r,value:e,valueSpec:n[`source_${o.replace("-","_")}`],style:t.style,styleSpec:n,objectElementValidators:ll})),s;case"geojson":if(s=Ca({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,objectElementValidators:ll}),e.cluster)for(const t in e.clusterProperties){const[n,i]=e.clusterProperties[t],o="string"==typeof n?[n,["accumulated"],["get",t]]:n;s.push(...La({key:`${r}.${t}.map`,value:i,expressionContext:"cluster-map"})),s.push(...La({key:`${r}.${t}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return s;case"video":return Ca({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case"image":return Ca({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case"canvas":return[new Fr(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ba({key:`${r}.type`,value:e.type,valueSpec:{values:ul(n)},style:i,styleSpec:n})}}function ul(t){return t.source.reduce(((e,r)=>{const n=t[r];return"enum"===n.type.type&&(e=e.concat(Object.keys(n.type.values))),e}),[])}function hl({key:t,value:e}){if("string"===$n(e))return al({key:t,value:e});{const r=[];for(const n in e)r.push(...al({key:`${t}.${n}`,value:e[n]}));return r}}function fl(t){const e=-1===t.indexOf("://");try{return new URL(t,e?"http://example.com":void 0),!0}catch(t){return!1}}function dl(t){const e=t.value;let r=[];if(!e)return r;const n=$n(e);return"string"!==n?(r=r.concat([new Fr(t.key,e,`string expected, "${n}" found`)]),r):(fl(e)||(r=r.concat([new Fr(t.key,e,`invalid url "${e}"`)])),r)}function pl(t){const e=t.value,r=t.styleSpec,n=r.light,i=t.style;let o=[];const s=$n(e);if(void 0===e)return o;if("object"!==s)return o=o.concat([new Fr("light",e,`object expected, ${s} found`)]),o;for(const t in e){const s=t.match(/^(.*)-transition$/);o=s&&n[s[1]]&&n[s[1]].transition?o.concat(wl({key:t,value:e[t],valueSpec:r.transition,style:i,styleSpec:r})):n[t]?o.concat(wl({key:t,value:e[t],valueSpec:n[t],style:i,styleSpec:r})):o.concat([new Fr(t,e[t],`unknown property "${t}"`)])}return o}function ml(t){const e=t.value;let r=[];if(!e)return r;const n=$n(e);if("object"!==n)return r=r.concat([new Fr("light-3d",e,`object expected, ${n} found`)]),r;const i=t.styleSpec,o=i["light-3d"],s=t.key,a=t.style,l=t.style.lights;for(const t of["type","id"])if(!(t in e))return r=r.concat([new Fr("light-3d",e,`missing property ${t} on light`)]),r;if(e.type&&l)for(let n=0;n<t.arrayIndex;n++){const t=Ur(e.type),i=l[n];Ur(i.type)===t&&r.push(new Fr(s,e.id,`duplicate light type "${e.type}", previously defined at line ${i.id.__line__}`))}const c=`properties_light_${e.type}`;if(!(c in i))return r=r.concat([new Fr("light-3d",e,`Invalid light type ${e.type}`)]),r;const u=i[c];for(const n in e)if("properties"===n){const o=e[n],s=$n(o);if("object"!==s)return r=r.concat([new Fr("properties",o,`object expected, ${s} found`)]),r;for(const e in o)r=u[e]?r.concat(wl({key:e,value:o[e],valueSpec:u[e],style:a,styleSpec:i})):r.concat([new Nr(t.key,o[e],`unknown property "${e}"`)])}else{const t=n.match(/^(.*)-transition$/);r=t&&o[t[1]]&&o[t[1]].transition?r.concat(wl({key:n,value:e[n],valueSpec:i.transition,style:a,styleSpec:i})):o[n]?r.concat(wl({key:n,value:e[n],valueSpec:o[n],style:a,styleSpec:i})):r.concat([new Nr(n,e[n],`unknown property "${n}"`)])}return r}function gl(t){const e=t.value,r=t.key,n=t.style,i=t.styleSpec,o=i.terrain;let s=[];const a=$n(e);if(void 0===e)return s;if("null"===a)return s;if("object"!==a)return s=s.concat([new Fr("terrain",e,`object expected, ${a} found`)]),s;for(const t in e){const r=t.match(/^(.*)-transition$/);s=r&&o[r[1]]&&o[r[1]].transition?s.concat(wl({key:t,value:e[t],valueSpec:i.transition,style:n,styleSpec:i})):o[t]?s.concat(wl({key:t,value:e[t],valueSpec:o[t],style:n,styleSpec:i})):s.concat([new Nr(t,e[t],`unknown property "${t}"`)])}if(e.source){const t=n.sources&&n.sources[e.source],i=t&&Ur(t.type);t?"raster-dem"!==i&&s.push(new Fr(r,e.source,`terrain cannot be used with a source of type ${String(i)}, it only be used with a "raster-dem" source type`)):s.push(new Fr(r,e.source,`source "${e.source}" not found`))}else s.push(new Fr(r,e,'terrain is missing required property "source"'));return s}function yl(t){const e=t.value,r=t.style,n=t.styleSpec,i=n.fog;let o=[];const s=$n(e);if(void 0===e)return o;if("object"!==s)return o=o.concat([new Fr("fog",e,`object expected, ${s} found`)]),o;for(const t in e){const s=t.match(/^(.*)-transition$/);o=s&&i[s[1]]&&i[s[1]].transition?o.concat(wl({key:t,value:e[t],valueSpec:n.transition,style:r,styleSpec:n})):i[t]?o.concat(wl({key:t,value:e[t],valueSpec:i[t],style:r,styleSpec:n}
2)):o.concat([new Nr(t,e[t],`unknown property "${t}"`)])}return o}function _l(t){return 0===al(t).length?[]:La(t)}function vl(t){return 0===al(t).length?[]:La(t)}function bl(t){const e=t.value,r=t.styleSpec,n=r.projection,i=t.style;let o=[];const s=$n(e);if("object"===s)for(const t in e)o=o.concat(wl({key:t,value:e[t],valueSpec:n[t],style:i,styleSpec:r}));else"string"!==s&&(o=o.concat([new Fr("projection",e,`object or string expected, ${s} found`)]));return o}const xl={"*":()=>[],array:ka,boolean:Da,number:Ia,color:za,enum:Ba,filter:el,function:Pa,layer:sl,object:Ca,source:cl,model:dl,light:pl,"light-3d":ml,terrain:gl,fog:yl,string:al,formatted:_l,resolvedImage:vl,projection:bl,import:Ma};function wl(t,e=!1){const r=t.value,n=t.valueSpec,i=t.styleSpec;if(n.expression&&la(Ur(r)))return Pa(t);if(n.expression&&_a(Vr(r)))return La(t);if(n.type&&xl[n.type]){const r=xl[n.type](t);return!0===e&&r.length>0&&"array"===$n(t.value)?La(t):r}return Ca($r({},t,{valueSpec:n.type?i[n.type]:n}))}function El(t){const e=t.value,r=t.key,n=al(t);return n.length||(-1===e.indexOf("{fontstack}")&&n.push(new Fr(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&n.push(new Fr(r,e,'"glyphs" url must include a "{range}" token'))),n}function Sl(t,e=jr,r={}){return wl({key:r.key||"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:El,"*":()=>[]}})}function Tl(t,e=jr){return zl(Sl(t,e))}const Al=t=>zl(cl(t)),Ol=t=>zl(pl(t)),Cl=t=>zl(ml(t)),Ml=t=>zl(gl(t)),kl=t=>zl(yl(t)),Il=t=>zl(sl(t)),Pl=t=>zl(el(t)),Ll=t=>zl(il(t)),Rl=t=>zl(ol(t)),Dl=t=>zl(dl(t));function zl(t){return t.slice().sort(((t,e)=>t.line&&e.line?t.line-e.line:0))}function Bl(t,e){let r=!1;if(e&&e.length)for(const n of e)n instanceof Nr?it(n.message):(t.fire(new zr(new Error(n.message))),r=!0);return r}var jl=Nl,Fl=3;function Nl(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var s=i[Fl+o],a=i[Fl+o+1];n.push(s===a?null:i.subarray(s,a))}var l=i[Fl+n.length],c=i[Fl+n.length+1];this.keys=i.subarray(l,c),this.bboxes=i.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u<this.d*this.d;u++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}Nl.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Nl.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Nl.prototype._insertCell=function(t,e,r,n,i,o){this.cells[i].push(o)},Nl.prototype.query=function(t,e,r,n,i){var o=this.min,s=this.max;if(t<=o&&e<=o&&s<=r&&s<=n&&!i)return Array.prototype.slice.call(this.keys);var a=[],l={};return this._forEachCell(t,e,r,n,this._queryCell,a,l,i),a},Nl.prototype._queryCell=function(t,e,r,n,i,o,s,a){var l=this.cells[i];if(null!==l)for(var c=this.keys,u=this.bboxes,h=0;h<l.length;h++){var f=l[h];if(void 0===s[f]){var d=4*f;(a?a(u[d+0],u[d+1],u[d+2],u[d+3]):t<=u[d+2]&&e<=u[d+3]&&r>=u[d+0]&&n>=u[d+1])?(s[f]=!0,o.push(c[f])):s[f]=!1}}},Nl.prototype._forEachCell=function(t,e,r,n,i,o,s,a){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var d=c;d<=h;d++){var p=this.d*d+f;if((!a||a(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&i.call(this,t,e,r,n,p,o,s,a))return}},Nl.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Nl.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Nl.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=Fl+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;
2for(var o=e,s=0;s<t.length;s++){var a=t[s];i[Fl+s]=o,i.set(a,o),o+=a.length}return i[Fl+t.length]=o,i.set(this.keys,o),o+=this.keys.length,i[Fl+t.length+1]=o,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};var $l=p(jl);const Ul={};function Vl(t,e,r={}){Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Ul[e]={klass:t,omit:r.omit||[]}}Vl(Object,"Object"),$l.serialize=function(t,e){const r=t.toArrayBuffer();return e&&e.add(r),{buffer:r}},$l.deserialize=function(t){return new $l(t.buffer)},Object.defineProperty($l,"name",{value:"Grid"}),Vl($l,"Grid"),Vl(wn,"Color"),Vl(Error,"Error"),Vl(Gt,"AJAXError"),Vl(An,"ResolvedImage"),Vl(Ea,"StylePropertyFunction"),Vl(ya,"StyleExpression",{omit:["_evaluator"]}),Vl(xa,"ZoomDependentExpression"),Vl(ba,"ZoomConstantExpression"),Vl(Yn,"CompoundExpression",{omit:["_evaluate"]});for(const t in ta)Ul[ta[t]._classRegistryKey]||Vl(ta[t],`Expression${t}`);function Gl(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function ql(t){return e.ImageBitmap&&t instanceof e.ImageBitmap}function Hl(t,r){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(Gl(t)||ql(t))return r&&r.add(t),t;if(ArrayBuffer.isView(t)){const e=t;return r&&r.add(e.buffer),e}if(t instanceof e.ImageData)return r&&r.add(t.data.buffer),t;if(Array.isArray(t)){const e=[];for(const n of t)e.push(Hl(n,r));return e}if(t instanceof Map){const e={$name:"Map"};for(const[r,n]of t.entries())e[r]=Hl(n);return e}if("object"==typeof t){const e=t.constructor,n=e._classRegistryKey;if(!n)throw new Error(`can't serialize object of unregistered class ${n}`);const i=e.serialize?e.serialize(t,r):{};if(!e.serialize){for(const e in t){if(!t.hasOwnProperty(e))continue;if(Ul[n].omit.indexOf(e)>=0)continue;const o=t[e];i[e]=Hl(o,r)}t instanceof Error&&(i.message=t.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==n&&(i.$name=n),i}throw new Error("can't serialize object of type "+typeof t)}function Wl(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Gl(t)||ql(t)||ArrayBuffer.isView(t)||t instanceof e.ImageData)return t;if(Array.isArray(t))return t.map(Wl);if("object"==typeof t){const e=t.$name||"Object";if("Map"===e){const e=new Map;for(const r of Object.keys(t)){if("$name"===r)continue;const n=t[r];e.set(r,Wl(n))}return e}const{klass:r}=Ul[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(t);const n=Object.create(r.prototype);for(const e of Object.keys(t)){if("$name"===e)continue;const r=t[e];n[e]=Wl(r)}return n}throw new Error("can't deserialize object of type "+typeof t)}const Zl={"Latin-1 Supplement":t=>t>=128&&t<=255,Arabic:t=>t>=1536&&t<=1791,"Arabic Supplement":t=>t>=1872&&t<=1919,"Arabic Extended-A":t=>t>=2208&&t<=2303,"Hangul Jamo":t=>t>=4352&&t<=4607,"Unified Canadian Aboriginal Syllabics":t=>t>=5120&&t<=5759,Khmer:t=>t>=6016&&t<=6143,"Unified Canadian Aboriginal Syllabics Extended":t=>t>=6320&&t<=6399,"General Punctuation":t=>t>=8192&&t<=8303,"Letterlike Symbols":t=>t>=8448&&t<=8527,"Number Forms":t=>t>=8528&&t<=8591,"Miscellaneous Technical":t=>t>=8960&&t<=9215,"Control Pictures":t=>t>=9216&&t<=9279,"Optical Character Recognition":t=>t>=9280&&t<=9311,"Enclosed Alphanumerics":t=>t>=9312&&t<=9471,"Geometric Shapes":t=>t>=9632&&t<=9727,"Miscellaneous Symbols":t=>t>=9728&&t<=9983,"Miscellaneous Symbols and Arrows":t=>t>=11008&&t<=11263,"CJK Radicals Supplement":t=>t>=11904&&t<=12031,"Kangxi Radicals":t=>t>=12032&&t<=12255,"Ideographic Description Characters":t=>t>=12272&&t<=12287,"CJK Symbols and Punctuation":t=>t>=12288&&t<=12351,Hiragana:t=>t>=12352&&t<=12447,Katakana:t=>t>=12448&&t<=12543,Bopomofo:t=>t>=12544&&t<=12591,"Hangul Compatibility Jamo":t=>t>=12592&&t<=12687,Kanbun:t=>t>=12688&&t<=12703,"Bopomofo Extended":t=>t>=12704&&t<=12735,"CJK Strokes":t=>t>
2=12736&&t<=12783,"Katakana Phonetic Extensions":t=>t>=12784&&t<=12799,"Enclosed CJK Letters and Months":t=>t>=12800&&t<=13055,"CJK Compatibility":t=>t>=13056&&t<=13311,"CJK Unified Ideographs Extension A":t=>t>=13312&&t<=19903,"Yijing Hexagram Symbols":t=>t>=19904&&t<=19967,"CJK Unified Ideographs":t=>t>=19968&&t<=40959,"Yi Syllables":t=>t>=40960&&t<=42127,"Yi Radicals":t=>t>=42128&&t<=42191,"Hangul Jamo Extended-A":t=>t>=43360&&t<=43391,"Hangul Syllables":t=>t>=44032&&t<=55215,"Hangul Jamo Extended-B":t=>t>=55216&&t<=55295,"Private Use Area":t=>t>=57344&&t<=63743,"CJK Compatibility Ideographs":t=>t>=63744&&t<=64255,"Arabic Presentation Forms-A":t=>t>=64336&&t<=65023,"Vertical Forms":t=>t>=65040&&t<=65055,"CJK Compatibility Forms":t=>t>=65072&&t<=65103,"Small Form Variants":t=>t>=65104&&t<=65135,"Arabic Presentation Forms-B":t=>t>=65136&&t<=65279,"Halfwidth and Fullwidth Forms":t=>t>=65280&&t<=65519,"CJK Unified Ideographs Extension B":t=>t>=131072&&t<=173791};function Xl(t){for(const e of t)if(Ql(e.charCodeAt(0)))return!0;return!1}function Yl(t){for(const e of t)if(!Kl(e.charCodeAt(0)))return!1;return!0}function Kl(t){return!(Zl.Arabic(t)||Zl["Arabic Supplement"](t)||Zl["Arabic Extended-A"](t)||Zl["Arabic Presentation Forms-A"](t)||Zl["Arabic Presentation Forms-B"](t))}function Jl(t){return!!(!(t<11904)&&(Zl["Bopomofo Extended"](t)||Zl.Bopomofo(t)||Zl["CJK Compatibility Forms"](t)||Zl["CJK Compatibility Ideographs"](t)||Zl["CJK Compatibility"](t)||Zl["CJK Radicals Supplement"](t)||Zl["CJK Strokes"](t)||Zl["CJK Symbols and Punctuation"](t)||Zl["CJK Unified Ideographs Extension A"](t)||Zl["CJK Unified Ideographs"](t)||Zl["Enclosed CJK Letters and Months"](t)||Zl["Halfwidth and Fullwidth Forms"](t)||Zl.Hiragana(t)||Zl["Ideographic Description Characters"](t)||Zl["Kangxi Radicals"](t)||Zl["Katakana Phonetic Extensions"](t)||Zl.Katakana(t)||Zl["Vertical Forms"](t)||Zl["Yi Radicals"](t)||Zl["Yi Syllables"](t)))}function Ql(t){return!!(746===t||747===t||!(t<4352)&&(Zl["Bopomofo Extended"](t)||Zl.Bopomofo(t)||Zl["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||Zl["CJK Compatibility Ideographs"](t)||Zl["CJK Compatibility"](t)||Zl["CJK Radicals Supplement"](t)||Zl["CJK Strokes"](t)||!(!Zl["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Zl["CJK Unified Ideographs Extension A"](t)||Zl["CJK Unified Ideographs"](t)||Zl["Enclosed CJK Letters and Months"](t)||Zl["Hangul Compatibility Jamo"](t)||Zl["Hangul Jamo Extended-A"](t)||Zl["Hangul Jamo Extended-B"](t)||Zl["Hangul Jamo"](t)||Zl["Hangul Syllables"](t)||Zl.Hiragana(t)||Zl["Ideographic Description Characters"](t)||Zl.Kanbun(t)||Zl["Kangxi Radicals"](t)||Zl["Katakana Phonetic Extensions"](t)||Zl.Katakana(t)&&12540!==t||!(!Zl["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Zl["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Zl["Unified Canadian Aboriginal Syllabics"](t)||Zl["Unified Canadian Aboriginal Syllabics Extended"](t)||Zl["Vertical Forms"](t)||Zl["Yijing Hexagram Symbols"](t)||Zl["Yi Syllables"](t)||Zl["Yi Radicals"](t)))}function tc(t){return!!(Zl["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Zl["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Zl["Letterlike Symbols"](t)||Zl["Number Forms"](t)||Zl["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Zl["Control Pictures"](t)&&9251!==t||Zl["Optical Character Recognition"](t)||Zl["Enclosed Alphanumerics"](t)||Zl["Geometric Shapes"](t)||Zl["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Zl["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Zl["CJK Symbols and Punctuation"](t)||Zl.Katakana(t)||Zl["Private Use Area"](t)||Zl["CJK Compatibility Forms"](t)||Zl["Small Form Variants"](t)||Zl["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}function ec(t){return!(Ql(t)||tc(t))}function rc(t){return Zl.Arabic(t)||Zl["Arabic Supplement"](t)||Zl["Arabic Extended-A"](t)||Zl["Arabic Presentation Forms-A"](t)||Zl["Arabic Presentation Forms-B"](t)}function nc(t){return t>=1424&&t<=2303||Zl["Arabic Presentation Forms-A"](t)||Zl["Arabic Presentation Forms-B"](t)}function ic(t,e){return!(!e&&nc(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Zl.Khmer(t))}function oc(t){for(const e of t)if(nc(e.charCodeAt(0)))return!0;return!1}function sc(t,e){for(const r of t)if(!ic(r.charCodeAt(0),e))return!1;return!0}const ac={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let lc=null,cc=ac.unavailable,uc=null;const hc=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(cc=ac.error),lc&&lc(t)};function fc(){dc.fire(new Dr("pluginStateChange",{pluginStatus:cc,pluginURL:uc}))}const dc=new Br,pc=function(){return cc},mc=function(t){return t({pluginStatus:cc,pluginURL:uc}),dc.on("pluginStateChange",t),t}
2,gc=function(t,e,r=!1){if(cc===ac.deferred||cc===ac.loading||cc===ac.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");uc=vr.resolveURL(t),cc=ac.deferred,lc=e,fc(),r||yc()},yc=function(){if(cc!==ac.deferred||!uc)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");cc=ac.loading,fc(),uc&&Kt({url:uc},(t=>{t?hc(t):(cc=ac.loaded,fc())}))},_c={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>cc===ac.loaded||null!=_c.applyArabicShaping,isLoading:()=>cc===ac.loading,setState(t){cc=t.pluginStatus,uc=t.pluginURL},isParsed:()=>null!=_c.applyArabicShaping&&null!=_c.processBidirectionalText&&null!=_c.processStyledBidirectionalText,getPluginURL:()=>uc},vc=function(){_c.isLoading()||_c.isLoaded()||"deferred"!==pc()||yc()};class bc{constructor(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.transition=e.transition,this.pitch=e.pitch,this.brightness=e.brightness):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(t){return sc(t,_c.isLoaded())}}class xc{constructor(t,e,r){this.property=t,this.value=e,this.expression=Sa(void 0===e?t.specification.default:e,t.specification,r)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}}class wc{constructor(t,e){this.property=t,this.value=new xc(t,void 0,e)}transitioned(t,e){return new Sc(this.property,this.value,e,U({},t.transition,this.transition),t.now)}untransitioned(){return new Sc(this.property,this.value,null,{},0)}}class Ec{constructor(t,e){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._options=e,this.isConfigDependent=!1}getValue(t){return tt(this._values[t].value.value)}setValue(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new wc(this._values[t].property,this._options)),this._values[t].value=new xc(this._values[t].property,null===e?void 0:tt(e),this._options),this.isConfigDependent=this.isConfigDependent||this._values[t].value.expression.isConfigDependent}setTransitionOrValue(t,e){e&&(this._options=e);const r=this._properties.properties;if(t)for(const e in t){const n=t[e];if(K(e,"-transition")){const t=e.slice(0,-"-transition".length);r[t]&&this.setTransition(t,n)}else r[e]&&this.setValue(e,n)}}getTransition(t){return tt(this._values[t].transition)}setTransition(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new wc(this._values[t].property)),this._values[t].transition=tt(e)||void 0}serialize(){const t={};for(const e of Object.keys(this._values)){const r=this.getValue(e);void 0!==r&&(t[e]=r);const n=this.getTransition(e);void 0!==n&&(t[`${e}-transition`]=n)}return t}transitioned(t,e){const r=new Tc(this._properties);for(const n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(t,e._values[n]);return r}untransitioned(){const t=new Tc(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class Sc{constructor(t,e,r,n,i){const o=n.delay||0,s=n.duration||0;i=i||0,this.property=t,this.value=e,this.begin=i+o,this.end=this.begin+s,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(t,e,r){const n=t.now||0,i=this.value.possiblyEvaluate(t,e,r),o=this.prior;if(o){if(n>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n<this.begin)return o.possiblyEvaluate(t,e,r);{const s=(n-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,r),i,C(s))}}return i}}class Tc{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,e,r){const n=new Cc(this._properties);for(const i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(t,e,r);return n}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class Ac{constructor(t,e){this._properties=t,this._values=Object.create(t.defaultPropertyValues),this._options=e,this.isConfigDependent=!1}getValue(t){return tt(this._values[t].value)}setValue(t,e){this._values[t]=new xc(this._values[t].property,null===e?void 0:tt(e),this._options),this.isConfigDependent=this.isConfigDependent||this._values[t].expression.isConfigDependent}serialize(){const t={};for(const e of Object.keys(this._values)){const r=this.getValue(e);void 0!==r&&(t[e]=r)}return t}possiblyEvaluate(t,e,r){const n=new Cc(this._properties);for(const i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(t,e,r);return n}}class Oc{constructor(t,e,r){this.property=t,this.value=e,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(t){return"constant"===this.value.kind?this.value.value:t}evaluate(t,e,r,n){return this.property.evaluate(this.value,this.parameters,t,e,r,n)}}class Cc{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class Mc{constructor(t){this.specification=t}possiblyEvaluate(t,e){return t.expression.evaluate(e)}interpolate(t,e,r){const n=Io[this.specification.type];return n?n(t,e,r):t}}class kc{constructor(t,e){this.specification=t,this.overrides=e}possiblyEvaluate(t,e,r,n){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Oc(this,{kind:"constant",value:t.expression.evaluate(e,null,{},r,n)},e):new Oc(this,t.expression,e)}interpolate(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Oc(this,{kind:"constant",value:void 0},t.parameters);const n=Io[this.specification.type];return n?new Oc(this,{kind:"constant",value:n(t.value.value,e.value.value,r)},t.parameters):t}evaluate(t,e,r,n,i,o){return"constant"===t.kind?t.value:t.evaluate(e,r,n,i,o)}}class Ic{constructor(t){this.specification=t}possiblyEvaluate(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)}interpolate(){return!1}}class Pc{constructor(t){this.specification=t}possiblyEvaluate(t,e){return lt(t.expression.evaluate(e))}interpolate(t,e,r){return{x:Co(t.x,e.x,r),y:Co(t.y,e.y,r),z:Co(t.z,e.z,r)}}}class Lc{constructor(t){this.specification=t}possiblyEvaluate(t,e){return at(t.expression.evaluate(e))}interpolate(t,e,r){return{x:Co(t.x,e.x,r),y:Co(t.y,e.y,r),z:Co(t.z,e.z,r),azimuthal:Co(t.azimuthal,e.azimuthal,r),polar:Co(t.polar,e.polar,r)}}}class Rc{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const e=new bc(0,{});for(const r in t){const n=t[r];n.specification.overridable&&this.overridableProperties.push(r);const i=this.defaultPropertyValues[r]=new xc(n,void 0),o=this.defaultTransitionablePropertyValues[r]=new wc(n);this.defaultTransitioningPropertyValues[r]=o.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=i.possiblyEvaluate(e)}}}Vl(kc,"DataDrivenProperty"),Vl(Mc,"DataConstantProperty"),Vl(Ic,"ColorRampProperty");const Dc="�";function zc(t){return t.indexOf(Dc)>=0}function Bc(t,e){return e?`${t}${Dc}${e}`:t}function jc(t){const e=t.indexOf(Dc);return e>=0?t.slice(0,e):t}function Fc(t){const e=t.indexOf(Dc);return e>=0?t.slice(e+1):""}const Nc="-transition";class $c extends Br{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,this.isConfigDependent=!1,"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&"sky"!==t.type&&"slot"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),this.options=r,t.slot&&(this.slot=t.slot),e.layout&&(this._unevaluatedLayout=new Ac(e.layout,r),this.isConfigDependent=this.isConfigDependent||this._unevaluatedLayout.isConfigDependent),e.paint)){this._transitionablePaint=new Ec(e.paint,r);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this.isConfigDependent=this.isConfigDependent||this._transitionablePaint.isConfigDependent,this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cc(e.paint)}}setScope(t){this.scope=t,this.fqid=Bc(this.id,t)}getLayoutProperty(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,e,r={}){if(null!=e){const n=`layers.${this.id}.layout.${t}`;
2if(this._validate(Rl,n,t,e,r))return}if("custom"===this.type&&"visibility"===t)return void(this.visibility=e);const n=this._unevaluatedLayout;n._properties.properties[t]&&(n.setValue(t,e),this.isConfigDependent=this.isConfigDependent||n.isConfigDependent,"visibility"===t&&this.possiblyEvaluateVisibility())}possiblyEvaluateVisibility(){this.visibility=this._unevaluatedLayout._values.visibility.possiblyEvaluate({zoom:0})}getPaintProperty(t){return K(t,Nc)?this._transitionablePaint.getTransition(t.slice(0,-Nc.length)):this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){if(null!=e){const n=`layers.${this.id}.paint.${t}`;if(this._validate(Ll,n,t,e,r))return!1}const n=this._transitionablePaint,i=n._properties.properties;if(K(t,Nc)){const r=t.slice(0,-Nc.length);return i[r]&&n.setTransition(r,e||void 0),!1}if(!i[t])return!1;const o=n._values[t],s=o.value.isDataDriven(),a=o.value;n.setValue(t,e),this.isConfigDependent=this.isConfigDependent||n.isConfigDependent,this._handleSpecialPaintPropertyUpdate(t);const l=n._values[t].value,c=l.isDataDriven(),u=K(t,"pattern")||"line-dasharray"===t;return c||s||u||this._handleOverridablePaintPropertyUpdate(t,a,l)}_handleSpecialPaintPropertyUpdate(t){}getProgramIds(){return null}getDefaultProgramParams(t,e){return null}_handleOverridablePaintPropertyUpdate(t,e,r){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,e){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}
2serialize(){return Q({id:this.id,type:this.type,slot:this.slot,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()},((t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)))}_validate(t,e,r,n,i={}){return(!i||!1!==i.validate)&&Bl(this,t.call(Tl,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:jr,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}hasShadowPass(){return!1}canCastShadows(){return!1}hasLightBeamPass(){return!1}cutoffRange(){return 0}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof Oc&&ia(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=Fa(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}getLayerRenderingStats(){return this._stats}resetLayerRenderingStats(){this._stats&&(this._stats.numRenderedVerticesInShadowPass=0,this._stats.numRenderedVerticesInTransparentPass=0)}}class Uc{constructor(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSourceCaches={},this._updatedPaintProps=new Set,this._updatedImages=new Set}isDirty(){return this._changed}setDirty(){this._changed=!0}getUpdatedSourceCaches(){return this._updatedSourceCaches}updateSourceCache(t,e){this._updatedSourceCaches[t]=e,this.setDirty()}discardSourceCacheUpdate(t){delete this._updatedSourceCaches[t]}updateLayer(t){const e=t.scope;this._updatedLayers[e]=this._updatedLayers[e]||new Set,this._updatedLayers[e].add(t.id),this.setDirty()}removeLayer(t){const e=t.scope;this._removedLayers[e]=this._removedLayers[e]||{},this._updatedLayers[e]=this._updatedLayers[e]||new Set,this._removedLayers[e][t.id]=t,this._updatedLayers[e].delete(t.id),this._updatedPaintProps.delete(t.fqid),this.setDirty()}getRemovedLayer(t){return this._removedLayers[t.scope]?this._removedLayers[t.scope][t.id]:null}discardLayerRemoval(t){this._removedLayers[t.scope]&&delete this._removedLayers[t.scope][t.id]}getLayerUpdatesByScope(){const t={};for(const e in this._updatedLayers)t[e]=t[e]||{},t[e].updatedIds=Array.from(this._updatedLayers[e].values());for(const e in this._removedLayers)t[e]=t[e]||{},t[e].removedIds=Object.keys(this._removedLayers[e]);return t}getUpdatedPaintProperties(){return this._updatedPaintProps}updatePaintProperties(t){this._updatedPaintProps.add(t.fqid),this.setDirty()}getUpdatedImages(){return Array.from(this._updatedImages.values())}updateImage(t){this._updatedImages.add(t),this.setDirty()}resetUpdatedImages(){this._updatedImages.clear()}reset(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSourceCaches={},this._updatedPaintProps.clear(),this._updatedImages.clear()}}const Vc={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Gc{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}const qc=128,Hc=5;class Wc{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.add(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*Hc),qc),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function Zc(t,e=1){let r=0,n=0;return{members:t.map((t=>{const i=Xc(t.type),o=r=Yc(r,Math.max(e,i)),s=t.components||1;return n=Math.max(n,i),r+=i*s,{name:t.name,type:t.type,components:s,offset:o}})),size:Yc(r,Math.max(n,e)),alignment:e}}function Xc(t){return Vc[t].BYTES_PER_ELEMENT}function Yc(t,e){return Math.ceil(t/e)*e}class Kc extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){const r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){const n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t}}Kc.prototype.bytesPerElement=4,Vl(Kc,"StructArrayLayout2i4");class Jc extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t}}Jc.prototype.bytesPerElement=6,Vl(Jc,"StructArrayLayout3i6");class Qc extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,t}}Qc.prototype.bytesPerElement=8,Vl(Qc,"StructArrayLayout4i8");class tu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i)}emplace(t,e,r,n,i,o){const s=5*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,t}}tu.prototype.bytesPerElement=10,Vl(tu,"StructArrayLayout5i10");class eu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o,s)}emplace(t,e,r,n,i,o,s,a){const l=6*t,c=12*t,u=3*t;return this.int16[l+0]=e,this.int16[l+1]=r,this.uint8[c+4]=n,this.uint8[c+5]=i,this.uint8[c+6]=o,this.uint8[c+7]=s,this.float32[u+2]=a,t}}eu.prototype.bytesPerElement=12,Vl(eu,"StructArrayLayout2i4ub1f12");class ru extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.float32[o+3]=i,t}}ru.prototype.bytesPerElement=16,Vl(ru,"StructArrayLayout4f16");class nu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i)}emplace(t,e,r,n,i,o){const s=6*t,a=3*t;return this.uint16[s+0]=e,this.uint16[s+1]=r,this.uint16[s+2]=n,this.uint16[s+3]=i,this.float32[a+2]=o,t}}nu.prototype.bytesPerElement=12,Vl(nu,"StructArrayLayout4ui1f12");class iu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const o=4*t;return this.uint16[o+0]=e,this.uint16[o+1]=r,this.uint16[o+2]=n,this.uint16[o+3]=i,t}}iu.prototype.bytesPerElement=8,Vl(iu,"StructArrayLayout4ui8");class ou extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,n,i,o)}emplace(t,e,r,n,i,o,s){const a=6*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,this.int16[a+4]=o,this.int16[a+
vendor: 12,314 bytes, line 2
25]=s,t}}ou.prototype.bytesPerElement=12,Vl(ou,"StructArrayLayout6i12");class su extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s,a,l,c,u,h){const f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,n,i,o,s,a,l,c,u,h)}emplace(t,e,r,n,i,o,s,a,l,c,u,h,f){const d=12*t;return this.int16[d+0]=e,this.int16[d+1]=r,this.int16[d+2]=n,this.int16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=s,this.uint16[d+6]=a,this.uint16[d+7]=l,this.int16[d+8]=c,this.int16[d+9]=u,this.int16[d+10]=h,this.int16[d+11]=f,t}}su.prototype.bytesPerElement=24,Vl(su,"StructArrayLayout4i4ui4i24");class au extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,n,i,o)}emplace(t,e,r,n,i,o,s){const a=10*t,l=5*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.float32[l+2]=i,this.float32[l+3]=o,this.float32[l+4]=s,t}}au.prototype.bytesPerElement=20,Vl(au,"StructArrayLayout3i3f20");class lu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const r=1*t;return this.uint32[r+0]=e,t}}lu.prototype.bytesPerElement=4,Vl(lu,"StructArrayLayout1ul4");class cu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){const r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){const n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t}}cu.prototype.bytesPerElement=4,Vl(cu,"StructArrayLayout2ui4");class uu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s,a,l,c,u,h,f){const d=this.length;return this.resize(d+1),this.emplace(d,t,e,r,n,i,o,s,a,l,c,u,h,f)}emplace(t,e,r,n,i,o,s,a,l,c,u,h,f,d){const p=20*t,m=10*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.int16[p+4]=o,this.float32[m+3]=s,this.float32[m+4]=a,this.float32[m+5]=l,this.float32[m+6]=c,this.int16[p+14]=u,this.uint32[m+8]=h,this.uint16[p+18]=f,this.uint16[p+19]=d,t}}uu.prototype.bytesPerElement=40,Vl(uu,"StructArrayLayout5i4f1i1ul2ui40");class hu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o,s)}emplace(t,e,r,n,i,o,s,a){const l=8*t;return this.int16[l+0]=e,this.int16[l+1]=r,this.int16[l+2]=n,this.int16[l+4]=i,this.int16[l+5]=o,this.int16[l+6]=s,this.int16[l+7]=a,t}}hu.prototype.bytesPerElement=16,Vl(hu,"StructArrayLayout3i2i2i16");class fu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i)}emplace(t,e,r,n,i,o){const s=4*t,a=8*t;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=n,this.int16[a+6]=i,this.int16[a+7]=o,t}}fu.prototype.bytesPerElement=16,Vl(fu,"StructArrayLayout2f1f2i16");class du extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const o=12*t,s=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[s+1]=n,this.float32[s+2]=i,t}}du.prototype.bytesPerElement=12,Vl(du,"StructArrayLayout2ub2f12");class pu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t}}pu.prototype.bytesPerElement=6,Vl(pu,"StructArrayLayout3ui6");class mu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b){const x=this.length;return this.resize(x+1),this.emplace(x,t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b)}emplace(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x){const w=30*t,E=15*t,S=60*t;return this.int16[w+0]=e,this.int16[w+1]=r,this.int16[w+2]=n,this.float32[E+2]=i,this.float32[E+3]=o,this.uint16[w+8]=s,this.uint16[w+9]=a,this.uint32[E+5]=l,this.uint32[E+6]=c,this.uint32[E+7]=u,this.uint16[w+16]=h,this.uint16[w+17]=f,this.uint16[w+18]=d,this.float32[E+10]=p,this.float32[E+11]=m,this.uint8[S+48]=g,this.uint8[S+49]=y,this.uint8[S+50]=_,this.uint32[E+13]=v,this.int16[w+28]=b,this.uint8[S+58]=x,t}}mu.prototype.bytesPerElement=60,Vl(mu,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class gu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x,w,E,S,T,A,O,C,M,k,I){const P=this.length;return this.resize(P+1),this.emplace(P,t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x,w,E,S,T,A,O,C,M,k,I)}emplace(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x,w,E,S,T,A,O,C,M,k,I,P){const L=20*t,R=40*t,D=80*t;return this.float32[L+0]=e,this.float32[L+1]=r,this.int16[R+4]=n,this.int16[R+5]=i,this.int16[R+6]=o,this.int16[R+7]=s,this.int16[R+8]=a,this.int16[R+9]=l,this.int16[R+10]=c,this.int16[R+11]=u,this.int16[R+12]=h,this.uint16[R+13]=f,this.uint16[R+14]=d,this.uint16[R+15]=p,this.uint16[R+16]=m,this.uint16[R+17]=g,this.uint16[R+18]=y,this.uint16[R+19]=_,this.uint16[R+20]=v,this.uint16[R+21]=b,this.uint16[R+22]=x,this.uint16[R+23]=w,this.uint16[R+24]=E,this.uint16[R+25]=S,this.uint16[R+26]=T,this.uint16[R+27]=A,this.uint32[L+14]=O,this.float32[L+15]=C,this.float32[L+16]=M,this.float32[L+17]=k,this.float32[L+18]=I,this.uint8[D+76]=P,t}}gu.prototype.bytesPerElement=80,Vl(gu,"StructArrayLayout2f9i15ui1ul4f1ub80");class yu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const r=1*t;return this.float32[r+0]=e,t}}yu.prototype.bytesPerElement=4,Vl(yu,"StructArrayLayout1f4");class _u extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i)}emplace(t,e,r,n,i,o){const s=5*t;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=n,this.float32[s+3]=i,this.float32[s+4]=o,t}}_u.prototype.bytesPerElement=20,Vl(_u,"StructArrayLayout5f20");class vu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o,s)}emplace(t,e,r,n,i,o,s,a){const l=7*t;return this.float32[l+0]=e,this.float32[l+1]=r,this.float32[l+2]=n,this.float32[l+3]=i,this.float32[l+4]=o,this.float32[l+5]=s,this.float32[l+6]=a,t}}vu.prototype.bytesPerElement=28,Vl(vu,"StructArrayLayout7f28");class bu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const o=3*t,s=6*t;return this.uint32[o+0]=e,this.uint16[s+2]=r,this.uint16[s+3]=n,this.uint16[s+4]=i,t}}bu.prototype.bytesPerElement=12,Vl(bu,"StructArrayLayout1ul3ui12");class xu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const r=1*t;return this.uint16[r+0]=e,t}}xu.prototype.bytesPerElement=2,Vl(xu,"StructArrayLayout1ui2");class wu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t}}wu.prototype.bytesPerElement=12,Vl(wu,"StructArrayLayout3f12");class Eu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){const r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){const n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t}}Eu.prototype.bytesPerElement=8,Vl(Eu,"StructArrayLayout2f8");class Su extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m){const g=this.length;return this.resize(g+1),this.emplace(g,t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m)}emplace(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g){const y=16*t;return this.float32[y+0]=e,this.float32[y+1]=r,this.float32[y+2]=n,this.float32[y+3]=i,this.float32[y+4]=o,this.float32[y+5]=s,this.float32[y+6]=a,this.float32[y+7]=l,this.float32[y+8]=c,this.float32[y+9]=u,this.float32[y+10]=h,this.float32[y+11]=f,this.float32[y+12]=d,this.float32[y+13]=p,this.float32[y+14]=m,this.float32[y+15]=g,t}}Su.prototype.bytesPerElement=64,Vl(Su,"StructArrayLayout16f64");class Tu extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,n,i,o,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o,s)}emplace(t,e,r,n,i,o,s,a){const l=10*t,c=5*t;return this.uint16[l+0]=e,this.uint16[l+1]=r,this.uint16[l+2]=n,this.uint16[l+3]=i,this.float32[c+2]=o,this.float32[c+3]=s,this.float32[c+4]=a,t}}Tu.prototype.bytesPerElement=20,Vl(Tu,"StructArrayLayout4ui3f20");class Au extends Wc{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const r=1*t;return this.uint8[r+0]=e,t}}Au.prototype.bytesPerElement=1,Vl(Au,"StructArrayLayout1ub1");class Ou extends Gc{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}Ou.prototype.size=40;class Cu extends uu{get(t){return new Ou(this,t)}}Vl(Cu,"CollisionBoxArray");class Mu extends Gc{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}
2get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(t){this._structArray.uint8[this._pos1+49]=t}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(t){this._structArray.uint8[this._pos1+50]=t}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(t){this._structArray.uint32[this._pos4+13]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(t){this._structArray.uint8[this._pos1+58]=t}}Mu.prototype.size=60;class ku extends mu{get(t){return new Mu(this,t)}}Vl(ku,"PlacedSymbolArray");class Iu extends Gc{get tileAnchorX(){return this._structArray.float32[this._pos4+0]}get tileAnchorY(){return this._structArray.float32[this._pos4+1]}get projectedAnchorX(){return this._structArray.int16[this._pos2+4]}get projectedAnchorY(){return this._structArray.int16[this._pos2+5]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+6]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+7]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+11]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get key(){return this._structArray.uint16[this._pos2+13]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+14]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+15]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+17]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+19]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+21]}get featureIndex(){return this._structArray.uint16[this._pos2+22]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+23]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numIconVertices(){return this._structArray.uint16[this._pos2+25]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+26]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+27]}get crossTileID(){return this._structArray.uint32[this._pos4+14]}set crossTileID(t){this._structArray.uint32[this._pos4+14]=t}get textOffset0(){return this._structArray.float32[this._pos4+15]}get textOffset1(){return this._structArray.float32[this._pos4+16]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+17]}get zOffset(){return this._structArray.float32[this._pos4+18]}set zOffset(t){this._structArray.float32[this._pos4+18]=t}get hasIconTextFit(){return this._structArray.uint8[this._pos1+76]}}Iu.prototype.size=80;class Pu extends gu{get(t){return new Iu(this,t)}}Vl(Pu,"SymbolInstanceArray");class Lu extends yu{getoffsetX(t){return this.float32[1*t+0]}}Vl(Lu,"GlyphOffsetArray");class Ru extends Kc{getx(t){return this.int16[2*t+0]}gety(t){return this.int16[2*t+1]}}Vl(Ru,"SymbolLineVertexArray");class Du extends Gc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}Du.prototype.size=12;class zu extends bu{get(t){return new Du(this,t)}}Vl(zu,"FeatureIndexArray");class Bu extends cu{geta_centroid_pos0(t){return this.uint16[2*t+0]}geta_centroid_pos1(t){return this.uint16[2*t+1]}}Vl(Bu,"FillExtrusionCentroidArray");const ju=Zc([{name:"a_pos",components:2,type:"Int16"}],4),Fu=Zc([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Nu{constructor(t=[]){this.segments=t}_prepareSegment(t,e,r,n){let i=this.segments[this.segments.length-1];return t>Nu.MAX_VERTEX_ARRAY_LENGTH&&it(`Max vertices per segment is ${Nu.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!i||i.vertexLength+t>Nu.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e,primitiveOffset:r,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i}prepareSegment(t,e,r,n){return this._prepareSegment(t,e.length,r.length,n)}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy()}static simpleSegment(t,e,r,n){return new Nu([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}function $u(t,e){return 256*(t=D(Math.floor(t),0,255))+(e=D(Math.floor(e),0,255))}Nu.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Vl(Nu,"SegmentVector");const Uu=Zc([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),Vu=Zc([{name:"a_dash",components:4,type:"Uint16"}]);var Gu={exports:{}},qu={exports:{}};!function(t){function e(t,e){var r,n,i,o,s,a,l,c;for(r=3&t.length,n=t.length-r,i=e,s=3432918353,a=461845907,c=0;c<n;)l=255&t.charCodeAt(c)|(255&t.charCodeAt(++c))<<8|(255&t.charCodeAt(++c))<<16|(255&t.charCodeAt(++c))<<24,++c,i=27492+(65535&(o=5*(65535&(i=(i^=l=(6
25535&(l=(l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295)<<15|l>>>17))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<15|l>>>17))*a+(((l>>>16)*a&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}t.exports=e}(qu);var Hu=qu.exports,Wu={exports:{}};!function(t){function e(t,e){for(var r,n=t.length,i=e^n,o=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}t.exports=e}(Wu);var Zu=Hu,Xu=Wu.exports;Gu.exports=Zu,Gu.exports.murmur3=Zu,Gu.exports.murmur2=Xu;var Yu=p(Gu.exports);class Ku{constructor(){this.ids=[],this.uniqueIds=[],this.positions=[],this.indexed=!1}add(t,e,r,n){this.ids.push(Ju(t)),this.positions.push(e,r,n)}eachPosition(t,e){const r=Ju(t);let n=0,i=this.ids.length-1;for(;n<i;){const t=n+i>>1;this.ids[t]>=r?i=t:n=t+1}for(;this.ids[n]===r;)e(this.positions[3*n],this.positions[3*n+1],this.positions[3*n+2]),n++}static serialize(t,e){const r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Qu(r,n,0,r.length-1),e&&(e.add(r.buffer),e.add(n.buffer)),{ids:r,positions:n}}static deserialize(t){const e=new Ku;let r;e.ids=t.ids,e.positions=t.positions;for(const t of e.ids)t!==r&&e.uniqueIds.push(t),r=t;return e.indexed=!0,e}}function Ju(t){const e=+t;return!isNaN(e)&&Number.MIN_SAFE_INTEGER<=e&&e<=Number.MAX_SAFE_INTEGER?e:Yu(String(t))}function Qu(t,e,r,n){for(;r<n;){const i=t[r+n>>1];let o=r-1,s=n+1;for(;;){do{o++}while(t[o]<i);do{s--}while(t[s]>i);if(o>=s)break;th(t,o,s),th(e,3*o,3*s),th(e,3*o+1,3*s+1),th(e,3*o+2,3*s+2)}s-r<n-s?(Qu(t,e,r,s),r=s+1):(Qu(t,e,s+1,n),n=s)}}function th(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}Vl(Ku,"FeaturePositionMap");class eh{constructor(t){this.gl=t.gl,this.initialized=!1}fetchUniformLocation(t,e){return this.location||this.initialized||(this.location=this.gl.getUniformLocation(t,e),this.initialized=!0),!!this.location}}class rh extends eh{constructor(t){super(t),this.current=0}set(t,e,r){this.fetchUniformLocation(t,e)&&this.current!==r&&(this.current=r,this.gl.uniform1i(this.location,r))}}class nh extends eh{constructor(t){super(t),this.current=0}set(t,e,r){this.fetchUniformLocation(t,e)&&this.current!==r&&(this.current=r,this.gl.uniform1f(this.location,r))}}class ih extends eh{constructor(t){super(t),this.current=[0,0]}set(t,e,r){this.fetchUniformLocation(t,e)&&(r[0]===this.current[0]&&r[1]===this.current[1]||(this.current=r,this.gl.uniform2f(this.location,r[0],r[1])))}}class oh extends eh{constructor(t){super(t),this.current=[0,0,0]}set(t,e,r){this.fetchUniformLocation(t,e)&&(r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]||(this.current=r,this.gl.uniform3f(this.location,r[0],r[1],r[2])))}}class sh extends eh{constructor(t){super(t),this.current=[0,0,0,0]}set(t,e,r){this.fetchUniformLocation(t,e)&&(r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]&&r[3]===this.current[3]||(this.current=r,this.gl.uniform4f(this.location,r[0],r[1],r[2],r[3])))}}class ah extends eh{constructor(t){super(t),this.current=wn.transparent}set(t,e,r){this.fetchUniformLocation(t,e)&&(r.r===this.current.r&&r.g===this.current.g&&r.b===this.current.b&&r.a===this.current.a||(this.current=r,this.gl.uniform4f(this.location,r.r,r.g,r.b,r.a)))}}const lh=new Float32Array(16);class ch extends eh{constructor(t){super(t),this.current=lh}set(t,e,r){if(this.fetchUniformLocation(t,e)){if(r[12]!==this.current[12]||r[0]!==this.current[0])return this.current=r,void this.gl.uniformMatrix4fv(this.location,!1,r);for(let t=1;t<16;t++)if(r[t]!==this.current[t]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}}}}const uh=new Float32Array(9);class hh extends eh{constructor(t){super(t),this.current=uh}set(t,e,r){if(this.fetchUniformLocation(t,e))for(let t=0;t<9;t++)if(r[t]!==this.current[t]){this.current=r,this.gl.uniformMatrix3fv(this.location,!1,r);break}}}const fh=new Float32Array(4);class dh extends eh{constructor(t){super(t),this.current=fh}set(t,e,r){if(this.fetchUniformLocation(t,e))for(let t=0;t<4;t++)if(r[t]!==this.current[t]){this.current=r,this.gl.uniformMatrix2fv(this.location,!1,r);break}}}function ph(t){return[$u(255*t.r,255*t.g),$u(255*t.b,255*t.a)]}class mh{constructor(t,e,r){this.value=t,this.uniformNames=e.map((t=>`u_${t}`)),this.type=r}setUniform(t,e,r,n,i){e.set(t,i,n.constantOr(this.value))}getBinding(t,e){return"color"===this.type?new ah(t):new nh(t)}}class gh{constructor(t,e){this.uniformNames=e.map((t=>`u_${t}`)),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(t){this.pixelRatio=t.pixelRatio||1,this.pattern=t.tl.concat(t.br)}setUniform(t,e,r,n,i){const o="u_pattern"===i||"u_dash"===i?this.pattern:"u_pixel_ratio"===i?this.pixelRatio:null;o&&e.set(t,i,o)}getBinding(t,e){return"u_pattern"===e||"u_dash"===e?new sh(t):new nh(t)}}class yh{constructor(t,e,r,n){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===r?2:1,offset:0}))),this.paintVertexArray=new n}populatePaintArray(t,e,r,n,i,o,s){const a=this.paintVertexArray.length,l=this.expression.evaluate(new bc(0,{brightness:o}),e,{},i,n,s);this.paintVertexArray.resize(t),this._setPaintValue(a,t,l)}updatePaintArray(t,e,r,n,i,o,s){const a=this.expression.evaluate({zoom:0,brightness:s},r,n,void 0,i);this._setPaintValue(t,e,a)}_setPaintValue(t,e,r){if("color"===this.type){const n=ph(r);for(let r=t;r<e;r++)this.paintVertexArray.emplace(r,n[0],n[1])}else{for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent||!this.expression.isLightConstant))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class _h{constructor(t,e,r,n,i,o){this.expression=t,this.uniformNames=e.map((t=>`u_${t}_t`)),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===r?4:2,offset:0}))),this.paintVertexArray=new o}populatePaintArray(t,e,r,n,i,o,s){const a=this.expression.evaluate(new bc(this.zoom,{brightness:o}),e,{},i,n,s),l=this.expression.evaluate(new bc(this.zoom+1,{brightness:o}),e,{},i,n,s),c=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(c,t,a,l)}updatePaintArray(t,e,r,n,i,o,s){const a=this.expression.evaluate({zoom:this.zoom,brightness:s},r,n,void 0,i),l=this.expression.evaluate({zoom:this.zoom+1,brightness:s},r,n,void 0,i);this._setPaintValue(t,e,a,l)}_setPaintValue(t,e,r,n){if("color"===this.type){const i=ph(r),o=ph(n);for(let r=t;r<e;r++)this.paintVertexArray.emplace(r,i[0],i[1],o[0],o[1])}else{for(let i=t;i<e;i++)this.paintVertexArray.emplace(i,r,n);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(n))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent||!this.expression.isLightConstant))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,e,r,n,i){const o=this.useIntegerZoom?Math.floor(r.zoom):r.zoom,s=D(this.expression.interpolationFactor(o,this.zoom,this.zoom+1),0,1);e.set(t,i,s)}getBinding(t,e){return new nh(t)}}class vh{constructor(t,e,r,n,i){this.expression=t,this.layerId=i,this.paintVertexAttributes=("array"===r?Vu:Uu).members;for(let t=0;t<e.length;++t);this.paintVertexArray=new n}populatePaintArray(t,e,r){const n=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValues(n,t,e.patterns&&e.patterns[this.layerId],r)}updatePaintArray(t,e,r,n,i,o,s){this._setPaintValues(t,e,r.patterns&&r.patterns[this.layerId],o)}_setPaintValues(t,e,r,n){if(!n||!r)return;const i=n[r];if(!i)return;const{tl:o,br:s,pixelRatio:a}=i;for(let r=t;r<e;r++)this.paintVertexArray.emplace(r,o[0],o[1],s[0],s[1],a)}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent||!this.expression.isLightConstant))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class bh{constructor(t,e,r=(()=>!0)){this.binders={},this._buffers=[];const n=[];for(const i in t.paint._values){const o=t.paint.get(i);if(!r(i))continue;if(!(o instanceof Oc&&ia(o.property.specification)))continue;const s=Eh(i,t.type),a=o.value,l=o.property.specification.type,c=!!o.property.useIntegerZoom,u="line-dasharray"===i||i.endsWith("pattern"),h="line-dasharray"===i&&"constant"!==t.layout.get("line-cap").value.kind;if("constant"!==a.kind||h)if("source"===a.kind||h||u){const e=Ah(i,l,"source");this.binders[i]=u?new vh(a,s,l,e,t.id):new yh(a,s,l,e),n.push(`/a_${i}`)}else{const t=Ah(i,l,"composite");this.binders[i]=new _h(a,s,l,c,e,t),n.push(`/z_${i}`)}else this.binders[i]=u?new gh(a.value,s):new mh(a.value,s,l),n.push(`/u_${i}`)}this.cacheKey=n.sort().join("")}getMaxValue(t){const e=this.binders[t];return e instanceof yh||e instanceof _h?e.maxValue:0}populatePaintArrays(t,e,r,n,i,o,s){for(const a in this.binders){const l=this.binders[a];(l instanceof yh||l instanceof _h||l instanceof vh)&&l.populatePaintArray(t,e,r,n,i,o,s)}}setConstantPatternPositions(t){for(const e in this.binders){const r=this.binders[e];r instanceof gh&&r.setConstantPatternPositions(t)}}updatePaintArrays(t,e,r,n,i,o,s,a){let l=!1;const c=Object.keys(t),u=0!==c.length,h=u?c:e.uniqueIds;for(const c in this.binders){const f=this.binders[c];if((f instanceof yh||f instanceof _h||f instanceof vh)&&(!0===f.expression.isStateDependent||!1===f.expression.isLightConstant)){const d=i.paint.get(c);f.expression=d.value;for(const r of h){const i=t[r.toString()];e.eachPosition(r,((t,e,r)=>{const l=n.feature(t);f.updatePaintArray(e,r,l,i,o,s,a)}))}if(!u)for(const e of r.uniqueIds){const i=t[e.toString()];r.eachPosition(e,((t,e,r)=>{const l=n.feature(t);f.updatePaintArray(e,r,l,i,o,s,a)}))}l=!0}}return l}defines(){const t=[];for(const e in this.binders){const r=this.binders[e];(r instanceof mh||r instanceof gh)&&t.push(...r.uniformNames.map((t=>`#define HAS_UNIFORM_${t}`)))}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const r=this.binders[e];if(r instanceof yh||r instanceof _h||r instanceof vh)for(let e=0;e<r.paintVertexAttributes.length;e++)t.push(r.paintVertexAttributes[e].name)}return t}getBinderUniforms(){const t=[];for(const e in this.binders){const r=this.binders[e];if(r instanceof mh||r instanceof gh||r instanceof _h)for(const e of r.uniformNames)t.push(e)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t){const e=[];for(const r in this.binders){const n=this.binders[r];if(n instanceof mh||n instanceof gh||n instanceof _h)for(const i of n.uniformNames)e.push({name:i,property:r,binding:n.getBinding(t,i)})}return e}setUniforms(t,e,r,n,i){for(const{name:e,property:o,binding:s}of r)this.binders[o].setUniform(t,s,i,n.get(o),e)}updatePaintBuffers(){this._buffers=[];for(const t in this.binders){const e=this.binders[t];(e instanceof yh||e instanceof _h||e instanceof vh)&&e.paintVertexBuffer&&this._buffers.push(e.paintVertexBuffer)}}upload(t){for(const e in this.binders){const r=this.binders[e];(r instanceof yh||r instanceof _h||r instanceof vh)&&r.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const e=this.binders[t];(e instanceof yh||e instanceof _h||e instanceof vh)&&e.destroy()}}}class xh{constructor(t,e,r=(()=>!0)){this.programConfigurations={};for(const n of t)this.programConfigurations[n.id]=new bh(n,e,r);this.needsUpload=!1,this._featureMap=new Ku,this._featureMapWithoutIds=new Ku,this._bufferOffset=0,this._idlessCounter=0}populatePaintArrays(t,e,r,n,i,o,s,a){for(const r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e,n,i,o,s,a);void 0!==e.id?this._featureMap.add(e.id,r,this._bufferOffset,t):(this._featureMapWithoutIds.add(this._idlessCounter,r,this._bufferOffset,t),this._idlessCounter+=1),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,n,i,o){for(const s of r)this.needsUpload=this.programConfigurations[s.id].updatePaintArrays(t,this._featureMap,this._featureMapWithoutIds,e,s,n,i,o||0)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}const wh={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-emissive-strength":["emissive_strength"],"icon-emissive-strength":["emissive_strength"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["ga
2pwidth"],"line-pattern":["pattern","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};function Eh(t,e){return wh[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}const Sh={"line-pattern":{source:nu,composite:nu},"fill-pattern":{source:nu,composite:nu},"fill-extrusion-pattern":{source:nu,composite:nu},"line-dasharray":{source:iu,composite:iu}},Th={color:{source:Eu,composite:ru},number:{source:yu,composite:Eu}};function Ah(t,e,r){const n=Sh[t];return n&&n[r]||Th[e][r]}Vl(mh,"ConstantBinder"),Vl(gh,"PatternConstantBinder"),Vl(yh,"SourceExpressionBinder"),Vl(vh,"PatternCompositeBinder"),Vl(_h,"CompositeExpressionBinder"),Vl(bh,"ProgramConfiguration",{omit:["_buffers"]}),Vl(xh,"ProgramConfigurationSet");class Oh{constructor(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))}setNorthEast(t){return this._ne=t instanceof ax?new ax(t.lng,t.lat):ax.convert(t),this}setSouthWest(t){return this._sw=t instanceof ax?new ax(t.lng,t.lat):ax.convert(t),this}extend(t){const e=this._sw,r=this._ne;let n,i;if(t instanceof ax)n=t,i=t;else{if(!(t instanceof Oh)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){const e=t;return this.extend(Oh.convert(e))}{const e=t;return this.extend(ax.convert(e))}}return"object"==typeof t&&null!==t&&t.hasOwnProperty("lat")&&(t.hasOwnProperty("lon")||t.hasOwnProperty("lng"))?this.extend(ax.convert(t)):this}if(n=t._sw,i=t._ne,!n||!i)return this}return e||r?(e.lng=Math.min(n.lng,e.lng),e.lat=Math.min(n.lat,e.lat),r.lng=Math.max(i.lng,r.lng),r.lat=Math.max(i.lat,r.lat)):(this._sw=new ax(n.lng,n.lat),this._ne=new ax(i.lng,i.lat)),this}getCenter(){return new ax((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new ax(this.getWest(),this.getNorth())}getSouthEast(){return new ax(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:e,lat:r}=ax.convert(t),n=this._sw.lat<=r&&r<=this._ne.lat;let i=this._sw.lng<=e&&e<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=e&&e>=this._ne.lng),n&&i}static convert(t){return!t||t instanceof Oh?t:new Oh(t)}}var Ch={},Mh={};Object.defineProperty(Mh,"__esModule",{value:!0}),Mh.setMatrixArrayType=Lh,Mh.toRadian=Dh,Mh.equals=zh,Mh.RANDOM=Mh.ARRAY_TYPE=Mh.EPSILON=void 0;var kh=1e-6;Mh.EPSILON=kh;var Ih="undefined"!=typeof Float32Array?Float32Array:Array;Mh.ARRAY_TYPE=Ih;var Ph=Math.random;function Lh(t){Mh.ARRAY_TYPE=Ih=t}Mh.RANDOM=Ph;var Rh=Math.PI/180;function Dh(t){return t*Rh}function zh(t,e){return Math.abs(t-e)<=kh*Math.max(1,Math.abs(t),Math.abs(e))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Bh={};function jh(t){return jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jh(t)}Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.create=Uh,Bh.clone=Vh,Bh.copy=Gh,Bh.identity=qh,Bh.fromValues=Hh,Bh.set=Wh,Bh.transpose=Zh,Bh.invert=Xh,Bh.adjoint=Yh,Bh.determinant=Kh,Bh.multiply=Jh,Bh.rotate=Qh,Bh.scale=tf,Bh.fromRotation=ef,Bh.fromScaling=rf,Bh.str=nf,Bh.frob=of,Bh.LDU=sf,Bh.add=af,Bh.subtract=lf,Bh.exactEquals=cf,Bh.equals=uf,Bh.multiplyScalar=hf,Bh.multiplyScalarAndAdd=ff,Bh.sub=Bh.mul=void 0;var Fh=$h(Mh);function Nh(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Nh=function(t){return t?r:e})(t)}function $h(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==jh(t)&&"function"!=typeof t)return{default:t};var r=Nh(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;
2s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function Uh(){var t=new Fh.ARRAY_TYPE(4);return Fh.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}function Vh(t){var e=new Fh.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Gh(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function qh(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t}function Hh(t,e,r,n){var i=new Fh.ARRAY_TYPE(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}function Wh(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Zh(t,e){if(t===e){var r=e[1];t[1]=e[2],t[2]=r}else t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3];return t}function Xh(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*o-i*n;return s?(s=1/s,t[0]=o*s,t[1]=-n*s,t[2]=-i*s,t[3]=r*s,t):null}function Yh(t,e){var r=e[0];return t[0]=e[3],t[1]=-e[1],t[2]=-e[2],t[3]=r,t}function Kh(t){return t[0]*t[3]-t[2]*t[1]}function Jh(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],l=r[1],c=r[2],u=r[3];return t[0]=n*a+o*l,t[1]=i*a+s*l,t[2]=n*c+o*u,t[3]=i*c+s*u,t}function Qh(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*a,t[1]=i*l+s*a,t[2]=n*-a+o*l,t[3]=i*-a+s*l,t}function tf(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],l=r[1];return t[0]=n*a,t[1]=i*a,t[2]=o*l,t[3]=s*l,t}function ef(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t}function rf(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t}function nf(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function of(t){return Math.hypot(t[0],t[1],t[2],t[3])}function sf(t,e,r,n){return t[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-t[2]*r[1],[t,e,r]}function af(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function lf(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}function cf(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function uf(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=e[0],a=e[1],l=e[2],c=e[3];return Math.abs(r-s)<=Fh.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-a)<=Fh.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-l)<=Fh.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=Fh.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))}function hf(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function ff(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}var df=Jh;Bh.mul=df;var pf=lf;Bh.sub=pf;var mf={};function gf(t){return gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gf(t)}Object.defineProperty(mf,"__esModule",{value:!0}),mf.create=bf,mf.clone=xf,mf.copy=wf,mf.identity=Ef,mf.fromValues=Sf,mf.set=Tf,mf.invert=Af,mf.determinant=Of,mf.multiply=Cf,mf.rotate=Mf,mf.scale=kf,mf.translate=If,mf.fromRotation=Pf,mf.fromScaling=Lf,mf.fromTranslation=Rf,mf.str=Df,mf.frob=zf,mf.add=Bf,mf.subtract=jf,mf.multiplyScalar=Ff,mf.multiplyScalarAndAdd=Nf,mf.exactEquals=$f,mf.equals=Uf,mf.sub=mf.mul=void 0;var yf=vf(Mh);function _f(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(_f=function(t){return t?r:e})(t)}function vf(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==gf(t)&&"function"!=typeof t)return{default:t};var r=_f(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function bf(){var t=new yf.ARRAY_TYPE(6);return yf.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[4]=0,t[5]=0),t[0]=1,t[3]=1,t}function xf(t){var e=new yf.ARRAY_TYPE(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function wf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ef(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Sf(t,e,r,n,i,o){var s=new yf.ARRAY_TYPE(6);return s[0]=t,s[1]=e,s[2]=r,s[3]=n,s[4]=i,s[5]=o,s}function Tf(t,e,r,n,i,o,s){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=s,t}function Af(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=r*o-n*i;return l?(l=1/l,t[0]=o*l,t[1]=-n*l,t[2]=-i*l,t[3]=r*l,t[4]=(i*a-o*s)*l,t[5]=(n*s-r*a)*l,t):null}function Of(t){return t[0]*t[3]-t[1]*t[2]}function Cf(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=r[0],u=r[1],h=r[2],f=r[3],d=r[4],p=r[5];return t[0]=n*c+o*u,t[1]=i*c+s*u,t[2]=n*h+o*f,t[3]=i*h+s*f,t[4]=n*d+o*p+a,t[5]=i*d+s*p+l,t}function Mf(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=Math.sin(r),u=Math.cos(r);return t[0]=n*u+o*c,t[1]=i*u+s*c,t[2]=n*-c+o*u,t[3]=i*-c+s*u,t[4]=a,t[5]=l,t}function kf(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=r[0],u=r[1];return t[0]=n*c,t[1]=i*c,t[2]=o*u,t[3]=s*u,t[4]=a,t[5]=l,t}function If(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=r[0],u=r[1];return t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=n*c+o*u+a,t[5]=i*c+s*u+l,t}function Pf(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t[4]=0,t[5]=0,t}function Lf(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t}function Rf(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t}function Df(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"}function zf(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)}function Bf(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t}function jf(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t}function Ff(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t}function Nf(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t}function $f(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]}function Uf(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=e[0],c=e[1],u=e[2],h=e[3],f=e[4],d=e[5];return Math.abs(r-l)<=yf.EPSILON*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(n-c)<=yf.EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=yf.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-h)<=yf.EPSILON*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(s-f)<=yf.EPSILON*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-d)<=yf.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))}var Vf=Cf;mf.mul=Vf;var Gf=jf;mf.sub=Gf;var qf={};function Hf(t){return Hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(t)}
2Object.defineProperty(qf,"__esModule",{value:!0}),qf.create=Yf,qf.fromMat4=Kf,qf.clone=Jf,qf.copy=Qf,qf.fromValues=td,qf.set=ed,qf.identity=rd,qf.transpose=nd,qf.invert=id,qf.adjoint=od,qf.determinant=sd,qf.multiply=ad,qf.translate=ld,qf.rotate=cd,qf.scale=ud,qf.fromTranslation=hd,qf.fromRotation=fd,qf.fromScaling=dd,qf.fromMat2d=pd,qf.fromQuat=md,qf.normalFromMat4=gd,qf.projection=yd,qf.str=_d,qf.frob=vd,qf.add=bd,qf.subtract=xd,qf.multiplyScalar=wd,qf.multiplyScalarAndAdd=Ed,qf.exactEquals=Sd,qf.equals=Td,qf.sub=qf.mul=void 0;var Wf=Xf(Mh);function Zf(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Zf=function(t){return t?r:e})(t)}function Xf(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==Hf(t)&&"function"!=typeof t)return{default:t};var r=Zf(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function Yf(){var t=new Wf.ARRAY_TYPE(9);return Wf.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Kf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function Jf(t){var e=new Wf.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Qf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function td(t,e,r,n,i,o,s,a,l){var c=new Wf.ARRAY_TYPE(9);return c[0]=t,c[1]=e,c[2]=r,c[3]=n,c[4]=i,c[5]=o,c[6]=s,c[7]=a,c[8]=l,c}function ed(t,e,r,n,i,o,s,a,l,c){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=s,t[6]=a,t[7]=l,t[8]=c,t}function rd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function nd(t,e){if(t===e){var r=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function id(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*s-a*c,f=-u*o+a*l,d=c*o-s*l,p=r*h+n*f+i*d;return p?(p=1/p,t[0]=h*p,t[1]=(-u*n+i*c)*p,t[2]=(a*n-i*s)*p,t[3]=f*p,t[4]=(u*r-i*l)*p,t[5]=(-a*r+i*o)*p,t[6]=d*p,t[7]=(-c*r+n*l)*p,t[8]=(s*r-n*o)*p,t):null}function od(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t[0]=s*u-a*c,t[1]=i*c-n*u,t[2]=n*a-i*s,t[3]=a*l-o*u,t[4]=r*u-i*l,t[5]=i*o-r*a,t[6]=o*c-s*l,t[7]=n*l-r*c,t[8]=r*s-n*o,t}function sd(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8];return e*(c*o-s*l)+r*(-c*i+s*a)+n*(l*i-o*a)}function ad(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=r[0],d=r[1],p=r[2],m=r[3],g=r[4],y=r[5],_=r[6],v=r[7],b=r[8];return t[0]=f*n+d*s+p*c,t[1]=f*i+d*a+p*u,t[2]=f*o+d*l+p*h,t[3]=m*n+g*s+y*c,t[4]=m*i+g*a+y*u,t[5]=m*o+g*l+y*h,t[6]=_*n+v*s+b*c,t[7]=_*i+v*a+b*u,t[8]=_*o+v*l+b*h,t}function ld(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=r[0],d=r[1];return t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=f*n+d*s+c,t[7]=f*i+d*a+u,t[8]=f*o+d*l+h,t}function cd(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=Math.sin(r),d=Math.cos(r);return t[0]=d*n+f*s,t[1]=d*i+f*a,t[2]=d*o+f*l,t[3]=d*s-f*n,t[4]=d*a-f*i,t[5]=d*l-f*o,t[6]=c,t[7]=u,t[8]=h,t}function ud(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function hd(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function fd(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function dd(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function pd(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function md(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,l=i+i,c=r*s,u=n*s,h=n*a,f=i*s,d=i*a,p=i*l,m=o*s,g=o*a,y=o*l;return t[0]=1-h-p,t[3]=u-y,t[6]=f+g,t[1]=u+y,t[4]=1-c-p,t[7]=d-m,t[2]=f-g,t[5]=d+m,t[8]=1-c-h,t}function gd(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],y=e[15],_=r*a-n*s,v=r*l-i*s,b=r*c-o*s,x=n*l-i*a,w=n*c-o*a,E=i*c-o*l,S=u*m-h*p,T=u*g-f*p,A=u*y-d*p,O=h*g-f*m,C=h*y-d*m,M=f*y-d*g,k=_*M-v*C+b*O+x*A-w*T+E*S;return k?(k=1/k,t[0]=(a*M-l*C+c*O)*k,t[1]=(l*A-s*M-c*T)*k,t[2]=(s*C-a*A+c*S)*k,t[3]=(i*C-n*M-o*O)*k,t[4]=(r*M-i*A+o*T)*k,t[5]=(n*A-r*C-o*S)*k,t[6]=(m*E-g*w+y*x)*k,t[7]=(g*b-p*E-y*v)*k,t[8]=(p*w-m*b+y*_)*k,t):null}function yd(t,e,r){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function _d(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function vd(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function bd(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t}function xd(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t}function wd(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t}function Ed(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t}function Sd(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function Td(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=e[0],f=e[1],d=e[2],p=e[3],m=e[4],g=e[5],y=e[6],_=e[7],v=e[8];return Math.abs(r-h)<=Wf.EPSILON*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(n-f)<=Wf.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-d)<=Wf.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-p)<=Wf.EPSILON*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(s-m)<=Wf.EPSILON*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(a-g)<=Wf.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(l-y)<=Wf.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(c-_)<=Wf.EPSILON*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-v)<=Wf.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))}var Ad=ad;qf.mul=Ad;var Od=xd;qf.sub=Od;var Cd={};function Md(t){return Md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(t)}Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.create=Ld,Cd.clone=Rd,Cd.copy=Dd,Cd.fromValues=zd,Cd.set=Bd,Cd.identity=jd,Cd.transpose=Fd,Cd.invert=Nd,Cd.adjoint=$d,Cd.determinant=Ud,C
2d.multiply=Vd,Cd.translate=Gd,Cd.scale=qd,Cd.rotate=Hd,Cd.rotateX=Wd,Cd.rotateY=Zd,Cd.rotateZ=Xd,Cd.fromTranslation=Yd,Cd.fromScaling=Kd,Cd.fromRotation=Jd,Cd.fromXRotation=Qd,Cd.fromYRotation=tp,Cd.fromZRotation=ep,Cd.fromRotationTranslation=rp,Cd.fromQuat2=np,Cd.getTranslation=ip,Cd.getScaling=op,Cd.getRotation=sp,Cd.fromRotationTranslationScale=ap,Cd.fromRotationTranslationScaleOrigin=lp,Cd.fromQuat=cp,Cd.frustum=up,Cd.perspectiveNO=hp,Cd.perspectiveZO=dp,Cd.perspectiveFromFieldOfView=pp,Cd.orthoNO=mp,Cd.orthoZO=yp,Cd.lookAt=_p,Cd.targetTo=vp,Cd.str=bp,Cd.frob=xp,Cd.add=wp,Cd.subtract=Ep,Cd.multiplyScalar=Sp,Cd.multiplyScalarAndAdd=Tp,Cd.exactEquals=Ap,Cd.equals=Op,Cd.sub=Cd.mul=Cd.ortho=Cd.perspective=void 0;var kd=Pd(Mh);function Id(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Id=function(t){return t?r:e})(t)}function Pd(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==Md(t)&&"function"!=typeof t)return{default:t};var r=Id(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function Ld(){var t=new kd.ARRAY_TYPE(16);return kd.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Rd(t){var e=new kd.ARRAY_TYPE(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Dd(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function zd(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m){var g=new kd.ARRAY_TYPE(16);return g[0]=t,g[1]=e,g[2]=r,g[3]=n,g[4]=i,g[5]=o,g[6]=s,g[7]=a,g[8]=l,g[9]=c,g[10]=u,g[11]=h,g[12]=f,g[13]=d,g[14]=p,g[15]=m,g}function Bd(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=s,t[6]=a,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=m,t[15]=g,t}function jd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Fd(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function Nd(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],y=e[15],_=r*a-n*s,v=r*l-i*s,b=r*c-o*s,x=n*l-i*a,w=n*c-o*a,E=i*c-o*l,S=u*m-h*p,T=u*g-f*p,A=u*y-d*p,O=h*g-f*m,C=h*y-d*m,M=f*y-d*g,k=_*M-v*C+b*O+x*A-w*T+E*S;return k?(k=1/k,t[0]=(a*M-l*C+c*O)*k,t[1]=(i*C-n*M-o*O)*k,t[2]=(m*E-g*w+y*x)*k,t[3]=(f*w-h*E-d*x)*k,t[4]=(l*A-s*M-c*T)*k,t[5]=(r*M-i*A+o*T)*k,t[6]=(g*b-p*E-y*v)*k,t[7]=(u*E-f*b+d*v)*k,t[8]=(s*C-a*A+c*S)*k,t[9]=(n*A-r*C-o*S)*k,t[10]=(p*w-m*b+y*_)*k,t[11]=(h*b-u*w-d*_)*k,t[12]=(a*T-s*O-l*S)*k,t[13]=(r*O-n*T+i*S)*k,t[14]=(m*v-p*x-g*_)*k,t[15]=(u*x-h*v+f*_)*k,t):null}function $d(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],y=e[15];return t[0]=a*(f*y-d*g)-h*(l*y-c*g)+m*(l*d-c*f),t[1]=-(n*(f*y-d*g)-h*(i*y-o*g)+m*(i*d-o*f)),t[2]=n*(l*y-c*g)-a*(i*y-o*g)+m*(i*c-o*l),t[3]=-(n*(l*d-c*f)-a*(i*d-o*f)+h*(i*c-o*l)),t[4]=-(s*(f*y-d*g)-u*(l*y-c*g)+p*(l*d-c*f)),t[5]=r*(f*y-d*g)-u*(i*y-o*g)+p*(i*d-o*f),t[6]=-(r*(l*y-c*g)-s*(i*y-o*g)+p*(i*c-o*l)),t[7]=r*(l*d-c*f)-s*(i*d-o*f)+u*(i*c-o*l),t[8]=s*(h*y-d*m)-u*(a*y-c*m)+p*(a*d-c*h),t[9]=-(r*(h*y-d*m)-u*(n*y-o*m)+p*(n*d-o*h)),t[10]=r*(a*y-c*m)-s*(n*y-o*m)+p*(n*c-o*a),t[11]=-(r*(a*d-c*h)-s*(n*d-o*h)+u*(n*c-o*a)),t[12]=-(s*(h*g-f*m)-u*(a*g-l*m)+p*(a*f-l*h)),t[13]=r*(h*g-f*m)-u*(n*g-i*m)+p*(n*f-i*h),t[14]=-(r*(a*g-l*m)-s*(n*g-i*m)+p*(n*l-i*a)),t[15]=r*(a*f-l*h)-s*(n*f-i*h)+u*(n*l-i*a),t}function Ud(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*s-r*o)*(h*g-f*m)-(e*a-n*o)*(u*g-f*p)+(e*l-i*o)*(u*m-h*p)+(r*a-n*s)*(c*g-f*d)-(r*l-i*s)*(c*m-h*d)+(n*l-i*a)*(c*p-u*d)}function Vd(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],y=e[14],_=e[15],v=r[0],b=r[1],x=r[2],w=r[3];return t[0]=v*n+b*a+x*h+w*m,t[1]=v*i+b*l+x*f+w*g,t[2]=v*o+b*c+x*d+w*y,t[3]=v*s+b*u+x*p+w*_,v=r[4],b=r[5],x=r[6],w=r[7],t[4]=v*n+b*a+x*h+w*m,t[5]=v*i+b*l+x*f+w*g,t[6]=v*o+b*c+x*d+w*y,t[7]=v*s+b*u+x*p+w*_,v=r[8],b=r[9],x=r[10],w=r[11],t[8]=v*n+b*a+x*h+w*m,t[9]=v*i+b*l+x*f+w*g,t[10]=v*o+b*c+x*d+w*y,t[11]=v*s+b*u+x*p+w*_,v=r[12],b=r[13],x=r[14],w=r[15],t[12]=v*n+b*a+x*h+w*m,t[13]=v*i+b*l+x*f+w*g,t[14]=v*o+b*c+x*d+w*y,t[15]=v*s+b*u+x*p+w*_,t}function Gd(t,e,r){var n,i,o,s,a,l,c,u,h,f,d,p,m=r[0],g=r[1],y=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=n*m+a*g+h*y+e[12],t[13]=i*m+l*g
vendor: 4,515 bytes, line 2
2+f*y+e[13],t[14]=o*m+c*g+d*y+e[14],t[15]=s*m+u*g+p*y+e[15]),t}function qd(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Hd(t,e,r,n){var i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x,w,E,S,T,A,O,C=n[0],M=n[1],k=n[2],I=Math.hypot(C,M,k);return I<kd.EPSILON?null:(C*=I=1/I,M*=I,k*=I,i=Math.sin(r),s=1-(o=Math.cos(r)),a=e[0],l=e[1],c=e[2],u=e[3],h=e[4],f=e[5],d=e[6],p=e[7],m=e[8],g=e[9],y=e[10],_=e[11],v=C*C*s+o,b=M*C*s+k*i,x=k*C*s-M*i,w=C*M*s-k*i,E=M*M*s+o,S=k*M*s+C*i,T=C*k*s+M*i,A=M*k*s-C*i,O=k*k*s+o,t[0]=a*v+h*b+m*x,t[1]=l*v+f*b+g*x,t[2]=c*v+d*b+y*x,t[3]=u*v+p*b+_*x,t[4]=a*w+h*E+m*S,t[5]=l*w+f*E+g*S,t[6]=c*w+d*E+y*S,t[7]=u*w+p*E+_*S,t[8]=a*T+h*A+m*O,t[9]=l*T+f*A+g*O,t[10]=c*T+d*A+y*O,t[11]=u*T+p*A+_*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function Wd(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=s*i+u*n,t[6]=a*i+h*n,t[7]=l*i+f*n,t[8]=c*i-o*n,t[9]=u*i-s*n,t[10]=h*i-a*n,t[11]=f*i-l*n,t}function Zd(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],l=e[3],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=s*i-u*n,t[2]=a*i-h*n,t[3]=l*i-f*n,t[8]=o*n+c*i,t[9]=s*n+u*i,t[10]=a*n+h*i,t[11]=l*n+f*i,t}function Xd(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=s*i+u*n,t[2]=a*i+h*n,t[3]=l*i+f*n,t[4]=c*i-o*n,t[5]=u*i-s*n,t[6]=h*i-a*n,t[7]=f*i-l*n,t}function Yd(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Kd(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Jd(t,e,r){var n,i,o,s=r[0],a=r[1],l=r[2],c=Math.hypot(s,a,l);return c<kd.EPSILON?null:(s*=c=1/c,a*=c,l*=c,n=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=s*s*o+i,t[1]=a*s*o+l*n,t[2]=l*s*o-a*n,t[3]=0,t[4]=s*a*o-l*n,t[5]=a*a*o+i,t[6]=l*a*o+s*n,t[7]=0,t[8]=s*l*o+a*n,t[9]=a*l*o-s*n,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Qd(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tp(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ep(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function rp(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=n+n,l=i+i,c=o+o,u=n*a,h=n*l,f=n*c,d=i*l,p=i*c,m=o*c,g=s*a,y=s*l,_=s*c;return t[0]=1-(d+m),t[1]=h+_,t[2]=f-y,t[3]=0,t[4]=h-_,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=f+y,t[9]=p-g,t[10]=1-(u+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function np(t,e){var r=new kd.ARRAY_TYPE(3),n=-e[0],i=-e[1],o=-e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=n*n+i*i+o*o+s*s;return h>0?(r[0]=2*(a*s+u*n+l*o-c*i)/h,r[1]=2*(l*s+u*i+c*n-a*o)/h,r[2]=2*(c*s+u*o+a*i-l*n)/h):(r[0]=2*(a*s+u*n+l*o-c*i),r[1]=2*(l*s+u*i+c*n-a*o),r[2]=2*(c*s+u*o+a*i-l*n)),rp(t,e,r),t}function ip(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function op(t,e){var r=e[0],n=e[1],i=e[2],o=e[4],s=e[5],a=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.hypot(r,n,i),t[1]=Math.hypot(o,s,a),t[2]=Math.hypot(l,c,u),t}function sp(t,e){var r=new kd.ARRAY_TYPE(3);op(r,e);var n=1/r[0],i=1/r[1],o=1/r[2],s=e[0]*n,a=e[1]*i,l=e[2]*o,c=e[4]*n,u=e[5]*i,h=e[6]*o,f=e[8]*n,d=e[9]*i,p=e[10]*o,m=s+u+p,g=0;return m>0?(g=2*Math.sqrt(m+1),t[3]=.25*g,t[0]=(h-d)/g,t[1]=(f-l)/g,t[2]=(a-c)/g):s>u&&s>p?(g=2*Math.sqrt(1+s-u-p),t[3]=(h-d)/g,t[0]=.25*g,t[1]=(a+c)/g,t[2]=(f+l)/g):u>p?(g=2*Math.sqrt(1+u-s-p),t[3]=(f-l)/g,t[0]=(a+c)/g,t[1]=.25*g,t[2]=(h+d)/g):(g=2*Math.sqrt(1+p-s-u),t[3]=(a-c)/g,t[0]=(f+l)/g,t[1]=(h+d)/g,t[2]=.25*g),t}function ap(t,e,r,n){var i=e[0],o=e[1],s=e[2],a=e[3],l=i+i,c=o+o,u=s+s,h=i*l,f=i*c,d=i*u,p=o*c,m=o*u,g=s*u,
2y=a*l,_=a*c,v=a*u,b=n[0],x=n[1],w=n[2];return t[0]=(1-(p+g))*b,t[1]=(f+v)*b,t[2]=(d-_)*b,t[3]=0,t[4]=(f-v)*x,t[5]=(1-(h+g))*x,t[6]=(m+y)*x,t[7]=0,t[8]=(d+_)*w,t[9]=(m-y)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function lp(t,e,r,n,i){var o=e[0],s=e[1],a=e[2],l=e[3],c=o+o,u=s+s,h=a+a,f=o*c,d=o*u,p=o*h,m=s*u,g=s*h,y=a*h,_=l*c,v=l*u,b=l*h,x=n[0],w=n[1],E=n[2],S=i[0],T=i[1],A=i[2],O=(1-(m+y))*x,C=(d+b)*x,M=(p-v)*x,k=(d-b)*w,I=(1-(f+y))*w,P=(g+_)*w,L=(p+v)*E,R=(g-_)*E,D=(1-(f+m))*E;return t[0]=O,t[1]=C,t[2]=M,t[3]=0,t[4]=k,t[5]=I,t[6]=P,t[7]=0,t[8]=L,t[9]=R,t[10]=D,t[11]=0,t[12]=r[0]+S-(O*S+k*T+L*A),t[13]=r[1]+T-(C*S+I*T+R*A),t[14]=r[2]+A-(M*S+P*T+D*A),t[15]=1,t}function cp(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,l=i+i,c=r*s,u=n*s,h=n*a,f=i*s,d=i*a,p=i*l,m=o*s,g=o*a,y=o*l;return t[0]=1-h-p,t[1]=u+y,t[2]=f-g,t[3]=0,t[4]=u-y,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function up(t,e,r,n,i,o,s){var a=1/(r-e),l=1/(i-n),c=1/(o-s);return t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(i+n)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t}function hp(t,e,r,n,i){var o,s=1/Math.tan(e/2);return t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n),t}var fp=hp;function dp(t,e,r,n,i){var o,s=1/Math.tan(e/2);return t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=i*o,t[14]=i*n*o):(t[10]=-1,t[14]=-n),t}function pp(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+a),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-a)*l*.5,t[9]=(i-o)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}function mp(t,e,r,n,i,o,s){var a=1/(e-r),l=1/(n-i),c=1/(o-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*l,t[14]=(s+o)*c,t[15]=1,t}Cd.perspective=fp;var gp=mp;function yp(t,e,r,n,i,o,s){var a=1/(e-r),l=1/(n-i),c=1/(o-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*l,t[14]=o*c,t[15]=1,t}function _p(t,e,r,n){var i,o,s,a,l,c,u,h,f,d,p=e[0],m=e[1],g=e[2],y=n[0],_=n[1],v=n[2],b=r[0],x=r[1],w=r[2];return Math.abs(p-b)<kd.EPSILON&&Math.abs(m-x)<kd.EPSILON&&Math.abs(g-w)<kd.EPSILON?jd(t):(u=p-b,h=m-x,f=g-w,i=_*(f*=d=1/Math.hypot(u,h,f))-v*(h*=d),o=v*(u*=d)-y*f,s=y*h-_*u,(d=Math.hypot(i,o,s))?(i*=d=1/d,o*=d,s*=d):(i=0,o=0,s=0),a=h*s-f*o,l=f*i-u*s,c=u*o-h*i,(d=Math.hypot(a,l,c))?(a*=d=1/d,l*=d,c*=d):(a=0,l=0,c=0),t[0]=i,t[1]=a,t[2]=u,t[3]=0,t[4]=o,t[5]=l,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*m+s*g),t[13]=-(a*p+l*m+c*g),t[14]=-(u*p+h*m+f*g),t[15]=1,t)}function vp(t,e,r,n){var i=e[0],o=e[1],s=e[2],a=n[0],l=n[1],c=n[2],u=i-r[0],h=o-r[1],f=s-r[2],d=u*u+h*h+f*f;d>0&&(u*=d=1/Math.sqrt(d),h*=d,f*=d);var p=l*f-c*h,m=c*u-a*f,g=a*h-l*u;return(d=p*p+m*m+g*g)>0&&(p*=d=1/Math.sqrt(d),m*=d,g*=d),t[0]=p,t[1]=m,t[2]=g,t[3]=0,t[4]=h*g-f*m,t[5]=f*p-u*g,t[6]=u*m-h*p,t[7]=0,t[8]=u,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=s,t[15]=1,t}function bp(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function xp(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function wp(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t}function Ep(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function Sp(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t}function Tp(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11
2]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t}function Ap(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Op(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],m=t[13],g=t[14],y=t[15],_=e[0],v=e[1],b=e[2],x=e[3],w=e[4],E=e[5],S=e[6],T=e[7],A=e[8],O=e[9],C=e[10],M=e[11],k=e[12],I=e[13],P=e[14],L=e[15];return Math.abs(r-_)<=kd.EPSILON*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(n-v)<=kd.EPSILON*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(i-b)<=kd.EPSILON*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=kd.EPSILON*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(s-w)<=kd.EPSILON*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(a-E)<=kd.EPSILON*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-S)<=kd.EPSILON*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(c-T)<=kd.EPSILON*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(u-A)<=kd.EPSILON*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(h-O)<=kd.EPSILON*Math.max(1,Math.abs(h),Math.abs(O))&&Math.abs(f-C)<=kd.EPSILON*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(d-M)<=kd.EPSILON*Math.max(1,Math.abs(d),Math.abs(M))&&Math.abs(p-k)<=kd.EPSILON*Math.max(1,Math.abs(p),Math.abs(k))&&Math.abs(m-I)<=kd.EPSILON*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-P)<=kd.EPSILON*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-L)<=kd.EPSILON*Math.max(1,Math.abs(y),Math.abs(L))}Cd.ortho=gp;var Cp=Vd;Cd.mul=Cp;var Mp=Ep;Cd.sub=Mp;var kp={},Ip={};function Pp(t){return Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pp(t)}Object.defineProperty(Ip,"__esModule",{value:!0}),Ip.create=zp,Ip.clone=Bp,Ip.length=jp,Ip.fromValues=Fp,Ip.copy=Np,Ip.set=$p,Ip.add=Up,Ip.subtract=Vp,Ip.multiply=Gp,Ip.divide=qp,Ip.ceil=Hp,Ip.floor=Wp,Ip.min=Zp,Ip.max=Xp,Ip.round=Yp,Ip.scale=Kp,Ip.scaleAndAdd=Jp,Ip.distance=Qp,Ip.squaredDistance=tm,Ip.squaredLength=em,Ip.negate=rm,Ip.inverse=nm,Ip.normalize=im,Ip.dot=om,Ip.cross=sm,Ip.lerp=am,Ip.hermite=lm,Ip.bezier=cm,Ip.random=um,Ip.transformMat4=hm,Ip.transformMat3=fm,Ip.transformQuat=dm,Ip.rotateX=pm,Ip.rotateY=mm,Ip.rotateZ=gm,Ip.angle=ym,Ip.zero=_m,Ip.str=vm,Ip.exactEquals=bm,Ip.equals=xm,Ip.forEach=Ip.sqrLen=Ip.len=Ip.sqrDist=Ip.dist=Ip.div=Ip.mul=Ip.sub=void 0;var Lp=Dp(Mh);function Rp(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Rp=function(t){return t?r:e})(t)}function Dp(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==Pp(t)&&"function"!=typeof t)return{default:t};var r=Rp(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function zp(){var t=new Lp.ARRAY_TYPE(3);return Lp.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Bp(t){var e=new Lp.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function jp(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function Fp(t,e,r){var n=new Lp.ARRAY_TYPE(3);return n[0]=t,n[1]=e,n[2]=r,n}function Np(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function $p(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function Up(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function Vp(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function Gp(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function qp(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function Hp(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Wp(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Zp(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function Xp(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function Yp(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function Kp(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function Jp(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function Qp(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.hypot(r,n,i)}function tm(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}function em(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function rm(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function nm(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function im(t,e){var r=e[0],n=e[1],i=e[2],o=r*r+n*n+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function om(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function sm(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],l=r[2];return t[0]=i*l-o*a,t[1]=o*s-n*l,t[2]=n*a-i*s,t}function am(t,e,r,n){var i=e[0],o=e[1],s=e[2];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=s+n*(r[2]-s),t}function lm(t,e,r,n,i,o){var s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return t[0]=e[0]*a+r[0]*l+n[0]*c+i[0]*u,t[1]=e[1]*a+r[1]*l+n[1]*c+i[1]*u,t[2]=e[2]*a+r[2]*l+n[2]*c+i[2]*u,t}function cm(t,e,r,n,i,o){var s=1-o,a=s*s,l=o*o,c=a*s,u=3*o*a,h=3*l*s,f=l*o;return t[0]=e[0]*c+r[0]*u+n[0]*h+i[0]*f,t[1]=e[1]*c+r[1]*u+n[1]*h+i[1]*f,t[2]=e[2]*c+r[2]*u+n[2]*h+i[2]*f,t}function um(t,e){e=e||1;var r=2*Lp.RANDOM()*Math.PI,n=2*Lp.RANDOM()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}function hm(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o+r[15];return s=s||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/s,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/s,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/s,t}function fm(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}function dm(t,e,r){var n=r[0],i=r[1],o=r[2],s=r[3],a=e[0],l=e[1],c=e[2],u=i*c-o*l,h=o*a-n*c,f=n*l-i*a,d=i*f-o*h,p=o*u-n*f,m=n*h-i*u,g=2*s;return u*=g,h*=g,f*=g,d*=2,p*=2,m*=2,t[0]=a+u+d,t[1]=l+h+p,t[2]=c+f+m,t}function pm(t,e,r,n){var i=[],o=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*
2Math.cos(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2],t}function mm(t,e,r,n){var i=[],o=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2],t}function gm(t,e,r,n){var i=[],o=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2],t}function ym(t,e){var r=t[0],n=t[1],i=t[2],o=e[0],s=e[1],a=e[2],l=Math.sqrt(r*r+n*n+i*i)*Math.sqrt(o*o+s*s+a*a),c=l&&om(t,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}function _m(t){return t[0]=0,t[1]=0,t[2]=0,t}function vm(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function bm(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function xm(t,e){var r=t[0],n=t[1],i=t[2],o=e[0],s=e[1],a=e[2];return Math.abs(r-o)<=Lp.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=Lp.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-a)<=Lp.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))}var wm=Vp;Ip.sub=wm;var Em=Gp;Ip.mul=Em;var Sm=qp;Ip.div=Sm;var Tm=Qp;Ip.dist=Tm;var Am=tm;Ip.sqrDist=Am;var Om=jp;Ip.len=Om;var Cm=em;Ip.sqrLen=Cm;var Mm,km=(Mm=zp(),function(t,e,r,n,i,o){var s,a;for(e||(e=3),r||(r=0),a=n?Math.min(n*e+r,t.length):t.length,s=r;s<a;s+=e)Mm[0]=t[s],Mm[1]=t[s+1],Mm[2]=t[s+2],i(Mm,Mm,o),t[s]=Mm[0],t[s+1]=Mm[1],t[s+2]=Mm[2];return t});Ip.forEach=km;var Im={};function Pm(t){return Pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(t)}Object.defineProperty(Im,"__esModule",{value:!0}),Im.create=zm,Im.clone=Bm,Im.fromValues=jm,Im.copy=Fm,Im.set=Nm,Im.add=$m,Im.subtract=Um,Im.multiply=Vm,Im.divide=Gm,Im.ceil=qm,Im.floor=Hm,Im.min=Wm,Im.max=Zm,Im.round=Xm,Im.scale=Ym,Im.scaleAndAdd=Km,Im.distance=Jm,Im.squaredDistance=Qm,Im.length=tg,Im.squaredLength=eg,Im.negate=rg,Im.inverse=ng,Im.normalize=ig,Im.dot=og,Im.cross=sg,Im.lerp=ag,Im.random=lg,Im.transformMat4=cg,Im.transformQuat=ug,Im.zero=hg,Im.str=fg,Im.exactEquals=dg,Im.equals=pg,Im.forEach=Im.sqrLen=Im.len=Im.sqrDist=Im.dist=Im.div=Im.mul=Im.sub=void 0;var Lm=Dm(Mh);function Rm(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Rm=function(t){return t?r:e})(t)}function Dm(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==Pm(t)&&"function"!=typeof t)return{default:t};var r=Rm(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function zm(){var t=new Lm.ARRAY_TYPE(4);return Lm.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Bm(t){var e=new Lm.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function jm(t,e,r,n){var i=new Lm.ARRAY_TYPE(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}function Fm(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Nm(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function $m(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function Um(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}function Vm(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}function Gm(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}function qm(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Hm(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function Wm(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}function Zm(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}function Xm(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function Ym(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function Km(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}function Jm(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(r,n,i,o)}function Qm(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}function tg(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.hypot(e,r,n,i)}function eg(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}function rg(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function ng(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function ig(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=n*s,t[2]=i*s,t[3]=o*s,t}function og(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function sg(t,e,r,n){var i=r[0]*n[1]-r[1]*n[0],o=r[0]*n[2]-r[2]*n[0],s=r[0]*n[3]-r[3]*n[0],a=r[1]*n[2]-r[2]*n[1],l=r[1]*n[3]-r[3]*n[1],c=r[2]*n[3]-r[3]*n[2],u=e[0],h=e[1],f=e[2],d=e[3];
2return t[0]=h*c-f*l+d*a,t[1]=-u*c+f*s-d*o,t[2]=u*l-h*s+d*i,t[3]=-u*a+h*o-f*i,t}function ag(t,e,r,n){var i=e[0],o=e[1],s=e[2],a=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=s+n*(r[2]-s),t[3]=a+n*(r[3]-a),t}function lg(t,e){var r,n,i,o,s,a;e=e||1;do{s=(r=2*Lm.RANDOM()-1)*r+(n=2*Lm.RANDOM()-1)*n}while(s>=1);do{a=(i=2*Lm.RANDOM()-1)*i+(o=2*Lm.RANDOM()-1)*o}while(a>=1);var l=Math.sqrt((1-s)/a);return t[0]=e*r,t[1]=e*n,t[2]=e*i*l,t[3]=e*o*l,t}function cg(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,t}function ug(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],l=r[2],c=r[3],u=c*n+a*o-l*i,h=c*i+l*n-s*o,f=c*o+s*i-a*n,d=-s*n-a*i-l*o;return t[0]=u*c+d*-s+h*-l-f*-a,t[1]=h*c+d*-a+f*-s-u*-l,t[2]=f*c+d*-l+u*-a-h*-s,t[3]=e[3],t}function hg(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function fg(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function dg(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function pg(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=e[0],a=e[1],l=e[2],c=e[3];return Math.abs(r-s)<=Lm.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-a)<=Lm.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-l)<=Lm.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=Lm.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))}var mg=Um;Im.sub=mg;var gg=Vm;Im.mul=gg;var yg=Gm;Im.div=yg;var _g=Jm;Im.dist=_g;var vg=Qm;Im.sqrDist=vg;var bg=tg;Im.len=bg;var xg=eg;Im.sqrLen=xg;var wg=function(){var t=zm();return function(e,r,n,i,o,s){var a,l;for(r||(r=4),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,a=n;a<l;a+=r)t[0]=e[a],t[1]=e[a+1],t[2]=e[a+2],t[3]=e[a+3],o(t,t,s),e[a]=t[0],e[a+1]=t[1],e[a+2]=t[2],e[a+3]=t[3];return e}}();function Eg(t){return Eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eg(t)}Im.forEach=wg,Object.defineProperty(kp,"__esModule",{value:!0}),kp.create=kg,kp.identity=Ig,kp.setAxisAngle=Pg,kp.getAxisAngle=Lg,kp.getAngle=Rg,kp.multiply=Dg,kp.rotateX=zg,kp.rotateY=Bg,kp.rotateZ=jg,kp.calculateW=Fg,kp.exp=Ng,kp.ln=$g,kp.pow=Ug,kp.slerp=Vg,kp.random=Gg,kp.invert=qg,kp.conjugate=Hg,kp.fromMat3=Wg,kp.fromEuler=Zg,kp.str=Xg,kp.setAxes=kp.sqlerp=kp.rotationTo=kp.equals=kp.exactEquals=kp.normalize=kp.sqrLen=kp.squaredLength=kp.len=kp.length=kp.lerp=kp.dot=kp.scale=kp.mul=kp.add=kp.set=kp.copy=kp.fromValues=kp.clone=void 0;var Sg=Mg(Mh),Tg=Mg(qf),Ag=Mg(Ip),Og=Mg(Im);function Cg(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Cg=function(t){return t?r:e})(t)}function Mg(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==Eg(t)&&"function"!=typeof t)return{default:t};var r=Cg(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function kg(){var t=new Sg.ARRAY_TYPE(4);return Sg.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Ig(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Pg(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function Lg(t,e){var r=2*Math.acos(e[3]),n=Math.sin(r/2);return n>Sg.EPSILON?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r}function Rg(t,e){var r=ny(t,e);return Math.acos(2*r*r-1)}function Dg(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],l=r[1],c=r[2],u=r[3];return t[0]=n*u+s*a+i*c-o*l,t[1]=i*u+s*l+o*a-n*c,t[2]=o*u+s*c+n*l-i*a,t[3]=s*u-n*a-i*l-o*c,t}function zg(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),l=Math.cos(r);return t[0]=n*l+s*a,t[1]=i*l+o*a,t[2]=o*l-i*a,t[3]=s*l-n*a,t}function Bg(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),l=Math.cos(r);return t[0]=n*l-o*a,t[1]=i*l+s*a,t[2]=o*l+n*a,t[3]=s*l-i*a,t}function jg(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*a,t[1]=i*l-n*a,t[2]=o*l+s*a,t[3]=s*l-o*a,t}function Fg(t,e){var r=e[0],n=e[1],i=e[2];return t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),t}function Ng(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=Math.sqrt(r*r+n*n+i*i),a=Math.exp(o),l=s>0?a*Math.sin(s)/s:0;return t[0]=r*l,t[1]=n*l,t[2]=i*l,t[3]=a*Math.cos(s),t}function $g(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=Math.sqrt(r*r+n*n+i*i),a=s>0?Math.atan2(s,o)/s:0;return t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=.5*Math.log(r*r+n*n+i*i+o*o),t}function Ug(t,e,r){return $g(t,e),ry(t,t,r),Ng(t,t),t}function Vg(t,e,r,n){var i,o,s,a,l,c=e[0],u=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return(o=c*d+u*p+h*m+f*g)<0&&(o=-o,d=-d,p=-p,m=-m,g=-g),1-o>Sg.EPSILON?(i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-n)*i)/s,l=Math.sin(n*i)/s):(a=1-n,l=n),t[0]=a*c+l*d,t[1]=a*u+l*p,t[2]=a*h+l*m,t[3]=a*f+l*g,t}function Gg(t){var e=Sg.RANDOM(),r=Sg.RANDOM(),n=Sg.RANDOM(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t}function qg(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o,a=s?1/s:0;return t[0]=-r*a,t[1]=-n*a,t[2]=-i*a,t[3]=o*a,t}function Hg(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Wg(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*s+s]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*o+s]-e[3*s+o])*r,t[o]=(e[3*o+i]+e[3*i+o])*r,t[s]=(e[3*s+i]+e[3*i+s])*r}return t}function Zg(t,e,r,n){var i=.5*Math.PI/180;e*=i,r*=i,n*=i;var o=Math.sin(e),s=Math.cos(e),a=Math.sin(r),l=Math.cos(r),c=Math.sin(n),u=Math.cos(n);return t[0]=o*l*u-s*a*c,t[1]=s*a*u+o*l*c,t[2]=s*l*c-o*a*u,t[3]=s*l*u+o*a*c,t}function Xg(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Yg=Og.clone;kp.clone=Yg;var Kg=Og.fromValues;kp.fromValues=Kg;var Jg=Og.copy;kp.copy=Jg;var Qg=Og.set;kp.set=Qg;var ty=Og.add;kp.add=ty;var ey=Dg;kp.mul=ey;var ry=Og.scale;kp.scale=ry;var ny=Og.dot;kp.dot=ny;var iy=Og.lerp;kp.lerp=iy;var oy=Og.length;kp.length=oy;var sy=oy;kp.len=sy;var ay=Og.squaredLength;kp.squaredLength=ay;var ly=ay;kp.sqrLen=ly;var cy=Og.normalize;kp.normalize=cy;var uy=Og.exactEquals;kp.exactEquals=uy;var hy=Og.equals;kp.equals=hy;var fy,dy,py,my=(fy=Ag.create(),dy=Ag.fromValues(1,0,0),py=Ag.fromValues(0,1,0),function(t,e,r){var n=Ag.dot(e,r);return n<-.999999?(Ag.cross(fy,dy,e),Ag.len(fy)<1e-6&&Ag.cross(fy,py,e),Ag.normalize(fy,fy),Pg(t,fy,Math.PI),t):n>
2.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Ag.cross(fy,e,r),t[0]=fy[0],t[1]=fy[1],t[2]=fy[2],t[3]=1+n,cy(t,t))});kp.rotationTo=my;var gy,yy,_y=(gy=kg(),yy=kg(),function(t,e,r,n,i,o){return Vg(gy,e,i,o),Vg(yy,r,n,o),Vg(t,gy,yy,2*o*(1-o)),t});kp.sqlerp=_y;var vy,by=(vy=Tg.create(),function(t,e,r,n){return vy[0]=r[0],vy[3]=r[1],vy[6]=r[2],vy[1]=n[0],vy[4]=n[1],vy[7]=n[2],vy[2]=-e[0],vy[5]=-e[1],vy[8]=-e[2],cy(t,Wg(t,vy))});kp.setAxes=by;var xy={};function wy(t){return wy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wy(t)}Object.defineProperty(xy,"__esModule",{value:!0}),xy.create=Cy,xy.clone=My,xy.fromValues=ky,xy.fromRotationTranslationValues=Iy,xy.fromRotationTranslation=Py,xy.fromTranslation=Ly,xy.fromRotation=Ry,xy.fromMat4=Dy,xy.copy=zy,xy.identity=By,xy.set=jy,xy.getDual=Ny,xy.setDual=Uy,xy.getTranslation=Vy,xy.translate=Gy,xy.rotateX=qy,xy.rotateY=Hy,xy.rotateZ=Wy,xy.rotateByQuatAppend=Zy,xy.rotateByQuatPrepend=Xy,xy.rotateAroundAxis=Yy,xy.add=Ky,xy.multiply=Jy,xy.scale=t_,xy.lerp=r_,xy.invert=n_,xy.conjugate=i_,xy.normalize=c_,xy.str=u_,xy.exactEquals=h_,xy.equals=f_,xy.sqrLen=xy.squaredLength=xy.len=xy.length=xy.dot=xy.mul=xy.setReal=xy.getReal=void 0;var Ey=Oy(Mh),Sy=Oy(kp),Ty=Oy(Cd);function Ay(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Ay=function(t){return t?r:e})(t)}function Oy(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==wy(t)&&"function"!=typeof t)return{default:t};var r=Ay(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function Cy(){var t=new Ey.ARRAY_TYPE(8);return Ey.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0),t[3]=1,t}function My(t){var e=new Ey.ARRAY_TYPE(8);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function ky(t,e,r,n,i,o,s,a){var l=new Ey.ARRAY_TYPE(8);return l[0]=t,l[1]=e,l[2]=r,l[3]=n,l[4]=i,l[5]=o,l[6]=s,l[7]=a,l}function Iy(t,e,r,n,i,o,s){var a=new Ey.ARRAY_TYPE(8);a[0]=t,a[1]=e,a[2]=r,a[3]=n;var l=.5*i,c=.5*o,u=.5*s;return a[4]=l*n+c*r-u*e,a[5]=c*n+u*t-l*r,a[6]=u*n+l*e-c*t,a[7]=-l*t-c*e-u*r,a}function Py(t,e,r){var n=.5*r[0],i=.5*r[1],o=.5*r[2],s=e[0],a=e[1],l=e[2],c=e[3];return t[0]=s,t[1]=a,t[2]=l,t[3]=c,t[4]=n*c+i*l-o*a,t[5]=i*c+o*s-n*l,t[6]=o*c+n*a-i*s,t[7]=-n*s-i*a-o*l,t}function Ly(t,e){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*e[0],t[5]=.5*e[1],t[6]=.5*e[2],t[7]=0,t}function Ry(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t}function Dy(t,e){var r=Sy.create();Ty.getRotation(r,e);var n=new Ey.ARRAY_TYPE(3);return Ty.getTranslation(n,e),Py(t,r,n),t}function zy(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function By(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t}function jy(t,e,r,n,i,o,s,a,l){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=s,t[6]=a,t[7]=l,t}var Fy=Sy.copy;function Ny(t,e){return t[0]=e[4],t[1]=e[5],t[2]=e[6],t[3]=e[7],t}xy.getReal=Fy;var $y=Sy.copy;function Uy(t,e){return t[4]=e[0],t[5]=e[1],t[6]=e[2],t[7]=e[3],t}function Vy(t,e){var r=e[4],n=e[5],i=e[6],o=e[7],s=-e[0],a=-e[1],l=-e[2],c=e[3];return t[0]=2*(r*c+o*s+n*l-i*a),t[1]=2*(n*c+o*a+i*s-r*l),t[2]=2*(i*c+o*l+r*a-n*s),t}function Gy(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=.5*r[0],l=.5*r[1],c=.5*r[2],u=e[4],h=e[5],f=e[6],d=e[7];return t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=s*a+i*c-o*l+u,t[5]=s*l+o*a-n*c+h,t[6]=s*c+n*l-i*a+f,t[7]=-n*a-i*l-o*c+d,t}function qy(t,e,r){var n=-e[0],i=-e[1],o=-e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=a*s+u*n+l*o-c*i,f=l*s+u*i+c*n-a*o,d=c*s+u*o+a*i-l*n,p=u*s-a*n-l*i-c*o;return Sy.rotateX(t,e,r),n=t[0],i=t[1],o=t[2],s=t[3],t[4]=h*s+p*n+f*o-d*i,t[5]=f*s+p*i+d*n-h*o,t[6]=d*s+p*o+h*i-f*n,t[7]=p*s-h*n-f*i-d*o,t}function Hy(t,e,r){var n=-e[0],i=-e[1],o=-e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=a*s+u*n+l*o-c*i,f=l*s+u*i+c*n-a*o,d=c*s+u*o+a*i-l*n,p=u*s-a*n-l*i-c*o;return Sy.rotateY(t,e,r),n=t[0],i=t[1],o=t[2],s=t[3],t[4]=h*s+p*n+f*o-d*i,t[5]=f*s+p*i+d*n-h*o,t[6]=d*s+p*o+h*i-f*n,t[7]=p*s-h*n-f*i-d*o,t}function Wy(t,e,r){var n=-e[0],i=-e[1],o=-e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=a*s+u*n+l*o-c*i,f=l*s+u*i+c*n-a*o,d=c*s+u*o+a*i-l*n,p=u*s-a*n-l*i-c*o;return Sy.rotateZ(t,e,r),n=t[0],i=t[1],o=t[2],s=t[3],t[4]=h*s+p*n+f*o-d*i,t[5]=f*s+p*i+d*n-h*o,t[6]=d*s+p*o+h*i-f*n,t[7]=p*s-h*n-f*i-d*o,t}function Zy(t,e,r){var n=r[0],i=r[1],o=r[2],s=r[3],a=e[0],l=e[1],c=e[2],u=e[3];return t[0]=a*s+u*n+l*o-c*i,t[1]=l*s+u*i+c*n-a*o,t[2]=c*s+u*o+a*i-l*n,t[3]=u*s-a*n-l*i-c*o,a=e[4],l=e[5],c=e[6],u=e[7],t[4]=a*s+u*n+l*o-c*i,t[5]=l*s+u*i+c*n-a*o,t[6]=c*s+u*o+a*i-l*n,t[7]=u*s-a*n-l*i-c*o,t}function Xy(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],l=r[1],c=r[2],u=r[3];
2return t[0]=n*u+s*a+i*c-o*l,t[1]=i*u+s*l+o*a-n*c,t[2]=o*u+s*c+n*l-i*a,t[3]=s*u-n*a-i*l-o*c,a=r[4],l=r[5],c=r[6],u=r[7],t[4]=n*u+s*a+i*c-o*l,t[5]=i*u+s*l+o*a-n*c,t[6]=o*u+s*c+n*l-i*a,t[7]=s*u-n*a-i*l-o*c,t}function Yy(t,e,r,n){if(Math.abs(n)<Ey.EPSILON)return zy(t,e);var i=Math.hypot(r[0],r[1],r[2]);n*=.5;var o=Math.sin(n),s=o*r[0]/i,a=o*r[1]/i,l=o*r[2]/i,c=Math.cos(n),u=e[0],h=e[1],f=e[2],d=e[3];t[0]=u*c+d*s+h*l-f*a,t[1]=h*c+d*a+f*s-u*l,t[2]=f*c+d*l+u*a-h*s,t[3]=d*c-u*s-h*a-f*l;var p=e[4],m=e[5],g=e[6],y=e[7];return t[4]=p*c+y*s+m*l-g*a,t[5]=m*c+y*a+g*s-p*l,t[6]=g*c+y*l+p*a-m*s,t[7]=y*c-p*s-m*a-g*l,t}function Ky(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t}function Jy(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[4],l=r[5],c=r[6],u=r[7],h=e[4],f=e[5],d=e[6],p=e[7],m=r[0],g=r[1],y=r[2],_=r[3];return t[0]=n*_+s*m+i*y-o*g,t[1]=i*_+s*g+o*m-n*y,t[2]=o*_+s*y+n*g-i*m,t[3]=s*_-n*m-i*g-o*y,t[4]=n*u+s*a+i*c-o*l+h*_+p*m+f*y-d*g,t[5]=i*u+s*l+o*a-n*c+f*_+p*g+d*m-h*y,t[6]=o*u+s*c+n*l-i*a+d*_+p*y+h*g-f*m,t[7]=s*u-n*a-i*l-o*c+p*_-h*m-f*g-d*y,t}xy.setReal=$y;var Qy=Jy;function t_(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t}xy.mul=Qy;var e_=Sy.dot;function r_(t,e,r,n){var i=1-n;return e_(e,r)<0&&(n=-n),t[0]=e[0]*i+r[0]*n,t[1]=e[1]*i+r[1]*n,t[2]=e[2]*i+r[2]*n,t[3]=e[3]*i+r[3]*n,t[4]=e[4]*i+r[4]*n,t[5]=e[5]*i+r[5]*n,t[6]=e[6]*i+r[6]*n,t[7]=e[7]*i+r[7]*n,t}function n_(t,e){var r=a_(e);return t[0]=-e[0]/r,t[1]=-e[1]/r,t[2]=-e[2]/r,t[3]=e[3]/r,t[4]=-e[4]/r,t[5]=-e[5]/r,t[6]=-e[6]/r,t[7]=e[7]/r,t}function i_(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=e[7],t}xy.dot=e_;var o_=Sy.length;xy.length=o_;var s_=o_;xy.len=s_;var a_=Sy.squaredLength;xy.squaredLength=a_;var l_=a_;function c_(t,e){var r=a_(e);if(r>0){r=Math.sqrt(r);var n=e[0]/r,i=e[1]/r,o=e[2]/r,s=e[3]/r,a=e[4],l=e[5],c=e[6],u=e[7],h=n*a+i*l+o*c+s*u;t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=(a-n*h)/r,t[5]=(l-i*h)/r,t[6]=(c-o*h)/r,t[7]=(u-s*h)/r}return t}function u_(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"}function h_(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]}function f_(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=e[0],h=e[1],f=e[2],d=e[3],p=e[4],m=e[5],g=e[6],y=e[7];return Math.abs(r-u)<=Ey.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-h)<=Ey.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(i-f)<=Ey.EPSILON*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-d)<=Ey.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(s-p)<=Ey.EPSILON*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(a-m)<=Ey.EPSILON*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(l-g)<=Ey.EPSILON*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(c-y)<=Ey.EPSILON*Math.max(1,Math.abs(c),Math.abs(y))}xy.sqrLen=l_;var d_={};function p_(t){return p_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p_(t)}Object.defineProperty(d_,"__esModule",{value:!0}),d_.create=__,d_.clone=v_,d_.fromValues=b_,d_.copy=x_,d_.set=w_,d_.add=E_,d_.subtract=S_,d_.multiply=T_,d_.divide=A_,d_.ceil=O_,d_.floor=C_,d_.min=M_,d_.max=k_,d_.round=I_,d_.scale=P_,d_.scaleAndAdd=L_,d_.distance=R_,d_.squaredDistance=D_,d_.length=z_,d_.squaredLength=B_,d_.negate=j_,d_.inverse=F_,d_.normalize=N_,d_.dot=$_,d_.cross=U_,d_.lerp=V_,d_.random=G_,d_.transformMat2=q_,d_.transformMat2d=H_,d_.transformMat3=W_,d_.transformMat4=Z_,d_.rotate=X_,d_.angle=Y_,d_.zero=K_,d_.str=J_,d_.exactEquals=Q_,d_.equals=tv,d_.forEach=d_.sqrLen=d_.sqrDist=d_.dist=d_.div=d_.mul=d_.sub=d_.len=void 0;var m_=y_(Mh);function g_(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(g_=function(t){return t?r:e})(t)}function y_(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==p_(t)&&"function"!=typeof t)return{default:t};var r=g_(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;
2s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function __(){var t=new m_.ARRAY_TYPE(2);return m_.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function v_(t){var e=new m_.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e}function b_(t,e){var r=new m_.ARRAY_TYPE(2);return r[0]=t,r[1]=e,r}function x_(t,e){return t[0]=e[0],t[1]=e[1],t}function w_(t,e,r){return t[0]=e,t[1]=r,t}function E_(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function S_(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function T_(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function A_(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function O_(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function C_(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function M_(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function k_(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}function I_(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function P_(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function L_(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t}function R_(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.hypot(r,n)}function D_(t,e){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function z_(t){var e=t[0],r=t[1];return Math.hypot(e,r)}function B_(t){var e=t[0],r=t[1];return e*e+r*r}function j_(t,e){return t[0]=-e[0],t[1]=-e[1],t}function F_(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function N_(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function $_(t,e){return t[0]*e[0]+t[1]*e[1]}function U_(t,e,r){var n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t}function V_(t,e,r,n){var i=e[0],o=e[1];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t}function G_(t,e){e=e||1;var r=2*m_.RANDOM()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t}function q_(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t}function H_(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function W_(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t}function Z_(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t}function X_(t,e,r,n){var i=e[0]-r[0],o=e[1]-r[1],s=Math.sin(n),a=Math.cos(n);return t[0]=i*a-o*s+r[0],t[1]=i*s+o*a+r[1],t}function Y_(t,e){var r=t[0],n=t[1],i=e[0],o=e[1],s=Math.sqrt(r*r+n*n)*Math.sqrt(i*i+o*o),a=s&&(r*i+n*o)/s;return Math.acos(Math.min(Math.max(a,-1),1))}function K_(t){return t[0]=0,t[1]=0,t}function J_(t){return"vec2("+t[0]+", "+t[1]+")"}function Q_(t,e){return t[0]===e[0]&&t[1]===e[1]}function tv(t,e){var r=t[0],n=t[1],i=e[0],o=e[1];return Math.abs(r-i)<=m_.EPSILON*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-o)<=m_.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))}var ev=z_;d_.len=ev;var rv=S_;d_.sub=rv;var nv=T_;d_.mul=nv;var iv=A_;d_.div=iv;var ov=R_;d_.dist=ov;var sv=D_;d_.sqrDist=sv;var av=B_;d_.sqrLen=av;var lv=function(){var t=__();return function(e,r,n,i,o,s){var a,l;for(r||(r=2),n||(n=0),l=i?Math.min(i*r+n,e.length):e.length,a=n;a<l;a+=r)t[0]=e[a],t[1]=e[a+1],o(t,t,s),e[a]=t[0],e[a+1]=t[1];return e}}();function cv(t){return cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cv(t)}d_.forEach=lv,Object.defineProperty(Ch,"__esModule",{value:!0});var uv=Ch.vec4=Sv=Ch.vec3=Ch.vec2=Ch.quat2=bv=Ch.quat=_v=Ch.mat4=gv=Ch.mat3=Ch.mat2d=dv=Ch.mat2=Ch.glMatrix=void 0,hv=Ov(Mh);Ch.glMatrix=hv;var fv=Ov(Bh),dv=Ch.mat2=fv,pv=Ov(mf);Ch.mat2d=pv;var mv=Ov(qf),gv=Ch.mat3=mv,yv=Ov(Cd),_v=Ch.mat4=yv,vv=Ov(kp),bv=Ch.quat=vv,xv=Ov(xy);Ch.quat2=xv;var wv=Ov(d_);Ch.vec2=wv;var Ev=Ov(Ip),Sv=Ch.vec3=Ev,Tv=Ov(Im);function Av(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(Av=function(t){return t?r:e})(t)}function Ov(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==cv(t)&&"function"!=typeof t)return{default:t};var r=Av(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;
2s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}uv=Ch.vec4=Tv;const Cv=Zc([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),{members:Mv,size:kv,alignment:Iv}=Cv,Pv=Zc([{name:"a_pos_3",components:3,type:"Int16"}]);var Lv=Zc([{name:"a_pos",type:"Int16",components:2}]),Rv={exports:{}};!function(t,e){!function(t,r){r(e)}(0,(function(t){function e(t,e,n,i,o,s){return s=s||{},t+"?"+["bbox="+r(n,i,o),"format="+(s.format||"image/png"),"service="+(s.service||"WMS"),"version="+(s.version||"1.1.1"),"request="+(s.request||"GetMap"),"srs="+(s.srs||"EPSG:3857"),"width="+(s.width||256),"height="+(s.height||256),"layers="+e].join("&")}function r(t,e,r){var i=n(256*t,256*(e=Math.pow(2,r)-e-1),r),o=n(256*(t+1),256*(e+1),r);return i[0]+","+i[1]+","+o[0]+","+o[1]}function n(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=e,t.getTileBBox=r,t.getMercCoords=n,Object.defineProperty(t,"__esModule",{value:!0})}))}(0,Rv.exports);var Dv=Rv.exports;class zv{constructor(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Fv(0,t,t,e,r)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e){const r=Dv.getTileBBox(this.x,this.y,this.z),n=Nv(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",n).replace("{bbox-epsg-3857}",r)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Bv{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Fv(t,e.z,e.z,e.x,e.y)}}class jv{constructor(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new zv(r,+n,+i),this.key=0===e&&t===r?this.canonical.key:Fv(e,t,r,n,i)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){const e=this.canonical.z-t;return t>this.canonical.z?new jv(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new jv(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}calculateScaledKey(t,e=!0){if(this.overscaledZ===t&&e)return this.key;if(t>this.canonical.z)return Fv(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y);{const r=this.canonical.z-t;return Fv(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)}}isChildOf(t){if(t.wrap!==this.wrap)return!1;const e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.z<this.canonical.z&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}children(t){if(this.overscaledZ>=t)return[new jv(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new jv(e,this.wrap,e,r,n),new jv(e,this.wrap,e,r+1,n),new jv(e,this.wrap,e,r,n+1),new jv(e,this.wrap,e,r+1,n+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new jv(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new jv(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Bv(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}}function Fv(t,e,r,n,i){const o=1<<Math.min(r,22);let s=o*(i%o)+n%o;return t&&r<22&&(s+=o*o*((t<0?-2*t-1:2*t)%(1<<2*(22-r)))),16*(32*s+r)+(e-r)}function Nv(t,e,r){let n,i="";for(let o=t;o>0;o--)n=1<<o-1,i+=(e&n?1:0)+(r&n?2:0);return i}const $v=[t=>{let e=t.canonical.x-1,r=t.wrap;return e<0&&(e=(1<<t.canonical.z)-1,r--),new jv(t.overscaledZ,r,t.canonical.z,e,t.canonical.y)},t=>{let e=t.canonical.x+1,r=t.wrap;return e===1<<t.canonical.z&&(e=0,r++),new jv(t.overscaledZ,r,t.canonical.z,e,t.canonical.y)},t=>new jv(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,(0===t.canonical.y?1<<t.canonical.z:t.canonical.y)-1),t=>new jv(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y===(1<<t.canonical.z)-1?0:t.canonical.y+1)];Vl(zv,"CanonicalTileID"),Vl(jv,"OverscaledTileID",{omit:["projMatrix","expandedProjMatrix"]});class Uv{constructor(t,e){this.pos=t,this.dir=e}intersectsPlane(t,e,r){const n=Sv.dot(e,this.dir);if(Math.abs(n)<1e-6)return!1;const i=((t[0]-this.pos[0])*e[0]+(t[1]-this.pos[1])*e[1]+(t[2]-this.pos[2])*e[2])/n;return r[0]=this.pos[0]+this.dir[0]*i,r[1]=this.pos[1]+this.dir[1]*i,r[2]=this.pos[2]+this.dir[2]*i,!0}closestPointOnSphere(t,e,r){if(Sv.equals(this.pos,t)||0===e)return r[0]=r[1]=r[2]=0,!1;const[n,i,o]=this.dir,s=this.pos[0]-t[0],a=this.pos[1]-t[1],l=this.pos[2]-t[2],c=n*n+i*i+o*o,u=2*(s*n+a*i+l*o),h=u*u-4*c*(s*s+a*a+l*l-e*e);if(h<0){const t=Math.max(-u/2,0),c=s+n*t,h=a+i*t,f=l+o*t,d=Math.hypot(c,h,f);return r[0]=c*e/d,r[1]=h*e/d,r[2]=f*e/d,!1}{const t=(-u-Math.sqrt(h))/(2*c);if(t<0){const t=Math.hypot(s,a,l);return r[0]=s*e/t,r[1]=a*e/t,r[2]=l*e/t,!1}return r[0]=s+n*t,r[1]=a+i*t,r[2]=l+o*t,!0}}}class Vv{constructor(t,e,r,n,i){this.TL=t,this.TR=e,this.BR=r,this.BL=n,this.horizon=i}static fromInvProjectionMatrix(t,e,r){const n=[-1,1,1],i=[1,1,1],o=[1,-1,1],s=[-1,-1,1],a=Sv.transformMat4(n,n,t),l=Sv.transformMat4(i,i,t),c=Sv.transformMat4(o,o,t),u=Sv.transformMat4(s,s,t);return new Vv(a,l,c,u,e/r)}}function Gv(t,e,r){let n=1/0,i=-1/0;const o=[];for(const s of t){Sv.sub(o,s,e);const t=Sv.dot(o,r);n=Math.min(n,t),i=Math.max(i,t)}return[n,i]}function qv(t,e){let r=!0;for(let n=0;n<t.planes.length;n++){const i=t.planes[n];let o=0;for(let t=0;t<e.length;t++)o+=Sv.dot(i,e[t])+i[3]>=0;if(0===o)return 0;o!==e.length&&(r=!1)}return r?2:1}function Hv(t,e){for(const r of t.projections){const n=Gv(e,t.points[0],r.axis);if(r.projection[1]<n[0]||r.projection[0]>n[1])return 0}return 1}const Wv=0,Zv=1,Xv=2,Yv=3,Kv=4,Jv=5,Qv=6,tb=7;function eb(t,e){let r=0;const n=[0,0,0,0];for(let i=0;i<t.length;i++)n[0]=t[i][0],n[1]=t[i][1],n[2]=t[i][2],n[3]=1,uv.dot(n,e)>=0&&r++;return r}class rb{constructor(t,e){this.points=t||new Array(8).fill([0,0,0]),this.planes=e||new Array(6).fill([
20,0,0,0]),this.bounds=nb.fromPoints(this.points),this.projections=[],this.frustumEdges=[Sv.sub([],this.points[Xv],this.points[Yv]),Sv.sub([],this.points[Wv],this.points[Yv]),Sv.sub([],this.points[Kv],this.points[Wv]),Sv.sub([],this.points[Jv],this.points[Zv]),Sv.sub([],this.points[Qv],this.points[Xv]),Sv.sub([],this.points[tb],this.points[Yv])];for(const t of this.frustumEdges){const e=[0,-t[2],t[1]],r=[t[2],0,-t[0]];this.projections.push({axis:e,projection:Gv(this.points,this.points[0],e)}),this.projections.push({axis:r,projection:Gv(this.points,this.points[0],r)})}}static fromInvProjectionMatrix(t,e,r,n){const i=[[-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]],o=Math.pow(2,r),s=i.map((r=>{const i=uv.transformMat4([],r,t),s=1/i[3]/e*o;return uv.mul(i,i,[s,s,n?1/i[3]:s,s])})),a=[[Wv,Zv,Xv],[Qv,Jv,Kv],[Wv,Yv,tb],[Xv,Zv,Jv],[Yv,Xv,Qv],[Wv,Kv,Jv]].map((t=>{const e=Sv.sub([],s[t[0]],s[t[1]]),r=Sv.sub([],s[t[2]],s[t[1]]),n=Sv.normalize([],Sv.cross([],e,r)),i=-Sv.dot(n,s[t[1]]);return n.concat(i)})),l=[];for(let t=0;t<s.length;t++)l.push([s[t][0],s[t][1],s[t][2]]);return new rb(l,a)}intersectsPrecise(t,e,r){for(let r=0;r<e.length;r++)if(!eb(t,e[r]))return 0;for(let e=0;e<this.planes.length;e++)if(!eb(t,this.planes[e]))return 0;for(const e of r)for(const r of this.frustumEdges){const n=Sv.cross([],e,r),i=Sv.length(n);if(0===i)continue;Sv.scale(n,n,1/i);const o=Gv(this.points,this.points[0],n),s=Gv(t,this.points[0],n);if(o[0]>s[1]||s[0]>o[1])return 0}return 1}}class nb{static fromPoints(t){const e=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0];for(const n of t)Sv.min(e,e,n),Sv.max(r,r,n);return new nb(e,r)}static fromTileIdAndHeight(t,e,r){const n=1<<t.canonical.z,i=t.canonical.x,o=t.canonical.y;return new nb([i/n,o/n,e],[(i+1)/n,(o+1)/n,r])}static applyTransform(t,e){const r=t.getCorners();for(let t=0;t<r.length;++t)Sv.transformMat4(r[t],r[t],e);return nb.fromPoints(r)}static projectAabbCorners(t,e){const r=t.getCorners();for(let t=0;t<r.length;++t)Sv.transformMat4(r[t],r[t],e);return r}constructor(t,e){this.min=t,this.max=e,this.center=Sv.scale([],Sv.add([],this.min,this.max),.5)}quadrant(t){const e=[t%2==0,t<2],r=Sv.clone(this.min),n=Sv.clone(this.max);for(let t=0;t<e.length;t++)r[t]=e[t]?this.min[t]:this.center[t],n[t]=e[t]?this.center[t]:this.max[t];return n[2]=this.max[2],new nb(r,n)}distanceX(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]}distanceY(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]}distanceZ(t){return Math.max(Math.min(this.max[2],t[2]),this.min[2])-t[2]}getCorners(){const t=this.min,e=this.max;return[[t[0],t[1],t[2]],[e[0],t[1],t[2]],[e[0],e[1],t[2]],[t[0],e[1],t[2]],[t[0],t[1],e[2]],[e[0],t[1],e[2]],[e[0],e[1],e[2]],[t[0],e[1],e[2]]]}intersects(t){return this.intersectsAabb(t.bounds)?qv(t,this.getCorners()):0}intersectsFlat(t){return this.intersectsAabb(t.bounds)?qv(t,[[this.min[0],this.min[1],0],[this.max[0],this.min[1],0],[this.max[0],this.max[1],0],[this.min[0],this.max[1],0]]):0}intersectsPrecise(t,e){return e||this.intersects(t)?Hv(t,this.getCorners()):0}intersectsPreciseFlat(t,e){return e||this.intersectsFlat(t)?Hv(t,[[this.min[0],this.min[1],0],[this.max[0],this.min[1],0],[this.max[0],this.max[1],0],[this.min[0],this.max[1],0]]):0}intersectsAabb(t){for(let e=0;e<3;++e)if(this.min[e]>t.max[e]||t.min[e]>this.max[e])return!1;return!0}intersectsAabbXY(t){return!(this.min[0]>t.max[0]||t.min[0]>this.max[0]||this.min[1]>t.max[1]||t.min[1]>this.max[1])}encapsulate(t){for(let e=0;e<3;e++)this.min[e]=Math.min(this.min[e],t.min[e]),this.max[e]=Math.max(this.max[e],t.max[e])}encapsulatePoint(t){for(let e=0;e<3;e++)this.min[e]=Math.min(this.min[e],t[e]),this.max[e]=Math.max(this.max[e],t[e])}closestPoint(t){return[Math.max(Math.min(this.max[0],t[0]),this.min[0]),Math.max(Math.min(this.max[1],t[1]),this.min[1]),Math.max(Math.min(this.max[2],t[2]),this.min[2])]}}Vl(nb,"Aabb");const ib=5,ob=6,sb=45,ab=Li/Math.PI/2,lb=16383,cb=64,ub=[cb,cb/2,cb/4],hb=512,fb=-ab,db=ab,pb=[new nb([fb,fb,fb],[db,db,db]),new nb([fb,fb,fb],[0,0,db]),new nb([0,fb,fb],[db,0,db]),new nb([fb,0,fb],[0,db,db]),new nb([0,0,fb],[db,db,db])];function mb(t){return t*ab/ix}function gb(t,e,r,n=!0){const i=Sv.scale([],t._camera.position,t.worldSize),o=[e,r,1,1];
2uv.transformMat4(o,o,t.pixelMatrixInverse),uv.scale(o,o,1/o[3]);const s=Sv.sub([],o,i),a=Sv.normalize([],s),l=t.globeMatrix,c=[l[12],l[13],l[14]],u=Sv.sub([],c,i),h=Sv.length(u),f=Sv.normalize([],u),d=t.worldSize/(2*Math.PI),p=Sv.dot(f,a),m=Math.asin(d/h);if(m<Math.acos(p)){if(!n)return null;const t=[],e=[];Sv.scale(t,a,h/p),Sv.normalize(e,Sv.sub(e,t,u)),Sv.normalize(a,Sv.add(a,u,Sv.scale(a,e,Math.tan(m)*h)))}const g=[];new Uv(i,a).closestPointOnSphere(c,d,g);const y=Sv.normalize([],bt(l,0)),_=Sv.normalize([],bt(l,1)),v=Sv.normalize([],bt(l,2)),b=Sv.dot(y,g),x=Sv.dot(_,g),w=Sv.dot(v,g),E=T(Math.asin(-x/d));let S=T(Math.atan2(b,w));S=t.center.lng+j(t.center.lng,S);const A=hx(S),O=D(fx(E),0,1);return new wx(A,O)}class yb{constructor(t,e,r){this.a=Sv.sub([],t,r),this.b=Sv.sub([],e,r),this.center=r;const n=Sv.normalize([],this.a),i=Sv.normalize([],this.b);this.angle=Math.acos(Sv.dot(n,i))}}function _b(t,e,r,n){const i=Math.sin(r);return t*(Math.sin((1-n)*r)/i)+e*(Math.sin(n*r)/i)}function vb(t,e){if(0===t.angle)return null;let r;return r=0===t.a[e]?1/t.angle*.5*Math.PI:1/t.angle*Math.atan(t.b[e]/t.a[e]/Math.sin(t.angle)-1/Math.tan(t.angle)),r<0||r>1?null:_b(t.a[e],t.b[e],t.angle,D(r,0,1))+t.center[e]}function bb(t){if(t.z<=1)return pb[t.z+2*t.y+t.x];const e=Ob(Tb(t));return nb.fromPoints(e)}function xb(t,e,r){return Sv.scale(t,t,1-r),Sv.scaleAndAdd(t,t,e,r)}function wb(t,e){const r=Vb(e.zoom);if(0===r)return bb(t);const n=Tb(t),i=Ob(n),o=hx(n.getWest())*e.worldSize,s=hx(n.getEast())*e.worldSize,a=fx(n.getNorth())*e.worldSize,l=fx(n.getSouth())*e.worldSize,c=[o,a,0],u=[s,a,0],h=[o,l,0],f=[s,l,0],d=_v.invert([],e.globeMatrix);return Sv.transformMat4(c,c,d),Sv.transformMat4(u,u,d),Sv.transformMat4(h,h,d),Sv.transformMat4(f,f,d),i[0]=xb(i[0],h,r),i[1]=xb(i[1],f,r),i[2]=xb(i[2],u,r),i[3]=xb(i[3],c,r),nb.fromPoints(i)}function Eb(t,e,r){for(const n of t)Sv.transformMat4(n,n,e),Sv.scale(n,n,r)}function Sb(t,e,r,n){const i=e/t.worldSize,o=t.globeMatrix;if(r.z<=1){const t=bb(r).getCorners();return Eb(t,o,i),nb.fromPoints(t)}const s=Tb(r,n),a=Ob(s);Eb(a,o,i);const l=Number.MAX_VALUE,c=[-l,-l,-l],u=[l,l,l];if(s.contains(t.center)){for(const t of a)Sv.min(u,u,t),Sv.max(c,c,t);c[2]=0;const e=t.point,r=[e.x*i,e.y*i,0];return Sv.min(u,u,r),Sv.max(c,c,r),new nb(u,c)}const h=[o[12]*i,o[13]*i,o[14]*i],f=s.getCenter(),d=D(t.center.lat,-yx,yx),p=D(f.lat,-yx,yx),m=hx(t.center.lng),g=fx(d);let y=m-hx(f.lng);const _=g-fx(p);y>.5?y-=1:y<-.5&&(y+=1);let v=0;if(Math.abs(y)>Math.abs(_))v=y>=0?1:3;else{v=_>=0?0:2;const t=[o[4]*i,o[5]*i,o[6]*i],e=-Math.sin(S(_>=0?s.getSouth():s.getNorth()))*ab;Sv.scaleAndAdd(h,h,t,e)}const b=a[v],x=a[(v+1)%4],w=new yb(b,x,h),E=[vb(w,0)||b[0],vb(w,1)||b[1],vb(w,2)||b[2]],T=Vb(t.zoom);if(T>0){const n=Ab(r,e,t._pixelsPerMercatorPixel,m,g);for(let t=0;t<a.length;t++)xb(a[t],n[t],T);const i=Sv.add([],n[v],n[(v+1)%4]);Sv.scale(i,i,.5),xb(E,i,T)}for(const t of a)Sv.min(u,u,t),Sv.max(c,c,t);return u[2]=Math.min(b[2],x[2]),Sv.min(u,u,E),Sv.max(c,c,E),new nb(u,c)}function Tb({x:t,y:e,z:r},n=!1){const i=1/(1<<r),o=new ax(px(t*i),e===(1<<r)-1&&n?-90:mx((e+1)*i)),s=new ax(px((t+1)*i),0===e&&n?90:mx(e*i));return new Oh(o,s)}function Ab({x:t,y:e,z:r},n,i,o,s){const a=1/(1<<r);let l=t*a,c=l+a,u=e*a,h=u+a,f=0;const d=(l+c)/2-o;return d>.5?f=-1:d<-.5&&(f=1),l=((l+f)*n-(o*=n))*i+o,c=((c+f)*n-o)*i+o,u=(u*n-(s*=n))*i+s,h=(h*n-s)*i+s,[[l,h,0],[c,h,0],[c,u,0],[l,u,0]]}function Ob(t){const e=S(t.getNorth()),r=S(t.getSouth()),n=Math.cos(e),i=Math.cos(r),o=Math.sin(e),s=Math.sin(r),a=t.getWest(),l=t.getEast();return[Cb(i,s,a),Cb(i,s,l),Cb(n,o,l),Cb(n,o,a)]}function Cb(t,e,r,n=ab){return r=S(r),[t*Math.sin(r)*n,-e*n,t*Math.cos(r)*n]}function Mb([t,e,r]){const n=Math.hypot(t,e,r),i=Math.atan2(t,r),o=.5*Math.PI-Math.acos(-e/n);return new ax(T(i),T(o))}function kb(t,e,r){return Cb(Math.cos(S(t)),Math.sin(S(t)),e,r)}function Ib(t,e,r,n){const i=1<<r.z,o=(t/Li+r.x)/i;return kb(mx((e/Li+r.y)/i),px(o),n)}function Pb(t,e){const r=[0,0,0],n=Db(bb(e.canonical));return Sv.transformMat4(r,r,n),Sv.transformMat4(r,r,t),r}function Lb({min:t,max:e}){return lb/Math.max(e[0]-t[0],e[1]-t[1],e[2]-t[2])}const Rb=new Float64Array(16);function Db(t){const e=Lb(t),r=_v.fromScaling(Rb,[e,e,e]);return _v.translate(r,r,Sv.negate([],t.min))}function zb(t){const e=_v.fromTranslation(Rb,t.min),r=1/Lb(t);return _v.scale(e,e,[r,r,r])}function Bb(t){const e=Li/(2*Math.PI);return t/(2*Math.PI)/e}function jb(t,e){return Li/(hb*Math.pow(2,t))*Lb(bb(e))}function Fb(t,e,r,n,i){const o=Bb(r),s=[t,e,-r/(2*Math.PI)],a=_v.identity(new Float64Array(16));return _v.translate(a,a,s),_v.scale(a,a,[o,o,o]),_v.rotateX(a,a,S(-i)),_v.rotateY(a,a,S(-n)),a}function Nb(t){const{x:e,y:r}=t.point,{lng:n,lat:i}=t._center;return Fb(e,r,t.worldSize,n,i)}function $b(t,e){const{x:r,y:n}=t.point,i=Fb(r,n,t.worldSize/t._pixelsPerMercatorPixel,0,0);return _v.multiply(i,i,zb(bb(e)))}function Ub(t){const e=t.pixelsPerMeter,r=e/dx(1,t.center.lat),n=_v.identity(new Float64Array(16));return _v.translate(n,n,[t.point.x,t.point.y,0]),_v.scale(n,n,[r,r,e]),Float32Array.from(n)}function Vb(t){return z(ib,ob,t)}function Gb(t,e,r){const n=_v.identity(new Float64Array(16)),i=(e/(1<<t)-.5)*Math.PI*2;return _v.rotateY(n,r.globeMatrix,i),Float32Array.from(n)}function qb(t,e,r){const n=Vb(r.zoom),i=t.style.map._antialias,o=e.options.extStandardDerivativesForceOff||t.terrain&&t.terrain.exaggeration()>0;return 0===n&&!i&&!o}function Hb(t,e,r,n){const i=e.getNorth(),o=e.getSouth(),s=e.getWest(),a=e.getEast(),l=1<<t.z,c=a-s,u=i-o,h=c/cb,f=-u/ub[r],d=[0,h,0,f,0,0,i,s,0];if(t.z>0){const t=180/n,e=[t/c+1,0,0,0,t/u+1,0,-.5*t/h,.5*t/f,1];gv.multiply(d,d,e)}return d[2]=l,d[5]=t.x,d[8]=t.y,d}function Wb(t){const e=yx-5;t=D(t,-e,e)/e*90;const r=Math.pow(Math.abs(Math.sin(S(t))),3);return Math.round(r*(ub.length-1))}function Zb(t){const e=[0,0,0],r=_v.identity(new Float64Array(16));return _v.multiply(r,t.pixelMatrix,t.globeMatrix),Sv.transformMat4(e,e,r),new b(e[0],e[1])}function Xb(t){const e=kb(t._center.lat,t._center.lng),r=Sv.fromValues(0,1,0);let n=Sv.cross([],r,e);const i=_v.fromRotation([],-t.angle,e);n=Sv.transformMat4(n,n,i),_v.fromRotation(i,-t._pitch,n);const o=Sv.normalize([],e);return Sv.scale(o,o,mb(t.cameraToCenterDistance/t.pixelsPerMeter)),Sv.transformMat4(o,o,i),Sv.add([],e,o)}function Yb(t,e){const r=kb(e.lat,e.lng),n=Xb(t),i=Sv.subtract([],n,r);return Sv.angle(i,r)}function Kb(t,e){return Yb(t,e)>Math.PI/2*1.01}function Jb(t){const e=_v.identity(new Float64Array(16));_v.multiply(e,t.pixelMatrix,t.globeMatrix);const r=[0,fb,0],n=[0,db,0];return Sv.transformMat4(r,r,e),Sv.transformMat4(n,n,e),[r[0]>0&&r[0]<=t.width&&r[1]>0&&r[1]<=t.height&&!Kb(t,new ax(t.center.lat,90)),n[0]>0&&n[0]<=t.width&&n[1]>0&&n[1]<=t.height&&!Kb(t,new ax(t.center.lat,-90))]}const Qb=S(85),tx=Math.cos(Qb),ex=Math.sin(Qb),rx=!0;class nx{constructor(t){this._createGrid(t),this._createPoles(t)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(const t of this._poleSegments)t.destroy();for(const t of this._gridSegments)t.withSkirts.destroy(),t.withoutSkirts.destroy()}_fillGridMeshWithLods(t,e){const r=new Kc,n=new pu,i=[],o=t+1+2,s=e[0]+1,a=e[0]+1+(1+e.length),l=(t,e,r)=>{let n=t===o-1?t-2:0===t?t:t-1;return n+=r?24575:0,[n,e]};for(let t=0;t<o;++t)r.emplaceBack(...l(t,0,!0));for(let t=0;t<s;++t)for(let e=0;e<o;++e){const n=0===e||e===o-1;r.emplaceBack(...l(e,t,n&&rx))}for(let t=0;t<e.length;++t){const n=e[t];for(let t=0;t<o;++t)r.emplaceBack(...l(t,n,!0))}for(let t=0;t<e.length;++t){const s=n.length,l=e[t]+1+2,c=new pu;for(let r=0;r<l-1;r++){const i=r===l-2,s=i&&rx?o*(a-e.length+t-r):o;for(let t=0;t<o-1;t++){const e=r*o+t;0===r||i||0===t||t===o-2?(c.emplaceBack(e+1,e,e+s),c.emplaceBack(e+s,e+s+1,e+1)):(n.emplaceBack(e+1,e,e+s),n.emplaceBack(e+s,e+s+1,e+1))}}const u=Nu.simpleSegment(0,s,r.length,n.length-s);for(let t=0;t<c.uint16.length;t+=3)n.emplaceBack(c.uint16[t],c.uint16[t+1],c.uint16[t+2]);const h=Nu.simpleSegment(0,s,r.length,n.length-s);i.push({withoutSkirts:u,withSkirts:h})}return{vertices:r,indices:n,segments:i}}_createGrid(t){const e=this._fillGridMeshWithLods(cb,ub);this._gridSegments=e.segments,this._gridBuffer=t.createVertexBuffer(e.vertices,Lv.members),this._gridIndexBuffer=t.createIndexBuffer(e.indices,!0)}_createPoles(t){const e=new pu;for(let t=0;t<=cb;t++)e.emplaceBack(0,t+1,t+2);this._poleIndexBuffer=t.createIndexBuffer(e,!0);const r=new _u,n=new _u,i=new _u,o=new _u,s=cb,a=cb+2;this._poleSegments=[];for(let t=0,e=0;t<ib;t++){const l=360/(1<<t);r.emplaceBack(0,-ab,0,.5,0),n.emplaceBack(0,-ab,0,.5,1),i.emplaceBack(0,-ab,0,.5,.5),o.emplaceBack(0,-ab,0,.5,.5);for(let t=0;t<=cb;t++){let e=t/cb,s=0;const a=Co(0,l,e),[c,u,h]=Cb(tx,ex,a,ab);r.emplaceBack(c,u,h,e,s),n.emplaceBack(c,u,h,e,1-s);const f=S(a);e=.5+.5*Math.sin(f),s=.5+.5*Math.cos(f),i.emplaceBack(c,u,h,e,s),o.emplaceBack(c,u,h,e,1-s)}this._poleSegments.push(Nu.simpleSegment(e,0,a,s)),e+=a}this._poleNorthVertexBuffer=t.createVertexBuffer(r,Mv,!1),this._poleSouthVertexBuffer=t.createVertexBuffer(n,Mv,!1),this._texturedPoleNorthVertexBuffer=t.createVertexBuffer(i,Mv,!1),this._texturedPoleSouthVertexBuffer=t.createVertexBuffer(o,Mv,!1)}getGridBuffers(t,e){return[this._gridBuffer,this._gridIndexBuffer,e?this._gridSegments[t].withSkirts:this._gridSegments[t].withoutSkirts]}getPoleBuffers(t,e){return[e?this._texturedPoleNorthVertexBuffer:this._poleNorthVertexBuffer,e?this._texturedPoleSouthVertexBuffer:this._poleSouthVertexBuffer,this._poleIndexBuffer,this._poleSegments[t]]}}const ix=6371008.8,ox=2*Math.PI*ix;class sx{constructor(t,e){if(isNaN(t)||isNaN(e))throw new Error(`Invalid LngLat object: (${t}, ${e})`);if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new sx(B(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return ix*Math.acos(Math.min(i,1))}toBounds(t=0){const e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Oh(new sx(this.lng-r,this.lat-e),new sx(this.lng+r,this.lat+e))}toEcef(t){const e=mb(t),r=ab+e;return kb(this.lat,this.lng,r)}static convert(t){if(t instanceof sx)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new sx(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new sx(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}var ax=sx;const lx=0,cx=25.5;function ux(t){return ox*Math.cos(t*Math.PI/180)}function hx(t){return(180+t)/360}function fx(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function dx(t,e){return t/ux(e)}function px(t){return 360*t-180}function mx(t){const e=180-360*t;
2return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function gx(t,e){return t*ux(mx(e))}const yx=85.051129;function _x(t){return Math.cos(S(D(t,-yx,yx)))}function vx(t,e){const r=D(e,lx,cx),n=Math.pow(2,r);return _x(t)*ox/(512*n)}function bx(t){return 1/Math.cos(t*Math.PI/180)}function xx(t,e=0){const r=40075017,n=(t.y+e/Li)/(1<<t.z),i=Math.exp(Math.PI*(1-2*n));return 2*r*i/(i*i+1)/Li/(1<<t.z)}class wx{constructor(t,e,r=0){this.x=+t,this.y=+e,this.z=+r}static fromLngLat(t,e=0){const r=ax.convert(t);return new wx(hx(r.lng),fx(r.lat),dx(e,r.lat))}toLngLat(){return new ax(px(this.x),mx(this.y))}toAltitude(){return gx(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ox*bx(mx(this.y))}}function Ex(t,e,r,n,i,o){const s=r-i,a=n-o;return Math.abs((n-e)*s-(r-t)*a)/Math.hypot(s,a)}function Sx(t,e,r,n,i,o,s,a,l){const c=(e+n)/2,u=(r+i)/2,h=new b(c,u);a(h),Ex(h.x,h.y,o.x,o.y,s.x,s.y)>=l?(Sx(t,e,r,c,u,o,h,a,l),Sx(t,c,u,n,i,h,s,a,l)):t.push(s)}function Tx(t,e,r){let n=t[0],i=n.x,o=n.y;e(n);const s=[n];for(let a=1;a<t.length;a++){const l=t[a],{x:c,y:u}=l;e(l),Sx(s,i,o,c,u,n,l,e,r),i=c,o=u,n=l}return s}function Ax(t,e,r,n){if(n(e,r)){const i=e.add(r)._mult(.5);Ax(t,e,i,n),Ax(t,i,r,n)}else t.push(r)}function Ox(t,e){let r=t[0];const n=[r];for(let i=1;i<t.length;i++){const o=t[i];Ax(n,r,o,e),r=o}return n}const Cx=15,Mx=Math.pow(2,Cx-1)-1,kx=-Mx-1;function Ix(t,e){const r=Math.round(t.x*e),n=Math.round(t.y*e);return t.x=D(r,kx,Mx),t.y=D(n,kx,Mx),(r<t.x||r>t.x+1||n<t.y||n>t.y+1)&&it("Geometry exceeds allowed extent, reduce your vector tile buffer size"),t}function Px(t,e,r){const n=t.loadGeometry(),i=t.extent,o=Li/i;if(e&&r&&r.projection.isReprojectedInTileSpace){const o=1<<e.z,{scale:s,x:a,y:l,projection:c}=r,u=t=>{const r=px((e.x+t.x/i)/o),n=mx((e.y+t.y/i)/o),u=c.project(r,n);t.x=(u.x*s-a)*i,t.y=(u.y*s-l)*i};for(let e=0;e<n.length;e++)if(1!==t.type)n[e]=Tx(n[e],u,1);else{const t=[];for(const r of n[e])r.x<0||r.x>=i||r.y<0||r.y>=i||(u(r),t.push(r));n[e]=t}}for(const t of n)for(const e of t)Ix(e,o);return n}function Lx(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Px(t):[]}}function Rx(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}function Dx(t,e,r){const n=16384;t.emplaceBack(e.x,e.y,e.z,r[0]*n,r[1]*n,r[2]*n)}class zx{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.fqid)),this.index=t.index,this.hasPattern=!1,this.projection=t.projection,this.layoutVertexArray=new Kc,this.indexArray=new pu,this.segments=new Nu,this.programConfigurations=new xh(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,r,n){const i=this.layers[0],o=[];let s=null;"circle"===i.type&&(s=i.layout.get("circle-sort-key"));for(const{feature:e,id:i,index:a,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Lx(e,t);if(!this.layers[0]._featureFilter.filter(new bc(this.zoom),c,r))continue;const u=s?s.evaluate(c,{},r):void 0,h={id:i,properties:e.properties,type:e.type,sourceLayerIndex:l,index:a,geometry:t?c.geometry:Px(e,r,n),patterns:{},sortKey:u};o.push(h)}s&&o.sort(((t,e)=>t.sortKey-e.sortKey));let a=null;"globe"===n.projection.name&&(this.globeExtVertexArray=new ou,a=n.projection);for(const n of o){const{geometry:i,index:o,sourceLayerIndex:s}=n,l=t[o].feature;this.addFeature(n,i,o,e.availableImages,r,a,e.brightness),e.featureIndex.insert(l,i,o,s,this.index)}}update(t,e,r,n,i){const o=0!==Object.keys(t).length;if(o&&!this.stateDependentLayers.length)return;const s=o?this.stateDependentLayers:this.layers;this.programConfigurations.updatePaintArrays(t,e,s,r,n,i)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ju.members),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,Fu.members))),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(t,e,r,n,i,o,s){for(const r of e)for(const e of r){const r=e.x,n=e.y;if(r<0||r>=Li||n<0||n>=Li)continue;if(o){const t=o.projectTilePoint(r,n,i),e=o.upVector(i,r,n),s=this.globeExtVertexArray;Dx(s,t,e),Dx(s,t,e),Dx(s,t,e),Dx(s,t,e)}const s=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),a=s.vertexLength;Rx(this.layoutVertexArray,r,n,-1,-1),Rx(this.layoutVertexArray,r,n,1,-1),Rx(this.layoutVertexArray,r,n,1,1),Rx(this.layoutVertexArray,r,n,-1,1),this.indexArray.emplaceBack(a,a+1,a+2),this.indexArray.emplaceBack(a,a+2,a+3),s.vertexLength+=4,s.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n,i,s)}}function Bx(t,e){for(let r=0;r<t.length;r++)if(Wx(e,t[r]))return!0;for(let r=0;r<e.length;r++)if(Wx(t,e[r]))return!0;return!!Ux(t,e)}function jx(t,e,r){return!!Wx(t,e)||!!Gx(e,t,r)}function Fx(t,e){if(1===t.length)return Hx(e,t[0]);for(let r=0;r<e.length;r++){const n=e[r];for(let e=0;e<n.length;e++)if(Wx(t,n[e]))return!0}for(let r=0;r<t.length;r++)if(Hx(e,t[r]))return!0;for(let r=0;r<e.length;r++)if(Ux(t,e[r]))return!0;return!1}function Nx(t,e,r){for(let n=0;n<e.length;n++){const i=e[n];if(t.length>=3)for(let e=0;e<i.length;e++)if(Wx(t,i[e]))return!0;
2if($x(t,i,r))return!0}return!1}function $x(t,e,r){if(t.length>1){if(Ux(t,e))return!0;for(let n=0;n<e.length;n++)if(Gx(e[n],t,r))return!0}for(let n=0;n<t.length;n++)if(Gx(t[n],e,r))return!0;return!1}function Ux(t,e){if(0===t.length||0===e.length)return!1;for(let r=0;r<t.length-1;r++){const n=t[r],i=t[r+1];for(let t=0;t<e.length-1;t++)if(Vx(n,i,e[t],e[t+1]))return!0}return!1}function Vx(t,e,r,n){return ot(t,r,n)!==ot(e,r,n)&&ot(t,e,r)!==ot(t,e,n)}function Gx(t,e,r){const n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(let r=1;r<e.length;r++)if(qx(t,e[r-1],e[r])<n)return!0;return!1}function qx(t,e,r){const n=e.distSqr(r);if(0===n)return t.distSqr(e);const i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Hx(t,e){let r,n,i,o=!1;for(let s=0;s<t.length;s++){r=t[s];for(let t=0,s=r.length-1;t<r.length;s=t++)n=r[t],i=r[s],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(o=!o)}return o}function Wx(t,e){let r=!1;for(let n=0,i=t.length-1;n<t.length;i=n++){const o=t[n],s=t[i];o.y>e.y!=s.y>e.y&&e.x<(s.x-o.x)*(e.y-o.y)/(s.y-o.y)+o.x&&(r=!r)}return r}function Zx(t,e,r,n,i){for(const o of t)if(e<=o.x&&r<=o.y&&n>=o.x&&i>=o.y)return!0;const o=[new b(e,r),new b(e,i),new b(n,i),new b(n,r)];if(t.length>2)for(const e of o)if(Wx(t,e))return!0;for(let e=0;e<t.length-1;e++)if(Xx(t[e],t[e+1],o))return!0;return!1}function Xx(t,e,r){const n=r[0],i=r[2];if(t.x<n.x&&e.x<n.x||t.x>i.x&&e.x>i.x||t.y<n.y&&e.y<n.y||t.y>i.y&&e.y>i.y)return!1;const o=ot(t,e,r[0]);return o!==ot(t,e,r[1])||o!==ot(t,e,r[2])||o!==ot(t,e,r[3])}function Yx(t,e,r,n,i,o){let s=e.y-t.y,a=t.x-e.x;if(o=o||0){const t=s*s+a*a;if(0===t)return!0;const e=Math.sqrt(t);s/=e,a/=e}return!((r.x-t.x)*s+(r.y-t.y)*a-o<0||(n.x-t.x)*s+(n.y-t.y)*a-o<0||(i.x-t.x)*s+(i.y-t.y)*a-o<0)}function Kx(t,e,r,n,i,o,s){return!(Yx(t,e,n,i,o,s)||Yx(e,r,n,i,o,s)||Yx(r,t,n,i,o,s)||Yx(n,i,t,e,r,s)||Yx(i,o,t,e,r,s)||Yx(o,n,t,e,r,s))}function Jx(t,e,r){const n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Qx(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function tw(t,e,r,n,i){if(!e[0]&&!e[1])return t;const o=b.convert(e)._mult(i);"viewport"===r&&o._rotate(-n);const s=[];for(let e=0;e<t.length;e++){const r=t[e];s.push(r.sub(o))}return s}function ew(t,e,r,n){const i=b.convert(t)._mult(n);return"viewport"===e&&i._rotate(-r),i}Vl(zx,"CircleBucket",{omit:["layers"]});const rw=new Rc({"circle-sort-key":new kc(jr.layout_circle["circle-sort-key"]),visibility:new Mc(jr.layout_circle.visibility)});var nw={paint:new Rc({"circle-radius":new kc(jr.paint_circle["circle-radius"]),"circle-color":new kc(jr.paint_circle["circle-color"]),"circle-blur":new kc(jr.paint_circle["circle-blur"]),"circle-opacity":new kc(jr.paint_circle["circle-opacity"]),"circle-translate":new Mc(jr.paint_circle["circle-translate"]),"circle-translate-anchor":new Mc(jr.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Mc(jr.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Mc(jr.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new kc(jr.paint_circle["circle-stroke-width"]),"circle-stroke-color":new kc(jr.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new kc(jr.paint_circle["circle-stroke-opacity"]),"circle-emissive-strength":new Mc(jr.paint_circle["circle-emissive-strength"])}),layout:rw};const iw=t=>({u_camera_to_center_distance:new nh(t),u_extrude_scale:new dh(t),u_device_pixel_ratio:new nh(t),u_matrix:new ch(t),u_inv_rot_matrix:new ch(t),u_merc_center:new ih(t),u_tile_id:new oh(t),u_zoom_transition:new nh(t),u_up_dir:new oh(t),u_emissive_strength:new nh(t)}),ow=_v.create(),sw=(t,e,r,n,i,o)=>{const s=t.transform,a="globe"===s.projection.name;let l;if("map"===o.paint.get("circle-pitch-alignment"))if(a){const t=jb(s.zoom,e.canonical)*s._pixelsPerMercatorPixel;l=Float32Array.from([t,0,0,t])}else l=s.calculatePixelsToTileUnitsMatrix(r);else l=new Float32Array([s.pixelsToGLUnits[0],0,0,s.pixelsToGLUnits[1]]);const c={u_camera_to_center_distance:t.transform.getCameraToCenterDistance(s.projection),u_matrix:t.translatePosMatrix(e.projMatrix,r,o.paint.get("circle-translate"),o.paint.get("circle-translate-anchor")),u_device_pixel_ratio:vr.devicePixelRatio,u_extrude_scale:l,u_inv_rot_matrix:ow,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0],u_emissive_strength:o.paint.get("circle-emissive-strength")};if(a){c.u_inv_rot_matrix=n,c.u_merc_center=i,c.u_tile_id=[e.canonical.x,e.canonical.y,1<<e.canonical.z],c.u_zoom_transition=Vb(s.zoom);const t=i[0]*Li,r=i[1]*Li;c.u_up_dir=s.projection.upVector(new zv(0,0,0),t,r)}return c},aw=t=>{const e=[];return"map"===t.paint.get("circle-pitch-alignment")&&e.push("PITCH_WITH_MAP"),"map"===t.paint.get("circle-pitch-scale")&&e.push("SCALE_WITH_MAP"),e};class lw extends $c{constructor(t,e){super(t,nw,e)}createBucket(t){return new zx(t)}queryRadius(t){const e=t;return Jx("circle-radius",this,e)+Jx("circle-stroke-width",this,e)+Qx(this.paint.get("circle-translate"))}queryIntersectsFeature(t,e,r,n,i,o,s,a){const l=ew(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),c=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r);return cw(t,n,o,s,a,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),l,c)}getProgramIds(){return["circle"]}getDefaultProgramParams(t,e){const r=aw(this);return{config:new bh(this,e),defines:r,overrideFog:!1}}}function cw(t,e,r,n,i,o,s,a,l){if(o&&t.queryGeometry.isAboveHorizon)return!1;o&&(l*=t.pixelToTileUnitsFactor);const c=t.tileID.canonical,u=r.projection.upVectorScale(c,r.center.lat,r.worldSize).metersToTile;for(const h of e)for(const e of h){const h=e.add(a),f=i&&r.elevation?r.elevation.exaggeration()*i.getElevationAt(h.x,h.y,!0):0,d=r.projection.projectTilePoint(h.x,h.y,c);if(f>0){const t=r.projection.upVector(c,h.x,h.y);d.x+=t[0]*u*f,d.y+=t[1]*u*f,d.z+=t[2]*u*f}const p=o?h:uw(d.x,d.y,d.z,n),m=o?t.tilespaceRays.map((t=>dw(t,f))):t.queryGeometry.screenGeometry,g=uv.transformMat4([],[d.x,d.y,d.z,1],n);if(!s&&o?l*=g[3]/r.cameraToCenterDistance:s&&!o&&(l*=r.cameraToCenterDistance/g[3]),o){const t=mx((e.y/Li+c.y)/(1<<c.z));l/=r.projection.pixelsPerMeter(t,1)/dx(1,t)}if(jx(m,p,l))return!0}return!1}function uw(t,e,r,n){const i=uv.transformMat4([],[t,e,r,1],n);return new b(i[0]/i[3],i[1]/i[3])}const hw=Sv.fromValues(0,0,0),fw=Sv.fromValues(0,0,1);function dw(t,e){const r=Sv.create();return hw[2]=e,t.intersectsPlane(hw,fw,r),new b(r[0],r[1])}class pw extends zx{}function mw(t,{width:e,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==e*r*n)throw new RangeError("mismatched image size")}else i=new Uint8Array(e*r*n);return t.width=e,t.height=r,t.data=i,t}function gw(t,e,r){const{width:n,height:i}=e;n===t.width&&i===t.height||(yw(t,e,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=e.data)}function yw(t,e,r,n,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");const s=t.data,a=e.data;for(let l=0;l<i.height;l++){const c=((r.y+l)*t.width+r.x)*o,u=((n.y+l)*e.width+n.x)*o;for(let t=0;t<i.width*o;t++)a[u+t]=s[c+t]}return e}Vl(pw,"HeatmapBucket",{omit:["layers"]});class _w{constructor(t,e){mw(this,t,1,e)}resize(t){gw(this,new _w(t),1)}clone(){return new _w({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,r,n,i){yw(t,e,r,n,i,1)}}class vw{constructor(t,e){mw(this,t,4,e)}resize(t){gw(this,new vw(t),4)}replace(t,e){e?this.data.set(t):t instanceof Uint8ClampedArray?this.data=new Uint8Array(t.buffer):this.data=t}clone(){return new vw({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,r,n,i){yw(t,e,r,n,i,4)}}class bw{constructor(t,e){this.width=t.width,this.height=t.height,e instanceof Uint8Array?this.data=new Float32Array(e.buffer):this.data=e}}Vl(_w,"AlphaImage"),Vl(vw,"RGBAImage");const xw=new Rc({visibility:new Mc(jr.layout_heatmap.visibility)});var ww={paint:new Rc({"heatmap-radius":new kc(jr.paint_heatmap["heatmap-radius"]),"heatmap-weight":new kc(jr.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Mc(jr.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ic(jr.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Mc(jr.paint_heatmap["heatmap-opacity"])}),layout:xw};function Ew(t){const e={},r=t.resolution||256,n=t.clips?t.clips.length:1,i=t.image||new vw({width:r,height:n}),o=(r,n,o)=>{e[t.evaluationKey]=o;const s=t.expression.evaluate(e);s&&(i.data[r+n+0]=Math.floor(255*s.r/s.a),i.data[r+n+1]=Math.floor(255*s.g/s.a),i.data[r+n+2]=Math.floor(255*s.b/s.a),i.data[r+n+3]=Math.floor(255*s.a))};if(t.clips)for(let e=0,i=0;e<n;++e,i+=4*r)for(let n=0,s=0;n<r;n++,s+=4){const a=n/(r-1),{start:l,end:c}=t.clips[e];o(i,s,l*(1-a)+c*a)}else for(let t=0,e=0;t<r;t++,e+=4)o(0,e,t/(r-1));return i}class Sw extends $c{createBucket(t){return new pw(t)}constructor(t,e){super(t,ww,e),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"heatmap-color"===t&&this._updateColorRamp()}_updateColorRamp(){const t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Ew({expression:t,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(t){return Jx("heatmap-radius",this,t)}queryIntersectsFeature(t,e,r,n,i,o,s,a){const l=this.paint.get("heatmap-radius").evaluate(e,r);return cw(t,n,o,s,a,!0,!0,new b(0,0),l)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getDefaultProgramParams(t,e){return"heatmap"===t?{config:new bh(this,e),overrideFog:!1}:{}}}const Tw=new Rc({visibility:new Mc(jr.layout_hillshade.visibility)});var Aw={paint:new Rc({"hillshade-illumination-direction":new Mc(jr.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Mc(jr.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Mc(jr.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Mc(jr.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Mc(jr.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Mc(jr.paint_hillshade["hillshade-accent-color"]),"hillshade-emissive-strength":new Mc(jr.paint_hillshade["hillshade-emissive-strength"])}),layout:Tw};class Ow extends $c{constructor(t,e){super(t,Aw,e)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}getDefaultProgramParams(t,e){return{overrideFog:!1}}}const Cw=Zc([{name:"a_pos",components:2,type:"Int16"}],4),{members:Mw,size:kw,alignment:Iw}=Cw;var Pw={exports:{}};function Lw(t,e,r){r=r||2;var n,i,o,s,a,l,c,u=e&&e.length,h=u?e[0]*r:t.length,f=Rw(t,0,h,r,!0),d=[];if(!f||f.next===f.prev)return d;if(u&&(f=$w(t,e,f,r)),t.length>80*r){n=o=t[0],i=s=t[1];for(var p=r;p<h;p+=r)(a=t[p])<n&&(n=a),(l=t[p+1])<i&&(i=l),a>o&&(o=a),l>s&&(s=l);c=0!==(c=Math.max(o-n,s-i))?32767/c:0}return zw(f,d,r,n,i,c,0),d}function Rw(t,e,r,n,i){var o,s;if(i===uE(t,e,r,n)>0)for(o=e;o<r;o+=n)s=aE(o,t[o],t[o+1],s);else for(o=r-n;o>=e;o-=n)s=aE(o,t[o],t[o+1],s);return s&&Qw(s,s.next)&&(lE(s),s=s.next),s}function Dw(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Qw(n,n.next)&&0!==Jw(n.prev,n,n.next))n=n.next;else{if(lE(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}
vendor: 4,349 bytes, line 2
2function zw(t,e,r,n,i,o,s){if(t){!s&&o&&Hw(t,n,i,o);for(var a,l,c=t;t.prev!==t.next;)if(a=t.prev,l=t.next,o?jw(t,n,i,o):Bw(t))e.push(a.i/r|0),e.push(t.i/r|0),e.push(l.i/r|0),lE(t),t=l.next,c=l.next;else if((t=l)===c){s?1===s?zw(t=Fw(Dw(t),e,r),e,r,n,i,o,2):2===s&&Nw(t,e,r,n,i,o):zw(Dw(t),e,r,n,i,o,1);break}}}function Bw(t){var e=t.prev,r=t,n=t.next;if(Jw(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,s=n.x,a=e.y,l=r.y,c=n.y,u=i<o?i<s?i:s:o<s?o:s,h=a<l?a<c?a:c:l<c?l:c,f=i>o?i>s?i:s:o>s?o:s,d=a>l?a>c?a:c:l>c?l:c,p=n.next;p!==e;){if(p.x>=u&&p.x<=f&&p.y>=h&&p.y<=d&&Yw(i,a,o,l,s,c,p.x,p.y)&&Jw(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function jw(t,e,r,n){var i=t.prev,o=t,s=t.next;if(Jw(i,o,s)>=0)return!1;for(var a=i.x,l=o.x,c=s.x,u=i.y,h=o.y,f=s.y,d=a<l?a<c?a:c:l<c?l:c,p=u<h?u<f?u:f:h<f?h:f,m=a>l?a>c?a:c:l>c?l:c,g=u>h?u>f?u:f:h>f?h:f,y=Zw(d,p,e,r,n),_=Zw(m,g,e,r,n),v=t.prevZ,b=t.nextZ;v&&v.z>=y&&b&&b.z<=_;){if(v.x>=d&&v.x<=m&&v.y>=p&&v.y<=g&&v!==i&&v!==s&&Yw(a,u,l,h,c,f,v.x,v.y)&&Jw(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=d&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==s&&Yw(a,u,l,h,c,f,b.x,b.y)&&Jw(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=y;){if(v.x>=d&&v.x<=m&&v.y>=p&&v.y<=g&&v!==i&&v!==s&&Yw(a,u,l,h,c,f,v.x,v.y)&&Jw(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=_;){if(b.x>=d&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==s&&Yw(a,u,l,h,c,f,b.x,b.y)&&Jw(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Fw(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!Qw(i,o)&&tE(i,n,n.next,o)&&iE(i,o)&&iE(o,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(o.i/r|0),lE(n),lE(n.next),n=t=o),n=n.next}while(n!==t);return Dw(n)}function Nw(t,e,r,n,i,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&Kw(s,a)){var l=sE(s,a);return s=Dw(s,s.next),l=Dw(l,l.next),zw(s,e,r,n,i,o,0),void zw(l,e,r,n,i,o,0)}a=a.next}s=s.next}while(s!==t)}function $w(t,e,r,n){var i,o,s,a=[];for(i=0,o=e.length;i<o;i++)(s=Rw(t,e[i]*n,i<o-1?e[i+1]*n:t.length,n,!1))===s.next&&(s.steiner=!0),a.push(Xw(s));for(a.sort(Uw),i=0;i<a.length;i++)r=Vw(a[i],r);return r}function Uw(t,e){return t.x-e.x}function Vw(t,e){var r=Gw(t,e);if(!r)return e;var n=sE(r,t);return Dw(n,n.next),Dw(r,r.next)}function Gw(t,e){var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>s&&(s=a,r=n.x<n.next.x?n:n.next,a===i))return r}n=n.next}while(n!==e);if(!r)return null;var l,c=r,u=r.x,h=r.y,f=1/0;n=r;do{i>=n.x&&n.x>=u&&i!==n.x&&Yw(o<h?i:s,o,u,h,o<h?s:i,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(i-n.x),iE(n,t)&&(l<f||l===f&&(n.x>r.x||n.x===r.x&&qw(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}function qw(t,e){return Jw(t.prev,t,e.prev)<0&&Jw(e.next,t,t.next)<0}function Hw(t,e,r,n){var i=t;do{0===i.z&&(i.z=Zw(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,Ww(i)}function Ww(t){var e,r,n,i,o,s,a,l,c=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,n=r,a=0,e=0;e<c&&(a++,n=n.nextZ);e++);for(l=c;a>0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(s>1);return t}function Zw(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Xw(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Yw(t,e,r,n,i,o,s,a){return(i-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(n-a)>=(r-s)*(e-a)&&(r-s)*(o-a)>=(i-s)*(n-a)}function Kw(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!nE(t,e)&&(iE(t,e)&&iE(e,t)&&oE(t,e)&&(Jw(t.prev,t,e.prev)||Jw(t,e.prev,e))||Qw(t,e)&&Jw(t.prev,t,t.next)>0&&Jw(e.prev,e,e.next)>0)}function Jw(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Qw(t,e){return t.x===e.x&&t.y===e.y}function tE(t,e,r,n){var i=rE(Jw(t,e,r)),o=rE(Jw(t,e,n)),s=rE(Jw(r,n,t)),a=rE(Jw(r,n,e));return i!==o&&s!==a||!(0!==i||!eE(t,r,e))||!(0!==o||!eE(t,n,e))||!(0!==s||!eE(r,t,n))||!(0!==a||!eE(r,e,n))}function eE(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rE(t){return t>0?1:t<0?-1:0}function nE(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&tE(r,r.next,t,e))return!0;r=r.next}
vendor: 16,489 bytes, line 2
2while(r!==t);return!1}function iE(t,e){return Jw(t.prev,t,t.next)<0?Jw(t,e,t.next)>=0&&Jw(t,t.prev,e)>=0:Jw(t,e,t.prev)<0||Jw(t,t.next,e)<0}function oE(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function sE(t,e){var r=new cE(t.i,t.x,t.y),n=new cE(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function aE(t,e,r,n){var i=new cE(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function lE(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function cE(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function uE(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}Pw.exports=Lw,Pw.exports.default=Lw,Lw.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(uE(t,0,o,r));if(i)for(var a=0,l=e.length;a<l;a++){var c=e[a]*r,u=a<l-1?e[a+1]*r:t.length;s-=Math.abs(uE(t,c,u,r))}var h=0;for(a=0;a<n.length;a+=3){var f=n[a]*r,d=n[a+1]*r,p=n[a+2]*r;h+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},Lw.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var hE=p(Pw.exports);function fE(t,e){const r=t.length;if(r<=1)return[t];const n=[];let i,o;for(let e=0;e<r;e++){const r=st(t[e]);0!==r&&(t[e].area=Math.abs(r),void 0===o&&(o=r<0),o===r<0?(i&&n.push(i),i=[t[e]]):i.push(t[e]))}if(i&&n.push(i),e>1)for(let t=0;t<n.length;t++)n[t].length<=e||(Qn(n[t],e,1,n[t].length-1,dE),n[t]=n[t].slice(0,e));return n}function dE(t,e){return e.area-t.area}function pE(t,e,r){const n=r.patternDependencies;let i=!1;for(const r of e){const e=r.paint.get(`${t}-pattern`);e.isConstant()||(i=!0);const o=e.constantOr(null);o&&(i=!0,n[o]=!0)}return i}function mE(t,e,r,n,i){const o=i.patternDependencies;for(const s of e){const e=s.paint.get(`${t}-pattern`).value;if("constant"!==e.kind){let t=e.evaluate({zoom:n},r,{},i.availableImages);t=t&&t.name?t.name:t,o[t]=!0,r.patterns[s.id]=t}}return r}const gE=500;class yE{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.fqid)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Kc,this.indexArray=new pu,this.indexArray2=new cu,this.programConfigurations=new xh(t.layers,t.zoom),this.segments=new Nu,this.segments2=new Nu,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.projection=t.projection}populate(t,e,r,n){this.hasPattern=pE("fill",this.layers,e);const i=this.layers[0].layout.get("fill-sort-key"),o=[];for(const{feature:s,id:a,index:l,sourceLayerIndex:c}of t){const t=this.layers[0]._featureFilter.needGeometry,u=Lx(s,t);if(!this.layers[0]._featureFilter.filter(new bc(this.zoom),u,r))continue;const h=i?i.evaluate(u,{},r,e.availableImages):void 0,f={id:a,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:t?u.geometry:Px(s,r,n),patterns:{},sortKey:h};o.push(f)}i&&o.sort(((t,e)=>t.sortKey-e.sortKey));for(const n of o){const{geometry:i,index:o,sourceLayerIndex:s}=n;if(this.hasPattern){const t=mE("fill",this.layers,n,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(n,i,o,r,{},e.availableImages,e.brightness);const a=t[o].feature;e.featureIndex.insert(a,i,o,s,this.index)}}update(t,e,r,n,i){const o=0!==Object.keys(t).length;if(o&&!this.stateDependentLayers.length)return;const s=o?this.stateDependentLayers:this.layers;this.programConfigurations.updatePaintArrays(t,e,s,r,n,i)}addFeatures(t,e,r,n,i,o){for(const t of this.patternFeatures)this.addFeature(t,t.geometry,t.index,e,r,n,o)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Mw),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,r,n,i,o=[],s){for(const t of fE(e,gE)){let e=0;for(const r of t)e+=r.length;const r=this.segments.prepareSegment(e,this.layoutVertexArray,this.indexArray),n=r.vertexLength,i=[],o=[];for(const e of t){if(0===e.length)continue;e!==t[0]&&o.push(i.length/2);const r=this.segments2.prepareSegment(e.length,this.layoutVertexArray,this.indexArray2),n=r.vertexLength;this.layoutVertexArray.emplaceBack(e[0].x,e[0].y),this.indexArray2.emplaceBack(n+e.length-1,n),i.push(e[0].x),i.push(e[0].y);for(let t=1;t<e.length;t++)this.layoutVertexArray.emplaceBack(e[t].x,e[t].y),this.indexArray2.emplaceBack(n+t-1,n+t),i.push(e[t].x),i.push(e[t].y);r.vertexLength+=e.length,r.primitiveLength+=e.length}const s=hE(i,o);for(let t=0;t<s.length;t+=3)this.indexArray.emplaceBack(n+s[t],n+s[t+1],n+s[t+2]);r.vertexLength+=e,r.primitiveLength+=s.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,o,n,s)}}Vl(yE,"FillBucket",{omit:["layers","patternFeatures"]});const _E=new Rc({"fill-sort-key":new kc(jr.layout_fill["fill-sort-key"]),visibility:new Mc(jr.layout_fill.visibility)});var vE={paint:new Rc({"fill-antialias":new Mc(jr.paint_fill["fill-antialias"]),"fill-opacity":new kc(jr.paint_fill["fill-opacity"]),"fill-color":new kc(jr.paint_fill["fill-color"]),"fill-outline-color":new kc(jr.paint_fill["fill-outline-color"]),"fill-translate":new Mc(jr.paint_fill["fill-translate"]),"fill-translate-anchor":new Mc(jr.paint_fill["fill-translate-anchor"]),"fill-pattern":new kc(jr.paint_fill["fill-pattern"]),"fill-emissive-strength":new Mc(jr.paint_fill["fill-emissive-strength"])}),layout:_E};class bE extends $c{constructor(t,e){super(t,vE,e)}getProgramIds(){const t=this.paint.get("fill-pattern"),e=t&&t.constantOr(1),r=[e?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&r.push(e&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),r}getDefaultProgramParams(t,e){return{config:new bh(this,e),overrideFog:!1}}recalculate(t,e){super.recalculate(t,e);const r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new yE(t)}queryRadius(){return Qx(this.paint.get("fill-translate"))}queryIntersectsFeature(t,e,r,n,i,o){return!t.queryGeometry.isAboveHorizon&&Fx(tw(t.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),n)}isTileClipped(){return!0}}const xE=Zc([{name:"a_pos_normal_ed",components:4,type:"Int16"}]),wE=Zc([{name:"a_pos_end",components:4,type:"Int16"},{name:"a_angular_offset_factor",components:1,type:"Int16"}]),EE=Zc([{name:"a_centroid_pos",components:2,type:"Uint16"}]),SE=Zc([{name:"a_hidden_by_landmark",components:1,type:"Uint8"}]),TE=Zc([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]),{members:AE,size:OE,alignment:CE}=xE;var ME={},kE=_,IE=PE;function PE(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(LE,this,e)}function LE(t,e,r){1==t?e.id=r.readVarint():2==t?RE(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function RE(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}function DE(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],o=0;o<e;o++){var s=zE(t[o]);0!==s&&(void 0===n&&(n=s<0),n===s<0?(r&&i.push(r),r=[t[o]]):r.push(t[o]))}return r&&i.push(r),i}function zE(t){for(var e,r,n=0,i=0,o=t.length,s=o-1;i<o;s=i++)e=t[i],n+=((r=t[s]).x-e.x)*(e.y+r.y);return n}PE.types=["Unknown","Point","LineString","Polygon"],PE.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,s=0,a=[];t.pos<r;){if(i<=0){var l=t.readVarint();n=7&l,i=l>>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&a.push(e),e=[]),e.push(new kE(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&a.push(e),a},PE.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,o=0,s=1/0,a=-1/0,l=1/0,c=-1/0;t.pos<e;){if(n<=0){var u=t.readVarint();r=7&u,n=u>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<s&&(s=i),i>a&&(a=i),(o+=t.readSVarint())<l&&(l=o),o>c&&(c=o);else if(7!==r)throw new Error("unknown command "+r)}return[s,l,a,c]},PE.prototype.toGeoJSON=function(t,e,r){var n,i,o=this.extent*Math.pow(2,r),s=this.extent*t,a=this.extent*e,l=this.loadGeometry(),c=PE.types[this.type];function u(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+a)/o;t[e]=[360*(r.x+s)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];u(l=h);break;case 2:for(n=0;n<l.length;n++)u(l[n]);break;case 3:for(l=DE(l),n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)u(l[n][i])}1===l.length?l=l[0]:c="Multi"+c;var f={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(f.id=this.id),f};var BE=IE,jE=FE;function FE(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(NE,this,e),this.length=this._features.length}function NE(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push($E(r))}function $E(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}FE.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new BE(this._pbf,e,this.extent,this._keys,this._values)};var UE=jE,VE=GE;function GE(t,e){this.layers=t.readFields(qE,{},e)}function qE(t,e,r){if(3===t){var n=new UE(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}var HE=ME.VectorTile=VE,WE=ME.VectorTileFeature=IE;function ZE(t,e,r,n){const i=[],o=0===n?(t,e,r,n,i,o)=>{t.push(new b(o,r+(o-e)/(n-e)*(i-r)))}:(t,e,r,n,i,o)=>{t.push(new b(e+(o-r)/(i-r)*(n-e),o))};for(const s of t){const t=[];for(const i of s){if(i.length<=2)continue;const s=[];for(let t=0;t<i.length-1;t++){const a=i[t].x,l=i[t].y,c=i[t+1].x,u=i[t+1].y,h=0===n?a:l,f=0===n?c:u;h<e?f>e&&o(s,a,l,c,u,e):h>r?f<r&&o(s,a,l,c,u,r):s.push(i[t]),f<e&&h>=e&&o(s,a,l,c,u,e),f>r&&h<=r&&o(s,a,l,c,u,r)}let a=i[i.length-1];const l=0===n?a.x:a.y;l>=e&&l<=r&&s.push(a),s.length&&(a=s[s.length-1],s[0].x===a.x&&s[0].y===a.y||s.push(s[0]),t.push(s))}t.length&&i.push(t)}return i}function XE(t,e,r,n,i=0,o){const s=[];if(!t.length||!r||!n)return s;const a=(t,e)=>{for(const r of t)s.push({polygon:r,bounds:e})},l=Math.ceil(Math.log2(r)),c=Math.ceil(Math.log2(n)),u=l-c,h=[];for(let t=0;t<Math.abs(u);t++)h.push(u>0?0:1);for(let t=0;t<Math.min(l,c);t++)h.push(0),h.push(1);let f=t;if(f=ZE(f,e[0].y-i,e[1].y+i,1),f=ZE(f,e[0].x-i,e[1].x+i,0),!f.length)return s;const d=[];for(h.length?d.push({polygons:f,bounds:e,depth:0}):a(f,e);d.length;){const t=d.pop(),e=t.depth,r=h[e],n=t.bounds[0],s=t.bounds[1],l=0===r?n.x:n.y,c=0===r?s.x:s.y,u=o?o(r,l,c):.5*(l+c),f=ZE(t.polygons,l-i,u+i,r),p=ZE(t.polygons,u-i,c+i,r);if(f.length){const t=0===r?u:s.x,i=1===r?u:s.y,o=[n,new b(t,i)];h.length>e+1?d.push({polygons:f,bounds:o,depth:e+1}):a(f,o)}if(p.length){const t=0===r?u:n.x,i=1===r?u:n.y,o=[new b(t,i),s];h.length>e+1?d.push({polygons:p,bounds:o,depth:e+1}):a(p,o)}}return s}function YE(t,e){const r={};if(!e)return r;for(const n of t){const t=n.layerIds.map((t=>e.getLayer(t))).filter(Boolean);if(0!==t.length){n.layers=t,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map((e=>t.filter((t=>t.id===e))[0])));for(const e of t)r[e.fqid]=n}}return r}ME.VectorTileLayer=jE;class KE{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e<t.length;e++){const r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}}encode(t){return this._stringToNumber[t]}decode(t){return this._numberToString[t]}}var JE={read:function(t,e,r,n,i){var o,s,a=8*i-n-1,l=(1<<a)-1,c=l>>1,u=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-u)-1,d>>=-u,u+=a;u>0;o=256*o+t[e+h],h+=f,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+t[e+h],h+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},write:function(t,e,r,n,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(e*l-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*m}},QE=eS,tS=JE;function eS(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}eS.Varint=0,eS.Fixed64=1,eS.Bytes=2,eS.Fixed32=5;var rS=4294967296,nS=1/rS,iS=12,oS="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function sS(t,e,r){var n,i,o=r.buf;if(n=(112&(i=o[r.pos++]))>>4,i<128)return lS(t,n,e);if(n|=(127&(i=o[r.pos++]))<<3,i<128)return lS(t,n,e);if(n|=(127&(i=o[r.pos++]))<<10,i<128)return lS(t,n,e);if(n|=(127&(i=o[r.pos++]))<<17,i<128)return lS(t,n,e);if(n|=(127&(i=o[r.pos++]))<<24,i<128)return lS(t,n,e);if(n|=(1&(i=o[r.pos++]))<<31,i<128)return lS(t,n,e);throw new Error("Expected varint not more than 10 bytes")}function aS(t){return t.type===eS.Bytes?t.readVarint()+t.pos:t.pos+1}function lS(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function cS(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),uS(r,n,e),hS(n,e)}function uS(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}function hS(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}function fS(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function dS(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function pS(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function mS(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function gS(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function yS(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function _S(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function vS(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function bS(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function xS(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function wS(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function ES(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function SS(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function TS(t,e,r){for(var n="",i=e;i<r;){var o,s,a,l=t[i],c=null,u=l>239?4:l>223?3:l>191?2:1;if(i+u>r)break;
vendor: 4,323 bytes, line 2
21===u?l<128&&(c=l):2===u?128==(192&(o=t[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&((c=(15&l)<<12|(63&o)<<6|63&s)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}function AS(t,e,r){return oS.decode(t.subarray(e,r))}function OS(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}eS.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=wS(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=SS(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=wS(this.buf,this.pos)+wS(this.buf,this.pos+4)*rS;return this.pos+=8,t},readSFixed64:function(){var t=wS(this.buf,this.pos)+SS(this.buf,this.pos+4)*rS;return this.pos+=8,t},readFloat:function(){var t=tS.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=tS.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:sS(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=iS&&oS?AS(this.buf,e,t):TS(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==eS.Bytes)return t.push(this.readVarint(e));var r=aS(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==eS.Bytes)return t.push(this.readSVarint());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==eS.Bytes)return t.push(this.readBoolean());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==eS.Bytes)return t.push(this.readFloat());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==eS.Bytes)return t.push(this.readDouble());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==eS.Bytes)return t.push(this.readFixed32());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==eS.Bytes)return t.push(this.readSFixed32());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==eS.Bytes)return t.push(this.readFixed64());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==eS.Bytes)return t.push(this.readSFixed64());var e=aS(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===eS.Varint)for(;this.buf[this.pos++]>127;);else if(e===eS.Bytes)this.pos=this.readVarint()+this.pos;else if(e===eS.Fixed32)this.pos+=4;else{if(e!==eS.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;
vendor: 13,377 bytes, line 2
2if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),ES(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),ES(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),ES(this.buf,-1&t,this.pos),ES(this.buf,Math.floor(t*nS),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),ES(this.buf,-1&t,this.pos),ES(this.buf,Math.floor(t*nS),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?cS(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=OS(this.buf,t,this.pos);var r=this.pos-e;r>=128&&fS(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),tS.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),tS.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&fS(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,eS.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,dS,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,pS,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,yS,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,mS,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,gS,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,_S,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vS,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,bS,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xS,e)},writeBytesField:function(t,e){this.writeTag(t,eS.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,eS.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,eS.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,eS.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,eS.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,eS.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,eS.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,eS.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,eS.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,eS.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var CS=p(QE);const MS=["tile","layer","source","sourceLayer","state"];class kS{constructor(t,e,r,n,i){this.type="Feature",this._vectorTileFeature=t,this._z=e,this._x=r,this._y=n,this.properties=t.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._x,this._y,this._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={type:"Feature",state:void 0,geometry:this.geometry,properties:this.properties};void 0!==this.id&&(t.id=this.id);for(const e of MS)void 0!==this[e]&&(t[e]=this[e]);return t}}class IS{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,e,r){const n=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][n]=this.stateChanges[t][n]||{},U(this.stateChanges[t][n],r),null===this.deletedStates[t]){this.deletedStates[t]={};for(const e in this.state[t])e!==n&&(this.deletedStates[t][e]=null)}else if(this.deletedStates[t]&&null===this.deletedStates[t][n]){this.deletedStates[t][n]={};for(const e in this.state[t][n])r[e]||(this.deletedStates[t][n][e]=null)}else for(const e in r)this.deletedStates[t]&&this.deletedStates[t][n]&&null===this.deletedStates[t][n][e]&&delete this.deletedStates[t][n][e]}removeFeatureState(t,e,r){if(null===this.deletedStates[t])return;const n=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&void 0!==e)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}getState(t,e){const r=String(e),n=this.state[t]||{},i=this.stateChanges[t]||{},o=U({},n[r],i[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){const r=this.deletedStates[t][e];if(null===r)return{};for(const t in r)delete o[t]}return o}initializeTileState(t,e){t.setFeatureState(this.state,e)}coalesceChanges(t,e){const r={};for(const t in this.stateChanges){this.state[t]=this.state[t]||{};const e={};for(const r in this.stateChanges[t])this.state[t][r]||(this.state[t][r]={}),U(this.state[t][r],this.stateChanges[t][r]),e[r]=this.state[t][r];r[t]=e}for(const t in this.deletedStates){this.state[t]=this.state[t]||{};const e={};if(null===this.deletedStates[t])for(const r in this.state[t])e[r]={},this.state[t][r]={};else for(const r in this.deletedStates[t]){if(null===this.deletedStates[t][r])this.state[t][r]={};else if(this.state[t][r])for(const e of Object.keys(this.deletedStates[t][r]))delete this.state[t][r][e];e[r]=this.state[t][r]}r[t]=r[t]||{},U(r[t],e)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(const n in t)t[n].setFeatureState(r,e)}}class PS{constructor(t){this.size=t,this.minimums=[],this.maximums=[],this.leaves=[]}getElevation(t,e){const r=this.toIdx(t,e);return{min:this.minimums[r],max:this.maximums[r]}}isLeaf(t,e){return this.leaves[this.toIdx(t,e)]}toIdx(t,e){return e*this.size+t}}function LS(t,e,r,n){let i=0,o=Number.MAX_VALUE;const s=1e-15;for(let a=0;a<3;a++)if(Math.abs(n[a])<s){if(r[a]<t[a]||r[a]>e[a])return null}else{const s=1/n[a];let l=(t[a]-r[a])*s,c=(e[a]-r[a])*s;if(l>c){const t=l;l=c,c=t}if(l>i&&(i=l),c<o&&(o=c),i>o)return null}return i}function RS(t,e,r,n,i,o,s,a,l,c,u){const h=n-t,f=i-e,d=o-r,p=s-t,m=a-e,g=l-r,y=u[1]*g-u[2]*m,_=u[2]*p-u[0]*g,v=u[0]*m-u[1]*p,b=h*y+f*_+d*v;if(Math.abs(b)<1e-15)return null;const x=1/b,w=c[0]-t,E=c[1]-e,S=c[2]-r,T=(w*y+E*_+S*v)*x;if(T<0||T>1)return null;const A=E*d-S*f,O=S*h-w*d,C=w*f-E*h,M=(u[0]*A+u[1]*O+u[2]*C)*x;return M<0||T+M>1?null:(p*A+m*O+g*C)*x}function DS(t,e,r){return(t-e)/(r-e)}function zS(t,e,r,n,i,o,s,a,l){const c=1<<r,u=o-n,h=s-i,f=(t+0)/c*u+n,d=(t+1)/c*u+n,p=(e+0)/c*h+i,m=(e+1)/c*h+i;a[0]=f,a[1]=p,l[0]=d,l[1]=m}const BS=100;class jS{constructor(t){if(this.maximums=[],this.minimums=[],this.leaves=[],this.childOffsets=[],this.nodeCount=0,this.dem=t,this._siblingOffset=[[0,0],[1,0],[0,1],[1,1]],!this.dem)return;const e=$S(this.dem),r=e.length-1,n=e[r],i=n.minimums,o=n.maximums,s=n.leaves;this._addNode(i[0],o[0],s[0]),this._construct(e,0,0,r,0)}raycastRoot(t,e,r,n,i,o,s=1){return LS([t,e,-BS],[r,n,this.maximums[0]*s],i,o)}raycast(t,e,r,n,i,o,s=1){if(!this.nodeCount)return null;const a=this.raycastRoot(t,e,r,n,i,o,s);if(null==a)return null;const l=[],c=[],u=[],h=[],f=[{idx:0,t:a,nodex:0,nodey:0,depth:0}];for(;f.length>0;){const{idx:a,t:d,nodex:p,nodey:m,depth:g}=f.pop();if(this.leaves[a]){zS(p,m,g,t,e,r,n,u,h);const a=1<<g,l=(p+0)/a,c=(p+1)/a,f=(m+0)/a,y=(m+1)/a,_=NS(l,f,this.dem)*s,v=NS(c,f,this.dem)*s,b=NS(c,y,this.dem)*s,x=NS(l,y,this.dem)*s,w=RS(u[0],u[1],_,h[0],u[1],v,h[0],h[1],b,i,o),E=RS(h[0],h[1],b,u[0],h[1],x,u[0],u[1],_,i,o),S=Math.min(null!==w?w:Number.MAX_VALUE,null!==E?E:Number.MAX_VALUE);if(S!==Number.MAX_VALUE)return S;{const t=Sv.scaleAndAdd([],i,o,d);if(FS(_,v,x,b,DS(t[0],u[0],h[0]),DS(t[1],u[1],h[1]))>=t[2])return d}continue}let y=0;for(let f=0;f<this._siblingOffset.length;f++){zS((p<<1)+this._siblingOffset[f][0],(m<<1)+this._siblingOffset[f][1],g+1,t,e,r,n,u,h),u[2]=-BS,h[2]=this.maximums[this.childOffsets[a]+f]*s;const d=LS(u,h,i,o);if(null!=d){const t=d;l[f]=t;let e=!1;for(let r=0;r<y&&!e;r++)t>=l[c[r]]&&(c.splice(r,0,f),e=!0);e||(c[y]=f),y++}}for(let t=0;t<y;t++){const e=c[t];f.push({idx:this.childOffsets[a]+e,t:l[e],nodex:(p<<1)+this._siblingOffset[e][0],nodey:(m<<1)+this._siblingOffset[e][1],depth:g+1})}}return null}_addNode(t,e,r){return this.minimums.push(t),this.maximums.push(e),this.leaves.push(r),this.childOffsets.push(0),this.nodeCount++}_construct(t,e,r,n,i){if(1===t[n].isLeaf(e,r))return;this.childOffsets[i]||(this.childOffsets[i]=this.nodeCount);const o=n-1,s=t[o];let a=0,l=0;for(let t=0;t<this._siblingOffset.length;t++){const n=2*e+this._siblingOffset[t][0],i=2*r+this._siblingOffset[t][1],o=s.getElevation(n,i),c=s.isLeaf(n,i),u=this._addNode(o.min,o.max,c);c&&(a|=1<<t),l||(l=u)}for(let n=0;n<this._siblingOffset.length;n++)a&1<<n||this._construct(t,2*e+this._siblingOffset[n][0],2*r+this._siblingOffset[n][1],o,l+n)}}function FS(t,e,r,n,i,o){return Co(Co(t,r,o),Co(e,n,o),i)}function NS(t,e,r){const n=r.dim,i=D(t*n-.5,0,n-1),o=D(e*n-.5,0,n-1),s=Math.floor(i),a=Math.floor(o),l=Math.min(s+1,n-1),c=Math.min(a+1,n-1);return FS(r.get(s,a),r.get(l,a),r.get(s,c),r.get(l,c),i-s,o-a)}function $S(t){const e=t.dim,r=5,n=8,i=Math.ceil(Math.log2(e/n)),o=[];let s=Math.ceil(Math.pow(2,i));const a=1/s,l=(t,e,r,n,i)=>{const o=n?1:0,s=t*r,a=(t+1)*r-o,l=e*r,c=(e+1)*r-o;i[0]=s,i[1]=l,i[2]=a,i[3]=c};let c=new PS(s);const u=[];for(let e=0;e<s*s;e++){l(e%s,Math.floor(e/s),a,!1,u);const r=NS(u[0],u[1],t),n=NS(u[2],u[1],t),i=NS(u[2],u[3],t),o=NS(u[0],u[3],t);c.minimums.push(Math.min(r,n,i,o)),c.maximums.push(Math.max(r,n,i,o)),c.leaves.push(1)}for(o.push(c),s/=2;s>=1;s/=2){const t=o[o.length-1];c=new PS(s);for(let e=0;e<s*s;e++){l(e%s,Math.floor(e/s),2,!0,u);const n=t.getElevation(u[0],u[1]),i=t.getElevation(u[2],u[1]),o=t.getElevation(u[2],u[3]),a=t.getElevation(u[0],u[3]),h=t.isLeaf(u[0],u[1]),f=t.isLeaf(u[2],u[1]),d=t.isLeaf(u[2],u[3]),p=t.isLeaf(u[0],u[3]),m=Math.min(n.min,i.min,o.min,a.min),g=Math.max(n.max,i.max,o.max,a.max),y=h&&f&&d&&p;c.maximums.push(g),c.minimums.push(m),g-m<=r&&y?c.leaves.push(1):c.leaves.push(0)}o.push(c)}return o}const US={mapbox:[6553.6,25.6,.1,1e4],terrarium:[256,1,1/256,32768]};function VS(t,e,r){return(256*t*256+256*e+r)/10-1e4}function GS(t,e,r){return 256*t+e+r/256-32768}class qS{get tree(){return this._tree||this._buildQuadTree(),this._tree}constructor(t,e,r,n=!1){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return it(`"${r}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=e.height;const i=this.dim=e.height-2,o=new Uint32Array(e.data.buffer);if(this.pixels=new Uint8Array(e.data.buffer),this.floatView=new Float32Array(e.data.buffer),this.borderReady=n,this._modifiedForSources={},!n){for(let t=0;t<i;t++)o[this._idx(-1,t)]=o[this._idx(0,t)],o[this._idx(i,t)]=o[this._idx(i-1,t)],o[this._idx(t,-1)]=o[this._idx(t,0)],o[this._idx(t,i)]=o[this._idx(t,i-1)];o[this._idx(-1,-1)]=o[this._idx(0,0)],o[this._idx(i,-1)]=o[this._idx(i-1,0)],o[this._idx(-1,i)]=o[this._idx(0,i-1)],o[this._idx(i,i)]=o[this._idx(i-1,i-1)]}const s="terrarium"===r?GS:VS;for(let t=0;t<o.length;++t){const e=4*t;this.floatView[t]=s(this.pixels[e],this.pixels[e+1],this.pixels[e+2])}this._timestamp=vr.now()}_buildQuadTree(){this._tree=new jS(this)}get(t,e,r=!1){r&&(t=D(t,-1,this.dim),e=D(e,-1,this.dim));const n=this._idx(t,e);return this.floatView[n]}set(t,e,r){const n=this._idx(t,e),i=this.floatView[n];return this.floatView[n]=r,r-i}static getUnpackVector(t){return US[t]}_idx(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)}static pack(t,e){const r=[0,0,0,0],n=qS.getUnpackVector(e);let i=Math.floor((t+n[3])/n[2]);return r[2]=i%256,i=Math.floor(i/256),r[1]=i%256,i=Math.floor(i/256),r[0]=i,r}getPixels(){return new bw({width:this.stride,height:this.stride},this.pixels)}backfillBorder(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let n=e*this.dim,i=e*this.dim+this.dim,o=r*this.dim,s=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:o=s-1;break;case 1:s=o+1}const a=-e*this.dim,l=-r*this.dim;for(let e=o;e<s;e++)for(let r=n;r<i;r++){const n=4*this._idx(r,e),i=4*this._idx(r+a,e+l);this.pixels[n+0]=t.pixels[i+0],this.pixels[n+1]=t.pixels[i+1],this.pixels[n+2]=t.pixels[i+2],this.pixels[n+3]=t.pixels[i+3]}}onDeserialize(){this._tree&&(this._tree.dem=this)}}Vl(qS,"DEMData"),Vl(jS,"DemMinMaxQuadTree",{omit:["dem"]});class HS{isDataAvailableAtPoint(t){const e=this._source();if(this.isUsingMockSource()||!e||t.y<0||t.y>1)return!1;const r=e.getSource().maxzoom,n=1<<r,i=Math.floor(t.x),o=t.x-i,s=Math.floor(o*n),a=Math.floor(t.y*n),l=this.findDEMTileFor(new jv(r,i,r,s,a));return!(!l||!l.dem)}
2getAtPointOrZero(t,e=0){return this.getAtPoint(t,e)||0}getAtPoint(t,e,r=!0){if(this.isUsingMockSource())return null;null==e&&(e=null);const n=this._source();if(!n)return e;if(t.y<0||t.y>1)return e;const i=n.getSource().maxzoom,o=1<<i,s=Math.floor(t.x),a=t.x-s,l=new jv(i,s,i,Math.floor(a*o),Math.floor(t.y*o)),c=this.findDEMTileFor(l);if(!c||!c.dem)return e;const u=c.dem,h=1<<c.tileID.canonical.z,f=(a*h-c.tileID.canonical.x)*u.dim,d=(t.y*h-c.tileID.canonical.y)*u.dim,p=Math.floor(f),m=Math.floor(d);return(r?this.exaggeration():1)*Co(Co(u.get(p,m),u.get(p,m+1),d-m),Co(u.get(p+1,m),u.get(p+1,m+1),d-m),f-p)}getAtTileOffset(t,e,r){const n=1<<t.canonical.z;return this.getAtPointOrZero(new wx(t.wrap+(t.canonical.x+e/Li)/n,(t.canonical.y+r/Li)/n))}getAtTileOffsetFunc(t,e,r,n){return i=>{const o=this.getAtTileOffset(t,i.x,i.y),s=n.upVector(t.canonical,i.x,i.y),a=n.upVectorScale(t.canonical,e,r).metersToTile;return Sv.scale(s,s,o*a),s}}getForTilePoints(t,e,r,n){if(this.isUsingMockSource())return!1;const i=WS.create(this,t,n);return!!i&&(e.forEach((t=>{t[2]=this.exaggeration()*i.getElevationAt(t[0],t[1],r)})),!0)}getMinMaxForTile(t){if(this.isUsingMockSource())return null;const e=this.findDEMTileFor(t);if(!e||!e.dem)return null;const r=e.dem.tree,n=e.tileID,i=1<<t.canonical.z-n.canonical.z;let o=t.canonical.x/i-n.canonical.x,s=t.canonical.y/i-n.canonical.y,a=0;for(let e=0;e<t.canonical.z-n.canonical.z&&!r.leaves[a];e++){o*=2,s*=2;const t=2*Math.floor(s)+Math.floor(o);a=r.childOffsets[a]+t,o%=1,s%=1}return{min:this.exaggeration()*r.minimums[a],max:this.exaggeration()*r.maximums[a]}}getMinElevationBelowMSL(){throw new Error("Pure virtual method called.")}raycast(t,e,r){throw new Error("Pure virtual method called.")}pointCoordinate(t){throw new Error("Pure virtual method called.")}_source(){throw new Error("Pure virtual method called.")}isUsingMockSource(){throw new Error("Pure virtual method called.")}exaggeration(){throw new Error("Pure virtual method called.")}findDEMTileFor(t){throw new Error("Pure virtual method called.")}get visibleDemTiles(){throw new Error("Getter must be implemented in subclass.")}getMinMaxForVisibleTiles(){const t=this.visibleDemTiles;if(0===t.length)return null;let e=!1,r=Number.MAX_VALUE,n=Number.MIN_VALUE;for(const i of t){const t=this.getMinMaxForTile(i.tileID);t&&(r=Math.min(r,t.min),n=Math.max(n,t.max),e=!0)}return e?{min:r,max:n}:null}}class WS{constructor(t,e,r){this._demTile=t,this._dem=this._demTile.dem,this._scale=e,this._offset=r}static create(t,e,r){const n=r||t.findDEMTileFor(e);if(!n||!n.dem)return;const i=n.dem,o=n.tileID,s=1<<e.canonical.z-o.canonical.z,a=(e.canonical.x/s-o.canonical.x)*i.dim,l=(e.canonical.y/s-o.canonical.y)*i.dim,c=i.dim/Li/s;return new WS(n,c,[a,l])}tileCoordToPixel(t,e){const r=t*this._scale+this._offset[0],n=e*this._scale+this._offset[1],i=Math.floor(r),o=Math.floor(n);return new b(i,o)}getElevationAt(t,e,r,n){const i=t*this._scale+this._offset[0],o=e*this._scale+this._offset[1],s=Math.floor(i),a=Math.floor(o),l=this._dem;return n=!!n,r?Co(Co(l.get(s,a,n),l.get(s,a+1,n),o-a),Co(l.get(s+1,a,n),l.get(s+1,a+1,n),o-a),i-s):l.get(s,a,n)}getElevationAtPixel(t,e,r){return this._dem.get(t,e,!!r)}getMeterToDEM(t){return(1<<this._demTile.tileID.canonical.z)*dx(1,t)*this._dem.stride}}class ZS{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new $l(Li,16,0),this.featureIndexArray=new zu,this.promoteId=e}insert(t,e,r,n,i,o=0){const s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i,o);const a=this.grid;for(let t=0;t<e.length;t++){const r=e[t],n=[1/0,1/0,-1/0,-1/0];for(let t=0;t<r.length;t++){const e=r[t];n[0]=Math.min(n[0],e.x),n[1]=Math.min(n[1],e.y),n[2]=Math.max(n[2],e.x),n[3]=Math.max(n[3],e.y)}n[0]<Li&&n[1]<Li&&n[2]>=0&&n[3]>
vendor: 11,032 bytes, line 2
2=0&&a.insert(s,n[0],n[1],n[2],n[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new HE(new CS(this.rawTileData)).layers,this.sourceLayerCoder=new KE(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const t in this.vtLayers)this.vtFeatures[t]=[]}return this.vtLayers}query(t,e,r,n){this.loadVTLayers();const i=t.params||{},o=Fa(i.filter),s=t.tileResult,a=t.transform,l=s.bufferedTilespaceBounds,c=(t,e,r,n)=>Zx(s.bufferedTilespaceGeometry,t,e,r,n),u=this.grid.query(l.min.x,l.min.y,l.max.x,l.max.y,c);u.sort(YS);let h=null;a.elevation&&u.length>0&&(h=WS.create(a.elevation,this.tileID));const f={};let d;for(let a=0;a<u.length;a++){const l=u[a];if(l===d)continue;d=l;const c=this.featureIndexArray.get(l);let p=null;this.loadMatchingFeature(f,c,o,i.layers,i.availableImages,e,r,n,((e,r,n,i=0)=>(p||(p=Px(e,this.tileID.canonical,t.tileTransform)),r.queryIntersectsFeature(s,e,n,p,this.z,t.transform,t.pixelPosMatrix,h,i))))}return f}loadMatchingFeature(t,e,r,n,i,o,s,a,l){const{featureIndex:c,bucketIndex:u,sourceLayerIndex:h,layoutVertexArrayOffset:f}=e,d=this.bucketLayerIDs[u];if(n&&!rt(n,d))return;const p=this.sourceLayerCoder.decode(h),m=this.vtLayers[p].feature(c);if(r.needGeometry){const t=Lx(m,!0);if(!r.filter(new bc(this.tileID.overscaledZ),t,this.tileID.canonical))return}else if(!r.filter(new bc(this.tileID.overscaledZ),m))return;const g=this.getId(m,p);for(let e=0;e<d.length;e++){const r=d[e];if(n&&n.indexOf(r)<0)continue;const u=o[r];if(!u)continue;let h={};void 0!==g&&a&&(h=a.getState(u.sourceLayer||"_geojsonTileLayer",g));const p=U({},s[r]);p.paint=XS(p.paint,u.paint,m,h,i),p.layout=XS(p.layout,u.layout,m,h,i);const y=!l||l(m,u,h,f);if(!y)continue;const _=new kS(m,this.z,this.x,this.y,g);_.layer=p;let v=t[r];void 0===v&&(v=t[r]=[]),v.push({featureIndex:c,feature:_,intersectionZ:y})}}lookupSymbolFeatures(t,e,r,n,i,o,s,a){const l={};this.loadVTLayers();const c=Fa(i);for(const i of t)this.loadMatchingFeature(l,{bucketIndex:r,sourceLayerIndex:n,featureIndex:i,layoutVertexArrayOffset:0},c,o,s,a,e);return l}loadFeature(t){const{featureIndex:e,sourceLayerIndex:r}=t;this.loadVTLayers();const n=this.sourceLayerCoder.decode(r),i=this.vtFeatures[n];if(i[e])return i[e];const o=this.vtLayers[n].feature(e);return i[e]=o,o}hasLayer(t){for(const e of this.bucketLayerIDs)for(const r of e)if(t===r)return!0;return!1}getId(t,e){let r=t.id;if(this.promoteId){const n="string"==typeof this.promoteId?this.promoteId:this.promoteId[e];null!=n&&(r=t.properties[n]),"boolean"==typeof r&&(r=Number(r))}return r}}function XS(t,e,r,n,i){return J(t,((t,o)=>{const s=e instanceof Cc?e.get(o):null;return s&&s.evaluate?s.evaluate(r,n,i):s}))}function YS(t,e){return e-t}Vl(ZS,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});const KS=Zc([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),JS=Zc([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),QS=Zc([{name:"a_projected_pos",components:4,type:"Float32"}],4);Zc([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const tT=Zc([{name:"a_z_offset",components:1,type:"Float32"}],4),eT=Zc([{name:"a_texb",components:2,type:"Uint16"}]),rT=Zc([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),nT=Zc([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"},{name:"a_z_offset",components:1,type:"Float32"}]);Zc([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const iT=Zc([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),oT=Zc([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Zc([{name:"triangle",components:3,type:"Uint16"}]),Zc([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Uint8",name:"flipState"}]),Zc([{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Float32",name:"zOffset"},{type:"Uint8",name:"hasIconTextFit"}]),Zc([{type:"Float32",name:"offsetX"}]),Zc([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var sT=24;const aT=128;function lT(t,e){const{expression:r}=e;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new bc(t+1))};if("source"===r.kind)return{kind:"source"};{const{zoomStops:e,interpolationType:n}=r;let i=0;for(;i<e.length&&e[i]<=t;)i++;i=Math.max(0,i-1);let o=i;for(;o<e.length&&e[o]<t+1;)o++;o=Math.min(e.length-1,o);const s=e[i],a=e[o];return"composite"===r.kind?{kind:"composite",minZoom:s,maxZoom:a,interpolationType:n}:{kind:"camera",minZoom:s,maxZoom:a,minSize:r.evaluate(new bc(s)),maxSize:r.evaluate(new bc(a)),interpolationType:n}}}function cT(t,{uSize:e,uSizeT:r},{lowerSize:n,upperSize:i}){return"source"===t.kind?n/aT:"composite"===t.kind?Co(n/aT,i/aT,r):e}function uT(t,e){let r=0,n=0;if("constant"===t.kind)n=t.layoutSize;else if("source"!==t.kind){const{interpolationType:i,minZoom:o,maxZoom:s}=t,a=i?D(ns.interpolationFactor(i,e,o,s),0,1):0;"camera"===t.kind?n=Co(t.minSize,t.maxSize,a):r=a}return{uSizeT:r,uSize:n}}var hT=Object.freeze({__proto__:null,SIZE_PACK_FACTOR:aT,evaluateSizeForFeature:cT,evaluateSizeForZoom:uT,getSizeData:lT});function fT(t,e,r){const n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),_c.applyArabicShaping&&(t=_c.applyArabicShaping(t)),t}function dT(t,e,r){return t.sections.forEach((t=>{t.text=fT(t.text,e,r)})),t}function pT(t){const e={},r={},n=[];let i=0;function o(e){n.push(t[e]),i++}function s(t,e,i){const o=r[t];return delete r[t],r[e]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(i[0]),o}function a(t,r,i){const o=e[r];return delete e[r],e[t]=o,n[o].geometry[0].shift(),n[o].geometry[0]=i[0].concat(n[o].geometry[0]),o}function l(t,e,r){const n=r?e[0][e[0].length-1]:e[0][0];return`${t}:${n.x}:${n.y}`}for(let c=0;c<t.length;c++){const u=t[c],h=u.geometry,f=u.text?u.text.toString():null;if(!f){o(c);continue}const d=l(f,h),p=l(f,h,!0);if(d in r&&p in e&&r[d]!==e[p]){const t=a(d,p,h),i=s(d,p,n[t].geometry);delete e[d],delete r[p],r[l(f,n[i].geometry,!0)]=i,n[t].geometry=null}else d in r?s(d,p,h):p in e?a(d,p,h):(o(c),e[d]=i-1,r[p]=i-1)}return n.filter((t=>t.geometry))}const mT={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂","←":"↑","→":"↓"};function gT(t,e){let r="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n+1)||null,o=t.charCodeAt(n-1)||null;!e&&(i&&ec(i)&&!mT[t[n+1]]||o&&ec(o)&&!mT[t[n-1]])||!mT[t[n]]?r+=t[n]:r+=mT[t[n]]}return r}function yT(t){return"︶"===t||"﹈"===t||"︸"===t||"﹄"===t||"﹂"===t||"︾"===t||"︼"===t||"︺"===t||"︘"===t||"﹀"===t||"︐"===t||"︓"===t||"︔"===t||"`"===t||" ̄"===t||"︑"===t||"︒"===t}function _T(t){return"︵"===t||"﹇"===t||"︷"===t||"﹃"===t||"﹁"===t||"︽"===t||"︻"===t||"︹"===t||"︗"===t||"︿"===t}const vT=3;function bT(t,e,r){e.glyphs=[],1===t&&r.readMessage(xT,e)}function xT(t,e,r){if(3===t){const{id:t,bitmap:n,width:i,height:o,left:s,top:a,advance:l}=r.readMessage(wT,{});e.glyphs.push({id:t,bitmap:new _w({width:i+2*vT,height:o+2*vT},n),metrics:{width:i,height:o,left:s,top:a,advance:l}})}else 4===t?e.ascender=r.readSVarint():5===t&&(e.descender=r.readSVarint())}function wT(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function ET(t){return new CS(t).readFields(bT,{})}const ST=vT,TT={horizontal:1,vertical:2,horizontalOnly:3},AT=-17;function OT(t){for(const e of t)if(0!==e.positionedGlyphs.length)return!1;return!0}const CT=57344,MT=63743;
2class kT{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(t,e){const r=new kT;return r.scale=t||1,r.fontStack=e,r}static forImage(t){const e=new kT;return e.imageName=t,e}}class IT{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,e){const r=new IT;for(let n=0;n<t.sections.length;n++){const i=t.sections[n];i.image?r.addImageSection(i):r.addTextSection(i,e)}return r}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSections(){return this.sections}getSectionIndex(t){return this.sectionIndex[t]}getCodePoint(t){return this.text.codePointAt(t)}verticalizePunctuation(t){this.text=gT(this.text,t)}trim(){let t=0;for(let e=0;e<this.text.length&&RT[this.text.charCodeAt(e)];e++)t++;let e=this.text.length;for(let r=this.text.length-1;r>=0&&r>=t&&RT[this.text.charCodeAt(r)];r--)e--;this.text=this.text.substring(t,e),this.sectionIndex=this.sectionIndex.slice(t,e)}substring(t,e){const r=new IT;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,e)=>Math.max(t,this.sections[e].scale)),0)}addTextSection(t,e){this.text+=t.text,this.sections.push(kT.forText(t.scale,t.fontStack||e));const r=this.sections.length-1;for(let e=0;e<t.text.length;++e)this.sectionIndex.push(r)}addImageSection(t){const e=t.image?t.image.namePrimary:"";if(0===e.length)return void it("Can't add FormattedSection with an empty image.");const r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCodePoint(r),this.sections.push(kT.forImage(e)),this.sectionIndex.push(this.sections.length-1)):it("Reached maximum number of images "+(MT-CT+2))}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=MT?null:++this.imageSectionID:(this.imageSectionID=CT,this.imageSectionID)}}function PT(t,e){const r=[],n=t.text;let i=0;for(const n of e)r.push(t.substring(i,n)),i=n;return i<n.length&&r.push(t.substring(i,n.length)),r}function LT(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p){const m=IT.fromFeature(t,i);h===TT.vertical&&m.verticalizePunctuation(f);let g=[];const y=UT(m,c,o,e,n,d),{processBidirectionalText:_,processStyledBidirectionalText:v}=_c;if(_&&1===m.sections.length){const t=_(m.toString(),y);for(const e of t){const t=new IT;t.text=e,t.sections=m.sections;for(let r=0;r<e.length;r++)t.sectionIndex.push(0);g.push(t)}}else if(v){const t=v(m.text,m.sectionIndex,y);for(const e of t){const t=new IT;t.text=e[0],t.sectionIndex=e[1],t.sections=m.sections,g.push(t)}}else g=PT(m,y);const b=[],x={positionedLines:b,text:m.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:h,iconsInText:!1,verticalizable:!1,hasBaseline:!1};return GT(x,e,r,n,g,s,a,l,h,c,f,p),!OT(b)&&x}const RT={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},DT={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function zT(t,e,r,n,i,o){if(e.imageName){const t=n[e.imageName];return t?t.displaySize[0]*e.scale*sT/o+i:0}{const n=r[e.fontStack],o=n&&n.glyphs[t];return o?o.metrics.advance*e.scale+i:0}}function BT(t,e,r,n,i,o){let s=0;for(let r=0;r<t.length();r++){const a=t.getSection(r);s+=zT(t.getCodePoint(r),a,n,i,e,o)}return s/Math.max(1,Math.ceil(s/r))}function jT(t,e,r,n){const i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function FT(t,e,r){let n=0;return 10===t&&(n-=1e4),r&&(n+=150),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function NT(t,e,r,n,i,o){let s=null,a=jT(e,r,i,o);for(const t of n){const n=jT(e-t.x,r,i,o)+t.badness;n<=a&&(s=t,a=n)}return{index:t,x:e,priorBreak:s,badness:a}}function $T(t){return t?$T(t.priorBreak).concat(t.index):[]}function UT(t,e,r,n,i,o){if(!t)return[];const s=[],a=BT(t,e,r,n,i,o),l=t.text.indexOf("​")>=0;let c=0;for(let r=0;r<t.length();r++){const u=t.getSection(r),h=t.getCodePoint(r);if(RT[h]||(c+=zT(h,u,n,i,e,o)),r<t.length()-1){const e=Jl(h);(DT[h]||e||u.imageName)&&s.push(NT(r+1,c,a,s,FT(h,t.getCodePoint(r+1),e&&l),!1))}}return $T(NT(t.length(),c,a,s,0,!0))}function VT(t){let e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function GT(t,e,r,n,i,o,s,a,l,c,u,h){let f=0,d=0,p=0;const m="right"===a?1:"left"===a?0:.5;let g=!1;for(const t of i){const r=t.getSections();for(const t of r){if(t.imageName)continue;const r=e[t.fontStack];if(r&&(g=void 0!==r.ascender&&void 0!==r.descender,!g))break}if(!g)break}let y=0;for(const s of i){s.trim();const i=s.getMaxScale(),a=(i-1)*sT,_={positionedGlyphs:[],lineOffset:0};t.positionedLines[y]=_;const v=_.positionedGlyphs;let b=0;if(!s.length()){d+=o,++y;continue}let x=0,w=0;for(let o=0;o<s.length();
2o++){const a=s.getSection(o),p=s.getSectionIndex(o),m=s.getCodePoint(o);let y=a.scale,_=null,E=null,S=null,T=sT,A=0;const O=!(l===TT.horizontal||!u&&!Ql(m)||u&&(RT[m]||rc(m)));if(a.imageName){const e=n[a.imageName];if(!e)continue;S=a.imageName,t.iconsInText=t.iconsInText||!0,E=e.paddedRect;const r=e.displaySize;y=y*sT/h,_={width:r[0],height:r[1],left:0,top:-ST,advance:O?r[1]:r[0],localGlyph:!1},A=g?-_.height*y:AT+i*sT-r[1]*y,T=_.advance;const o=(O?r[0]:r[1])*y-sT*i;o>0&&o>b&&(b=o)}else{const t=r[a.fontStack];if(!t)continue;t[m]&&(E=t[m]);const n=e[a.fontStack];if(!n)continue;const o=n.glyphs[m];if(!o)continue;if(_=o.metrics,T=8203!==m?sT:0,g){const t=void 0!==n.ascender?Math.abs(n.ascender):0,e=void 0!==n.descender?Math.abs(n.descender):0,r=(t+e)*y;x<r&&(x=r,w=(t-e)/2*y),A=-t*y}else A=AT+(i-y)*sT}O?(t.verticalizable=!0,v.push({glyph:m,imageName:S,x:f,y:d+A,vertical:O,scale:y,localGlyph:_.localGlyph,fontStack:a.fontStack,sectionIndex:p,metrics:_,rect:E}),f+=T*y+c):(v.push({glyph:m,imageName:S,x:f,y:d+A,vertical:O,scale:y,localGlyph:_.localGlyph,fontStack:a.fontStack,sectionIndex:p,metrics:_,rect:E}),f+=_.advance*y+c)}if(0!==v.length){const t=f-c;p=Math.max(t,p),g?qT(v,m,b,w,o*i/2):qT(v,m,b,0,o/2)}f=0;const E=o*i+b;_.lineOffset=Math.max(b,a),d+=E,++y}const _=d,{horizontalAlign:v,verticalAlign:b}=VT(s);HT(t.positionedLines,m,v,b,p,_),t.top+=-b*_,t.bottom=t.top+_,t.left+=-v*p,t.right=t.left+p,t.hasBaseline=g}function qT(t,e,r,n,i){if(!(e||r||n||i))return;const o=t.length-1,s=t[o],a=s.metrics.advance*s.scale,l=(s.x+a)*e;for(let e=0;e<=o;e++)t[e].x-=l,t[e].y+=r+n+i}function HT(t,e,r,n,i,o){const s=(e-r)*i,a=-o*n;for(const e of t)for(const t of e.positionedGlyphs)t.x+=s,t.y+=a}function WT(t,e,r,n){const{horizontalAlign:i,verticalAlign:o}=VT(n),s=r[0],a=r[1],l=s-t.displaySize[0]*i,c=l+t.displaySize[0],u=a-t.displaySize[1]*o;return{imagePrimary:t,imageSecondary:e,top:u,bottom:u+t.displaySize[1],left:l,right:c}}function ZT(t,e,r,n,i,o){const s=t.imagePrimary;let a;if(s.content){const t=s.content,e=s.pixelRatio||1;a=[t[0]/e,t[1]/e,s.displaySize[0]-t[2]/e,s.displaySize[1]-t[3]/e]}const l=e.left*o,c=e.right*o;let u,h,f,d;"width"===r||"both"===r?(d=i[0]+l-n[3],h=i[0]+c+n[1]):(d=i[0]+(l+c-s.displaySize[0])/2,h=d+s.displaySize[0]);const p=e.top*o,m=e.bottom*o;return"height"===r||"both"===r?(u=i[1]+p-n[0],f=i[1]+m+n[2]):(u=i[1]+(p+m-s.displaySize[1])/2,f=u+s.displaySize[1]),{imagePrimary:s,imageSecondary:void 0,top:u,right:h,bottom:f,left:d,collisionPadding:a}}class XT extends b{constructor(t,e,r,n,i){super(t,e),this.angle=n,this.z=r,void 0!==i&&(this.segment=i)}clone(){return new XT(this.x,this.y,this.z,this.angle,this.segment)}}function YT(t,e,r,n,i){if(void 0===e.segment)return!0;let o=e,s=e.segment+1,a=0;for(;a>-r/2;){if(s--,s<0)return!1;a-=t[s].dist(o),o=t[s]}a+=t[s].dist(t[s+1]),s++;const l=[];let c=0;for(;a<r/2;){const e=t[s-1],r=t[s],o=t[s+1];if(!o)return!1;let u=e.angleTo(r)-r.angleTo(o);for(u=Math.abs((u+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:a,angleDelta:u}),c+=u;a-l[0].distance>n;)c-=l.shift().angleDelta;if(c>i)return!1;s++,a+=r.dist(o)}return!0}function KT(t){let e=0;for(let r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function JT(t,e,r){return t?.6*e*r:0}function QT(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function tA(t,e,r,n,i,o){const s=JT(r,i,o),a=QT(r,n)*o;let l=0;const c=KT(t)/2;for(let r=0;r<t.length-1;r++){const n=t[r],i=t[r+1],o=n.dist(i);if(l+o>c){const u=(c-l)/o,h=Co(n.x,i.x,u),f=Co(n.y,i.y,u),d=new XT(h,f,0,i.angleTo(n),r);return!s||YT(t,d,a,s,e)?d:void 0}l+=o}}function eA(t,e,r,n,i,o,s,a,l){const c=JT(n,o,s),u=QT(n,i),h=u*s,f=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h<e/4&&(e=h+e/4),rA(t,f?e/2*a%e:(u/2+2*o)*s*a%e,e,c,r,h,f,!1,l)}function rA(t,e,r,n,i,o,s,a,l){const c=o/2,u=KT(t);let h=0,f=e-r,d=[];for(let e=0;e<t.length-1;e++){const s=t[e],a=t[e+1],p=s.dist(a),m=a.angleTo(s);for(;f+r<h+p;){f+=r;const g=(f-h)/p,y=Co(s.x,a.x,g),_=Co(s.y,a.y,g);if(y>=0&&y<l&&_>=0&&_<l&&f-c>=0&&f+c<=u){const r=new XT(y,_,0,m,e);n&&!YT(t,r,o,n,i)||d.push(r)}}h+=p}return a||d.length||s||(d=rA(t,h/2,r,n,i,o,s,!0,l)),d}function nA(t,e,r,n,i){const o=[];for(let s=0;s<t.length;s++){const a=t[s];let l;for(let t=0;t<a.length-1;t++){let s=a[t],c=a[t+1];s.x<e&&c.x<e||(s.x<e?s=new b(e,s.y+(c.y-s.y)*((e-s.x)/(c.x-s.x)))._round():c.x<e&&(c=new b(e,s.y+(c.y-s.y)*((e-s.x)/(c.x-s.x)))._round()),s.y<r&&c.y<r||(s.y<r?s=new b(s.x+(c.x-s.x)*((r-s.y)/(c.y-s.y)),r)._round():c.y<r&&(c=new b(s.x+(c.x-s.x)*((r-s.y)/(c.y-s.y)),r)._round()),s.x>=n&&c.x>=n||(s.x>=n?s=new b(n,s.y+(c.y-s.y)*((n-s.x)/(c.x-s.x)))._round():c.x>=n&&(c=new b(n,s.y+(c.y-s.y)*((n-s.x)/(c.x-s.x)))._round()),s.y>=i&&c.y>=i||(s.y>=i?s=new b(s.x+(c.x-s.x)*((i-s.y)/(c.y-s.y)),i)._round():c.y>=i&&(c=new b(s.x+(c.x-s.x)*((i-s.y)/(c.y-s.y)),i)._round()),l&&s.equals(l[l.length-1])||(l=[s],o.push(l)),l.push(c)))))}}return o}function iA(t){let e=0,r=0;for(const n of t)e+=n.w*n.h,r=Math.max(r,n.w);t.sort(((t,e)=>e.h-t.h));const n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}];let i=0,o=0;for(const e of t)for(let t=n.length-1;t>=0;t--){const r=n[t];if(!(e.w>r.w||e.h>
2r.h)){if(e.x=r.x,e.y=r.y,o=Math.max(o,e.y+e.h),i=Math.max(i,e.x+e.w),e.w===r.w&&e.h===r.h){const e=n.pop();t<n.length&&(n[t]=e)}else e.h===r.h?(r.x+=e.w,r.w-=e.w):e.w===r.w?(r.y+=e.h,r.h-=e.h):(n.push({x:r.x+e.w,y:r.y,w:r.w-e.w,h:e.h}),r.y+=e.h,r.h-=e.h);break}}return{w:i,h:o,fill:e/(i*o)||0}}Vl(XT,"Anchor");const oA=1;class sA{constructor(t,{pixelRatio:e,version:r,stretchX:n,stretchY:i,content:o}){this.paddedRect=t,this.pixelRatio=e,this.stretchX=n,this.stretchY=i,this.content=o,this.version=r}get tl(){return[this.paddedRect.x+oA,this.paddedRect.y+oA]}get br(){return[this.paddedRect.x+this.paddedRect.w-oA,this.paddedRect.y+this.paddedRect.h-oA]}get displaySize(){return[(this.paddedRect.w-2*oA)/this.pixelRatio,(this.paddedRect.h-2*oA)/this.pixelRatio]}}class aA{constructor(t,e){const r={},n={};this.haveRenderCallbacks=[];const i=[];this.addImages(t,r,i),this.addImages(e,n,i);const{w:o,h:s}=iA(i),a=new vw({width:o||1,height:s||1});for(const e in t){const n=t[e],i=r[e].paddedRect;vw.copy(n.data,a,{x:0,y:0},{x:i.x+oA,y:i.y+oA},n.data)}for(const t in e){const r=e[t],i=n[t].paddedRect,o=i.x+oA,s=i.y+oA,l=r.data.width,c=r.data.height;vw.copy(r.data,a,{x:0,y:0},{x:o,y:s},r.data),vw.copy(r.data,a,{x:0,y:c-1},{x:o,y:s-1},{width:l,height:1}),vw.copy(r.data,a,{x:0,y:0},{x:o,y:s+c},{width:l,height:1}),vw.copy(r.data,a,{x:l-1,y:0},{x:o-1,y:s},{width:1,height:c}),vw.copy(r.data,a,{x:0,y:0},{x:o+l,y:s},{width:1,height:c})}this.image=a,this.iconPositions=r,this.patternPositions=n}addImages(t,e,r){for(const n in t){const i=t[n],o={x:0,y:0,w:i.data.width+2*oA,h:i.data.height+2*oA};r.push(o),e[n]=new sA(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}}patchUpdatedImages(t,e,r){this.haveRenderCallbacks=this.haveRenderCallbacks.filter((e=>t.hasImage(e,r))),t.dispatchRenderCallbacks(this.haveRenderCallbacks,r);for(const n in t.getUpdatedImages(r))this.patchUpdatedImage(this.iconPositions[n],t.getImage(n,r),e),this.patchUpdatedImage(this.patternPositions[n],t.getImage(n,r),e)}patchUpdatedImage(t,e,r){if(!t||!e)return;if(t.version===e.version)return;t.version=e.version;const[n,i]=t.tl;r.update(e.data,void 0,{x:n,y:i})}}function lA(t,e,r,n,i){const o=256*e,s=o+255,a=n.transformRequest(n.normalizeGlyphsURL(r).replace("{fontstack}",t).replace("{range}",`${o}-${s}`),Vt.Glyphs);Kt(a,((t,e)=>{if(t)i(t);else if(e){const t={},r=ET(e);for(const e of r.glyphs)t[e.id]=e;i(null,{glyphs:t,ascender:r.ascender,descender:r.descender})}}))}Vl(sA,"ImagePosition"),Vl(aA,"ImageAtlas");const cA=1e20;class uA{constructor({fontSize:t=24,buffer:e=3,radius:r=8,cutoff:n=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:s="normal"}={}){this.buffer=e,this.cutoff=n,this.radius=r;const a=this.size=t+4*e,l=this._createCanvas(a),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${s} ${o} ${t}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Uint16Array(a)}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:r,actualBoundingBoxDescent:n,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(t),s=Math.ceil(r),a=0,l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o-i))),c=Math.min(this.size-this.buffer,s+Math.ceil(n)),u=l+2*this.buffer,h=c+2*this.buffer,f=Math.max(u*h,0),d=new Uint8ClampedArray(f),p={data:d,width:u,height:h,glyphWidth:l,glyphHeight:c,glyphTop:s,glyphLeft:a,glyphAdvance:e};if(0===l||0===c)return p;const{ctx:m,buffer:g,gridInner:y,gridOuter:_}=this;m.clearRect(g,g,l,c),m.fillText(t,g,g+s);const v=m.getImageData(g,g,l,c);_.fill(cA,0,f),y.fill(0,0,f);for(let t=0;t<c;t++)for(let e=0;e<l;e++){const r=v.data[4*(t*l+e)+3]/255;if(0===r)continue;const n=(t+g)*u+e+g;if(1===r)_[n]=0,y[n]=cA;else{const t=.5-r;_[n]=t>0?t*t:0,y[n]=t<0?t*t:0}}hA(_,0,0,u,h,u,this.f,this.v,this.z),hA(y,g,g,l,c,u,this.f,this.v,this.z);for(let t=0;t<f;t++){const e=Math.sqrt(_[t])-Math.sqrt(y[t]);d[t]=Math.round(255-255*(e/this.radius+this.cutoff))}return p}}function hA(t,e,r,n,i,o,s,a,l){for(let c=e;c<e+n;c++)fA(t,r*o+c,o,i,s,a,l);for(let c=r;c<r+i;c++)fA(t,c*o+e,1,n,s,a,l)}
2function fA(t,e,r,n,i,o,s){o[0]=0,s[0]=-cA,s[1]=cA,i[0]=t[e];for(let a=1,l=0,c=0;a<n;a++){i[a]=t[e+a*r];const n=a*a;do{const t=o[l];c=(i[a]-i[t]+n-t*t)/(a-t)/2}while(c<=s[l]&&--l>-1);l++,o[l]=a,s[l]=c,s[l+1]=cA}for(let a=0,l=0;a<n;a++){for(;s[l+1]<a;)l++;const n=o[l],c=a-n;t[e+a*r]=i[n]+c*c}}const dA=2,pA={none:0,ideographs:1,all:2};class mA{constructor(t,e,r){this.requestManager=t,this.localGlyphMode=e,this.localFontFamily=r,this.urls={},this.entries={},this.localGlyphs={200:{},400:{},500:{},900:{}}}setURL(t,e){this.urls[e]=t}getGlyphs(t,e,r){const n=[],o=this.urls[e]||i.GLYPHS_URL;for(const e in t)for(const r of t[e])n.push({stack:e,id:r});F(n,(({stack:t,id:e},r)=>{let n=this.entries[t];n||(n=this.entries[t]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let i=n.glyphs[e];if(void 0!==i)return void r(null,{stack:t,id:e,glyph:i});if(i=this._tinySDF(n,t,e),i)return n.glyphs[e]=i,void r(null,{stack:t,id:e,glyph:i});const s=Math.floor(e/256);if(256*s>65535)return void r(new Error("glyphs > 65535 not supported"));if(n.ranges[s])return void r(null,{stack:t,id:e,glyph:i});let a=n.requests[s];a||(a=n.requests[s]=[],mA.loadGlyphRange(t,s,o,this.requestManager,((t,e)=>{if(e){n.ascender=e.ascender,n.descender=e.descender;for(const t in e.glyphs)this._doesCharSupportLocalGlyph(+t)||(n.glyphs[+t]=e.glyphs[+t]);n.ranges[s]=!0}for(const r of a)r(t,e);delete n.requests[s]}))),a.push(((n,i)=>{n?r(n):i&&r(null,{stack:t,id:e,glyph:i.glyphs[e]||null})}))}),((t,e)=>{if(t)r(t);else if(e){const t={};for(const{stack:r,id:n,glyph:i}of e)void 0===t[r]&&(t[r]={}),void 0===t[r].glyphs&&(t[r].glyphs={}),t[r].glyphs[n]=i&&{id:i.id,bitmap:i.bitmap.clone(),metrics:i.metrics},t[r].ascender=this.entries[r].ascender,t[r].descender=this.entries[r].descender;r(null,t)}}))}_doesCharSupportLocalGlyph(t){return this.localGlyphMode!==pA.none&&(this.localGlyphMode===pA.all?!!this.localFontFamily:!!this.localFontFamily&&(Zl["CJK Unified Ideographs"](t)||Zl["Hangul Syllables"](t)||Zl.Hiragana(t)||Zl.Katakana(t)||Zl["CJK Symbols and Punctuation"](t)||Zl["CJK Unified Ideographs Extension A"](t)||Zl["CJK Unified Ideographs Extension B"](t)))}_tinySDF(t,e,r){const n=this.localFontFamily;if(!n||!this._doesCharSupportLocalGlyph(r))return;let i=t.tinySDF;if(!i){let r="400";/bold/i.test(e)?r="900":/medium/i.test(e)?r="500":/light/i.test(e)&&(r="200");const o=24*dA,s=3*dA,a=8*dA;i=t.tinySDF=new mA.TinySDF({fontFamily:n,fontWeight:r,fontSize:o,buffer:s,radius:a}),i.fontWeight=r}if(this.localGlyphs[i.fontWeight][r])return this.localGlyphs[i.fontWeight][r];const o=String.fromCodePoint(r),{data:s,width:a,height:l,glyphWidth:c,glyphHeight:u,glyphLeft:h,glyphTop:f,glyphAdvance:d}=i.draw(o),p=27;return this.localGlyphs[i.fontWeight][r]={id:r,bitmap:new _w({width:a,height:l},s),metrics:{width:c/dA,height:u/dA,left:h/dA,top:f/dA-p,advance:d/dA,localGlyph:!0}}}}mA.loadGlyphRange=lA,mA.TinySDF=uA;const gA=oA;function yA(t,e,r,n){const i=[],o=t.imagePrimary,s=o.pixelRatio,a=o.paddedRect.w-2*gA,l=o.paddedRect.h-2*gA,c=t.right-t.left,u=t.bottom-t.top,h=o.stretchX||[[0,a]],f=o.stretchY||[[0,l]],d=(t,e)=>t+e[1]-e[0],p=h.reduce(d,0),m=f.reduce(d,0),g=a-p,y=l-m;let _=0,v=p,x=0,w=m,E=0,S=g,T=0,A=y;if(o.content&&n){const t=o.content;_=_A(h,0,t[0]),x=_A(f,0,t[1]),v=_A(h,t[0],t[2]),w=_A(f,t[1],t[3]),E=t[0]-_,T=t[1]-x,S=t[2]-t[0]-v,A=t[3]-t[1]-w}const O=(n,i,a,l)=>{const h=bA(n.stretch-_,v,c,t.left),f=xA(n.fixed-E,S,n.stretch,p),d=bA(i.stretch-x,w,u,t.top),g=xA(i.fixed-T,A,i.stretch,m),y=bA(a.stretch-_,v,c,t.left),O=xA(a.fixed-E,S,a.stretch,p),C=bA(l.stretch-x,w,u,t.top),M=xA(l.fixed-T,A,l.stretch,m),k=new b(h,d),I=new b(y,d),P=new b(y,C),L=new b(h,C),R=new b(f/s,g/s),D=new b(O/s,M/s),z=e*Math.PI/180;if(z){const t=Math.sin(z),e=Math.cos(z),r=[e,-t,t,e];k._matMult(r),I._matMult(r),L._matMult(r),P._matMult(r)}const B=n.stretch+n.fixed,j=a.stretch+a.fixed,F=i.stretch+i.fixed,N=l.stretch+l.fixed,$={x:o.paddedRect.x+gA+B,y:o.paddedRect.y+gA+F,w:j-B,h:N-F},U=t.imageSecondary;return{tl:k,tr:I,bl:L,br:P,texPrimary:$,texSecondary:U?{x:U.paddedRect.x+gA+B,y:U.paddedRect.y+gA+F,w:j-B,h:N-F}:void 0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:R,pixelOffsetBR:D,minFontScaleX:S/s/c,minFontScaleY:A/s/u,isSDF:r}};if(n&&(o.stretchX||o.stretchY)){const t=vA(h,g,p),e=vA(f,y,m);for(let r=0;r<t.length-1;r++){const n=t[r],o=t[r+1];for(let t=0;t<e.length-1;t++){const r=e[t],s=e[t+1];i.push(O(n,r,o,s))}}}else i.push(O({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:a+1},{fixed:0,stretch:l+1}));return i}function _A(t,e,r){let n=0;for(const i of t)n+=Math.max(e,Math.min(r,i[1]))-Math.max(e,Math.min(r,i[0]));return n}function vA(t,e,r){const n=[{fixed:-gA,stretch:0}];for(const[e,r]of t){const t=n[n.length-1];
2n.push({fixed:e-t.stretch,stretch:t.stretch}),n.push({fixed:e-t.stretch,stretch:t.stretch+(r-e)})}return n.push({fixed:e+gA,stretch:r}),n}function bA(t,e,r,n){return t/e*r+n}function xA(t,e,r,n){return t-e*r/n}function wA(t){const e=t[0],r=t[1],n=e*r;return n>0?[e,-r]:n<0?[-e,r]:0===e?[r,e]:[r,-e]}function EA(t,e,r,n){const i=e+t.positionedLines[n].lineOffset;return 0===n?r+i/2:r+(i+(e+t.positionedLines[n-1].lineOffset))/2}function SA(t,e,r,n,i,o,s,a){const l=[];if(0===e.positionedLines.length)return l;const c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=wA(r);let h=Math.abs(e.top-e.bottom);for(const t of e.positionedLines)h-=t.lineOffset;const f=e.positionedLines.length,d=h/f;let p=e.top-r[1];for(let t=0;t<f;++t){const n=e.positionedLines[t];p=EA(e,d,p,t);for(const t of n.positionedGlyphs){if(!t.rect)continue;const n=t.rect||{};let o=ST+1,h=!0,f=1,d=0;if(t.imageName){const e=s[t.imageName];if(!e)continue;if(e.sdf){it("SDF images are not supported in formatted text and will be ignored.");continue}h=!1,f=e.pixelRatio,o=oA/f}const m=(i||a)&&t.vertical,g=t.metrics.advance*t.scale/2,y=t.metrics,_=t.rect;if(null===_)continue;a&&e.verticalizable&&(d=t.imageName?g-t.metrics.width*t.scale/2:0);const v=i?[t.x+g,t.y]:[0,0];let x=[0,0],w=[0,0],E=!1;i||(m?(w=[t.x+g+u[0],t.y+u[1]-d],E=!0):x=[t.x+g+r[0],t.y+r[1]-d]);const S=_.w*t.scale/(f*(t.localGlyph?dA:1)),T=_.h*t.scale/(f*(t.localGlyph?dA:1));let A,O,C,M;if(m){const e=t.y-p,r=new b(-g,g-e),n=-Math.PI/2,i=new b(...w);A=new b(-g+x[0],x[1]),A._rotateAround(n,r)._add(i),A.x+=-e+g,A.y-=(y.left-o)*t.scale;const s=t.imageName?y.advance*t.scale:sT*t.scale,a=String.fromCodePoint(t.glyph);if(yT(a))A.x+=(1-o)*t.scale;else if(_T(a)){const e=s-y.height*t.scale;A.x+=e+(-o-1)*t.scale}else if(t.imageName||y.width+2*o===_.w&&y.height+2*o===_.h){const t=s-T;A.x+=t/2}else{const e=s-(y.height+2*o)*t.scale;A.x+=e/2}O=new b(A.x,A.y-S),C=new b(A.x+T,A.y),M=new b(A.x+T,A.y-S)}else{const e=(y.left-o)*t.scale-g+x[0],r=(-y.top-o)*t.scale+x[1],n=e+S,i=r+T;A=new b(e,r),O=new b(n,r),C=new b(e,i),M=new b(n,i)}if(c){let t;t=i?new b(0,0):E?new b(u[0],u[1]):new b(r[0],r[1]),A._rotateAround(c,t),O._rotateAround(c,t),C._rotateAround(c,t),M._rotateAround(c,t)}const k=new b(0,0),I=new b(0,0),P=0,L=0;l.push({tl:A,tr:O,bl:C,br:M,texPrimary:n,texSecondary:void 0,writingMode:e.writingMode,glyphOffset:v,sectionIndex:t.sectionIndex,isSDF:h,pixelOffsetTL:k,pixelOffsetBR:I,minFontScaleX:P,minFontScaleY:L})}}return l}function TA(t,e=1,r=!1){let n=1/0,i=1/0,o=-1/0,s=-1/0;const a=t[0];for(let t=0;t<a.length;t++){const e=a[t];(!t||e.x<n)&&(n=e.x),(!t||e.y<i)&&(i=e.y),(!t||e.x>o)&&(o=e.x),(!t||e.y>s)&&(s=e.y)}const l=o-n,c=s-i,u=Math.min(l,c);let h=u/2;const f=new Pi([],AA);if(0===u)return new b(n,i);for(let e=n;e<o;e+=u)for(let r=i;r<s;r+=u)f.push(new OA(e+h,r+h,h,t));let d=MA(t),p=f.length;for(;f.length;){const n=f.pop();(n.d>d.d||!d.d)&&(d=n,r&&console.log("found best %d after %d probes",Math.round(1e4*n.d)/1e4,p)),n.max-d.d<=e||(h=n.h/2,f.push(new OA(n.p.x-h,n.p.y-h,h,t)),f.push(new OA(n.p.x+h,n.p.y-h,h,t)),f.push(new OA(n.p.x-h,n.p.y+h,h,t)),f.push(new OA(n.p.x+h,n.p.y+h,h,t)),p+=4)}return r&&(console.log(`num probes: ${p}`),console.log(`best distance: ${d.d}`)),d.p}function AA(t,e){return e.max-t.max}class OA{constructor(t,e,r,n){this.p=new b(t,e),this.h=r,this.d=CA(this.p,n),this.max=this.d+this.h*Math.SQRT2}}function CA(t,e){let r=!1,n=1/0;for(let i=0;i<e.length;i++){const o=e[i];for(let e=0,i=o.length,s=i-1;e<i;s=e++){const i=o[e],a=o[s];i.y>t.y!=a.y>t.y&&t.x<(a.x-i.x)*(t.y-i.y)/(a.y-i.y)+i.x&&(r=!r),n=Math.min(n,qx(t,i,a))}}return(r?1:-1)*Math.sqrt(n)}function MA(t){let e=0,r=0,n=0;const i=t[0];for(let t=0,o=i.length,s=o-1;t<o;s=t++){const o=i[t],a=i[s],l=o.x*a.y-a.x*o.y;r+=(o.x+a.x)*l,n+=(o.y+a.y)*l,e+=3*l}return new OA(r/e,n/e,0,t)}const kA=7,IA=Number.POSITIVE_INFINITY,PA=Math.sqrt(2);function LA(t,[e,r]){let n=0,i=0;if(r===IA){e<0&&(e=0);const r=e/PA;switch(t){case"top-right":case"top-left":i=r-kA;break;case"bottom-right":case"bottom-left":i=-r+kA;break;case"bottom":i=-e+kA;break;case"top":i=e-kA}switch(t){case"top-right":case"bottom-right":n=-r;break;case"top-left":case"bottom-left":n=r;break;case"left":n=e;break;case"right":n=-e}}else{switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":i=r-kA;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+kA}switch(t){case"top-right":case"bottom-right":case"right":n=-e;break;case"top-left":case"bottom-left":case"left":n=e}}return[n,i]}function RA(t,e,r,n,i,o,s,a,l,c,u){t.createArrays();const h=512*t.overscaling;t.tilePixelRatio=Li/h,t.compareText={},t.iconsNeedLinear=!1;const f=t.layers[0].layout,d=t.layers[0]._unevaluatedLayout._values,p={};if("composite"===t.textSizeData.kind){const{minZoom:e,maxZoom:r}=t.textSizeData;p.compositeTextSizes=[d["text-size"].possiblyEvaluate(new bc(e),a),d["text-size"].possiblyEvaluate(new bc(r),a)]}if("composite"===t.iconSizeData.kind){const{minZoom:e,maxZoom:r}=t.iconSizeData;p.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new bc(e),a),d["icon-size"].possiblyEvaluate(new bc(r),a)]}p.layoutTextSize=d["text-size"].possiblyEvaluate(new bc(l+1),a),p.layoutIconSize=d["icon-size"].possiblyEvaluate(new bc(l+1),a),p.textMaxSize=d["text-size"].possiblyEvaluate(new bc(18),a);const m="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),g=f.get("text-size");let y=!1;for(const e of t.features)if(e.icon&&e.icon.nameSecondary){y=!0;break}for(const o of t.features){const l=f.get("text-font").evaluate(o,{},a).join(","),h=g.evaluate(o,{},a),d=p.layoutTextSize.evaluate(o,{},a),_=p.layoutIconSize.evaluate(o,{},a),v={horizontal:{},vertical:void 0},b=o.text;let x,w=[0,0];if(b){const n=b.toString(),s=f.get("text-letter-spacing").evaluate(o,{},a)*sT,c=f.get("text-line-height").evaluate(o,{},a)*sT,u=Yl(n)?s:0,p=f.get("text-anchor").evaluate(o,{},a),g=f.get("text-variable-anchor");if(!g){const t=f.get("text-radial-offset").evaluate(o,{},a);w=t?LA(p,[t*sT,IA]):f.get("text-offset").evaluate(o,{},a).map((t=>t*sT))}
2let y=m?"center":f.get("text-justify").evaluate(o,{},a);const _="point"===f.get("symbol-placement"),x=_?f.get("text-max-width").evaluate(o,{},a)*sT:1/0,E=o=>{t.allowVerticalPlacement&&Xl(n)&&(v.vertical=LT(b,e,r,i,l,x,c,p,o,u,w,TT.vertical,!0,d,h))};if(!m&&g){const t="auto"===y?g.map((t=>DA(t))):[y];let n=!1;for(let o=0;o<t.length;o++){const s=t[o];if(!v.horizontal[s])if(n)v.horizontal[s]=v.horizontal[0];else{const t=LT(b,e,r,i,l,x,c,"center",s,u,w,TT.horizontal,!1,d,h);t&&(v.horizontal[s]=t,n=1===t.positionedLines.length)}}E("left")}else{if("auto"===y&&(y=DA(p)),_||f.get("text-writing-mode").indexOf("horizontal")>=0||!Xl(n)){const t=LT(b,e,r,i,l,x,c,p,y,u,w,TT.horizontal,!1,d,h);t&&(v.horizontal[y]=t)}E(_?"left":y)}}let E=!1;if(o.icon&&o.icon.namePrimary){const e=n[o.icon.namePrimary];e&&(x=WT(i[o.icon.namePrimary],o.icon.nameSecondary?i[o.icon.nameSecondary]:void 0,f.get("icon-offset").evaluate(o,{},a),f.get("icon-anchor").evaluate(o,{},a)),E=e.sdf,void 0===t.sdfIcons?t.sdfIcons=e.sdf:t.sdfIcons!==e.sdf&&it("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.pixelRatio||0!==f.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}const S=$A(v.horizontal)||v.vertical;t.iconsInText||(t.iconsInText=!!S&&S.iconsInText),(S||x)&&BA(t,o,v,x,n,p,d,_,w,E,s,a,c,u,y)}o&&t.generateCollisionDebugBuffers(l,t.collisionBoxArray)}function DA(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function zA(t,e){e>18&&t>2&&(t>>=1);const r=Li/(512*t);return Math.max(r,1)}function BA(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p){let m=o.textMaxSize.evaluate(e,{},h);void 0===m&&(m=s);const g=t.layers[0].layout,y=g.get("icon-offset").evaluate(e,{},h),_=$A(r.horizontal)||r.vertical,v="globe"===f.name,b=sT,x=s/b,w=t.tilePixelRatio*m/b,E=t.tilePixelRatio*a,T=zA(t.overscaling,t.zoom)*g.get("symbol-spacing"),A=g.get("text-padding")*t.tilePixelRatio,O=g.get("icon-padding")*t.tilePixelRatio,C=S(g.get("text-max-angle")),M="map"===g.get("text-rotation-alignment")&&"point"!==g.get("symbol-placement"),k="map"===g.get("icon-rotation-alignment")&&"point"!==g.get("symbol-placement"),I=g.get("symbol-placement"),P=T/2,L=g.get("icon-text-fit").evaluate(e,{},h),R=g.get("icon-text-fit-padding").evaluate(e,{},h),D="none"!==L;let z;!1===t.hasAnyIconTextFit&&D&&(t.hasAnyIconTextFit=!0),n&&D&&(t.allowVerticalPlacement&&r.vertical&&(z=ZT(n,r.vertical,L,R,y,x)),_&&(n=ZT(n,_,L,R,y,x)));const B=(s,a,m)=>{if(a.x<0||a.x>=Li||a.y<0||a.y>=Li)return;let g=null;if(v){const{x:t,y:e,z:r}=f.projectTilePoint(a.x,a.y,m);g={anchor:new XT(t,e,r,0,void 0),up:f.upVector(m,a.x,a.y)}}GA(t,a,g,s,r,n,i,z,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,A,M,l,E,O,k,y,e,o,c,u,h,d,p)};if("line"===I)for(const i of nA(e.geometry,0,0,Li,Li)){const e=eA(i,T,C,r.vertical||_,n,b,w,t.overscaling,Li);for(const r of e){const e=_;e&&qA(t,e.text,P,r)||B(i,r,h)}}else if("line-center"===I){for(const t of e.geometry)if(t.length>1){const e=tA(t,C,r.vertical||_,n,b,w);e&&B(t,e,h)}}else if("Polygon"===e.type)for(const t of fE(e.geometry,0)){const e=TA(t,16);B(t[0],new XT(e.x,e.y,0,0,void 0),h)}else if("LineString"===e.type)for(const t of e.geometry)B(t,new XT(t[0].x,t[0].y,0,0,void 0),h);else if("Point"===e.type)for(const t of e.geometry)for(const e of t)B([e],new XT(e.x,e.y,0,0,void 0),h)}const jA=255,FA=jA*aT;function NA(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y){const _=SA(r,n,l,o,s,a,i,t.allowVerticalPlacement),v=t.textSizeData;let b=null;"source"===v.kind?(b=[aT*o.layout.get("text-size").evaluate(a,{},g)],b[0]>FA&&it(`${t.layerIds[0]}: Value for "text-size" is >= ${jA}. Reduce your "text-size".`)):"composite"===v.kind&&(b=[aT*p.compositeTextSizes[0].evaluate(a,{},g),aT*p.compositeTextSizes[1].evaluate(a,{},g)],(b[0]>FA||b[1]>FA)&&it(`${t.layerIds[0]}: Value for "text-size" is >= ${jA}. Reduce your "text-size".`)),t.addSymbols(t.text,_,b,l,s,a,u,e,r,c.lineStartIndex,c.lineLength,d,m,g,y,!1);for(const e of h)f[e]=t.text.placedSymbolArray.length-1;return 4*_.length}function $A(t){for(const e in t)return t[e];return null}function UA(t,e,r,n,i,o,s,a,l,c){let u=s.top,h=s.bottom,f=s.left,d=s.right;const p=s.collisionPadding;if(p&&(f-=p[0],u-=p[1],d+=p[2],h+=p[3]),l){const t=new b(f,u),e=new b(d,u),r=new b(f,h),n=new b(d,h),i=S(l);let o=new b(0,0);
2c&&(o=new b(c[0],c[1])),t._rotateAround(i,o),e._rotateAround(i,o),r._rotateAround(i,o),n._rotateAround(i,o),f=Math.min(t.x,e.x,r.x,n.x),d=Math.max(t.x,e.x,r.x,n.x),u=Math.min(t.y,e.y,r.y,n.y),h=Math.max(t.y,e.y,r.y,n.y)}return t.emplaceBack(e.x,e.y,e.z,r.x,r.y,f,u,d,h,a,n,i,o),t.length-1}function VA(t){t.collisionPadding&&(t.top-=t.collisionPadding[1],t.bottom+=t.collisionPadding[3]);const e=t.bottom-t.top;return e>0?Math.max(10,e):null}function GA(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x,w,E,S,T,A){const O=t.addToLineVertexArray(e,n);let C,M,k,I,P,L,R,D=0,z=0,B=0,j=0,F=-1,N=-1;const $={};let U=Yu("");const V=r?r.anchor:e,G="none"!==l.layout.get("icon-text-fit").evaluate(b,{},S);let q=0,H=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[q,H]=l.layout.get("text-offset").evaluate(b,{},S).map((t=>t*sT)):(q=l.layout.get("text-radial-offset").evaluate(b,{},S)*sT,H=IA),t.allowVerticalPlacement&&i.vertical){const t=i.vertical;if(p)L=VA(t),a&&(R=VA(a));else{const r=l.layout.get("text-rotate").evaluate(b,{},S)+90;k=UA(c,V,e,u,h,f,t,d,r,m),a&&(I=UA(c,V,e,u,h,f,a,y,r))}}if(o){const n=l.layout.get("icon-rotate").evaluate(b,{},S),i=yA(o,n,w,G),s=a?yA(a,n,w,G):void 0;M=UA(c,V,e,u,h,f,o,y,n),D=4*i.length;const d=t.iconSizeData;let p=null;"source"===d.kind?(p=[aT*l.layout.get("icon-size").evaluate(b,{},S)],p[0]>FA&&it(`${t.layerIds[0]}: Value for "icon-size" is >= ${jA}. Reduce your "icon-size".`)):"composite"===d.kind&&(p=[aT*x.compositeIconSizes[0].evaluate(b,{},S),aT*x.compositeIconSizes[1].evaluate(b,{},S)],(p[0]>FA||p[1]>FA)&&it(`${t.layerIds[0]}: Value for "icon-size" is >= ${jA}. Reduce your "icon-size".`)),t.addSymbols(t.icon,i,p,v,_,b,!1,r,e,O.lineStartIndex,O.lineLength,-1,E,S,T,A),F=t.icon.placedSymbolArray.length-1,s&&(z=4*s.length,t.addSymbols(t.icon,s,p,v,_,b,TT.vertical,r,e,O.lineStartIndex,O.lineLength,-1,E,S,T,A),N=t.icon.placedSymbolArray.length-1)}for(const n in i.horizontal){const o=i.horizontal[n];C||(U=Yu(o.text),p?P=VA(o):C=UA(c,V,e,u,h,f,o,d,l.layout.get("text-rotate").evaluate(b,{},S),m));const a=1===o.positionedLines.length;if(B+=NA(t,r,e,o,s,l,p,b,m,O,i.vertical?TT.horizontal:TT.horizontalOnly,a?Object.keys(i.horizontal):[n],$,F,x,E,S,T),a)break}i.vertical&&(j+=NA(t,r,e,i.vertical,s,l,p,b,m,O,TT.vertical,["vertical"],$,N,x,E,S,T));let W=-1;const Z=(t,e)=>t?Math.max(t,e):e;W=Z(P,W),W=Z(L,W),W=Z(R,W);const X=W>-1?1:0;t.glyphOffsetArray.length>=DO.MAX_GLYPHS&&it("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);const Y=V;t.symbolInstances.emplaceBack(e.x,e.y,Y.x,Y.y,Y.z,$.right>=0?$.right:-1,$.center>=0?$.center:-1,$.left>=0?$.left:-1,$.vertical>=0?$.vertical:-1,F,N,U,void 0!==C?C:t.collisionBoxArray.length,void 0!==C?C+1:t.collisionBoxArray.length,void 0!==k?k:t.collisionBoxArray.length,void 0!==k?k+1:t.collisionBoxArray.length,void 0!==M?M:t.collisionBoxArray.length,void 0!==M?M+1:t.collisionBoxArray.length,I||t.collisionBoxArray.length,I?I+1:t.collisionBoxArray.length,u,B,j,D,z,X,0,q,H,W,0,G?1:0)}function qA(t,e,r,n){const i=t.compareText;if(e in i){const t=i[e];for(let e=t.length-1;e>=0;e--)if(n.dist(t[e])<r)return!0}else i[e]=[];return i[e].push(n),!1}function HA(t,e){const r=t.fovAboveCenter,n=t.elevation?t.elevation.getMinElevationBelowMSL()*e:0,i=(t._camera.position[2]*t.worldSize-n)/Math.cos(t._pitch),o=Math.sin(r)*i/Math.sin(Math.max(Math.PI/2-t._pitch-r,.01)),s=Math.sin(t._pitch)*o+i,a=i*(1/t._horizonShift);return Math.min(1.01*s,a)}function WA(t,e){const r=t.cameraToCenterDistance,n=t._centerAltitude*e,i=t._camera,o=t._camera.forward(),s=Sv.add([],Sv.scale([],o,-r),[0,0,n]),a=t.worldSize/(2*Math.PI),l=[0,0,-a],c=t.width/t.height,u=Math.tan(t.fovAboveCenter),h=Sv.scale([],i.up(),u),f=Sv.scale([],i.right(),u*c),d=Sv.normalize([],Sv.add([],Sv.add([],o,h),f)),p=[];let m;if(new Uv(s,d).closestPointOnSphere(l,a,p)){const e=Sv.add([],p,l),r=Sv.sub([],e,s);m=Math.cos(t.fovAboveCenter)*Sv.length(r)}else{const t=Sv.sub([],s,l),e=Sv.sub([],l,s);Sv.normalize(e,e);const r=Sv.length(t)-a;m=Math.sqrt(r*(r+2*a));const n=Math.acos(m/(a+r))-Math.acos(Sv.dot(o,e));m*=Math.cos(n)}return 1.01*m}function ZA(t,e){if(!e.isReprojectedInTileSpace)return{scale:1<<t.z,x:t.x,y:t.y,x2:t.x+1,y2:t.y+1,projection:e};
2const r=Math.pow(2,-t.z),n=t.x*r,i=(t.x+1)*r,o=t.y*r,s=(t.y+1)*r,a=px(n),l=px(i),c=mx(o),u=mx(s),h=e.project(a,c),f=e.project(l,c),d=e.project(l,u),p=e.project(a,u);let m=Math.min(h.x,f.x,d.x,p.x),g=Math.min(h.y,f.y,d.y,p.y),y=Math.max(h.x,f.x,d.x,p.x),_=Math.max(h.y,f.y,d.y,p.y);const v=r/16;function b(t,r,n,i,o,s){const a=(n+o)/2,l=(i+s)/2,c=e.project(px(a),mx(l)),u=Math.max(0,m-c.x,g-c.y,c.x-y,c.y-_);m=Math.min(m,c.x),y=Math.max(y,c.x),g=Math.min(g,c.y),_=Math.max(_,c.y),u>v&&(b(t,c,n,i,a,l),b(c,r,a,l,o,s))}b(h,f,n,o,i,o),b(f,d,i,o,i,s),b(d,p,i,s,n,s),b(p,h,n,s,n,o),m-=v,g-=v,y+=v,_+=v;const x=1/Math.max(y-m,_-g);return{scale:x,x:m*x,y:g*x,x2:y*x,y2:_*x,projection:e}}function XA(t,e,r,n,i,o,s,a,l){if("globe"===l.name)return Sb(t,e,new zv(r,n,i),!1);const c=ZA({z:r,x:n,y:i},l),u=c.x/c.scale,h=c.y/c.scale,f=c.x2/c.scale,d=c.y2/c.scale;return new nb([(o+u)*e,e*h,s],[(o+f)*e,e*d,a])}function YA(t,{x:e,y:r},n=0){return new b(((e-n)*t.scale-t.x)*Li,(r*t.scale-t.y)*Li)}function KA(t,e,r=0){const n=((e.x-r)*t.scale-t.x)*Li,i=(e.y*t.scale-t.y)*Li;return Sv.fromValues(n,i,gx(e.z,e.y))}const JA=_v.identity(new Float32Array(16));class QA{constructor(t){this.spec=t,this.name=t.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(t,e){return{x:0,y:0,z:0}}unproject(t,e){return new ax(0,0)}projectTilePoint(t,e,r){return{x:t,y:e,z:0}}locationPoint(t,e,r=!0){return t._coordinatePoint(t.locationCoordinate(e),r)}pixelsPerMeter(t,e){return dx(1,t)*e}pixelSpaceConversion(t,e,r){return 1}farthestPixelDistance(t){return HA(t,t.pixelsPerMeter)}pointCoordinate(t,e,r,n){const i=t.horizonLineFromTop(!1),o=new b(e,Math.max(i,r));return t.rayIntersectionCoordinate(t.pointRayIntersection(o,n))}pointCoordinate3D(t,e,r){const n=new b(e,r);if(t.elevation)return t.elevation.pointCoordinate(n);{const e=this.pointCoordinate(t,n.x,n.y,0);return[e.x,e.y,e.z]}}isPointAboveHorizon(t,e){if(t.elevation)return!this.pointCoordinate3D(t,e.x,e.y);const r=t.horizonLineFromTop();return e.y<r}createInversionMatrix(t,e){return JA}createTileMatrix(t,e,r){let n,i,o;const s=r.canonical,a=_v.identity(new Float64Array(16));if(this.isReprojectedInTileSpace){const l=ZA(s,this);n=1,i=l.x+r.wrap*l.scale,o=l.y,_v.scale(a,a,[n/l.scale,n/l.scale,t.pixelsPerMeter/e])}else n=e/t.zoomScale(s.z),i=(s.x+Math.pow(2,s.z)*r.wrap)*n,o=s.y*n;return _v.translate(a,a,[i,o,0]),_v.scale(a,a,[n/Li,n/Li,1]),a}upVector(t,e,r){return[0,0,1]}upVectorScale(t,e,r){return{metersToTile:1}}}class tO extends QA{constructor(t){super(t),this.range=[4,7],this.center=t.center||[-96,37.5];const[e,r]=this.parallels=t.parallels||[29.5,45.5],n=Math.sin(S(e));this.n=(n+Math.sin(S(r)))/2,this.c=1+n*(2*this.n-n),this.r0=Math.sqrt(this.c)/this.n}project(t,e){const{n:r,c:n,r0:i}=this,o=S(t-this.center[0]),s=S(e),a=Math.sqrt(n-2*r*Math.sin(s))/r;return{x:a*Math.sin(o*r),y:a*Math.cos(o*r)-i,z:0}}unproject(t,e){const{n:r,c:n,r0:i}=this,o=i+e;let s=Math.atan2(t,Math.abs(o))*Math.sign(o);o*r<0&&(s-=Math.PI*Math.sign(t)*Math.sign(o));const a=S(this.center[0])*r;s=B(s,-Math.PI-a,Math.PI-a);const l=D(T(s/r)+this.center[0],-180,180),c=Math.asin(D((n-(t*t+o*o)*r*r)/(2*r),-1,1)),u=D(T(c),-yx,yx);return new ax(l,u)}}const eO=1.340264,rO=-.081106,nO=893e-6,iO=.003796,oO=Math.sqrt(3)/2;class sO extends QA{project(t,e){e=e/180*Math.PI,t=t/180*Math.PI;const r=Math.asin(oO*Math.sin(e)),n=r*r,i=n*n*n,o=t*Math.cos(r)/(oO*(eO+3*rO*n+i*(7*nO+9*iO*n))),s=r*(eO+rO*n+i*(nO+iO*n));return{x:.5*(o/Math.PI+.5),y:1-.5*(s/Math.PI+1),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI;let r=e=(2*(1-e)-1)*Math.PI,n=r*r,i=n*n*n;for(let t,o,s,a=0;a<12&&(o=r*(eO+rO*n+i*(nO+iO*n))-e,s=eO+3*rO*n+i*(7*nO+9*iO*n),t=o/s,r=D(r-t,-Math.PI/3,Math.PI/3),n=r*r,i=n*n*n,!(Math.abs(t)<1e-12));++a);const o=oO*t*(eO+3*rO*n+i*(7*nO+9*iO*n))/Math.cos(r),s=Math.asin(Math.sin(r)/oO),a=D(180*o/Math.PI,-180,180),l=D(180*s/Math.PI,-yx,yx);return new ax(a,l)}}class aO extends QA{constructor(t){super(t),this.wrap=!0,this.supportsWorldCopies=!0}project(t,e){return{x:.5+t/360,y:.5-e/360,z:0}}unproject(t,e){const r=360*(t-.5),n=D(360*(.5-e),-yx,yx);return new ax(r,n)}}const lO=Math.PI/2;function cO(t){return Math.tan((lO+t)/2)}class uO extends QA{constructor(t){super(t),this.center=t.center||[0,30];const[e,r]=this.parallels=t.parallels||[30,30];let n=S(e),i=S(r);this.southernCenter=n+i<0,this.southernCenter&&(n=-n,i=-i);const o=Math.cos(n),s=cO(n);this.n=n===i?Math.sin(n):Math.log(o/Math.cos(i))/Math.log(cO(i)/s),this.f=o*Math.pow(cO(n),this.n)/this.n}project(t,e){e=S(e),this.southernCenter&&(e=-e),t=S(t-this.center[0]);const r=1e-6,{n,f:i}=this;i>0?e<-lO+r&&(e=-lO+r):e>lO-r&&(e=lO-r);const o=i/Math.pow(cO(e),n);let s=o*Math.sin(n*t),a=i-o*Math.cos(n*t);return s=.5*(s/Math.PI+.5),a=.5*(a/Math.PI+.5),{x:s,y:this.southernCenter?a:1-a,z:0}}unproject(t,e){t=(2*t-.5)*Math.PI,this.southernCenter&&(e=1-e),e=(2*(1-e)-.5)*Math.PI;const{n:r,f:n}=this,i=n-e,o=Math.sign(i),s=Math.sign(r)*Math.sqrt(t*t+i*i);let a=Math.atan2(t,Math.abs(i))*o;i*r<0&&(a-=Math.PI*Math.sign(t)*o);const l=D(T(a/r)+this.center[0],-180,180),c=D(T(2*Math.atan(Math.pow(n/s,1/r))-lO),-yx,yx);return new ax(l,this.southernCenter?-c:c)}}class hO extends QA{constructor(t){super(t),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(t,e){return{x:hx(t),y:fx(e),z:0}}unproject(t,e){const r=px(t),n=mx(e);return new ax(r,n)}}const fO=S(yx);class dO extends QA{project(t,e){const r=(e=S(e))*e,n=r*r,i=e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)));return{x:.5*((t=S(t))*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791))/Math.PI+.5),y:1-.5*(i/Math.PI+1),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI;const r=1e-6;let n=e=(2*(1-e)-1)*Math.PI,i=25,o=0,s=n*n;do{s=n*n;const t=s*s;
2o=(n*(1.007226+s*(.015085+t*(.028874*s-.044475-.005916*t)))-e)/(1.007226+s*(.045255+t*(.259866*s-.311325-.005916*11*t))),n=D(n-o,-fO,fO)}while(Math.abs(o)>r&&--i>0);s=n*n;const a=D(T(t/(.8707+s*(s*(s*s*s*(.003971-.001529*s)-.013791)-.131979))),-180,180),l=T(n);return new ax(a,l)}}const pO=S(yx);class mO extends QA{project(t,e){e=S(e),t=S(t);const r=Math.cos(e),n=2/Math.PI,i=Math.acos(r*Math.cos(t/2)),o=Math.sin(i)/i,s=.5*(t*n+2*r*Math.sin(t/2)/o)||0,a=.5*(e+Math.sin(e)/o)||0;return{x:.5*(s/Math.PI+.5),y:1-.5*(a/Math.PI+1),z:0}}unproject(t,e){let r=t=(2*t-.5)*Math.PI,n=e=(2*(1-e)-1)*Math.PI,i=25;const o=1e-6;let s=0,a=0;do{const i=Math.cos(n),o=Math.sin(n),l=2*o*i,c=o*o,u=i*i,h=Math.cos(r/2),f=Math.sin(r/2),d=2*h*f,p=f*f,m=1-u*h*h,g=m?1/m:0,y=m?Math.acos(i*h)*Math.sqrt(1/m):0,_=.5*(2*y*i*f+2*r/Math.PI)-t,v=.5*(y*o+n)-e,b=.5*g*(u*p+y*i*h*c)+1/Math.PI,x=g*(d*l/4-y*o*f),w=.125*g*(l*f-y*o*u*d),E=.5*g*(c*h+y*p*i)+.5,S=x*w-E*b;s=(v*x-_*E)/S,a=(_*w-v*b)/S,r=D(r-s,-Math.PI,Math.PI),n=D(n-a,-pO,pO)}while((Math.abs(s)>o||Math.abs(a)>o)&&--i>0);return new ax(T(r),T(n))}}class gO extends QA{constructor(t){super(t),this.center=t.center||[0,0],this.parallels=t.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(S(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(t,e){const{scale:r,cosPhi:n}=this;return{x:S(t)*n*r+.5,y:-Math.sin(S(e))/n*r+.5,z:0}}unproject(t,e){const{scale:r,cosPhi:n}=this,i=-(e-.5)/r,o=D(T((t-.5)/r)/n,-180,180),s=i*n,a=Math.asin(D(s,-1,1)),l=D(T(a),-yx,yx);return new ax(o,l)}}class yO extends hO{constructor(t){super(t),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(t,e,r){const n=Ib(t,e,r),i=Db(bb(r));return Sv.transformMat4(n,n,i),{x:n[0],y:n[1],z:n[2]}}locationPoint(t,e){const r=kb(e.lat,e.lng),n=Sv.normalize([],r),i=t.elevation?t.elevation.getAtPointOrZero(t.locationCoordinate(e),t._centerAltitude):t._centerAltitude,o=dx(1,0)*Li*i;Sv.scaleAndAdd(r,r,n,o);const s=_v.identity(new Float64Array(16));return _v.multiply(s,t.pixelMatrix,t.globeMatrix),Sv.transformMat4(r,r,s),new b(r[0],r[1])}pixelsPerMeter(t,e){return dx(1,0)*e}pixelSpaceConversion(t,e,r){const n=dx(1,t)*e,i=Co(dx(1,sb)*e,n,r);return this.pixelsPerMeter(t,e)/i}createTileMatrix(t,e,r){const n=zb(bb(r.canonical));return _v.multiply(new Float64Array(16),t.globeMatrix,n)}createInversionMatrix(t,e){const{center:r}=t,n=Db(bb(e));return _v.rotateY(n,n,S(r.lng)),_v.rotateX(n,n,S(r.lat)),_v.scale(n,n,[t._pixelsPerMercatorPixel,t._pixelsPerMercatorPixel,1]),Float32Array.from(n)}pointCoordinate(t,e,r,n){const i=gb(t,e,r,!0);return i||new wx(0,0)}pointCoordinate3D(t,e,r){const n=this.pointCoordinate(t,e,r,0);return[n.x,n.y,n.z]}isPointAboveHorizon(t,e){return!gb(t,e.x,e.y,!1)}farthestPixelDistance(t){const e=WA(t,this.pixelsPerMeter(t.center.lat,t.worldSize)),r=Vb(t.zoom);if(r>0){const n=HA(t,dx(1,t.center.lat)*t.worldSize),i=t.worldSize/(2*Math.PI),o=Math.max(t.width,t.height)/t.worldSize*Math.PI;return Co(e,n+i*(1-Math.cos(o)),Math.pow(r,10))}return e}upVector(t,e,r){return Ib(e,r,t,1)}upVectorScale(t){return{metersToTile:mb(Lb(bb(t)))}}}function _O(t){const e=t.parallels,r=!!e&&Math.abs(e[0]+e[1])<.01;switch(t.name){case"mercator":return new hO(t);case"equirectangular":return new aO(t);case"naturalEarth":return new dO(t);case"equalEarth":return new sO(t);case"winkelTripel":return new mO(t);case"albers":return r?new gO(t):new tO(t);case"lambertConformalConic":return r?new gO(t):new uO(t);case"globe":return new yO(t)}throw new Error(`Invalid projection name: ${t.name}`)}function vO(t,e){return e.replace(/{([^{}]+)}/g,((e,r)=>r in t?String(t[r]):""))}const bO=new Rc({"symbol-placement":new Mc(jr.layout_symbol["symbol-placement"]),"symbol-spacing":new Mc(jr.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Mc(jr.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new kc(jr.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Mc(jr.layout_symbol["symbol-z-order"]),"symbol-z-elevate":new Mc(jr.layout_symbol["symbol-z-elevate"]),"icon-allow-overlap":new Mc(jr.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Mc(jr.layout_symbol["icon-ignore-placement"]),"icon-optional":new Mc(jr.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Mc(jr.layout_symbol["icon-rotation-alignment"]),"icon-size":new kc(jr.layout_symbol["icon-size"]),"icon-text-fit":new kc(jr.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new kc(jr.layout_symbol["icon-text-fit-padding"]),"icon-image":new kc(jr.layout_symbol["icon-image"]),"icon-rotate":new kc(jr.layout_symbol["icon-rotate"]),"icon-padding":new Mc(jr.layout_symbol["icon-padding"]),"icon-keep-upright":new Mc(jr.layout_symbol["icon-keep-upright"]),"icon-offset":new kc(jr.layout_symbol["icon-offset"]),"icon-anchor":new kc(jr.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Mc(jr.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Mc(jr.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Mc(jr.layout_symbol["text-rotation-alignment"]),"text-field":new kc(jr.layout_symbol["text-field"]),"text-font":new kc(jr.layout_symbol["text-font"]),"text-size":new kc(jr.layout_symbol["text-size"]),"text-max-width":new kc(jr.layout_symbol["text-max-width"]),"text-line-height":new kc(jr.layout_symbol["text-line-height"]),"text-letter-spacing":new kc(jr.layout_symbol["text-letter-spacing"]),"text-justify":new kc(jr.layout_symbol["text-justify"]),"text-radial-offset":new kc(jr.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Mc(jr.layout_symbol["text-variable-anchor"]),"text-anchor":new kc(jr.layout_symbol["text-anchor"]),"text-max-angle":new Mc(jr.layout_symbol["text-max-angle"]),"text-writing-mode":new Mc(jr.layout_symbol["text-writing-mode"]),"text-rotate":new kc(jr.layout_symbol["text-rotate"]),"text-padding":new Mc(jr.layout_symbol["text-padding"]),"text-keep-upright":new Mc(jr.layout_symbol["text-keep-upright"]),"text-transform":new kc(jr.layout_symbol["text-transform"]),"text-offset":new kc(jr.layout_symbol["text-offset"]),"text-allow-overlap":new Mc(jr.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Mc(jr.layout_symbol["text-ignore-placement"]),"text-optional":new Mc(jr.layout_symbol["text-optional"]),visibility:new Mc(jr.layout_symbol.visibility)});var xO={paint:new Rc({"icon-opacity":new kc(jr.paint_symbol["icon-opacity"]),"icon-emissive-strength":new kc(jr.paint_symbol["icon-emissive-strength"]),"text-emissive-strength":new kc(jr.paint_symbol["text-emissive-strength"]),"icon-color":new kc(jr.paint_symbol["icon-color"]),"icon-halo-color":new kc(jr.paint_symbol["icon-halo-color"]),"icon-halo-width":new kc(jr.paint_symbol["icon-halo-width"]),"icon-halo-blur":new kc(jr.paint_symbol["icon-halo-blur"]),"icon-translate":new Mc(jr.paint_symbol["icon-translate"]),"icon-translate-anchor":new Mc(jr.paint_symbol["icon-translate-anchor"]),"icon-image-cross-fade":new kc(jr.paint_symbol["icon-image-cross-fade"]),"text-opacity":new kc(jr.paint_symbol["text-opacity"]),"text-color":new kc(jr.paint_symbol["text-color"],{runtimeType:Jr,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new kc(jr.paint_symbol["text-halo-color"]),"text-halo-width":new kc(jr.paint_symbol["text-halo-width"]),"text-halo-blur":new kc(jr.paint_symbol["text-halo-blur"]),"text-translate":new Mc(jr.paint_symbol["text-translate"]),"text-translate-anchor":new Mc(jr.paint_symbol["text-translate-anchor"]),"icon-color-saturation":new Mc(jr.paint_symbol["icon-color-saturation"])}),layout:bO};class wO{constructor(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Zr,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Vl(wO,"FormatSectionOverride",{omit:["defaultValue"]});class EO extends $c{constructor(t,e){super(t,xO,e)}recalculate(t,e){super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const r=this.layout.get("text-writing-mode");if(r){const t=[];for(const e of r)t.indexOf(e)<0&&t.push(e);this.layout._values["text-writing-mode"]=t}else"point"===this.layout.get("symbol-placement")?this.layout._values["text-writing-mode"]=["horizontal"]:this.layout._values["text-writing-mode"]=["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(t,e,r,n){const i=this.layout.get(t).evaluate(e,{},r,n),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||_a(o.value)||!i?i:vO(e.properties,i)}createBucket(t){return new DO(t)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const t of xO.paint.overridableProperties){if(!EO.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),r=new wO(e),n=new ya(r,e.property.specification);let i=null;i="constant"===e.value.kind||"source"===e.value.kind?new ba("source",n):new xa("composite",n,e.value.zoomStops,e.value._interpolationType),this.paint._values[t]=new Oc(e.property,i,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,r){return!(!this.layout||e.isDataDriven()||r.isDataDriven())&&EO.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const r=t.get("text-field"),n=xO.paint.properties[e];let i=!1;const o=t=>{for(const e of t)if(n.overrides&&n.overrides.hasOverride(e))return void(i=!0)};if("constant"===r.value.kind&&r.value.value instanceof Tn)o(r.value.value.sections);else if("source"===r.value.kind){const t=e=>{if(!i)if(e instanceof Ln&&kn(e.value)===nn){const t=e.value;o(t.sections)}else e instanceof Fn?o(e.sections):e.eachChild(t)},e=r.value;e._styleExpression&&t(e._styleExpression.expression)}return i}getProgramIds(){const t=0!==this.paint.get("icon-opacity").constantOr(1),e=0!==this.paint.get("text-opacity").constantOr(1),r=[];return t&&r.push("symbolIcon"),e&&r.push("symbolSDF"),r}getDefaultProgramParams(t,e){return{config:new bh(this,e),overrideFog:!1}}}const SO=WE.types,TO=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function AO(t,e,r,n,i,o,s,a,l,c,u,h,f){const d=a?Math.min(FA,Math.round(a[0])):0,p=a?Math.min(FA,Math.round(a[1])):0;t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),o,s,(d<<1)+(l?1:0),p,16*c,16*u,256*h,256*f)}function OO(t,e,r){t.emplaceBack(e,r)}function CO(t,e,r,n,i,o,s){t.emplaceBack(e,r,n,i,o,s)}function MO(t,e,r,n,i){const o=5*e+2;t.float32[o+0]=r,t.float32[o+1]=n,t.float32[o+2]=i}function kO(t,e,r,n,i){t.emplaceBack(e,r,n,i),t.emplaceBack(e,r,n,i),t.emplaceBack(e,r,n,i),t.emplaceBack(e,r,n,i)}function IO(t){for(const e of t.sections)if(oc(e.text))return!0;return!1}
2class PO{constructor(t){this.layoutVertexArray=new su,this.indexArray=new pu,this.programConfigurations=t,this.segments=new Nu,this.dynamicLayoutVertexArray=new ru,this.opacityVertexArray=new lu,this.placedSymbolArray=new ku,this.iconTransitioningVertexArray=new cu,this.globeExtVertexArray=new au,this.zOffsetVertexArray=new yu}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length&&0===this.iconTransitioningVertexArray.length}upload(t,e,r,n,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,KS.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,QS.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,TO,!0),this.iconTransitioningVertexArray.length>0&&(this.iconTransitioningVertexBuffer=t.createVertexBuffer(this.iconTransitioningVertexArray,eT.members,!0)),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,JS.members,!0)),!this.zOffsetVertexBuffer&&(this.zOffsetVertexArray.length>0||i)&&(this.zOffsetVertexBuffer=t.createVertexBuffer(this.zOffsetVertexArray,tT.members,!0)),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.iconTransitioningVertexBuffer&&this.iconTransitioningVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy(),this.zOffsetVertexBuffer&&this.zOffsetVertexBuffer.destroy())}}Vl(PO,"SymbolBuffers");class LO{constructor(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Nu,this.collisionVertexArray=new du,this.collisionVertexArrayExt=new ru}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,rT.members,!0),this.collisionVertexBufferExt=t.createVertexBuffer(this.collisionVertexArrayExt,nT.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.de
2stroy())}}Vl(LO,"CollisionBuffers");class RO{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.fqid)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.hasAnyIconTextFit=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=_v.identity([]),this.placementViewportMatrix=_v.identity([]);const e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=lT(this.zoom,e["text-size"]),this.iconSizeData=lT(this.zoom,e["icon-size"]);const r=this.layers[0].layout,n=r.get("symbol-sort-key"),i=r.get("symbol-z-order");this.canOverlap=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==i&&void 0!==n.constantOr(1);const o="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&this.canOverlap,this.writingModes=r.get("text-writing-mode").map((t=>TT[t])),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.sourceID=t.sourceID,this.projection=t.projection,this.hasAnyZOffset=!1,this.zOffsetSortDirty=!1,this.zOffsetBuffersNeedUpload=r.get("symbol-z-elevate")}createArrays(){this.text=new PO(new xh(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new PO(new xh(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new Lu,this.lineVertexArray=new Ru,this.symbolInstances=new Pu}calculateGlyphDependencies(t,e,r,n,i){for(let r=0;r<t.length;r++){const o=t.codePointAt(r);if(void 0===o)break;if(e[o]=!0,n&&i&&o<=65535){const n=mT[t.charAt(r)];n&&(e[n.charCodeAt(0)]=!0)}}}populate(t,e,r,n){const i=this.layers[0],o=i.layout,s="globe"===this.projection.name,a=o.get("text-font"),l=o.get("text-field"),c=o.get("icon-image"),u=("constant"!==l.value.kind||l.value.value instanceof Tn&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),h="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,f=o.get("symbol-sort-key");if(this.features=[],!u&&!h)return;const d=e.iconDependencies,p=e.glyphDependencies,m=e.availableImages,g=new bc(this.zoom);for(const{feature:e,id:l,index:c,sourceLayerIndex:y}of t){const t=i._featureFilter.needGeometry,_=Lx(e,t);if(!i._featureFilter.filter(g,_,r))continue;if(t||(_.geometry=Px(e,r,n)),s&&1!==e.type&&r.z<=5){const t=_.geometry,e=.98078528056,n=(t,n)=>{const i=Ib(t.x,t.y,r,1),o=Ib(n.x,n.y,r,1);return Sv.dot(i,o)<e};for(let e=0;e<t.length;e++)t[e]=Ox(t[e],n)}let v,b;if(u){const t=i.getValueAndResolveTokens("text-field",_,r,m),e=Tn.factory(t);IO(e)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===pc()||this.hasRTLText&&_c.isParsed())&&(v=dT(e,i,_))}if(h){const t=i.getValueAndResolveTokens("icon-image",_,r,m);b=t instanceof An?t:An.fromString(t)}if(!v&&!b)continue;const x=this.sortFeaturesByKey?f.evaluate(_,{},r):void 0,w={id:l,text:v,icon:b,index:c,sourceLayerIndex:y,geometry:_.geometry,properties:e.properties,type:SO[e.type],sortKey:x};if(this.features.push(w),b&&(d[b.namePrimary]=!0,b.nameSecondary&&(d[b.nameSecondary]=!0)),v){const t=a.evaluate(_,{},r).join(","),e="map"===o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(TT.vertical)>=0;for(const r of v.sections)if(r.image)d[r.image.namePrimary]=!0;else{const n=Xl(v.toString()),i=r.fontStack||t,o=p[i]=p[i]||{};this.calculateGlyphDependencies(r.text,o,e,this.allowVerticalPlacement,n)}}}"line"===o.get("symbol-placement")&&(this.features=pT(this.features)),this.sortFeaturesByKey&&this.features.sort(((t,e)=>t.sortKey-e.sortKey))}update(t,e,r,n,i){const o=0!==Object.keys(t).length;if(o&&!this.stateDependentLayers.length)return;const s=o?this.stateDependentLayers:this.layers;this.text.programConfigurations.updatePaintArrays(t,e,s,r,n,i),this.icon.programConfigurations.updatePaintArrays(t,e,s,r,n,i)}updateZOffset(){const t=(t,e,n)=>{r+=e,r>t.length&&t.resize(r);for(let i=-e;i<0;i++)t.emplace(i+r,n)},e=(t,e,r)=>{n+=e,n>t.length&&t.resize(n);for(let i=-e;i<0;i++)t.emplace(i+n,r)};if(!this.zOffsetBuffersNeedUpload)return;this.zOffsetBuffersNeedUpload=!1;let r=0,n=0;for(let r=0;r<this.symbolInstances.length;r++){const n=this.symbolInstances.get(r),{numHorizontalGlyphVertices:i,numVerticalGlyphVertices:o,numIconVertices:s}=n,a=n.zOffset,l=s>0;if((i>0||o>0)&&(t(this.text.zOffsetVertexArray,i,a),t(this.text.zOffsetVertexArray,o,a)),l){const{placedIconSymbolIndex:t,verticalPlacedIconSymbolIndex:r}=n;t>=0&&e(this.icon.zOffsetVertexArray,s,a),r>=0&&e(this.icon.zOffsetVertexArray,n.numVerticalIconVertices,a)}}this.text.zOffsetVertexBuffer&&this.text.zOffsetVertexBuffer.updateData(this.text.zOffsetVertexArray),this.icon.zOffsetVertexBuffer&&this.icon.zOffsetVertexBuffer.updateData(this.icon.zOffsetVertexArray)}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload,this.zOffsetBuffersNeedUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload,this.zOffsetBuffersNeedUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=_O(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const r=this.lineVertexArray.length;if(void 0!==t.segment)for(const{x:t,y:r}of e)this.lineVertexArray.emplaceBack(t,r);return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m){const g=t.indexArray,y=t.layoutVertexArray,_=t.globeExtVertexArray,v=t.segments.prepareSegment(4*e.length,y,g,this.canOverlap?o.sortKey:void 0),b=this.glyphOffsetArray.length,x=v.vertexLength,w=this.allowVerticalPlacement&&s===TT.vertical?Math.PI/2:0,E=o.text&&o.text.sections;for(let n=0;n<e.length;n++){const{tl:i,tr:s,bl:c,br:u,texPrimary:h,texSecondary:b,pixelOffsetTL:x,pixelOffsetBR:S,minFontScaleX:T,minFontScaleY:A,glyphOffset:O,isSDF:C,sectionIndex:M}=e[n],k=v.vertexLength,I=O[1];if(AO(y,l.x,l.y,i.x,I+i.y,h.x,h.y,r,C,x.x,x.y,T,A),AO(y,l.x,l.y,s.x,I+s.y,h.x+h.w,h.y,r,C,S.x,x.y,T,A),AO(y,l.x,l.y,c.x,I+c.y,h.x,h.y+h.h,r,C,x.x,S.y,T,A),AO(y,l.x,l.y,u.x,I+u.y,h.x+h.w,h.y+h.h,r,C,S.x,S.y,T,A),a){const{x:e,y:r,z:n}=a.anchor,[i,o,s]=a.up;CO(_,e,r,n,i,o,s),CO(_,e,r,n,i,o,s),CO(_,e,r,n,i,o,s),CO(_,e,r,n,i,o,s),kO(t.dynamicLayoutVertexArray,e,r,n,w)}else kO(t.dynamicLayoutVertexArray,l.x,l.y,l.z,w);if(m){const e=b||h;OO(t.iconTransitioningVertexArray,e.x,e.y),OO(t.iconTransitioningVertexArray,e.x+e.w,e.y),OO(t.iconTransitioningVertexArray,e.x,e.y+e.h),OO(t.iconTransitioningVertexArray,e.x+e.w,e.y+e.h)}g.emplaceBack(k,k+1,k+2),g.emplaceBack(k+1,k+2,k+3),v.vertexLength+=4,v.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(O[0]),n!==e.length-1&&M===e[n+1].sectionIndex||t.programConfigurations.populatePaintArrays(y.length,o,o.index,{},f,d,p,E&&E[M])}const S=a?a.anchor:l;t.placedSymbolArray.emplaceBack(S.x,S.y,S.z,l.x,l.y,b,this.glyphOffsetArray.length-b,x,c,u,l.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],s,0,!1,0,h,0)}_commitLayoutVertex(t,e,r,n,i,o,s){t.emplaceBack(e,r,n,i,o,Math.round(s.x),Math.round(s.y))}_addCollisionDebugVertices(t,e,r,n,i,o,s){const a=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),l=a.vertexLength,c=s.tileAnchorX,u=s.tileAnchorY;for(let t=0;t<4;t++)r.collisionVertexArray.emplaceBack(0,0,0,0);this._commitDebugCollisionVertexUpdate(r.collisionVertexArrayExt,e,t.padding,s.zOffset),this._commitLayoutVertex(r.layoutVertexArray,n,i,o,c,u,new b(t.x1,t.y1)),this._commitLayoutVertex(r.layoutVertexArray,n,i,o,c,u,new b(t.x2,t.y1)),this._commitLayoutVertex(r.layoutVertexArray,n,i,o,c,u,new b(t.x2,t.y2)),this._commitLayoutVertex(r.layoutVertexArray,n,i,o,c,u,new b(t.x1,t.y2)),a.vertexLength+=4;const h=r.indexArray;h.emplaceBack(l,l+1),h.emplaceBack(l+1,l+2),h.emplaceBack(l+2,l+3),h.emplaceBack(l+3,l),a.primitiveLength+=4}_addTextDebugCollisionBoxes(t,e,r,n,i,o){for(let s=n;s<i;s++){const n=r.get(s),i=this.getSymbolInstanceTextSize(t,o,e,s);this._addCollisionDebugVertices(n,i,this.textCollisionBox,n.projectedAnchorX,n.projectedAnchorY,n.projectedAnchorZ,o)}}_addIconDebugCollisionBoxes(t,e,r,n,i,o){for(let s=n;s<i;s++){const n=r.get(s),i=this.getSymbolInstanceIconSize(t,e,o.placedIconSymbolIndex);this._addCollisionDebugVertices(n,i,this.iconCollisionBox,n.projectedAnchorX,n.projectedAnchorY,n.projectedAnchorZ,o)}}generateCollisionDebugBuffers(t,e){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new LO(hu,iT.members,cu),this.iconCollisionBox=new LO(hu,iT.members,cu);const r=uT(this.iconSizeData,t),n=uT(this.textSizeData,t);for(let i=0;i<this.symbolInstances.length;i++){const o=this.symbolInstances.get(i);this._addTextDebugCollisionBoxes(n,t,e,o.textBoxStartIndex,o.textBoxEndIndex,o),this._addTextDebugCollisionBoxes(n,t,e,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o),this._addIconDebugCollisionBoxes(r,t,e,o.iconBoxStartIndex,o.iconBoxEndIndex,o),this._addIconDebugCollisionBoxes(r,t,e,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex,o)}}getSymbolInstanceTextSize(t,e,r,n){const i=e.rightJustifiedTextSymbolIndex>=0?e.rightJustifiedTextSymbolIndex:e.centerJustifiedTextSymbolIndex>=0?e.centerJustifiedTextSymbolIndex:e.leftJustifiedTextSymbolIndex>=0?e.leftJustifiedTextSymbolIndex:e.verticalPlacedTextSymbolIndex>=0?e.verticalPlacedTextSymbolIndex:n,o=this.text.placedSymbolArray.get(i),s=cT(this.textSizeData,t,o)/sT;return this.tilePixelRatio*s}getSymbolInstanceIconSize(t,e,r){const n=this.icon.placedSymbolArray.get(r),i=cT(this.iconSizeData,t,n);return this.tilePixelRatio*i}
2_commitDebugCollisionVertexUpdate(t,e,r,n){t.emplaceBack(e,-r,-r,n),t.emplaceBack(e,r,-r,n),t.emplaceBack(e,r,r,n),t.emplaceBack(e,-r,r,n)}_updateTextDebugCollisionBoxes(t,e,r,n,i,o){for(let s=n;s<i;s++){const n=r.get(s),i=this.getSymbolInstanceTextSize(t,o,e,s),a=this.textCollisionBox.collisionVertexArrayExt;this._commitDebugCollisionVertexUpdate(a,i,n.padding,o.zOffset)}}_updateIconDebugCollisionBoxes(t,e,r,n,i,o){for(let s=n;s<i;s++){const n=r.get(s),i=this.getSymbolInstanceIconSize(t,e,o.placedIconSymbolIndex),a=this.iconCollisionBox.collisionVertexArrayExt;this._commitDebugCollisionVertexUpdate(a,i,n.padding,o.zOffset)}}updateCollisionDebugBuffers(t,e){if(!this.hasDebugData())return;this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexArrayExt.clear(),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexArrayExt.clear();const r=uT(this.iconSizeData,t),n=uT(this.textSizeData,t);for(let i=0;i<this.symbolInstances.length;i++){const o=this.symbolInstances.get(i);this._updateTextDebugCollisionBoxes(n,t,e,o.textBoxStartIndex,o.textBoxEndIndex,o),this._updateTextDebugCollisionBoxes(n,t,e,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o),this._updateIconDebugCollisionBoxes(r,t,e,o.iconBoxStartIndex,o.iconBoxEndIndex,o),this._updateIconDebugCollisionBoxes(r,t,e,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex,o)}this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexBufferExt&&this.textCollisionBox.collisionVertexBufferExt.updateData(this.textCollisionBox.collisionVertexArrayExt),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexBufferExt&&this.iconCollisionBox.collisionVertexBufferExt.updateData(this.iconCollisionBox.collisionVertexArrayExt)}_deserializeCollisionBoxesForSymbol(t,e,r,n,i,o,s,a,l){const c={};if(e<r){const{x1:r,y1:n,x2:i,y2:o,padding:s,projectedAnchorX:a,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f,featureIndex:d}=t.get(e);c.textBox={x1:r,y1:n,x2:i,y2:o,padding:s,projectedAnchorX:a,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f},c.textFeatureIndex=d}if(n<i){const{x1:e,y1:r,x2:i,y2:o,padding:s,projectedAnchorX:a,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f,featureIndex:d}=t.get(n);c.verticalTextBox={x1:e,y1:r,x2:i,y2:o,padding:s,projectedAnchorX:a,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f},c.verticalTextFeatureIndex=d}if(o<s){const{x1:e,y1:r,x2:n,y2:i,padding:s,projectedAnchorX:a,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f,featureIndex:d}=t.get(o);c.iconBox={x1:e,y1:r,x2:n,y2:i,padding:s,projectedAnchorX:a,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f},c.iconFeatureIndex=d}if(a<l){const{x1:e,y1:r,x2:n,y2:i,padding:o,projectedAnchorX:s,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f,featureIndex:d}=t.get(a);c.verticalIconBox={x1:e,y1:r,x2:n,y2:i,padding:o,projectedAnchorX:s,projectedAnchorY:l,projectedAnchorZ:u,tileAnchorX:h,tileAnchorY:f},c.verticalIconFeatureIndex=d}return c}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let e=0;e<this.symbolInstances.length;e++){const r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}hasIconTextFit(){return this.hasAnyIconTextFit}addIndicesForPlacedSymbol(t,e){const r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs;for(let e=r.vertexStartIndex;e<n;e+=4)t.indexArray.emplaceBack(e,e+1,e+2),t.indexArray.emplaceBack(e+1,e+2,e+3)}
2getSortedSymbolIndexes(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const e=Math.sin(t),r=Math.cos(t),n=[],i=[],o=[];for(let t=0;t<this.symbolInstances.length;++t){o.push(t);const s=this.symbolInstances.get(t);n.push(0|Math.round(e*s.tileAnchorX+r*s.tileAnchorY)),i.push(s.featureIndex)}return o.sort(((t,e)=>n[t]-n[e]||i[e]-i[t])),o}getSortedIndexesByZOffset(){if(!this.zOffsetSortDirty)return this.symbolInstanceIndexesSortedZOffset;if(!this.symbolInstanceIndexesSortedZOffset){this.symbolInstanceIndexesSortedZOffset=[];for(let t=0;t<this.symbolInstances.length;++t)this.symbolInstanceIndexesSortedZOffset.push(t)}return this.zOffsetSortDirty=!1,this.symbolInstanceIndexesSortedZOffset.sort(((t,e)=>this.symbolInstances.get(e).zOffset-this.symbolInstances.get(t).zOffset))}addToSortKeyRanges(t,e){const r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);const{rightJustifiedTextSymbolIndex:r,centerJustifiedTextSymbolIndex:n,leftJustifiedTextSymbolIndex:i,verticalPlacedTextSymbolIndex:o,placedIconSymbolIndex:s,verticalPlacedIconSymbolIndex:a}=e;r>=0&&this.addIndicesForPlacedSymbol(this.text,r),n>=0&&n!==r&&this.addIndicesForPlacedSymbol(this.text,n),i>=0&&i!==n&&i!==r&&this.addIndicesForPlacedSymbol(this.text,i),o>=0&&this.addIndicesForPlacedSymbol(this.text,o),s>=0&&this.addIndicesForPlacedSymbol(this.icon,s),a>=0&&this.addIndicesForPlacedSymbol(this.icon,a)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Vl(RO,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),RO.MAX_GLYPHS=65535,RO.addDynamicAttributes=kO;var DO=RO;const zO=Zc([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"},{name:"a_linesofar",components:1,type:"Float32"}],4),{members:BO,size:jO,alignment:FO}=zO,NO=Zc([{name:"a_packed",components:4,type:"Float32"}]),{members:$O,size:UO,alignment:VO}=NO,GO=WE.types,qO=63,HO=Math.cos(Math.PI/180*37.5),WO=15,ZO=20;class XO{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.fqid)),this.index=t.index,this.projection=t.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((t=>{this.gradients[t.id]={}})),this.layoutVertexArray=new eu,this.layoutVertexArray2=new ru,this.indexArray=new pu,this.programConfigurations=new xh(t.layers,t.zoom),this.segments=new Nu,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,r,n){this.hasPattern=pE("line",this.layers,e);const i=this.layers[0].layout.get("line-sort-key"),o=[];for(const{feature:e,id:s,index:a,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Lx(e,t);if(!this.layers[0]._featureFilter.filter(new bc(this.zoom),c,r))continue;const u=i?i.evaluate(c,{},r):void 0,h={id:s,properties:e.properties,type:e.type,sourceLayerIndex:l,index:a,geometry:t?c.geometry:Px(e,r,n),patterns:{},sortKey:u};o.push(h)}i&&o.sort(((t,e)=>t.sortKey-e.sortKey));const{lineAtlas:s,featureIndex:a}=e,l=this.addConstantDashes(s);for(const n of o){const{geometry:i,index:o,sourceLayerIndex:c}=n;if(l&&this.addFeatureDashes(n,s),this.hasPattern){const t=mE("line",this.layers,n,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(n,i,o,r,s.positions,e.availableImages,e.brightness);const u=t[o].feature;a.insert(u,i,o,c,this.index)}}addConstantDashes(t){let e=!1;for(const r of this.layers){const n=r.paint.get("line-dasharray").value,i=r.layout.get("line-cap").value;if("constant"!==n.kind||"constant"!==i.kind)e=!0;else{const e=i.value,r=n.value;if(!r)continue;t.addDash(r,e)}}return e}addFeatureDashes(t,e){const r=this.zoom;for(const n of this.layers){const i=n.paint.get("line-dasharray").value,o=n.layout.get("line-cap").value;if("constant"===i.kind&&"constant"===o.kind)continue;let s,a;if("constant"===i.kind){if(s=i.value,!s)continue}else s=i.evaluate({zoom:r},t);a="constant"===o.kind?o.value:o.evaluate({zoom:r},t),e.addDash(s,a),t.patterns[n.id]=e.getKey(s,a)}}update(t,e,r,n,i){const o=0!==Object.keys(t).length;if(o&&!this.stateDependentLayers.length)return;const s=o?this.stateDependentLayers:this.layers;this.programConfigurations.updatePaintArrays(t,e,s,r,n,i)}addFeatures(t,e,r,n,i,o){for(const t of this.patternFeatures)this.addFeature(t,t.geometry,t.index,e,r,n,o)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,$O)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,BO),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,r,n,i,o,s){const a=this.layers[0].layout,l=a.get("line-join").evaluate(t,{}),c=a.get("line-cap").evaluate(t,{}),u=a.get("line-miter-limit"),h=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const r of e)this.addLine(r,t,l,c,u,h);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,o,n,s)}addLine(t,e,r,n,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineS
2oFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e<t.length-1;e++)this.totalDistance+=t[e].dist(t[e+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const s="Polygon"===GO[e.type];let a=t.length;for(;a>=2&&t[a-1].equals(t[a-2]);)a--;let l=0;for(;l<a-1&&t[l].equals(t[l+1]);)l++;if(a<(s?3:2))return;"bevel"===r&&(i=1.05);const c=this.overscaling<=16?WO*Li/(512*this.overscaling):0,u=this.segments.prepareSegment(10*a,this.layoutVertexArray,this.indexArray);let h,f,d,p,m;this.e1=this.e2=-1,s&&(h=t[a-2],m=t[l].sub(h)._unit()._perp());for(let e=l;e<a;e++){if(d=e===a-1?s?t[l+1]:void 0:t[e+1],d&&t[e].equals(d))continue;m&&(p=m),h&&(f=h),h=t[e],m=d?d.sub(h)._unit()._perp():p,p=p||m;let g=p.add(m);0===g.x&&0===g.y||g._unit();const y=p.x*m.x+p.y*m.y,_=g.x*m.x+g.y*m.y,v=0!==_?1/_:1/0,b=2*Math.sqrt(2-2*_),x=_<HO&&f&&d,w=p.x*m.y-p.y*m.x>0;if(x&&e>l){const t=h.dist(f);if(t>2*c){const e=h.sub(h.sub(f)._mult(c/t)._round());this.updateDistance(f,e),this.addCurrentVertex(e,p,0,0,u),f=e}}const E=f&&d;let S=E?r:s?"butt":n;if(E&&"round"===S&&(v<o?S="miter":v<=2&&(S="fakeround")),"miter"===S&&v>i&&(S="bevel"),"bevel"===S&&(v>2&&(S="flipbevel"),v<i&&(S="miter")),f&&this.updateDistance(f,h),"miter"===S)g._mult(v),this.addCurrentVertex(h,g,0,0,u);else if("flipbevel"===S){if(v>100)g=m.mult(-1);else{const t=v*p.add(m).mag()/p.sub(m).mag();g._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(h,g,0,0,u),this.addCurrentVertex(h,g.mult(-1),0,0,u)}else if("bevel"===S||"fakeround"===S){const t=-Math.sqrt(v*v-1),e=w?t:0,r=w?0:t;if(f&&this.addCurrentVertex(h,p,e,r,u),"fakeround"===S){const t=Math.round(180*b/Math.PI/ZO);for(let e=1;e<t;e++){let r=e/t;if(.5!==r){const t=r-.5;r+=r*t*(r-1)*((1.0904+y*(y*(3.55645-1.43519*y)-3.2452))*t*t+(.848013+y*(.215638*y-1.06021)))}const n=m.sub(p)._mult(r)._add(p)._unit()._mult(w?-1:1);this.addHalfVertex(h,n.x,n.y,!1,w,0,u)}}d&&this.addCurrentVertex(h,m,-e,-r,u)}else if("butt"===S)this.addCurrentVertex(h,g,0,0,u);else if("square"===S){const t=f?1:-1;f||this.addCurrentVertex(h,g,t,t,u),this.addCurrentVertex(h,g,0,0,u),f&&this.addCurrentVertex(h,g,t,t,u)}else"round"===S&&(f&&(this.addCurrentVertex(h,p,0,0,u),this.addCurrentVertex(h,p,1,1,u,!0)),d&&(this.addCurrentVertex(h,m,-1,-1,u,!0),this.addCurrentVertex(h,m,0,0,u)));if(x&&e<a-1){const t=h.dist(d);if(t>2*c){const e=h.add(d.sub(h)._mult(c/t)._round());this.updateDistance(h,e),this.addCurrentVertex(e,m,0,0,u),h=e}}}}addCurrentVertex(t,e,r,n,i,o=!1){const s=e.x+e.y*r,a=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,s,a,o,!1,r,i),this.addHalfVertex(t,l,c,o,!0,-n,i)}addHalfVertex({x:t,y:e},r,n,i,o,s,a){this.layoutVertexArray.emplaceBack((t<<1)+(i?1:0),(e<<1)+(o?1:0),Math.round(qO*r)+128,Math.round(qO*n)+128,1+(0===s?0:s<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),o?this.e2=l:this.e1=l}updateScaledDistance(){if(this.lineClips){const t=this.lineClips.end-this.lineClips.start,e=this.totalDistance/t;this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=e*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}}Vl(XO,"LineBucket",{omit:["layers","patternFeatures"]});class YO{constructor(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)}update(t,r,n){const{width:i,height:o}=t,{context:s}=this,{gl:a}=s,{HTMLImageElement:l,HTMLCanvasElement:c,HTMLVideoElement:u,ImageData:h,ImageBitmap:f}=e;if(a.bindTexture(a.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!r||!1!==r.premultiply)),n||this.size&&this.size[0]===i&&this.size[1]===o){const{x:e,y:r}=n||{x:0,y:0};if(t instanceof l||t instanceof c||t instanceof u||t instanceof h||f&&t instanceof f)a.texSubImage2D(a.TEXTURE_2D,0,e,r,a.RGBA,a.UNSIGNED_BYTE,t);else{let n=this.format,s=a.UNSIGNED_BYTE;this.format===a.R32F&&(n=a.RED,s=a.FLOAT),a.texSubImage2D(a.TEXTURE_2D,0,e,r,i,o,n,s,t.data)}}else if(this.size=[i,o],t instanceof l||t instanceof c||t instanceof u||t instanceof h||f&&t instanceof f){let e=this.format;this.format===a.R8&&(e=a.RED),a.texImage2D(a.TEXTURE_2D,0,this.format,e,a.UNSIGNED_BYTE,t)}else{let e=this.format,r=this.format,n=a.UNSIGNED_BYTE;this.format===a.DEPTH_COMPONENT&&(e=a.DEPTH_COMPONENT16,n=a.UNSIGNED_SHORT),this.format===a.R32F&&(n=a.FLOAT,r=a.RED),a.texImage2D(a.TEXTURE_2D,0,e,i,o,0,r,n,t.data)}this.useMipmap=Boolean(r&&r.useMipmap),this.useMipmap&&a.generateMipmap(a.TEXTURE_2D)}bind(t,e){const{context:r}=this,{gl:n}=r;n.bindTexture(n.TEXTURE_2D,this.texture),t!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,this.useMipmap?t===n.NEAREST?n.NEAREST_MIPMAP_NEAREST:n.LINEAR_MIPMAP_NEAREST:t),this.minFilter=t),e!==this.wrapS&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrapS=e)}bindExtraParam(t,e,r,n){const{context:i}=this,{gl:o}=i;
2o.bindTexture(o.TEXTURE_2D,this.texture),e!==this.magFilter&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,e),this.magFilter=e),t!==this.minFilter&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this.useMipmap?t===o.NEAREST?o.NEAREST_MIPMAP_NEAREST:o.LINEAR_MIPMAP_NEAREST:t),this.minFilter=t),r!==this.wrapS&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,r),this.wrapS=r),n!==this.wrapT&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,n),this.wrapT=n)}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}class KO{constructor(t,e){this.context=t,this.texture=e}bind(t,e){const{context:r}=this,{gl:n}=r;n.bindTexture(n.TEXTURE_2D,this.texture),t!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,t),this.minFilter=t),e!==this.wrapS&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrapS=e)}}const JO=32,QO=JO+1,tC=JO*JO*2-2,eC=tC-JO*JO,rC=new Uint16Array(4*tC);for(let t=0;t<tC;t++){let e=t+2,r=0,n=0,i=0,o=0,s=0,a=0;for(1&e?i=o=s=JO:r=n=a=JO;(e>>=1)>1;){const t=r+i>>1,l=n+o>>1;1&e?(i=r,o=n,r=s,n=a):(r=i,n=o,i=s,o=a),s=t,a=l}const l=4*t;rC[l+0]=r,rC[l+1]=n,rC[l+2]=i,rC[l+3]=o}const nC=new Uint16Array(QO*QO*2),iC=new Uint8Array(QO*QO),oC=new Uint16Array(QO*QO),sC=JO/256/4;function aC(t){return 0===t?-sC:t===QO-1?sC:0}function lC(t,e){const r=ZA(t,e),n=Math.pow(2,t.z);for(let i=0;i<QO;i++)for(let o=0;o<QO;o++){const s=px((t.x+(o+aC(o))/JO)/n),a=mx((t.y+(i+aC(i))/JO)/n),l=e.project(s,a),c=i*QO+o;nC[2*c+0]=Math.round((l.x*r.scale-r.x)*Li),nC[2*c+1]=Math.round((l.y*r.scale-r.y)*Li)}iC.fill(0),oC.fill(0);for(let t=tC-1;t>=0;t--){const e=4*t,r=rC[e+0],n=rC[e+1],i=rC[e+2],o=rC[e+3],s=r+i>>1,a=n+o>>
21,l=s+a-n,c=a+r-s,u=n*QO+r,h=o*QO+i,f=a*QO+s,d=nC[2*u+0],p=nC[2*u+1],m=nC[2*h+0],g=nC[2*h+1],y=nC[2*f+0],_=nC[2*f+1],v=Math.hypot((d+m)/2-y,(p+g)/2-_)>=16;if(iC[f]=iC[f]||(v?1:0),t<eC){const t=(n+c>>1)*QO+(r+l>>1),e=(o+c>>1)*QO+(i+l>>1);iC[f]=iC[f]||iC[t]||iC[e]}}const i=new Qc,o=new pu;let s=0;function a(t,e){const r=e*QO+t;return 0===oC[r]&&(i.emplaceBack(nC[2*r+0],nC[2*r+1],t*Li/JO,e*Li/JO),oC[r]=++s),oC[r]-1}function l(t,e,r,n,i,s){const c=t+r>>1,u=e+n>>1;if(Math.abs(t-i)+Math.abs(e-s)>1&&iC[u*QO+c])l(i,s,t,e,c,u),l(r,n,i,s,c,u);else{const l=a(t,e),c=a(r,n),u=a(i,s);o.emplaceBack(l,c,u)}}return l(0,0,JO,JO,JO,0),l(JO,JO,0,0,0,JO),{vertices:i,indices:o}}var cC=Zc([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const uC=3e4,hC={type:2,extent:Li,loadGeometry:()=>[[new b(0,0),new b(Li+1,0),new b(Li+1,Li+1),new b(0,Li+1),new b(0,0)]]};class fC{constructor(t,e,r,n,i){this.tileID=t,this.uid=q(),this.uses=0,this.tileSize=e,this.tileZoom=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=i,n&&n.style&&(this._lastUpdatedBrightness=n.style.getBrightness()),this.expiredRequestCount=0,this.state="loading",n&&n.transform&&(this.projection=n.transform.projection)}registerFadeDuration(t){const e=t+this.timeAdded;e<vr.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}get tileTransform(){return this._tileTransform||(this._tileTransform=ZA(this.tileID.canonical,this.projection)),this._tileTransform}loadVectorData(t,e,r){if(this.unloadVectorData(),this.state="loaded",t){t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=YE(t.buckets,e.style),this.hasSymbolBuckets=!1;for(const t in this.buckets){const e=this.buckets[t];if(e instanceof DO){if(this.hasSymbolBuckets=!0,!r)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const t in this.buckets){const e=this.buckets[t];if(e instanceof DO&&e.hasRTLText){this.hasRTLText=!0,vc();break}}this.queryPadding=0;for(const t in this.buckets){const r=this.buckets[t],n=e.style.getOwnLayer(t);if(!n)continue;const i=n.queryRadius(r);this.queryPadding=Math.max(this.queryPadding,i)}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage),t.lineAtlas&&(this.lineAtlas=t.lineAtlas),this._lastUpdatedBrightness=t.brightness}else this.collisionBoxArray=new Cu}unloadVectorData(){if(this.hasData()){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(t){return this.buckets[t.fqid]}upload(t){for(const e in this.buckets){const r=this.buckets[e];r.uploadPending()&&r.upload(t)}const e=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new YO(t,this.imageAtlas.image,e.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new YO(t,this.glyphAtlasImage,e.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new YO(t,this.lineAtlas.image,e.ALPHA),this.lineAtlas.uploaded=!0)}prepare(t,e,r){if(this.imageAtlas&&this.imageAtlasTexture&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture,r),!e||!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData)return;const n=e.style.getBrightness();(this._lastUpdatedBrightness||n)&&(this._lastUpdatedBrightness&&n&&Math.abs(this._lastUpdatedBrightness-n)<.001||(this._lastUpdatedBrightness=n,this.updateBuckets(void 0,e)))}queryRenderedFeatures(t,e,r,n,i,o,s,a){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:n,pixelPosMatrix:s,transform:o,params:i,tileTransform:this.tileTransform},t,e,r):{}}querySourceFeatures(t,e){const r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;const n=r.loadVTLayers(),i=e?e.sourceLayer:"",o=n._geojsonTileLayer||n[i];if(!o)return;const s=Fa(e&&e.filter),{z:a,x:l,y:c}=this.tileID.canonical,u={z:a,x:l,y:c};for(let e=0;e<o.length;e++){const n=o.feature(e);
2if(s.needGeometry){const t=Lx(n,!0);if(!s.filter(new bc(this.tileID.overscaledZ),t,this.tileID.canonical))continue}else if(!s.filter(new bc(this.tileID.overscaledZ),n))continue;const h=r.getId(n,i),f=new kS(n,a,l,c,h);f.tile=u,t.push(f)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}bucketsLoaded(){for(const t in this.buckets)if(this.buckets[t].uploadPending())return!1;return!0}patternsLoaded(){return!!this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(t){const e=this.expirationTime;if(t.cacheControl){const e=ht(t.cacheControl);e["max-age"]&&(this.expirationTime=Date.now()+1e3*e["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){const t=Date.now();let r=!1;if(this.expirationTime>t)r=!1;else if(e)if(this.expirationTime<e)r=!0;else{const n=this.expirationTime-e;n?this.expirationTime=t+Math.max(n,uC):r=!0}else r=!0;r?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(t,e){this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length&&e&&this.updateBuckets(t,e)}updateBuckets(t,e){if(!this.latestFeatureIndex)return;const r=this.latestFeatureIndex.loadVTLayers(),n=e.style.listImages(),i=e.style.getBrightness();for(const o in this.buckets){if(!e.style.hasLayer(o))continue;const s=this.buckets[o],a=s.layers[0].sourceLayer||"_geojsonTileLayer",l=r[a];let c={};if(t&&(c=t[a],!l||!c||0===Object.keys(c).length))continue;const u=this.imageAtlas&&this.imageAtlas.patternPositions||{};if(s.update(c,l,n,u,i),s instanceof XO||s instanceof yE){const t=e.style.getOwnSourceCache(s.layers[0].source);e._terrain&&e._terrain.enabled&&t&&s.programConfigurations.needsUpload&&e._terrain._clearRenderCacheForTile(t.id,this.tileID)}const h=e&&e.style&&e.style.getOwnLayer(o);h&&(this.queryPadding=Math.max(this.queryPadding,h.queryRadius(s)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<vr.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(t){this.symbolFadeHoldUntil=vr.now()+t}setTexture(t,e){const r=e.context,n=r.gl;this.texture=this.texture||e.getTileTexture(t.width),this.texture&&this.texture instanceof YO?this.texture.update(t,{useMipmap:!0}):(this.texture=new YO(r,t,n.RGBA,{useMipmap:!0}),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE))}setDependencies(t,e){const r={};for(const t of e)r[t]=!0;this.dependencies[t]=r}hasDependency(t,e){for(const r of t){const t=this.dependencies[r];if(t)for(const r of e)if(t[r])return!0}return!1}clearQueryDebugViz(){}_makeDebugTileBoundsBuffers(t,e){if(!e||"mercator"===e.name||this._tileDebugBuffer)return;const r=Px(hC,this.tileID.canonical,this.tileTransform)[0],n=new Kc,i=new xu;for(let t=0;t<r.length;t++){const{x:e,y:o}=r[t];n.emplaceBack(e,o),i.emplaceBack(t)}i.emplaceBack(0),this._tileDebugIndexBuffer=t.createIndexBuffer(i),this._tileDebugBuffer=t.createVertexBuffer(n,Lv.members),this._tileDebugSegments=Nu.simpleSegment(0,0,n.length,i.length)}_makeTileBoundsBuffers(t,e){if(this._tileBoundsBuffer||!e||"mercator"===e.name)return;const r=Px(hC,this.tileID.canonical,this.tileTransform)[0];let n,i;if(this.isRaster){const t=lC(this.tileID.canonical,e);n=t.vertices,i=t.indices}else{n=new Qc,i=new pu;for(const{x:t,y:e}of r)n.emplaceBack(t,e,0,0);const t=hE(n.int16,void 0,4);for(let e=0;e<t.length;e+=3)i.emplaceBack(t[e],t[e+1],t[e+2])}this._tileBoundsBuffer=t.createVertexBuffer(n,cC.members),this._tileBoundsIndexBuffer=t.createIndexBuffer(i),this._tileBoundsSegments=Nu.simpleSegment(0,0,n.length,i.length)}_makeGlobeTileDebugBuffers(t,e){const r=e.projection;if(!r||"globe"!==r.name||e.freezeTileCoverage)return;const n=this.tileID.canonical,i=Db(wb(n,e)),o=Vb(e.zoom);let s;o>0&&(s=_v.invert(new Float64Array(16),e.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(t,n,e,i,s,o),this._makeGlobeTileDebugTextBuffer(t,n,e,i,s,o)}_globePoint(t,e,r,n,i,o,s){let a=Ib(t,e,r);
vendor: 6,098 bytes, line 2
2if(o){const i=1<<r.z,l=hx(n.center.lng),c=fx(n.center.lat),u=(r.x+.5)/i-l;let h=0;u>.5?h=-1:u<-.5&&(h=1);let f=(t/Li+r.x)/i+h,d=(e/Li+r.y)/i;f=(f-l)*n._pixelsPerMercatorPixel+l,d=(d-c)*n._pixelsPerMercatorPixel+c;const p=[f*n.worldSize,d*n.worldSize,0];Sv.transformMat4(p,p,o),a=xb(a,p,s)}return Sv.transformMat4(a,a,i)}_makeGlobeTileDebugBorderBuffer(t,e,r,n,i,o){const s=new Kc,a=new xu,l=new Jc,c=(t,c,u,h,f)=>{const d=(u-t)/(f-1),p=(h-c)/(f-1),m=s.length;for(let u=0;u<f;u++){const h=t+u*d,f=c+u*p;s.emplaceBack(h,f);const g=this._globePoint(h,f,e,r,n,i,o);l.emplaceBack(g[0],g[1],g[2]),a.emplaceBack(m+u)}},u=Li;c(0,0,u,0,16),c(u,0,u,u,16),c(u,u,0,u,16),c(0,u,0,0,16),this._tileDebugIndexBuffer=t.createIndexBuffer(a),this._tileDebugBuffer=t.createVertexBuffer(s,Lv.members),this._globeTileDebugBorderBuffer=t.createVertexBuffer(l,Pv.members),this._tileDebugSegments=Nu.simpleSegment(0,0,s.length,a.length)}_makeGlobeTileDebugTextBuffer(t,e,r,n,i,o){const s=4,a=s+1,l=Li/s,c=new Kc,u=new pu,h=new Jc,f=a*a,d=s*s*2;u.reserve(d),c.reserve(f),h.reserve(f);const p=(t,e)=>f*t+e;for(let t=0;t<f;t++){const s=t*l;for(let t=0;t<f;t++){const a=t*l;c.emplaceBack(a,s);const u=this._globePoint(a,s,e,r,n,i,o);h.emplaceBack(u[0],u[1],u[2])}}for(let t=0;t<s;t++)for(let e=0;e<s;e++){const r=p(t,e),n=p(t,e+1),i=p(t+1,e),o=p(t+1,e+1);u.emplaceBack(r,n,i),u.emplaceBack(i,n,o)}this._tileDebugTextIndexBuffer=t.createIndexBuffer(u),this._tileDebugTextBuffer=t.createVertexBuffer(c,Lv.members),this._globeTileDebugTextBuffer=t.createVertexBuffer(h,Pv.members),this._tileDebugTextSegments=Nu.simpleSegment(0,0,f,d)}destroy(t=!1){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&(this.imageAtlasTexture.destroy(),delete this.imageAtlasTexture),this.glyphAtlasTexture&&(this.glyphAtlasTexture.destroy(),delete this.glyphAtlasTexture),this.lineAtlasTexture&&(this.lineAtlasTexture.destroy(),delete this.lineAtlasTexture),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),!t&&this.texture&&this.texture instanceof YO&&(this.texture.destroy(),delete this.texture),this.hillshadeFBO&&(this.hillshadeFBO.destroy(),delete this.hillshadeFBO),this.dem&&delete this.dem,this.neighboringTiles&&delete this.neighboringTiles,this.demTexture&&(this.demTexture.destroy(),delete this.demTexture),this.latestFeatureIndex=null,this.state="unloaded"}}class dC{constructor(t,e){this.max=t,this.onRemove=e,this.reset()}reset(){for(const t in this.data)for(const e of this.data[t])e.timeout&&clearTimeout(e.timeout),this.onRemove(e.value);return this.data={},this.order=[],this}add(t,e,r){const n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);const i={value:e,timeout:void 0};if(void 0!==r&&(i.timeout=setTimeout((()=>{this.remove(t,i)}),r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value}getByKey(t){const e=this.data[t];return e?e[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,e){if(!this.has(t))return this;const r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(t){const e=[];for(const r in this.data)for(const n of this.data[r])t(n.value)||e.push(n);for(const t of e)this.remove(t.value.tileID,t)}}class pC{constructor(t,e,r,n){this.id=pC.uniqueIdxCounter,pC.uniqueIdxCounter++,this.context=t;const i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||n||e.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){this.id=pC.uniqueIdxCounter,pC.uniqueIdxCounter++;const e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){const t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)}}pC.uniqueIdxCounter=0;const mC={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class gC{constructor(t,e,r,n,i,o){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.instanceCount=o,this.context=t;const s=t.gl;this.buffer=s.createBuffer(),t.bindVertexBuffer.set(this.buffer),s.bufferData(s.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?s.DYNAMIC_DRAW:s.STATIC_DRAW),this.dynamicDraw||i||e.destroy()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){const e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)}
2enableAttributes(t,e){for(let r=0;r<this.attributes.length;r++){const n=this.attributes[r],i=e.attributes[n.name];void 0!==i&&t.enableVertexAttribArray(i)}}setVertexAttribPointers(t,e,r){for(let n=0;n<this.attributes.length;n++){const i=this.attributes[n],o=e.attributes[i.name];void 0!==o&&t.vertexAttribPointer(o,i.components,t[mC[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}}setVertexAttribDivisor(t,e,r){for(let n=0;n<this.attributes.length;n++){const i=this.attributes[n],o=e.attributes[i.name];void 0!==o&&this.instanceCount&&this.instanceCount>0&&t.vertexAttribDivisor(o,r)}}destroy(){const t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)}}class yC{constructor(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(t){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class _C extends yC{getDefault(){return wn.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class vC extends yC{getDefault(){return 1}set(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)}}class bC extends yC{getDefault(){return 0}set(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)}}class xC extends yC{getDefault(){return[!0,!0,!0,!0]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class wC extends yC{getDefault(){return!0}set(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)}}class EC extends yC{getDefault(){return 255}set(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)}}class SC extends yC{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(t){const e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)}}class TC extends yC{getDefault(){const t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)}}class AC extends yC{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}}class OC extends yC{getDefault(){return[0,1]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)}}class CC extends yC{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}}class MC extends yC{getDefault(){return this.gl.LESS}set(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)}}class kC extends yC{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}}class IC extends yC{getDefault(){const t=this.gl;return[t.ONE,t.ZERO,t.ONE,t.ZERO]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.blendFuncSeparate(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class PC extends yC{getDefault(){return wn.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class LC extends yC{getDefault(){return this.gl.FUNC_ADD}set(t){(t!==this.current||this.dirty)&&(this.gl.blendEquationSeparate(t,t),this.current=t,this.dirty=!1)}}class RC extends yC{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}}class DC extends yC{getDefault(){return this.gl.BACK}set(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)}}class zC extends yC{getDefault(){return this.gl.CCW}set(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)}}let BC=class extends yC{getDefault(){return null}set(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)}};
2class jC extends yC{getDefault(){return this.gl.TEXTURE0}set(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)}}class FC extends yC{getDefault(){const t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class NC extends yC{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}}class $C extends yC{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class UC extends yC{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}}class VC extends yC{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class GC extends yC{getDefault(){return null}set(t){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class qC extends yC{getDefault(){return null}set(t){this.gl&&(t!==this.current||this.dirty)&&(this.gl.bindVertexArray(t),this.current=t,this.dirty=!1)}}class HC extends yC{getDefault(){return 4}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}}class WC extends yC{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}}class ZC extends yC{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}}class XC extends yC{constructor(t,e){super(t),this.context=t,this.parent=e}getDefault(){return null}}class YC extends XC{setDirty(){this.dirty=!0}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}class KC extends XC{attachment(){return this.gl.DEPTH_ATTACHMENT}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,this.attachment(),e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class JC extends XC{attachment(){return this.gl.DEPTH_ATTACHMENT}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,this.attachment(),e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}class QC extends KC{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}class tM{constructor(t,e,r,n,i){this.context=t,this.width=e,this.height=r;const o=t.gl,s=this.framebuffer=o.createFramebuffer();n&&(this.colorAttachment=new YC(t,s)),i&&(this.depthAttachmentType=i,this.depthAttachment="renderbuffer"===i?new KC(t,s):new JC(t,s))}destroy(){const t=this.context.gl;if(this.colorAttachment){const e=this.colorAttachment.get();e&&t.deleteTexture(e)}if(this.depthAttachment&&this.depthAttachmentType)if("renderbuffer"===this.depthAttachmentType){const e=this.depthAttachment.get();e&&t.deleteRenderbuffer(e)}else{const e=this.depthAttachment.get();e&&t.deleteTexture(e)}t.deleteFramebuffer(this.framebuffer)}}const eM=519;class rM{constructor(t,e,r){this.func=t,this.mask=e,this.range=r}}rM.ReadOnly=!1,rM.ReadWrite=!0,rM.disabled=new rM(eM,rM.ReadOnly,[0,1]);const nM=519,iM=7680;class oM{constructor(t,e,r,n,i,o){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=o}}oM.disabled=new oM({func:nM,mask:0},0,0,iM,iM,iM);const sM=0,aM=1,lM=771,cM=774;class uM{constructor(t,e,r,n){this.blendFunction=t,this.blendColor=e,this.mask=r,this.blendEquation=n}}uM.Replace=[aM,sM,aM,sM],uM.disabled=new uM(uM.Replace,wn.transparent,[!1,!1,!1,!1]),uM.unblended=new uM(uM.Replace,wn.transparent,[!0,!0,!0,!0]),uM.alphaBlended=new uM([aM,lM,aM,lM],wn.transparent,[!0,!0,!0,!0]),uM.multiply=new uM([cM,sM,cM,s
2M],wn.transparent,[!0,!0,!0,!0]);const hM=1029,fM=1028,dM=2305,pM=2304;class mM{constructor(t,e,r){this.enable=t,this.mode=e,this.frontFace=r}}mM.disabled=new mM(!1,hM,dM),mM.backCCW=new mM(!0,hM,dM),mM.backCW=new mM(!0,hM,pM),mM.frontCW=new mM(!0,fM,pM),mM.frontCCW=new mM(!0,fM,dM);class gM{constructor(t,e){this.gl=t,this.clearColor=new _C(this),this.clearDepth=new vC(this),this.clearStencil=new bC(this),this.colorMask=new xC(this),this.depthMask=new wC(this),this.stencilMask=new EC(this),this.stencilFunc=new SC(this),this.stencilOp=new TC(this),this.stencilTest=new AC(this),this.depthRange=new OC(this),this.depthTest=new CC(this),this.depthFunc=new MC(this),this.blend=new kC(this),this.blendFunc=new IC(this),this.blendColor=new PC(this),this.blendEquation=new LC(this),this.cullFace=new RC(this),this.cullFaceSide=new DC(this),this.frontFace=new zC(this),this.program=new BC(this),this.activeTexture=new jC(this),this.viewport=new FC(this),this.bindFramebuffer=new NC(this),this.bindRenderbuffer=new $C(this),this.bindTexture=new UC(this),this.bindVertexBuffer=new VC(this),this.bindElementBuffer=new GC(this),this.bindVertexArrayOES=new qC(this),this.pixelStoreUnpack=new HC(this),this.pixelStoreUnpackPremultiplyAlpha=new WC(this),this.pixelStoreUnpackFlipY=new ZC(this),this.options=e?{...e}:{},this.options.extTextureFilterAnisotropicForceOff||(this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT))),this.extDebugRendererInfo=t.getExtension("WEBGL_debug_renderer_info"),this.extDebugRendererInfo&&(this.renderer=t.getParameter(this.extDebugRendererInfo.UNMASKED_RENDERER_WEBGL),this.vendor=t.getParameter(this.extDebugRendererInfo.UNMASKED_VENDOR_WEBGL)),this.options.extTextureFloatLinearForceOff||(this.extTextureFloatLinear=t.getExtension("OES_texture_float_linear")),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float"),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query_webgl2"),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArrayOES.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(t,e,r){return new pC(this,t,e,r)}createVertexBuffer(t,e,r,n,i){return new gC(this,t,e,r,n,i)}createRenderbuffer(t,e,r){const n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i}createFramebuffer(t,e,r,n){return new tM(this,t,e,r,n)}clear({color:t,depth:e,stencil:r,colorMask:n}){const i=this.gl;let o=0;t&&(o|=i.COLOR_BUFFER_BIT,this.clearColor.set(t),n?this.colorMask.set(n):this.colorMask.set([!0,!0,!0,!0])),void 0!==e&&(o|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(e),this.depthMask.set(!0)),void 0!==r&&(o|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(o)}setCullFace(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))}setDepthMode(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)}setStencilMode(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)}setColorMode(t){x(t.blendFunction,uM.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor),t.blendEquation?this.blendEquation.set(t.blendEquation):this.blendEquation.setDefault()),this.colorMask.set(t.mask)}unbindVAO(){this.bindVertexArrayOES.set(null)}}class yM extends Br{constructor(t,e,r){super(),this.id=t,this._onlySymbols=r,e.on("data",(t=>{"source"===t.dataType&&"metadata"===t.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))})),e.on("error",(()=>{this._sourceErrored=!0})),this._source=e,this._tiles={},this._cache=new dC(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={}
2,this._minTileCacheSize=e.minTileCacheSize,this._maxTileCacheSize=e.maxTileCacheSize,this._loadedParentTiles={},this.castsShadows=!1,this._coveredTiles={},this._shadowCasterTiles={},this._state=new IS,this._isRaster="raster"===this._source.type||"raster-dem"===this._source.type||"custom"===this._source.type&&"raster"===this._source._dataType}onAdd(t){this.map=t,this._minTileCacheSize=void 0===this._minTileCacheSize&&t?t._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=void 0===this._maxTileCacheSize&&t?t._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const t in this._tiles){const e=this._tiles[t];if("errored"!==e.state&&("loaded"!==e.state||!e.bucketsLoaded()))return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(t,e){return t.isSymbolTile=this._onlySymbols,t.isExtraShadowCaster=this._shadowCasterTiles[t.tileID.key],this._source.loadTile(t,e)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,(()=>{}))}_abortTile(t){if(this._source.abortTile)return this._source.abortTile(t,(()=>{}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const e in this._tiles){const r=this._tiles[e];r.upload(t),r.prepare(this.map.style.imageManager,this.map?this.map.painter:null,this._source.scope)}}getIds(){return N(this._tiles).map((t=>t.tileID)).sort(_M).map((t=>t.key))}getRenderableIds(t,e){const r=[];for(const n in this._tiles)this._isIdRenderable(+n,t,e)&&r.push(this._tiles[n]);return t?r.sort(((t,e)=>{const r=t.tileID,n=e.tileID,i=new b(r.canonical.x,r.canonical.y)._rotate(this.transform.angle),o=new b(n.canonical.x,n.canonical.y)._rotate(this.transform.angle);return r.overscaledZ-n.overscaledZ||o.y-i.y||o.x-i.x})).map((t=>t.tileID.key)):r.map((t=>t.tileID)).sort(_M).map((t=>t.key))}hasRenderableParent(t){const e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)}_isIdRenderable(t,e,r){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())&&(r||!this._shadowCasterTiles[t])}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(+t,"reloading")}}_reloadTile(t,e){const r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))}_tileLoaded(t,e,r,n){if(n)if(t.state="errored",404!==n.status)this._source.fire(new zr(n,{tile:t}));else{if(!(t.tileID.key in this._loadedParentTiles))return void this._source.fire(new Dr("data",{dataType:"source",sourceDataType:"error",sourceId:this._source.id}));if("raster-dem"===this._source.type&&this.usedForTerrain&&this.map.painter.terrain){const t=this.map.painter.terrain;this.update(this.transform,t.getScaledDemTileSize(),!0),t.resetTileLookupCache(this.id)}else this.update(this.transform)}else t.timeAdded=vr.now(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),"raster-dem"===this._source.type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),this._source.fire(new Dr("data",{dataType:"source",tile:t,coord:t.tileID,sourceCacheId:this.id}))}_backfillDEM(t){const e=this.getRenderableIds();for(let n=0;n<e.length;n++){const i=e[n];if(t.neighboringTiles&&t.neighboringTiles[i]){const e=this.getTileByID(i);r(t,e),r(e,t)}}function r(t,e){if(!t.dem||t.dem.borderReady)return;t.needsHillshadePrepare=!0,t.needsDEMTextureUpload=!0;let r=e.tileID.canonical.x-t.tileID.canonical.x;const n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,e,r,n){for(const i in this._tiles){let o=this._tiles[i];if(n[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)continue;let s=o.tileID;for(;o&&o.tileID.overscaledZ>e+1;){const t=o.tileID.scaledTo(o.tileID.overscaledZ-1);o=this._tiles[t.key],o&&o.hasData()&&(s=t)}let a=s;for(;a.overscaledZ>e;)if(a=a.scaledTo(a.overscaledZ-1),t[a.key]){n[s.key]=s;break}}}findLoadedParent(t,e){if(t.key in this._loadedParentTiles){const r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(let r=t.overscaledZ-1;r>=e;r--){const e=t.scaledTo(r),n=this._getLoadedTile(e);
2if(n)return n}}_getLoadedTile(t){const e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(this._source.reparseOverscaled?t.wrapped().key:t.canonical.key)}updateCacheSize(t,e){e=e||this._source.tileSize;const r=(Math.ceil(t.width/e)+1)*(Math.ceil(t.height/e)+1),n=5,i=Math.floor(r*n),o="number"==typeof this._minTileCacheSize?Math.max(this._minTileCacheSize,i):i,s="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,o):o;this._cache.setMaxSize(s)}handleWrapJump(t){const e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){const t={};for(const e in this._tiles){const n=this._tiles[e];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+r),t[n.tileID.key]=n}this._tiles=t;for(const t in this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(const t in this._tiles){const e=this._tiles[t];this._setTileReloadTimer(+t,e)}}}update(t,e,r,n){if(this.transform=t,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage)return;if(this.usedForTerrain&&!r)return;let i;if(this.updateCacheSize(t,e),"globe"!==this.transform.projection.name&&this.handleWrapJump(this.transform.center.lng),this._shadowCasterTiles={},this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((t=>new jv(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y))):(i=t.coveringTiles({tileSize:e||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!r,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(i=i.filter((t=>this._source.hasTile(t))))):i=[],i.length>0&&this.castsShadows&&n&&"globe"!==this.transform.projection.name&&!this.usedForTerrain&&!vM(this._source.type)){const o=t.coveringZoomLevel({tileSize:e||this._source.tileSize,roundZoom:this._source.roundZoom&&!r}),s=Math.min(o,this._source.maxzoom),a=t.extendTileCoverForShadows(i,n,s);for(const t of a)this._shadowCasterTiles[t.key]=!0,i.push(t)}const o=this._updateRetainedTiles(i);if(vM(this._source.type)&&0!==i.length){const t={},e={},r=Object.keys(o);for(const n of r){const r=o[n],i=this._tiles[n];if(!i||i.fadeEndTime&&i.fadeEndTime<=vr.now())continue;const s=this.findLoadedParent(r,Math.max(r.overscaledZ-yM.maxOverzooming,this._source.minzoom));s&&(this._addTile(s.tileID),t[s.tileID.key]=s.tileID),e[n]=r}const n=i[i.length-1].overscaledZ;for(const t in this._tiles){const r=this._tiles[t];if(o[t]||!r.hasData())continue;let i=r.tileID;for(;i.overscaledZ>n;){i=i.scaledTo(i.overscaledZ-1);const n=this._tiles[i.key];if(n&&n.hasData()&&e[i.key]){o[t]=r.tileID;break}}}for(const e in t)o[e]||(this._coveredTiles[e]=!0,o[e]=t[e])}for(const t in o)this._tiles[t].clearFadeHold();const s=$(this._tiles,o);for(const t of s){const e=this._tiles[t];e.hasSymbolBuckets&&!e.holdingForFade()?e.setHoldDuration(this.map._fadeDuration):e.hasSymbolBuckets&&!e.symbolFadeFinished()||this._removeTile(+t)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(+t)}_updateRetainedTiles(t){const e={};if(0===t.length)return e;const r={},n=t.reduce(((t,e)=>Math.min(t,e.overscaledZ)),1/0),i=t[0].overscaledZ,o=Math.max(i-yM.maxOverzooming,this._source.minzoom),s=Math.max(i+yM.maxUnderzooming,this._source.minzoom),a={};for(const r of t){const t=this._addTile(r);e[r.key]=r,t.hasData()||n<this._source.maxzoom&&(a[r.key]=r)}this._retainLoadedChildren(a,n,s,e);for(const n of t){let t=this._tiles[n.key];if(t.hasData())continue;if(n.canonical.z>=this._source.maxzoom){const t=n.children(this._source.maxzoom)[0],r=this.getTile(t);if(r&&r.hasData()){e[t.key]=t;continue}}else{const t=n.children(this._source.maxzoom);if(e[t[0].key]&&e[t[1].key]&&e[t[2].key]&&e[t[3].key])continue}let i=t.wasRequested();for(let s=n.overscaledZ-1;s>=o;--s){const o=n.scaledTo(s);if(r[o.key])break;if(r[o.key]=!0,t=this.getTile(o),!t&&i&&(t=this._addTile(o)),t&&(e[o.key]=o,i=t.wasRequested(),t.hasData()))break}}return e}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const e=[];let r,n=this._tiles[t].tileID;for(;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);const t=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(t),r)break;n=t}for(const t of e)this._loadedParentTiles[t]=r}}_addTile(t){let e=this._tiles[t.key];const r=!!this._shadowCasterTiles[t.key];if(e)return!0!==e.isExtraShadowCaster||r||this._reloadTile(t.key,"reloading"),e;e=this._cache.getAndRemove(t),e&&(this._setTileReloadTimer(t.key,e),e.tileID=t,this._state.initializeTileState(e,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,e)));const n=Boolean(e);if(!n){const r=this.map?this.map.painter:null;e=new fC(t,this._source.tileSize*t.overscaleFactor(),this.transform.tileZoom,r,this._isRaster),this._loadTile(e,this._tileLoaded.bind(this,e,t.key,e.state))}return e?(e.uses++,this._tiles[t.key]=e,n||this._source.fire(new Dr("dataloading",{tile:e,coord:e.tileID,dataType:"source"})),e):null}_setTileReloadTimer(t,e){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const r=e.getExpiryTimeout();r&&(this._timers[t]=setTimeout((()=>{this._reloadTile(t,"expired"),delete this._timers[t]}),r))}_removeTile(t){const e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(+t);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id
2)}tilesIn(t,e,r){const n=[],i=this.transform;if(!i)return n;const o="globe"===i.projection.name,s=hx(i.center.lng);for(const a in this._tiles){const l=this._tiles[a];if(r&&l.clearQueryDebugViz(),l.holdingForFade())continue;let c;if(o){const t=l.tileID.canonical;if(0===t.z){const e=[Math.abs(D(s,...bM(t,-1))-s),Math.abs(D(s,...bM(t,1))-s)];c=[0,2*e.indexOf(Math.min(...e))-1]}else{const e=[Math.abs(D(s,...bM(t,-1))-s),Math.abs(D(s,...bM(t,0))-s),Math.abs(D(s,...bM(t,1))-s)];c=[e.indexOf(Math.min(...e))-1]}}else c=[0];for(const r of c){const o=t.containsTile(l,i,e,r);o&&n.push(o)}}return n}getShadowCasterCoordinates(){return this._getRenderableCoordinates(!1,!0)}getVisibleCoordinates(t){return this._getRenderableCoordinates(t)}_getRenderableCoordinates(t,e){const r=this.getRenderableIds(t,e).map((t=>this._tiles[t].tileID)),n="globe"===this.transform.projection.name;for(const t of r)t.projMatrix=this.transform.calculateProjMatrix(t.toUnwrapped()),t.expandedProjMatrix=n?this.transform.calculateProjMatrix(t.toUnwrapped(),!1,!0):t.projMatrix;return r}sortCoordinatesByDistance(t){const e=t.slice(),r=this.transform._camera.position,n=this.transform._camera.forward(),i={};for(const t of e){const e=1/(1<<t.canonical.z),o=(t.canonical.x+.5)*e+t.wrap,s=(t.canonical.y+.5)*e;i[t.key]=(o-r[0])*n[0]+(s-r[1])*n[1]-r[2]*n[2]}return e.sort(((t,e)=>i[t.key]-i[e.key])),e}hasTransition(){if(this._source.hasTransition())return!0;if(vM(this._source.type))for(const t in this._tiles){const e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=vr.now())return!0}return!1}setFeatureState(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)}removeFeatureState(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)}getFeatureState(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)}setDependencies(t,e,r){const n=this._tiles[t];n&&n.setDependencies(e,r)}reloadTilesForDependencies(t,e){for(const r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(+r,"reloading");this._cache.filter((r=>!r.hasDependency(t,e)))}_preloadTiles(t,e){if(!this._sourceLoaded){const r=()=>{this._sourceLoaded&&(this._source.off("data",r),this._preloadTiles(t,e))};return void this._source.on("data",r)}const r=new Map,n=Array.isArray(t)?t:[t],i=this.map.painter.terrain,o=this.usedForTerrain&&i?i.getScaledDemTileSize():this._source.tileSize;for(const t of n){const e=t.coveringTiles({tileSize:o,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const t of e)r.set(t.key,t);this.usedForTerrain&&t.updateElevation(!1)}F(Array.from(r.values()),((t,e)=>{const r=new fC(t,this._source.tileSize*t.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(r,(t=>{"raster-dem"===this._source.type&&r.dem&&this._backfillDEM(r),e(t,r)}))}),e)}}function _M(t,e){const r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function vM(t){return"raster"===t||"image"===t||"video"===t||"custom"===t}function bM(t,e){const r=1<<t.z;return[t.x/r+e,(t.x+1)/r+e]}yM.maxOverzooming=10,yM.maxUnderzooming=3;const xM=Zc([{name:"a_pos_3f",components:3,type:"Float32"}]),wM=Zc([{name:"a_color_3f",components:3,type:"Float32"}]),EM=Zc([{name:"a_color_4f",components:4,type:"Float32"}]),SM=Zc([{name:"a_uv_2f",components:2,type:"Float32"}]),TM=Zc([{name:"a_normal_3f",components:3,type:"Float32"}]),AM=Zc([{name:"a_normal_matrix0",components:4,type:"Float32"},{name:"a_normal_matrix1",components:4,type:"Float32"},{name:"a_normal_matrix2",components:4,type:"Float32"},{name:"a_normal_matrix3",components:4,type:"Float32"}]),OM=Zc([{name:"a_pbr",components:4,type:"Uint16"},{name:"a_heightBasedEmissiveStrength",components:3,type:"Float32"}]);class CM{constructor(t=0,e=0,r=0,n=0){if(isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=n}interpolate(t,e,r){return null!=e.top&&null!=t.top&&(this.top=Co(t.to
2p,e.top,r)),null!=e.bottom&&null!=t.bottom&&(this.bottom=Co(t.bottom,e.bottom,r)),null!=e.left&&null!=t.left&&(this.left=Co(t.left,e.left,r)),null!=e.right&&null!=t.right&&(this.right=Co(t.right,e.right,r)),this}getCenter(t,e){const r=D((this.left+t-this.right)/2,0,t),n=D((this.top+e-this.bottom)/2,0,e);return new b(r,n)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new CM(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function MM(t,e){const r=bt(t,3);_v.fromQuat(t,e),xt(t,3,r)}function kM(t,e){xt(t,3,[e[0],e[1],e[2],1])}function IM(t,e){const r=bv.identity([]);return bv.rotateZ(r,r,-e),bv.rotateX(r,r,-t),r}function PM(t,e){const r=[t[0],t[1],0],n=[e[0],e[1],0],i=1e-15;if(Sv.length(r)>=i){const t=Sv.normalize([],r);Sv.scale(n,t,Sv.dot(n,t)),e[0]=n[0],e[1]=n[1]}const o=Sv.cross([],e,t);if(Sv.len(o)<i)return null;const s=Math.atan2(-o[1],o[0]);return IM(Math.atan2(Math.sqrt(t[0]*t[0]+t[1]*t[1]),-t[2]),s)}class LM{constructor(t,e){this.position=t,this.orientation=e}get position(){return this._position}set position(t){if(t){const e=t instanceof wx?t:new wx(t[0],t[1],t[2]);
2this._renderWorldCopies&&(e.x=B(e.x,0,1)),this._position=e}else this._position=null}lookAtPoint(t,e){if(this.orientation=null,!this.position)return;const r=this.position,n=this._elevation?this._elevation.getAtPointOrZero(wx.fromLngLat(t)):0,i=wx.fromLngLat(t,n),o=[i.x-r.x,i.y-r.y,i.z-r.z];e||(e=[0,0,1]),e[2]=Math.abs(e[2]),this.orientation=PM(o,e)}setPitchBearing(t,e){this.orientation=IM(S(t),S(-e))}}class RM{constructor(t,e){this._transform=_v.identity([]),this.orientation=e,this.position=t}get mercatorPosition(){const t=this.position;return new wx(t[0],t[1],t[2])}get position(){const t=bt(this._transform,3);return[t[0],t[1],t[2]]}set position(t){t&&kM(this._transform,t)}get orientation(){return this._orientation}set orientation(t){this._orientation=t||bv.identity([]),t&&MM(this._transform,this._orientation)}getPitchBearing(){const t=this.forward(),e=this.right();return{bearing:Math.atan2(-e[1],e[0]),pitch:Math.atan2(Math.sqrt(t[0]*t[0]+t[1]*t[1]),-t[2])}}setPitchBearing(t,e){this._orientation=IM(t,e),MM(this._transform,this._orientation)}forward(){const t=bt(this._transform,2);return[-t[0],-t[1],-t[2]]}up(){const t=bt(this._transform,1);return[-t[0],-t[1],-t[2]]}right(){const t=bt(this._transform,0);return[t[0],t[1],t[2]]}getCameraToWorld(t,e){const r=new Float64Array(16);return _v.invert(r,this.getWorldToCamera(t,e)),r}getCameraToWorldMercator(){return this._transform}getWorldToCameraPosition(t,e,r){const n=this.position;Sv.scale(n,n,-t);const i=new Float64Array(16);return _v.fromScaling(i,[r,r,r]),_v.translate(i,i,n),i[10]*=e,i}getWorldToCamera(t,e){const r=new Float64Array(16),n=new Float64Array(4),i=this.position;return bv.conjugate(n,this._orientation),Sv.scale(i,i,-t),_v.fromQuat(r,n),_v.translate(r,r,i),r[1]*=-1,r[5]*=-1,r[9]*=-1,r[13]*=-1,r[8]*=e,r[9]*=e,r[10]*=e,r[11]*=e,r}getCameraToClipPerspective(t,e,r,n){const i=new Float64Array(16);return _v.perspective(i,t,e,r,n),i}getCameraToClipOrthographic(t,e,r,n,i,o){const s=new Float64Array(16);return _v.ortho(s,t,e,r,n,i,o),s}getDistanceToElevation(t,e=!1){const r=0===t?0:dx(t,e?mx(this.position[1]):this.position[1]),n=this.forward();return(r-this.position[2])/n[2]}clone(){return new RM([...this.position],[...this.orientation])}}function DM(t,e){const r=jM(t.projection,t.zoom,t.width,t.height),n=$M(t.projection,t.zoom,t.center,r,e),i=zM(t);return _v.scale(n,n,[i,i,1]),n}function zM(t){const e=t.projection,r=jM(t.projection,t.zoom,t.width,t.height),n=NM(e,t.center),i=NM(e,ax.convert(e.center));return Math.pow(2,n*r+(1-r)*i)}function BM(t){const e=DM(t,!0);return dv.invert([],[e[0],e[1],e[4],e[5]])}function jM(t,e,r,n,i=1/0){const o=t.range;if(!o)return 0;const s=Math.min(i,Math.max(r,n)),a=Math.log(s/1024)/Math.LN2;return z(o[0]+a,o[1]+a,e)}const FM=1/4e4;function NM(t,e){const r=D(e.lat,-yx,yx),n=new ax(e.lng-180*FM,r),i=new ax(e.lng+180*FM,r),o=t.project(n.lng,r),s=t.project(i.lng,r),a=wx.fromLngLat(n),l=wx.fromLngLat(i),c=s.x-o.x,u=s.y-o.y,h=l.x-a.x,f=l.y-a.y,d=Math.sqrt((h*h+f*f)/(c*c+u*u));return Math.log(d)/Math.LN2}function $M(t,e,r,n,i){const o=new ax(r.lng-180*FM,r.lat),s=new ax(r.lng+180*FM,r.lat),a=t.project(o.lng,o.lat),l=t.project(s.lng,s.lat),c=l.x-a.x,u=l.y-a.y,h=-Math.atan2(u,c),f=wx.fromLngLat(r);f.y=D(f.y,-1+FM,1-FM);const d=f.toLngLat(),p=t.project(d.lng,d.lat),m=wx.fromLngLat(d);m.x+=FM;const g=m.toLngLat(),y=t.project(g.lng,g.lat),_=UM(y.x-p.x,y.y-p.y,h),v=wx.fromLngLat(d);v.y+=FM;const b=v.toLngLat(),x=t.project(b.lng,b.lat),w=UM(x.x-p.x,x.y-p.y,h),E=Math.abs(_.x)/Math.abs(w.y),S=_v.identity([]);_v.rotateZ(S,S,-h*(1-(i?0:n)));const T=_v.identity([]);return _v.scale(T,T,[1,1-(1-E)*n,1]),T[4]=-w.x/w.y*n,_v.rotateZ(T,T,h),_v.multiply(T,S,T),T}function UM(t,e,r){const n=Math.cos(r),i=Math.sin(r);return{x:t*n-e*i,y:t*i+e*n}}function VM(t,e,r){return e*(Li/(t.tileSize*Math.pow(2,r-t.tileID.overscaledZ)))}function GM(t,e){const{scale:r}=t.tileTransform,n=r*Li/(t.tileSize*Math.pow(2,e.zoom-t.tileID.overscaledZ+t.tileID.canonical.z));return dv.scale(new Float32Array(4),e.inverseAdjustmentMatrix,[n,n])}const qM={unknown:0,flipRequired:1,flipNotRequired:2},HM=Math.tan(85*Math.PI/180);function WM(t,e,r,n,i,o,s){const a=_v.create();if(r)if("globe"===o.name){const t=$b(i,e);_v.multiply(a,a,t)}else{const t=dv.invert([],s);a[0]=t[0],a[1]=t[1],a[4]=t[2],a[5]=t[3],n||_v.rotateZ(a,a,i.angle)}
2else _v.multiply(a,i.labelPlaneMatrix,t);return a}function ZM(t,e,r,n,i,o,s){const a=WM(t,e,r,n,i,o,s);return"globe"===o.name&&r||(a[2]=a[6]=a[10]=a[14]=0),a}function XM(t,e,r,n,i,o,s){if(r){if("globe"===o.name){const a=WM(t,e,r,n,i,o,s);return _v.invert(a,a),_v.multiply(a,t,a),a}{const e=_v.clone(t),r=_v.identity([]);return r[0]=s[0],r[1]=s[1],r[4]=s[2],r[5]=s[3],_v.multiply(e,e,r),n||_v.rotateZ(e,e,-i.angle),e}}return i.glCoordMatrix}function YM(t,e,r,n){const i=[t,e,r,1];r?uv.transformMat4(i,i,n):ck(i,i,n);const o=i[3];return i[0]/=o,i[1]/=o,i[2]/=o,i}function KM([t,e,r],n){const i=[t,e,r,1];uv.transformMat4(i,i,n);const o=i[3]=Math.max(i[3],1e-6);return i[0]/=o,i[1]/=o,i[2]/=o,i}function JM(t,e){return Math.min(.5+t/e*.5,1.5)}function QM(t,e){const r=t[0]/t[3],n=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function tk(t,e,r,n,i,o,s,a,l,c){const u=r.transform,h=n?t.textSizeData:t.iconSizeData,f=uT(h,r.transform.zoom),d="globe"===u.projection.name,p=[256/r.width*2+1,256/r.height*2+1],m=n?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;m.clear();let g=null;d&&(g=n?t.text.globeExtVertexArray:t.icon.globeExtVertexArray);const y=t.lineVertexArray,_=n?t.text.placedSymbolArray:t.icon.placedSymbolArray,v=r.transform.width/r.transform.height;let x,w=!1;for(let n=0;n<_.length;n++){const d=_.get(n),{numGlyphs:E,writingMode:S}=d;if(S!==TT.vertical||w||x===TT.horizontal||(w=!0),x=S,(d.hidden||S===TT.vertical)&&!w){lk(E,m);continue}w=!1;const T=new b(d.tileAnchorX,d.tileAnchorY);let{x:A,y:O,z:C}=u.projection.projectTilePoint(T.x,T.y,c.canonical);if(l){const[t,e,r]=l(T);A+=t,O+=e,C+=r}const M=[A,O,C,1];if(uv.transformMat4(M,M,e),!QM(M,p)){lk(E,m);continue}const k=M[3],I=JM(r.transform.getCameraToCenterDistance(u.projection),k),P=cT(h,f,d),L=s?P/I:P*I,R=YM(A,O,C,i);if(R[3]<=0){lk(E,m);continue}let D={};const z=s?null:l,B=ik(d,L,!1,a,e,i,o,t.glyphOffsetArray,y,m,g,R,T,D,v,z,u.projection,c,s);w=B.useVertical,z&&B.needsFlipping&&(D={}),(B.notEnoughRoom||w||B.needsFlipping&&ik(d,L,!0,a,e,i,o,t.glyphOffsetArray,y,m,g,R,T,D,v,z,u.projection,c,s).notEnoughRoom)&&lk(E,m)}n?(t.text.dynamicLayoutVertexBuffer.updateData(m),g&&t.text.globeExtVertexBuffer&&t.text.globeExtVertexBuffer.updateData(g)):(t.icon.dynamicLayoutVertexBuffer.updateData(m),g&&t.icon.globeExtVertexBuffer&&t.icon.globeExtVertexBuffer.updateData(g))}function ek(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m){const{lineStartIndex:g,glyphStartIndex:y,segment:_}=a,v=y+a.numGlyphs,b=g+a.lineLength,x=e.getoffsetX(y),w=e.getoffsetX(v-1),E=ak(t*x,r,n,i,o,s,_,g,b,l,c,u,h,f,!0,d,p,m);if(!E)return null;const S=ak(t*w,r,n,i,o,s,_,g,b,l,c,u,h,f,!0,d,p,m);return S?{first:E,last:S}:null}function rk(t,e){return 0===t||Math.abs(e/t)>HM}function nk(t,e,r,n){return t===TT.horizontal&&Math.abs(n)>Math.abs(r)?{useVertical:!0}:t===TT.vertical?n>0?{needsFlipping:!0}:null:e!==qM.unknown&&rk(r,n)?e===qM.flipRequired?{needsFlipping:!0}:null:r<0?{needsFlipping:!0}:null}function ik(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_){const v=e/24,x=t.lineOffsetX*v,w=t.lineOffsetY*v,{lineStartIndex:E,glyphStartIndex:S,numGlyphs:T,segment:A,writingMode:O,flipState:C}=t,M=E+t.lineLength,k=t=>{if(u){const[e,r,n]=t.up,i=c.length;MO(u,i+0,e,r,n),MO(u,i+1,e,r,n),MO(u,i+2,e,r,n),MO(u,i+3,e,r,n)}const[e,r,n]=t.point;kO(c,e,r,n,t.angle)};if(T>1){const e=ek(v,a,x,w,r,h,f,t,l,o,d,m,!1,g,y,_);if(!e)return{notEnoughRoom:!0};if(n&&!r){let[r,n,i]=e.first.point,[o,a,l]=e.last.point;[r,n]=YM(r,n,i,s),[o,a]=YM(o,a,l,s);const c=nk(O,C,(o-r)*p,a-n);if(t.flipState=c&&c.needsFlipping?qM.flipRequired:qM.flipNotRequired,c)return c}k(e.first);for(let t=S+1;t<S+T-1;t++){const e=ak(v*a.getoffsetX(t),x,w,r,h,f,A,E,M,l,o,d,m,!1,!1,g,y,_);if(!e)return c.length-=4*(t-S),{notEnoughRoom:!0};k(e)}k(e.last)}else{if(n&&!r){const e=YM(f.x,f.y,0,i),r=E+A+1,n=new b(l.getx(r),l.gety(r)),o=YM(n.x,n.y,0,i),s=o[3]>0?o:sk(f,n,e,1,i,void 0,g,y.canonical),a=nk(O,C,(s[0]-e[0])*p,s[1]-e[1]);if(t.flipState=a&&a.needsFlipping?qM.flipRequired:qM.flipNotRequired,a)return a}const e=ak(v*a.getoffsetX(S),x,w,r,h,f,A,E,M,l,o,d,m,!1,!1,g,y,_);if(!e)return{notEnoughRoom:!0};k(e)}return{}}function ok(t,e,r,n,i){const{x:o,y:s,z:a}=n.projectTilePoint(t.x,t.y,e);if(!i)return YM(o,s,a,r);const[l,c,u]=i(t);return YM(o+l,s+c,a+u,r)}function sk(t,e,r,n,i,o,s,a){const l=ok(t.sub(e)._unit()._add(t),a,i,s,o);return Sv.sub(l,r,l),Sv.normalize(l,l),Sv.scaleAndAdd(l,r,l,n)}function ak(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y){const _=n?t-e:t+e;let v=_>0?1:-1,x=0;n&&(v*=-1,x=Math.PI),v<0&&(x+=Math.PI);let w=a+s+(v>0?0:1)|0,E=i,S=i,T=0,A=0;const O=Math.abs(_),C=[],M=[];let k=o,I=k;const P=()=>sk(I,k,S,O-T+1,u,f,m,g.canonical);for(;T+A<=O;){if(w+=v,w<a||w>=l)return null;if(S=E,I=k,C.push(S),d&&M.push(I),k=new b(c.getx(w),c.gety(w)),E=h[w],!E){const t=ok(k,g.canonical,u,m,f);E=t[3]>0?h[w]=t:P()}T+=A,A=Sv.distance(S,E)}p&&f&&(h[w]&&(E=P(),A=Sv.distance(S,E)),h[w]=E);const L=(O-T)/A,R=k.sub(I)._mult(L)._add(I),D=Sv.sub([],E,S),z=Sv.scaleAndAdd([],S,D,L);let B=[0,0,1],j=D[0],F=D[1];if(y&&(B=m.upVector(g.canonical,R.x,R.y),0!==B[0]||0!==B[1]||1!==B[2])){const t=[B[2],0,-B[0]],e=Sv.cross([],B,t);Sv.normalize(t,t),Sv.normalize(e,e),j=Sv.dot(D,t),F=Sv.dot(D,e)}if(r){const t=Sv.cross([],B,D);Sv.normalize(t,t),Sv.scaleAndAdd(z,z,t,r*v)}const N=x+Math.atan2(F,j);return C.push(z),d&&M.push(R),{point:z,angle:N,path:C,tilePath:M,up:B}}function lk(t,e){const r=e.length,n=r+4*t;e.resize(n),e.float32.fill(-1/0,4*r,4*n)}function ck(t,e,r){const n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}const uk=3,hk=0,fk=25.5,dk=60,pk=15,mk=(t,e,r)=>(1-r)*t+r*e,gk=t=>t*t*t*t*t,yk=(t,e,r,n)=>{for(let i=0;i<16;i++)t[i]=mk(e[i],r[i],n);return t};class _k{constructor(t,e,r,n,i,o,s){this.tileSize=512,this._renderWorldCopies=void 0===i||i,this._minZoom=t||hk,this._maxZoom=e||22,this._minPitch=null==r?0:r,this._maxPitch=null==n?60:n,this.setProjection(o),this.setMaxBounds(s),this.width=0,this.height=0,this._center=new ax(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new CM,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._expandedProjMatrixCache={},this._distanceTileDataCache={},this._camera=new RM,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1,this._orthographicProjectionAtLowPitch=!1}clone(){const t=new _k(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return t._elevation=this._elevation,t._centerAltitude=this._centerAltitude,t._centerAltitudeValidForE
vendor: 1,198 bytes, line 2
2xaggeration=this._centerAltitudeValidForExaggeration,t.tileSize=this.tileSize,t.mercatorFromTransition=this.mercatorFromTransition,t.width=this.width,t.height=this.height,t.cameraElevationReference=this.cameraElevationReference,t._center=this._center,t._setZoom(this.zoom),t._seaLevelZoom=this._seaLevelZoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._nearZ=this._nearZ,t._farZ=this._farZ,t._averageElevation=this._averageElevation,t._orthographicProjectionAtLowPitch=this._orthographicProjectionAtLowPitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._camera=this._camera.clone(),t._calcMatrices(),t.freezeTileCoverage=this.freezeTileCoverage,t.frustumCorners=this.frustumCorners,t}get isOrthographic(){return"globe"!==this.projection.name&&this._orthographicProjectionAtLowPitch&&this.pitch<pk}get elevation(){return this._elevation}set elevation(t){this._elevation!==t&&(this._elevation=t,this._updateCameraOnTerrain(),this._calcMatrices())}get depthOcclusionForSymbolsAndCircles(){return"globe"!==this.projection.name&&!this.isOrthographic}updateElevation(t,e=!1){const r=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForE
vendor: 3,797 bytes, line 2
2xaggeration;(null==this._seaLevelZoom||r)&&this._updateCameraOnTerrain(),(t||r)&&this._constrainCamera(e),this._calcMatrices()}getProjection(){return V(this.projection,["name","center","parallels"])}setProjection(t){this.projectionOptions=t||{name:"mercator"};const e=this.projection?this.getProjection():void 0;this.projection=_O(this.projectionOptions);const r=!x(e,this.getProjection());return r&&this._calcMatrices(),this.mercatorFromTransition=!1,r}setOrthographicProjectionAtLowPitch(t){return this._orthographicProjectionAtLowPitch!==t&&(this._orthographicProjectionAtLowPitch=t,this._calcMatrices(),!0)}setMercatorFromTransition(){const t=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=_O({name:"mercator"});const e=t!==this.projection.name;return e&&this._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies&&!0===this.projection.supportsWorldCopies}set renderWorldCopies(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get cameraWorldSizeForFog(){const t=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(t))}get cameraWorldSize(){const t=Math.max(this._camera.getDistanceToElevation(this._averageElevation,!0),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(t))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return dx(1,this.center.lat)*this.cameraWorldSizeForFog}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new b(this.width,this.height)}get bearing(){return B(this.rotation,-180,180)}set bearing(t){this.rotation=t}get rotation(){return-this.angle/Math.PI*180}set rotation(t){const e=-t*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=dv.create(),dv.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const e=D(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())}get aspect(){return this.width/this.height}get fov(){return this._fov/Math.PI*180}get fovX(){return this._fov}get fovY(){const t=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/t)}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=S(t),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(t){this._averageElevation=t,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(t){const e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._setZoom(e),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(t){this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom}_updateCameraOnTerrain(){const t=this.elevation?this.elevation.getAtPoint(this.locationCoordinate(this.center),Number.NEGATIVE_INFINITY):Number.NEGATIVE_INFINITY,e=this.elevation&&t===Number.NEGATIVE_INFINITY&&this.elevation.visibleDemTiles.length>0&&this.elevation.exaggeration()>
20&&this._centerAltitudeValidForExaggeration;if(!this._elevation||t===Number.NEGATIVE_INFINITY&&(!e||!this._centerAltitude))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const r=this._elevation;if(e||this._centerAltitude&&this._centerAltitudeValidForExaggeration&&r.exaggeration()&&this._centerAltitudeValidForExaggeration!==r.exaggeration()){const t=this._centerAltitudeValidForExaggeration;this._centerAltitude=this._centerAltitude/t*r.exaggeration(),this._centerAltitudeValidForExaggeration=r.exaggeration()}else this._centerAltitude=t||0,this._centerAltitudeValidForExaggeration=r.exaggeration();this._updateSeaLevelZoom()}_updateSeaLevelZoom(){if(void 0===this._centerAltitudeValidForExaggeration)return;const t=this.cameraToCenterDistance,e=(this.pixelsPerMeter*this._centerAltitude+t)/this.worldSize;this._seaLevelZoom=this._zoomFromMercatorZ(e)}sampleAverageElevation(){if(!this._elevation)return 0;const t=this._elevation,e=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],r=this.horizonLineFromTop();let n=0,i=0;for(let o=0;o<e.length;o++){const s=new b(e[o][0]*this.width,r+e[o][1]*(this.height-r)),a=t.pointCoordinate(s);if(!a)continue;const l=1/Math.hypot(a[0]-this._camera.position[0],a[1]-this._camera.position[1]);n+=a[3]*l,i+=l}return 0===i?NaN:n/i}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._terrainEnabled()&&("ground"===this.cameraElevationReference?this._updateCameraOnTerrain():this._updateZoomFromElevation()),this._constrain(),this._calcMatrices())}_updateZoomFromElevation(){if(null==this._seaLevelZoom||!this._elevation)return;const t=this._seaLevelZoom,e=this._elevation.getAtPointOrZero(this.locationCoordinate(this.center)),r=this.pixelsPerMeter/this.worldSize*e,n=this._mercatorZfromZoom(t),i=this._mercatorZfromZoom(this._maxZoom),o=Math.max(n-r,i);this._setZoom(this._zoomFromMercatorZ(o))}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}computeZoomRelativeTo(t){const e=this.rayIntersectionCoordinate(this.pointRayIntersection(this.centerPoint,t.toAltitude()));let r;r=t.z<this._camera.position[2]?[e.x,e.y,e.z]:[t.x,t.y,t.z];const n=Sv.length(Sv.sub([],this._camera.position,r));return D(this._zoomFromMercatorZ(n),this._minZoom,this._maxZoom)}setFreeCameraOptions(t){if(!this.height)return;if(!t.position&&!t.orientation)return;this._updateCameraState();let e=!1;if(t.orientation&&!bv.exactEquals(t.orientation,this._camera.orientation)&&(e=this._setCameraOrientation(t.orientation)),t.position){const r=[t.position.x,t.position.y,t.position.z];Sv.exactEquals(r,this._camera.position)||(this._setCameraPosition(r),e=!0)}e&&(this._updateStateFromCamera(),this.recenterOnTerrain())}getFreeCameraOptions(){this._updateCameraState();const t=this._camera.position,e=new LM;return e.position=new wx(t[0],t[1],t[2]),e.orientation=this._camera.orientation,e._elevation=this.elevation,e._renderWorldCopies=this.renderWorldCopies,e}_setCameraOrientation(t){if(!bv.length(t))return!1;bv.normalize(t,t);const e=Sv.transformQuat([],[0,0,-1],t),r=Sv.transformQuat([],[0,-1,0],t);if(r[2]<0)return!1;const n=PM(e,r);return!!n&&(this._camera.orientation=n,!0)}_setCameraPosition(t){const e=this.zoomScale(this.minZoom)*this.tileSize,r=this.zoomScale(this.maxZoom)*this.tileSize,n=this.cameraToCenterDistance;t[2]=D(t[2],n/r,n/e),this._camera.position=t}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}get fovAboveCenter(){return this._fov*(.5+this.centerOffset.y/this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)}getVisibleUnwrappedCoordinates(t){const e=[new Bv(0,t)];if(this.renderWorldCopies){const r=this.pointCoordinate(new b(0,0)),n=this.pointCoordinate(new b(this.width,0)),i=this.pointCoordinate(new b(this.width,this.height)),o=this.pointCoordinate(new b(0,this.height)),s=Math.floor(Math.min(r.x,n.x,i.x,o.x)),a=Math.floor(Math.max(r.x,n.x,i.x,o.x)),l=1;for(let r=s-l;r<=a+l;r++)0!==r&&e.push(new Bv(r,t))}return e}isLODDisabled(t){return(!t||this.pitch<=dk)&&this._edgeInsets.top<=this._edgeInsets.bottom&&!this._elevation&&!this.projection.isReprojectedInTileSpace}extendTileCoverForShadows(t,e,r){let n=[];if(0===e[0]&&0===e[1])return n;for(const r of t){const t=r.canonical,i=r.overscaledZ,o=r.wrap,s=1<<t.z,a=t.x+1<s,l=t.x>0,c=t.y+1<s,u=t.y>0,h=r.wrap-(l?0:1),f=r.wrap+(a?0:1),d=l?t.x-1:s-1,p=a?t.x+1:0;e[0]<0?(n.push(new jv(i,f,t.z,p,t.y)),e[1]<0&&c&&(n.push(new jv(i,o,t.z,t.x,t.y+1)),n.push(new jv(i,f,t.z,p,t.y+1))),e[1]>0&&u&&(n.push(new jv(i,o,t.z,t.x,t.y-1)),n.push(new jv(i,f,t.z,p,t.y-1)))):e[0]>0?(n.push(new jv(i,h,t.z,d,t.y)),e[1]<0&&c&&(n.push(new jv(i,o,t.z,t.x,t.y+1)),n.push(new jv(i,h,t.z,d,t.y+1))),e[1]>0&&u&&(n.push(new jv(i,o,t.z,t.x,t.y-1)),n.push(new jv(i,h,t.z,d,t.y-1)))):e[1]<0&&c?n.push(new jv(i,o,t.z,t.x,t.y+1)):u&&n.push(new jv(i,o,t.z,t.x,t.y-1))}if(n.length>1){n.sort(((t,e)=>t.overscaledZ-e.overscaledZ||t.wrap-e.wrap||t.canonical.z-e.canonical.z||t.canonical.x-e.canonical.x||t.canonical.y-e.canonical.y));let t=0,e=0;for(;e<n.length;)n[e].equals(n[t])?++e:n[++t]=n[e++];n.length=t+1}const i=[];for(const t of n)n.some((e=>t.isChildOf(e)))||i.push(t);return n=i.filter((e=>!t.some((t=>!!(e.overscaledZ<r&&t.isChildOf(e))||e.equals(t)||e.isChildOf(t))))),n}coveringTiles(t){let e=this.coveringZoomLevel(t);const r=e,n=this.elevation&&this.elevation.exaggeration(),i=n&&!t.isTerrainDEM,o="mercator"===this.projection.name;if(void 0!==t.minzoom&&e<t.minzoom)return[];void 0!==t.maxzoom&&e>t.maxzoom&&(e=t.maxzoom);const s=this.locationCoordinate(this.center),a=this.center.lat,l=1<<e,c=[l*s.x,l*s.y,0],u="globe"===this.projection.name,h=!u,f=rb.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,e,h),d=u?this._camera.mercatorPosition:this.pointCoordinate(this.getCameraPoint()),p=l*dx(1,this.center.lat),m=this._camera.position[2]/dx(1,this.center.lat),g=[l*d.x,l*d.y,m*(h?1:p)],y=u||n,_=this.cameraToCenterDistance/t.tileSize*(t.roundZoom?1:.502),v=this.isLODDisabled(!0)?e:0;let b;if(this._elevation&&t.isTerrainDEM)b=1e4*this._elevation.exaggeration();else if(this._elevation){const t=this._elevation.getMinMaxForVisibleTiles();b=t?t.max:this._centerAltitude}else b=this._centerAltitude;const x=t.isTerrainDEM?-b:this._elevation?this._elevation.getMinElevationBelowMSL():0,w=this.projection.isReprojectedInTileSpace?zM(this):1,E=t=>{const e=1/4e4,r=new wx(t.x+e,t.y,t.z),n=new wx(t.x,t.y+e,t.z),i=t.toLngLat(),o=r.toLngLat(),s=n.toLngLat(),a=this.locationCoordinate(i),l=this.locationCoordinate(o),c=this.locationCoordinate(s),u=Math.hypot(l.x-a.x,l.y-a.y),h=Math.hypot(c.x-a.x,c.y-a.y);return Math.sqrt(u*h)*w/e},S=t=>{const e=b,r=x;return{aabb:XA(this,l,0,0,0,t,r,e,this.projection),zoom:0,x:0,y:0,minZ:r,maxZ:e,wrap:t,fullyVisible:!1}},T=[];let A=[];const C=e,M=t.reparseOverscaled?r:e,I=t=>t*t,P=I((m-this._centerAltitude)*p),L=t=>{if(!this._elevation||!t.tileID||!o)return;const e=this._elevation.getMinMaxForTile(t.tileID),r=t.aabb;e?(r.min[2]=e.min,r.max[2]=e.max,r.center[2]=(r.min[2]+r.max[2])/2):(t.shouldSplit=D(t),t.shouldSplit||(r.min[2]=r.max[2]=r.center[2]=this._centerAltitude))},R=(t,e)=>{const r=.707,n=1.1;if(e*I(r)<t)return 1;const i=Math.sqrt(e/t),o=i-1/r;return i/(1/r+(Math.pow(n,o+1)-1)/(n-1)-1)},D=t=>{if(t.zoom<v)return!0;
2if(t.zoom===C)return!1;if(null!=t.shouldSplit)return t.shouldSplit;const e=t.aabb.distanceX(g),n=t.aabb.distanceY(g);let o=P,s=1;if(u){o=I(t.aabb.distanceZ(g));const e=Math.pow(2,t.zoom),r=mx((t.y+1)/e),n=mx(t.y/e),i=Math.min(Math.max(a,r),n),l=ux(i)/ux(a);if(i===a){const t=.3;s=1/Math.max(1,this._mercatorScaleRatio-t)}else s=Math.min(1,l/this._mercatorScaleRatio);if(this.zoom<=ib&&t.zoom===C-1&&l>=.9)return!0}else if(i&&(o=I(t.aabb.distanceZ(g)*p)),this.projection.isReprojectedInTileSpace&&r<=5){const e=Math.pow(2,t.zoom),r=E(new wx((t.x+.5)/e,(t.y+.5)/e));s=r>.85?1:r}const l=e*e+n*n+o,c=(1<<C-t.zoom)*_*s;return l<I(c*R(Math.max(o,P),l))};if(this.renderWorldCopies)for(let t=1;t<=uk;t++)T.push(S(-t)),T.push(S(t));for(T.push(S(0));T.length>0;){const r=T.pop(),n=r.x,s=r.y;let a=r.fullyVisible;const h=()=>"globe"===this.projection.name&&(0===r.y||r.y===(1<<r.zoom)-1);if(!a){let t=y?r.aabb.intersects(f):r.aabb.intersectsFlat(f);if(0===t&&h()){const e=new zv(r.zoom,n,s);t=Sb(this,l,e,!0).intersects(f)}if(0===t)continue;a=2===t}if(r.zoom!==C&&D(r))for(let t=0;t<4;t++){const e=(n<<1)+t%2,c=(s<<1)+(t>>1),h={aabb:o?r.aabb.quadrant(t):XA(this,l,r.zoom+1,e,c,r.wrap,r.minZ,r.maxZ,this.projection),zoom:r.zoom+1,x:e,y:c,wrap:r.wrap,fullyVisible:a,tileID:void 0,shouldSplit:void 0,minZ:r.minZ,maxZ:r.maxZ};i&&!u&&(h.tileID=new jv(r.zoom+1===C?M:r.zoom+1,r.wrap,r.zoom+1,e,c),L(h)),T.push(h)}else{const i=r.zoom===C?M:r.zoom;if(t.minzoom&&t.minzoom>i)continue;if(!a){let t=y?r.aabb.intersectsPrecise(f):r.aabb.intersectsPreciseFlat(f);if(0===t&&h()){const e=new zv(r.zoom,n,s);t=Sb(this,l,e,!0).intersectsPrecise(f)}if(0===t)continue}const o=c[0]-(.5+n+(r.wrap<<r.zoom))*(1<<e-r.zoom),u=c[1]-.5-s,d=r.tileID?r.tileID:new jv(i,r.wrap,r.zoom,n,s);A.push({tileID:d,distanceSq:o*o+u*u})}}if(this.fogCullDistSq){const e=this.fogCullDistSq,r=this.horizonLineFromTop();A=A.filter((n=>{const i=[0,0,0,1],o=[Li,Li,0,1],s=this.calculateFogTileMatrix(n.tileID.toUnwrapped());uv.transformMat4(i,i,s),uv.transformMat4(o,o,s);const a=k(uv.min([],i,o),uv.max([],i,o));if(0===a)return!0;let l=!1;const c=this._elevation;if(c&&a>e&&0!==r){const e=this.calculateProjMatrix(n.tileID.toUnwrapped());let i;t.isTerrainDEM||(i=c.getMinMaxForTile(n.tileID)),i||(i={min:x,max:b});const o=O(this.rotation),s=[o[0]*Li,o[1]*Li,i.max];Sv.transformMat4(s,s,e),l=(1-s[1])*this.height*.5<r}return a<e||l}))}return A.sort(((t,e)=>t.distanceSq-e.distanceSq)).map((t=>t.tileID))}resize(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(t){const e=D(t.lat,-yx,yx),r=this.projection.project(t.lng,e);return new b(r.x*this.worldSize,r.y*this.worldSize)}unproject(t){return this.projection.unproject(t.x/this.worldSize,t.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/dx(1,this.center.lat)/this.worldSize}setLocationAtPoint(t,e){let r,n;const i=this.centerPoint;if("globe"===this.projection.name){const t=this.worldSize;r=(e.x-i.x)/t,n=(e.y-i.y)/t}else{const t=this.pointCoordinate(e),o=this.pointCoordinate(i);r=t.x-o.x,n=t.y-o.y}const o=this.locationCoordinate(t);this.setLocation(new wx(o.x-r,o.y-n))}setLocation(t){this.center=this.coordinateLocation(t),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(t){return this.projection.locationPoint(this,t)}locationPoint3D(t){return this.projection.locationPoint(this,t,!0)}pointLocation(t){return this.coordinateLocation(this.pointCoordinate(t))}pointLocation3D(t){return this.coordinateLocation(this.pointCoordinate3D(t))}locationCoordinate(t,e){const r=e?dx(e,t.lat):void 0,n=this.projection.project(t.lng,t.lat);return new wx(n.x,n.y,r)}coordinateLocation(t){return this.projection.unproject(t.x,t.y)}pointRayIntersection(t,e){const r=null!=e?e:this._centerAltitude,n=[t.x,t.y,0,1],i=[t.x,t.y,1,1];uv.transformMat4(n,n,this.pixelMatrixInverse),uv.transformMat4(i,i,this.pixelMatrixInverse);const o=n[3],s=i[3];uv.scale(n,n,1/o),uv.scale(i,i,1/s);const a=n[2],l=i[2];
2return{p0:n,p1:i,t:a===l?0:(r-a)/(l-a)}}screenPointToMercatorRay(t){const e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];return uv.transformMat4(e,e,this.pixelMatrixInverse),uv.transformMat4(r,r,this.pixelMatrixInverse),uv.scale(e,e,1/e[3]),uv.scale(r,r,1/r[3]),e[2]=dx(e[2],this._center.lat)*this.worldSize,r[2]=dx(r[2],this._center.lat)*this.worldSize,uv.scale(e,e,1/this.worldSize),uv.scale(r,r,1/this.worldSize),new Uv([e[0],e[1],e[2]],Sv.normalize([],Sv.sub([],r,e)))}rayIntersectionCoordinate(t){const{p0:e,p1:r,t:n}=t,i=dx(e[2],this._center.lat),o=dx(r[2],this._center.lat);return new wx(Co(e[0],r[0],n)/this.worldSize,Co(e[1],r[1],n)/this.worldSize,Co(i,o,n))}pointCoordinate(t,e=this._centerAltitude){return this.projection.pointCoordinate(this,t.x,t.y,e)}pointCoordinate3D(t){if(!this.elevation)return this.pointCoordinate(t);let e=this.projection.pointCoordinate3D(this,t.x,t.y);if(e)return new wx(e[0],e[1],e[2]);let r=0,n=this.horizonLineFromTop();if(t.y>n)return this.pointCoordinate(t);const i=10,o=.02*n,s=t.clone();for(let t=0;t<i&&n-r>o;t++){s.y=Co(r,n,.66);const t=this.projection.pointCoordinate3D(this,s.x,s.y);t?(n=s.y,e=t):r=s.y}return e?new wx(e[0],e[1],e[2]):this.pointCoordinate(t)}isPointAboveHorizon(t){return this.projection.isPointAboveHorizon(this,t)}isPointOnSurface(t){if(t.y<0||t.y>this.height||t.x<0||t.x>this.width)return!1;if(this.elevation||this.zoom>=ob)return!this.isPointAboveHorizon(t);const e=this.pointCoordinate(t);return e.y>=0&&e.y<=1}_coordinatePoint(t,e){const r=e&&this.elevation?this.elevation.getAtPointOrZero(t,this._centerAltitude):this._centerAltitude,n=[t.x*this.worldSize,t.y*this.worldSize,r+t.toAltitude(),1];return uv.transformMat4(n,n,this.pixelMatrix),n[3]>0?new b(n[0]/n[3],n[1]/n[3]):new b(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){const{top:t,left:e}=this._edgeInsets,r=this.height-this._edgeInsets.bottom,n=this.width-this._edgeInsets.right,i=this.pointLocation3D(new b(e,t)),o=this.pointLocation3D(new b(n,t)),s=this.pointLocation3D(new b(n,r)),a=this.pointLocation3D(new b(e,r));let l=Math.min(i.lng,o.lng,s.lng,a.lng),c=Math.max(i.lng,o.lng,s.lng,a.lng),u=Math.min(i.lat,o.lat,s.lat,a.lat),h=Math.max(i.lat,o.lat,s.lat,a.lat);const f=Math.pow(2,-this.zoom)/16*270,d="globe"===this.projection.name?1:4,p=(t,e,r,n,i)=>{const o=(t+r)/2,s=(e+n)/2,a=new b(o,s),{lng:m,lat:g}=this.pointLocation3D(a),y=Math.max(0,l-m,u-g,m-c,g-h);l=Math.min(l,m),c=Math.max(c,m),u=Math.min(u,g),h=Math.max(h,g),(i<d||y>f)&&(p(t,e,o,s,i+1),p(o,s,r,n,i+1))};if(p(e,t,n,t,1),p(n,t,n,r,1),p(n,r,e,r,1),p(e,r,e,t,1),"globe"===this.projection.name){const[t,e]=Jb(this);t?(h=90,c=180,l=-180):e&&(u=-90,c=180,l=-180)}return new Oh(new ax(l,u),new ax(c,h))}_getBoundsRectangular(t,e){const{top:r,left:n}=this._edgeInsets,i=this.height-this._edgeInsets.bottom,o=this.width-this._edgeInsets.right,s=new b(n,r),a=new b(o,r),l=new b(o,i),c=new b(n,i);let u=this.pointCoordinate(s,t),h=this.pointCoordinate(a,t);const f=this.pointCoordinate(l,e),d=this.pointCoordinate(c,e),p=(t,e)=>(e.y-t.y)/(e.x-t.x);return u.y>1&&h.y>=0?u=new wx((1-d.y)/p(d,u)+d.x,1):u.y<0&&h.y<=1&&(u=new wx(-d.y/p(d,u)+d.x,0)),h.y>1&&u.y>=0?h=new wx((1-f.y)/p(f,h)+f.x,1):h.y<0&&u.y<=1&&(h=new wx(-f.y/p(f,h)+f.x,0)),(new Oh).extend(this.coordinateLocation(u)).extend(this.coordinateLocation(h)).extend(this.coordinateLocation(d)).extend(this.coordinateLocation(f))}_getBoundsRectangularTerrain(){const t=this.elevation;if(!t.visibleDemTiles.length||t.isUsingMockSource())return this._getBoundsRectangular(0,0);const e=t.visibleDemTiles.reduce(((t,e)=>{if(e.dem){const r=e.dem.tree;t.min=Math.min(t.min,r.minimums[0]),t.max=Math.max(t.max,r.maximums[0])}return t}),{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(e.min*t.exaggeration(),e.max*t.exaggeration())}getBounds(){return"mercator"===this.projection.name||"equirectangular"===this.projection.name?this._terrainEnabled()?this._getBoundsRectangularTerrain():this._getBoundsRectangular(0,0):this._getBoundsNonRectangular()}horizonLineFromTop(t=!0){const e=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))-this.centerOffset.y,r=this.height/2-e*(1-this._horizonShift);return t?Math.max(0,r):r}getMaxBounds(){return this.maxBounds}setMaxBounds(t){this.maxBounds=t,this.minLat=-yx,this.maxLat=yx,this.minLng=-180,this.maxLng=180,t&&(this.minLat=t.getSouth(),this.maxLat=t.getNorth(),this.minLng=t.getWest(),this.maxLng=t.getEast(),this.maxLng<this.minLng&&(this.maxLng+=360)),this.worldMinX=hx(this.minLng)*this.tileSize,this.worldMaxX=hx(this.maxLng)*this.tileSize,this.worldMinY=fx(this.maxLat)*this.tileSize,this.worldMaxY=fx(this.minLat)*this.tileSize,this._constrain()}calculatePosMatrix(t,e){return this.projection.createTileMatrix(this,e,t)}calculateDistanceTileData(t){const e=t.key,r=this._distanceTileDataCache;if(r[e])return r[e];const n=t.canonical,i=1/this.height,o=this.cameraWorldSize,s=o/this.zoomScale(n.z),a=(n.x+Math.pow(2,n.z)*t.wrap)*s,l=n.y*s,c=this.point;c.x*=o/this.worldSize,c.y*=o/this.worldSize;const u=this.angle,h=Math.sin(-u),f=-Math.cos(-u),d=(c.x-a)*i,p=(c.y-l)*i;return r[e]={bearing:[h,f],center:[d,p],scale:s/Li*i},r[e]}calculateFogTileMatrix(t){const e=t.key,r=this._fogTileMatrixCache;if(r[e])return r[e];const n=this.projection.createTileMatrix(this,this.cameraWorldSizeForFog,t);return _v.multiply(n,this.worldToFogMatrix,n),r[e]=new Float32Array(n),r[e]}calculateProjMatrix(t,e=!1,r=!1){const n=t.key;let i;if(i=r?this._expandedProjMatrixCache:e?this._alignedProjMatrixCache:this._projMatrixCache,i[n])return i[n];const o=this.calculatePosMatrix(t,this.worldSize);let s;return s=this.projection.isReprojectedInTileSpace?this.mercatorMatrix:r?this.expandedFarZProjMatrix:e?this.alignedProjMatrix:this.projMatrix,_v.multiply(o,s,o),i[n]=new Float32Array(o),i[n]}calculatePixelsToTileUnitsMatrix(t){const e=t.tileID.key,r=this._pixelsToTileUnitsCache;if(r[e])return r[e];const n=GM(t,this);return r[e]=n,r[e]}customLayerMatrix(){return this.mercatorMatrix.slice()}globeToMercatorMatrix(){if("globe"===this.projection.name){const t=1/this.worldSize,e=_v.fromScaling([],[t,t,t]);return _v.multiply(e,e,this.globeMatrix),e}}recenterOnTerrain(){if(!this._elevation||"globe"===this.projection.name)return;const t=this._elevation;this._updateCameraState();const e=dx(1,this._center.lat)*this.worldSize,r=this._computeCameraPosition(e),n=this._camera.forward(),i=dx(1,this._center.lat);r[2]/=i,n[2]/=i,Sv.normalize(n,n);const o=t.raycast(r,n,t.exaggeration());if(o){const t=Sv.scaleAndAdd([],r,n,o),e=new wx(t[0],t[1],dx(t[2],mx(t[1]))),s=[e.x-r[0],e.y-r[1],e.z-r[2]*i],a=(e.z+Sv.length(s))*this._pixelsPerMercatorPixel;this._seaLevelZoom=this._zoomFromMercatorZ(a),this._centerAltitude=e.toAltitude(),this._center=this.coordinateLocation(e),this._updateZoomFromElevation(),this._constrain(),this._calcMatrices()}}_constrainCamera(t=!1){if(!this._elevation)return;const e=this._elevation,r=dx(1,this._center.lat)*this.worldSize,n=this._computeCameraPosition(r),i=e.getAtPointOrZero(new wx(...n)),o=this.pixelsPerMeter/this.worldSize*i,s=this._minimumHeightOverTerrain(),a=n[2]-o;if(a<=s)if(a<0||t){const t=this.locationCoordinate(this._center,this._centerAltitude),e=[n[0],n[1],t.z-n[2]],r=Sv.length(e);e[2]-=(s-a)/this._pixelsPerMercatorPixel;const i=Sv.length(e);if(0===i)return;Sv.scale(e,e,r/i*this._pixelsPerMercatorPixel),this._camera.position=[n[0],n[1],t.z*this._pixelsPerMercatorPixel-e[2]],this._updateStateFromCamera()}else this._isCameraConstrained=!0}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const t="globe"===this.projection.name||this.mercatorFromTransition;if(this.projection.isReprojectedInTileSpace||t){const e=this.center;return e.lat=D(e.lat,this.minLat,this.maxLat),(this.maxBounds||!this.renderWorldCopies&&!t)&&(e.lng=
2D(e.lng,this.minLng,this.maxLng)),this.center=e,void(this._constraining=!1)}const e=this._unmodified,{x:r,y:n}=this.point;let i=0,o=r,s=n;const a=this.width/2,l=this.height/2,c=this.worldMinY*this.scale,u=this.worldMaxY*this.scale;if(n-l<c&&(s=c+l),n+l>u&&(s=u-l),u-c<this.height&&(i=Math.max(i,this.height/(u-c)),s=(u+c)/2),this.maxBounds||!this._renderWorldCopies||!this.projection.wrap){const t=this.worldMinX*this.scale,e=this.worldMaxX*this.scale,n=this.worldSize/2-(t+e)/2;o=(r+n+this.worldSize)%this.worldSize-n,o-a<t&&(o=t+a),o+a>e&&(o=e-a),e-t<this.width&&(i=Math.max(i,this.width/(e-t)),o=(e+t)/2)}o===r&&s===n||(this.center=this.unproject(new b(o,s))),i&&(this.zoom+=this.scaleZoom(i)),this._constrainCamera(),this._unmodified=e,this._constraining=!1}_minZoomForBounds(){let t=Math.max(0,this.scaleZoom(this.height/(this.worldMaxY-this.worldMinY)));return this.maxBounds&&(t=Math.max(t,this.scaleZoom(this.width/(this.worldMaxX-this.worldMinX)))),t}_maxCameraBoundsDistance(){return this._mercatorZfromZoom(this._minZoomForBounds())}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,e="globe"===this.projection.name,r=this.pixelsPerMeter;"globe"===this.projection.name&&(this._mercatorScaleRatio=dx(1,this.center.lat)/dx(1,sb));const n=jM(this.projection,this.zoom,this.width,this.height,1024);this._pixelsPerMercatorPixel=this.projection.pixelSpaceConversion(this.center.lat,this.worldSize,n),this.cameraToCenterDistance=.5/Math.tan(.5*this._fov)*this.height*this._pixelsPerMercatorPixel,this._updateCameraState(),this._farZ=this.projection.farthestPixelDistance(this),this._nearZ=this.height/50;const i="meters"===this.projection.zAxisUnit?r:1,o=this._camera.getWorldToCamera(this.worldSize,i);let s;const a=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,this._farZ);if(a[8]=2*-t.x/this.width,a[9]=2*t.y/this.height,this.isOrthographic){let e=.5*this.height/Math.tan(this._fov/2)*1*Math.tan(.5*this._fov),r=e*this.aspect,n=-r,i=-e;r-=t.x,n-=t.x,e+=t.y,i+=t.y,s=this._camera.getCameraToClipOrthographic(n,r,i,e,this._nearZ,this._farZ);const o=this.pitch>=pk?1:this.pitch/pk;yk(s,s,a,gk(o))}else s=a;const l=_v.mul([],a,o);let c=_v.mul([],s,o);if(this.projection.isReprojectedInTileSpace){const t=this.locationCoordinate(this.center),e=_v.identity([]);_v.translate(e,e,[t.x*this.worldSize,t.y*this.worldSize,0]),_v.multiply(e,e,DM(this)),_v.translate(e,e,[-t.x*this.worldSize,-t.y*this.worldSize,0]),_v.multiply(c,c,e),_v.multiply(l,l,e),this.inverseAdjustmentMatrix=BM(this)}else this.inverseAdjustmentMatrix=[1,0,0,1];if(this.mercatorMatrix=_v.scale([],c,[this.worldSize,this.worldSize,this.worldSize/i,1]),this.projMatrix=c,this.invProjMatrix=_v.invert(new Float64Array(16),this.projMatrix),e){const e=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,1/0);e[8]=2*-t.x/this.width,e[9]=2*t.y/this.height,this.expandedFarZProjMatrix=_v.mul([],e,o)}else this.expandedFarZProjMatrix=this.projMatrix;const u=_v.invert([],s);this.frustumCorners=Vv.fromInvProjectionMatrix(u,this.horizonLineFromTop(),this.height),this.cameraFrustum=rb.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,0,!e);const h=new Float32Array(16);_v.identity(h),_v.scale(h,h,[1,-1,1]),_v.rotateX(h,h,this._pitch),_v.rotateZ(h,h,this.angle);const f=_v.perspective(new Float32Array(16),this._fov,this.width/this.height,this._nearZ,this._farZ);this.starsProjMatrix=_v.clone(f);const d=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;f[8]=2*-t.x/this.width,f[9]=2*(t.y+d)/this.height,this.skyboxMatrix=_v.multiply(h,f,h);const p=this.point,m=p.x,g=p.y,y=this.width%2/2,_=this.height%2/2,v=Math.cos(this.angle),b=Math.sin(this.angle),x=m-Math.round(m)+v*y+b*_,w=g-Math.round(g)+v*_+b*y,E=new Float64Array(c);if(_v.translate(E,E,[x>.5?x-1:x,w>.5?w-1:w,0]),this.alignedProjMatrix=E,c=_v.create(),_v.scale(c,c,[this.width/2,-this.height/2,1]),_v.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=_v.create(),_v.scale(c,c,[1,-1,1]),_v.translate(c,c,[-1,-1,0]),_v.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=_v.multiply(new Float64Array(16),this.labelPlaneMatr
2ix,l),this._calcFogMatrices(),this._distanceTileDataCache={},c=_v.invert(new Float64Array(16),this.pixelMatrix),!c)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=c,"globe"===this.projection.name||this.mercatorFromTransition){this.globeMatrix=Nb(this);const t=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=Sv.transformMat4(t,t,o),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=c;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={},this._expandedProjMatrixCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const t=this.cameraWorldSizeForFog,e=this.cameraPixelsPerMeter,r=this._camera.position,n=1/this.height/this._pixelsPerMercatorPixel,i=[t,t,e];Sv.scale(i,i,n),Sv.scale(r,r,-1),Sv.multiply(r,r,i);const o=_v.create();_v.translate(o,o,r),_v.scale(o,o,i),this.mercatorFogMatrix=o,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(t,e,n)}_computeCameraPosition(t){const e=(t=t||this.pixelsPerMeter)/this.pixelsPerMeter,r=this._camera.forward(),n=this.point,i=this._seaLevelZoom?this._seaLevelZoom:this._zoom,o=this._mercatorZfromZoom(i)*e-t/this.worldSize*this._centerAltitude;return[n.x/this.worldSize-r[0]*o,n.y/this.worldSize-r[1]*o,t/this.worldSize*this._centerAltitude-r[2]*o]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(t){const e=this._maxCameraBoundsDistance()*Math.cos(this._pitch),r=this._camera.position[2],n=t[2];let i=1;this.projection.wrap&&(this.center=this.center.wrap()),n>0&&(i=Math.min((e-r)/n,1)),this._camera.position=Sv.scaleAndAdd([],this._camera.position,t,i),this._updateStateFromCamera()}_updateStateFromCamera(){const t=this._camera.position,e=this._camera.forward(),{pitch:r,bearing:n}=this._camera.getPitchBearing(),i=dx(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,o=this._mercatorZfromZoom(this._maxZoom)*Math.cos(S(this._maxPitch)),s=Math.max((t[2]-i)/Math.cos(r),o),a=this._zoomFromMercatorZ(s);Sv.scaleAndAdd(t,t,e,s),this._pitch=D(r,S(this.minPitch),S(this.maxPitch)),this.angle=B(n,-Math.PI,Math.PI),this._setZoom(D(a,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new wx(t[0],t[1],t[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(t){return Math.pow(2,t)*this.tileSize}_mercatorZfromZoom(t){return this.cameraToCenterDistance/this._worldSizeFromZoom(t)}_minimumHeightOverTerrain(){const t=4,e=Math.min((null!=this._seaLevelZoom?this._seaLevelZoom:this._zoom)+t,this._maxZoom);return this._mercatorZfromZoom(e)}_zoomFromMercatorZ(t){return this.scaleZoom(this.cameraToCenterDistance/(t*this.tileSize))}zoomFromMercatorZAdjusted(t){let e=0,r=ob,n=0,i=1/0;const o=1e-6;for(;r-e>o&&r>e;){const o=e+.5*(r-e),s=this.tileSize*Math.pow(2,o),a=this.getCameraToCenterDistance(this.projection,o,s),l=this.scaleZoom(a/(t*this.tileSize)),c=Math.abs(o-l);c<i&&(i=c,n=o),o<l?e=o:r=o}return n}_terrainEnabled(){return!(!this._elevation||!this.projection.supportsTerrain&&(it("Terrain is not yet supported with alternate projections. Use mercator or globe to enable terrain."),1))}anyCornerOffEdge(t,e){const r=Math.min(t.x,e.x),n=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y);if(i<this.horizonLineFromTop(!1))return!0;if("mercator"!==this.projection.name)return!1;const s=[new b(r,i),new b(n,o),new b(r,o),new b(n,i)],a=this.renderWorldCopies?-uk:0,l=this.renderWorldCopies?1+uk:1,c=0,u=1;for(const t of s){const e=this.pointRayIntersection(t);if(e.t<0)return!0;const r=this.rayIntersectionCoordinate(e);if(r.x<a||r.y<c||r.x>l||r.y>u)return!0}return!1}isHorizonVisible(){const t=2;return this.pitch+T(this.fovAboveCenter)>90-t||this.anyCornerOffEdge(new b(0,0),new b(this.width,this.height))}zoomDeltaToMovement(t,e){const r=Sv.length(Sv.sub([],this._camera.position,t)),n=this._zoomFromMercatorZ(r)+e;return r-this._mercatorZfromZoom(n)}getCameraPoint(){if("globe"===this.projection.name){const t=KM([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new b(t[0],t[1])}{const t=this._pitch,e=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new b(0,e))}}getCameraToCenterDistance(t,e=this.zoom,r=this.worldSize){const n=jM(t,e,this.width,this.height,1024),i=t.pixelSpaceConversion(this.center.lat,r,n);let o=.5/Math.tan(.5*this._fov)*this.height*i;if(this.isOrthographic){const t=this.pitch>=pk?1:this.pitch/pk;o=mk(1,o,gk(t))}return o}getWorldToCameraMatrix(){const t="meters"===this.projection.zAxisUnit?this.pixelsPerMeter:1,e=this._camera.getWorldToCamera(this.worldSize,t);return"globe"===this.projection.name&&_v.multiply(e,e,this.globeMatrix),e}getFrustum(t){const e="meters"===this.projection.zAxisUnit;return rb.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,t,e)}}function vk(t,e,r){_v.identity(t),_v.rotateZ(t,t,S(e[2])),_v.rotateX(t,t,S(e[0])),_v.rotateY(t,t,S(e[1])),_v.scale(t,t,r);const n=[1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1];_v.multiply(t,t,n)}function bk(t,e){const r=[0,0,1],n=[{corners:[0,1,3,2],dotProductWithUp:0},{corners:[1,5,2,6],dotProductWithUp:0},{corners:[0,4,1,5],dotProductWithUp:0},{corners:[2,6,3,7],dotProductWithUp:0},{corners:[4,7,5,6],dotProductWithUp:0},{corners:[0,3,4,7],dotProductWithUp:0}];for(const i of n){const n=t[i.corners[0]],o=t[i.corners[1]],s=t[i.corners[2]],a=[o[0]-n[0],o[1]-n[1],e*(o[2]-n[2])],l=[s[0]-n[0],s[1]-n[1],e*(s[2]-n[2])],c=Sv.cross(a,a,l);Sv.normalize(c,c),i.dotProductWithUp=Sv.dot(c,r)}return n.sort(((t,e)=>t.dotProductWithUp-e.dotProductWithUp)),n[0].corners}function xk(t,e,r,n,i,o,s,a){const l=[r[0]-e[0],r[1]-e[1],0],c=[n[0]-e[0],n[1]-e[1],0];if(Sv.length(l)<1e-12||Sv.length(c)<1e-12)return bv.identity(t);const u=Sv.cross([],l,c);Sv.normalize(u,u),Sv.subtract(c,n,e),l[2]=(o-i)*a,c[2]=(s-i)*a;const h=l;return Sv.cross(h,l,c),Sv.normalize(h,h),bv.rotationTo(t,u,h)}function wk(t){const e=[t[0],t[1],t[2]];
2let r=[0,1,0];const n=Sv.cross([],r,e);return Sv.cross(r,e,n),0===Sv.squaredLength(r)&&(r=[0,1,0],Sv.cross(n,e,r)),Sv.normalize(n,n),Sv.normalize(r,r),Sv.normalize(e,e),[n[0],n[1],n[2],0,r[0],r[1],r[2],0,e[0],e[1],e[2],0,t[0],t[1],t[2],1]}function Ek(t,e,r){const n=e.worldSize,i=[t[12],t[13],t[14]],o=mx(i[1]/n),s=px(i[0]/n),a=_v.identity([]),l=dx(1,o)*n,c=dx(1,0)*n*vx(o,e.zoom),u=1/Bb(n);let h=c*u;if(r){const t=jM(e.projection,e.zoom,e.width,e.height,1024);h=u*e.projection.pixelSpaceConversion(e.center.lat,n,t)}const f=kb(o,s);Sv.add(f,f,Sv.scale([],Sv.normalize([],f),l*h*i[2]));const d=wk(f);_v.scale(a,a,[h,h,h*l]),_v.translate(a,a,[-i[0],-i[1],-i[2]]);const p=_v.multiply([],e.globeMatrix,d);return _v.multiply(p,p,a),_v.multiply(p,p,t),p}function Sk(t,e){const r=e.worldSize,n=dx(1,0)*r*vx(e.center.lat,e.zoom)/Bb(r),i=dx(1,e.center.lat)*r,o=_v.identity([]);return _v.rotateY(o,o,S(e.center.lng)),_v.rotateX(o,o,S(e.center.lat)),_v.translate(o,o,[0,0,ab]),_v.scale(o,o,[n,n,n*i]),_v.translate(o,o,[e.point.x-.5*r,e.point.y-.5*r,0]),_v.multiply(o,o,t),_v.multiply(o,e.globeMatrix,o)}function Tk(t,e,r){const n=(t,e,r)=>{const n=Sv.length(t),i=Sv.length(e),o=xb(t,e,r);return Sv.scale(o,o,1/Sv.length(o)*Co(n,i,r))},i=n([t[0],t[1],t[2]],[e[0],e[1],e[2]],r),o=n([t[4],t[5],t[6]],[e[4],e[5],e[6]],r),s=n([t[8],t[9],t[10]],[e[8],e[9],e[10]],r),a=xb([t[12],t[13],t[14]],[e[12],e[13],e[14]],r);return[i[0],i[1],i[2],0,o[0],o[1],o[2],0,s[0],s[1],s[2],0,a[0],a[1],a[2],1]}function Ak(t,e,r=!1){const n=Vb(e.zoom),i=Ek(t,e,r);return n>0?Tk(i,Sk(t,e),n):i}const Ok=64,Ck={CoordinateSpaceTile:1,CoordinateSpaceYUp:2,HasMapbox
2MeshFeatures:4},Mk=[1,1,1];class kk{constructor(t,e,r,n){this.id=t,this.position=null!=e?new ax(e[0],e[1]):new ax(0,0),this.orientation=null!=r?r:[0,0,0],this.nodes=n,this.uploaded=!1,this.aabb=new nb([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),this.matrix=[]}_applyTransformations(t,e){if(_v.multiply(t.matrix,e,t.matrix),t.meshes)for(const e of t.meshes){const r=nb.applyTransform(e.aabb,t.matrix);this.aabb.encapsulate(r)}if(t.children)for(const e of t.children)this._applyTransformations(e,t.matrix)}computeBoundsAndApplyParent(){const t=_v.identity([]);for(const e of this.nodes)this._applyTransformations(e,t)}_positionModelOnTerrain(t,e){const r=t.elevation;if(!r)return 0;const n=nb.projectAabbCorners(this.aabb,this.matrix),i=dx(1,this.position.lat)*t.worldSize,o=bk(n,i),s=n[o[0]],a=n[o[1]],l=n[o[2]],c=n[o[3]],u=r.getAtPointOrZero(new wx(s[0]/t.worldSize,s[1]/t.worldSize),0),h=r.getAtPointOrZero(new wx(a[0]/t.worldSize,a[1]/t.worldSize),0),f=r.getAtPointOrZero(new wx(l[0]/t.worldSize,l[1]/t.worldSize),0),d=r.getAtPointOrZero(new wx(c[0]/t.worldSize,c[1]/t.worldSize),0),p=(u+d)/2,m=(h+f)/2;return p>m?h<f?xk(e,a,c,s,h,d,u,i):xk(e,l,s,c,f,u,d,i):u<d?xk(e,s,a,l,u,h,f,i):xk(e,c,l,a,d,f,h,i),Math.max(p,m)}computeModelMatrix(t,e,r,n,i,o,s=!1){const a=t.transform,l=a.zoom,c=a.project(this.position),u=vx(this.position.lat,l),h=1/u;_v.identity(this.matrix);const f=[c.x+n[0]*h,c.y+n[1]*h,n[2]];_v.translate(this.matrix,this.matrix,f);let d=1,p=1;const m=a.worldSize;if(s){if("mercator"===a.projection.name){let t=0;a.elevation&&(t=a.elevation.getAtPointOrZero(new wx(c.x/m,c.y/m),0));const e=uv.transformMat4([],[c.x,c.y,t,1],a.projMatrix)[3]/a.cameraToCenterDistance;d=e,p=e*vx(a.center.lat,l)}else if("globe"===a.projection.name){const t=Ak(this.matrix,a),e=_v.multiply([],a.projMatrix,t),r=[0,0,0,1];uv.transformMat4(r,r,e);const n=r[3]/a.cameraToCenterDistance,i=Vb(l),o=a.projection.pixelsPerMeter(this.position.lat,m)*vx(this.position.lat,l),s=a.projection.pixelsPerMeter(a.center.lat,m)*vx(a.center.lat,l);d=n/Co(o,_x(a.center.lat),i),p=n*u/o,d*=s,p*=s}}else d=h;_v.scale(this.matrix,this.matrix,[d,d,p]);const g=[...this.matrix],y=this.orientation,_=[];if(vk(_,[y[0]+e[0],y[1]+e[1],y[2]+e[2]],r),_v.multiply(this.matrix,g,_),i&&a.elevation){let t=0;const e=[];if(o&&a.elevation){t=this._positionModelOnTerrain(a,e);const r=_v.fromQuat([],e),n=_v.multiply([],r,_);_v.multiply(this.matrix,g,n)}else t=a.elevation.getAtPointOrZero(new wx(c.x/m,c.y/m),0);0!==t&&(this.matrix[14]+=t)}}upload(t){if(!this.uploaded){for(const e of this.nodes)Lk(e,t);for(const t of this.nodes)Rk(t);this.uploaded=!0}}destroy(){for(const t of this.nodes)zk(t)}}function Ik(t,e,r=!1){const n=r?e.gl.R8:e.gl.RGBA;if(!t.uploaded){const r=t.sampler.minFilter>=e.gl.NEAREST_MIPMAP_NEAREST;t.gfxTexture=new YO(e,t.image,n,{useMipmap:r}),t.uploaded=!0,t.image=null}}function Pk(t,e,r){if(t.indexBuffer=e.createIndexBuffer(t.indexArray,!1,!0),t.vertexBuffer=e.createVertexBuffer(t.vertexArray,xM.members,!1,!0),t.normalArray&&(t.normalBuffer=e.createVertexBuffer(t.normalArray,TM.members,!1,!0)),t.texcoordArray&&(t.texcoordBuffer=e.createVertexBuffer(t.texcoordArray,SM.members,!1,!0)),t.colorArray){const r=12===t.colorArray.bytesPerElement?wM:EM;t.colorBuffer=e.createVertexBuffer(t.colorArray,r.members,!1,!0)}t.featureArray&&(t.pbrBuffer=e.createVertexBuffer(t.featureArray,OM.members,!0)),t.segments=Nu.simpleSegment(0,0,t.vertexArray.length,t.indexArray.length);const n=t.material;n.pbrMetallicRoughness.baseColorTexture&&Ik(n.pbrMetallicRoughness.baseColorTexture,e),n.pbrMetallicRoughness.metallicRoughnessTexture&&Ik(n.pbrMetallicRoughness.metallicRoughnessTexture,e),n.normalTexture&&Ik(n.normalTexture,e),n.occlusionTexture&&Ik(n.occlusionTexture,e,r),n.emissionTexture&&Ik(n.emissionTexture,e)}function Lk(t,e,r){if(t.meshes)for(const n of t.meshes)Pk(n,e,r);if(t.children)for(const n of t.children)Lk(n,e,r)}function Rk(t){if(t.meshes)for(const e of t.meshes)e.indexArray.destroy(),e.vertexArray.destroy(),e.colorArray&&e.colorArray.destroy(),e.normalArray&&e.normalArray.destroy(),e.texcoordArray&&e.texcoordArray.destroy(),e.featureArray&&e.featureArray.destroy();if(t.children)for(const e of t.children)Rk(e)}function Dk(t){t.pbrMetallicRoughness.baseColorTexture&&t.pbrMetallicRoughness.baseColorTexture.gfxTexture&&t.pbrMetallicRoughness.baseColorTexture.gfxTexture.destroy(),t.pbrMetallicRoughness.metallicRoughnessTexture&&t.pbrMetallicRoughness.metallicRoughnessTexture.gfxTexture&&t.pbrMetallicRoughness.metallicRoughnessTexture.gfxTexture.destroy(),t.normalTexture&&t.normalTexture.gfxTexture&&t.normalTexture.gfxTexture.destroy(),t.emissionTexture&&t.emissionTexture.gfxTexture&&t.emissionTexture.gfxTexture.destroy(),t.occlusionTexture&&t.occlusionTexture.gfxTexture&&t.occlusionTexture.gfxTexture.destroy()}function zk(t){if(t.meshes)for(const e of t.meshes)e.vertexBuffer&&(e.vertexBuffer.destroy(),e.indexBuffer.destroy(),e.normalBuffer&&e.normalBuffer.destroy(),e.texcoordBuffer&&e.texcoordBuffer.destroy(),e.colorBuffer&&e.colorBuffer.destroy(),e.pbrBuffer&&e.pbrBuffer.destroy(),e.segments.destroy(),e.material&&Dk(e.material));if(t.children)for(const e of t.children)zk(e)}class Bk{constructor(t,e){this.feature=t,this.instancedDataOffset=e,this.instancedDataCount=0,this.rotation=[0,0,0],this.scale=[1,1,1],this.translation=[0,0,0]}}class jk{constructor(){this.instancedDataArray=new Su,this.instancesEvaluatedElevation=[],this.features=[],this.idToFeaturesIndex={}}}class Fk{constructor(t){this.zoom=t.zoom,this.canonical=t.canonical,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.fqid)),this.projection=t.projection,this.index=t.index,this.hasZoomDependentProperties=this.layers[0].isZoomDependent(),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.hasPattern=!1,this.instancesPerModel={},this.validForExaggeration=0,this.maxVerticalOffset=0,this.maxScale=0,this.maxHeight=0,this.lookupDim=this.zoom>this.canonical.z?256:this.zoom>15?75:100,this.instanceCount=0,this.terrainElevationMin=0,this.terrainElevationMax=0,this.validForDEMTile={id:null,timestamp:0}}populate(t,e,r,n){this.tileToMeter=xx(r);const i=this.layers[0]._featureFilter.needGeometry;this.lookup=new Uint8Array(this.lookupDim*this.lookupDim);for(const{feature:o,id:s,index:a,sourceLayerIndex:l}of t){const t=Lx(o,i);if(!this.layers[0]._featureFilter.filter(new bc(this.zoom),t,r))continue;const c={id:s,sourceLayerIndex:l,index:a,geometry:i?t.geometry:Px(o,r,n),properties:o.properties,type:o.type,patterns:{}},u=this.addFeature(c,c.geometry,t);u&&e.featureIndex.insert(o,c.geometry,a,l,this.index,this.instancesPerModel[u].instancedDataArray.length)}this.lookup=null}update(t,e,r,n){for(const e in this.instancesPerModel){const r=this.instancesPerModel[e];for(const e in t)if(r.idToFeaturesIndex.hasOwnProperty(e)){const n=r.features[r.idToFeaturesIndex[e]];this.evaluate(n,t[e],r,!0)}}this.maxHeight=0}updateZoomBasedPaintProperties(){if(!this.hasZoomDependentProperties)return!1;let t=!1;for(const e in this.instancesPerModel){const r=this.instancesPerModel[e];for(const e of r.features){const n=this.layers[0],i=e.feature,o=this.canonical,s=n.paint.get("model-rotation").evaluate(i,{},o),a=n.paint.get("model-scale").evaluate(i,{},o),l=n.paint.get("model-translation").evaluate(i,{},o);Sv.exactEquals(e.rotation,s)&&Sv.exactEquals(e.scale,a)&&Sv.exactEquals(e.translation,l)||(this.evaluate(e,e.featureStates,r,!0),t=!0)}}return t}isEmpty(){for(const t in this.instancesPerModel)if(0!==this.instancesPerModel[t].instancedDataArray.length)return!1;return!0}uploadPending(){return!this.uploaded}upload(t){const e=0;if(!this.uploaded)for(const r in this.instancesPerModel){const n=this.instancesPerModel[r];n.instancedDataArray.length<e||0===n.instancedDataArray.length||(n.instancedDataBuffer?n.instancedDataBuffer.updateData(n.instancedDataArray):n.instancedDataBuffer=t.createVertexBuffer(n.instancedDataArray,AM.members,!0,void 0,this.instanceCount))}this.uploaded=!0}destroy(){for(const t in this.instancesPerModel){const e=this.instancesPerModel[t];0!==e.instancedDataArray.length&&e.instancedDataBuffer&&e.instancedDataBuffer.destroy()}}
2addFeature(t,e,r){const n=this.layers[0],i=n.layout.get("model-id").evaluate(r,{},this.canonical);if(!i)return it(`modelId is not evaluated for layer ${n.id} and it is not going to get rendered.`),i;this.instancesPerModel[i]||(this.instancesPerModel[i]=new jk);const o=this.instancesPerModel[i],s=o.instancedDataArray,a=new Bk(r,s.length);for(const t of e)for(const e of t){if(e.x<0||e.x>=Li||e.y<0||e.y>=Li)continue;const t=(this.lookupDim-1)/Li,r=this.lookupDim*(e.y*t|0)+e.x*t|0;if(this.lookup){if(0!==this.lookup[r])continue;this.lookup[r]=1}this.instanceCount++;const n=s.length;s.resize(n+1),o.instancesEvaluatedElevation.push(0),s.float32[16*n]=e.x,s.float32[16*n+1]=e.y}return a.instancedDataCount=o.instancedDataArray.length-a.instancedDataOffset,a.instancedDataCount>0&&(t.id&&(o.idToFeaturesIndex[t.id]=o.features.length),o.features.push(a),this.evaluate(a,{},o,!1)),i}evaluate(t,e,r,n){const i=this.layers[0],o=t.feature,s=this.canonical,a=t.rotation=i.paint.get("model-rotation").evaluate(o,e,s),l=t.scale=i.paint.get("model-scale").evaluate(o,e,s),c=t.translation=i.paint.get("model-translation").evaluate(o,e,s),u=i.paint.get("model-color").evaluate(o,e,s);u.a=i.paint.get("model-color-mix-intensity").evaluate(o,e,s);const h=[];this.maxVerticalOffset<c[2]&&(this.maxVerticalOffset=c[2]),this.maxScale=Math.max(Math.max(this.maxScale,l[0]),Math.max(l[1],l[2])),vk(h,a,l);const f=10,d=Math.round(100*u.a)+u.b/1.05;for(let e=0;e<t.instancedDataCount;++e){const i=t.instancedDataOffset+e,o=16*i,a=r.instancedDataArray.float32;let l=0;n&&(l=a[o+6]-r.instancesEvaluatedElevation[i]);const p=0|a[o+1];a[o]=(0|a[o])+u.r/1.05,a[o+1]=p+u.g/1.05,a[o+2]=d,a[o+3]=1/(s.z>f?this.tileToMeter:xx(s,p)),a[o+4]=c[0],a[o+5]=c[1],a[o+6]=c[2]+l,a[o+7]=h[0],a[o+8]=h[1],a[o+9]=h[2],a[o+10]=h[4],a[o+11]=h[5],a[o+12]=h[6],a[o+13]=h[8],a[o+14]=h[9],a[o+15]=h[10],r.instancesEvaluatedElevation[i]=c[2]}}}Vl(Fk,"ModelBucket",{omit:["layers"]}),Vl(jk,"PerModelAttributes"),Vl(Bk,"ModelFeature");const Nk=new Rc({visibility:new Mc(jr.layout_model.visibility),"model-id":new kc(jr.layout_model["model-id"])});var $k={paint:new Rc({"model-opacity":new Mc(jr.paint_model["model-opacity"]),"model-rotation":new kc(jr.paint_model["model-rotation"]),"model-scale":new kc(jr.paint_model["model-scale"]),"model-translation":new kc(jr.paint_model["model-translation"]),"model-color":new kc(jr.paint_model["model-color"]),"model-color-mix-intensity":new kc(jr.paint_model["model-color-mix-intensity"]),"model-type":new Mc(jr.paint_model["model-type"]),"model-cast-shadows":new Mc(jr.paint_model["model-cast-shadows"]),"model-receive-shadows":new Mc(jr.paint_model["model-receive-shadows"]),"model-ambient-occlusion-intensity":new Mc(jr.paint_model["model-ambient-occlusion-intensity"]),"model-emissive-strength":new kc(jr.paint_model["model-emissive-strength"]),"model-roughness":new kc(jr.paint_model["model-roughness"]),"model-height-based-emissive-strength-multiplier":new kc(jr.paint_model["model-height-based-emissive-strength-multiplier"]),"model-cutoff-fade-range":new Mc(jr.paint_model["model-cutoff-fade-range"])}),layout:Nk};class Uk extends $c{constructor(t,e){super(t,$k,e)}createBucket(t){return new Fk(t)}getProgramIds(){return["model"]}is3D(){return!0}hasShadowPass(){return!0}canCastShadows(){return!0}hasLightBeamPass(){return!0}cutoffRange(){return this.paint.get("model-cutoff-fade-range")}queryRadius(){return 0}queryIntersectsFeature(){return!1}_handleOverridablePaintPropertyUpdate(t,e,r){return!(!this.layout||e.isDataDriven()||r.isDataDriven()||"model-color"!==t&&"model-color-mix-intensity"!==t&&"model-rotation"!==t&&"model-scale"!==t&&"model-translation"!==t&&"model-emissive-strength"!==t)}_isPropertyZoomDependent(t){const e=this._transitionablePaint._values[t];return null!=e&&null!=e.value&&null!=e.value.expression&&e.value.expression instanceof xa}isZoomDependent(){return this._isPropertyZoomDependent("model-scale")||this._isPropertyZoomDependent("model-rotation")||this._isPropertyZoomDependent("model-translation")}}const Vk=new Float32Array(262144),Gk=new Uint8Array(262144);function qk(t){let e=0;if(t.meshes)for(const r of t.meshes)e=Math.max(e,r.aabb.max[2]);if(t.children)for(const r of t.children)e=Math.max(e,qk(r));return e}const Hk={wall:1,door:2,roof:3,window:4,lamp:5,logo:6},Wk=["","wall","door","roof","window","lamp","logo"];class Zk{constructor(t){this.node=t,this.evaluatedRMEA=[[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[.4,1,0,1],[1,0,0,1],[1,0,0,1]],this.hiddenByReplacement=!1,this.evaluatedScale=[1,1,1],this.evaluatedColor=[],this.emissionHeightBasedParams=[],this.feature={type:"Point",id:t.id,geometry:[],properties:{height:qk(t)}}}}class Xk{constructor(t,e,r,n){this.nodes=t,this.id=e,this.modelTraits|=Ck.CoordinateSpaceTile,this.uploaded=!1,this.hasPattern=!1,r&&(this.modelTraits|=Ck.HasMapbox
2MeshFeatures),this.zoom=-1,this.terrainExaggeration=1,this.projection={name:"mercator"},this.replacementUpdateTime=0,this.elevationReadFromZ=255,this.brightness=n,this.dirty=!0,this.needsUpload=!1}update(){console.log("Update 3D model bucket")}populate(){console.log("populate 3D model bucket")}uploadPending(){return!this.uploaded||this.needsUpload}upload(t){if(!this.needsUpload)return;const e=this.getNodesInfo();for(const r of e){const e=r.node;this.uploaded?this.updatePbrBuffer(e):Lk(e,t,!0)}for(const t of e)Rk(t.node);this.uploaded=!0,this.needsUpload=!1}updatePbrBuffer(t){let e=!1;if(!t.meshes)return e;for(const r of t.meshes)r.pbrBuffer&&(r.pbrBuffer.updateData(r.featureArray),e=!0);return e}needsReEvaluation(t,e,r){const n=t.transform.projectionOptions,i=t.style.getBrightness(),o=this.brightness!==i;return!!(!this.uploaded||this.dirty||n.name!==this.projection.name||Yk(r.paint.get("model-color").value,o)||Yk(r.paint.get("model-color-mix-intensity").value,o)||Yk(r.paint.get("model-roughness").value,o)||Yk(r.paint.get("model-emissive-strength").value,o)||Yk(r.paint.get("model-height-based-emissive-strength-multiplier").value,o))&&(this.projection=n,this.brightness=i,!0)}evaluateScale(t,e){if(t.transform.zoom===this.zoom)return;this.zoom=t.transform.zoom;const r=this.getNodesInfo(),n=this.id.canonical;for(const t of r){const r=t.feature;t.evaluatedScale=e.paint.get("model-scale").evaluate(r,{},n)}}evaluate(t){const e=this.getNodesInfo();for(const r of e){if(!r.node.meshes)continue;const e=r.feature,n=r.node.meshes&&r.node.meshes[0].featureData,i=r.evaluatedColor[Hk.door],o=r.evaluatedRMEA[Hk.door],s=this.id.canonical;if(r.hasTranslucentParts=!1,n){for(let n=0;n<Wk.length;n++){const i=Wk[n];i.length&&(e.properties.part=i);const o=t.paint.get("model-color").evaluate(e,{},s),a=t.paint.get("model-color-mix-intensity").evaluate(e,{},s);r.evaluatedColor[n]=[o.r,o.g,o.b,a],r.evaluatedRMEA[n][0]=t.paint.get("model-roughness").evaluate(e,{},s),r.evaluatedRMEA[n][2]=t.paint.get("model-emissive-strength").evaluate(e,{},s),r.evaluatedRMEA[n][3]=o.a,r.emissionHeightBasedParams[n]=t.paint.get("model-height-based-emissive-strength-multiplier").evaluate(e,{},s),!r.hasTranslucentParts&&o.a<1&&(r.hasTranslucentParts=!0)}delete e.properties.part,Qk(r,i!==r.evaluatedColor[Hk.door]||o!==r.evaluatedRMEA[Hk.door])}r.evaluatedScale=t.paint.get("model-scale").evaluate(e,{},s),this.updatePbrBuffer(r.node)||(this.needsUpload=!0)}this.dirty=!1}elevationUpdate(t,e,r,n){const i=t.findDEMTileFor(r);if(i&&(i.tileID.canonical!==this.terrainTile||e!==this.terrainExaggeration)){if(i.dem&&i.tileID.overscaledZ!==this.elevationReadFromZ){this.elevationReadFromZ=i.tileID.overscaledZ;const e=WS.create(t,r,i);if(!e)return;this.modelTraits&Ck.HasMapboxMeshFeatures&&this.updateDEM(t,e,r,n);for(const t of this.getNodesInfo()){const r=t.node;if(!r.footprint||!r.footprint.vertices||!r.footprint.vertices.length)continue;const n=r.footprint.vertices;let i=e.getElevationAt(n[0].x,n[0].y,!0,!0);for(let t=1;t<n.length;t++)i=Math.min(i,e.getElevationAt(n[t].x,n[t].y,!0,!0));r.elevation=i}}this.terrainTile=i.tileID.canonical,this.terrainExaggeration=e}}updateDEM(t,e,r,n){let i=e._dem._modifiedForSources[n];if(void 0===i&&(e._dem._modifiedForSources[n]=[],i=e._dem._modifiedForSources[n]),i.includes(r.canonical))return;const o=e._dem.dim;i.push(r.canonical);let s=!1;for(const t of this.getNodesInfo()){const r=t.node;if(!r.footprint||!r.footprint.grid)continue;const n=r.footprint.grid,i=e.tileCoordToPixel(n.min.x,n.min.y),a=e.tileCoordToPixel(n.max.x,n.max.y),l=Math.min(Math.min(o-a.y,i.x),Math.min(i.y,o-a.x));if(l<0)continue;const c=D(l,2,5);let u=Math.max(0,i.x-c),h=Math.max(0,i.y-c),f=Math.min(a.x+c,o-1),d=Math.min(a.y+c,o-1);for(let t=h;t<=d;++t)for(let e=u;e<=f;++e)Gk[t*o+e]=255;let p=0,m=0;for(let t=0;t<n.cellsY;++t)for(let r=0;r<n.cellsX;++r){if(!n.cells[t*n.cellsX+r])continue;const i=e.tileCoordToPixel(n.min.x+r/n.xScale,n.min.y+t/n.yScale),s=e.tileCoordToPixel(n.min.x+(r+1)/n.xScale,n.min.y+(t+1)/n.yScale);for(let t=i.y;t<=Math.min(s.y+1,o-1);++t)for(let r=i.x;r<=Math.min(s.x+1,o-1);++r)255===Gk[t*o+r]&&(Gk[t*o+r]=0,p+=e.getElevationAtPixel(r,t),m++)}const g=p/m;u=Math.max(1,i.x-c),h=Math.max(1,i.y-c),f=Math.min(a.x+c,o-2),d=Math.min(a.y+c,o-2),s=!0;for(let t=h;t<=d;++t)for(let r=u;r<=f;++r)0===Gk[t*o+r]&&(Vk[t*o+r]=e._dem.set(r,t,g));for(let t=1;t<c;++t){u=Math.max(1,i.x-t),h=Math.max(1,i.y-t),f=Math.min(a.x+t,o-2),d=Math.min(a.y+t,o-2);for(let r=h;r<=d;++r)for(let n=u;n<=f;++n){const i=r*o+n;if(255===Gk[i]){let s=0,a=0,l=-1,u=-1;for(let e=-1;e<=1;++e)for(let i=-1;
2i<=1;++i){const c=(r+e)*o+n+i;if(Gk[c]>=t)continue;const h=Vk[c],f=Math.abs(h);f>a&&(s=h,a=f,l=i,u=e)}if(a>.1){const o=1-(t+.5*Math.abs(l*u))/c;let a=e._dem.get(n,r)+s*o;const h=e._dem.get(n+l,r+u),f=e._dem.get(n-l,r-u,!0);(a-h)*(a-f)>0&&(a=(h+f)/2),Vk[i]=e._dem.set(n,r,a),Gk[i]=t}}}}}s&&(e._demTile.needsDEMTextureUpload=!0,e._dem._timestamp=vr.now())}getNodesInfo(){if(!this.nodesInfo){this.nodesInfo=[];for(const t of this.nodes)this.nodesInfo.push(new Zk(t));this.freeNodes()}return this.nodesInfo}freeNodes(){if(this.nodes){for(const t of this.nodes)zk(t);this.nodes.splice(0,this.nodes.length)}}destroy(){this.freeNodes();const t=this.getNodesInfo();for(const e of t)Rk(e.node),zk(e.node)}isEmpty(){return!this.nodes.length}updateReplacement(t,e){if(e.updateTime===this.replacementUpdateTime)return;this.replacementUpdateTime=e.updateTime;const r=e.getReplacementRegionsForTile(t.toUnwrapped()),n=this.getNodesInfo();for(let t=0;t<this.nodesInfo.length;t++){const e=n[t].node;n[t].hiddenByReplacement=!!e.footprint&&!r.find((t=>t.footprint===e.footprint))}}getHeightAtTileCoord(t,e){const r=this.getNodesInfo(),n=[];for(let i=0;i<this.nodesInfo.length;i++){const o=r[i],s=o.node.meshes[0];if(t<s.aabb.min[0]||e<s.aabb.min[1]||t>s.aabb.max[0]||e>s.aabb.max[1])continue;const a=(t-s.aabb.min[0])/(s.aabb.max[0]-s.aabb.min[0])*Ok|0,l=(e-s.aabb.min[1])/(s.aabb.max[1]-s.aabb.min[1])*Ok|0,c=Math.min(Ok-1,l)*Ok+Math.min(Ok-1,a);if(!(s.heightmap[c]<0&&o.node.footprint)){if(o.hiddenByReplacement)return;return{height:s.heightmap[c],maxHeight:o.feature.properties.height,hidden:!1,verticalScale:o.evaluatedScale[2]}}if(o.node.footprint.grid.query(new b(t,e),new b(t,e),n),n.length>0)return{height:void 0,maxHeight:o.feature.properties.height,hidden:o.hiddenByReplacement,verticalScale:o.evaluatedScale[2]}}}}function Yk(t,e){return!t.isLightConstant&&e}function Kk(t){const e=D(t,0,2);return Math.min(Math.round(.5*e*255),255)}function Jk(t,e,r,n,i,o,s,a){let l=(61440&e|(61440&e)>>4)>>8,c=(3840&e|(3840&e)>>4)>>4,u=240&e|(240&e)>>4;r[3]>0&&(l=Co(l,255*r[0],r[3]),c=Co(c,255*r[1],r[3]),u=Co(u,255*r[2],r[3]));const h=l<<8|c,f=u<<8|Math.floor(255*n[3]),d=Kk(n[2])<<8|15*n[0]<<4|15*n[1],p=D(i[0],0,1),m=D(i[1],0,1),g=D(i[2],0,1),y=D(i[3],0,1);let _,v,b,x;if(p!==m&&s!==o&&m!==p){const t=s-o;v=1/(t*(m-p)),b=-(o+t*p)/(t*(m-p));const e=D(i[4],-1,1);x=Math.pow(10,e),_=255*g<<8|255*y}else _=65535,v=0,b=1,x=1;if(t.emplaceBack(h,f,d,_,v,b,x),a){const t=a.length;a.clear();for(let e=0;e<t;e++)a.emplaceBack(h,f,d,_,v,b,x)}}function Qk(t,e){const r=t.node;let n=0;for(const i of r.meshes){if(r.lights&&r.lightMeshIndex===n)continue;if(!i.featureData)continue;i.featureArray=new Tu,i.featureArray.reserve(i.featureData.length);let o=e;for(const e of i.featureData){let n;const s=65535&e,a=(15&s)<8?15&s:0,l=e>>16&65535,c=t.evaluatedRMEA[a],u=t.evaluatedColor[a],h=t.emissionHeightBasedParams[a];if(o&&a===Hk.door&&r.lights&&(n=new Tu,n.resize(10*r.lights.length)),Jk(i.featureArray,l,u,c,h,i.aabb.min[2],i.aabb.max[2],n),n&&o){o=!1;const t=r.meshes[r.lightMeshIndex];t.featureArray=n,t.featureArray._trim()}}i.featureArray._trim(),n++}}Vl(Xk,"Tiled3dModelBucket",{omit:["layers"]}),Vl(Zk,"Tiled3dModelFeature");class tI{constructor(){this._updateTime=0,this._sourceIds=[],this._activeRegions=[],this._prevRegions=[]}clear(){this._activeRegions.length>0&&++this._updateTime,this._activeRegions=[],this._prevRegions=[]}get updateTime(){return this._updateTime}getReplacementRegionsForTile(t){const e=oI(new b(0,0),new b(Li,Li),t),r=[];for(const n of this._activeRegions){if(n.hiddenByOverlap)continue;if(!nI(e,n))continue;const i=sI(n.min,n.max,t);r.push({min:i.min,max:i.max,sourceId:this._sourceIds[n.priority],footprint:n.footprint,footprintTileId:n.tileId})}return r}setSources(t){this._setSources(t.map((t=>({getSourceId:()=>t.cache.id,getFootprints:()=>{const e=[];for(const r of t.cache.getVisibleCoordinates()){const n=t.cache.getTile(r).buckets[t.layer];if(n)for(const t of n.getNodesInfo()){const n=t.node;n.footprint&&e.push({footprint:n.footprint,id:r.toUnwrapped()})}}return e}}))))}_addSource(t){const e=t.getFootprints();if(0!==e.length){for(const t of e){if(!t.footprint)continue;const e=oI(t.footprint.min,t.footprint.max,t.id);this._activeRegions.push({min:e.min,max:e.max,hiddenByOverlap:!1,priority:this._sourceIds.length,tileId:t.id,footprint:t.footprint})}this._sourceIds.push(t.getSourceId())}}_computeReplacement(){this._activeRegions.sort(((t,e)=>t.priority-e.priority||eI(t.min,e.min)||eI(t.max,e.max)));let t=this._activeRegions.length!==this._prevRegions.length;if(!t){let e=0,r=0;for(;!t&&e!==this._activeRegions.length;){const n=this._activeRegions[e],i=this._prevRegions[r];t=n.priority!==i.priority||!rI(n,i),++e,++r}}if(t){++this._updateTime;const t=t=>{const e=this._activeRegions;if(t>=e.length)return t;const r=e[t].priority;for(;t<e.length&&e[t].priority===r;)++t;return t};if(this._sourceIds.length>1){let e=0,r=t(e);for(;e!==r;){let n=e;const i=e;for(;n!==r;){const t=this._activeRegions[n];t.hiddenByOverlap=!1;for(let e=0;e<i;e++){const r=this._activeRegions[e];if(!r.hiddenByOverlap&&nI(t,r)&&(t.hiddenByOverlap=lI(t.footprint,t.tileId,r.footprint,r.tileId),t.hiddenByOverlap))break}++n}e=r,r=t(e)}}}}_setSources(t){[this._prevRegions,this._activeRegions]=[this._activeRegions,[]],this._sourceIds=[];for(let e=t.length-1;e>=0;e--)this._addSource(t[e]);this._computeReplacement()}}function eI(t,e){return t.x-e.x||t.y-e.y}function rI(t,e){return 0===eI(t.min,e.min)&&0===eI(t.max,e.max)}function nI(t,e){return!(t.min.x>e.max.x||t.max.x<e.min.x||t.min.y>e.max.y||t.max.y<e.min.y)}function iI(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;
2r++)if(t[r].sourceId!==e[r].sourceId||!rI(t[r],e[r]))return!1;return!0}function oI(t,e,r){const n=1/Li,i=1/(1<<r.canonical.z),o=(t.x*n+r.canonical.x)*i+r.wrap,s=(e.x*n+r.canonical.x)*i+r.wrap,a=(t.y*n+r.canonical.y)*i,l=(e.y*n+r.canonical.y)*i;return{min:new b(o,a),max:new b(s,l)}}function sI(t,e,r){const n=1<<r.canonical.z,i=((t.x-r.wrap)*n-r.canonical.x)*Li,o=((e.x-r.wrap)*n-r.canonical.x)*Li,s=(t.y*n-r.canonical.y)*Li,a=(e.y*n-r.canonical.y)*Li;return{min:new b(i,s),max:new b(o,a)}}function aI(t,e,r,n,i,o,s){const a=t.indices,l=t.vertices,c=[];for(let u=n;u<n+i;u+=3){const n=e[r[u+0]+o],i=e[r[u+1]+o],h=e[r[u+2]+o],f=Math.min(n.x,i.x,h.x),d=Math.max(n.x,i.x,h.x),p=Math.min(n.y,i.y,h.y),m=Math.max(n.y,i.y,h.y);c.length=0,t.grid.query(new b(f,p),new b(d,m),c);for(let t=0;t<c.length;t++){const e=c[t];if(Kx(l[a[3*e+0]],l[a[3*e+1]],l[a[3*e+2]],n,i,h,s))return!0}}return!1}function lI(t,e,r,n){if(!t||!r)return!1;let i=t.vertices;if(!e.canonical.equals(n.canonical)||e.wrap!==n.wrap){if(r.vertices.length<t.vertices.length)return lI(r,n,t,e);const o=e.canonical,s=n.canonical,a=Math.pow(2,s.z-o.z);i=t.vertices.map((t=>{const e=t.x*o.x*Li*a-s.x*Li,r=t.y*o.y*Li*a-s.y*Li;return new b(e,r)}))}return aI(r,i,t.indices,0,t.indices.length,0,0)}const cI=WE.types,uI=500,hI=["fill-extrusion-base","fill-extrusion-height","fill-extrusion-color","fill-extrusion-pattern","fill-extrusion-flood-light-wall-radius"],fI=["fill-extrusion-flood-light-ground-radius"],dI=Math.pow(2,13),pI=4,mI=Math.pow(2,15)-1,gI=4,yI=2,_I=4,vI=new b(0,1),bI=2147483648,xI=7,wI=450;function EI(t,e,r,n,i,o,s,a){t.emplaceBack((e<<1)+s,(r<<1)+o,(Math.floor(n*dI)<<1)+i,Math.round(a))}function SI(t,e,r,n,i,o){t.emplaceBack(e.x,e.y,(r.x<<1)+n,(r.y<<1)+i,o)}function TI(t,e,r){const n=16384;t.emplaceBack(e.x,e.y,e.z,r[0]*n,r[1]*n,r[2]*n)}class AI{constructor(){this.vertexOffset=0,this.vertexCount=0,this.indexOffset=0,this.indexCount=0}}class OI{constructor(){this.centroidXY=new b(0,0),this.vertexArrayOffset=0,this.vertexCount=0,this.groundVertexArrayOffset=0,this.groundVertexCount=0,this.flags=0,this.footprintSegIdx=-1,this.footprintSegLen=0,this.polygonSegIdx=-1,this.polygonSegLen=0,this.min=new b(Number.MAX_VALUE,Number.MAX_VALUE),this.max=new b(-Number.MAX_VALUE,-Number.MAX_VALUE),this.height=0}span(){return new b(this.max.x-this.min.x,this.max.y-this.min.y)}}class CI{constructor(){this.acc=new b(0,0),this.accCount=0,this.centroidDataIndex=0}startRing(t,e){t.min.x===Number.MAX_VALUE&&(t.min.x=t.max.x=e.x,t.min.y=t.max.y=e.y)}appendEdge(t,e,r){this.accCount++,this.acc._add(e);let n=!!this.borders;e.x<t.min.x?(t.min.x=e.x,n=!0):e.x>t.max.x&&(t.max.x=e.x,n=!0),e.y<t.min.y?(t.min.y=e.y,n=!0):e.y>t.max.y&&(t.max.y=e.y,n=!0),((0===e.x||e.x===Li)&&e.x===r.x)!=((0===e.y||e.y===Li)&&e.y===r.y)&&this.processBorderOverlap(e,r),n&&this.checkBorderIntersection(e,r)}checkBorderIntersection(t,e){e.x<0!=t.x<0&&this.addBorderIntersection(0,Co(e.y,t.y,(0-e.x)/(t.x-e.x))),e.x>Li!=t.x>Li&&this.addBorderIntersection(1,Co(e.y,t.y,(Li-e.x)/(t.x-e.x))),e.y<0!=t.y<0&&this.addBorderIntersection(2,Co(e.x,t.x,(0-e.y)/(t.y-e.y))),e.y>Li!=t.y>Li&&this.addBorderIntersection(3,Co(e.x,t.x,(Li-e.y)/(t.y-e.y)))}addBorderIntersection(t,e){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const r=this.borders[t];e<r[0]&&(r[0]=e),e>r[1]&&(r[1]=e)}processBorderOverlap(t,e){if(t.x===e.x){if(t.y===e.y)return;const r=0===t.x?0:1;this.addBorderIntersection(r,e.y),this.addBorderIntersection(r,t.y)}else{const r=0===t.y?2:3;this.addBorderIntersection(r,e.x),this.addBorderIntersection(r,t.x)}}centroid(){return 0===this.accCount?new b(0,0):new b(Math.floor(Math.max(0,this.acc.x)/this.accCount),Math.floor(Math.max(0,this.acc.y)/this.accCount))}intersectsCount(){return this.borders?this.borders.reduce(((t,e)=>t+ +(e[0]!==Number.MAX_VALUE)),0):0}}function MI(t,e){return t.x*e.y-t.y*e.x<0?-1:1}function kI(t){return Math.min(pI,Math.max(-pI,Math.tan(t)))/pI*mI}function II(t,e){const r=t.add(e)._unit(),n=D(t.x*r.x+t.y*r.y,-1,1);return kI(Math.acos(n))*MI(t,e)}const PI=[t=>t.x<0,t=>t.x>Li,t=>t.y<0,t=>t.y>Li];function LI(t,e,r,n){const i=[4];if(0===n)return i;r._mult(n);const o=t.sub(r),s=e.sub(r),a=[t,e,o,s];for(let t=0;t<_I;
2t++)for(const e of a)if(PI[t](e)){i.push(t);break}return i}class RI{constructor(t){this.vertexArray=new tu,this.indexArray=new pu;const e=t=>fI.includes(t);this.programConfigurations=new xh(t.layers,t.zoom,e),this._segments=new Nu,this.hiddenByLandmarkVertexArray=new Au,this._segmentToGroundQuads={},this._segmentToGroundQuads[0]=[],this._segmentToRegionTriCounts={},this._segmentToRegionTriCounts[0]=[0,0,0,0,0],this.regionSegments={},this.regionSegments[4]=new Nu}getDefaultSegment(){return this.regionSegments[4]}hasData(){return 0!==this.vertexArray.length}addData(t,e,r,n=!1){const i=t.length;if(i>2){let o=Math.max(0,this._segments.get().length-1);const s=4*i,a=this.vertexArray.length,l=this._segmentToGroundQuads[o].length*yI,c=this._segments._prepareSegment(s,a,l);let u;o!==this._segments.get().length-1&&(o++,this._segmentToGroundQuads[o]=[],this._segmentToRegionTriCounts[o]=[0,0,0,0,0]);{const e=t[i-1],r=t[0],n=t[1];u=II(r.sub(e)._perp()._unit(),n.sub(r)._perp()._unit())}for(let s=0;s<i;s++){const a=s===i-1?0:s+1,l=a===i-1?0:a+1,h=t[s],f=t[a],d=t[l],p=f.sub(h)._perp()._unit(),m=II(p,d.sub(f)._perp()._unit()),g=u,y=m;if(FI(h,f,e)||n&&NI(h,e)&&NI(f,e)){u=m;continue}const _=c.vertexLength;SI(this.vertexArray,h,f,1,1,g),SI(this.vertexArray,h,f,1,0,g),SI(this.vertexArray,h,f,0,1,y),SI(this.vertexArray,h,f,0,0,y),c.vertexLength+=gI;const v=LI(h,f,p,r);for(const t of v)this._segmentToGroundQuads[o].push({id:_,region:t}),this._segmentToRegionTriCounts[o][t]+=yI,c.primitiveLength+=yI;u=m}}}prepareBorderSegments(){if(!this.hasData())return;const t=this._segments.get(),e=t.length;for(let t=0;t<e;t++)this._segmentToGroundQuads[t].sort(((t,e)=>t.region-e.region));for(let r=0;r<e;r++){const e=this._segmentToGroundQuads[r],n=t[r],i=this._segmentToRegionTriCounts[r];i.reduce(((t,e)=>t+e),0);let o=0;for(let t=0;t<=_I;t++){const e=i[t];if(0!==e){let r=this.regionSegments[t];r||(r=this.regionSegments[t]=new Nu);const i={vertexOffset:n.vertexOffset,primitiveOffset:n.primitiveOffset+o,vertexLength:n.vertexLength,primitiveLength:e};r.get().push(i)}o+=e}for(let t=0;t<e.length;t++){const r=e[t].id;this.indexArray.emplaceBack(r,r+1,r+3),this.indexArray.emplaceBack(r,r+3,r+2)}}this._segmentToGroundQuads=null,this._segmentToRegionTriCounts=null,this._segments.destroy(),this._segments=null}addPaintPropertiesData(t,e,r,n,i,o){this.hasData()&&this.programConfigurations.populatePaintArrays(this.vertexArray.length,t,e,r,n,i,o)}upload(t){this.hasData()&&(this.vertexBuffer=t.createVertexBuffer(this.vertexArray,wE.members),this.indexBuffer=t.createIndexBuffer(this.indexArray))}uploadPaintProperties(t){this.hasData()&&this.programConfigurations.upload(t)}update(t,e,r,n,i,o){this.hasData()&&this.programConfigurations.updatePaintArrays(t,e,r,n,i,o)}updateHiddenByLandmark(t){if(!this.hasData())return;const e=t.groundVertexArrayOffset,r=t.groundVertexCount+t.groundVertexArrayOffset;if(0===t.groundVertexCount)return;const n=t.flags&bI?1:0;for(let t=e;t<r;++t)this.hiddenByLandmarkVertexArray.emplace(t,n);this._needsHiddenByLandmarkUpdate=!0}uploadHiddenByLandmark(t){this.hasData()&&this._needsHiddenByLandmarkUpdate&&(!this.hiddenByLandmarkVertexBuffer&&this.hiddenByLandmarkVertexArray.length>0?this.hiddenByLandmarkVertexBuffer=t.createVertexBuffer(this.hiddenByLandmarkVertexArray,SE.members,!0):this.hiddenByLandmarkVertexBuffer&&this.hiddenByLandmarkVertexBuffer.updateData(this.hiddenByLandmarkVertexArray),this._needsHiddenByLandmarkUpdate=!1)}destroy(){if(this.vertexBuffer){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.hiddenByLandmarkVertexBuffer&&this.hiddenByLandmarkVertexBuffer.destroy(),this._segments&&this._segments.destroy(),this.programConfigurations.destroy();for(let t=0;t<=_I;t++){const e=this.regionSegments[t];e&&e.destroy()}}}}class DI{constructor(t){this.zoom=t.zoom,this.canonical=t.canonical,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.fqid)),this.index=t.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=t.projection,this.activeReplacements=[],this.replacementUpdateTime=0,this.centroidData=[],this.footprintIndices=new pu,this.footprintVertices=new Kc,this.footprintSegments=[],this.layoutVertexArray=new Qc,this.centroidVertexArray=new Bu,this.indexArray=new pu;const e=t=>hI.includes(t);this.programConfigurations=new xh(t.layers,t.zoom,e),this.segments=new Nu,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.groundEffect=new RI(t),this.maxHeight=0,this.partLookup={},this.triangleSubSegments=[],this.polygonSegments=[]}populate(t,e,r,n){this.features=[],this.hasPattern=pE("fill-extrusion",this.layers,e),this.featuresOnBorder=[],this.borderFeatureIndices=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=xx(r),this.edgeRadius=this.layers[0].layout.get("fill-extrusion-edge-radius")/this.tileToMeter;for(const{feature:i,id:o,index:s,sourceLayerIndex:a}of t){const t=this.layers[0]._featureFilter.needGeometry,l=Lx(i,t);if(!this.layers[0]._featureFilter.filter(new bc(this.zoom),l,r))continue;const c={id:o,sourceLayerIndex:a,index:s,geometry:t?l.geometry:Px(i,r,n),properties:i.properties,type:i.type,patterns:{}},u=this.layoutVertexArray.length;this.hasPattern?this.features.push(mE("fill-extrusion",this.layers,c,this.zoom,e)):this.addFeature(c,c.geometry,s,r,{},e.availableImages,n,e.brightness),e.featureIndex.insert(i,c.geometry,s,a,this.index,u)}this.sortBorders(),"mercator"===this.projection.name&&this.splitToSubtiles(),this.groundEffect.prepareBorderSegments(),this.polygonSegments.length=0}addFeatures(t,e,r,n,i,o){for(const t of this.features){const{geometry:s}=t;this.addFeature(t,s,t.index,e,r,n,i,o)}this.sortBorders(),"mercator"===this.projection.name&&this.splitToSubtiles()}update(t,e,r,n,i){const o=0!==Object.keys(t).length;if(o&&!this.stateDependentLayers.length)return;const s=o?this.stateDependentLayers:this.layers;this.programConfigurations.updatePaintArrays(t,e,s,r,n,i),this.groundEffect.update(t,e,s,r,n,i)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload||this.groundEffect.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,AE),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=t.createVertexBuffer(this.layoutVertexExtArray,TE.members,!0)),this.groundEffect.upload(t)),this.groundEffect.uploadPaintProperties(t),this.programConfigurations.upload(t),this.uploaded=!0}uploadCentroid(t){this.groundEffect.uploadHiddenByLandmark(t),this.needsCentroidUpdate&&(!this.centroidVertexBuffer&&this.centroidVertexArray.length>0?this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,EE.members,!0):this.centroidVertexBuffer&&this.centroidVertexBuffer.updateData(this.centroidVertexArray),this.needsCentroidUpdate=!1)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.centroidVertexBuffer&&this.centroidVertexBuffer.destroy(),this.layoutVertexExtBuffer&&this.layoutVertexExtBuffer.destroy(),this.groundEffect.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,r,n,i,o,s,a){const l=this.layers[0].paint.get("fill-extrusion-flood-light-ground-radius").evaluate(t,{})/this.tileToMeter,c=[new b(0,0),new b(Li,Li)],u=s.projection,h="globe"===u.name,f="Polygon"===cI[t.type],d=new CI;d.centroidDataIndex=this.centroidData.length;const p=new OI,m=this.layers[0].paint.get("fill-extrusion-base").evaluate(t,{},n)<=0,g=this.layers[0].paint.get("fill-extrusion-height").evaluate(t,{},n);p.height=g,p.vertexArrayOffset=this.layoutVertexArray.length,p.groundVertexArrayOffset=this.groundEffect.vertexArray.length,h&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new ou);const y=fE(e,uI);for(let t=y.length-1;t>=0;t--){const e=y[t];(0===e.length||$I(e[0]))&&y.splice(t,1)}let _;if(h)_=qI(y,c,n);else{_=[];for(const t of y)_.push({polygon:t,bounds:c})}const v=f?this.edgeRadius:0,x=v>0&&this.zoom<17,w=(t,e)=>{if(0===t.length)return!1;const r=t[t.length-1];return e.x===r.x&&e.y===r.y};for(const{polygon:t,bounds:e}of _){let r=0,i=0;for(const e of t)f&&!e[0].equals(e[e.length-1])&&e.push(e[0]),i+=f?e.length-1:e.length;const o=this.segments.prepareSegment((f?5:4)*i,this.layoutVertexArray,this.indexArray);p.footprintSegIdx<0&&(p.footprintSegIdx=this.footprintSegments.length),p.polygonSegIdx<0&&(p.polygonSegIdx=this.polygonSegments.length);const s={triangleArrayOffset:this.indexArray.length,triangleCount:0,triangleSegIdx:this.segments.segments.length-1},a=new AI;if(a.vertexOffset=this.footprintVertices.length,a.indexOffset=3*this.footprintIndices.length,a.ringIndices=[],f){const i=[],s=[];r=o.vertexLength;for(let r=0;r<t.length;r++){const c=t[r];c.length&&0!==r&&s.push(i.length/2);const f=[];let d,p;{const t=c[0];d=c[1].sub(t)._perp()._unit()}a.ringIndices.push(c.length-1);for(let t=1;t<c.length;t++){const e=c[t],r=c[t===c.length-1?1:t+1],s=e.clone();if(v){p=r.sub(e)._perp()._unit();const t=d.add(p)._unit(),n=d.x*t.x+d.y*t.y,i=v*Math.min(4,1/n);s.x+=i*t.x,s.y+=i*t.y,s.x=Math.round(s.x),s.y=Math.round(s.y),d=p}!m||0!==v&&!x||w(f,s)||f.push(s),EI(this.layoutVertexArray,s.x,s.y,0,0,1,1,0),o.vertexLength++,this.footprintVertices.emplaceBack(e.x,e.y),i.push(e.x,e.y),h&&TI(this.layoutVertexExtArray,u.projectTilePoint(s.x,s.y,n),u.upVector(n,s.x,s.y))}m&&(0===v||x)&&(0!==f.length&&w(f,f[0])&&f.pop(),this.groundEffect.addData(f,e,l))}const c=hE(i,s);for(let t=0;t<c.length;t+=3)this.footprintIndices.emplaceBack(a.vertexOffset+c[t+0],a.vertexOffset+c[t+1],a.vertexOffset+c[t+2]),this.indexArray.emplaceBack(r+c[t],r+c[t+2],r+c[t+1]),o.primitiveLength++;a.indexCount+=c.length,a.vertexCount+=this.footprintVertices.length-a.vertexOffset}for(let i=0;i<t.length;i++){const s=t[i];d.startRing(p,s[0]);let a=s.length>4&&UI(s[s.length-2],s[0],s[1]),c=v?BI(s[s.length-2],s[0],s[1],v):0;const g=[];let y,_,b;{const t=s[0];_=s[1].sub(t)._perp()._unit()}let x=!0;for(let t=1,i=0;t<s.length;t++){let l=s[t-1],f=s[t];const E=s[t===s.length-1?1:t+1];if(d.appendEdge(p,f,l),FI(f,l,e)){v&&(_=E.sub(f)._perp()._unit(),x=!x);continue}const S=f.sub(l)._perp(),T=S.x/(Math.abs(S.x)+Math.abs(S.y)),A=S.y>0?1:0,O=l.dist(f);if(i+O>32768&&(i=0),v){b=E.sub(f)._perp()._unit();let t=jI(l,f,E,zI(_,b),v);isNaN(t)&&(t=0);const e=f.sub(l)._unit();l=l.add(e.mult(c))._round(),f=f.add(e.mult(-t))._round(),c=t,_=b,m&&this.zoom>=17&&(w(g,l)||g.push(l),w(g,f)||g.push(f))}const C=o.vertexLength,M=s.length>4&&UI(l,f,E);let k=VI(i,a,x);if(EI(this.layoutVertexArray,l.x,l.y,T,A,0,0,k),EI(this.layoutVertexArray,l.x,l.y,T,A,0,1,k),i+=O,k=VI(i,M,!x
2),a=M,EI(this.layoutVertexArray,f.x,f.y,T,A,0,0,k),EI(this.layoutVertexArray,f.x,f.y,T,A,0,1,k),o.vertexLength+=4,this.indexArray.emplaceBack(C+0,C+1,C+2),this.indexArray.emplaceBack(C+1,C+3,C+2),o.primitiveLength+=2,v){const n=r+(1===t?s.length-2:t-2),i=1===t?r:n+1;if(this.indexArray.emplaceBack(C+1,n,C+3),this.indexArray.emplaceBack(n,i,C+3),o.primitiveLength+=2,void 0===y&&(y=C),!FI(E,s[t],e)){const e=t===s.length-1?y:o.vertexLength;this.indexArray.emplaceBack(C+2,C+3,e),this.indexArray.emplaceBack(C+3,e+1,e),this.indexArray.emplaceBack(C+3,i,e+1),o.primitiveLength+=3}x=!x}if(h){const t=this.layoutVertexExtArray,e=u.projectTilePoint(l.x,l.y,n),r=u.projectTilePoint(f.x,f.y,n),i=u.upVector(n,l.x,l.y),o=u.upVector(n,f.x,f.y);TI(t,e,i),TI(t,e,i),TI(t,r,o),TI(t,r,o)}}f&&(r+=s.length-1),m&&v&&this.zoom>=17&&(0!==g.length&&w(g,g[0])&&g.pop(),this.groundEffect.addData(g,e,l,v>0))}this.footprintSegments.push(a),s.triangleCount=this.indexArray.length-s.triangleArrayOffset,this.polygonSegments.push(s),++p.footprintSegLen,++p.polygonSegLen}if(p.vertexCount=this.layoutVertexArray.length-p.vertexArrayOffset,p.groundVertexCount=this.groundEffect.vertexArray.length-p.groundVertexArrayOffset,0!==p.vertexCount){if(p.centroidXY=d.borders?vI:this.encodeCentroid(d,p),this.centroidData.push(p),d.borders){this.featuresOnBorder.push(d);const t=this.featuresOnBorder.length-1;for(let e=0;e<d.borders.length;e++)d.borders[e][0]!==Number.MAX_VALUE&&this.borderFeatureIndices[e].push(t)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,o,n,a),this.groundEffect.addPaintPropertiesData(t,r,i,o,n,a),this.maxHeight=Math.max(this.maxHeight,g)}}sortBorders(){for(let t=0;t<this.borderFeatureIndices.length;t++)this.borderFeatureIndices[t].sort(((e,r)=>this.featuresOnBorder[e].borders[t][0]-this.featuresOnBorder[r].borders[t][0]))}splitToSubtiles(){const t=[];for(let e=0;e<this.centroidData.length;e++){const r=this.centroidData[e],n=+(r.min.x+r.max.x>Li),i=+(r.min.y+r.max.y>Li),o=2*i+(n^i);for(let n=0;n<r.polygonSegLen;n++){const i=r.polygonSegIdx+n;t.push({centroidIdx:e,subtile:o,polygonSegmentIdx:i,triangleSegmentIdx:this.polygonSegments[i].triangleSegIdx})}}const e=new pu;t.sort(((t,e)=>t.triangleSegmentIdx===e.triangleSegmentIdx?t.subtile-e.subtile:t.triangleSegmentIdx-e.triangleSegmentIdx));let r=0,n=0,i=0;for(const e of t){if(e.triangleSegmentIdx!==r)break;i++}const o=t.length;for(;n!==t.length;){r=t[n].triangleSegmentIdx;let s=0,a=n,l=n;for(let e=a;e<i&&t[e].subtile===s;e++)l++;for(;a!==i;){const n=t[a];s=n.subtile;const o=this.centroidData[n.centroidIdx].min.clone(),c=this.centroidData[n.centroidIdx].max.clone(),u={vertexOffset:this.segments.segments[r].vertexOffset,primitiveOffset:e.length,vertexLength:this.segments.segments[r].vertexLength,primitiveLength:0,sortKey:void 0,vaos:{}};for(let r=a;r<l;r++){const n=t[r],i=this.polygonSegments[n.polygonSegmentIdx],s=this.centroidData[n.centroidIdx].min,a=this.centroidData[n.centroidIdx].max,l=this.indexArray.uint16;for(let t=i.triangleArrayOffset;t<i.triangleArrayOffset+i.triangleCount;t++)e.emplaceBack(l[3*t],l[3*t+1],l[3*t+2]);u.primitiveLength+=i.triangleCount,o.x=Math.min(o.x,s.x),o.y=Math.min(o.y,s.y),c.x=Math.max(c.x,a.x),c.y=Math.max(c.y,a.y)}u.primitiveLength>0&&this.triangleSubSegments.push({segment:u,min:o,max:c}),a=l;for(let e=a;e<i&&t[e].subtile===t[a].subtile;e++)l++}n=i;for(let e=n;e<o&&t[e].triangleSegmentIdx===t[n].triangleSegmentIdx;e++)i++}e._trim(),this.indexArray=e}getVisibleSegments(t,e,r){let n=0,i=0;const o=1<<t.canonical.z;if(e){const r=e.getMinMaxForTile(t);r&&(n=r.min,i=r.max)}i+=this.maxHeight;const s=t.toUnwrapped();let a;const l=[s.canonical.x/o+s.wrap,s.canonical.y/o],c=[(s.canonical.x+1)/o+s.wrap,(s.canonical.y+1)/o],u=new Nu,h=(t,e,r)=>[t[0]*(1-r[0])+e[0]*r[0],t[1]*(1-r[1])+e[1]*r[1]],f=[],d=[];for(const t of this.triangleSubSegments){f[0]=t.min.x/Li,f[1]=t.min.y/Li,d[0]=t.max.x/Li,d[1]=t.max.y/Li;const e=h(l,c,f),o=h(l,c,d);if(0===new nb([e[0],e[1],n],[o[0],o[1],i]).intersectsPrecise(r)){a&&(u.segments.push(a),a=void 0);continue}const s=t.segment;a&&a.vertexOffset!==s.vertexOffset&&(u.segments.push(a),a=void 0),a?(a.vertexLength+=s.vertexLength,a.primitiveLength+=s.primitiveLength):a={vertexOffset:s.vertexOffset,primitiveLength:s.primitiveLength,vertexLength:s.vertexLength,primitiveOffset:s.primitiveOffset,sortKey:void 0,vaos:{}}}return a&&u.segments.push(a),u}encodeCentroid(t,e){const r=t.centroid(),n=e.span(),i=Math.min(7,Math.round(n.x*this.tileToMeter/10)),o=Math.min(7,Math.round(n.y*this.tileToMeter/10));return new b(D(r.x,1,Li-1)<<3|i,D(r.y,1,Li-1)<<3|o)}showCentroid(t){const e=this.centroidData[t.centroidDataIndex];e.flags&=bI,e.centroidXY.x=0,e.centroidXY.y=0,this.writeCentroidToBuffer(e)}writeCentroidToBuffer(t){this.groundEffect.updateHiddenByLandmark(t);const e=t.vertexArrayOffset,r=t.vertexCount+t.vertexArrayOffset,n=t.flags&bI?vI:t.centroidXY,i=this.centroidVertexArray.geta_centroid_pos0(e);if(this.centroidVertexArray.geta_centroid_pos1(e)!==n.y||i!==n.x){for(let t=e;t<r;++t)this.centroidVertexArray.emplace(t,n.x,n.y);this.needsCentroidUpdate=!0}}createCentroidsBuffer(){this.centroidVertexArray.resize(this.layoutVertexArray.length),this.groundEffect.hiddenByLandmarkVertexArray.resize(this.groundEffect.vertexArray.length);for(const t of this.centroidData)this.writeCentroidToBuffer(t)}updateReplacement(t,e){if(e.updateTime===this.replacementUpdateTime)return;this.replacementUpdateTime=e.updateTime;const r=e.getReplacementRegionsForTile(t.toUnwrapped());if(iI(this.activeReplacements,r))return;if(this.activeReplacements=r,0===this.centroidVertexArray.length)this.createCentroidsBuffer();else for(const t of this.centroidData)t.flags&=~bI;const n=[];for(const e of this.activeReplacements){const r=Math.pow(2,e.footprintTileId.canonical.z-t.canonical.z);for(const i of this.centroidData)if(!(i.flags&bI||e.min.x>i.max.x||i.min.x>e.max.x||e.min.y>i.max.y||i.min.y>e.max.y))for(let o=0;o<i.footprintSegLen;o++){const s=this.footprintSegments[i.footprintSegIdx+o];if(n.length=0,HI(this.footprintVertices,s.vertexOffset,s.vertexCount,e.footprintTileId.canonical,t.canonical,n),aI(e.footprint,n,this.footprintIndices.uint16,s.indexOffset,s.indexCount,-s.vertexOffset,
2-r)){i.flags|=bI;break}}}for(const t of this.centroidData)this.writeCentroidToBuffer(t);this.borderDoneWithNeighborZ=[-1,-1,-1,-1]}footprintContainsPoint(t,e,r){let n=!1;for(let i=0;i<r.footprintSegLen;i++){const o=this.footprintSegments[r.footprintSegIdx+i];let s=0;for(const r of o.ringIndices){for(let i=s,a=r+s-1;i<r+s;a=i++){const r=this.footprintVertices.int16[2*(i+o.vertexOffset)+0],s=this.footprintVertices.int16[2*(i+o.vertexOffset)+1],l=this.footprintVertices.int16[2*(a+o.vertexOffset)+0],c=this.footprintVertices.int16[2*(a+o.vertexOffset)+1];s>e!=c>e&&t<(l-r)*(e-s)/(c-s)+r&&(n=!n)}s=r}}return n}getHeightAtTileCoord(t,e){let r=Number.NEGATIVE_INFINITY,n=!0;const i=4*(t+Li)*Li+(e+Li);if(this.partLookup.hasOwnProperty(i)){const t=this.partLookup[i];return t?{height:t.height,hidden:!!(t.flags&bI)}:void 0}for(const o of this.centroidData)t>o.max.x||o.min.x>t||e>o.max.y||o.min.y>e||this.footprintContainsPoint(t,e,o)&&o&&o.height>r&&(r=o.height,this.partLookup[i]=o,n=!!(o.flags&bI));if(r!==Number.NEGATIVE_INFINITY)return{height:r,hidden:n};this.partLookup[i]=void 0}}function zI(t,e){const r=t.add(e)._unit();return t.x*r.x+t.y*r.y}function BI(t,e,r,n){const i=e.sub(t)._perp()._unit(),o=r.sub(e)._perp()._unit();return jI(t,e,r,zI(i,o),n)}function jI(t,e,r,n,i){const o=Math.sqrt(1-n*n);return Math.min(t.dist(e)/3,e.dist(r)/3,i*o/n)}function FI(t,e,r){return t.x<r[0].x&&e.x<r[0].x||t.x>r[1].x&&e.x>r[1].x||t.y<r[0].y&&e.y<r[0].y||t.y>r[1].y&&e.y>r[1].y}function NI(t,e){return t.x<e[0].x||t.x>e[1].x||t.y<e[0].y||t.y>e[1].y}function $I(t){return t.every((t=>t.x<=0))||t.every((t=>t.x>=Li))||t.every((t=>t.y<=0))||t.every((t=>t.y>=Li))}function UI(t,e,r){if(t.x<0||t.x>=Li||e.x<0||e.x>=Li||r.x<0||r.x>=Li)return!1;const n=r.sub(e),i=n.perp(),o=t.sub(e),s=(n.x*o.x+n.y*o.y)/Math.sqrt((n.x*n.x+n.y*n.y)*(o.x*o.x+o.y*o.y)),a=i.x*o.x+i.y*o.y;return s>-.866&&a<0}function VI(t,e,r){const n=e?2|t:-3&t;return r?1|n:-2&n}function GI(){const t=Math.PI/32,e=Math.tan(t),r=ix;return r*Math.sqrt(1+2*e*e)-r}function qI(t,e,r){const n=11.25,i=1<<r.z,o=px(r.x/i),s=px((r.x+1)/i),a=mx(r.y/i),l=mx((r.y+1)/i),c=(t,e,n)=>{if(0===t)return.5*(e+n);{const t=mx((r.y+e/Li)/i);return(fx(.5*(mx((r.y+n/Li)/i)+t))*i-r.y)*Li}};return XE(t,e,Math.ceil((s-o)/n),Math.ceil((a-l)/n),1,c)}function HI(t,e,r,n,i,o){const s=Math.pow(2,n.z-i.z);for(let a=0;a<r;a++){let r=t.int16[2*(a+e)+0],l=t.int16[2*(a+e)+1];r=(r+i.x*Li)*s-n.x*Li,l=(l+i.y*Li)*s-n.y*Li,o.push(new b(r,l))}}Vl(DI,"FillExtrusionBucket",{omit:["layers","features"]}),Vl(OI,"PartData"),Vl(AI,"FootprintSegment"),Vl(CI,"BorderCentroidData"),Vl(RI,"GroundEffect");const WI=new Rc({visibility:new Mc(jr["layout_fill-extrusion"].visibility),"fill-extrusion-edge-radius":new Mc(jr["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var ZI={paint:new Rc({"fill-extrusion-opacity":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new kc(jr["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new kc(jr["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new kc(jr["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new kc(jr["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"]),"fill-extrusion-ambient-occlusion-wall-radius":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-wall-radius"]),"fill-extrusion-ambient-occlusion-ground-radius":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-ground-radius"]),"fill-extrusion-ambient-occlusion-ground-attenuation":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-ground-attenuation"]),"fill-extrusion-flood-light-color":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-flood-light-color"]),"fill-extrusion-flood-light-intensity":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-flood-light-intensity"]),"fill-extrusion-flood-light-wall-radius":new kc(jr["paint_fill-extrusion"]["fill-extrusion-flood-light-wall-radius"]),"fill-extrusion-flood-light-ground-radius":new kc(jr["paint_fill-extrusion"]["fill-extrusion-flood-light-ground-radius"]),"fill-extrusion-flood-light-ground-attenuation":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-flood-light-ground-attenuation"]),"fill-extrusion-vertical-scale":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-vertical-scale"]),"fill-extrusion-rounded-roof":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-rounded-roof"]),"fill-extrusion-cutoff-fade-range":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-cutoff-fade-range"]),"fill-extrusion-emissive-strength":new Mc(jr["paint_fill-extrusion"]["fill-extrusion-emissive-strength"])}),layout:WI};class XI extends b{constructor(t,e,r){super(t,e),this.z=r}}class YI extends $c{constructor(t,e){super(t,ZI,e),this._stats={numRenderedVerticesInShadowPass:0,numRenderedVerticesInTransparentPass:0}}createBucket(t){return new DI(t)}queryRadius(){return Qx(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}hasShadowPass(){return!0}cutoffRange(){return this.paint.get("fill-extrusion-cutoff-fade-range")}canCastShadows(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}queryIntersectsFeature(t,e,r,n,i,o,s,a,l){const c=ew(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),u=this.paint.get("fill-extrusion-height").evaluate(e,r),h=this.paint.get("fill-extrusion-base").evaluate(e,r),f=[0,0],d=a&&o.elevation,p=o.elevation?o.elevation.exaggeration():1,m=t.tile.getBucket(this);if(d&&m instanceof DI){const t=m.centroidVertexArray,e=l+1;e<t.length&&(f[0]=t.geta_centroid_pos0(e),f[1]=t.geta_centroid_pos1(e))}if(0===f[0]&&1===f[1])return!1;"globe"===o.projection.name&&(n=qI([n],[new b(0,0),new b(Li,Li)],t.tileID.canonical).map((t=>t.polygon)).flat());const g=d?a:null,[y,_]=tP(o,n,h,u,c,s,g,f,p,o.center.lat,t.tileID.canonical),v=t.queryGeometry;return QI(y,_,v.isPointQuery()?v.screenBounds:v.screenGeometry)}}function KI(t,e){return t.x*e.x+t.y*e.y}function JI(t,e){if(1===t.length){let r=0;const n=e[r++];let i;for(;!i||n.equals(i);)if(i=e[r++],!i)return 1/0;for(;r<e.length;r++){const o=e[r],s=t[0],a=i.sub(n),l=o.sub(n),c=s.sub(n),u=KI(a,a),h=KI(a,l),f=KI(l,l),d=KI(c,a),p=KI(c,l),m=u*f-h*h,g=(f*d-h*p)/m,y=(u*p-h*d)/m,_=1-g-y,v=n.z*_+i.z*g+o.z*y;if(isFinite(v))return v}return 1/0}{let t=1/0;for(const r of e)t=Math.min(t,r.z);return t}}function QI(t,e,r){let n=1/0;Fx(r,e)&&(n=JI(r,e[0]));for(let i=0;i<e.length;i++){const o=e[i],s=t[i];for(let t=0;t<o.length-1;t++){const e=o[t],i=o[t+1],a=s[t],l=[e,i,s[t+1],a,e];Bx(r,l)&&(n=Math.min(n,JI(r,l)))}}return n!==1/0&&n}function tP(t,e,r,n,i,o,s,a,l,c,u){return"globe"===t.projection.name?eP(t,e,r,n,i,o,s,a,l,c,u):s?nP(e,r,n,i,o,s,a,l,c):rP(e,r,n,i,o)}function eP(t,e,r,n,i,o,s,a,l,c,u){const h=[],f=[],d=t.projection.upVectorScale(u,t.center.lat,t.worldSize).metersToTile,p=[0,0,0,1],m=[0,0,0,1],g=(t,e,r,n)=>{t[0]=e,t[1]=r,t[2]=n,t[3]=1},y=GI();r>0&&(r+=y),n+=y;for(const y of e){const e=[],_=[];for(const h of y){const f=h.x+i.x,y=h.y+i.y,v=t.projection.projectTilePoint(f,y,u),b=t.projection.upVector(u,h.x,h.y);let x=r,w=n;if(s){const t=iP(f,y,r,n,s,a,l,c);x+=t.base,w+=t.top}0!==r?g(p,v.x+b[0]*d*x,v.y+b[1]*d*x,v.z+b[2]*d*x):g(p,v.x,v.y,v.z),g(m,v.x+b[0]*d*w,v.y+b[1]*d*w,v.z+b[2]*d*w),Sv.transformMat4(p,p,o),Sv.transformMat4(m,m,o),e.push(new XI(p[0],p[1],p[2])),_.push(new XI(m[0],m[1],m[2]))}h.push(e),f.push(_)}return[h,f]}function rP(t,e,r,n,i){const o=[],s=[],a=i[8]*e,l=i[9]*e,c=i[10]*e,u=i[11]*e,h=i[8]*r,f=i[9]*r,d=i[10]*r,p=i[11]*r;for(const e of t){const t=[],r=[];for(const o of e){const e=o.x+n.x,s=o.y+n.y,m=i[0]*e+i[4]*s+i[12],g=i[1]*e+i[5]*s+i[13],y=i[2]*e+i[6]*s+i[14],_=i[3]*e+i[7]*s+i[15],v=m+a,b=g+l,x=y+c,w=Math.max(_+u,1e-5),E=m+h,S=g+f,T=y+d,A=Math.max(_+p,1e
2-5);t.push(new XI(v/w,b/w,x/w)),r.push(new XI(E/A,S/A,T/A))}o.push(t),s.push(r)}return[o,s]}function nP(t,e,r,n,i,o,s,a,l){const c=[],u=[],h=[0,0,0,1];for(const f of t){const t=[],d=[];for(const c of f){const u=c.x+n.x,f=c.y+n.y,p=iP(u,f,e,r,o,s,a,l);h[0]=u,h[1]=f,h[2]=p.base,h[3]=1,uv.transformMat4(h,h,i),h[3]=Math.max(h[3],1e-5);const m=new XI(h[0]/h[3],h[1]/h[3],h[2]/h[3]);h[0]=u,h[1]=f,h[2]=p.top,h[3]=1,uv.transformMat4(h,h,i),h[3]=Math.max(h[3],1e-5);const g=new XI(h[0]/h[3],h[1]/h[3],h[2]/h[3]);t.push(m),d.push(g)}c.push(t),u.push(d)}return[c,u]}function iP(t,e,r,n,i,o,s,a){const l=s*i.getElevationAt(t,e,!0,!0),c=0!==o[0],u=c?0===o[1]?s*oP(o[0]):s*sP(i,o,a):l;return{base:l+(0===r)?-1:r,top:c?Math.max(u+n,l+r+2):l+n}}function oP(t){return t/xI-wI}function sP(t,e,r){const n=Math.floor(e[0]/8),i=Math.floor(e[1]/8),o=10*(e[0]-8*n),s=10*(e[1]-8*i),a=t.getElevationAt(n,i,!0,!0),l=t.getMeterToDEM(r),c=Math.floor(.5*(o*l-1)),u=Math.floor(.5*(s*l-1)),h=t.tileCoordToPixel(n,i),f=2*c+1,d=2*u+1,p=aP(t,h.x-c,h.y-u,f,d),m=Math.abs(p[0]-p[1])+Math.abs(p[2]-p[3]),g=Math.abs(p[0]-p[2])+Math.abs(p[1]-p[3]),y=Math.min(.25,.5*l*m/f),_=Math.min(.25,.5*l*g/d);return a+Math.max(y*o,_*s)}function aP(t,e,r,n,i){return[t.getElevationAtPixel(e,r,!0),t.getElevationAtPixel(e+i,r,!0),t.getElevationAtPixel(e,r+i,!0),t.getElevationAtPixel(e+n,r+i,!0)]}const lP=new Rc({"line-cap":new kc(jr.layout_line["line-cap"]),"line-join":new kc(jr.layout_line["line-join"]),"line-miter-limit":new Mc(jr.layout_line["line-miter-limit"]),"line-round-limit":new Mc(jr.layout_line["line-round-limit"]),"line-sort-key":new kc(jr.layout_line["line-sort-key"]),visibility:new Mc(jr.layout_line.visibility)});var cP={paint:new Rc({"line-opacity":new kc(jr.paint_line["line-opacity"]),"line-color":new kc(jr.paint_line["line-color"]),"line-translate":new Mc(jr.paint_line["line-translate"]),"line-translate-anchor":new Mc(jr.paint_line["line-translate-anchor"]),"line-width":new kc(jr.paint_line["line-width"]),"line-gap-width":new kc(jr.paint_line["line-gap-width"]),"line-offset":new kc(jr.paint_line["line-offset"]),"line-blur":new kc(jr.paint_line["line-blur"]),"line-dasharray":new kc(jr.paint_line["line-dasharray"]),"line-pattern":new kc(jr.paint_line["line-pattern"]),"line-gradient":new Ic(jr.paint_line["line-gradient"]),"line-trim-offset":new Mc(jr.paint_line["line-trim-offset"]),"line-emissive-strength":new Mc(jr.paint_line["line-emissive-strength"]),"line-border-width":new kc(jr.paint_line["line-border-width"]),"line-border-color":new kc(jr.paint_line["line-border-color"])}),layout:lP};const uP=t=>({u_matrix:new ch(t),u_pixels_to_tile_units:new dh(t),u_device_pixel_ratio:new nh(t),u_units_to_pixels:new ih(t),u_dash_image:new rh(t),u_gradient_image:new rh(t),u_image_height:new nh(t),u_texsize:new ih(t),u_tile_units_to_pixels:new nh(t),u_alpha_discard_threshold:new nh(t),u_trim_offset:new ih(t),u_emissive_strength:new nh(t)}),hP=t=>({u_matrix:new ch(t),u_texsize:new ih(t),u_pixels_to_tile_units:new dh(t),u_device_pixel_ratio:new nh(t),u_image:new rh(t),u_units_to_pixels:new ih(t),u_tile_units_to_pixels:new nh(t),u_alpha_discard_threshold:new nh(t)}),fP=(t,e,r,n,i,o,s)=>{const a=t.transform,l=a.calculatePixelsToTileUnitsMatrix(e);return{u_matrix:mP(t,e,r,n),u_pixels_to_tile_units:l,u_device_pixel_ratio:o,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:i,u_texsize:yP(r)&&e.lineAtlasTexture?e.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:pP(e,t.transform),u_alpha_discard_threshold:0,u_trim_offset:s,u_emissive_strength:r.paint.get("line-emissive-strength")}},dP=(t,e,r,n,i)=>{const o=t.transform;return{u_matrix:mP(t,e,r,n),u_texsize:e.imageAtlasTexture?e.imageAtlasTexture.size:[0,0],u_pixels_to_tile_units:o.calculatePixelsToTileUnitsMatrix(e),u_device_pixel_ratio:i,u_image:0,u_tile_units_to_pixels:pP(e,o),u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function pP(t,e){return 1/VM(t,1,e.tileZoom)}function mP(t,e,r,n){return t.translatePosMatrix(n||e.tileID.projMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}const gP=t=>{const e=[];yP(t)&&e.push("RENDER_LINE_DASH"),t.paint.get("line-gradient")&&e.push("RENDER_LINE_GRADIENT");const r=t.paint.get("line-trim-offset");return 0===r[0]&&0===r[1]||e.push("RENDER_LINE_TRIM_OFFSET"),0!==t.paint.get("line-border-width").constantOr(1)&&e.push("RENDER_LINE_BORDER"),e};function yP(t){const e=t.paint.get("line-dasharray").value;return e.value||"constant"!==e.kind}class _P extends kc{possiblyEvaluate(t,e){return e=new bc(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,n){return e=U({},e,{zoom:Math.floor(e.zoom)}
2),super.evaluate(t,e,r,n)}}const vP=new _P(cP.paint.properties["line-width"].specification);vP.useIntegerZoom=!0;class bP extends $c{constructor(t,e){super(t,cP,e),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression&&t._styleExpression.expression instanceof Oo,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}widthExpression(){return this._transitionablePaint._values["line-width"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=vP.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new XO(t)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getDefaultProgramParams(t,e){const r=gP(this);return{config:new bh(this,e),defines:r,overrideFog:!1}}queryRadius(t){const e=t,r=xP(Jx("line-width",this,e),Jx("line-gap-width",this,e)),n=Jx("line-offset",this,e);return r/2+Math.abs(n)+Qx(this.paint.get("line-translate"))}queryIntersectsFeature(t,e,r,n,i,o){if(t.queryGeometry.isAboveHorizon)return!1;const s=tw(t.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),a=t.pixelToTileUnitsFactor/2*xP(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),l=this.paint.get("line-offset").evaluate(e,r);return l&&(n=wP(n,l*t.pixelToTileUnitsFactor)),Nx(s,n,a)}isTileClipped(){return!0}}function xP(t,e){return e>0?e+2*t:t}function wP(t,e){const r=[],n=new b(0,0);for(let i=0;i<t.length;i++){const o=t[i],s=[];for(let t=0;t<o.length;t++){const r=o[t-1],i=o[t],a=o[t+1],l=0===t?n:i.sub(r)._unit()._perp(),c=t===o.length-1?n:a.sub(i)._unit()._perp(),u=l._add(c)._unit(),h=u.x*c.x+u.y*c.y;u._mult(1/h),s.push(u._mult(e)._add(i))}r.push(s)}return r}const EP=new Rc({visibility:new Mc(jr.layout_background.visibility)});var SP={paint:new Rc({"background-color":new Mc(jr.paint_background["background-color"]),"background-pattern":new Mc(jr.paint_background["background-pattern"]),"background-opacity":new Mc(jr.paint_background["background-opacity"]),"background-emissive-strength":new Mc(jr.paint_background["background-emissive-strength"])}),layout:EP};class TP extends $c{constructor(t,e){super(t,SP,e)}getProgramIds(){return[this.paint.get("background-pattern")?"backgroundPattern":"background"]}getDefaultProgramParams(t,e){return{overrideFog:!1}}}const AP=new Rc({visibility:new Mc(jr.layout_raster.visibility)});var OP={paint:new Rc({"raster-opacity":new Mc(jr.paint_raster["raster-opacity"]),"raster-color":new Ic(jr.paint_raster["raster-color"]),"raster-color-mix":new Mc(jr.paint_raster["raster-color-mix"]),"raster-color-range":new Mc(jr.paint_raster["raster-color-range"]),"raster-hue-rotate":new Mc(jr.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Mc(jr.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Mc(jr.paint_raster["raster-brightness-max"]),"raster-saturation":new Mc(jr.paint_raster["raster-saturation"]),"raster-contrast":new Mc(jr.paint_raster["raster-contrast"]),"raster-resampling":new Mc(jr.paint_raster["raster-resampling"]),"raster-fade-duration":new Mc(jr.paint_raster["raster-fade-duration"]),"raster-emissive-strength":new Mc(jr.paint_raster["raster-emissive-strength"]),"raster-array-band":new Mc(jr.paint_raster["raster-array-band"]),"raster-elevation":new Mc(jr.paint_raster["raster-elevation"])}),layout:AP};function CP(t,e,r,n,i,o,s,a){const l=[t,r,i,e,n,o,1,1,1],c=[s,a,1],u=gv.adjoint([],l),[h,f,d]=Sv.transformMat3(c,c,gv.transpose(u,u));return gv.multiply(l,[h,0,0,0,f,0,0,0,d],l)}function MP(t,e,r,n,i,o,s,a,l,c){const u=CP(0,0,t,0,0,e,t,e),h=CP(r,n,i,o,s,a,l,c);return gv.multiply(h,gv.adjoint(u,u),h),[h[6]/h[8]*t/Li,h[7]/h[8]*e/Li]}class kP extends Br{constructor(t,e,r,n){super(),this.id=t,this.dispatcher=r,this.coordinates=e.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.onNorthPole=!1,this.onSouthPole=!1,this.setEventedParent(n),this.options=e,this._dirty=!1}load(t,r){if(this._loaded=r||!1,this.fire(new Dr("dataloading",{dataType:"source"})),this.url=this.options.url,!this.url)return t&&(this.coordinates=t),this._loaded=!0,void this._finishLoading();this._imageRequest=se(this.map._requestManager.transformRequest(this.url,Vt.Image),((r,n)=>{if(this._imageRequest=null,this._loaded=!0,r)this.fire(new zr(r));else if(n){const{HTMLImageElement:r}=e;this.image=n instanceof r?vr.getImageData(n):n,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,t&&(this.coordinates=t),this._finishLoading()}}))}loaded(){return this._loaded}
2updateImage(t){return t.url?(this._imageRequest&&t.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=t.url,this.load(t.coordinates,this._loaded),this):this}setTexture(t){if(!(t.handle instanceof WebGLTexture))throw new Error("The provided handle is not a WebGLTexture instance");const e=this.map.painter.context;return this.texture=new KO(e,t.handle),this.width=t.dimensions[0],this.height=t.dimensions[1],this._dirty=!1,this._loaded=!0,this._finishLoading(),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Dr("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),!this.texture||this.texture instanceof KO||this.texture.destroy()}setCoordinates(t){if(this.coordinates=t,this._boundsArray=void 0,!t.length)return this;this.onNorthPole=!1,this.onSouthPole=!1;let e=t[0][1],r=t[0][1];for(const n of t)n[1]>r&&(r=n[1]),n[1]<e&&(e=n[1]);const n=(r+e)/2;if(n>yx?this.onNorthPole=!0:n<-yx&&(this.onSouthPole=!0),!this.onNorthPole&&!this.onSouthPole){const e=t.map(wx.fromLngLat);this.tileID=IP(e),this.minzoom=this.maxzoom=this.tileID.z}return this.fire(new Dr("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(t){for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture)}if(this._boundsArray)return;const e=ZA(this.tileID,this.map.transform.projection),[r,n,i,o]=this.coordinates.map((t=>{const r=e.projection.project(t[0],t[1]);return YA(e,r)._round()}));this.perspectiveTransform=MP(this.width,this.height,r.x,r.y,n.x,n.y,o.x,o.y,i.x,i.y);const s=this._boundsArray=new Qc;s.emplaceBack(r.x,r.y,0,0),s.emplaceBack(n.x,n.y,Li,0),s.emplaceBack(o.x,o.y,0,Li),s.emplaceBack(i.x,i.y,Li,Li),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=t.createVertexBuffer(s,cC.members),this.boundsSegments=Nu.simpleSegment(0,0,4,2)}prepare(){const t=0!==Object.keys(this.tiles).length;if(this.tileID&&!t)return;const e=this.map.painter.context,r=e.gl;!this._dirty||this.texture instanceof KO||(this.texture?this.texture.update(this.image):(this.texture=new YO(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this._dirty=!1),t&&this._prepareData(e)}loadTile(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}function IP(t){let e=1/0,r=1/0,n=-1/0,i=-1/0;for(const o of t)e=Math.min(e,o.x),r=Math.min(r,o.y),n=Math.max(n,o.x),i=Math.max(i,o.y);const o=n-e,s=i-r,a=Math.max(o,s),l=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),c=Math.pow(2,l);return new zv(l,Math.floor((e+n)/2*c),Math.floor((r+i)/2*c))}const PP=256;class LP extends $c{constructor(t,e){super(t,OP,e),this._updateColorRamp()}getProgramIds(){return["raster"]}hasColorMap(){return!!this._transitionablePaint._values["raster-color"].value.value}isLayerDraped(t){return!(t&&t._source instanceof kP)||!t._source.onNorthPole&&!t._source.onSouthPole&&0===this.paint.get("raster-elevation")}_handleSpecialPaintPropertyUpdate(t){"raster-color"!==t&&"raster-color-range"!==t||this._updateColorRamp()}_updateColorRamp(){if(!this.hasColorMap())return;const t=this._transitionablePaint._values["raster-color"].value.expression,[e,r]=this._transitionablePaint._values["raster-color-range"].value.expression.evaluate({zoom:0});this.colorRamp=Ew({expression:t,evaluationKey:"rasterValue",image:this.colorRamp,clips:[{start:e,end:r}],resolution:PP}),this.colorRampTexture=null}}function RP(t){const e=[],r=t.id;return void 0===r&&e.push({message:`layers.${r}: missing required property "id"`}),void 0===t.render&&e.push({message:`layers.${r}: missing required method "render"`}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:`layers.${r}: property "renderingMode" must be either "2d" or "3d"`}),e}class DP extends $c{constructor(t){super(t,{}),this.implementation=t,t.slot&&(this.slot=t.slot)}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}isLayerDraped(t){return void 0!==this.implementation.renderToTile}shouldRedrape(){return!!this.implementation.shouldRerenderTiles&&this.implementation.shouldRerenderTiles()}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)}onRemove(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)}}const zP=new Rc({visibility:new Mc(jr.layout_sky.visibility)});var BP={paint:new Rc({"sky-type":new Mc(jr.paint_sky["sky-type"]),"sky-atmosphere-sun":new Mc(jr.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new Mc(jr.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new Mc(jr.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new Mc(jr.paint_sky["sky-gradient-radius"]),"sky-gradient":new Ic(jr.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new Mc(jr.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new Mc(jr.paint_sky["sky-atmosphere-color"]),"sky-opacity":new Mc(jr.paint_sky["sky-opacity"])}),layout:zP};function jP(t,e,r){const n=[0,0,1],i=bv.identity([]);return bv.rotateY(i,i,r?-S(t)+Math.PI:S(t)),bv.rotateX(i,i,-S(e)),Sv.transformQuat(n,n,i),Sv.normalize(n,n)}class FP extends $c{constructor(t,e){super(t,BP,e),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"sky-gradient"===t?this._updateColorRamp():"sky-atmosphere-sun"!==t&&"sky-atmosphere-halo-color"!==t&&"sky-atmosphere-color"!==t&&"sky-atmosphere-sun-intensity"!==t||(this._skyboxInvali
2dated=!0)}_updateColorRamp(){const t=this._transitionablePaint._values["sky-gradient"].value.expression;this.colorRamp=Ew({expression:t,evaluationKey:"skyRadialProgress"}),this.colorRampTexture&&(this.colorRampTexture.destroy(),this.colorRampTexture=null)}needsSkyboxCapture(t){if(this._skyboxInvalidated||!this.skyboxTexture||!this.skyboxGeometry)return!0;if(!this.paint.get("sky-atmosphere-sun")){const e=t.style.light.properties.get("position");return this._lightPosition.azimuthal!==e.azimuthal||this._lightPosition.polar!==e.polar}return!1}getCenter(t,e){if("atmosphere"===this.paint.get("sky-type")){const r=this.paint.get("sky-atmosphere-sun"),n=!r,i=t.style.light,o=i.properties.get("position");return n&&"viewport"===i.properties.get("anchor")&&it("The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly."),n?jP(o.azimuthal,90-o.polar,e):jP(r[0],90-r[1],e)}const r=this.paint.get("sky-gradient-center");return jP(r[0],90-r[1],e)}isSky(){return!0}markSkyboxValid(t){this._skyboxInvalidated=!1,this._lightPosition=t.style.light.properties.get("position")}hasOffscreenPass(){return!0}getProgramIds(){const t=this.paint.get("sky-type");return"atmosphere"===t?["skyboxCapture","skybox"]:"gradient"===t?["skyboxGradient"]:null}}var NP={paint:new Rc({})};class $P extends $c{constructor(t,e){super(t,NP)}}const UP={circle:lw,heatmap:Sw,hillshade:Ow,fill:bE,"fill-extrusion":YI,line:bP,symbol:EO,background:TP,raster:LP,sky:FP,slot:$P,model:Uk};function VP(t,e){return"custom"===t.type?new DP(t):new UP[t.type](t,e)}function GP(t,e,r){let n,i,o;const s=vr.devicePixelRatio>1?"@2x":"";let a=Yt(e.transformRequest(e.normalizeSpriteURL(t,s,".json"),Vt.SpriteJSON),((t,e)=>{a=null,o||(o=t,n=e,c())})),l=se(e.transformRequest(e.normalizeSpriteURL(t,s,".png"),Vt.SpriteImage),((t,e)=>{l=null,o||(o=t,i=e,c())}));function c(){if(o)r(o);else if(n&&i){const t=vr.getImageData(i),e={};for(const r in n){const{width:i,height:o,x:s,y:a,sdf:l,pixelRatio:c,stretchX:u,stretchY:h,content:f}=n[r],d=new vw({width:i,height:o});vw.copy(t,d,{x:s,y:a},{x:0,y:0},{width:i,height:o}),e[r]={data:d,pixelRatio:c,sdf:l,stretchX:u,stretchY:h,content:f}}r(null,e)}}return{cancel(){a&&(a.cancel(),a=null),l&&(l.cancel(),l=null)}}}function qP(t){const{userImage:e}=t;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}const HP=1;class WP extends Br{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded={},this.requestors=[],this.patterns={},this.atlasImage={},this.atlasTexture={},this.dirty=!0}createScope(t){this.images[t]={},this.loaded[t]=!1,this.updatedImages[t]={},this.patterns[t]={},this.callbackDispatchedThisFrame[t]={},this.atlasImage[t]=new vw({width:1,height:1})}isLoaded(){for(const t in this.loaded)if(!this.loaded[t])return!1;return!0}setLoaded(t,e){if(this.loaded[e]!==t&&(this.loaded[e]=t,t)){for(const{ids:t,callback:r}of this.requestors)this._notify(t,e,r);this.requestors=[]}}hasImage(t,e){return!!this.getImage(t,e)}getImage(t,e){return this.images[e][t]}addImage(t,e,r){this._validate(t,r)&&(this.images[e][t]=r)}_validate(t,e){let r=!0;return this._validateStretch(e.stretchX,e.data&&e.data.width)||(this.fire(new zr(new Error(`Image "${t}" has invalid "stretchX" value`))),r=!1),this._validateStretch(e.stretchY,e.data&&e.data.height)||(this.fire(new zr(new Error(`Image "${t}" has invalid "stretchY" value`))),r=!1),this._validateContent(e.content,e)||(this.fire(new zr(new Error(`Image "${t}" has invalid "content" value`))),r=!1),r}_validateStretch(t,e){if(!t)return!0;let r=0;for(const n of t){if(n[0]<r||n[1]<n[0]||e<n[1])return!1;r=n[1]}return!0}_validateContent(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))}updateImage(t,e,r){const n=this.images[e][t];r.version=n.version+1,this.images[e][t]=r,this.updatedImages[e][t]=!0}removeImage(t,e){const r=this.images[e][t];delete this.images[e][t],delete this.patterns[e][t],r.userImage&&r.userImage.onRemove&&r.userImage.onRemove()}listImages(t){return Object.keys(this.images[t])}getImages(t,e,r){let n=!0;const i=!!this.loaded[e];if(!i)for(const r of t)this.images[e][r]||(n=!1);i||n?this._notify(t,e,r):this.requestors.push({ids:t,scope:e,callback:r})}getUpdatedImages(t){return this.updatedImages[t]}_notify(t,e,r){const n={};for(const r of t){this.images[e][r]||this.fire(new Dr("styleimagemissing",{id:r}));const t=this.images[e][r];t?n[r]={data:t.data.clone(),pixelRatio:t.pixelRatio,sdf:t.sdf,version:t.version,stretchX:t.stretchX,stretchY:t.stretchY,content:t.content,hasRenderCallback:Boolean(t.userImage&&t.userImage.render)}:it(`Image "${r}" 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.`)}r(null,n)}getPixelSize(t){const{width:e,height:r}=this.atlasImage[t];return{width:e,height:r}}getPattern(t,e){const r=this.patterns[e][t],n=this.getImage(t,e);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{const r={w:n.data.width+2*HP,h:n.data.height+2*HP,x:0,y:0},i=new sA(r,n);this.patterns[e][t]={bin:r,position:i}}return this._updatePatternAtlas(e),this.patterns[e][t].position}bind(t,e){const r=t.gl;let n=this.atlasTexture[e];n?this.dirty&&(n.update(this.atlasImage[e]),this.dirty=!1):(n=new YO(t,this.atlasImage[e],r.RGBA),this.atlasTexture[e]=n),n.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(t){const e=[];
2for(const r in this.patterns[t])e.push(this.patterns[t][r].bin);const{w:r,h:n}=iA(e),i=this.atlasImage[t];i.resize({width:r||1,height:n||1});for(const e in this.patterns[t]){const{bin:r}=this.patterns[t][e],n=r.x+HP,o=r.y+HP,s=this.images[t][e].data,a=s.width,l=s.height;vw.copy(s,i,{x:0,y:0},{x:n,y:o},{width:a,height:l}),vw.copy(s,i,{x:0,y:l-1},{x:n,y:o-1},{width:a,height:1}),vw.copy(s,i,{x:0,y:0},{x:n,y:o+l},{width:a,height:1}),vw.copy(s,i,{x:a-1,y:0},{x:n-1,y:o},{width:1,height:l}),vw.copy(s,i,{x:0,y:0},{x:n+a,y:o},{width:1,height:l})}this.dirty=!0}beginFrame(){for(const t in this.images)this.callbackDispatchedThisFrame[t]={}}dispatchRenderCallbacks(t,e){for(const r of t){if(this.callbackDispatchedThisFrame[e][r])continue;this.callbackDispatchedThisFrame[e][r]=!0;const t=this.images[e][r];qP(t)&&this.updateImage(r,e,t)}}}const ZP=new Rc({anchor:new Mc(jr.light.anchor),position:new Lc(jr.light.position),color:new Mc(jr.light.color),intensity:new Mc(jr.light.intensity)});class XP extends Br{constructor(t,e="flat"){super(),this._transitionable=new Ec(ZP),this.setLight(t,e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(t,e,r={}){this._validate(Ol,t,r)||(this._transitionable.setTransitionOrValue(t),this.id=e)}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(t,e,r){return(!r||!1!==r.validate)&&Bl(this,t.call(Tl,U({value:e,style:{glyphs:!0,sprite:!0},styleSpec:jr})))}}const YP={deferred:0,elevated:1},KP=new Rc({source:new Mc(jr.terrain.source),exaggeration:new Mc(jr.terrain.exaggeration)});let JP=class extends Br{constructor(t,e,r,n){super(),this.scope=r,this._transitionable=new Ec(KP,n),this._transitionable.setTransitionOrValue(t,n),this._transitioning=this._transitionable.untransitioned(),this.drapeRenderMode=e}get(){return this._transitionable.serialize()}set(t,e){this._transitionable.setTransitionOrValue(t,e)}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}getExaggeration(t){return this._transitioning.possiblyEvaluate(new bc(t)).get("exaggeration")}isZoomDependent(){const t=this._transitionable._values.exaggeration;return null!=t&&null!=t.value&&null!=t.value.expression&&t.value.expression instanceof xa}};const QP=45,tL=65,eL=.9,rL=.05;function nL(t,e,r,n){const i=z(QP,tL,r),[o,s]=iL(t,n),a=6,l=(e-o)/(s-o);let c=1-Math.min(1,Math.exp(-a*l));return c*=c*c,c=Math.min(1,1.00747*c),c*i*t.alpha}function iL(t,e){const r=.5/Math.tan(.5*e);return[t.range[0]+r,t.range[1]+r]}function oL(t,e,r,n,i,o){const s=o.calculateFogTileMatrix(i),a=[e,r,n];return Sv.transformMat4(a,a,s),nL(t,Sv.length(a),o.pitch,o._fov)}function sL(t,e,r){const n=wx.fromLngLat(e),i=r.elevation?r.elevation.getAtPointOrZero(n):0;return aL(t,n.x,n.y,i,r)}function aL(t,e,r,n,i){const o=Sv.transformMat4([],[e,r,n],i.mercatorFogMatrix);return nL(t,Sv.length(o),i.pitch,i._fov)}function lL(t,e,r,n,i,o,s){const a=[[r,n,0],[i,n,0],[i,o,0],[r,o,0]];let l=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(const t of a){const r=Sv.transformMat4([],t,e),n=Sv.length(r);l=Math.min(l,n),c=Math.max(c,n)}return[nL(t,l,s.pitch,s._fov),nL(t,c,s.pitch,s._fov)]}const cL=new Rc({range:new Mc(jr.fog.range),color:new Mc(jr.fog.color),"high-color":new Mc(jr.fog["high-color"]),"space-color":new Mc(jr.fog["space-color"]),"horizon-blend":new Mc(jr.fog["horizon-blend"]),"star-intensity":new Mc(jr.fog["star-intensity"]),"vertical-range":new Mc(jr.fog["vertical-range"])});class uL extends Br{constructor(t,e){super(),this._transitionable=new Ec(cL),this.set(t),this._transitioning=this._transitionable.untransitioned(),this._transform=e}get state(){const t=this._transform,e="globe"===t.projection.name,r=Vb(t.zoom),n=this.properties.get("range"),i=[.5,3];return{range:e?[Co(i[0],n[0],r),Co(i[1],n[1],r)]:n,horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(t,e={}
2){if(this._validate(kl,t,e))return;const r=U({},t);for(const t of Object.keys(jr.fog))void 0===r[t]&&(r[t]=jr.fog[t].default);this._transitionable.setTransitionOrValue(r)}getOpacity(t){if(!this._transform.projection.supportsFog)return 0;const e=this.properties&&this.properties.get("color")||1;return("globe"===this._transform.projection.name?1:z(QP,tL,t))*e.a}getOpacityAtLatLng(t,e){return this._transform.projection.supportsFog?sL(this.state,t,e):0}getOpacityForTile(t){if(!this._transform.projection.supportsFog)return[1,1];const e=this._transform.calculateFogTileMatrix(t.toUnwrapped());return lL(this.state,e,0,0,Li,Li,this._transform)}getOpacityForBounds(t,e,r,n,i){return this._transform.projection.supportsFog?lL(this.state,t,e,r,n,i,this._transform):[1,1]}getFovAdjustedRange(t){return this._transform.projection.supportsFog?iL(this.state,t):[0,1]}isVisibleOnFrustum(t){if(!this._transform.projection.supportsFog)return!1;const e=[4,5,6,7];for(const r of e){const e=t.points[r];let n;if(e[2]>=0)n=e;else{const i=t.points[r-4];n=ko(i,e,i[2]/(i[2]-e[2]))}if(aL(this.state,n[0],n[1],0,this._transform)>=rL)return!0}return!1}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(t,e,r){return(!r||!1!==r.validate)&&Bl(this,t.call(Tl,U({value:e,style:{glyphs:!0,sprite:!0},styleSpec:jr})))}}class hL{constructor(t){this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))}remove(){this._channel=void 0,this._callback=()=>{}}}class fL{constructor(){this.tasks={},this.taskQueue=[],Y(["process"],this),this.invoker=new hL(this.process),this.nextId=0}add(t,e){const r=this.nextId++,n=dL(e);if(0===n){ut();try{t()}finally{}return{cancel:()=>{}}}return this.tasks[r]={fn:t,metadata:e,priority:n,id:r},this.taskQueue.push(r),this.invoker.trigger(),{cancel:()=>{delete this.tasks[r]}}}process(){ut();try{if(this.taskQueue=this.taskQueue.filter((t=>!!this.tasks[t])),!this.taskQueue.length)return;const t=this.pick();if(null===t)return;const e=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),!e)return;e.fn()}finally{}}pick(){let t=null,e=1/0;for(let r=0;r<this.taskQueue.length;r++){const n=this.taskQueue[r],i=this.tasks[n];i.priority<e&&(e=i.priority,t=r)}if(null===t)return null;const r=this.taskQueue[t];return this.taskQueue.splice(t,1),r}remove(){this.invoker.remove()}}function dL({type:t,isSymbolTile:e,zoom:r}){return r=r||0,"message"===t?0:"maybePrepare"!==t||e?"parseTile"!==t||e?"parseTile"===t&&e?300-r:"maybePrepare"===t&&e?400-r:500:200-r:100-r}class pL{constructor(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.cancelCallbacks={},Y(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.scheduler=new fL}send(t,e,r,n,i=!1,o){const s=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(r.metadata=o,this.callbacks[s]=r);const a=new Set;return this.target.postMessage({id:s,type:t,hasCallback:!!r,targetMapId:n,mustQueue:i,sourceMapId:this.mapId,data:Hl(e,a)},a),{cancel:()=>{r&&delete this.callbacks[s],this.target.postMessage({id:s,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}}receive(t){const e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){const t=this.cancelCallbacks[r];delete this.cancelCallbacks[r],t&&t.cancel()}else if(e.mustQueue||ut()){const t=this.callbacks[r],n=t&&t.metadata||{type:"message"};this.cancelCallbacks[r]=this.scheduler.add((()=>this.processTask(r,e)),n)}else this.processTask(r,e)}processTask(t,e){if("<response>"===e.type){const r=this.callbacks[t];delete this.callbacks[t],r&&(e.error?r(Wl(e.error)):r(null,Wl(e.data)))}else{const r=new Set,n=e.hasCallback?(e,n)=>{delete this.cancelCallbacks[t],this.target.postMessage({id:t,type:"<response>",sourceMapId:this.mapId,error:e?Hl(e):null,data:Hl(n,r)},r)}:t=>{},i=Wl(e.data);if(this.parent[e.type])this.parent[e.type](e.sourceMapId,i,n);else if(this.parent.getWorkerSource){const t=e.type.split(".");this.parent.getWorkerSource(e.sourceMapId,t[0],i.source,i.scope)[t[1]](i,n)}else n(new Error(`Could not find function ${e.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}}class mL{constructor(t,e){this.workerPool=t,this.actors=[],this.currentActor=0,this.id=q();
2const r=this.workerPool.acquire(this.id);for(let t=0;t<r.length;t++){const n=r[t],i=new mL.Actor(n,e,this.id);i.name=`Worker ${t}`,this.actors.push(i)}this.ready=!1,this.broadcast("checkIfReady",null,(()=>{this.ready=!0}))}broadcast(t,e,r){r=r||function(){},F(this.actors,((r,n)=>{r.send(t,e,n)}),r)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach((t=>{t.remove()})),this.actors=[],this.workerPool.release(this.id)}}mL.Actor=pL;class gL extends Br{constructor(t,e,r,n){super(),this.scope=r,this._options=t,this.properties=new Cc(e),this._transitionable=new Ec(e,new Map(n)),this._transitionable.setTransitionOrValue(t.properties),this._transitioning=this._transitionable.untransitioned()}updateConfig(t){this._transitionable.setTransitionOrValue(this._options.properties,new Map(t))}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}get(){return this._options.properties=this._transitionable.serialize(),this._options}set(t,e){this._options=t,this._transitionable.setTransitionOrValue(t.properties,e)}shadowsEnabled(){return!!this.properties&&!0===this.properties.get("cast-shadows")}}const yL=new Rc({color:new Mc(jr.properties_light_ambient.color),intensity:new Mc(jr.properties_light_ambient.intensity)}),_L=new Rc({direction:new Pc(jr.properties_light_directional.direction),color:new Mc(jr.properties_light_directional.color),intensity:new Mc(jr.properties_light_directional.intensity),"cast-shadows":new Mc(jr.properties_light_directional["cast-shadows"]),"shadow-intensity":new Mc(jr.properties_light_directional["shadow-intensity"])});class vL{constructor(t,e,r,n){this.screenBounds=t,this.cameraPoint=e,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=r,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,n)}static createFromScreenPoints(t,e){let r,n;if(t instanceof b||"number"==typeof t[0]){const i=b.convert(t);r=[i],n=e.isPointAboveHorizon(i)}else{const i=b.convert(t[0]),o=b.convert(t[1]);r=[i,o],n=I(i,o).every((t=>e.isPointAboveHorizon(t)))}return new vL(r,e.getCameraPoint(),n,e)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(t){return I(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],t)}bufferedCameraGeometry(t){const e=this.screenBounds[0],r=1===this.screenBounds.length?this.screenBounds[0].add(new b(1,1)):this.screenBounds[1],n=I(e,r,0,!1);return this.cameraPoint.y>r.y&&(this.cameraPoint.x>e.x&&this.cameraPoint.x<r.x?n.splice(3,0,this.cameraPoint):this.cameraPoint.x>=r.x?n[2]=this.cameraPoint:this.cameraPoint.x<=e.x&&(n[3]=this.cameraPoint)),P(n,t)}bufferedCameraGeometryGlobe(t){const e=this.screenBounds[0],r=1===this.screenBounds.length?this.screenBounds[0].add(new b(1,1)):this.screenBounds[1],n=I(e,r,t),i=this.cameraPoint.clone(),o=(i.x>e.x)+(i.x>r.x);switch(3*((i.y>e.y)+(i.y>r.y))+o){case 0:n[0]=i,n[4]=i.clone();break;case 1:n.splice(1,0,i);break;case 2:n[1]=i;break;case 3:n.splice(4,0,i);break;case 5:n.splice(2,0,i);break;case 6:n[3]=i;break;case 7:n.splice(3,0,i);break;case 8:n[2]=i}return n}containsTile(t,e,r,n=0){const i=1,o=t.queryPadding/e._pixelsPerMercatorPixel+i,s=r?this._bufferedCameraMercator(o,e):this._bufferedScreenMercator(o,e);let a=t.tileID.wrap+(s.unwrapped?n:0);const l=s.polygon.map((e=>YA(t.tileTransform,e,a)));if(!Zx(l,0,0,Li,Li))return;a=t.tileID.wrap+(this.screenGeometryMercator.unwrapped?n:0);const c=this.screenGeometryMercator.polygon.map((e=>KA(t.tileTransform,e,a))),u=c.map((t=>new b(t[0],t[1]))),h=e.getFreeCameraOptions().position||new wx(0,0,0),f=KA(t.tileTransform,h,a),d=c.map((t=>{const e=Sv.sub(t,t,f);return Sv.normalize(e,e),new Uv(f,e)})),p=VM(t,1,e.zoom)*e._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:u,tilespaceRays:d,bufferedTilespaceGeometry:l,bufferedTilespaceBounds:AL(M(l)),tile:t,t
2ileID:t.tileID,pixelToTileUnitsFactor:p}}_bufferedScreenMercator(t,e){const r=TL(t);if(this._screenRaycastCache[r])return this._screenRaycastCache[r];{let n;return n="globe"===e.projection.name?this._projectAndResample(this.bufferedScreenGeometry(t),e):{polygon:this.bufferedScreenGeometry(t).map((t=>e.pointCoordinate3D(t))),unwrapped:!0},this._screenRaycastCache[r]=n,n}}_bufferedCameraMercator(t,e){const r=TL(t);if(this._cameraRaycastCache[r])return this._cameraRaycastCache[r];{let n;return n="globe"===e.projection.name?this._projectAndResample(this.bufferedCameraGeometryGlobe(t),e):{polygon:this.bufferedCameraGeometry(t).map((t=>e.pointCoordinate3D(t))),unwrapped:!0},this._cameraRaycastCache[r]=n,n}}_projectAndResample(t,e){const r=xL(t,e);if(r)return r;const n=bL(wL(t,e).map((t=>new b(EL(t.x),t.y))),e);return{polygon:n.polygon.map((t=>new wx(t.x,t.y))),unwrapped:n.unwrapped}}}function bL(t,e){let r=!1,n=-1/0,i=0;for(let e=0;e<t.length-1;e++)t[e].x>n&&(n=t[e].x,i=e);for(let e=0;e<t.length-1;e++){const n=(i+e)%(t.length-1),o=t[n],s=t[n+1];Math.abs(o.x-s.x)>.5&&(o.x<s.x?(o.x+=1,0===n&&(t[t.length-1].x+=1)):(s.x+=1,n+1===t.length-1&&(t[0].x+=1)),r=!0)}const o=hx(e.center.lng);return r&&o<Math.abs(o-1)&&t.forEach((t=>{t.x-=1})),{polygon:t,unwrapped:r}}function xL(t,e){const r=_v.multiply([],e.pixelMatrix,e.globeMatrix),n=[0,-ab,0,1],i=[0,ab,0,1],o=[0,0,0,1];uv.transformMat4(n,n,r),uv.transformMat4(i,i,r),uv.transformMat4(o,o,r);const s=new b(n[0]/n[3],n[1]/n[3]),a=new b(i[0]/i[3],i[1]/i[3]),l=Wx(t,s)&&n[3]<o[3],c=Wx(t,a)&&i[3]<o[3];if(!l&&!c)return null;const u=SL(t,e,l?-1:1);if(!u)return null;const{idx:h,t:f}=u;let d=h>1?wL(t.slice(0,h),e):[],p=h<t.length?wL(t.slice(h),e):[];d=d.map((t=>new b(EL(t.x),t.y))),p=p.map((t=>new b(EL(t.x),t.y)));const m=[...d];0===m.length&&m.push(p[p.length-1]);const g=m[m.length-1],y=0===p.length?d[0]:p[0],_=Co(g.y,y.y,f);let v;return v=l?[new b(0,_),new b(0,0),new b(1,0),new b(1,_)]:[new b(1,_),new b(1,1),new b(0,1),new b(0,_)],m.push(...v),0===p.length?m.push(d[0]):m.push(...p),{polygon:m.map((t=>new wx(t.x,t.y))),unwrapped:!1}}function wL(t,e){return Tx(t,(t=>{const r=e.pointCoordinate3D(t);t.x=r.x,t.y=r.y}),1/256)}function EL(t){return t<0?1+t%1:t%1}function SL(t,e,r){for(let n=1;n<t.length;n++){const i=EL(e.pointCoordinate3D(t[n-1]).x),o=EL(e.pointCoordinate3D(t[n]).x);if(r<0){if(i<o)return{idx:n,t:-i/(o-1-i)}}else if(o<i)return{idx:n,t:(1-i)/(o+1-i)}}return null}function TL(t){return 100*t|0}function AL(t){return t.min.x=D(t.min.x,0,Li),t.min.y=D(t.min.y,0,Li),t.max.x=D(t.max.x,0,Li),t.max.y=D(t.max.y,0,Li),t}function OL(t,e,r,n,i){const o=function(r,n){if(r)return i(r);if(n){t.url&&n.tiles&&t.tiles&&delete t.tiles;const r=V(U(n,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);n.vector_layers&&(r.vectorLayers=n.vector_layers,r.vectorLayerIds=r.vectorLayers.map((t=>t.id))),r.tiles=e.canonicalizeTileset(r,t.url),i(null,r)}};return t.url?Yt(e.transformRequest(e.normalizeSourceURL(t.url,null,r,n),Vt.Source),o):vr.frame((()=>o(null,t)))}class CL{constructor(t,e,r){this.bounds=Oh.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24}validateBounds(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const e=Math.pow(2,t.z),r={minX:Math.floor(hx(this.bounds.getWest())*e),minY:Math.floor(fx(this.bounds.getNorth())*e),maxX:Math.ceil(hx(this.bounds.getEast())*e),maxY:Math.ceil(fx(this.bounds.getSouth())*e)};return t.x>=r.minX&&t.x<r.maxX&&t.y>=r.minY&&t.y<r.maxY}}class ML{constructor(t,e){this.width=t,this.height=e,this.nextRow=0,this.image=new _w({width:t,height:e}),this.positions={},this.uploaded=!1}getDash(t,e){const r=this.getKey(t,e);return this.positions[r]}trim(){const t=this.width,e=this.height=W(this.nextRow);this.image.resize({width:t,height:e})}getKey(t,e){return t.join(",")+e}getDashRanges(t,e,r){const n=[];let i=t.length%2==1?-t[t.length-1]*r:0,o=t[0]*r,s=!0;n.push({left:i,right:o,isDash:s,zeroLength:0===t[0]});let a=t[0];for(let e=1;e<t.length;e++){s=!s;const l=t[e];i=a*r,a+=l,o=a*r,n.push({left:i,right:o,isDash:s,zeroLength:0===l})}return n}addRoundDash(t,e,r){const n=e/2;for(let e=-r;e<=r;e++){const i=this.nextRow+r+e,o=this.width*i;let s=0,a=t[s];for(let i=0;i<this.width;i++){i/a.right>1&&(a=t[++s]);const l=Math.abs(i-a.left),c=Math.abs(i-a.right),u=Math.min(l,c);let h;const f=e/r*(n+1);if(a.isDash){const t=n-Math.abs(f);h=Math.sqrt(u*u+t*t)}else h=n-Math.sqrt(u*u+f*f);this.image.data[o+i]=Math.max(0,Math.min(255,h+128))}}}
2addRegularDash(t,e){for(let e=t.length-1;e>=0;--e){const r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}const r=t[0],n=t[t.length-1];r.isDash===n.isDash&&(r.left=n.left-this.width,n.right=r.right+this.width);const i=this.width*this.nextRow;let o=0,s=t[o];for(let r=0;r<this.width;r++){r/s.right>1&&(s=t[++o]);const n=Math.abs(r-s.left),a=Math.abs(r-s.right),l=Math.min(n,a),c=(s.isDash?l:-l)+e;this.image.data[i+r]=Math.max(0,Math.min(255,c+128))}}addDash(t,e){const r=this.getKey(t,e);if(this.positions[r])return this.positions[r];const n="round"===e,i=n?7:0,o=2*i+1;if(this.nextRow+o>this.height)return it("LineAtlas out of space"),null;0===t.length&&t.push(1);let s=0;for(let e=0;e<t.length;e++)t[e]<0&&(it("Negative value is found in line dasharray, replacing values with 0"),t[e]=0),s+=t[e];if(0!==s){const r=this.width/s,o=this.getDashRanges(t,this.width,r);if(n)this.addRoundDash(o,r,i);else{const t="square"===e?.5*r:0;this.addRegularDash(o,t)}}const a=this.nextRow+i;this.nextRow+=o;const l={tl:[a,i],br:[s,0]};return this.positions[r]=l,l}}Vl(ML,"LineAtlas");const kL=1,IL=kL*dA;class PL{constructor(t){const e={},r=[];for(const n in t){const i=t[n],o=e[n]={};for(const t in i.glyphs){const e=i.glyphs[+t];if(!e||0===e.bitmap.width||0===e.bitmap.height)continue;const n=e.metrics.localGlyph?IL:kL,s={x:0,y:0,w:e.bitmap.width+2*n,h:e.bitmap.height+2*n};r.push(s),o[t]=s}}const{w:n,h:i}=iA(r),o=new _w({width:n||1,height:i||1});for(const r in t){const n=t[r];for(const t in n.glyphs){const i=n.glyphs[+t];if(!i||0===i.bitmap.width||0===i.bitmap.height)continue;const s=e[r][t],a=i.metrics.localGlyph?IL:kL;_w.copy(i.bitmap,o,{x:0,y:0},{x:s.x+a,y:s.y+a},i.bitmap)}}this.image=o,this.positions=e}}Vl(PL,"GlyphAtlas");class LL{constructor(t){this.tileID=new jv(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.tileZoom=t.tileZoom,this.uid=t.uid,this.zoom=t.zoom,this.canonical=t.tileID.canonical,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.scope=t.scope,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.promoteId=t.promoteId,this.isSymbolTile=t.isSymbolTile,this.tileTransform=ZA(t.tileID.canonical,t.projection),this.projection=t.projection,this.brightness=t.brightness,this.extraShadowCaster=!!t.extraShadowCaster}parse(t,e,r,n,i){this.status="parsing",this.data=t,this.collisionBoxArray=new Cu;const o=new KE(Object.keys(t.layers).sort()),s=new ZS(this.tileID,this.promoteId);s.bucketLayerIDs=[];const a={},l=new ML(256,256),c={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},lineAtlas:l,availableImages:r,brightness:this.brightness},u=e.familiesBySource[this.source];for(const e in u){const n=t.layers[e];if(!n)continue;let i=!1,l=!1,h=!1;for(const t of u[e])"symbol"===t[0].type?i=!0:l=!0,t[0].is3D()&&"model"!==t[0].type&&(h=!0);if(this.extraShadowCaster&&!h)continue;if(!0===this.isSymbolTile&&!i)continue;if(!1===this.isSymbolTile&&!l)continue;1===n.version&&it(`Vector tile source "${this.source}" layer "${e}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const f=o.encode(e),d=[];for(let t=0;t<n.length;t++){const r=n.feature(t),i=s.getId(r,e);d.push({feature:r,id:i,index:t,sourceLayerIndex:f})}for(const t of u[e]){const e=t[0];(!this.extraShadowCaster||e.is3D()&&"model"!==e.type)&&(void 0!==this.isSymbolTile&&"symbol"===e.type!==this.isSymbolTile||e.minzoom&&this.zoom<Math.floor(e.minzoom)||e.maxzoom&&this.zoom>=e.maxzoom||"none"!==e.visibility&&(RL(t,this.zoom,c.brightness,r),(a[e.id]=e.createBucket({index:s.bucketLayerIDs.length,layers:t,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:f,sourceID:this.source,projection:this.projection.spec})).populate(d,c,this.tileID.canonical,this.tileTransform),s.bucketLayerIDs.push(t.map((t=>t.id)))))}}let h,f,d,p;l.trim();const m={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},g=()=>{if(h)return this.status="done",i(h);if(this.extraShadowCaster)this.status="done",i(null,{buckets:N(a).filter((t=>!t.isEmpty())),featureIndex:s,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:c.brightness,glyphMap:null,iconMap:null,glyphPositions:null});else if(f&&d&&p){const t=new PL(f),e=new aA(d,p);for(const n in a){const i=a[n];if(i instanceof DO)RL(i.layers,this.zoom,c.brightness,r),RA(i,f,t.positions,d,e.iconPositions,this.showCollisionBoxes,r,this.tileID.canonical,this.tileZoom,this.projection,this.brightness);else if(i.hasPattern&&(i instanceof XO||i instanceof yE||i instanceof DI)){RL(i.layers,this.zoom,c.brightness,r);const t=e.patternPositions;i.addFeatures(c,this.tileID.canonical,t,r,this.tileTransform,this.brightness)}}this.status="done",i(null,{buckets:N(a).filter((t=>!t.isEmpty())),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,lineAtlas:l,imageAtlas:e,brightness:c.brightness})}};if(!this.extraShadowCaster){const t=J(c.glyphDependencies,(t=>Object.keys(t).map(Number)));Object.keys(t).length?n.send("getGlyphs",{uid:this.uid,stacks:t,scope:this.scope},((t,e)=>{h||(h=t,f=e,g())}),void 0,!1,m):f={};const e=Object.keys(c.iconDependencies);e.length?n.send("getImages",{icons:e,source:this.source,scope:this.scope,tileID:this.tileID,type:"icons"},((t,e)=>{h||(h=t,d=e,g())}),void 0,!1,m):d={};const r=Object.keys(c.patternDependencies);r.length?n.send("getImages",{icons:r,source:this.source,scope:this.scope,tileID:this.tileID,type:"patterns"},((t,e)=>{h||(h=t,p=e,g())}),void 0,!1,m):p={}}g()}}function RL(t,e,r,n){const i=new bc(e,{brightness:r});for(const e of t)e.recalculate(i,n)}class DL{constructor(t){this.entries={}
2,this.scheduler=t}request(t,e,r,n){const i=this.entries[t]=this.entries[t]||{callbacks:[]};if(i.result){const[t,r]=i.result;return this.scheduler?this.scheduler.add((()=>{n(t,r)}),e):n(t,r),()=>{}}return i.callbacks.push(n),i.cancel||(i.cancel=r(((r,n)=>{i.result=[r,n];for(const t of i.callbacks)this.scheduler?this.scheduler.add((()=>{t(r,n)}),e):t(r,n);setTimeout((()=>delete this.entries[t]),3e3)}))),()=>{i.result||(i.callbacks=i.callbacks.filter((t=>t!==n)),i.callbacks.length||(i.cancel(),delete this.entries[t]))}}}function zL(t,e,r){const n=JSON.stringify(t.request),i=e=>{const n=Kt(t.request,((t,n,i,o)=>{t?e(t):n&&e(null,{vectorTile:r?void 0:new HE(new CS(n)),rawData:n,cacheControl:i,expires:o})}));return()=>{n.cancel(),e()}};t.data&&(this.deduped.entries[n]={result:[null,t.data]});const o={type:"parseTile",isSymbolTile:t.isSymbolTile,zoom:t.tileZoom};return this.deduped.request(n,o,i,e)}class BL extends Br{constructor(t,e,r,n,i,o){super(),this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=i||zL,this.loading={},this.loaded={},this.deduped=new DL(t.scheduler),this.isSpriteLoaded=n,this.scheduler=t.scheduler,this.brightness=o}loadTile(t,e){const r=t.uid,n=t&&t.request,i=n&&n.collectResourceTiming,o=this.loading[r]=new LL(t);o.abort=this.loadVectorData(t,((s,a)=>{const l=!this.loading[r];if(delete this.loading[r],l||s||!a)return o.status="done",l||(this.loaded[r]=o),e(s);const c=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl),o.vectorTile=a.vectorTile||new HE(new CS(c));const h=()=>{const t=(t,r)=>{if(t||!r)return e(t);const o={};if(i){const t=Xe(n);t.length>0&&(o.resourceTiming=JSON.parse(JSON.stringify(t)))}e(null,U({rawTileData:c.slice(0)},r,u,o))};o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,t)};this.isSpriteLoaded?h():this.once("isSpriteLoaded",(()=>{if(this.scheduler){const e={type:"parseTile",isSymbolTile:t.isSymbolTile,zoom:t.tileZoom};this.scheduler.add(h,e)}else h()})),this.loaded=this.loaded||{},this.loaded[r]=o}))}reloadTile(t,e){const r=this.loaded,n=t.uid,i=this;if(r&&r[n]){const o=r[n];o.showCollisionBoxes=t.showCollisionBoxes,o.projection=t.projection,o.brightness=t.brightness,o.tileTransform=ZA(t.tileID.canonical,t.projection),o.extraShadowCaster=t.extraShadowCaster;const s=(t,r)=>{const n=o.reloadCallback;n&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,this.availableImages,i.actor,n)),e(t,r)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}else e(null,void 0)}abortTile(t,e){const r=t.uid,n=this.loading[r];n&&(n.abort&&n.abort(),delete this.loading[r]),e()}removeTile(t,e){const r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()}}class jL extends Br{constructor(t,e,r,n){if(super(),this.id=t,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,U(this,V(e,["url","scheme","tileSize","promoteId"])),this._options=U({type:"vector"},e),this._collectResourceTiming=!!e.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(n),this._tileWorkers={},this._deduped=new DL}load(t){this._loaded=!1,this.fire(new Dr("dataloading",{dataType:"source"}));const e=Array.isArray(this.map._language)?this.map._language.join():this.map._language,r=this.map._worldview;this._tileJSONRequest=OL(this._options,this.map._requestManager,e,r,((n,i)=>{this._tileJSONRequest=null,this._loaded=!0,n?(e&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${e}`),r&&2!==r.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${r}`),this.fire(new zr(n))):i&&(U(this,i),i.bounds&&(this.tileBounds=new CL(i.bounds,this.minzoom,this.maxzoom)),ke(i.tiles,this.map._requestManager._customAccessToken),this.fire(new Dr("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Dr("data",{dataType:"source",sourceDataType:"content"}))),t&&t(n)}))}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}reload(){this.cancelTileJSONRequest();const t=Bc(this.id,this.scope);this.load((()=>this.map.style.clearSource(t)))}setTiles(t){return this._options.tiles=t,this.reload(),this}setUrl(t){return this.url=t,this._options.url=t,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return U({},this._options)}loadTile(t,e){const r=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),n={request:this.map._requestManager.transformRequest(r,Vt.Tile),data:void 0,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.t
2ype,source:this.id,scope:this.scope,pixelRatio:vr.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:t.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0,extraShadowCaster:t.isExtraShadowCaster};if(n.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state)"loading"===t.state?t.reloadCallback=e:t.request=t.actor.send("reloadTile",n,i.bind(this));else if(t.actor=this._tileWorkers[r]=this._tileWorkers[r]||this.dispatcher.getActor(),this.dispatcher.ready)t.request=t.actor.send("loadTile",n,i.bind(this),void 0,!0);else{const e=zL.call({deduped:this._deduped},n,((e,r)=>{e||!r?i.call(this,e):(n.data={cacheControl:r.cacheControl,expires:r.expires,rawData:r.rawData.slice(0)},t.actor&&t.actor.send("loadTile",n,i.bind(this),void 0,!0))}),!0);t.request={cancel:e}}function i(r,n){return delete t.request,t.aborted?e(null):r&&404!==r.status?e(r):(n&&n.resourceTiming&&(t.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&t.setExpiryData(n),t.loadVectorData(n,this.map.painter),Ft(this.dispatcher),e(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.t
2ype,source:this.id,scope:this.scope})}unloadTile(t){t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id,scope:this.scope}),t.destroy()}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class FL extends Br{constructor(t,e,r,n){super(),this.id=t,this.dispatcher=r,this.setEventedParent(n),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=U({type:"raster"},e),U(this,V(e,["url","scheme","tileSize"]))}load(t){this._loaded=!1,this.fire(new Dr("dataloading",{dataType:"source"})),this._tileJSONRequest=OL(this._options,this.map._requestManager,null,null,((e,r)=>{this._tileJSONRequest=null,this._loaded=!0,e?this.fire(new zr(e)):r&&(U(this,r),r.bounds&&(this.tileBounds=new CL(r.bounds,this.minzoom,this.maxzoom)),ke(r.tiles),this.fire(new Dr("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Dr("data",{dataType:"source",sourceDataType:"content"}))),t&&t(e)}))}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}reload(){this.cancelTileJSONRequest();const t=Bc(this.id,this.scope);this.load((()=>this.map.style.clearSource(t)))}setTiles(t){return this._options.tiles=t,this.reload(),this}setUrl(t){return this.url=t,this._options.url=t,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return U({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t,e){const r=vr.devicePixelRatio>=2,n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),r,this.tileSize);t.request=se(this.map._requestManager.transformRequest(n,Vt.Tile),((r,n,i,o)=>(delete t.request,t.aborted?(t.state="unloaded",e(null)):r?(t.state="errored",e(r)):n?(this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:i,expires:o}),t.setTexture(n,this.map.painter),t.state="loaded",Ft(this.dispatcher),void e(null)):e(null))))}abortTile(t,e){t.request&&(t.request.cancel(),delete t.request),e()}unloadTile(t,e){t.texture&&t.texture instanceof YO?(t.destroy(!0),t.texture&&t.texture instanceof YO&&this.map.painter.saveTileTexture(t.texture)):t.destroy(),e()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class NL extends FL{constructor(t,e,r,n){super(t,e,r,n),this.type="raster-dem",this.maxzoom=22,this._options=U({type:"raster-dem"},e),this.encoding=e.encoding||"mapbox"}loadTile(t,r){const n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function i(n,i,s,a){if(delete t.request,t.aborted)t.state="unloaded",r(null);else if(n)t.state="errored",r(n);else if(i){this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:s,expires:a});const r=e.ImageBitmap&&i instanceof e.ImageBitmap&&_r(),n=1-(i.width-Z(i.width))/2;n<1||t.neighboringTiles||(t.neighboringTiles=this._getNeighboringTiles(t.tileID));const l=r?i:vr.getImageData(i,n),c={uid:t.uid,coord:t.tileID,source:this.id,scope:this.scope,rawImageData:l,encoding:this.encoding,padding:n};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",c,o.bind(this),void 0,!0))}}function o(e,n){e&&(t.state="errored",r(e)),n&&(t.dem=n,t.dem.onDeserialize(),t.needsHillshadePrepare=!0,t.needsDEMTextureUpload=!0,t.state="loaded",r(null))}t.request=se(this.map._requestManager.transformRequest(n,Vt.Tile),i.bind(this))}_getNeighboringTiles(t){const e=t.canonical,r=Math.pow(2,e.z),n=(e.x-1+r)%r,i=0===e.x?t.wrap-1:t.wrap,o=(e.x+1+r)%r,s=e.x+1===r?t.wrap+1:t.wrap,a={};return a[new jv(t.overscaledZ,i,e.z,n,e.y).key]={backfilled:!1},a[new jv(t.overscaledZ,s,e.z,o,e.y).key]={backfilled:!1},e.y>0&&(a[new jv(t.overscaledZ,i,e.z,n,e.y-1).key]={backfilled:!1},a[new jv(t.overscaledZ,t.wrap,e.z,e.x,e.y-1).key]={backfilled:!1},a[new jv(t.overscaledZ,s,e.z,o,e.y-1).key]={backfilled:!1}),e.y+1<r&&(a[new jv(t.overscaledZ,i,e.z,n,e.y+1).key]={backfilled:!1},a[new jv(t.overscaledZ,t.wrap,e.z,e.x,e.y+1).key]={backfilled:!1},a[new jv(t.overscaledZ,s,e.z,o,e.y+1).key]={backfilled:!1}),a}}class $L extends Br{constructor(t,e,r,n){super(),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._loaded=!1,this.actor=r.getActor(),this.setEventedParent(n),this._data=e.data,this._options=U({},e),this._collectResourceTiming=e.collectResourceTiming,void 0!==e.maxzoom&&(this.maxzoom=e.maxzoom),e.type&&(this.t
2ype=e.type),e.attribution&&(this.attribution=e.attribution),this.promoteId=e.promoteId;const i=Li/this.tileSize;this.workerOptions=U({source:this.id,scope:this.scope,cluster:e.cluster||!1,geojsonVtOptions:{buffer:(void 0!==e.buffer?e.buffer:128)*i,tolerance:(void 0!==e.tolerance?e.tolerance:.375)*i,extent:Li,maxZoom:this.maxzoom,lineMetrics:e.lineMetrics||!1,generateId:e.generateId||!1},superclusterOptions:{maxZoom:void 0!==e.clusterMaxZoom?e.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,e.clusterMinPoints||2),extent:Li,radius:(void 0!==e.clusterRadius?e.clusterRadius:50)*i,log:!1,generateId:e.generateId||!1},clusterProperties:e.clusterProperties,filter:e.filter},e.workerOptions)}onAdd(t){this.map=t,this.setData(this._data)}setData(t){return this._data=t,this._updateWorkerData(),this}getClusterExpansionZoom(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id,scope:this.scope},e),this}getClusterChildren(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id,scope:this.scope},e),this}getClusterLeaves(t,e,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,scope:this.scope,clusterId:t,limit:e,offset:r},n),this}_updateWorkerData(){if(this._pendingLoad)return void(this._coalesce=!0);this.fire(new Dr("dataloading",{dataType:"source"})),this._loaded=!1;const t=U({},this.workerOptions);t.scope=this.scope;const e=this._data;"string"==typeof e?(t.request=this.map._requestManager.transformRequest(vr.resolveURL(e),Vt.Source),t.request.collectResourceTiming=this._collectResourceTiming):t.data=JSON.stringify(e),this._pendingLoad=this.actor.send(`${this.type}.loadData`,t,((t,e)=>{if(this._loaded=!0,this._pendingLoad=null,t)this.fire(new zr(t));else{const t={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&e&&e.resourceTiming&&e.resourceTiming[this.id]&&(t.resourceTiming=e.resourceTiming[this.id]),this.fire(new Dr("data",t)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)}))}loaded(){return this._loaded}loadTile(t,e){const r=t.actor?"reloadTile":"loadTile";t.actor=this.actor;const n={type:this.type,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,scope:this.scope,pixelRatio:vr.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,brightness:this.map.style&&this.map.style.getBrightness()||0};t.request=this.actor.send(r,n,((n,i)=>(delete t.request,t.destroy(),t.aborted?e(null):n?e(n):(t.loadVectorData(i,this.map.painter,"reloadTile"===r),e(null)))),void 0,"loadTile"===r)}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){this.actor.send("removeTile",{uid:t.uid,type:this.t
2ype,source:this.id,scope:this.scope}),t.destroy()}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return U({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class UL extends kP{constructor(t,e,r,n){super(t,e,r,n),this.roundZoom=!0,this.type="video",this.options=e}load(){this._loaded=!1;const t=this.options;this.urls=[];for(const e of t.urls)this.urls.push(this.map._requestManager.transformRequest(e,Vt.Source).url);ae(this.urls,((t,e)=>{this._loaded=!0,t?this.fire(new zr(t)):e&&(this.video=e,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading())}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const e=this.video.seekable;t<e.start(0)||t>e.end(0)?this.fire(new zr(new Fr(`sources.${this.id}`,null,`Playback for this video can be set only between the ${e.start(0)} and ${e.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,e=t.gl;this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new YO(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(t)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class VL extends kP{constructor(t,r,n,i){super(t,r,n,i),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((t=>!Array.isArray(t)||2!==t.length||t.some((t=>"number"!=typeof t))))||this.fire(new zr(new Fr(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new zr(new Fr(`sources.${t}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new zr(new Fr(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof e.HTMLCanvasElement||this.fire(new zr(new Fr(`sources.${t}`,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 zr(new Fr(`sources.${t}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.HTMLCanvasElement?this.options.canvas:e.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new zr(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const e=this.map.painter.context;this.texture?!t&&!this._playing||this.texture instanceof KO||this.texture.update(this.canvas,{premultiply:!0}):this.texture=new YO(e,this.canvas,e.gl.RGBA,{premultiply:!0}),this._prepareData(e)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}function GL(t){return t instanceof e.ImageData||t instanceof e.HTMLCanvasElement||t instanceof e.ImageBitmap||t instanceof e.HTMLImageElement}class qL extends Br{constructor(t,e,r,n){super(),this.id=t,this.type="custom",this._dataType="raster",this._dispatcher=r,this._implementation=e,this.setEventedParent(n),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new zr(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new zr(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new CL(this._implementation.bounds,this.minzoom,this.maxzoom)),e.update=this._update.bind(this),e.clearTiles=this._clearTiles.bind(this),e.coveringTiles=this._coveringTiles.bind(this),U(this,V(e,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileC
2acheSize"]))}serialize(){return V(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new Dr("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Dr("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(t){this._map=t,this._loaded=!1,this.fire(new Dr("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(t),this.load()}onRemove(t){this._implementation.onRemove&&this._implementation.onRemove(t)}hasTile(t){if(this._implementation.hasTile){const{x:e,y:r,z:n}=t.canonical;return this._implementation.hasTile({x:e,y:r,z:n})}return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t,r){const{x:n,y:i,z:o}=t.tileID.canonical,s=new e.AbortController,a=s.signal;function l(e){if(delete t.request,t.aborted)return t.state="unloaded",r(null);if(void 0===e)return t.state="errored",r(null);if(null===e){const e={width:this.tileSize,height:this.tileSize,data:null};return this.loadTileData(t,e),t.state="loaded",r(null)}if(!GL(e))return t.state="errored",r(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`));this.loadTileData(t,e),t.state="loaded",r(null)}t.request=Promise.resolve(this._implementation.loadTile({x:n,y:i,z:o},{signal:a})).then(l.bind(this)).catch((e=>{20!==e.code&&(t.state="errored",r(e))})),t.request.cancel=()=>s.abort()}loadTileData(t,e){t.setTexture(e,this._map.painter)}unloadTile(t,e){if(t.texture&&t.texture instanceof YO?(t.destroy(!0),t.texture&&t.texture instanceof YO&&this._map.painter.saveTileTexture(t.texture)):t.destroy(),this._implementation.unloadTile){const{x:e,y:r,z:n}=t.tileID.canonical;this._implementation.unloadTile({x:e,y:r,z:n})}e()}abortTile(t,e){t.request&&t.request.cancel&&(t.request.cancel(),delete t.request),e()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map((t=>({x:t.canonical.x,y:t.canonical.y,z:t.canonical.z})))}_clearTiles(){const t=Bc(this.id,this.scope);this._map.style.clearSource(t)}_update(){this.fire(new Dr("data",{dataType:"source",sourceDataType:"content"}))}}function HL(){return null!=YV.workerClass?new YV.workerClass:new e.Worker(YV.workerUrl)}const WL="mapboxgl_preloaded_worker_pool";class ZL{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length<ZL.workerCount;)this.workers.push(new HL);return this.active[t]=!0,this.workers.slice()}release(t){delete this.active[t],this.workers&&0===this.numActive()&&(this.workers.forEach((t=>{t.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[WL]}numActive(){return Object.keys(this.active).length}}let XL;function YL(){return XL||(XL=new ZL),XL}function KL(){YL().acquire(WL)}function JL(){const t=XL;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(WL),XL=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 QL(t){let e,r=null;function n(){e=new Uint8Array(r.buffer)}function i(){throw new Error("Unexpected Draco error.")}function o(t,r,n){return e.copyWithin(t,r,r+n)}function s(t){const i=e.length,o=Math.max(t>>>0,Math.ceil(1.2*i)),s=Math.ceil((o-i)/65536);try{return r.grow(s),n(),!0}catch(t){return!1}}const a={a:{a:i,d:o,c:s,b:i}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(t,a):t.then((t=>t.arrayBuffer())).then((t=>WebAssembly.instantiate(t,a)))).then((t=>{const{Rb:i,Qb:o,P:s,T:a,X:l,Ja:c,La:u,Qa:h,Va:f,Wa:d,eb:p,jb:m,f:g,e:y,yb:_,zb:v,Ab:b,Bb:x,Db:w,Gb:E}=t.instance.exports;r=y;const S=(()=>{let t=0,r=0,n=0,s=0;return a=>{n&&(i(s),i(t),r+=n,n=t=0),t||(r+=128,t=o(r));const l=a.length+7&-8;let c=t;l>=r&&(n=l,c=s=o(l));for(let t=0;t<a.length;t++)e[c+t]=a[t];return c}})();class T{constructor(){this.ptr=s()}destroy(){a(this.ptr)}}class A{constructor(){this.ptr=c()}destroy(){m(this.ptr)}DecodeArrayToMesh(t,e,r){const n=S(t),i=u(this.ptr,n,e,r.ptr);return!!l(i)}GetAttributeByUniqueId(t,e){return{ptr:h(this.ptr,t.ptr,e)}}GetTrianglesUInt16Array(t,e,r){f(this.ptr,t.ptr,e,r)}GetTrianglesUInt32Array(t,e,r){d(this.ptr,t.ptr,e,r)}GetAttributeDataArrayForAllPoints(t,e,r,n,i){p(this.ptr,t.ptr,e.ptr,r,n,i)}}return n(),g(),{memory:y,_free:i,_malloc:o,Mesh:T,Decoder:A,DT_INT8:_(),DT_UINT8:v(),DT_INT16:b(),DT_UINT16:x(),DT_UINT32:w(),DT_FLOAT32:E()}}))}ZL.workerCount=2;let tR,eR,rR,nR=null;function iR(){return ut()&&self.worker&&self.worker.dracoUrl?self.worker.dracoUrl:eR||i.DRACO_URL}function oR(t){eR=vr.resolveURL(t),nR||(nR=new mL(YL(),new Br)),nR.broadcast("setDracoUrl",eR)}
2function sR(){if(!rR)return tR||(tR=QL(fetch(iR())),tR.then((t=>{rR=t,tR=void 0})))}const aR=5120,lR=5121,cR=5122,uR=5123,hR=5125,fR=5126,dR={[aR]:Int8Array,[lR]:Uint8Array,[cR]:Int16Array,[uR]:Uint16Array,[hR]:Uint32Array,[fR]:Float32Array},pR={[aR]:"DT_INT8",[lR]:"DT_UINT8",[cR]:"DT_INT16",[uR]:"DT_UINT16",[hR]:"DT_UINT32",[fR]:"DT_FLOAT32"},mR={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16};function gR(t,e,r){const n=r.json.bufferViews.length,i=r.buffers.length;e.bufferView=n,r.json.bufferViews[n]={buffer:i,byteLength:t.byteLength},r.buffers[i]=t}const yR="KHR_draco_mesh_compression";function _R(t,e){const r=t.extensions&&t.extensions[yR];if(!r)return;const n=new rR.Decoder,i=ER(e,r.bufferView),o=new rR.Mesh;if(!n.DecodeArrayToMesh(i,i.byteLength,o))throw new Error("Failed to decode Draco mesh");const s=e.json.accessors[t.indices],a=dR[s.componentType],l=s.count*a.BYTES_PER_ELEMENT,c=rR._malloc(l);a===Uint16Array?n.GetTrianglesUInt16Array(o,l,c):n.GetTrianglesUInt32Array(o,l,c),gR(rR.memory.buffer.slice(c,c+l),s,e),rR._free(c);for(const i of Object.keys(r.attributes)){const s=n.GetAttributeByUniqueId(o,r.attributes[i]),a=e.json.accessors[t.attributes[i]],l=dR[a.componentType],c=pR[a.componentType],u=mR[a.type],h=a.count*u*l.BYTES_PER_ELEMENT,f=rR._malloc(h);n.GetAttributeDataArrayForAllPoints(o,s,rR[c],h,f),gR(rR.memory.buffer.slice(f,f+h),a,e),rR._free(f)}n.destroy(),o.destroy(),delete t.extensions[yR]}const vR=1179937895,bR=new TextDecoder("utf8");function xR(t,e){return new URL(t,e).href}function wR(t,e,r,n){return fetch(xR(t.uri,n)).then((t=>t.arrayBuffer())).then((t=>{e.buffers[r]=t}))}function ER(t,e){const r=t.json.bufferViews[e],n=t.buffers[r.buffer];return new Uint8Array(n,r.byteOffset||0,r.byteLength)}function SR(t,r,n,i){if(t.uri){const o=xR(t.uri,i);return fetch(o).then((t=>t.blob())).then((t=>e.createImageBitmap(t))).then((t=>{r.images[n]=t}))}if(void 0!==t.bufferView){const i=ER(r,t.bufferView),o=new e.Blob([i],{type:t.mimeType});return e.createImageBitmap(o).then((t=>{r.images[n]=t}))}}function TR(t,e=0,r){const n={json:null,images:[],buffers:[]};if(new Uint32Array(t,e,1)[0]===vR){const r=new Uint32Array(t,e);let i=2;const o=(r[i++]>>2)-3,s=r[i++]>>2;if(r[i++],n.json=JSON.parse(bR.decode(r.subarray(i,i+s))),i+=s,i<o){const o=r[i++];r[i++];const s=e+(i<<2);n.buffers[0]=t.slice(s,s+o)}}else n.json=JSON.parse(bR.decode(new Uint8Array(t,e)));const{buffers:i,images:o,meshes:s,extensionsUsed:a}=n.json;let l=Promise.resolve();if(i){const t=[];for(let e=0;e<i.length;e++){const o=i[e];o.uri?t.push(wR(o,n,e,r)):n.buffers[e]||(n.buffers[e]=null)}l=Promise.all(t)}return l.then((()=>{const t=[],e=a&&a.includes(yR);if(e&&t.push(sR()),o)for(let e=0;e<o.length;e++)t.push(SR(o[e],n,e,r));return(t.length?Promise.all(t):Promise.resolve()).then((()=>
2{if(e&&s)for(const{primitives:t}of s)for(const e of t)_R(e,n);return n}))}))}function AR(t){return fetch(t).then((t=>t.arrayBuffer())).then((e=>TR(e,0,t)))}function OR(t){let e=0;if(new Uint32Array(t,0,1)[0]!==vR){const r=new Uint32Array(t,0,7),[,,n,i,o,s]=r;e=r.byteLength+i+o+s+o,(n!==t.byteLength||e>=t.byteLength)&&it("Invalid b3dm header information.")}return TR(t,e)}class CR{constructor(t,e,r){if(this.triangleCount=e.length/3,this.min=new b(0,0),this.max=new b(0,0),this.xScale=0,this.yScale=0,this.cellsX=0,this.cellsY=0,this.cells=[],this.payload=[],0===this.triangleCount||0===t.length||0===r)return;const n=t.map((t=>t.x)),i=t.map((t=>t.y));this.min=new b(Math.min(...n),Math.min(...i)),this.max=new b(Math.max(...n),Math.max(...i));const o=this.max.sub(this.min);o.x=Math.max(o.x,1),o.y=Math.max(o.y,1);const s=Math.max(o.x,o.y)/r;this.cellsX=Math.max(1,Math.ceil(o.x/s)),this.cellsY=Math.max(1,Math.ceil(o.y/s)),this.xScale=1/s,this.yScale=1/s;const a=[];for(let r=0;r<this.triangleCount;r++){const n=t[e[3*r+0]].sub(this.min),i=t[e[3*r+1]].sub(this.min),o=t[e[3*r+2]].sub(this.min),l=MR(Math.floor(Math.min(n.x,i.x,o.x)),this.xScale,this.cellsX),c=MR(Math.floor(Math.max(n.x,i.x,o.x)),this.xScale,this.cellsX),u=MR(Math.floor(Math.min(n.y,i.y,o.y)),this.yScale,this.cellsY),h=MR(Math.floor(Math.max(n.y,i.y,o.y)),this.yScale,this.cellsY),f=new b(0,0),d=new b(0,0),p=new b(0,0),m=new b(0,0);for(let t=u;t<=h;++t){f.y=d.y=t*s,p.y=m.y=(t+1)*s;for(let e=l;e<=c;++e)f.x=p.x=e*s,d.x=m.x=(e+1)*s,(Kx(n,i,o,f,d,m)||Kx(n,i,o,f,m,p))&&a.push({cellIdx:t*this.cellsX+e,triIdx:r})}}if(0===a.length)return;a.sort(((t,e)=>t.cellIdx-e.cellIdx||t.triIdx-e.triIdx));let l=0;for(;l<a.length;){const t=a[l].cellIdx,e={start:this.payload.length,len:0};for(;l<a.length&&a[l].cellIdx===t;)++e.len,this.payload.push(a[l++].triIdx);this.cells[t]=e}}query(t,e,r){if(0===this.triangleCount||0===this.cells.length)return;if(t.x>this.max.x||this.min.x>e.x)return;if(t.y>this.max.y||this.min.y>e.y)return;this.lookup||(this.lookup=new Uint8Array(Math.ceil(this.triangleCount/8)));for(let t=0;t<this.lookup.length;t++)this.lookup[t]=0;const n=MR(t.x-this.min.x,this.xScale,this.cellsX),i=MR(e.x-this.min.x,this.xScale,this.cellsX),o=MR(t.y-this.min.y,this.yScale,this.cellsY),s=MR(e.y-this.min.y,this.yScale,this.cellsY);for(let t=o;t<=s;t++)for(let e=n;e<=i;e++){const n=this.cells[t*this.cellsX+e];if(n)for(let t=0;t<n.len;t++){const e=this.payload[n.start+t],i=Math.floor(e/8),o=1<<e%8;if(!(this.lookup[i]&o)&&(this.lookup[i]|=o,r.push(e),r.length===this.triangleCount))return}}}}function MR(t,e,r){return Math.max(0,Math.min(r-1,Math.floor(t*e)))}function kR(t,r){const n=[],i=e.WebGL2RenderingContext;if(t.json.textures)for(const e of t.json.textures){const o={magFilter:i.LINEAR,minFilter:i.NEAREST,wrapS:i.REPEAT,wrapT:i.REPEAT};void 0!==e.sampler&&Object.assign(o,t.json.samplers[e.sampler]),n.push({image:r[e.source],sampler:o,uploaded:!1})}return n}function IR(t,e){const r=t.json.bufferViews[e.bufferView],n=t.buffers[r.buffer],i=(e.byteOffset||0)+(r.byteOffset||0);return new(0,dR[e.componentType])(n,i,e.count*mR[e.type])}function PR(t,e){const{emissiveFactor:r=[0,0,0],alphaMode:n="OPAQUE",alphaCutoff:i=.5,normalTexture:o,occlusionTexture:s,emissiveTexture:a,doubleSided:l}=t,{baseColorFactor:c=[1,1,1,1],metallicFactor:u=1,roughnessFactor:h=1,baseColorTexture:f,metallicRoughnessTexture:d}=t.pbrMetallicRoughness||{};return{pbrMetallicRoughness:{baseColorFactor:new wn(...c),metallicFactor:u,roughnessFactor:h,baseColorTexture:f?e[f.index]:void 0,metallicRoughnessTexture:d?e[d.index]:void 0},doubleSided:l,emissiveFactor:r,alphaMode:n,alphaCutoff:i,normalTexture:o?e[o.index]:void 0,occlusionTexture:s?e[s.index]:void 0,emissionTexture:a?e[a.index]:void 0,defined:void 0===t.defined}}function LR(t,e){const r=[0,0,0],n=t.length;if(n>0){for(let i=0;i<n;i++){const n=3*t[i];r[0]+=e[n],r[1]+=e[n+1],r[2]+=e[n+2]}r[0]/=n,r[1]/=n,r[2]/=n}return r}function RR(t,e,r){const n=t.indices,i=t.attributes,o={};o.indexArray=new pu;const s=e.json.accessors[n],a=s.count/3;o.indexArray.reserve(a);const l=IR(e,s);for(let t=0;t<a;t++)o.indexArray.emplaceBack(l[3*t],l[3*t+1],l[3*t+2]);o.indexArray._trim(),o.vertexArray=new wu;const c=e.json.accessors[i.POSITION];o.vertexArray.reserve(c.count);const u=IR(e,c);for(let t=0;t<c.count;t++)o.vertexArray.emplaceBack(u[3*t],u[3*t+1],u[3*t+2]);
2if(o.vertexArray._trim(),o.aabb=new nb(c.min,c.max),o.centroid=LR(l,u),void 0!==i.COLOR_0){const t=e.json.accessors[i.COLOR_0],r=mR[t.type];if(t.componentType===fR){o.colorArray=3===r?new wu:new ru,o.colorArray.reserve(t.count);const n=IR(e,t);if(3===r)for(let e=0;e<t.count;e++)o.colorArray.emplaceBack(n[3*e],n[3*e+1],n[3*e+2]);else for(let e=0;e<t.count;e++)o.colorArray.emplaceBack(n[4*e],n[4*e+1],n[4*e+2],n[4*e+3]);o.colorArray._trim()}else if(t.componentType===uR&&4===r){o.colorArray=new ru,o.colorArray.resize(t.count);const r=IR(e,t),n=1/65535,i=o.colorArray.float32;for(let t=0;t<4*r.length;++t)i[t]=r[t]*n}else it(`glTF color buffer parsing for accessor ${JSON.stringify(t)} is not supported`)}if(void 0!==i.NORMAL){o.normalArray=new wu;const t=e.json.accessors[i.NORMAL];o.normalArray.reserve(t.count);const r=IR(e,t);for(let e=0;e<t.count;e++)o.normalArray.emplaceBack(r[3*e],r[3*e+1],r[3*e+2]);o.normalArray._trim()}if(void 0!==i.TEXCOORD_0&&r.length>0){o.texcoordArray=new Eu;const t=e.json.accessors[i.TEXCOORD_0];o.texcoordArray.reserve(t.count);const r=IR(e,t);for(let e=0;e<t.count;e++)o.texcoordArray.emplaceBack(r[2*e],r[2*e+1]);o.texcoordArray._trim()}const h=t.material,f=void 0!==h?e.json.materials[h]:{defined:!1};if(o.material=PR(f,r),void 0!==i._FEATURE_RGBA4444){const t=e.json.accessors[i._FEATURE_RGBA4444];o.featureData=new Uint32Array(IR(e,t).buffer)}return o}function DR(t,e){const r=[];for(const n of t.json.meshes){const i=[];for(const r of n.primitives)i.push(RR(r,t,e));r.push(i)}return r}function zR(t,e,r){const{matrix:n,rotation:i,translation:o,scale:s,mesh:a,extras:l,children:c}=t,u={};
2if(u.matrix=n||_v.fromRotationTranslationScale([],i||[0,0,0,1],o||[0,0,0],s||[1,1,1]),void 0!==a){u.meshes=r[a];const t=u.anchor=[0,0];for(const e of u.meshes){const{min:r,max:n}=e.aabb;t[0]+=r[0]+n[0],t[1]+=r[1]+n[1]}t[0]=Math.floor(t[0]/u.meshes.length/2),t[1]=Math.floor(t[1]/u.meshes.length/2)}if(l&&(l.id&&(u.id=l.id),l.lights&&(u.lights=qR(l.lights))),c){const t=[];for(const n of c)t.push(zR(e.json.nodes[n],e,r));u.children=t}return u}function BR(t){if(0===t.vertices.length||0===t.indices.length)return null;const[e,r]=[t.vertices[0].clone(),t.vertices[0].clone()];for(let n=1;n<t.vertices.length;++n){const i=t.vertices[n];e.x=Math.min(e.x,i.x),e.y=Math.min(e.y,i.y),r.x=Math.max(r.x,i.x),r.y=Math.max(r.y,i.y)}const n=Math.ceil(Math.max(r.x-e.x,r.y-e.y)/256),i=Math.max(8,n),o=new CR(t.vertices,t.indices,i);return{vertices:t.vertices,indices:t.indices,grid:o,min:e,max:r}}function jR(t){if(!t.extras||!t.extras.ground)return null;const e=t.extras.ground;if(!e||!Array.isArray(e)||0===e.length)return null;const r=e[0];if(!r||!Array.isArray(r)||0===r.length)return null;const n=[];for(const t of r){if(!Array.isArray(t)||2!==t.length)continue;const e=t[0],r=t[1];"number"==typeof e&&"number"==typeof r&&n.push(new b(e,r))}if(n.length<3)return null;n.length>1&&n[n.length-1].equals(n[0])&&n.pop();let i=0;for(let t=0;t<n.length;t++){const e=n[t],r=n[(t+1)%n.length],o=n[(t+2)%n.length];i+=(e.x-r.x)*(o.y-r.y)-(o.x-r.x)*(e.y-r.y)}i>0&&n.reverse();const o=hE(n.flatMap((t=>[t.x,t.y])),[]);return 0===o.length?null:{vertices:n,indices:o}}function FR(t){const e=[],r=[];let n=0;for(const i of t){n=e.length;const t=i.vertexArray.float32,o=i.indexArray.uint16;for(let r=0;r<i.vertexArray.length;r++)e.push(new b(t[3*r+0],t[3*r+1]));for(let t=0;t<3*i.indexArray.length;t++)r.push(o[t]+n)}if(r.length%3!=0)return null;for(let t=0;t<r.length;t+=3){const n=e[r[t+0]],i=e[r[t+1]],o=e[r[t+2]];(n.x-i.x)*(o.y-i.y)-(o.x-i.x)*(n.y-i.y)>0&&([r[t+1],r[t+2]]=[r[t+2],r[t+1]])}return{vertices:e,indices:r}}function NR(t,e,r){const n={},i=new Set;for(let o=0;o<t.length;o++){const t=r[e[o]];if(!t.extras)continue;const s=t.extras["mapbox:footprint:version"],a=t.extras["mapbox:footprint:id"];(s||a)&&i.add(o),"1.0.0"===s&&a&&(n[a]=o)}for(let o=0;o<t.length;o++){if(i.has(o))continue;const s=t[o],a=r[e[o]];if(!a.extras)continue;let l=null;s.id in n&&(l=FR(t[n[s.id]].meshes)),l||(l=jR(a)),l&&(s.footprint=BR(l))}if(i.size>0){const e=Array.from(i.values()).sort(((t,e)=>t-e));for(let r=e.length-1;r>=0;r--)t.splice(e[r],1)}}function $R(t){const e=DR(t,kR(t,t.images)),{scenes:r,scene:n,nodes:i}=t.json,o=r?r[n||0].nodes:i,s=[];for(const r of o)s.push(zR(i[r],t,e));return NR(s,o,t.json.nodes),s}function UR(t,e){const r=$R(t);for(const t of r){for(const e of t.meshes)VR(e);t.lights&&(t.lightMeshIndex=t.meshes.length,t.meshes.push(GR(t.lights,e)))}return r}function VR(t){t.heightmap=new Float32Array(Ok*Ok),t.heightmap.fill(-1);const e=t.vertexArray.float32,r=t.aabb.min[0]-1,n=t.aabb.min[1]-1,i=t.aabb.max[0],o=t.aabb.max[1],s=Ok/(i-r+2),a=Ok/(o-n+2);for(let i=0;i<e.length;i+=3){const o=e[i+0],l=e[i+1],c=e[i+2],u=(o-r)*s|0,h=(l-n)*a|0;c>t.heightmap[h*Ok+u]&&(t.heightmap[h*Ok+u]=c)}}function GR(t,e){const r={};r.indexArray=new pu,r.indexArray.reserve(4*t.length),r.vertexArray=new wu,r.vertexArray.reserve(10*t.length),r.colorArray=new ru,r.vertexArray.reserve(10*t.length);let n=0;for(const i of t){const t=Math.min(10,Math.max(4,1.3*i.height))*e,o=[-i.normal[1],i.normal[0],0],s=Math.min(.29,.1*i.width/i.depth),a=i.width-2*i.depth*e*(s+.01),l=Sv.scaleAndAdd([],i.pos,o,a/2),c=Sv.scaleAndAdd([],i.pos,o,-a/2),u=[l[0],l[1],l[2]+i.height],h=[c[0],c[1],c[2]+i.height],f=Sv.scaleAndAdd([],i.normal,o,s);Sv.scale(f,f,t);const d=Sv.scaleAndAdd([],i.normal,o,-s);Sv.scale(d,d,t),Sv.add(f,l,f),Sv.add(d,c,d),l[2]+=.1,c[2]+=.1,r.vertexArray.emplaceBack(f[0],f[1],f[2]),r.vertexArray.emplaceBack(d[0],d[1],d[2]),r.vertexArray.emplaceBack(l[0],l[1],l[2]),r.vertexArray.emplaceBack(c[0],c[1],c[2]),r.vertexArray.emplaceBack(u[0],u[1],u[2]),r.vertexArray.emplaceBack(h[0],h[1],h[2]),r.vertexArray.emplaceBack(l[0],l[1],l[2]),r.vertexArray.emplaceBack(c[0],c[1],c[2]),r.vertexArray.emplaceBack(f[0],f[1],f[2]),r.vertexArray.emplaceBack(d[0],d[1],d[2]);const p=a/t/2;r.colorArray.emplaceBack(-p-s,-1,p,.8),r.colorArray.emplaceBack(p+s,-1,p,.8),r.colorArray.emplaceBack(-p,0,p,1.3),r.colorArray.emplaceBack(p,0,p,1.3),r.colorArray.emplaceBack(p+s,-.8,p,.7),r.colorArray.emplaceBack(p+s,-.8,p,.7),r.colorArray.emplaceBack(0,0,p,1.3),r.colorArray.emplaceBack(0,0,p,1.3),r.colorArray.emplaceBack(p+s,-1.2,p,.8),r.colorArray.emplaceBack(p+s,-1.2,p,.8),r.indexArray.emplaceBack(6+n,4+n,8+n),r.indexArray.emplaceBack(7+n,9+n,5+n),r.indexArray.emplaceBack(0+n,1+n,2+n),r.indexArray.emplaceBack(1+n,3+n,2+n),n+=10}const i={defined:!0,emissiveFactor:[0,0,0]},o={};return o.baseColorFactor=wn.white,i.pbrMetallicRoughness=o,r.material=i,r.aabb=new nb([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),r}function qR(t){if(!t.length)return[];const e=vt(t),r=[],n=e.length/24,i=new Uint16Array(e.buffer),o=new Float32Array(e.buffer),s=6;for(let t=0;t<n;t++){const e=i[2*t*s]/30,n=i[2*t*s+1]/30,a=i[2*t*s+10]/100,l=o[t*s+1],c=o[t*s+2],u=o[t*s+3],h=o[t*s+4],f=u-l,d=h-c,p=Math.hypot(f,d),m=[d/p,-f/p,0],g=[l+.5*f,c+.5*d,n],y=[l,c,u,h];r.push({pos:g,normal:m,width:p,height:e,depth:a,points:y})}return r}Vl(CR,"TriangleGridIndex");class HR extends Br{constructor(t,e,r,n){super(),this.id=t,this.type="model",this.models=[],this._loaded=!1,this._options=e}load(){const t=[];for(const e in this._options.models){const r=this._options.models[e],n=AR(this.map._requestManager.transformRequest(r.uri,Vt.Model).url).then((t=>{if(!t)return;const n=$R(t),i=new kk(e,r.position,r.orientation,n);i.computeBoundsAndApplyParent(),this.models.push(i)})).catch((t=>{this.fire(new zr(new Error(`Could not load model ${e} from ${r.uri}: ${t.message}`)))}));t.push(n)}return Promise.allSettled(t).then((()=>{this._loaded=!0,this.fire(new Dr("data",{dataType:"source",sourceDataType:"metadata"}))})).catch((t=>{this.fire(new zr(new Error(`Could not load models: ${t.message}`)))}))}onAdd(t){this.map=t,this.load()}hasTransition(){return!1}loaded(){return this._loaded}getModels(){return this.models}loadTile(t,e){}serialize(){return{type:"model"}}
2}class WR extends Br{constructor(t,e,r,n){super(),this.type="batched-model",this.id=t,this.tileSize=512,this._options=e,this.tiles=this._options.tiles,this.maxzoom=e.maxzoom||19,this.minzoom=e.minzoom||0,this.roundZoom=!0,this.usedInConflation=!0,this.dispatcher=r,this.reparseOverscaled=!1,this.scheme="xyz",this._loaded=!1,this.setEventedParent(n)}onAdd(t){this.map=t,this.load()}load(t){this._loaded=!1,this.fire(new Dr("dataloading",{dataType:"source"}));const e=Array.isArray(this.map._language)?this.map._language.join():this.map._language,r=this.map._worldview;this._tileJSONRequest=OL(this._options,this.map._requestManager,e,r,((n,i)=>{this._tileJSONRequest=null,this._loaded=!0,n?(e&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${e}`),r&&2!==r.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${r}`),this.fire(new zr(n))):i&&(U(this,i),i.bounds&&(this.tileBounds=new CL(i.bounds,this.minzoom,this.maxzoom)),ke(i.tiles,this.map._requestManager._customAccessToken),this.fire(new Dr("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Dr("data",{dataType:"source",sourceDataType:"content"}))),t&&t(n)}))}hasTransition(){return!1}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loaded(){return this._loaded}loadTile(t,e){const r=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),n={request:this.map._requestManager.transformRequest(r,Vt.Tile),data:void 0,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.t
2ype,source:this.id,scope:this.scope,showCollisionBoxes:this.map.showCollisionBoxes,isSymbolTile:t.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0};if(t.actor&&"expired"!==t.state)if("loading"===t.state)t.reloadCallback=e;else{if(t.buckets){const e=Object.values(t.buckets);for(const t of e)t.dirty=!0;return void(t.state="loaded")}t.request=t.actor.send("reloadTile",n,i.bind(this))}else t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",n,i.bind(this),void 0,!0);function i(r,n){return t.aborted?e(null):r&&404!==r.status?e(r):(n&&(n.resourceTiming&&(t.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&t.setExpiryData(n),t.buckets={...t.buckets,...n.buckets}),t.state="loaded",void e(null))}}serialize(){return U({},this._options)}}const ZR={vector:jL,raster:FL,"raster-dem":NL,geojson:$L,video:UL,image:kP,model:HR,"batched-model":WR,canvas:VL,custom:qL},XR=function(t,e,r,n){const i=new ZR[e.type](t,e,r,n);if(i.id!==t)throw new Error(`Expected Source id to be ${t} instead of ${i.id}`);return Y(["load","abort","unload","serialize","prepare"],i),i},YR=function(t){return ZR[t]},KR=function(t,e){ZR[t]=e};function JR(t,e){const r=_v.identity([]);return _v.scale(r,r,[.5*t.width,.5*-t.height,1]),_v.translate(r,r,[1,-1,0]),_v.multiply(r,r,t.calculateProjMatrix(e.toUnwrapped())),Float32Array.from(r)}function QR(t,e,r,n,i,o,s,a=!1){const l=t.tilesIn(n,s,a);l.sort(rD);const c=[];for(const n of l)c.push({wrappedTileID:n.tile.tileID.wrapped().key,queryResults:n.tile.queryRenderedFeatures(e,r,t._state,n,i,o,JR(t.transform,n.tile.tileID),a)});const u=nD(c);for(const e in u)u[e].forEach((e=>{const r=e.feature,n=r.layer;n&&"background"!==n.type&&"sky"!==n.type&&"slot"!==n.type&&(r.source=n.source,n["source-layer"]&&(r.sourceLayer=n["source-layer"]),r.state=void 0!==r.id?t.getFeatureState(n["source-layer"],r.id):{})}));return u}function tD(t,e,r,n,i,o,s){const a={},l=o.queryRenderedSymbols(n),c=[];for(const t of Object.keys(l).map(Number))c.push(s[t]);c.sort(rD);for(const r of c){const n=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],e,r.bucketIndex,r.sourceLayerIndex,i.filter,i.layers,i.availableImages,t);for(const t in n){const e=a[t]=a[t]||[],i=n[t];i.sort(((t,e)=>{const n=r.featureSortOrder;if(n){const r=n.indexOf(t.featureIndex);return n.indexOf(e.featureIndex)-r}return e.featureIndex-t.featureIndex}));for(const t of i)e.push(t)}}for(const e in a)a[e].forEach((n=>{const i=n.feature,o=t[e],s=r(o);if(!s)return;const a=s.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a}));return a}function eD(t,e){const r=t.getRenderableIds().map((e=>t.getTileByID(e))),n=[],i={};for(let t=0;t<r.length;t++){const o=r[t],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}function rD(t,e){const r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}function nD(t){const e={},r={};for(const n of t){const t=n.queryResults,i=n.wrappedTileID,o=r[i]=r[i]||{};for(const r in t){const n=t[r],i=o[r]=o[r]||{},s=e[r]=e[r]||[];for(const t of n)i[t.featureIndex]||(i[t.featureIndex]=!0,s.push(t))}}return e}class iD{constructor(t){this.style=t}processLayersChanged(){this.layers=[];for(const t in this.style._mergedLayers){const e=this.style._mergedLayers[t];if("fill-extrusion"===e.type)this.layers.push(e);else if("model"===e.type){const t=this.style.getLayerSource(e);t&&"batched-model"===t.type&&this.layers.push(e)}}}updateZOffset(t,e){this.currentBuildingBuckets=[];for(let t=0;t<this.layers.length;++t){const r=this.layers[t],n=this.style.getLayerSourceCache(r);let i=1;"fill-extrusion"===r.type&&(i=r.paint.get("fill-extrusion-opacity")>0?r.paint.get("fill-extrusion-vertical-scale"):0);let o=n?n.getTile(e):null;if(!o&&n&&e.canonical.z>n.getSource().minzoom){let t=e.scaledTo(Math.min(n.getSource().maxzoom,e.overscaledZ-1));for(;t.overscaledZ>=n.getSource().minzoom&&(o=n.getTile(t),!o&&0!==t.overscaledZ);)t=t.scaledTo(t.overscaledZ-1)}this.currentBuildingBuckets.push({bucket:o?o.getBucket(r):null,tileID:o?o.tileID:e,verticalScale:i})}t.hasAnyZOffset=!1;let r=!1;for(let n=0;n<t.symbolInstances.length;n++){const i=t.symbolInstances.get(n),o=i.zOffset,s=this._getHeightAtTileOffset(e,i.tileAnchorX,i.tileAnchorY);i.zOffset=-1!==s?s:o,r||o===i.zOffset||(r=!0),t.hasAnyZOffset||0===i.zOffset||(t.hasAnyZOffset=!0)}r&&(t.zOffsetBuffersNeedUpload=!0,t.zOffsetSortDirty=!0)}_mapCoordToOverlappingTile(t,e,r,n){let i=e,o=r;
2const s=n;if(t.canonical.z!==s.canonical.z){const n=s.canonical,a=1/(1<<t.canonical.z-n.z);i=(e+t.canonical.x*Li)*a-n.x*Li|0,o=(r+t.canonical.y*Li)*a-n.y*Li|0}return{tileX:i,tileY:o}}_getHeightAtTileOffset(t,e,r){let n;for(let i=0;i<this.layers.length;++i){if("fill-extrusion"!==this.layers[i].type)continue;const{bucket:o,tileID:s,verticalScale:a}=this.currentBuildingBuckets[i];if(!o)continue;const{tileX:l,tileY:c}=this._mapCoordToOverlappingTile(t,e,r,s),u=o.getHeightAtTileCoord(l,c);if(u&&void 0!==u.height){if(!u.hidden)return u.height*a;n=u.height}}for(let i=0;i<this.layers.length;++i){if("model"!==this.layers[i].type)continue;const{bucket:o,tileID:s}=this.currentBuildingBuckets[i];if(!o)continue;const{tileX:a,tileY:l}=this._mapCoordToOverlappingTile(t,e,r,s),c=o.getHeightAtTileCoord(a,l);if(c&&!c.hidden)return void 0===c.height&&void 0!==n?Math.min(c.maxHeight,n)*c.verticalScale:(c.height||0)*c.verticalScale}return-1}}var oD=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function sD(t,e){const r={};for(const e in t)"ref"!==e&&(r[e]=t[e]);return oD.forEach((t=>{t in e&&(r[t]=e[t])})),r}function aD(t){t=t.slice();const e=Object.create(null);for(let r=0;r<t.length;r++)e[t[r].id]=t[r];for(let r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=sD(t[r],e[t[r].ref]));return t}function lD(){return{version:8,layers:[],sources:{}}}const cD={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setSlot:"setSlot",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight",setTerrain:"setTerrain",setFog:"setFog",setCamera:"setCamera",setLights:"setLights",setProjection:"setProjection",addImport:"addImport",removeImport:"removeImport",setImportUrl:"setImportUrl",setImportData:"setImportData",setImportConfig:"setImportConfig"};function uD(t,e,r){r.push({command:cD.addSource,args:[t,e[t]]})}function hD(t,e,r){e.push({command:cD.removeSource,args:[t]}),r[t]=!0}function fD(t,e,r,n){hD(t,r,n),uD(t,e,r)}function dD(t,e,r){let n;for(n in t[r])if(t[r].hasOwnProperty(n)&&"data"!==n&&!x(t[r][n],e[r][n]))return!1;for(n in e[r])if(e[r].hasOwnProperty(n)&&"data"!==n&&!x(t[r][n],e[r][n]))return!1;return!0}function pD(t,e,r,n){let i;for(i in e=e||{},t=t||{})t.hasOwnProperty(i)&&(e.hasOwnProperty(i)||hD(i,r,n));for(i in e){if(!e.hasOwnProperty(i))continue;const o=e[i];t.hasOwnProperty(i)?x(t[i],o)||("geojson"===t[i].type&&"geojson"===o.type&&dD(t,e,i)?r.push({command:cD.setGeoJSONSourceData,args:[i,o.data]}):fD(i,e,r,n)):uD(i,e,r)}}function mD(t,e,r,n,i,o){let s;for(s in e=e||{},t=t||{})t.hasOwnProperty(s)&&(x(t[s],e[s])||r.push({command:o,args:[n,s,e[s],i]}));for(s in e)e.hasOwnProperty(s)&&!t.hasOwnProperty(s)&&(x(t[s],e[s])||r.push({command:o,args:[n,s,e[s],i]}))}function gD(t){return t.id}function yD(t,e){return t[e.id]=e,t}function _D(t,e,r){e=e||[];const n=(t=t||[]).map(gD),i=e.map(gD),o=t.reduce(yD,{}),s=e.reduce(yD,{}),a=n.slice(),l=Object.create(null);let c,u,h,f,d,p,m;for(c=0,u=0;c<n.length;c++)h=n[c],s.hasOwnProperty(h)?u++:(r.push({command:cD.removeLayer,args:[h]}),a.splice(a.indexOf(h,u),1));for(c=0,u=0;c<i.length;c++)h=i[i.length-1-c],a[a.length-1-c]!==h&&(o.hasOwnProperty(h)?(r.push({command:cD.removeLayer,args:[h]}),a.splice(a.lastIndexOf(h,a.length-u),1)):u++,p=a[a.length-c],r.push({command:cD.addLayer,args:[s[h],p]}),a.splice(a.length-c,0,h),l[h]=!0);for(c=0;c<i.length;c++)if(h=i[c],f=o[h],d=s[h],!l[h]&&!x(f,d))if(x(f.source,d.source)&&x(f["source-layer"],d["source-layer"])&&x(f.type,d.type)){for(m in mD(f.layout,d.layout,r,h,null,cD.setLayoutProperty),mD(f.paint,d.paint,r,h,null,cD.setPaintProperty),x(f.slot,d.slot)||r.push({command:cD.setSlot,args:[h,d.slot]}),x(f.filter,d.filter)||r.push({command:cD.setFilter,args:[h,d.filter]}),x(f.minzoom,d.minzoom)&&x(f.maxzoom,d.maxzoom)||r.push({command:cD.setLayerZoomRange,args:[h,d.minzoom,d.maxzoom]}),f)f.hasOwnProperty(m)&&"layout"!==m&&"paint"!==m&&"filter"!==m&&"metadata"!==m&&"minzoom"!==m&&"maxzoom"!==m&&"slot"!==m&&(0===m.indexOf("paint.")?mD(f[m],d[m],r,h,m.slice(6),cD.setPaintProperty):x(f[m],d[m])||r.push({command:cD.setLayerProperty,args:[h,m,d[m]]}));for(m in d)d.hasOwnProperty(m)&&!f.hasOwnProperty(m)&&"layout"!==m&&"paint"!==m&&"filter"!==m&&"metadata"!==m&&"minzoom"!==m&&"maxzoom"!==m&&"slot"!==m&&(0===m.indexOf("paint.")?mD(f[m],d[m],r,h,m.slice(6),cD.setPaintProperty):x(f[m],d[m])||r.push({command:cD.setLayerProperty,args:[h,m,d[m]]}))}else r.push({command:cD.removeLayer,args:[h]}),p=a[a.lastIndexOf(h)+1],r.push({command:cD.addLayer,args:[d,p]})}function vD(t=[],e=[],r){e=e||[];const n=(t=t||[]).map(gD),i=e.map(gD),o=t.reduce(yD,{}),s=e.reduce(yD,{}),a=n.slice();let l,c,u,h;for(l=0,c=0;l<n.length;l++)u=n[l],s.hasOwnProperty(u)?c++:(r.push({command:cD.removeImport,args:[u]}),a.splice(a.indexOf(u,c),1));for(l=0,c=0;l<i.length;l++)u=i[i.length-1-l],a[a.length-1-l]!==u&&(o.hasOwnProperty(u)?(r.push({command:cD.removeImport,args:[u]}),a.splice(a.lastIndexOf(u,a.length-c),1)):c++,h=a[a.length-l],r.push({command:cD.addImport,args:[s[u],h]}),a.splice(a.length-l,0,u));for(const t of e){const e=o[t.id];if(!e||x(e,t))continue;x(e.config,t.config)||r.push({command:cD.setImportConfig,args:[t.id,t.config]}),x(e.url,t.url)||r.push({command:cD.setImportUrl,args:[t.id,t.url]});const n=e&&e.data,i=t.data;x(n,i)||r.push({command:cD.setImportData,args:[t.id,i]})}}function bD(t,e){if(!t)return[{command:cD.setStyle,args:[e]}];let r=[];try{if(!x(t.version,e.version))return[{command:cD.setStyle,args:[e]}];x(t.center,e.center)||r.push({command:cD.setCenter,args:[e.center]}),x(t.zoom,e.zoom)||r.push({command:cD.setZoom,args:[e.zoom]}),x(t.bearing,e.bearing)||r.push({command:cD.setBearing,args:[e.bearing]}),x(t.pitch,e.pitch)||r.push({command:cD.setPitch,args:[e.pitch]}),x(t.sprite,e.sprite)||r.push({command:cD.setSprite,args:[e.sprite]}),x(t.glyphs,e.glyphs)||r.push({command:cD.setGlyphs,args:[e.glyphs]}
2),x(t.imports,e.imports)||vD(t.imports,e.imports,r),x(t.transition,e.transition)||r.push({command:cD.setTransition,args:[e.transition]}),x(t.light,e.light)||r.push({command:cD.setLight,args:[e.light]}),x(t.fog,e.fog)||r.push({command:cD.setFog,args:[e.fog]}),x(t.projection,e.projection)||r.push({command:cD.setProjection,args:[e.projection]}),x(t.lights,e.lights)||r.push({command:cD.setLights,args:[e.lights]}),x(t.camera,e.camera)||r.push({command:cD.setCamera,args:[e.camera]});const n={},i=[];pD(t.sources,e.sources,i,n);const o=[];t.layers&&t.layers.forEach((t=>{t.source&&n[t.source]?r.push({command:cD.removeLayer,args:[t.id]}):o.push(t)}));let s=t.terrain;s&&n[s.source]&&(r.push({command:cD.setTerrain,args:[void 0]}),s=void 0),r=r.concat(i),x(s,e.terrain)||r.push({command:cD.setTerrain,args:[e.terrain]}),_D(o,e.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:cD.setStyle,args:[e]}]}return r}class xD{constructor(t,e){this.reset(t,e)}reset(t,e){this.points=t||[],this._distances=[0];for(let t=1;t<this.points.length;t++)this._distances[t]=this._distances[t-1]+this.points[t].dist(this.points[t-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(t){if(1===this.points.length)return this.points[0];t=D(t,0,1);let e=1,r=this._distances[e];const n=t*this.paddedLength+this.padding;for(;r<n&&e<this._distances.length;)r=this._distances[++e];const i=e-1,o=this._distances[i],s=r-o,a=s>0?(n-o)/s:0;return this.points[i].mult(1-a).add(this.points[e].mult(a))}}class wD{constructor(t,e,r){const n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(let t=0;t<this.xCellCount*this.yCellCount;t++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)}insertCircle(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)}_insertBoxCell(t,e,r,n,i,o){this.boxCells[i].push(o)}_insertCircleCell(t,e,r,n,i,o){this.circleCells[i].push(o)}_query(t,e,r,n,i,o){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];const s=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(let t=0;t<this.boxKeys.length;t++)s.push({key:this.boxKeys[t],x1:this.bboxes[4*t],y1:this.bboxes[4*t+1],x2:this.bboxes[4*t+2],y2:this.bboxes[4*t+3]});for(let t=0;t<this.circleKeys.length;t++){const e=this.circles[3*t],r=this.circles[3*t+1],n=this.circles[3*t+2];s.push({key:this.circleKeys[t],x1:e-n,y1:r-n,x2:e+n,y2:r+n})}return o?s.filter(o):s}{const a={hitTest:i,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,n,this._queryCell,s,a,o),i?s.length>0:s}}_queryCircle(t,e,r,n,i){const o=t-r,s=t+r,a=e-r,l=e+r;if(s<0||o>this.width||l<0||a>this.height)return!n&&[];
2const c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,a,s,l,this._queryCellCircle,c,u,i),n?c.length>0:c}query(t,e,r,n,i){return this._query(t,e,r,n,!1,i)}hitTest(t,e,r,n,i){return this._query(t,e,r,n,!0,i)}hitTestCircle(t,e,r,n){return this._queryCircle(t,e,r,!0,n)}_queryCell(t,e,r,n,i,o,s,a){const l=s.seenUids,c=this.boxCells[i];if(null!==c){const i=this.bboxes;for(const u of c)if(!l.box[u]){l.box[u]=!0;const c=4*u;if(t<=i[c+2]&&e<=i[c+3]&&r>=i[c+0]&&n>=i[c+1]&&(!a||a(this.boxKeys[u]))){if(s.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[u],x1:i[c],y1:i[c+1],x2:i[c+2],y2:i[c+3]})}}}const u=this.circleCells[i];if(null!==u){const i=this.circles;for(const c of u)if(!l.circle[c]){l.circle[c]=!0;const u=3*c;if(this._circleAndRectCollide(i[u],i[u+1],i[u+2],t,e,r,n)&&(!a||a(this.circleKeys[c]))){if(s.hitTest)return o.push(!0),!0;{const t=i[u],e=i[u+1],r=i[u+2];o.push({key:this.circleKeys[c],x1:t-r,y1:e-r,x2:t+r,y2:e+r})}}}}}_queryCellCircle(t,e,r,n,i,o,s,a){const l=s.circle,c=s.seenUids,u=this.boxCells[i];if(null!==u){const t=this.bboxes;for(const e of u)if(!c.box[e]){c.box[e]=!0;const r=4*e;if(this._circleAndRectCollide(l.x,l.y,l.radius,t[r+0],t[r+1],t[r+2],t[r+3])&&(!a||a(this.boxKeys[e])))return o.push(!0),!0}}const h=this.circleCells[i];if(null!==h){const t=this.circles;for(const e of h)if(!c.circle[e]){c.circle[e]=!0;const r=3*e;if(this._circlesCollide(t[r],t[r+1],t[r+2],l.x,l.y,l.radius)&&(!a||a(this.circleKeys[e])))return o.push(!0),!0}}}_forEachCell(t,e,r,n,i,o,s,a){const l=this._convertToXCellCoord(t),c=this._convertToYCellCoord(e),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++){const c=this.xCellCount*l+f;if(i.call(this,t,e,r,n,c,o,s,a))return}}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,e,r,n,i,o){const s=n-t,a=i-e,l=r+o;return l*l>s*s+a*a}_circleAndRectCollide(t,e,r,n,i,o,s){const a=(o-n)/2,l=Math.abs(t-(n+a));if(l>a+r)return!1;const c=(s-i)/2,u=Math.abs(e-(i+c));if(u>c+r)return!1;if(l<=a||u<=c)return!0;const h=l-a,f=u-c;return h*h+f*f<=r*r}}const ED=100;class SD{constructor(t,e,r=new wD(t.width+2*ED,t.height+2*ED,25),n=new wD(t.width+2*ED,t.height+2*ED,25)){this.transform=t,this.grid=r,this.ignoredGrid=n,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+ED,this.screenBottomBoundary=t.height+ED,this.gridRightBoundary=t.width+2*ED,this.gridBottomBoundary=t.height+2*ED,this.fogState=e}placeCollisionBox(t,e,r,n,i,o,s,a){let l=r.projectedAnchorX,c=r.projectedAnchorY,u=r.projectedAnchorZ;const h=r.elevation,f=r.tileID,d=t.getProjection();if(h&&f){const[t,e,n]=d.upVector(f.canonical,r.tileAnchorX,r.tileAnchorY),i=d.upVectorScale(f.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;l+=t*h*i,c+=e*h*i,u+=n*h*i}const p="globe"===d.name||!!h||this.transform.pitch>0,m=this.projectAndGetPerspectiveRatio(s,l,c,u,r.tileID,p,d),g=o*m.perspectiveRatio,y=(r.x1*e+n.x-r.padding)*g+m.point.x,_=(r.y1*e+n.y-r.padding)*g+m.point.y,v=(r.x2*e+n.x+r.padding)*g+m.point.x,b=(r.y2*e+n.y+r.padding)*g+m.point.y,x=.55,w=m.perspectiveRatio<=x||m.occluded;return!this.isInsideGrid(y,_,v,b)||!i&&this.grid.hitTest(y,_,v,b,a)||w?{box:[],offscreen:!1,occluded:m.occluded}:{box:[y,_,v,b],offscreen:this.isOffscreen(y,_,v,b),occluded:!1}}placeCollisionCircles(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p){const m=[],g=this.transform.elevation,y=t.getProjection(),_=g?g.getAtTileOffsetFunc(p,this.transform.center.lat,this.transform.worldSize,y):null,v=new b(r.tileAnchorX,r.tileAnchorY);let{x,y:w,z:E}=y.projectTilePoint(v.x,v.y,p.canonical);if(_){const[t,e,r]=_(v);x+=t,w+=e,E+=r}const S="globe"===y.name,T=S||!!g||this.transform.pitch>0,A=this.projectAndGetPerspectiveRatio(s,x,w,E,p,T,y),{perspectiveRatio:O}=A,C=(u?o/O:o*O)/sT,M=YM(x,w,E,a),k={},I=r.lineOffsetX*C,P=r.lineOffsetY*C,L=A.signedDistanceFromCamera>0?ek(C,i,I,P,!1,M,v,r,n,a,k,g&&!u?_:null,u&&!!g,y,p,u):null;let R=!1,D=!1,z=!0;if(L&&!A.occluded){const t=.5*f*O+d,r=new b(-ED,-ED),n=new b(this.screenRightBoundary,this.screenBottomBoundary),i=new xD,{first:o,last:s}=L,a=o.path.length;let u=[];for(let t=a-1;t>=1;t--)u.push(o.path[t]);for(let t=1;t<s.path.length;t++)u.push(s.path[t]);const p=2.5*t;l&&(u=u.map((([t,e,r],n)=>(_&&!S&&(r=_(n<a-1?o.tilePath[a-1-n]:s.tilePath[n-a+2])[2]),YM(t,e,r,l)))),u.some((t=>t[3]<=0))&&(u=[]));let g=[];if(u.length>0){let t=1/0,e=-1/0,i=1/0,o=-1/0;for(const r of u)t=Math.min(t,r[0]),i=Math.min(i,r[1]),e=Math.max(e,r[0]),o=Math.max(o,r[1]);e>=r.x&&t<=n.x&&o>=r.y&&i<=n.y&&(g=[u.map((t=>new b(t[0],t[1])))],(t<r.x||e>n.x||i<r.y||o>n.y)&&(g=nA(g,r.x,r.y,n.x,n.y)))}for(const r of g){i.reset(r,.25*t);let n=0;n=i.length<=.5*t?1:Math.ceil(i.paddedLength/p)+1;for(let r=0;r<n;r++){const o=r/Math.max(n-1,1),s=i.lerp(o),a=s.x+ED,l=s.y+ED;m.push(a,l,t,0);const u=a-t,f=l-t,d=a+t,p=l+t;if(z=z&&this.isOffscreen(u,f,d,p),D=D||this.isInsideGrid(u,f,d,p),!e&&this.grid.hitTestCircle(a,l,t,h)&&(R=!0,!c))return{circles:[],offscreen:!1,collisionDetected:R,occluded:!1}}}}return{circles:!c&&R||!D?[]:m,offscreen:z,collisionDetected:R,occluded:A.occluded}}queryRenderedSymbols(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const e=[];let r=1/0,n=1/0,i=-1/0,o=-1/0;for(const s of t){const t=new b(s.x+ED,s.y+ED);r=Math.min(r,t.x),n=Math.min(n,t.y),i=Math.max(i,t.x),o=Math.max(o,t.y),e.push(t)}const s=this.grid.query(r,n,i,o).concat(this.ignoredGrid.query(r,n,i,o)),a={},l={};for(const t of s){const r=t.key;(void 0===a[r.bucketInstanceId]&&(a[r.bucketInstanceId]={}),a[r.bucketInstanceId][r.featureIndex])||Bx(e,[new b(t.x1,t.y1),new b(t.x2,t.y1),new b(t.x2,t.y2),new b(t.x1,t.y2)])&&(a[r.bucketInstanceId][r.featureIndex]=!0,void 0===l[r.bucketInstanceId]&&(l[r.bucketInstanceId]=[]),l[r.bucketInstanceId].push(r.featureIndex))}return l}insertCollisionBox(t,e,r,n,i){const o={bucketInstanceId:r,featureIndex:n,collisionGroupID:i};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])}insertCollisionCircles(t,e,r,n,i){const o=e?this.ignoredGrid:this.grid,s={bucketInstanceId:r,featureIndex:n,collisionGroupID:i};for(let e=0;e<t.length;
2e+=4)o.insertCircle(s,t[e],t[e+1],t[e+2])}projectAndGetPerspectiveRatio(t,e,r,n,i,o,s){const a=[e,r,n,1];let l=!1;if(n||this.transform.pitch>0){uv.transformMat4(a,a,t);const o="globe"===s.name;this.fogState&&i&&!o&&(l=oL(this.fogState,e,r,n,i.toUnwrapped(),this.transform)>eL)}else ck(a,a,t);const c=a[3];return{point:new b((a[0]/c+1)/2*this.transform.width+ED,(-a[1]/c+1)/2*this.transform.height+ED),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(s)/c*.5,1.5),signedDistanceFromCamera:c,occluded:o&&a[2]>c||l}}isOffscreen(t,e,r,n){return r<ED||t>=this.screenRightBoundary||n<ED||e>this.screenBottomBoundary}isInsideGrid(t,e,r,n){return r>=0&&t<this.gridRightBoundary&&n>=0&&e<this.gridBottomBoundary}getViewportMatrix(){const t=_v.identity([]);return _v.translate(t,t,[-ED,-ED,0]),t}}function TD(t,e,r){const n=e.createTileMatrix(t,t.worldSize,r.toUnwrapped());return _v.multiply(new Float32Array(16),t.projMatrix,n)}function AD(t,e,r){if(e.projection.name===r.projection.name)return t.projMatrix;const n=r.clone();return n.setProjection(e.projection),TD(n,e.getProjection(),t)}function OD(t,e,r){return e.name===r.projection.name?t.projMatrix:TD(r,e,t)}function CD(t,e,r,n){return e.name===n?r.calculateProjMatrix(t.toUnwrapped()):TD(r,e,t)}class MD{constructor(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class kD{constructor(t,e,r,n,i,o=!1){this.text=new MD(t?t.text:null,e,r,i),this.icon=new MD(t?t.icon:null,e,n,i),this.clipped=o}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ID{constructor(t,e,r,n=!1){this.text=t,this.icon=e,this.skipFade=r,this.clipped=n}}class PD{constructor(){this.invProjMatrix=_v.create(),this.viewportMatrix=_v.create(),this.circles=[]}}class LD{constructor(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}}class RD{constructor(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}get(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){const e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:t=>t.collisionGroupID===e}}return this.collisionGroups[t]}}function DD(t,e,r,n,i){const{horizontalAlign:o,verticalAlign:s}=VT(t),a=-(o-.5)*e,l=-(s-.5)*r,c=LA(t,n);return new b(a+c[0]*i,l+c[1]*i)}function zD(t,e,r,n,i){const o=new b(t,e);return r&&o._rotate(n?i:-i),o}class BD{constructor(t,e,r,n,i,o){this.transform=t.clone(),this.projection=t.projection.name,this.collisionIndex=new SD(this.transform,i),this.buildingIndex=o,this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new RD(r),this.collisionCircleArrays={},this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,e,r,n){const i=r.getBucket(e),o=r.latestFeatureIndex;if(!i||!o||e.fqid!==i.layerIds[0])return;const s=i.layers[0].layout,a=r.collisionBoxArray,l=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/Li,u=r.tileID.toUnwrapped();this.transform.setProjection(i.projection);const h=CD(r.tileID,i.getProjection(),this.transform,this.projection),f="map"===s.get("text-pitch-alignment"),d="map"===s.get("text-rotation-alignment");e.compileFilter();const p=e.dynamicFilter(),m=e.dynamicFilterNeedsFeature(),g=this.transform.calculatePixelsToTileUnitsMatrix(r),y=ZM(h,r.tileID.canonical,f,d,this.transform,i.getProjection(),g);let _=null;if(f){const t=XM(h,r.tileID.canonical,f,d,this.transform,i.getProjection(),g);_=_v.multiply([],this.transform.labelPlaneMatrix,t)}let v=null;p&&r.latestFeatureIndex&&(v={unwrappedTileID:u,dynamicFilter:p,dynamicFilterNeedsFeature:m,featureIndex:r.latestFeatureIndex}),this.retainedQueryData[i.bucketInstanceId]=new LD(i.bucketInstanceId,o,i.sourceLayerIndex,i.index,r.tileID);const b={bucket:i,layout:s,posMatrix:h,textLabelPlaneMatrix:y,labelToScreenMatrix:_,clippingData:v,scale:l,textPixelRatio:c,holdingForFade:r.holdingForFade(),collisionBoxArray:a,partiallyEvaluatedTextSize:uT(i.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:uT(i.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(i.sourceID)};if(n)for(const e of i.sortKeyRanges){const{sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i}=e;t.push({sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i,parameters:b})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:i.symbolInstances.length,parameters:b})}attemptAnchorPlacement(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y){const{textOffset0:_,textOffset1:v,crossTileID:b}=h,x=[_,v],w=DD(t,r,n,x,i),E=this.collisionIndex.placeCollisionBox(d,i,e,zD(w.x,w.y,o,s,this.transform.angle),u,a,l,c.predicate);if(m){const t=d.getSymbolInstanceIconSize(y,this.transform.zoom,h.placedIconSymbolIndex);if(0===this.collisionIndex.placeCollisionBox(d,t,m,zD(w.x,w.y,o,s,this.transform.angle),u,a,l,c.predicate).box.length)return}if(E.box.length>0){let e;return this.prevPlacement&&this.prevPlacement.variableOffsets[b]&&this.prevPlacement.placements[b]&&this.prevPlacement.placements[b].text&&(e=this.prevPlacement.variableOffsets[b].anch
2or),this.variableOffsets[b]={textOffset:x,width:r,height:n,anchor:t,textScale:i,prevAnchor:e},this.markUsedJustification(d,t,h,p),d.allowVerticalPlacement&&(this.markUsedOrientation(d,p,h),this.placedOrientations[b]=p),{shift:w,placedGlyphBoxes:E}}}placeLayerBucketPart(t,e,r,n){const{bucket:i,layout:o,posMatrix:s,textLabelPlaneMatrix:a,labelToScreenMatrix:l,clippingData:c,textPixelRatio:u,holdingForFade:h,collisionBoxArray:f,partiallyEvaluatedTextSize:d,partiallyEvaluatedIconSize:p,collisionGroup:m}=t.parameters,g=o.get("text-optional"),y=o.get("icon-optional"),_=o.get("text-allow-overlap"),v=o.get("icon-allow-overlap"),x="map"===o.get("text-rotation-alignment"),w="map"===o.get("text-pitch-alignment"),E="viewport-y"===o.get("symbol-z-order"),S=o.get("symbol-z-elevate");this.transform.setProjection(i.projection);let T=_&&(v||!i.hasIconData()||y),A=v&&(_||!i.hasTextData()||g);!i.collisionArrays&&f&&i.deserializeCollisionBoxes(f),r&&n&&i.updateCollisionDebugBuffers(this.transform.zoom,f);const O=(t,n,f)=>{const{crossTileID:E,numVerticalGlyphVertices:S}=t;if(c){const r={zoom:this.transform.zoom,pitch:this.transform.pitch};let n=null;if(c.dynamicFilterNeedsFeature){const e=c.featureIndex,r=this.retainedQueryData[i.bucketInstanceId];n=e.loadFeature({featureIndex:t.featureIndex,bucketIndex:r.bucketIndex,sourceLayerIndex:r.sourceLayerIndex,layoutVertexArrayOffset:0})}const o=this.retainedQueryData[i.bucketInstanceId].tileID.canonical;if(!(0,c.dynamicFilter)(r,n,o,new b(t.tileAnchorX,t.tileAnchorY),this.transform.calculateDistanceTileData(c.unwrappedTileID)))return this.placements[E]=new ID(!1,!1,!1,!0),void e.add(E)}if(e.has(E))return;if(h)return void(this.placements[E]=new ID(!1,!1,!1));let O=!1,C=!1,M=!0,k=!1,I=!1,P=null,L={box:null,offscreen:null,occluded:null},R={box:null,offscreen:null,occluded:null},D=null,z=null,B=null,j=0,F=0,N=0;f.textFeatureIndex?j=f.textFeatureIndex:t.useRuntimeCollisionCircles&&(j=t.featureIndex),f.verticalTextFeatureIndex&&(F=f.verticalTextFeatureIndex);const $=e=>{e.tileID=this.retainedQueryData[i.bucketInstanceId].tileID;const r=this.transform.elevation;e.elevation=t.zOffset+(r?r.getAtTileOffset(e.tileID,e.tileAnchorX,e.tileAnchorY):0)},U=f.textBox;if(U){$(U);const e=e=>{let r=TT.horizontal;if(i.allowVerticalPlacement&&!e&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[E];e&&(this.placedOrientations[E]=e,r=e,this.markUsedOrientation(i,r,t))}return r},r=(t,e)=>{if(i.allowVerticalPlacement&&S>0&&f.verticalTextBox){for(const r of i.writingModes)if(r===TT.vertical?(L=e(),R=L):L=t(),L&&L.box&&L.box.length)break}else L=t()};if(o.get("text-variable-anchor")){let a=o.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[E]){const t=this.prevPlacement.variableOffsets[E];a.indexOf(t.anchor)>0&&(a=a.filter((e=>e!==t.anchor)),a.unshift(t.anchor))}const l=(e,r,o)=>{const l=i.getSymbolInstanceTextSize(d,t,this.transform.zoom,n),c=(e.x2-e.x1)*l+2*e.padding,h=(e.y2-e.y1)*l+2*e.padding,f=t.hasIconTextFit&&!v?r:null;f&&$(f);let g={box:[],offscreen:!1,occluded:!1};const y=_?2*a.length:a.length;for(let r=0;r<y;++r){const y=a[r%a.length],_=r>=a.length,v=this.attemptAnchorPlacement(y,e,c,h,l,x,w,u,s,m,_,t,n,i,o,f,d,p);if(v&&(g=v.placedGlyphBoxes,g&&g.box&&g.box.length)){O=!0,P=v.shift;break}}return g};r((()=>l(U,f.iconBox,TT.horizontal)),(()=>{const t=f.verticalTextBox;t&&$(t);const e=L&&L.box&&L.box.length;return i.allowVerticalPlacement&&!e&&S>0&&t?l(t,f.verticalIconBox,TT.vertical):{box:null,offscreen:null,occluded:null}})),L&&(O=L.box,M=L.offscreen,k=L.occluded);const c=e(!(!L||!L.box));if(!O&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[E];e&&(this.variableOffsets[E]=e,this.markUsedJustification(i,e.anchor,t,c))}}else{const o=(e,r)=>{const o=i.getSymbolInstanceTextSize(d,t,this.transform.zoom,n),a=this.collisionIndex.placeCollisionBox(i,o,e,new b(0,0),_,u,s,m.predicate);return a&&a.box&&a.box.length&&(this.markUsedOrientation(i,r,t),this.placedOrientations[E]=r),a};r((()=>o(U,TT.horizontal)),(()=>{const t=f.verticalTextBox;return i.allowVerticalPlacement&&S>0&&t?($(t),o(t,TT.vertical)):{box:null,offscreen:null,occluded:null}})),e(!!(L&&L.box&&L.box.length))}}if(D=L,O=D&&D.box&&D.box.length>0,M=D&&D.offscreen,k=D&&D.occluded,t.useRuntimeCollisionCircles){const e=t.centerJustifiedTextSymbolIndex>=0?t.centerJustifiedTextSymbolIndex:t.verticalPlacedTextSymbolIndex,n=i.text.placedSymbolArray.get(e),c=cT(i.textSizeData,d,n),u=o.get("text-padding"),h=t.collisionCircleDiameter*c/sT;z=this.collisionIndex.placeCollisionCircles(i,_,n,i.lineVertexArray,i.glyphOffsetArray,c,s,a,l,r,w,m.predicate,h,u,this.retainedQueryData[i.bucketInstanceId].tileID),O=_||z.circles.length>0&&!z.collisionDetected,M=M&&z.offscreen,k=z.occluded}if(f.iconFeatureIndex&&(N=f.iconFeatureIndex),f.iconBox){const e=e=>{$(e);const r=t.hasIconTextFit&&P?zD(P.x,P.y,x,w,this.transform.angle):new b(0,0),n=i.getSymbolInstanceIconSize(p,this.transform.zoom,t.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(i,n,e,r,v,u,s,m.predicate)};R&&R.box&&R.box.length&&f.verticalIconBox?(B=e(f.verticalIconBox),C=B.box.length>0):(B=e(f.iconBox),C=B.box.length>0),M=M&&B.offscreen,I=B.occluded}const V=g||0===t.numHorizontalGlyphVertices&&0===S,G=y||0===t.numIconVertices;if(V||G?G?V||(C=C&&O):O=C&&O:C=O=C&&O,O&&D&&D.box&&(R&&R.box&&F?this.collisionIndex.insertCollisionBox(D.box,o.get("text-ignore-placement"),i.bucketInstanceId,F,m.ID):this.collisionIndex.insertCollisionBox(D.box,o.get("text-ignore-placement"),i.bucketInstanceId,j,m.ID)),C&&B&&this.collisionIndex.insertCollisionBox(B.box,o.get("icon-ignore-placement"),i.bucketInstanceId,N,m.ID),z&&(O&&this.collisionIndex.insertCollisionCircles(z.circles,o.get("text-ignore-placement"),i.bucketInstanceId,j,m.ID),r)){const t=i.bucketInstanceId;let e=this.collisionCircleArrays[t];void 0===e&&(e=this.collisionCircleArrays[t]=new PD);for(let t=0;t<z.circles.length;t+=4)e.circles.push(z.circles[t+0]),e.circles.push(z.circles[t+1]),e.circles.push(z.circles[t+2]),e.circles.push(z.collisionDetected?1:0)}const q="globe"!==i.projection.name;T=T&&(q||!k),A=A&&(q||!I),this.placements[E]=new ID(O||T,C||A,M||i.justReloaded),e.add(E)};if(S&&this.buildingIndex){const t=this.retainedQueryData[i.bucketInstanceId].tileID;this.buildingIndex.updateZOffset(i,t),i.updateZOffset()}
2if(E){const t=i.getSortedSymbolIndexes(this.transform.angle);for(let e=t.length-1;e>=0;--e){const r=t[e];O(i.symbolInstances.get(r),r,i.collisionArrays[r])}i.hasAnyZOffset&&it(`${i.layerIds[0]} layer symbol-z-elevate: symbols are not sorted by elevation if symbol-z-order is evaluated to viewport-y`)}else if(i.hasAnyZOffset){const t=i.getSortedIndexesByZOffset();for(let e=0;e<t.length;++e){const r=t[e];O(i.symbolInstances.get(r),r,i.collisionArrays[r])}}else for(let e=t.symbolInstanceStart;e<t.symbolInstanceEnd;e++)O(i.symbolInstances.get(e),e,i.collisionArrays[e]);if(r&&i.bucketInstanceId in this.collisionCircleArrays){const t=this.collisionCircleArrays[i.bucketInstanceId];_v.invert(t.invProjMatrix,s),t.viewportMatrix=this.collisionIndex.getViewportMatrix()}i.justReloaded=!1}markUsedJustification(t,e,r,n){const{leftJustifiedTextSymbolIndex:i,centerJustifiedTextSymbolIndex:o,rightJustifiedTextSymbolIndex:s,verticalPlacedTextSymbolIndex:a,crossTileID:l}=r,c=DA(e),u=n===TT.vertical?a:"left"===c?i:"center"===c?o:"right"===c?s:-1;i>=0&&(t.text.placedSymbolArray.get(i).crossTileID=u>=0&&i!==u?0:l),o>=0&&(t.text.placedSymbolArray.get(o).crossTileID=u>=0&&o!==u?0:l),s>=0&&(t.text.placedSymbolArray.get(s).crossTileID=u>=0&&s!==u?0:l),a>=0&&(t.text.placedSymbolArray.get(a).crossTileID=u>=0&&a!==u?0:l)}markUsedOrientation(t,e,r){const n=e===TT.horizontal||e===TT.horizontalOnly?e:0,i=e===TT.vertical?e:0,{leftJustifiedTextSymbolIndex:o,centerJustifiedTextSymbolIndex:s,rightJustifiedTextSymbolIndex:a,verticalPlacedTextSymbolIndex:l}=r,c=t.text.placedSymbolArray;o>=0&&(c.get(o).placedOrientation=n),s>=0&&(c.get(s).placedOrientation=n),a>=0&&(c.get(a).placedOrientation=n),l>=0&&(c.get(l).placedOrientation=i)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const e=this.prevPlacement;let r=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;const n=e?e.symbolFadeChange(t):1,i=e?e.opacities:{},o=e?e.variableOffsets:{},s=e?e.placedOrientations:{};for(const t in this.placements){const e=this.placements[t],o=i[t];o?(this.opacities[t]=new kD(o,n,e.text,e.icon,null,e.clipped),r=r||e.text!==o.text.placed||e.icon!==o.icon.placed):(this.opacities[t]=new kD(null,n,e.text,e.icon,e.skipFade,e.clipped),r=r||e.text||e.icon)}for(const t in i){const e=i[t];if(!this.opacities[t]){const i=new kD(e,n,!1,!1);i.isHidden()||(this.opacities[t]=i,r=r||e.text.placed||e.icon.placed)}}for(const t in o)this.variableOffsets[t]||!this.opacities[t]||this.opacities[t].isHidden()||(this.variableOffsets[t]=o[t]);for(const t in s)this.placedOrientations[t]||!this.opacities[t]||this.opacities[t].isHidden()||(this.placedOrientations[t]=s[t]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)}updateLayerOpacities(t,e){const r=new Set;for(const n of e){const e=n.getBucket(t);e&&n.latestFeatureIndex&&t.fqid===e.layerIds[0]&&(this.updateBucketOpacities(e,r,n.collisionBoxArray),e.layers[0].layout.get("symbol-z-elevate")&&this.buildingIndex&&(this.buildingIndex.updateZOffset(e,n.tileID),e.updateZOffset()))}}updateBucketOpacities(t,e,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const n=t.layers[0].layout,i=!!t.layers[0].dynamicFilter(),o=new kD(null,0,!1,!1,!0),s=n.get("text-allow-overlap"),a=n.get("icon-allow-overlap"),l=n.get("text-variable-anchor"),c="map"===n.get("text-rotation-alignment"),u="map"===n.get("text-pitch-alignment"),h=new kD(null,0,s&&(a||!t.hasIconData()||n.get("icon-optional")),a&&(s||!t.hasTextData()||n.get("text-optional")),!0);!t.collisionArrays&&r&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(r);const f=(t,e,r)=>{for(let n=0;n<e/4;n++)t.opacityVertexArray.emplaceBack(r)};let d=0;for(let r=0;r<t.symbolInstances.length;r++){const n=t.symbolInstances.get(r),{numHorizontalGlyphVertices:s,numVerticalGlyphVertices:a,crossTileID:p,numIconVertices:m}=n,g=e.has(p);let y=this.opacities[p];g?y=o:y||(y=h,this.opacities[p]=y),e.add(p);const _=s>0||a>0,v=m>0,x=this.placedOrientations[p],w=x===TT.vertical,E=x===TT.horizontal||x===TT.horizontalOnly;if(!_&&!v||y.isHidden()||d++,_){const e=HD(y.text),r=w?WD:e;f(t.text,s,r);const i=E?WD:e;f(t.text,a,i);const o=y.text.isHidden(),{leftJustifiedTextSymbolIndex:l,centerJustifiedTextSymbolIndex:c,rightJustifiedTextSymbolIndex:u,verticalPlacedTextSymbolIndex:h}=n,d=t.text.placedSymbolArray,m=o||w?1:0;l>=0&&(d.get(l).hidden=m),c>=0&&(d.get(c).hidden=m),u>
2=0&&(d.get(u).hidden=m),h>=0&&(d.get(h).hidden=o||E?1:0);const g=this.variableOffsets[p];g&&this.markUsedJustification(t,g.anchor,n,x);const _=this.placedOrientations[p];_&&(this.markUsedJustification(t,"left",n,_),this.markUsedOrientation(t,_,n))}if(v){const e=HD(y.icon),{placedIconSymbolIndex:r,verticalPlacedIconSymbolIndex:i}=n,o=t.icon.placedSymbolArray,s=y.icon.isHidden()?1:0;if(r>=0){const n=w?WD:e;f(t.icon,m,n),o.get(r).hidden=s}if(i>=0){const r=E?WD:e;f(t.icon,n.numVerticalIconVertices,r),o.get(i).hidden=s}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const e=t.collisionArrays[r];if(e){let r=new b(0,0),o=!0;if(e.textBox||e.verticalTextBox){if(l){const t=this.variableOffsets[p];t?(r=DD(t.anchor,t.width,t.height,t.textOffset,t.textScale),c&&r._rotate(u?this.transform.angle:-this.transform.angle)):o=!1}i&&(o=!y.clipped),e.textBox&&jD(t.textCollisionBox.collisionVertexArray,y.text.placed,!o||w,r.x,r.y),e.verticalTextBox&&jD(t.textCollisionBox.collisionVertexArray,y.text.placed,!o||E,r.x,r.y)}const s=o&&Boolean(!E&&e.verticalIconBox);e.iconBox&&jD(t.iconCollisionBox.collisionVertexArray,y.icon.placed,s,n.hasIconTextFit?r.x:0,n.hasIconTextFit?r.
2y:0),e.verticalIconBox&&jD(t.iconCollisionBox.collisionVertexArray,y.icon.placed,!s,n.hasIconTextFit?r.x:0,n.hasIconTextFit?r.y:0)}}}if(t.fullyClipped=0===d,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){const e=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=e.invProjMatrix,t.placementViewportMatrix=e.viewportMatrix,t.collisionCircleArray=e.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(t,e){const r=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*r>t}setStale(){this.stale=!0}}function jD(t,e,r,n,i){t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0)}const FD=Math.pow(2,25),ND=Math.pow(2,24),$D=Math.pow(2,17),UD=Math.pow(2,16),VD=Math.pow(2,9),GD=Math.pow(2,8),qD=Math.pow(2,1);function HD(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;const e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*FD+e*ND+r*$D+e*UD+r*VD+e*GD+r*qD+e}const WD=0;class ZD{constructor(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs=new Set,this._bucketParts=[]}continuePlacement(t,e,r,n,i){const o=this._bucketParts;for(;this._currentTileIndex<t.length;){const r=t[this._currentTileIndex];if(e.getBucketParts(o,n,r,this._sortAcrossTiles),this._currentTileIndex++,i())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort(((t,e)=>t.sortKey-e.sortKey)));this._currentPartIndex<o.length;){const t=o[this._currentPartIndex];if(e.placeLayerBucketPart(t,this._seenCrossTileIDs,r,0===t.symbolInstanceStart),this._currentPartIndex++,i())return!0}return!1}}class XD{constructor(t,e,r,n,i,o,s,a,l){this.placement=new BD(t,i,o,s,a,l),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1}isDone(){return this._done}continuePlacement(t,e,r,n){const i=vr.now(),o=()=>{const t=vr.now()-i;return!this._forceFullPlacement&&t>2};for(;this._currentPlacementIndex>=0;){const i=e[t[this._currentPlacementIndex]],s=this.placement.collisionIndex.transform.zoom;if("symbol"===i.type&&(!i.minzoom||i.minzoom<=s)&&(!i.maxzoom||i.maxzoom>s)){const t=i,e=t.layout.get("symbol-z-elevate"),s=this._inProgressLayer=this._inProgressLayer||new ZD(t),a=Bc(i.source,i.scope);if(s.continuePlacement(e?n[a]:r[a],this.placement,this._showCollisionBoxes,i,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const YD=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],KD=1,JD=8;class QD{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(n!==KD)throw new Error(`Got v${n} data when expected v${KD}.`);const i=YD[15&r];if(!i)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new QD(s,o,i,t)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=YD.indexOf(this.ArrayType),o=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,JD,t),this.coords=new this.ArrayType(this.data,JD+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(JD+o+s+a),this.ids=new this.IndexArrayType(this.data,JD,t),this.coords=new this.ArrayType(this.data,JD+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(KD<<4)+i]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}
vendor: 6,589 bytes, line 2
2add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return tz(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[];for(;a.length;){const c=a.pop()||0,u=a.pop()||0,h=a.pop()||0;if(u-h<=s){for(let s=h;s<=u;s++){const a=o[2*s],c=o[2*s+1];a>=t&&a<=r&&c>=e&&c<=n&&l.push(i[s])}continue}const f=h+u>>1,d=o[2*f],p=o[2*f+1];d>=t&&d<=r&&p>=e&&p<=n&&l.push(i[f]),(0===c?t<=d:e<=p)&&(a.push(h),a.push(f-1),a.push(1-c)),(0===c?r>=d:n>=p)&&(a.push(f+1),a.push(u),a.push(1-c))}return l}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:i,nodeSize:o}=this,s=[0,n.length-1,0],a=[],l=r*r;for(;s.length;){const c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let r=h;r<=u;r++)iz(i[2*r],i[2*r+1],t,e)<=l&&a.push(n[r]);continue}const f=h+u>>1,d=i[2*f],p=i[2*f+1];iz(d,p,t,e)<=l&&a.push(n[f]),(0===c?t-r<=d:e-r<=p)&&(s.push(h),s.push(f-1),s.push(1-c)),(0===c?t+r>=d:e+r>=p)&&(s.push(f+1),s.push(u),s.push(1-c))}return a}}function tz(t,e,r,n,i,o){if(i-n<=r)return;const s=n+i>>1;ez(t,e,s,n,i,o),tz(t,e,r,n,s-1,1-o),tz(t,e,r,s+1,i,1-o)}function ez(t,e,r,n,i,o){for(;i>n;){if(i-n>600){const s=i-n+1,a=r-n+1,l=Math.log(s),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(s-c)/s)*(a-s/2<0?-1:1);ez(t,e,r,Math.max(n,Math.floor(r-a*c/s+u)),Math.min(i,Math.floor(r+(s-a)*c/s+u)),o)}const s=e[2*r+o];let a=n,l=i;for(rz(t,e,n,r),e[2*i+o]>s&&rz(t,e,n,i);a<l;){for(rz(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*n+o]===s?rz(t,e,n,l):(l++,rz(t,e,l,i)),l<=r&&(n=l+1),r<=l&&(i=l-1)}}function rz(t,e,r,n){nz(t,r,n),nz(e,2*r,2*n),nz(e,2*r+1,2*n+1)}function nz(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function iz(t,e,r,n){const i=t-r,o=e-n;return i*i+o*o}const oz=512/Li/2;class sz{constructor(t,e,r){this.tileID=t,this.bucketInstanceId=r,this.index=new QD(e.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];const n=t.canonical.x*Li,i=t.canonical.y*Li;for(let t=0;t<e.length;t++){const{key:r,crossTileID:o,tileAnchorX:s,tileAnchorY:a}=e.get(t),l=Math.floor((n+s)*oz),c=Math.floor((i+a)*oz);this.index.add(l,c),this.keys.push(r),this.crossTileIDs.push(o)}this.index.finish()}findMatches(t,e,r){const n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=oz/Math.pow(2,e.canonical.z-this.tileID.canonical.z),o=e.canonical.x*Li,s=e.canonical.y*Li;for(let e=0;e<t.length;e++){const a=t.get(e);if(a.crossTileID)continue;const{key:l,tileAnchorX:c,tileAnchorY:u}=a,h=Math.floor((o+c)*i),f=Math.floor((s+u)*i),d=this.index.range(h-n,f-n,h+n,f+n);for(const t of d){const e=this.crossTileIDs[t];if(this.keys[t]===l&&!r.has(e)){r.add(e),a.crossTileID=e;break}}}}}class az{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class lz{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const e=Math.round((t-this.lng)/360);if(0!==e)for(const t in this.indexes){const r=this.indexes[t],n={};for(const t in r){const i=r[t];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),n[i.tileID.key]=i}this.indexes[t]=n}this.lng=t}addBucket(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let t=0;t<e.symbolInstances.length;t++)e.symbolInstances.get(t).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]=new Set);const n=this.usedCrossTileIDs[t.overscaledZ];for(const r in this.indexes){const i=this.indexes[r];if(Number(r)>t.overscaledZ)for(const r in i){const o=i[r];o.tileID.isChildOf(t)&&o.findMatches(e.symbolInstances,t,n)}else{const o=i[t.scaledTo(Number(r)).key];o&&o.findMatches(e.symbolInstances,t,n)}}for(let t=0;t<e.symbolInstances.length;t++){const i=e.symbolInstances.get(t);i.crossTileID||(i.crossTileID=r.generate(),n.add(i.crossTileID))}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new sz(t,e.symbolInstances,e.bucketInstanceId),!0}removeBucketCrossTileIDs(t,e){for(const r of e.crossTileIDs)this.usedCrossTileIDs[t].delete(r)}removeStaleBuckets(t){let e=!1;for(const r in this.indexes){const n=this.indexes[r];for(const i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e}}class cz{constructor(){this.layerIndexes={},this.crossTileIDs=new az,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(t,e,r,n){let i=this.layerIndexes[t.fqid];void 0===i&&(i=this.layerIndexes[t.fqid]=new lz);let o=!1;const s={};"globe"!==n.name&&i.handleWrapJump(r);for(const r of e){const e=r.getBucket(t);e&&t.fqid===e.layerIds[0]&&(e.bucketInstanceId||(e.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(r.tileID,e,this.crossTileIDs)&&(o=!0),s[e.bucketInstanceId]=!0)}return i.removeStaleBuckets(s)&&(o=!0),o}pruneUnusedLayers(t){const e={};t.forEach((t=>{e[t]=!0}));for(const t in this.layerIndexes)e[t]||delete this.layerIndexes[t]}}var uz="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#ifdef RENDER_CUTOFF\nfloat cutoff_opacity(vec4 cutoff_params,float depth) {float near=cutoff_params.x;float far=cutoff_params.y;float cutoffStart=cutoff_params.z;float cutoffEnd=cutoff_params.w-0.0001;float linearDepth=(depth-near)/(far-near);return clamp((linearDepth-cutoffStart)/(cutoffEnd-cutoffStart),0.0,1.0);}\n#endif",hz="\nout vec4 glFragColor;highp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}\n#ifdef INDICATOR_CUTOUT\nuniform vec2 u_indicator_cutout_centers;uniform vec4 u_indicator_cutout_params;\n#endif\nvec4 applyCutout(vec4 color) {\n#ifdef INDICATOR_CUTOUT\nfloat holeMinOpacity=u_indicator_cutout_params.x;float holeRadius=max(u_indicator_cutout_params.y,0.0);float holeAspectRatio=u_indicator_cutout_params.z;
2float fadeStart=u_indicator_cutout_params.w;float distA=distance(vec2(gl_FragCoord.x,gl_FragCoord.y*holeAspectRatio),vec2(u_indicator_cutout_centers[0],u_indicator_cutout_centers[1]*holeAspectRatio));return color*min(smoothstep(fadeStart,holeRadius,distA)+holeMinOpacity,1.0);\n#else\nreturn color;\n#endif\n}\n#ifdef DEBUG_WIREFRAME\n#define HANDLE_WIREFRAME_DEBUG \\\nglFragColor=vec4(0.7,0.0,0.0,0.7); \\\ngl_FragDepth=gl_FragCoord.z-0.0001;\n#else\n#define HANDLE_WIREFRAME_DEBUG\n#endif\n#ifdef RENDER_CUTOFF\nuniform highp vec4 u_cutoff_params;in float v_cutoff_opacity;\n#endif",fz="\n#define EXTENT 8192.0\n#define RAD_TO_DEG 180.0/PI\n#define DEG_TO_RAD PI/180.0\n#define GLOBE_RADIUS EXTENT/PI/2.0\nfloat wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;}\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) {\n#ifndef PROJECTED_POS_ON_VIEWPORT\nfloat tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz;\n#else\nreturn vec3(0.0);\n#endif\n}vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);}\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(\nunpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(PI/4.0+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}\n#ifdef RENDER_CUTOFF\nuniform vec4 u_cutoff_params;out float v_cutoff_opacity;\n#endif\nconst vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);const float skirtOffset=24575.0;vec3 decomposeToPosAndSkirt(vec2 posWithComposedSkirt)\n{float skirt=float(posWithComposedSkirt.x >=skirtOffset);vec2 pos=posWithComposedSkirt-vec2(skirt*skirtOffset,0.0);return vec3(pos,skirt);}",dz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform vec4 u_color;uniform float u_opacity;\n#ifdef LIGHTING_3D_MODE\nin vec4 v_color;\n#endif\nvoid main() {vec4 out_color;\n#ifdef LIGHTING_3D_MODE\nout_color=v_color;\n#else\nout_color=u_color;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nglFragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',pz='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_lighting.glsl"\nin vec2 a_pos;uniform mat4 u_matrix;\n#ifdef LIGHTING_3D_MODE\nuniform mediump vec4 u_color;out vec4 v_color;uniform float u_emissive_strength;\n#endif\nvoid main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting_with_emission_ground(u_color,u_emissive_strength);\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',mz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform float u_emissive_strength;uniform sampler2D u_image;in vec2 v_pos;void main() {vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=texture(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nglFragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',gz='#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_pattern_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',yz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nin vec3 v_data;in float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nuniform float u_emissive_strength;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\nglFragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\n}',_z='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_terrain.vertex.glsl"\n#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;in vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_pos_3;in vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nout vec3 v_data;out float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\n#ifdef PROJECTION_GLOBE_VIEW\nreturn u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) );\n#else\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#endif\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);vec4 world_center;mat3 surface_vectors;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1);
2\n#else \nsurface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1);\n#endif\nvec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center;\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nocclusion_world_center=world_center;occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}',vz="void main() {glFragColor=vec4(1.0);}",bz="in vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",xz='#include "_prelude_fog.fragment.glsl"\nuniform highp float u_intensity;in 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);glFragColor=vec4(val,1.0,1.0,1.0);\n#ifdef FOG\nif (u_is_globe==0) {glFragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',wz='#include "_prelude_terrain.vertex.glsl"\n#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;in vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_pos_3;in vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nout vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 tilePos=floor(a_pos*0.5);vec3 pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#else\npos=vec3(tilePos+extrude,elevation(tilePos));\n#endif\ngl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}',Ez="uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));glFragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(0.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}",Sz="in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}",Tz="in float v_placed;in float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);glFragColor =mix(red,blue,step(0.5,v_placed))*0.5;glFragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}",Az='#include "_prelude_terrain.vertex.glsl"\nin vec3 a_pos;in vec2 a_anchor_pos;in vec2 a_extrude;in vec2 a_placed;in vec2 a_shift;in float a_size_scale;in vec2 a_padding;in float a_z_offset;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;out float v_placed;out float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*(a_z_offset+elevation(a_anchor_pos)),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}',Oz="in float v_radius;in vec2 v_extrude;in float v_perspective_ratio;in 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);glFragColor=color*alpha*opacity_t;}",Cz="in vec2 a_pos_2f;in float a_radius;in vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;out float v_radius;out vec2 v_extrude;out float v_perspective_ratio;out float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",Mz="uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);glFragColor=mix(u_color,overlay_color,overlay_color.a);}",kz='#include "_prelude_terrain.vertex.glsl"\nin vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_pos_3;\n#endif\nout vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0;\n#ifdef PROJECTION_GLOBE_VIEW\ngl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1);\n#else\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);\n#endif\n}',Iz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nuniform float u_emissive_strength;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nvec4 out_color=color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nglFragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Pz='#include "_prelude_fog.vertex.glsl"\nin vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',Lz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nin vec2 v_pos;uniform float u_emissive_strength;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nglFragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Rz='#include "_prelude_fog.vertex.glsl"\nin vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;out vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',Dz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_emissive_strength;in vec2 v_pos;in vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=texture(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nglFragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',zz='#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos;out vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',Bz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform vec2 u_texsize;uniform sampler2D u_image;in vec2 v_pos;uniform float u_emissive_strength;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nglFragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',jz='#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',Fz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_shadow.fragment.glsl"\n#include "_prelude_lighting.glsl"\nin vec4 v_color;in vec4 v_flat;\n#ifdef RENDER_SHADOWS\nin highp vec4 v_pos_light_view_0;in highp vec4 v_pos_light_view_1;in float v_depth;\n#endif\nuniform lowp float u_opacity;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;in vec2 v_ao;\n#endif\n#if defined(ZERO_ROOF_RADIUS) && !defined(LIGHTING_3D_MODE)\nin vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE)\nin highp vec3 v_normal;\n#endif\nuniform vec3 u_flood_light_color;uniform highp float u_vertical_scale;uniform float u_flood_light_intensity;uniform vec3 u_ground_shadow_factor;\n#if defined(LIGHTING_3D_MODE) && defined(FLOOD_LIGHT)\nin float v_flood_radius;in float v_has_floodlight;\n#endif\nuniform float u_emissive_strength;in float v_height;void main() {\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE)\nvec3 normal=normalize(v_normal);\n#endif\nfloat z;vec4 color=v_color;\n#ifdef ZERO_ROOF_RADIUS\nz=float(normal.z > 0.00001);\n#ifdef LIGHTING_3D_MODE\nnormal=mix(normal,vec3(0.0,0.0,1.0),z);\n#else\ncolor=mix(v_color,v_roof_color,z);\n#endif\n#endif\nfloat h=max(0.0,v_height);float ao_shade=1.0;\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h_floors=h/(u_ao[1]*u_vertical_scale);float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);ao_shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;\n#ifdef ZERO_ROOF_RADIUS\nconcave*=(1.0-z);\n#endif\nfloat x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);ao_shade*=mix(1.0,x_shade*x_shade*x_shade,concave);\n#ifdef LIGHTING_3D_MODE\n#ifdef FLOOD_LIGHT\ncolor.rgb*=mix(ao_shade,1.0,v_has_floodlight);\n#else\ncolor.rgb*=ao_shade;\n#endif\n#else\ncolor.rgb*=ao_shade;\n#endif\n#endif\n#ifdef LIGHTING_3D_MODE\nfloat flood_radiance=0.0;\n#ifdef FLOOD_LIGHT\nflood_radiance=(1.0-min(h/v_flood_radius,1.0))*u_flood_light_intensity*v_has_floodlight;\n#endif\n#ifdef RENDER_SHADOWS\n#ifdef FLOOD_LIGHT\nfloat ndotl_unclamped=dot(normal,u_shadow_direction);float ndotl=max(0.0,ndotl_unclamped);float occlusion=ndotl_unclamped < 0.0 ? 1.0 : shadow_occlusion(ndotl,v_pos_light_view_0,v_pos_light_view_1,v_depth);vec3 litColor=apply_lighting(color.rgb,normal,(1.0-u_shadow_intensity*occlusion)*ndotl);vec3 floodLitColor=compute_flood_lighting(u_flood_light_color*u_opacity,1.0-u_shadow_intensity,occlusion,u_ground_shadow_factor);color.rgb=mix(litColor,floodLitColor,flood_radiance);\n#else\nfloat shadowed_lighting_factor=shadowed_light_factor_normal(normal,v_pos_light_view_0,v_pos_light_view_1,v_depth);color.rgb=apply_lighting(color.rgb,normal,shadowed_lighting_factor);\n#endif\n#else\ncolor.rgb=apply_lighting(color.rgb,normal);\n#ifdef FLOOD_LIGHT\ncolor.rgb=mix(color.rgb,u_flood_light_color*u_opacity,flood_radiance);\n#endif\n#endif\ncolor.rgb=mix(color.rgb,v_flat.rgb,u_emissive_strength);color*=u_opacity;\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos,h));\n#endif\n#ifdef RENDER_CUTOFF\ncolor*=v_cutoff_opacity;\n#endif\n#ifdef INDICATOR_CUTOUT\ncolor=applyCutout(color);\n#endif\nglFragColor=color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Nz='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_terrain.vertex.glsl"\n#include "_prelude_shadow.vertex.glsl"\n#include "_prelude_lighting.glsl"\n#ifdef RENDER_CUTOFF\ninvariant gl_Position;\n#endif\nuniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform float u_edge_radius;in vec4 a_pos_normal_ed;in vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_pos_3;in vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nuniform highp float u_vertical_scale;out vec4 v_color;out vec4 v_flat;\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out highp vec4 v_pos_light_view_0;out highp vec4 v_pos_light_view_1;out float v_depth;\n#endif\n#if defined(ZERO_ROOF_RADIUS) && !defined(LIGHTING_3D_MODE)\nout vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE)\nout highp vec3 v_normal;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;out vec2 v_ao;\n#endif\n#if defined(LIGHTING_3D_MODE) && defined(FLOOD_LIGHT)\nout float v_flood_radius;out float v_has_floodlight;\n#endif\nout float v_height;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define highp float flood_light_wall_radius\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize highp float flood_light_wall_radius\nbase*=u_vertical_scale;height*=u_vertical_scale;vec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) || defined(LIGHTING_3D_MODE)\nv_normal=normal;\n#endif\nbase=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=0.0;float c_ele;vec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h);\n#else\nh=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);h=h-ele;v_height=h;\n#ifdef RENDER_SHADOWS\nvec3 shd_pos0=pos;vec3 shd_pos1=pos;\n#ifdef NORMAL_OFFSET\nvec3 offset=shadow_normal_offset(normal);shd_pos0+=offset*shadow_normal_offset_multiplier0();shd_pos1+=offset*shadow_normal_offset_multiplier1();\n#endif\nv_pos_light_view_0=u_light_matrix_0*vec4(shd_pos0,1);v_pos_light_view_1=u_light_matrix_1*vec4(shd_pos1,1);v_depth=gl_Position.w;\n#endif\nfloat NdotL=0.0;float colorvalue=0.0;\n#ifndef LIGHTING_3D_MODE\ncolorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),NdotL);if (normal.y !=0.0) {float r=0.84;r=mix(0.7,0.98,1.0-u_lightintensity);NdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}
2\n#endif\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec2(mix(concave,-concave,start),y_ground);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\n#ifdef FLOOD_LIGHT\nfloat is_wall=1.0-float(t > 0.0 && top_up_ny.y > 0.0);v_has_floodlight=float(flood_light_wall_radius > 0.0 && is_wall > 0.0);v_flood_radius=flood_light_wall_radius*u_vertical_scale;\n#endif\nv_color=vec4(color.rgb,1.0);v_flat=vec4(linearProduct(color.rgb,vec3(calculate_NdotL(normal))),1.0);\n#else\nv_color=vec4(0.0,0.0,0.0,1.0);v_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_color*=u_opacity;\n#endif\n#if defined(ZERO_ROOF_RADIUS) && !defined(LIGHTING_3D_MODE)\nfloat roofNdotL=clamp(u_lightpos.z,0.0,1.0);roofNdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roofNdotL);v_roof_color=vec4(0.0,0.0,0.0,1.0);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_roof_color*=u_opacity;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n#ifdef RENDER_CUTOFF\nv_cutoff_opacity=cutoff_opacity(u_cutoff_params,gl_Position.z);\n#endif\n}',$z='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform vec2 u_texsize;uniform sampler2D u_image;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;in vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nin vec3 v_normal;\n#endif\nin vec2 v_pos;in vec4 v_lighting;uniform lowp float u_opacity;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define mediump vec4 pattern\n#pragma mapbox: define highp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize highp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color,normalize(v_normal))*u_opacity;\n#else\nout_color=out_color*v_lighting;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\n#ifdef INDICATOR_CUTOUT\nout_color=applyCutout(out_color);\n#endif\nglFragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Uz='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_terrain.vertex.glsl"\n#include "_prelude_lighting.glsl"\nuniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform float u_tile_units_to_pixels;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;in vec4 a_pos_normal_ed;in vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_pos_3;in vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nout vec2 v_pos;out vec4 v_lighting;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;out vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nout vec3 v_normal;\n#endif\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define mediump vec4 pattern\n#pragma mapbox: define highp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize highp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;
2base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=z;vec3 p;float c_ele;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h);\n#else\np=vec3(pos_nx.xy,z);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0\n? pos_nx.xy\n: vec2(edgedistance,z*u_height_factor);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float NdotL=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\nNdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(ce
2ntroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_normal=normal;\n#else\nv_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;\n#endif \n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}',Vz="precision highp float;uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;float getElevation(vec2 coord) {return texture(u_image,coord).r/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos+vec2(epsilon.x,0));float f=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float g=getElevation(v_pos+vec2(0,epsilon.y));float h=getElevation(v_pos+vec2(epsilon.x,epsilon.y));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2(\n(c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));glFragColor=clamp(vec4(\nderiv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);}",Gz="uniform highp float u_ao_pass;uniform highp float u_opacity;uniform highp float u_flood_light_intensity;uniform highp vec3 u_flood_light_color;uniform highp float u_attenuation;uniform sampler2D u_fb;uniform float u_fb_size;\n#ifdef SDF_SUBPASS\nin highp vec2 v_pos;in highp vec4 v_line_segment;in highp float v_flood_light_radius_tile;in highp vec2 v_ao;float line_df(highp vec2 a,highp vec2 b,highp vec2 p) {highp vec2 ba=b-a;highp vec2 pa=p-a;highp float r=clamp(dot(pa,ba)/dot(ba,ba),0.0,1.0);return length(pa-r*ba);}\n#ifdef FOG\nin highp float v_fog;\n#endif\n#endif\nvoid main() {\n#ifdef CLEAR_SUBPASS\nvec4 color=vec4(1.0);\n#ifdef CLEAR_FROM_TEXTURE\ncolor=texture(u_fb,gl_FragCoord.xy/vec2(u_fb_size));\n#endif\nglFragColor=color;\n#else\n#ifdef SDF_SUBPASS\nhighp float d=line_df(v_line_segment.xy,v_line_segment.zw,v_pos);highp float effect_radius=mix(v_flood_light_radius_tile,v_ao.y,u_ao_pass);d/=effect_radius;d=min(d,1.0);d=1.0-pow(1.0-d,u_attenuation);highp float effect_intensity=mix(u_flood_light_intensity,v_ao.x,u_ao_pass);highp float fog=1.0;\n#ifdef FOG\nfog=v_fog;\n#endif\n#ifdef RENDER_CUTOFF\nfog*=v_cutoff_opacity;\n#endif\nglFragColor=vec4(vec3(0.0),mix(1.0,d,effect_intensity*u_opacity*fog));\n#else\nvec4 color=mix(vec4(u_flood_light_color,1.0),vec4(vec3(0.0),1.0),u_ao_pass);\n#ifdef OVERDRAW_INSPECTOR\ncolor=vec4(1.0);\n#endif\nglFragColor=color;HANDLE_WIREFRAME_DEBUG;\n#endif\n#endif\n}",qz='#include "_prelude_fog.vertex.glsl"\nin highp vec4 a_pos_end;in highp float a_angular_offset_factor;in highp float a_hidden_by_landmark;\n#ifdef SDF_SUBPASS\nout highp vec2 v_pos;out highp vec4 v_line_segment;out highp float v_flood_light_radius_tile;out highp vec2 v_ao;\n#ifdef FOG\nout highp float v_fog;\n#endif\n#endif\nuniform highp float u_flood_light_intensity;uniform highp mat4 u_matrix;uniform highp float u_ao_pass;uniform highp float u_meter_to_tile;uniform highp float u_edge_radius;uniform highp vec2 u_ao;\n#pragma mapbox: define highp float flood_light_ground_radius\nconst float TANGENT_CUTOFF=4.0;const float NORM=32767.0;void main() {\n#pragma mapbox: initialize highp float flood_light_ground_radius\nvec2 p=a_pos_end.xy;vec2 q=floor(a_pos_end.zw*0.5);vec2 start_bottom=a_pos_end.zw-q*2.0;float fl_ground_radius=flood_light_ground_radius;\n#ifdef FORCE_ABS_FL_GROUND_RADIUS\nfl_ground_radius=abs(flood_light_ground_radius);\n#endif\nfloat flood_radius_tile=fl_ground_radius*u_meter_to_tile;vec2 v=normalize(q-p);float ao_radius=u_ao.y/3.5;float effect_radius=mix(flood_radius_tile,ao_radius,u_ao_pass)+u_edge_radius;float angular_offset_factor=a_angular_offset_factor/NORM*TANGENT_CUTOFF;float angular_offset=angular_offset_factor*effect_radius;float top=1.0-start_bottom.y;float side=(0.5-start_bottom.x)*2.0;vec2 extrusion_parallel=v*side*mix(1.0,angular_offset,top);vec2 perp=vec2(v.y,-v.x);vec2 extrusion_perp=perp*effect_radius*top;vec3 pos=vec3(mix(q,p,start_bottom.x),0.0);pos.xy+=extrusion_parallel+extrusion_perp;\n#ifdef SDF_SUBPASS\nv_pos=pos.xy;v_line_segment=vec4(p,q)+perp.xyxy*u_edge_radius;
2v_flood_light_radius_tile=flood_radius_tile;v_ao=vec2(u_ao.x,ao_radius);\n#ifdef FOG\nv_fog_pos=fog_position(pos);v_fog=1.0-fog(v_fog_pos);\n#endif\n#endif\nfloat hidden_by_landmark=0.0;\n#ifdef HAS_CENTROID\nhidden_by_landmark=a_hidden_by_landmark;\n#endif\nfloat isFloodlit=float(fl_ground_radius > 0.0 && u_flood_light_intensity > 0.0);float hidden=mix(1.0-isFloodlit,isFloodlit,u_ao_pass);hidden+=hidden_by_landmark;gl_Position=mix(u_matrix*vec4(pos,1.0),AWAY,float(hidden > 0.0));\n#ifdef RENDER_CUTOFF\nv_cutoff_opacity=cutoff_opacity(u_cutoff_params,gl_Position.z);\n#endif\n}',Hz="uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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;}",Wz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;uniform float u_emissive_strength;void main() {vec4 pixel=texture(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);glFragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef LIGHTING_3D_MODE\nglFragColor=apply_lighting_with_emission_ground(glFragColor,u_emissive_strength);\n#endif\n#ifdef FOG\nglFragColor=fog_dither(fog_apply_premultiplied(glFragColor,v_fog_pos));\n#endif\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Zz='#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}',Xz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform sampler2D u_dash_image;in vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform sampler2D u_gradient_image;\n#endif\nfloat luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}uniform float u_emissive_strength;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float border_width\n#pragma mapbox: define lowp vec4 border_color\nfloat linearstep(float edge0,float edge1,float x) {return  clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float border_width\n#pragma mapbox: initialize lowp vec4 border_color\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\n#ifdef RENDER_LINE_DASH\nfloat sdfdist=texture(u_dash_image,v_tex).a;
2float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;alpha*=linearstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);\n#endif\nhighp vec4 out_color;\n#ifdef RENDER_LINE_GRADIENT\nout_color=texture(u_gradient_image,v_uv.xy);\n#else\nout_color=color;\n#endif\nfloat trimmed=1.0;\n#ifdef RENDER_LINE_TRIM_OFFSET\nhighp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);trimmed=0.0;}}\n#endif\nif (u_alpha_discard_threshold !=0.0) {if (alpha < u_alpha_discard_threshold) {discard;}}\n#ifdef RENDER_LINE_BORDER\nfloat edgeBlur=(border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2);if (border_color.a==0.0) {    \nfloat Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);}} else {out_color.rgb=mix(border_color.rgb*border_color.a*trimmed,out_color.rgb,smoothAlpha);}}\n#endif\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,u_emissive_strength);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\nout_color*=(alpha*opacity);\n#ifdef INDICATOR_CUTOUT\nout_color=applyCutout(out_color);\n#endif\nglFragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Yz='#include "_prelude_fog.vertex.glsl"\n#define EXTRUDE_SCALE 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nin highp vec4 a_packed;\n#endif\n#ifdef RENDER_LINE_DASH\nin float a_linesofar;\n#endif\nuniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform vec2 u_texsize;uniform float u_tile_units_to_pixels;out vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform float u_image_height;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\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 border_width\n#pragma mapbox: define lowp vec4 border_color\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\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 border_width\n#pragma mapbox: initialize lowp vec4 border_color\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nfloat a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3];\n#ifdef RENDER_LINE_GRADIENT\nhighp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end);\n#else\nv_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end);\n#endif\n#endif\n#ifdef RENDER_LINE_DASH\nfloat scale=dash.z==0.0 ? 0.0 : u_tile_units_to_pixels/dash.z;float height=dash.y;v_tex=vec2(a_linesofar*scale/floorwidth,(-normal.y*height+dash.x+0.5)/u_texsize.y);\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}',Kz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;vec2 pattern_size=vec2(display_size.x/u_tile_units_to_pixels,display_size.y);float aspect=display_size.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=mod(v_linesofar/pattern_size.x*aspect,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));vec4 color=texture(u_image,pos);\n#ifdef LIGHTING_3D_MODE\ncolor=apply_lighting_ground(color);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ncolor*=(alpha*opacity);\n#ifdef INDICATOR_CUTOUT\ncolor=applyCutout(color);\n#endif\nglFragColor=color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',Jz='#include "_prelude_fog.vertex.glsl"\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;in float a_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out 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\n#pragma mapbox: define lowp float pixel_ratio\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\n#pragma mapbox: initialize lowp float pixel_ratio\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}',Qz='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\n#include "_prelude_raster_array.glsl"\nuniform float u_fade_t;uniform float u_opacity;uniform highp float u_raster_elevation;in vec2 v_pos0;in vec2 v_pos1;in float v_depth;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;uniform float u_emissive_strength;\n#ifndef RASTER_ARRAY\nuniform sampler2D u_image0;uniform sampler2D u_image1;\n#endif\n#ifdef RASTER_COLOR\nuniform sampler2D u_color_ramp;uniform highp vec4 u_colorization_mix;uniform highp float u_colorization_offset;uniform vec2 u_texture_res;\n#endif\nvoid main() {vec4 color0,color1,color;vec2 value;\n#ifdef RASTER_COLOR\n#ifdef RASTER_ARRAY\n#ifdef RASTER_ARRAY_LINEAR\nvalue=mix(\nraTexture2D_image0_linear(v_pos0,u_texture_res,u_colorization_mix,u_colorization_offset),raTexture2D_image1_linear(v_pos1,u_texture_res,u_colorization_mix,u_colorization_offset),u_fade_t\n);\n#else\nvalue=mix(\nraTexture2D_image0_nearest(v_pos0,u_texture_res,u_colorization_mix,u_colorization_offset),raTexture2D_image1_nearest(v_pos1,u_texture_res,u_colorization_mix,u_colorization_offset),u_fade_t\n);\n#endif\nif (value.y > 0.0) value.x/=value.y;\n#else\ncolor=mix(texture(u_image0,v_pos0),texture(u_image1,v_pos1),u_fade_t);value=vec2(u_colorization_offset+dot(color.rgb,u_colorization_mix.rgb),color.a);\n#endif\ncolor=texture(u_color_ramp,vec2(value.x,0.5));if (color.a > 0.0) color.rgb/=color.a;color.a*=value.y;\n#else\ncolor0=texture(u_image0,v_pos0);color1=texture(u_image1,v_pos1);if (color0.a > 0.0) color0.rgb/=color0.a;if (color1.a > 0.0) color1.rgb/=color1.a;color=mix(color0,color1,u_fade_t);\n#endif\ncolor.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(\ndot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(vec4(out_color,1.0),u_emissive_strength).rgb;\n#endif\n#ifdef FOG\nhighp float fog_limit_high_meters=1000000.0;highp float fog_limit_low_meters=600000.0;float fog_limit=1.0-smoothstep(fog_limit_low_meters,fog_limit_high_meters,u_raster_elevation);out_color=fog_dither(fog_apply(out_color,v_fog_pos,fog_limit));\n#endif\nglFragColor=vec4(out_color*color.a,color.a);\n#ifdef RENDER_CUTOFF\nglFragColor=glFragColor*cutoff_opacity(u_cutoff_params,v_depth);\n#endif\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',tB='#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform mat3 u_grid_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;uniform vec2 u_texture_offset;uniform float u_raster_elevation;uniform vec4 u_tl_br;uniform float u_zoom_transition;uniform vec2 u_merc_center;\n#define GLOBE_UPSCALE GLOBE_RADIUS/6371008.8;\n#ifdef GLOBE_POLES\nin vec3 a_globe_pos;in vec2 a_uv;\n#elif defined(PROJECTION_GLOBE_VIEW)\nin vec2 a_pos;\n#else\nin vec2 a_pos;in vec2 a_texture_pos;\n#endif\nout vec2 v_pos0;out vec2 v_pos1;out float v_depth;void main() {vec2 uv;\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;globe_pos+=normalize(globe_pos)*u_raster_elevation*GLOBE_UPSCALE;gl_Position=u_matrix*u_globe_matrix*vec4(globe_pos   ,1.0);uv=a_uv;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(a_globe_pos,1.0)).xyz);\n#endif\n#else\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);vec2 globe_tl=vec2(u_tl_br.x,u_tl_br.y);vec2 globe_br=vec2(u_tl_br.z,u_tl_br.w);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=1.0-((mercatorY-globe_br.y)/(globe_tl.y-globe_br.y));float mercatorX=mercatorXfromLng(latLng[1]);float uvX=(mercatorX-globe_br.x)/(globe_tl.x-globe_br.x);vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);uv=vec2(uvX,uvY);globe_pos+=normalize(globe_pos)*u_raster_elevation*GLOBE_UPSCALE;vec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,u_raster_elevation,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);gl_Position=u_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n#else\nfloat w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,u_raster_elevation,w);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\nuv=a_texture_pos/8192.0;\n#endif\n#endif\nv_pos0=uv;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;v_pos0=u_texture_offset.x+u_texture_offset.y*v_pos0;v_pos1=u_texture_offset.x+u_texture_offset.y*v_pos1;\n#ifdef RENDER_CUTOFF\nv_depth=gl_Position.z;\n#endif\n}',eB='#include "_prelude_lighting.glsl"\nuniform sampler2D u_texture;\n#ifdef ICON_TRANSITION\nuniform float u_icon_transition;\n#endif\nin float v_fade_opacity;in vec2 v_tex_a;\n#ifdef ICON_TRANSITION\nin vec2 v_tex_b;\n#endif\nuniform mediump float u_icon_saturation;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float emissive_strength\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float emissive_strength\nlowp float alpha=opacity*v_fade_opacity;vec4 out_color;\n#ifdef ICON_TRANSITION\nvec4 a=texture(u_texture,v_tex_a)*(1.0-u_icon_transition);vec4 b=texture(u_texture,v_tex_b)*u_icon_transition;out_color=(a+b)*alpha;\n#else\nout_color=texture(u_texture,v_tex_a)*alpha;\n#endif\n#ifdef SATURATION\nvec3 luma=vec3(dot(out_color.rgb,vec3(0.2126,0.7152,0.0722)));out_color.rgb=mix(luma,out_color.rgb,u_icon_saturation);\n#endif\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,emissive_strength);\n#endif\nglFragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',rB='#include "_prelude_terrain.vertex.glsl"\nin vec4 a_pos_offset;in vec4 a_tex_size;in vec4 a_pixeloffset;in vec4 a_projected_pos;in float a_fade_opacity;\n#ifdef Z_OFFSET\nin float a_z_offset;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_globe_anchor;in vec3 a_globe_normal;\n#endif\n#ifdef ICON_TRANSITION\nin vec2 a_texb;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nout vec2 v_tex_a;\n#ifdef ICON_TRANSITION\nout vec2 v_tex_b;\n#endif\nout float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float emissive_strength\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float emissive_strength\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;float e=elevation(tile_anchor);\n#ifdef Z_OFFSET\ne+=a_z_offset;\n#endif\nvec3 h=elevationVector(tile_anchor)*e;float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float out_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;float alpha=opacity*out_fade_opacity;float hidden=float(alpha==0.0 || projected_point.w <=0.0 || occlusion_fade==0.0);\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,hidden);\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,hidden);\n#endif\nv_tex_a=a_tex/u_texsize;\n#ifdef ICON_TRANSITION\nv_tex_b=a_texb/u_texsize;\n#endif\nv_fade_opacity=out_fade_opacity;}',nB='#include "_prelude_lighting.glsl"\n#define SDF_PX 8.0\nuniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;uniform bool u_is_halo;in float v_draw_halo;in vec2 v_data0;in 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\n#pragma mapbox: define lowp float emissive_strength\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\n#pragma mapbox: initialize lowp float emissive_strength\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;bool draw_halo=v_draw_halo > 0.0;if (draw_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=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);vec4 out_color=color*(alpha*opacity*fade_opacity);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,emissive_strength);\n#endif\nglFragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);
2\n#endif\nHANDLE_WIREFRAME_DEBUG;}',iB='#include "_prelude_terrain.vertex.glsl"\nin vec4 a_pos_offset;in vec4 a_tex_size;in vec4 a_pixeloffset;in vec4 a_projected_pos;in float a_fade_opacity;\n#ifdef Z_OFFSET\nin float a_z_offset;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_globe_anchor;in vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform bool u_is_halo;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nout float v_draw_halo;out vec2 v_data0;out 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\n#pragma mapbox: define lowp float emissive_strength\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\n#pragma mapbox: initialize lowp float emissive_strength\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;float e=elevation(tile_anchor);\n#ifdef Z_OFFSET\ne+=a_z_offset;\n#endif\nvec3 h=elevationVector(tile_anchor)*e;float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float out_fade_opacity=interpolated_fade_opacity*projection_transition_fade;float alpha=opacity*out_fade_opacity;float hidden=float(alpha==0.0 || projected_point.w <=0.0 || occlusion_fade==0.0);\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,hidden);\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,hidden);\n#endif\nfloat gamma_scale=gl_Position.w;v_draw_halo=(u_is_halo && float(gl_InstanceID)==0.0) ? 1.0 : 0.0;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,out_fade_opacity);}',oB='#include "_prelude_lighting.glsl"\n#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_halo;in float v_draw_halo;in vec4 v_data0;in 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\n#pragma mapbox: define lowp float emissive_strength\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\n#pragma mapbox: initialize lowp float emissive_strength\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
2glFragColor=texture(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=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;bool draw_halo=v_draw_halo > 0.0;if (draw_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=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);vec4 out_color=color*(alpha*opacity*fade_opacity);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting_with_emission_ground(out_color,emissive_strength);\n#endif\nglFragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',sB='#include "_prelude_terrain.vertex.glsl"\nin vec4 a_pos_offset;in vec4 a_tex_size;in vec4 a_projected_pos;in float a_fade_opacity;\n#ifdef Z_OFFSET\nin float a_z_offset;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nin vec3 a_globe_anchor;in vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform vec2 u_texsize_icon;uniform bool u_is_halo;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nout float v_draw_halo;out vec4 v_data0;out 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\n#pragma mapbox: define lowp float emissive_strength\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\n#pragma mapbox: initialize lowp float emissive_strength\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;float e=elevation(tile_anchor);\n#ifdef Z_OFFSET\ne+=a_z_offset;\n#endif\nvec3 h=elevationVector(tile_anchor)*e;float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nfloat out_fade_opacity=interpolated_fade_opacity*projection_transition_fade;float alpha=opacity*out_fade_opacity;float hidden=float(alpha==0.0 || projected_point.w <=0.0 || occlusion_fade==0.0);\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,hidden);\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,hidden);\n#endif\nfloat gamma_scale=gl_Position.w;v_draw_halo=(u_is_halo && float(gl_InstanceID)==0.0) ? 1.0 : 0.0;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,out_fade_opacity,is_sdf);}',aB='#include "_prelude_fog.fragment.glsl"\nin lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(e
2nd-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=texture(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);glFragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\n}',lB='#include "_prelude_fog.fragment.glsl"\nin highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);glFragColor=color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\n}',cB="in highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;out highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",uB='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_shadow.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform sampler2D u_image0;in vec2 v_pos0;\n#ifdef FOG\nin float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nin vec4 v_pos_light_view_0;in vec4 v_pos_light_view_1;in float v_depth;\n#endif\nuniform vec3 u_ground_shadow_factor;void main() {vec4 image_color=texture(u_image0,v_pos0);vec4 color;\n#ifdef LIGHTING_3D_MODE\nconst vec3 normal=vec3(0.0,0.0,1.0);\n#ifdef RENDER_SHADOWS\nfloat cutoffOpacity=1.0;\n#ifdef RENDER_CUTOFF\ncutoffOpacity=cutoff_opacity(u_cutoff_params,v_depth);\n#endif\n#ifdef LIGHTING_3D_ALPHA_EMISSIVENESS\nvec3 unlit_base=image_color.rgb*(1.0-image_color.a);vec3 emissive_base=image_color.rgb*image_color.a;float ndotl=u_shadow_direction.z;float occlusion=ndotl < 0.0 ? 1.0 : shadow_occlusion(v_pos_light_view_0,v_pos_light_view_1,v_depth,0.0);ndotl=max(0.0,ndotl);vec3 lit=apply_lighting(unlit_base,normal,mix(1.0,(1.0-(u_shadow_intensity*occlusion))*ndotl,cutoffOpacity));vec3 emissive=compute_emissive_draped(emissive_base,1.0-u_shadow_intensity,occlusion,u_ground_shadow_factor);color.rgb=lit+emissive;color.a=1.0;\n#else\nfloat lighting_factor=shadowed_light_factor_normal_unbiased(normal,v_pos_light_view_0,v_pos_light_view_1,v_depth);color=apply_lighting(image_color,normal,mix(1.0,lighting_factor,cutoffOpacity));\n#endif\n#else\nfloat lighting_factor=u_lighting_directional_dir.z;color=apply_lighting(image_color,normal,lighting_factor);\n#ifdef LIGHTING_3D_ALPHA_EMISSIVENESS\ncolor.rgb=mix(color.rgb,image_color.rgb,image_color.a);color.a=1.0;\n#endif\n#endif\n#else\ncolor=image_color;\n#endif\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#else\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\n#endif\nglFragColor=color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',hB='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_terrain.vertex.glsl"\nuniform mat4 u_matrix;uniform float u_skirt_height;in vec2 a_pos;out vec2 v_pos0;\n#ifdef FOG\nout float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out vec4 v_pos_light_view_0;out vec4 v_pos_light_view_1;out float v_depth;\n#endif\nvoid main() {vec3 decomposedPosAndSkirt=decomposeToPosAndSkirt(a_pos);float skirt=decomposedPosAndSkirt.z;vec2 decodedPos=decomposedPosAndSkirt.xy;float elevation=elevation(decodedPos)-skirt*u_skirt_height;v_pos0=decodedPos/8192.0;gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\nv_fog_pos=fog_position(decodedPos);\n#else\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n#endif\n#ifdef RENDER_SHADOWS\nvec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w;\n#endif\n}',fB="precision highp float;in float v_depth;void main() {glFragColor=pack_depth(v_depth);}",dB='#include "_prelude_terrain.vertex.glsl"\nuniform mat4 u_matrix;in vec2 a_pos;out float v_depth;void main() {float elevation=elevation(a_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}',pB="\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix(\nmix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;}\n#else\nvec3 elevationVector(vec2 pos) { return vec3(0,0,1); }\n#endif\n#ifdef TERRAIN\nuniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}
2float currentElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture(u_dem,pos).r;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=texture(u_dem,pos).r;float tr=texture(u_dem,pos+vec2(dd,0)).r;float bl=texture(u_dem,pos+vec2(0,dd)).r;float br=texture(u_dem,pos+vec2(dd,dd)).r;return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}float prevElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture(u_dem_prev,pos).r;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=texture(u_dem_prev,pos).r;float tr=texture(u_dem_prev,pos+vec2(dd,0)).r;float bl=texture(u_dem_prev,pos+vec2(0,dd)).r;float br=texture(u_dem_prev,pos+vec2(dd,dd)).r;return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nfloat nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nreturn currentElevation(apos);}\n#endif\nhighp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture(u_depth,uv-df.xz)),unpack_depth(texture(u_depth,uv+df.xz)),unpack_depth(texture(u_depth,uv-df.zy)),unpack_depth(texture(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {float tl=texture(u_dem,pos).r;float tr=texture(u_dem,pos+vec2(off.x,0.0)).r;float bl=texture(u_dem,pos+vec2(0.0,off.y)).r;float br=texture(u_dem,pos+off).r;return vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",mB="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;out vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",gB="highp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}
2vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}\n#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump vec2 u_fog_vertical_limit;uniform mediump float u_fog_temporal_offset;in vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos,float opacity_limit) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,min(opacity,opacity_limit));}vec3 fog_apply(vec3 color,vec3 pos) {return fog_apply(color,pos,1.0);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec4 fog_apply_premultiplied(vec4 color,vec3 pos,float heightMeters) {float verticalProgress=(u_fog_vertical_limit.x > 0.0 || u_fog_vertical_limit.y > 0.0) ? smoothstep(u_fog_vertical_limit.x,u_fog_vertical_limit.y,heightMeters) : 0.0;float opacityLimit=1.0-smoothstep(0.9,1.0,fog_opacity(pos));return mix(fog_apply_premultiplied(color,pos),color,min(verticalProgress,opacityLimit));}vec3 fog_dither(vec3 color) {\n#ifdef FOG_DITHERING\nvec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);\n#else\nreturn color;\n#endif\n}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif",yB="\n#ifdef LIGHTING_3D_MODE\nuniform mediump vec3 u_lighting_ambient_color;uniform mediump vec3 u_lighting_directional_dir;uniform mediump vec3 u_lighting_directional_color;uniform mediump vec3 u_ground_radiance;float calculate_ambient_directional_factor(vec3 normal) {float NdotL=dot(normal,u_lighting_directional_dir);const float factor_reduction_max=0.3;float dir_luminance=dot(u_lighting_directional_color,vec3(0.2126,0.7152,0.0722));float directional_factor_min=1.0-factor_reduction_max*min(dir_luminance,1.0);float ambient_directional_factor=mix(directional_factor_min,1.0,min((NdotL+1.0),1.0));const float vertical_factor_min=0.92;float vertical_factor=mix(vertical_factor_min,1.0,normal.z*0.5+0.5);return vertical_factor*ambient_directional_factor;}vec3 linearProduct(vec3 srgbIn,vec3 k) {return srgbIn*pow(k,vec3(1./2.2));}vec3 apply_lighting(vec3 color,vec3 normal,float dir_factor) {float ambient_directional_factor=calculate_ambient_directional_factor(normal);vec3 ambient_contrib=ambient_directional_factor*u_lighting_ambient_color;vec3 directional_contrib=u_lighting_directional_color*dir_factor;return linearProduct(color,ambient_contrib+directional_contrib);}vec4 apply_lighting(vec4 color,vec3 normal,float dir_factor) {return vec4(apply_lighting(color.rgb,normal,dir_factor),color.a);}vec3 apply_lighting(vec3 color,vec3 normal) {float dir_factor=max(dot(normal,u_lighting_directional_dir),0.0);return apply_lighting(color.rgb,normal,dir_factor);}vec4 apply_lighting(vec4 color,vec3 normal) {float dir_factor=max(dot(normal,u_lighting_directional_dir),0.0);return vec4(apply_lighting(color.rgb,normal,dir_factor),color.a);}vec3 apply_lighting_ground(vec3 color) {return color*u_ground_radiance;}vec4 apply_lighting_ground(vec4 color) {return vec4(apply_lighting_ground(color.rgb),color.a);}float calculate_NdotL(vec3 normal) {const float ext=0.70710678118;return (clamp(dot(normal,u_lighting_directional_dir),-ext,1.0)+ext)/(1.0+ext);}vec4 apply_lighting_with_emission_ground(vec4 color,float emissive_strength) {return mix(apply_lighting_ground(color),color,emissive_strength);}vec3 compute_flood_lighting(vec3 flood_light_color,float fully_occluded_factor,float occlusion,vec3 ground_shadow_factor) {vec3 fully_occluded_color=flood_light_color*mix(ground_shadow_factor,vec3(1.0),fully_occluded_factor);float occlusion_ramp=smoothstep(0.0,0.2,1.0-occlusion);return mix(fully_occluded_color,flood_light_color,occlusion_ramp);}vec3 compute_emissive_draped(vec3 unlit_color,float fully_occluded_factor,float occlusion,vec3 ground_shadow_factor) {vec3 fully_occluded_color=unlit_color*mix(ground_shadow_factor,vec3(1.0),fully_occluded_factor);return mix(fully_occluded_color,unlit_color,1.0-occlusion);}\n#endif//LIGHTING_3D_MODE",_B="#ifdef RASTER_ARRAY\nuniform sampler2D u_image0;uniform sampler2D u_image1;const vec4 NODATA=vec4(1);vec4 _raTexLinearCoord(vec2 texCoord,vec2 texResolution,out vec2 fxy) {texCoord=texCoord*texResolution-0.5;fxy=fract(texCoord);texCoord-=fxy;return (texCoord.xxyy+vec2(1.5,0.5).xyxy)/texResolution.xxyy;}vec2 _raTexLinearMix(vec2 fxy,vec4 colorMix,float colorOffset,vec4 t00,vec4 t10,vec4 t01,vec4 t11) {vec2 c00=t00==NODATA ? vec2(0) : vec2(colorOffset+dot(t00,colorMix),1);vec2 c10=t10==NODATA ? vec2(0) : vec2(colorOffset+dot(t10,colorMix),1);vec2 c01=t01==NODATA ? vec2(0) : vec2(colorOffset+dot(t01,colorMix),1);vec2 c11=t11==NODATA ? vec2(0) : vec2(colorOffset+dot(t11,colorMix),1);return mix(mix(c01,c11,fxy.x),mix(c00,c10,fxy.x),fxy.y);}vec2 raTexture2D_image0_linear(vec2 texCoord,vec2 texResolution,vec4 colorMix,float colorOffset) {vec2 fxy;vec4 c=_raTexLinearCoord(texCoord,texResolution,fxy);return _raTexLinearMix(fxy,colorMix,colorOffset,texture(u_image0,c.yz),texture(u_image0,c.xz),texture(u_image0,c.yw),texture(u_image0,c.xw)\n);}vec2 raTexture2D_image1_linear(vec2 texCoord,vec2 texResolution,vec4 colorMix,float colorOffset) {vec2 fxy;vec4 c=_raTexLinearCoord(texCoord,texResolution,fxy);return _raTexLinearMix(fxy,colorMix,colorOffset,texture(u_image1,c.yz),texture(u_image1,c.xz),texture(u_image1,c.yw),texture(u_image1,c.xw)\n);}vec2 raTexture2D_image0_nearest(vec2 texCoord,vec2 texResolution,vec4 colorMix,float colorOffset) {vec4 t=texture(u_image0,texCoord);return t==NODATA ? vec2(0) : vec2(colorOffset+dot(t,colorMix),1);}vec2 raTexture2D_image1_nearest(vec2 texCoord,vec2 texResolution,vec4 colorMix,float colorOffset) {vec4 t=texture(u_image1,texCoord);return t==NODATA ? vec2(0) : vec2(colorOffset+dot(t,colorMix),1);}\n#endif",vB="\nin highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;precision highp float;\n#define BETA_R                  vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M                  vec3(21e-6,21e-6,21e-6)\n#define MIE_G                   0.76\n#define DENSITY_HEIGHT_SCALE_R  8000.0\n#define DENSITY_HEIGHT_SCALE_M  1200.0\n#define PLANET_RADIUS           6360e3\n#define ATMOSPHERE_RADIUS       6420e3\n#define SAMPLE_STEPS            10\n#define DENSITY_STEPS           4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}
2float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;glFragColor=vec4(color,1.0);}",bB="in highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;out highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(e
2nd-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}",xB='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform sampler2D u_image0;in vec2 v_pos0;\n#ifndef FOG\nuniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport;\n#endif\nvoid main() {vec4 color;\n#ifdef CUSTOM_ANTIALIASING\nvec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture(u_image0,v_pos0);\n#ifdef LIGHTING_3D_MODE\n#ifdef LIGHTING_3D_ALPHA_EMISSIVENESS\nraster=apply_lighting_with_emission_ground(raster,raster.a);color=vec4(raster.rgb*antialias,antialias);\n#else\nraster=apply_lighting_ground(raster);color=vec4(raster.rgb*antialias,raster.a*antialias);\n#endif\n#else\ncolor=vec4(raster.rgb*antialias,raster.a*antialias);\n#endif\n#else\ncolor=texture(u_image0,v_pos0);\n#ifdef LIGHTING_3D_MODE\n#ifdef LIGHTING_3D_ALPHA_EMISSIVENESS\ncolor=apply_lighting_with_emission_ground(color,color.a);color.a=1.0;\n#else\ncolor=apply_lighting_ground(color);\n#endif\n#endif\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\nglFragColor=color;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',wB='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_terrain.vertex.glsl"\nuniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;uniform float u_skirt_height;\n#ifdef GLOBE_POLES\nin vec3 a_globe_pos;in vec2 a_uv;\n#else\nin vec2 a_pos;\n#endif\nout vec2 v_pos0;void main() {\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;vec2 uv=a_uv;\n#else\nfloat tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY);\n#endif\nv_pos0=uv;vec2 tile_pos=uv*EXTENT;vec3 globe_derived_up_vector=normalize(globe_pos)*u_tile_up_scale;\n#ifdef GLOBE_POLES\nvec3 up_vector=globe_derived_up_vector;\n#else\nvec3 up_vector=elevationVector(tile_pos);\n#endif\nfloat height=elevation(tile_pos);globe_pos+=up_vector*height;\n#ifndef GLOBE_POLES\nglobe_pos-=globe_derived_up_vector*u_skirt_height*decomposed_pos_and_skirt.z;\n#endif\n#ifdef GLOBE_POLES\nvec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0);\n#else\nvec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height-u_skirt_height*decomposed_pos_and_skirt.z,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);\n#endif\ngl_Position=u_proj_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n}',EB='#include "_prelude_fog.fragment.glsl"\nuniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec4 u_color;uniform vec4 u_high_color;uniform vec4 u_space_color;uniform float u_horizon_angle;in highp vec3 v_ray_dir;in highp vec3 v_horizon_dir;void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir;\n#ifdef PROJECTION_GLOBE_VIEW\nglobe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {\n#ifdef ALPHA_PASS\nglFragColor=vec4(0,0,0,0);return;\n#else\n#ifdef NATIVE\nglFragColor=vec4(1,1,1,1);\n#else\nglFragColor=vec4(0,0,0,1);\n#endif\nreturn;\n#endif\n}\n#endif\nhighp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ?\n0.0 : max(acos(clamp(dot(dir,horizon_dir),-1.0,1.0)),0.0);float horizon_angle;\n#ifdef PROJECTION_GLOBE_VIEW\nhighp vec3 closest_point=globe_pos_dot_dir*dir;highp float closest_point_to_center=length(closest_point-u_globe_pos);highp float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ?\nPI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t);\n#else\nhorizon_angle=horizon_angle_mercator;\n#endif\nhorizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;
2vec3 color_stop_2=u_space_color.rgb;\n#ifdef ALPHA_PASS\nfloat a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);glFragColor=vec4(1.0,1.0,1.0,a);\n#else\nvec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c=c2;\n#ifndef NATIVE\nc=dither(c,gl_FragCoord.xy+u_temporal_offset);\n#endif\nglFragColor=vec4(c*t,t);\n#endif\n}',SB="in vec3 a_pos;in vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;out highp vec3 v_ray_dir;out highp vec3 v_horizon_dir;void main() {v_ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix(\nmix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}",TB="in highp vec2 v_uv;in mediump float v_intensity;float shapeCircle(in vec2 uv)\n{float beginFade=0.6;float lengthFromCenter=length(v_uv);return 1.0-clamp((lengthFromCenter-beginFade)/(1.0-beginFade),0.0,1.0);}void main() {float alpha=shapeCircle(v_uv);vec3 color=vec3(1.0,1.0,1.0);alpha*=v_intensity;glFragColor=vec4(color*alpha,alpha);HANDLE_WIREFRAME_DEBUG;}",AB="\nin vec3 a_pos_3f;in vec2 a_uv;in float a_size_scale;in float a_fade_opacity;uniform mat4 u_matrix;uniform vec3 u_up;uniform vec3 u_right;uniform float u_intensity_multiplier;out highp vec2 v_uv;out mediump float v_intensity;void main() {v_uv=a_uv;v_intensity=a_fade_opacity*u_intensity_multiplier;vec3 pos=a_pos_3f;pos+=a_uv.x*u_right*a_size_scale;pos+=a_uv.y*u_up*a_size_scale;gl_Position=u_matrix*vec4(pos,1.0);}",OB="in highp float v_depth;void main() {\n#ifndef DEPTH_TEXTURE\nglFragColor=pack_depth(v_depth);\n#endif\n}",CB='#include "_prelude_terrain.vertex.glsl"\nuniform mat4 u_matrix;uniform float u_edge_radius;uniform float u_vertical_scale;in vec4 a_pos_normal_ed;in vec2 a_centroid_pos;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\nout highp float v_depth;void main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\nbase*=u_vertical_scale;height*=u_vertical_scale;vec3 pos_nx=floor(a_pos_normal_ed.xyz*0.5);mediump vec3 top_up_ny=a_pos_normal_ed.xyz-2.0*pos_nx;base=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nvec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;float ele=elevation(pos_nx.xy);float c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;float h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base);pos=vec3(pos_nx.xy,h);\n#else\npos=vec3(pos_nx.xy,t > 0.0 ? height : base);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);v_depth=gl_Position.z/gl_Position.w;}',MB='#include "_prelude_shadow.fragment.glsl"\nprecision highp float;uniform vec3 u_ground_shadow_factor;in vec4 v_pos_light_view_0;in vec4 v_pos_light_view_1;in float v_depth;\n#ifdef FOG\nin float v_fog_opacity;\n#endif\nvoid main() {float light=shadowed_light_factor(v_pos_light_view_0,v_pos_light_view_1,v_depth);vec3 shadow=mix(u_ground_shadow_factor,vec3(1.0),light);\n#ifdef RENDER_CUTOFF\nshadow=mix(vec3(1.0),shadow,cutoff_opacity(u_cutoff_params,v_depth));\n#endif\n#ifdef FOG\nshadow=mix(shadow,vec3(1.0),v_fog_opacity);\n#endif\n#ifdef INDICATOR_CUTOUT\nshadow=mix(shadow,vec3(1.0),1.0-applyCutout(vec4(1.0)).r);\n#endif\nglFragColor=vec4(shadow,1.0);}',kB='#include "_prelude_fog.vertex.glsl"\nuniform mat4 u_matrix;uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;in vec2 a_pos;out vec4 v_pos_light_view_0;out vec4 v_pos_light_view_1;out float v_depth;\n#ifdef FOG\nout float v_fog_opacity;\n#endif\nvoid main() {gl_Position=u_matrix*vec4(a_pos,0.0,1.0);v_pos_light_view_0=u_light_matrix_0*vec4(a_pos,0.0,1.0);v_pos_light_view_1=u_light_matrix_1*vec4(a_pos,0.0,1.0);v_depth=gl_Position.w;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);v_fog_opacity=fog(v_fog_pos);\n#endif\n}',IB='#include "_prelude_fog.vertex.glsl"\n#include "_prelude_shadow.vertex.glsl"\nin vec3 a_pos_3f;\n#pragma mapbox: define-attribute highp vec3 normal_3f\n#pragma mapbox: define-attribute highp vec2 uv_2f\n#pragma mapbox: define-attribute highp vec3 color_3f\n#pragma mapbox: define-attribute highp vec4 color_4f\n#pragma mapbox: define-attribute-vertex-shader-only highp vec4 pbr\n#pragma mapbox: define-attribute-vertex-shader-only highp vec3 heightBasedEmissiveStrength\nuniform mat4 u_matrix;uniform mat4 u_lighting_matrix;uniform vec3 u_camera_pos;uniform vec4 u_color_mix;\n#ifdef INSTANCED_ARRAYS\nin vec4 a_normal_matrix0;in vec4 a_normal_matrix1;in vec4 a_normal_matrix2;in vec4 a_normal_matrix3;\n#else\nuniform highp mat4 u_normal_matrix;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;out vec4 v_pos_light_view_0;out vec4 v_pos_light_view_1;out float v_depth_shadows;\n#endif\nout vec4 v_position_height;out lowp vec4 v_color_mix;\n#ifdef TERRAIN_FRAGMENT_OCCLUSION\nout highp float v_depth;\n#endif\n#ifdef HAS_ATTRIBUTE_a_pbr\nout lowp vec4 v_roughness_metallic_emissive_alpha;out mediump vec4 v_height_based_emission_params;\n#endif\nvec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));}void main() {\n#pragma mapbox: initialize-attribute highp vec3 normal_3f\n#pragma mapbox: initialize-attribute highp vec2 uv_2f\n#pragma mapbox: initialize-attribute highp vec3 color_3f\n#pragma mapbox: initialize-attribute highp vec4 color_4f\n#pragma mapbox: initialize-attribute-custom highp vec4 pbr\n#pragma mapbox: initialize-attribute-custom highp vec3 heightBasedEmissiveStrength\nhighp mat4 normal_matrix;\n#ifdef INSTANCED_ARRAYS\nnormal_matrix=mat4(a_normal_matrix0,a_normal_matrix1,a_normal_matrix2,a_normal_matrix3);\n#else\nnormal_matrix=u_normal_matrix;\n#endif\nvec3 local_pos;mat3 rs;\n#ifdef MODEL_POSITION_ON_GPU\nvec3 pos_color=normal_matrix[0].xyz;
2vec4 translate=normal_matrix[1];vec3 pos_a=floor(pos_color);vec3 rgb=1.05*(pos_color-pos_a);float color_mix=pos_a.z/100.0;v_color_mix=vec4(sRGBToLinear(rgb),color_mix);float meter_to_tile=normal_matrix[0].w;vec4 pos=vec4(pos_a.xy,translate.z,1.0);rs[0].x=normal_matrix[1].w;rs[0].yz=normal_matrix[2].xy;rs[1].xy=normal_matrix[2].zw;rs[1].z=normal_matrix[3].x;rs[2].xyz=normal_matrix[3].yzw;vec4 pos_node=u_lighting_matrix*vec4(a_pos_3f,1.0);vec3 rotated_pos_node=rs*pos_node.xyz;vec3 pos_model_tile=(rotated_pos_node+vec3(translate.xy,0.0))*vec3(meter_to_tile,meter_to_tile,1.0);pos.xyz+=pos_model_tile;local_pos=pos.xyz;gl_Position=u_matrix*pos;pos.z*=meter_to_tile;v_position_height.xyz=pos.xyz-u_camera_pos;\n#else\nlocal_pos=a_pos_3f;gl_Position=u_matrix*vec4(a_pos_3f,1);v_position_height.xyz=vec3(u_lighting_matrix*vec4(a_pos_3f,1));v_color_mix=vec4(sRGBToLinear(u_color_mix.rgb),u_color_mix.a);\n#endif\nv_position_height.w=a_pos_3f.z;\n#ifdef HAS_ATTRIBUTE_a_pbr\nvec4 albedo_c=decode_color(pbr.xy);vec2 e_r_m=unpack_float(pbr.z);vec2 r_m= unpack_float(e_r_m.y*16.0);r_m.r=r_m.r*16.0;v_color_mix=vec4(albedo_c.rgb,1.0);v_roughness_metallic_emissive_alpha=vec4(vec3(r_m,e_r_m.x)/255.0,albedo_c.a);v_roughness_metallic_emissive_alpha.z*=2.0;float heightBasedRelativeIntepolation=a_pos_3f.z*heightBasedEmissiveStrength.x+heightBasedEmissiveStrength.y;v_height_based_emission_params.x=heightBasedRelativeIntepolation;v_height_based_emission_params.y=heightBasedEmissiveStrength.z;vec2 emissionMultiplierValues=unpack_float(pbr.w)/256.0;v_height_based_emission_params.z=emissionMultiplierValues.x;v_height_based_emission_params.w=emissionMultiplierValues.y-emissionMultiplierValues.x;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(local_pos);\n#endif\n#ifdef RENDER_CUTOFF\nv_cutoff_opacity=cutoff_opacity(u_cutoff_params,gl_Position.z);\n#endif\n#ifdef TERRAIN_FRAGMENT_OCCLUSION\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef HAS_ATTRIBUTE_a_normal_3f\n#ifdef MODEL_POSITION_ON_GPU\nfloat x_squared_scale=dot(rs[0],rs[0]);float y_squared_scale=dot(rs[1],rs[1]);float z_squared_scale=dot(rs[2],rs[2]);vec3 squared_scale=vec3(x_squared_scale,y_squared_scale,z_squared_scale);normal_3f=rs*((u_lighting_matrix*vec4(normal_3f,0.0)).xyz/squared_scale);normal_3f=normalize(normal_3f);\n#else\nnormal_3f=vec3(normal_matrix*vec4(normal_3f,0));\n#endif\n#endif\n#ifdef HAS_ATTRIBUTE_a_pbr\n#ifdef HAS_ATTRIBUTE_a_color_4f\nv_roughness_metallic_emissive_alpha.w=clamp(color_4f.a*v_roughness_metallic_emissive_alpha.w*(v_roughness_metallic_emissive_alpha.z-1.0),0.0,1.0);\n#endif\n#endif\n#ifdef RENDER_SHADOWS\nvec3 shadow_pos=local_pos;\n#ifdef NORMAL_OFFSET\n#ifdef HAS_ATTRIBUTE_a_normal_3f\n#ifdef MODEL_POSITION_ON_GPU\nvec3 offset=shadow_normal_offset(vec3(-normal_3f.xy,normal_3f.z));shadow_pos+=offset*shadow_normal_offset_multiplier0();\n#else\nvec3 offset=shadow_normal_offset_model(normalize(normal_3f));shadow_pos+=offset*shadow_normal_offset_multiplier0();\n#endif\n#endif\n#endif\nv_pos_light_view_0=u_light_matrix_0*vec4(shadow_pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(shadow_pos,1);v_depth_shadows=gl_Position.w;\n#endif\n}',PB='#include "_prelude_fog.fragment.glsl"\n#include "_prelude_shadow.fragment.glsl"\n#include "_prelude_lighting.glsl"\nuniform float u_opacity;uniform vec3 u_lightcolor;uniform vec3 u_lightpos;uniform float u_lightintensity;uniform vec4 u_baseColorFactor;uniform vec4 u_emissiveFactor;uniform float u_metallicFactor;uniform float u_roughnessFactor;uniform float u_emissive_strength;in highp vec4 v_position_height;in lowp vec4 v_color_mix;\n#ifdef RENDER_SHADOWS\nin vec4 v_pos_light_view_0;in vec4 v_pos_light_view_1;in float v_depth_shadows;\n#endif\n#pragma mapbox: define-attribute highp vec3 normal_3f\n#pragma mapbox: define-attribute highp vec3 color_3f\n#pragma mapbox: define-attribute highp vec4 color_4f\n#pragma mapbox: define-attribute highp vec2 uv_2f\n#pragma mapbox: initialize-attribute highp vec3 normal_3f\n#pragma mapbox: initialize-attribute highp vec3 color_3f\n#pragma mapbox: initialize-attribute highp vec4 color_4f\n#pragma mapbox: initialize-attribute highp vec2 uv_2f\n#ifdef HAS_ATTRIBUTE_a_pbr\nin lowp vec4 v_roughness_metallic_emissive_alpha;in mediump vec4 v_height_based_emission_params;\n#endif\n#ifdef HAS_TEXTURE_u_baseColorTexture\nuniform sampler2D u_baseColorTexture;uniform bool u_baseTextureIsAlpha;uniform bool u_alphaMask;
2uniform float u_alphaCutoff;\n#endif\n#ifdef HAS_TEXTURE_u_metallicRoughnessTexture\nuniform sampler2D u_metallicRoughnessTexture;\n#endif\n#ifdef HAS_TEXTURE_u_occlusionTexture\nuniform sampler2D u_occlusionTexture;uniform float u_aoIntensity;\n#endif\n#ifdef HAS_TEXTURE_u_normalTexture\nuniform sampler2D u_normalTexture;\n#endif\n#ifdef HAS_TEXTURE_u_emissionTexture\nuniform sampler2D u_emissionTexture;\n#endif\n#ifdef TERRAIN_FRAGMENT_OCCLUSION\nin highp float v_depth;uniform sampler2D u_depthTexture;uniform vec2 u_inv_depth_size;bool isOccluded() {vec2 coord=gl_FragCoord.xy*u_inv_depth_size;highp float depth=unpack_depth(texture(u_depthTexture,coord));return v_depth > depth+0.0005;}\n#endif\n#define saturate(_x) clamp(_x,0.,1.)\nvec3 linearTosRGB(vec3 color) {return pow(color,vec3(1./2.2));}vec3 sRGBToLinear(vec3 srgbIn) {return pow(srgbIn,vec3(2.2));}float calculate_NdotL(vec3 normal,vec3 lightDir) {const float ext=0.70710678118;return (clamp(dot(normal,lightDir),-ext,1.0)+ext)/(1.0+ext);}vec3 getDiffuseShadedColor(vec3 albedo,vec3 normal,vec3 lightDir,vec3 lightColor)\n{\n#ifdef LIGHTING_3D_MODE\nvec3 transformed_normal=vec3(-normal.xy,normal.z);float lighting_factor;\n#ifdef RENDER_SHADOWS\nlighting_factor=shadowed_light_factor_normal(transformed_normal,v_pos_light_view_0,v_pos_light_view_1,v_depth_shadows);\n#else\nlighting_factor=saturate(dot(transformed_normal,u_lighting_directional_dir));\n#endif\nreturn apply_lighting(albedo,transformed_normal,lighting_factor);\n#else\nvec3 n=normal;float colorvalue=((albedo.x*0.2126)+(albedo.y*0.7152))+(albedo.z*0.0722);vec3 c=vec3(0.03,0.03,0.03);float directional=clamp(dot(n,vec3(lightDir)),0.0,1.0);directional=mix(1.0-u_lightintensity,max((1.0-colorvalue)+u_lightintensity,1.0),directional);vec3 c3=c+clamp((albedo*directional)*lightColor,mix(vec3(0.0),vec3(0.3),vec3(1.0)-lightColor),vec3(1.0));return c3;\n#endif\n}vec4 getBaseColor() {vec4 albedo=u_baseColorFactor;\n#ifdef HAS_ATTRIBUTE_a_color_3f\nalbedo*=vec4(color_3f,1.0);\n#endif\n#ifdef HAS_ATTRIBUTE_a_pbr\n#else\n#ifdef HAS_ATTRIBUTE_a_color_4f\nalbedo*=color_4f;\n#endif\n#endif\n#if defined (HAS_TEXTURE_u_baseColorTexture) && defined (HAS_ATTRIBUTE_a_uv_2f)\nvec4 texColor=texture(u_baseColorTexture,uv_2f);if(u_alphaMask) {if (texColor.w < u_alphaCutoff) {discard;}}\n#ifdef UNPREMULT_TEXTURE_IN_SHADER\nif(texColor.w > 0.0) {texColor.rgb/=texColor.w;}texColor.w=1.0;\n#endif\ntexColor.rgb=sRGBToLinear(texColor.rgb);if(u_baseTextureIsAlpha) {if (texColor.w < 0.5) {discard;}albedo*=mix(vec4(texColor.rgb,texColor.a),vec4(texColor.a),float(u_baseTextureIsAlpha));} else {albedo*=texColor;}\n#endif\nreturn vec4(mix(albedo.rgb,v_color_mix.rgb,v_color_mix.a),albedo.a);}highp mat3 cotangentFrame(highp vec3 N,highp vec3 p,highp vec2 uv ) {\n#ifdef HAS_TEXTURE_u_normalTexture\nhighp vec3 dp1=vec3(dFdx(p.x),dFdx(p.y),dFdx(p.z));highp vec3 dp2=vec3(dFdy(p.x),dFdy(p.y),dFdy(p.z));highp vec2 duv1=vec2(dFdx(uv.x),dFdx(uv.y));highp vec2 duv2=vec2(dFdy(uv.x),dFdy(uv.y));highp vec3 dp2perp=cross( dp2,N );highp vec3 dp1perp=cross( N,dp1 );highp vec3 T=dp2perp*duv1.x+dp1perp*duv2.x;highp vec3 B=dp2perp*duv1.y+dp1perp*duv2.y;highp float lengthT=dot(T,T);highp float lengthB=dot(B,B);highp float maxLength=max(lengthT,lengthB);highp float invmax=inversesqrt( maxLength );highp mat3 res=mat3( T*invmax,B*invmax,N );return res;\n#else\nreturn mat3(1.0);\n#endif\n}highp vec3 getNormal(){highp vec3 n;\n#ifdef HAS_ATTRIBUTE_a_normal_3f\nn=normalize(normal_3f);\n#else\nhighp vec3 fdx=vec3(dFdx(v_position_height.x),dFdx(v_position_height.y),dFdx(v_position_height.z));highp vec3 fdy=vec3(dFdy(v_position_height.x),dFdy(v_position_height.y),dFdy(v_position_height.z));n=normalize(cross(fdx,fdy))*-1.0;\n#endif\n#if defined(HAS_TEXTURE_u_normalTexture) && defined(HAS_ATTRIBUTE_a_uv_2f)\nvec3 nMap=texture( u_normalTexture,uv_2f).xyz;nMap=normalize(2.0*nMap-vec3(1.0));highp vec3 v=normalize(-v_position_height.xyz);highp mat3 TBN=cotangentFrame(n,v,uv_2f);n=normalize(TBN*nMap);\n#endif\nreturn n;}struct Material {float perceptualRoughness;float alphaRoughness;float metallic;vec3 f90;vec4 baseColor;vec3 diffuseColor;vec3 specularColor;highp vec3 normal;};Material getPBRMaterial() {Material mat;mat.baseColor=getBaseColor();mat.perceptualRoughness=u_roughnessFactor;mat.metallic=u_metallicFactor;\n#ifdef HAS_ATTRIBUTE_a_pbr\nmat.perceptualRoughness=v_roughness_metallic_emissive_alpha.x;mat.metallic=v_roughness_metallic_emissive_alpha.y;mat.baseColor.w*=v_roughness_metallic_emissive_alpha.w;\n#endif\n#if defined(HAS_TEXTURE_u_metallicRoughnessTexture) && defined(HAS_ATTRIBUTE_a_uv_2f) 
vendor: 4,079 bytes, line 2
2\nvec4 mrSample=texture(u_metallicRoughnessTexture,uv_2f);mat.perceptualRoughness*=mrSample.g;mat.metallic*=mrSample.b;\n#endif\nconst float c_minRoughness=0.04;mat.perceptualRoughness=clamp(mat.perceptualRoughness,c_minRoughness,1.0);mat.metallic=saturate(mat.metallic);mat.alphaRoughness=mat.perceptualRoughness*mat.perceptualRoughness;const vec3 f0=vec3(0.04);mat.diffuseColor=mat.baseColor.rgb*(vec3(1.0)-f0);mat.diffuseColor*=1.0-mat.metallic;mat.specularColor=mix(f0,mat.baseColor.rgb,mat.metallic);highp float reflectance=max(max(mat.specularColor.r,mat.specularColor.g),mat.specularColor.b);highp float reflectance90=saturate(reflectance*25.0);mat.f90=vec3(reflectance90);mat.normal=getNormal();return mat;}float V_GGX(float NdotL,float NdotV,float roughness)\n{float a2=roughness*roughness;float GGXV=NdotL*sqrt(NdotV*NdotV*(1.0-a2)+a2);float GGXL=NdotV*sqrt(NdotL*NdotL*(1.0-a2)+a2);return 0.5/(GGXV+GGXL);}float V_GGXFast(float NdotL,float NdotV,float roughness) {float a=roughness;float GGXV=NdotL*(NdotV*(1.0-a)+a);float GGXL=NdotV*(NdotL*(1.0-a)+a);return 0.5/(GGXV+GGXL);}vec3 F_Schlick(vec3 specularColor,vec3 f90,float VdotH)\n{return specularColor+(f90-specularColor)*pow(clamp(1.0-VdotH,0.0,1.0),5.0);}vec3 F_SchlickFast(vec3 specularColor,float VdotH)\n{float x=1.0-VdotH;float x4=x*x*x*x;return specularColor+(1.0-specularColor)*x4*x;}float D_GGX(highp float NdotH,float alphaRoughness)\n{highp float a4=alphaRoughness*alphaRoughness;highp float f=(NdotH*a4-NdotH)*NdotH+1.0;return a4/(PI*f*f);}vec3 diffuseBurley(Material mat,float LdotH,float NdotL,float NdotV)\n{float f90=2.0*LdotH*LdotH*mat.alphaRoughness-0.5;return (mat.diffuseColor/PI)*(1.0+f90*pow((1.0-NdotL),5.0))*(1.0+f90*pow((1.0-NdotV),5.0));}vec3 diffuseLambertian(Material mat)\n{\n#ifdef LIGHTING_3D_MODE\nreturn mat.diffuseColor;\n#else\nreturn mat.diffuseColor/PI;\n#endif\n}vec3 EnvBRDFApprox(vec3 specularColor,float roughness,highp float NdotV)\n{vec4 c0=vec4(-1,-0.0275,-0.572,0.022);vec4 c1=vec4(1,0.0425,1.04,-0.04);highp vec4 r=roughness*c0+c1;highp float a004=min(r.x*r.x,exp2(-9.28*NdotV))*r.x+r.y;vec2 AB=vec2(-1.04,1.04)*a004+r.zw;return specularColor*AB.x+AB.y;}vec3 computeIndirectLightContribution(Material mat,float NdotV,vec3 normal)\n{vec3 env_light=vec3(0.65,0.65,0.65);\n#ifdef LIGHTING_3D_MODE\nfloat ambient_factor=calculate_ambient_directional_factor(normal);env_light=u_lighting_ambient_color*ambient_factor;\n#endif\nvec3 envBRDF=EnvBRDFApprox(mat.specularColor,mat.perceptualRoughness,NdotV);vec3 indirectSpecular= envBRDF*env_light;vec3 indirectDiffuse=mat.diffuseColor*env_light;return indirectSpecular+indirectDiffuse;}vec3 computeLightContribution(Material mat,vec3 lightPosition,vec3 lightColor)\n{highp vec3 n=mat.normal;highp vec3 v=normalize(-v_position_height.xyz);highp vec3 l=normalize(lightPosition);highp vec3 h=normalize(v+l);float NdotV=clamp(abs(dot(n,v)),0.001,1.0);float NdotL=saturate(dot(n,l));highp float NdotH=saturate(dot(n,h));float VdotH=saturate(dot(v,h));vec3 f=F_SchlickFast(mat.specularColor,VdotH);float g=V_GGXFast(NdotL,NdotV,mat.alphaRoughness);float d=D_GGX(NdotH,mat.alphaRoughness);vec3 diffuseTerm=(1.0-f)*diffuseLambertian(mat);vec3 specularTerm=f*g*d;vec3 transformed_normal=vec3(-n.xy,n.z);float lighting_factor;\n#ifdef RENDER_SHADOWS\nlighting_factor=shadowed_light_factor_normal(transformed_normal,v_pos_light_view_0,v_pos_light_view_1,v_depth_shadows);\n#else\nlighting_factor=NdotL;\n#endif\nvec3 directLightColor=(specularTerm+diffuseTerm)*lighting_factor*lightColor;vec3 indirectLightColor=computeIndirectLightContribution(mat,NdotV,transformed_normal);vec3 color=(saturate(directLightColor)+indirectLightColor);float intensityFactor=1.0;\n#if !defined(LIGHTING_3D_MODE)\nconst vec3 luminosityFactor=vec3(0.2126,0.7152,0.0722);float luminance=dot(diffuseTerm,luminosityFactor);intensityFactor=mix((1.0-u_lightintensity),max((1.0-luminance+u_lightintensity),1.0),NdotL);\n#endif\ncolor*=intensityFactor;return color;}void main() {\n#ifdef TERRAIN_FRAGMENT_OCCLUSION\nif (isOccluded()) {discard;}\n#endif\nvec3 lightDir
2=u_lightpos;vec3 lightColor=u_lightcolor;\n#ifdef LIGHTING_3D_MODE\nlightDir=u_lighting_directional_dir;lightDir.xy=-lightDir.xy;lightColor=u_lighting_directional_color;\n#endif\nvec4 finalColor;\n#ifdef DIFFUSE_SHADED\nvec3 N=getNormal();vec3 diffuse=getDiffuseShadedColor(getBaseColor().rgb,N,lightDir,lightColor);\n#ifdef HAS_TEXTURE_u_occlusionTexture\nfloat ao=(texture(u_occlusionTexture,uv_2f).r-1.0)*u_aoIntensity+1.0;diffuse*=ao;\n#endif\nfinalColor=vec4(diffuse,1.0)*u_opacity;\n#else\nMaterial mat=getPBRMaterial();vec3 color=computeLightContribution(mat,lightDir,lightColor);float ao=1.0;\n#if defined (HAS_TEXTURE_u_occlusionTexture) && defined(HAS_ATTRIBUTE_a_uv_2f)\nao=(texture(u_occlusionTexture,uv_2f).x-1.0)*u_aoIntensity+1.0;color*=ao;\n#endif\nvec4 emissive=u_emissiveFactor;\n#if defined(HAS_TEXTURE_u_emissionTexture) && defined(HAS_ATTRIBUTE_a_uv_2f)\nemissive.rgb*=sRGBToLinear(texture(u_emissionTexture,uv_2f).rgb);\n#endif\ncolor+=emissive.rgb;float opacity=mat.baseColor.w*u_opacity;\n#ifdef HAS_ATTRIBUTE_a_pbr\nfloat resEmission=v_roughness_metallic_emissive_alpha.z;resEmission*=v_height_based_emission_params.z+v_height_based_emission_params.w*pow(clamp(v_height_based_emission_params.x,0.0,1.0),v_height_based_emission_params.y);color=mix(color,v_color_mix.rgb,min(1.0,resEmission));\n#ifdef HAS_ATTRIBUTE_a_color_4f\nfloat distance=length(vec2(1.3*max(0.0,abs(color_4f.x)-color_4f.z),color_4f.
2y));distance+= mix(0.5,0.0,clamp(resEmission-1.0,0.0,1.0));opacity*=v_roughness_metallic_emissive_alpha.w*saturate(1.0-distance*distance);\n#endif\n#endif\nvec3 unlitColor=mat.baseColor.rgb*ao+emissive.rgb;color=mix(color,unlitColor,u_emissive_strength);color=linearTosRGB(color);color*=opacity;finalColor=vec4(color,opacity);\n#endif\n#ifdef FOG\nfinalColor=fog_dither(fog_apply_premultiplied(finalColor,v_fog_pos,v_position_height.w));\n#endif\n#ifdef RENDER_CUTOFF\nfinalColor*=v_cutoff_opacity;\n#endif\n#ifdef INDICATOR_CUTOUT\nfinalColor=applyCutout(finalColor);\n#endif\nglFragColor=finalColor;\n#ifdef OVERDRAW_INSPECTOR\nglFragColor=vec4(1.0);\n#endif\nHANDLE_WIREFRAME_DEBUG;}',LB="in vec3 a_pos_3f;uniform mat4 u_matrix;out highp float v_depth;\n#ifdef MODEL_POSITION_ON_GPU\n#ifdef INSTANCED_ARRAYS\nin vec4 a_normal_matrix0;in vec4 a_normal_matrix1;in vec4 a_normal_matrix2;in vec4 a_normal_matrix3;\n#else\nuniform highp mat4 u_instance;\n#endif\nuniform highp mat4 u_node_matrix;\n#endif\nvoid main() {\n#ifdef MODEL_POSITION_ON_GPU\nhighp mat4 instance;\n#ifdef INSTANCED_ARRAYS\ninstance=mat4(a_normal_matrix0,a_normal_matrix1,a_normal_matrix2,a_normal_matrix3);\n#else\ninstance=u_instance;\n#endif\nvec3 pos_color=instance[0].xyz;vec4 translate=instance[1];vec3 pos_a=floor(pos_color);float meter_to_tile=instance[0].w;vec4 pos=vec4(pos_a.xy,translate.z,1.0);mat3 rs;rs[0].x=instance[1].w;rs[0].yz=instance[2].xy;
2rs[1].xy=instance[2].zw;rs[1].z=instance[3].x;rs[2].xyz=instance[3].yzw;vec4 pos_node=u_node_matrix*vec4(a_pos_3f,1.0);vec3 rotated_pos_node=rs*pos_node.xyz;vec3 pos_model_tile=(rotated_pos_node+vec3(translate.xy,0.0))*vec3(meter_to_tile,meter_to_tile,1.0);pos.xyz+=pos_model_tile;gl_Position=u_matrix*pos;\n#else\ngl_Position=u_matrix*vec4(a_pos_3f,1);\n#endif\nv_depth=gl_Position.z/gl_Position.w;}",RB="in highp float v_depth;void main() {\n#ifndef DEPTH_TEXTURE\nglFragColor=pack_depth(v_depth);\n#endif\n}",DB="#ifdef RENDER_SHADOWS\nuniform mediump vec3 u_shadow_direction;uniform highp vec3 u_shadow_normal_offset;vec3 shadow_normal_offset(vec3 normal) {float tileInMeters=u_shadow_normal_offset[0];vec3 n=vec3(-normal.xy,tileInMeters*normal.z);float dotScale=min(1.0-dot(normal,u_shadow_direction),1.0)*0.5+0.5;return n*dotScale;}vec3 shadow_normal_offset_model(vec3 normal) {float dotScale=min(1.0-dot(normal,u_shadow_direction),1.0)*0.5+0.5;return normal*dotScale;}float shadow_normal_offset_multiplier0() {return u_shadow_normal_offset[1];}float shadow_normal_offset_multiplier1() {return u_shadow_normal_offset[2];}\n#endif//RENDER_SHADOWS",zB="#ifdef RENDER_SHADOWS\n#ifdef DEPTH_TEXTURE\nuniform highp sampler2D u_shadowmap_0;uniform highp sampler2D u_shadowmap_1;\n#else\nuniform sampler2D u_shadowmap_0;uniform sampler2D u_shadowmap_1;\n#endif\nuniform float u_shadow_intensity;uniform float u_shadow_map_resolution;uniform float u_shadow_texel_size;uniform highp vec3 u_shadow_normal_offset;uniform vec2 u_fade_range;uniform mediump vec3 u_shadow_direction;uniform highp vec3 u_shadow_bias;highp float shadow_sample_1(highp vec2 uv,highp float compare) {highp float shadow_depth;\n#ifdef DEPTH_TEXTURE\nshadow_depth=texture(u_shadowmap_1,uv).r;\n#else\nshadow_depth=unpack_depth(texture(u_shadowmap_1,uv))*0.5+0.5;\n#endif\nreturn step(shadow_depth,compare);}highp float shadow_sample_0(highp vec2 uv,highp float compare) {highp float shadow_depth;\n#ifdef DEPTH_TEXTURE\nshadow_depth=texture(u_shadowmap_0,uv).r;\n#else\nshadow_depth=unpack_depth(texture(u_shadowmap_0,uv))*0.5+0.5;\n#endif\nreturn step(shadow_depth,compare);}float shadow_occlusion_1(highp vec4 pos,highp float bias) {highp vec2 uv=pos.xy;return shadow_sample_1(uv,pos.z-bias);}float shadow_occlusion_0(highp vec4 pos,highp float bias) {highp float compare0=pos.z-bias;\n#ifdef NATIVE\nhighp vec2 uv=pos.xy;highp vec4 samples=textureGather(u_shadowmap_0,uv,0);lowp vec4 stepSamples=step(samples,vec4(compare0));\n#else\nhighp vec2 uv00=pos.xy-vec2(0.5*u_shadow_texel_size);highp vec2 uv10=uv00+vec2(u_shadow_texel_size,0.0);highp vec2 uv01=uv00+vec2(0.0,u_shadow_texel_size);highp vec2 uv11=uv01+vec2(u_shadow_texel_size,0.0);lowp vec4 stepSamples=vec4(\nshadow_sample_0(uv01,compare0),shadow_sample_0(uv11,compare0),shadow_sample_0(uv10,compare0),shadow_sample_0(uv00,compare0)\n);\n#endif\nvec2 f=fract(pos.xy*u_shadow_map_resolution-vec2(0.5));lowp vec2 lerpx=mix(stepSamples.wx,stepSamples.zy,f.xx);return mix(lerpx.x,lerpx.y,f.y);}float shadow_occlusion(highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth,highp float bias) {\n#ifdef SHADOWS_SINGLE_CASCADE\nlight_view_pos0.xyz=light_view_pos0.xyz/light_view_pos0.w*0.5+0.5;return shadow_occlusion_0(light_view_pos0,bias);\n#else\nlight_view_pos0.xyz/=light_view_pos0.w;light_view_pos1.xyz/=light_view_pos1.w;vec4 uv=vec4(light_view_pos0.xy,light_view_pos1.xy);vec4 abs_bounds=abs(uv);if (abs_bounds.x < 1.0 && abs_bounds.y < 1.0) {light_view_pos0.xyz=light_view_pos0.xyz*0.5+0.5;return shadow_occlusion_0(light_view_pos0,bias);}if (abs_bounds.z >=1.0 || abs_bounds.w >=1.0) {return 0.0;}light_view_pos1.xyz=light_view_pos1.xyz*0.5+0.5;float occlusion1=shadow_occlusion_1(light_view_pos1,bias);return mix(occlusion1,0.0,smoothstep(u_fade_range.x,u_fade_range.y,view_depth));\n#endif\n}highp float calculate_shadow_bias(float NDotL) {\n#ifdef NORMAL_OFFSET\nreturn 0.5*u_shadow_bias.x;\n#else\nreturn 0.5*(u_shadow_bias.x+clamp(u_shadow_bias.y*tan(acos(NDotL)),0.0,u_shadow_bias.z));\n#endif\n}float shadowed_light_factor_normal(vec3 N,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float NDotL=dot(N,u_shadow_direction);float bias=calculate_shadow_bias(NDotL);float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return mix(0.0,(1.0-(u_shadow_intensity*occlusion))*NDotL,step(0.0,NDotL));}float shadowed_light_factor_normal_unbiased(vec3 N,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float NDotL=dot(N,u_shadow_direction);float bias=0.0;float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return mix(0.0,(1.0-(u_shadow_intensity*occlusion))*NDotL,step(0.0,NDotL));}float shadowed_light_factor(highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float bias=0.0;float occlusion=shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);return 1.0-(u_shadow_intensity*occlusion);}float shadow_occlusion(float ndotl,highp vec4 light_view_pos0,highp vec4 light_view_pos1,float view_depth) {float bias=calculate_shadow_bias(ndotl);return shadow_occlusion(light_view_pos0,light_view_pos1,view_depth,bias);}\n#endif";const BB=[];qB(uz,BB);const jB={"_prelude_fog.vertex.glsl":mB,"_prelude_terrain.vertex.glsl":pB,"_prelude_shadow.vertex.glsl":DB,"_prelude_fog.fragment.glsl":gB,"_prelude_shadow.fragment.glsl":zB,"_prelude_lighting.glsl":yB,"_prelude_raster_array.glsl":_B},FB={};HB("",pB),HB(gB,mB),HB(zB,DB),HB(_B,"");const NB=HB(hz,fz),$B=uz,UB="precision highp float;",VB="precision mediump float;";var GB={background:HB(dz,pz),backgroundPattern:HB(mz,gz),circle:HB(yz,_z),clippingMask:HB(vz,bz),heatmap:HB(xz,wz),heatmapTexture:HB(Ez,Sz),collisionBox:HB(Tz,Az),collisionCircle:HB(Oz,Cz),debug:HB(Mz,kz),fill:HB(Iz,Pz),fillOutline:HB(Lz,Rz),fillOutlinePattern:HB(Dz,zz),fillPattern:HB(Bz,jz),fillExtrusion:HB(Fz,Nz),fillExtrusionDepth:HB(OB,CB),fillExtrusionPattern:HB($z,Uz),groundShadow:HB(MB,kB),fillExtrusionGroundEffect:HB(Gz,qz),hillshadePrepare:HB(Vz,Hz),hillshade:HB(Wz,Zz),line:HB(Xz,Yz),linePattern:HB(Kz,Jz),raster:HB(Qz,tB),symbolIcon:HB(eB,rB),symbolSDF:HB(nB,iB),symbolTextAndIcon:HB(oB,sB),terrainRaster:HB(uB,hB),terrainDepth:HB(fB,dB),skybox:HB(aB,cB),skyboxGradient:HB(lB,cB),skyboxCapture:HB(vB,bB),globeRaster:HB(xB,wB),globeAtmosphere:HB(EB,SB),model:HB(PB,IB),modelDepth:HB(RB,L
2B),stars:HB(TB,AB)};function qB(t,e){const r=t.replace(/\s*\/\/[^\n]*\n/g,"\n").split("\n");for(let t of r)if(t=t.trim(),"#"===t[0]&&t.includes("if")&&!t.includes("endif")){t=t.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const r=t.split(" ");for(const t of r)e.includes(t)||e.push(t)}}function HB(t,e){const r=/#include\s+"([^"]+)"/g,n=/#pragma mapbox: ([\w\-]+) ([\w]+) ([\w]+) ([\w]+)/g,i=/(attribute(\S*)|(^\s*|;)in) (highp |mediump |lowp )?([\w]+) ([\w]+)/gm;let o=e.match(i);o&&(o=o.map((t=>{const e=t.split(" ");return e[e.length-1]})),o=[...new Set(o)]);const s={},a=[],l=[];t=t.replace(r,((t,e)=>(l.push(e),""))),e=e.replace(r,((t,e)=>(a.push(e),"")));let c=[...BB];qB(t,c),qB(e,c);for(const t of[...a,...l])jB[t]||console.error(`Undefined include: ${t}`),FB[t]||(FB[t]=[],qB(jB[t],FB[t])),c=[...c,...FB[t]];return{fragmentSource:t=t.replace(n,((t,e,r,n,i)=>(s[i]=!0,"define"===e?`\n#ifndef HAS_UNIFORM_u_${i}\nin ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"initialize"===e?`\n#ifdef HAS_UNIFORM_u_${i}\n    ${r} ${n} ${i} = u_${i};\n#endif\n`:"define-attribute"===e?`\n#ifdef HAS_ATTRIBUTE_a_${i}\n    in ${r} ${n} ${i};\n#endif\n`:"initialize-attribute"===e?"":void 0))),vertexSource:e=e.replace(n,((t,e,r,n,i)=>{const o="float"===n?"vec2":n,a=i.match(/color/)?"color":o;return"define-attribute-vertex-shader-only"===e?`\n#ifdef HAS_ATTRIBUTE_a_${i}\nin ${r} ${n} a_${i};\n#endif\n`:s[i]?"define"===e?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nin ${r} ${o} a_${i};\nout ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"initialize"===e?"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n    ${i} = a_${i};\n#else\n    ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n    ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n    ${r} ${n} ${i} = u_${i};\n#endif\n`:"define-attribute"===e?`\n#ifdef HAS_ATTRIBUTE_a_${i}\n    in ${r} ${n} a_${i};\n    out ${r} ${n} ${i};\n#endif\n`:"initialize-attribute"===e?`\n#ifdef HAS_ATTRIBUTE_a_${i}\n    ${i} = a_${i};\n#endif\n`:void 0:"define"===e?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nin ${r} ${o} a_${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"define-instanced"===e?"mat4"===a?`\n#ifdef INSTANCED_ARRAYS\nin vec4 a_${i}0;\nin vec4 a_${i}1;\nin vec4 a_${i}2;\nin vec4 a_${i}3;\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:`\n#ifdef INSTANCED_ARRAYS\nin ${r} ${o} a_${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"initialize-attribute-custom"===e?`\n#ifdef HAS_ATTRIBUTE_a_${i}\n    ${r} ${n} ${i} = a_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n    ${r} ${n} ${i} = a_${i};\n#else\n    ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n    ${r} ${n} ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n    ${r} ${n} ${i} = u_${i};\n#endif\n`})),staticAttributes:o,usedDefines:c,vertexIncludes:a,fragmentIncludes:l}}class WB{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(t,e,r,n,i,o,s,a){this.context=t;let l=this.boundPaintVertexBuffers.length!==n.length;for(let t=0;!l&&t<n.length;t++)this.boundPaintVertexBuffers[t]!==n[t]&&(l=!0);let c=this.boundDynamicVertexBuffers.length!==s.length;for(let t=0;!c&&t<s.length;t++)this.boundDynamicVertexBuffers[t]!==s[t]&&(c=!0);if(!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||c||this.boundIndexBuffer!==i||this.boundVertexOffset!==o)this.freshBind(e,r,n,i,o,s,a);else{t.bindVertexArrayOES.set(this.vao);for(const r of s)r&&(r.bind(),a&&r.instanceCount&&r.setVertexAttribDivisor(t.gl,e,a));i&&i.dynamicDraw&&i.bind()}}freshBind(t,e,r,n,i,o,s){const a=t.numAttributes,l=this.context,c=l.gl;this.vao&&this.destroy(),this.vao=l.gl.createVertexArray(),l.bindVertexArrayOES.set(this.vao),this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffers=o,e.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i
2);for(const e of r)e.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i);for(const e of o)e&&(e.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i),s&&e.instanceCount&&e.setVertexAttribDivisor(c,t,s));n&&n.bind(),l.currentNumAttributes=a}destroy(){this.vao&&(this.context.gl.deleteVertexArray(this.vao),this.vao=null)}}const ZB=t=>({u_matrix:new ch(t),u_image:new rh(t),u_latrange:new ih(t),u_light:new ih(t),u_shadow:new ah(t),u_highlight:new ah(t),u_emissive_strength:new nh(t),u_accent:new ah(t)}),XB=t=>({u_matrix:new ch(t),u_image:new rh(t),u_dimension:new ih(t),u_zoom:new nh(t)}),YB=(t,e,r,n)=>{const i=r.paint.get("hillshade-shadow-color"),o=r.paint.get("hillshade-highlight-color"),s=r.paint.get("hillshade-accent-color"),a=r.paint.get("hillshade-emissive-strength");let l=S(r.paint.get("hillshade-illumination-direction"));if("viewport"===r.paint.get("hillshade-illumination-anchor"))l-=t.transform.angle;else if(t.style&&t.style.enable3dLights()&&t.style.directionalLight){const e=t.style.directionalLight.properties.get("direction");l=S(ct(e.x,e.y,e.z)[1])}const c=!t.options.moving;return{u_matrix:n||t.transform.calculateProjMatrix(e.tileID.toUnwrapped(),c),u_image:0,u_latrange:JB(t,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),l],u_shadow:i,u_highlight:o,u_emissive_strength:a,u_accent:s}},KB=(t,e)=>{const r=e.stride,n=_v.create();return _v.ortho(n,0,Li,-Li,0,0,1),_v.translate(n,n,[0,-Li,0]),{u_matrix:n,u_image:1,u_dimension:[r,r],u_zoom:t.overscaledZ}};function JB(t,e){const r=Math.pow(2,e.canonical.z),n=e.canonical.y;return[new wx(0,n/r).toLngLat().lat,new wx(0,(n+1)/r).toLngLat().lat]}function QB(t,e,r,n){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;if(t.style.disableElevatedTerrain)return;const i=t.context,o=t.terrain&&t.terrain.renderingToTexture,[s,a]="translucent"!==t.renderPass||o?[{},n]:t.stencilConfigForOverlap(n);for(const n of a){const i=e.getTile(n);if(i.needsHillshadePrepare&&"offscreen"===t.renderPass)rj(t,i,r);else if("translucent"===t.renderPass){const e=t.depthModeForSublayer(0,rM.ReadOnly),a=r.paint.get("hillshade-emissive-strength"),l=t.colorModeForDrapableLayerRenderPass(a),c=o&&t.terrain?t.terrain.stencilModeForRTTOverlap(n):s[n.overscaledZ];tj(t,n,i,r,e,c,l)}}i.viewport.set([0,0,t.width,t.height]),t.resetStencilClippingMasks()}function tj(t,e,r,n,i,o,s){const a=t.context,l=a.gl,c=r.hillshadeFBO;if(!c)return;t.prepareDrawTile();const u=t.isTileAffectedByFog(e),h=t.getOrCreateProgram("hillshade",{overrideFog:u});a.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,c.colorAttachment.get());const f=YB(t,r,n,t.terrain?e.projMatrix:null);t.uploadCommonUniforms(a,h,e.toUnwrapped());const{tileBoundsBuffer:d,tileBoundsIndexBuffer:p,tileBoundsSegments:m}=t.getTileBoundsBuffers(r);h.draw(t,l.TRIANGLES,i,o,s,mM.disabled,f,n.id,d,p,m)}function ej(t,e,r){if(!e.needsDEMTextureUpload)return;const n=t.context,i=n.gl;n.pixelStoreUnpackPremultiplyAlpha.set(!1);const o=r.stride;e.demTexture=e.demTexture||t.getTileTexture(o);const s=r.getPixels();e.demTexture?e.demTexture.update(s,{premultiply:!1}):e.demTexture=new YO(n,s,i.R32F,{premultiply:!1}),e.needsDEMTextureUpload=!1}function rj(t,e,r){const n=t.context,i=n.gl;if(!e.dem)return;const o=e.dem;if(n.activeTexture.set(i.TEXTURE1),ej(t,e,o),!e.demTexture)return;e.demTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE);const s=o.dim;n.activeTexture.set(i.TEXTURE0);let a=e.hillshadeFBO;if(!a){const t=new YO(n,{width:s,height:s,data:null},i.RGBA);t.bind(i.LINEAR,i.CLAMP_TO_EDGE),a=e.hillshadeFBO=n.createFramebuffer(s,s,!0,"renderbuffer"),a.colorAttachment.set(t.texture)}n.bindFramebuffer.set(a.framebuffer),n.viewport.set([0,0,s,s]);const{tileBoundsBuffer:l,tileBoundsIndexBuffer:c,tileBoundsSegments:u}=t.getMercatorTileBoundsBuffers(),h=[];t.linearFloatFilteringSupported()&&h.push("TERRAIN_DEM_FLOAT_FORMAT"),t.getOrCreateProgram("hillshadePrepare",{defines:h}).draw(t,i.TRIANGLES,rM.disabled,oM.disabled,uM.unblended,mM.disabled,KB(e.tileID,o),r.id,l,c,u),e.needsHillshadePrepare=!1}const nj=t=>({u_matrix:new ch(t),u_image0:new rh(t),u_skirt_height:new nh(t),u_ground_shadow_factor:new oh(t)}),ij=(t,e,r)=>({u_matrix:t,u_image0:0,u_skirt_height:e,u_ground_shadow_factor:r}),oj=t=>({u_proj_matrix:new ch(t),u_globe_matrix:new ch(t),u_normalize_matrix:new ch(t),u_merc_matrix:new ch(t),u_zoom_transition:new nh(t),u_merc_center:new ih(t),u_image0:new rh(t),u_grid_matrix:new hh(t),u_skirt_height:new nh(t),u_frustum_tl:new oh(t),u_frustum_tr:new oh(t),u_frustum_br:new oh(t),u_frustum_bl:new oh(t),u_globe_pos:new oh(t),u_globe_radius:new nh(t),u_viewport:new ih(t)}),sj=t=>({u_frustum_tl:new oh(t),u_frustum_tr:new oh(t),u_frustum_br:new oh(t),u_frustum_bl:new oh(t),u_horizon:new nh(t),u_transition:new nh(t),u_fadeout_range:new nh(t),u_color:new sh(t),u_high_color:new sh(t),u_space_color:new sh(t),u_temporal_offset:new nh(t),u_horizon_angle:new nh(t)}),aj=(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p)=>({u_proj_matrix:Float32Array.from(t),u_globe_matrix:e,u_normalize_matrix:Float32Array.from(n),u_merc_matrix:r,u_zoom_transition:i,u_merc_center:o,u_image0:0,u_frustum_tl:s,u_frustum_tr:a,u_frustum_br:l,u_frustum_bl:c,u_globe_pos:u,u_globe_radius:h,u_viewport:f,u_grid_matrix:p?Float32Array.from(p):new Float32Array(9),u_skirt_height:d}),lj=(t,e,r,n,i,o,s,a,l,c,u,h)=>({u_frustum_tl:t,u_frustum_tr:e,u_frustum_br:r,u_frustum_bl:n,u_horizon:i,u_transition:o,u_fadeout_range:s,u_color:a,u_high_color:l,u_space_color:c,u_temporal_offset:u,u_horizon_angle:h}),cj=t=>({u_cutoff_params:new sh(t)}),uj=(t,e)=>{if(e>0&&t.terrain&&it("Cutoff is currently disabled on terrain"),e<=0||t.terrain)return{shouldRenderCutoff:!1,uniformValues:{u_cutoff_params:[0,0,0,0]}};const r=(t,e,r)=>(1-r)*t+r*e,n=t.transform,i=Math.max(Math.abs(n._zoom-(t.minCutoffZoom-1)),1),o=n.isLODDisabled(!1)?z(dk,dk-15,n.pitch):z(30,15,n.pitch),s=n._farZ-n._nearZ,a=n.cameraToCenterDistance,l=e*n.height,c=r(.75*
2a,n._farZ+l,o)*i,u=(c-n._nearZ)/s,h=(c-l-n._nearZ)/s;return{shouldRenderCutoff:o<1,uniformValues:{u_cutoff_params:[n._nearZ,n._farZ,u,h]}}};class hj{constructor(){this.operations={}}newMorphing(t,e,r,n,i){if(t in this.operations){const e=this.operations[t];e.to.tileID.key!==r.tileID.key&&(e.queued=r)}else this.operations[t]={startTime:n,phase:0,duration:i,from:e,to:r,queued:null}}getMorphValuesForProxy(t){if(!(t in this.operations))return null;const e=this.operations[t];return{from:e.from,to:e.to,phase:e.phase}}update(t){for(const e in this.operations){const r=this.operations[e];for(r.phase=(t-r.startTime)/r.duration;r.phase>=1||!this._validOp(r);)if(!this._nextOp(r,t)){delete this.operations[e];break}}}_nextOp(t,e){return!!t.queued&&(t.from=t.to,t.to=t.queued,t.queued=null,t.phase=0,t.startTime=e,!0)}_validOp(t){return t.from.hasData()&&t.to.hasData()}}function fj(t,e){return null!=t&&null!=e&&!(!t.hasData()||!e.hasData())&&null!=t.demTexture&&null!=e.demTexture&&t.tileID.key!==e.tileID.key}const dj=new hj,pj=0,mj=1,gj=250,yj={0:null,1:"TERRAIN_VERTEX_MORPHING"};function _j(t,e,r,n,i){const o=t.context,s=o.gl;let a,l;const c=t.transform,u=qb(t,o,c),h=(e,r)=>{if(l===r)return;const n=[yj[r],"PROJECTION_GLOBE_VIEW"];u&&n.push("CUSTOM_ANTIALIASING");const i=t.isTileAffectedByFog(e);a=t.getOrCreateProgram("globeRaster",{defines:n,overrideFog:i}),l=r},f=t.colorModeForRenderPass(),d=new rM(s.LEQUAL,rM.ReadWrite,t.depthRangeFor3D);dj.update(i);const p=Ub(c),m=[hx(c.center.lng),fx(c.center.lat)],g=t.globeSharedBuffers,y=[c.width*vr.devicePixelRatio,c.height*vr.devicePixelRatio],_=Float32Array.from(c.globeMatrix),v={useDenormalizedUpVectorScale:!0};{const c=t.transform,u=xj(c.zoom,e.exaggeration(),e.sourceCache._source.tileSize);l=-1;const b=s.TRIANGLES;for(const l of n){const n=r.getTile(l),x=oM.disabled,w=e.prevTerrainTileForTile[l.key],E=e.terrainTileForTile[l.key];fj(w,E)&&dj.newMorphing(l.key,w,E,i,gj),o.activeTexture.set(s.TEXTURE0),n.texture&&n.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);const S=dj.getMorphValuesForProxy(l.key),T=S?mj:pj;S&&$r(v,{morphing:{srcDemTile:S.from,dstDemTile:S.to,phase:C(S.phase)}});const A=Tb(l.canonical),O=Wb(A.getCenter().lat),M=Hb(l.canonical,A,O,c.worldSize/c._pixelsPerMercatorPixel),k=Db(bb(l.canonical)),I=aj(c.expandedFarZProjMatrix,_,p,k,Vb(c.zoom),m,c.frustumCorners.TL,c.frustumCorners.TR,c.frustumCorners.BR,c.frustumCorners.BL,c.globeCenterInViewSpace,c.globeRadius,y,u,M);if(h(l,T),a&&(e.setupElevationDraw(n,a,v),t.uploadCommonUniforms(o,a,l.toUnwrapped()),g)){const[e,r,n]=g.getGridBuffers(O,0!==u);a.draw(t,b,d,x,f,mM.backCCW,I,"globe_raster",e,r,n)}}}if(g&&(t.renderDefaultNorthPole||t.renderDefaultSouthPole)){const i=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];u&&i.push("CUSTOM_ANTIALIASING"),a=t.getOrCreateProgram("globeRaster",{defines:i});for(const i of n){const{x:n,y:l,z:u}=i.canonical,h=0===l,p=l===(1<<u)-1,[_,b,x,w]=g.getPoleBuffers(u,!1);if(w&&(h||p)){const l=r.getTile(i);o.activeTexture.set(s.TEXTURE0),l.texture&&l.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);let g=Gb(u,n,c);const E=Db(bb(i.canonical)),S=(e,r)=>e.draw(t,s.TRIANGLES,d,oM.disabled,f,mM.disabled,aj(c.expandedFarZProjMatrix,g,g,E,0,m,c.frustumCorners.TL,c.frustumCorners.TR,c.frustumCorners.BR,c.frustumCorners.BL,c.globeCenterInViewSpace,c.globeRadius,y,0),"globe_pole_raster",r,x,w);e.setupElevationDraw(l,a,v),t.uploadCommonUniforms(o,a,i.toUnwrapped()),h&&t.renderDefaultNorthPole&&S(a,_),p&&t.renderDefaultSouthPole&&(g=_v.scale(_v.create(),g,[1,-1,1]),S(a,b))}}}}function vj(t,e,r,n,i){if("globe"===t.transform.projection.name)_j(t,e,r,n,i);else{const o=t.context,s=o.gl;let a,l;const c=t.shadowRenderer,u=uj(t,t.longestCutoffRange),h=e=>{if(l===e)return;const r=[];r.push(yj[e]),u.shouldRenderCutoff&&r.push("RENDER_CUTOFF"),a=t.getOrCreateProgram("terrainRaster",{defines:r}),l=e},f=t.colorModeForRenderPass(),d=new rM(s.LEQUAL,rM.ReadWrite,t.depthRangeFor3D);dj.update(i);const p=t.transform,m=xj(p.zoom,e.exaggeration(),e.sourceCache._source.tileSize);let g=[0,0,0];if(c){const e=t.style.directionalLight,r=t.style.ambientLight;e&&r&&(g=W$(e,r))}{l=-1;const y=s.TRIANGLES,[_,v]=[e.gridIndexBuffer,e.gridSegments];for(const l of n){const n=r.getTile(l),b=oM.disabled,x=e.prevTerrainTileForTile[l.key],w=e.terrainTileForTile[l.key];fj(x,w)&&dj.newMorphing(l.key,x,w,i,gj),o.activeTexture.set(s.TEXTURE0),n.texture&&n.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);const E=dj.getMorphValuesForProxy(l.key),S=E?mj:pj;let T;E&&(T={morphing:{srcDemTile:E.from,dstDemTile:E.to,phase:C(E.phase)}});const A=ij(l.projMatrix,wj(l.canonical,p.renderWorldCopies)?m/10:m,g);if(h(S),!a)continue;e.setupElevationDraw(n,a,T);const O=l.toUnwrapped();c&&c.setupShadows(O,a),t.uploadCommonUniforms(o,a,O,null,u),a.draw(t,y,d,b,f,mM.backCCW,A,"terrain_raster",e.gridBuffer,_,v)}}}}function bj(t,e,r,n){if("globe"===t.transform.projection.name)return;const i=t.context,o=i.gl;i.clear({depth:1});const s=t.getOrCreateProgram("terrainDepth"),a=new rM(o.LESS,rM.ReadWrite,t.depthRangeFor3D);for(const i of n){const n=r.getTile(i),l=ij(i.projMatrix,0,[0,0,0]);e.setupElevationDraw(n,s),s.draw(t,o.TRIANGLES,a,oM.disabled,uM.unblended,mM.backCCW,l,"terrain_depth",e.gridBuffer,e.gridIndexBuffer,e.gridNoSkirtSegments)}}function xj(t,e,r){if(0===e)return 0;const n=e<1&&514===r?.25/e:1;return 6*Math.pow(1.5,22-t)*Math.max(e,1)*n}function wj(t,e){const r=1<<t.z;return!e&&(0===t.x||t.x===r-1)||0===t.y||t.y===r-1}const Ej=t=>({u_matrix:new ch(t)}),Sj=t=>({u_matrix:t});function Tj(t,e,r,n,i){if(i>0){const o=vr.now(),s=(o-t.timeAdded)/i,a=e?(o-e.timeAdded)/i:-1,l=r.getSource(),c=n.coveringZoomLevel({tileSize:l.tileSize,roundZoom:l.roundZoom}),u=!e||Math.abs(e.tileID.overscaledZ-c)>Math.abs(t.tileID.overscaledZ-c),h=u&&t.refreshedUponExpiration?1:D(u?s:1-a,0,1);return t.refreshedUponExpiration&&s>=1&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}const Aj=128,Oj=5,Cj=50;class Mj extends yM{constructor(t){const e={type:"raster-dem",maxzoom:t.transform.maxZoom},r=new mL(YL(),null),n=XR("mock-dem",e,r,t.style);super("mock-dem",n,!1),n.setEventedParent(this),this._sourceLoaded=!0}_loadTile(t,e){t.state="loaded",e(null)}}class kj extends yM{constructor(t){const e=XR("proxy",{type:"geojson",maxzoom:t.transform.maxZoom},new mL(YL(),null),t.style);super("proxy",e,!1),e.setEventedParent(this),this.map=this.getSource().map=t,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(t,e,r){if(t.freezeTileCoverage)return;this.transform=t;const n=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce(((e,r)=>{if(e[r.key]="",!this._tiles[r.key]){const e=new fC(r,this._source.tileSize*r.overscaleFactor(),t.tileZoom);e.state="loaded",this._tiles[r.key]=e}return e}),{});for(const t in this._tiles)t in n||(this.freeFBO(t),this._tiles[t].unloadVectorData(),delete this._tiles[t])}freeFBO(t){const e=this.proxyCachedFBO[t];if(void 0!==e){const r=Object.values(e);this.renderCachePool.push(...r),delete this.proxyCachedFBO[t]}}deallocRenderCache(){this.renderCache.forEach((t=>t.fb.destroy())),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class Ij extends jv{constructor(t,e,r){super(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y),this.proxyTileKey=e,this.projMatrix=r}}class Pj extends HS{constructor(t,e){super(),this.painter=t,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[r,n,i]=Rj(Aj+1),o=t.context;this.gridBuffer=o.createVertexBuffer(r,Lv.members),this.gridIndexBuffer=o.createIndexBuffer(n),this.gridSegments=Nu.simpleSegment(0,0,r.length,n.length),this.gridNoSkirtSegments=Nu.simpleSegment(0,0,r.length,i),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new kj(e.map),this.orthoMatrix=_v.create();const s="globe"===this.painter.transform.projection.name?.015:0;_v.ortho(this.orthoMatrix,s,Li,0,Li,0,1);const a=o.gl;this._overlapStencilMode=new oM({func:a.GEQUAL,mask:255},0,255,a.KEEP,a.KEEP,a.REPLACE),this._previousZoom=t.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=e,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new Mj(e.map),this._pendingGroundEffectLayers=[]}set style(t){t.on("data",this._onStyleDataEvent.bind(this)),this._style=t,this._style.map.on("moveend",(()=>{this._clearLineLayersFromRenderCache()}))}update(t,e,r){if(t&&t.terrain){this._style!==t&&(this.style=t,this._evaluationZoom=void 0);const n=t.terrain.properties,i=t.terrain.drapeRenderMode===YP.deferred,o=t.terrain.isZoomDependent();this._previousUpdateTimestamp=this.enabled?this._updateTimestamp:void 0,this._updateTimestamp=vr.now();const s=t.terrain&&t.terrain.scope,a=n.get("source"),l=i?this._mockSourceCache:t.getSourceCache(a,s);if(!l)return void it(`Couldn't find terrain source "${a}".`);if(this.sourceCache=l,this._exaggeration=o?this.calculateExaggeration(e):n.get("exaggeration"),!e.projection.requiresDraping&&o&&0===this._exaggeration)return void this._disable();this.enabled=!0;const c=()=>{this.sourceCache.used&&it(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const t=this.getScaledDemTileSize();this.sourceCache.update(e,t,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,c(),this._initializing=!0),c(),e.updateElevation(!0,r),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(e),this._emptyDEMTextureDirty=!0,this._previousZoom=e.zoom}else this._disable()}calculateExaggeration(t){const e=this._previousCameraAltitude,r=t.getFreeCameraOptions().position.z/t.pixelsPerMeter*t.worldSize;this._previousCameraAltitude=r;const n=null!=e?r-e:Number.MAX_VALUE;if(Math.abs(n)<2)return this._exaggeration;const i=t.zoom,o=this._style.terrain;if(!this._previousUpdateTimestamp)return o.getExaggeration(i);let s=i-this._previousZoom;const a=this._previousUpdateTimestamp;let l=i;null!=this._evaluationZoom&&(l=this._evaluationZoom,Math.abs(i-l)>.5&&(s=.5*(i-l+s)),s*n<0&&(l+=s)),this._evaluationZoom=l;const c=o.getExaggeration(l),u=c===o.getExaggeration(Math.max(0,l-.1)),h=.1,f=.01;if(u&&Math.abs(c-this._exaggeration)<f)return c;let d=Math.min(.1,.00375*(this._updateTimestamp-a));return(u||c<h||Math.abs(s)<1e-4)&&(d=Math.min(.2,4*d)),Co(this._exaggeration,c,d)}resetTileLookupCache(t){this._findCoveringTileCache[t]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/Aj*this.proxySourceCache.getSource().tileSize}_onStyleDataEvent(t){t.coord&&"source"===t.dataType?this._clearRenderCacheForTile(t.sourceCacheId,t.coord):"style"===t.dataType&&(this.invalidateRenderCache=!0,this._evaluationZoom=void 0,this._previousUpdateTimestamp=void 0,this._previousCameraAltitude=void 0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this._evaluationZoom=void 0,this._previousUpdateTimestamp=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const t in this._style._mergedSourceCaches)this._style._mergedSourceCaches[t].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach((t=>t.fb.destroy())),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),this.framebufferCopyTexture&&this.framebufferCopyTexture.destroy()}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const t=2*this.proxySourceCache.getSource().tileSize;return[t,t]}set useVertexMorphing(t){this._useVertexMorphing=t}updateTileBinding(t){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const e=this.proxySourceCache,r=this.painter.transform;this._initializing&&(this._initializing=0===r._centerAltitude&&-1===this.getAtPointOrZero(wx.fromLngLat(r.center),-1),this._emptyDEMTextureDirty=!this._initializing);const n=this.proxyCoords=e.getIds().map((t=>{const n=e.getTileByID(t).tileID;return n.projMatrix=r.calculateProjMatrix(n.toUnwrapped()),n}));Lj(n,this.painter);const i=this.proxyToSource||{};this.proxyToSource={}
2,n.forEach((t=>{this.proxyToSource[t.key]={}})),this.terrainTileForTile={};const o=this._style._mergedSourceCaches;for(const e in o){const r=o[e];if(!r.used)continue;if(r!==this.sourceCache&&this.resetTileLookupCache(r.id),this._setupProxiedCoordsForOrtho(r,t[e],i),r.usedForTerrain)continue;const n=t[e];r.getSource().reparseOverscaled&&this._assignTerrainTiles(n)}this.proxiedCoords[e.id]=n.map((t=>new Ij(t,t.key,this.orthoMatrix))),this._assignTerrainTiles(n),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(i),this.renderingToTexture=!1;const s={};this._visibleDemTiles=[];for(const t of this.proxyCoords){const e=this.terrainTileForTile[t.key];if(!e)continue;const r=e.tileID.key;r in s||(this._visibleDemTiles.push(e),s[r]=r)}}_assignTerrainTiles(t){this._initializing||t.forEach((t=>{if(this.terrainTileForTile[t.key])return;const e=this._findTileCoveringTileID(t,this.sourceCache);e&&(this.terrainTileForTile[t.key]=e)}))}_prepareDEMTextures(){const t=this.painter.context,e=t.gl;for(const r in this.terrainTileForTile){const n=this.terrainTileForTile[r],i=n.dem;!i||n.demTexture&&!n.needsDEMTextureUpload||(t.activeTexture.set(e.TEXTURE1),ej(this.painter,n,i))}}_prepareDemTileUniforms(t,e,r,n){if(!e||null==e.demTexture)return!1;const i=t.tileID.canonical,o=e.tileID.canonical,s=Math.pow(2,o.z-i.z),a=n||"";return r[`u_dem_tl${a}`]=[i.x*s%1,i.y*s%1],r[`u_dem_scale${a}`]=s,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const t=this.painter.context,e=t.gl;if(!this._emptyDepthBufferTexture){const r=new vw({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new YO(t,r,e.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let t=0;const e=this._visibleDemTiles.reduce(((e,r)=>{if(!r.dem)return e;const n=r.dem.tree.minimums[0];return n>0&&t++,e+=n}),0);return t?e/t:0}_updateEmptyDEMTexture(){const t=this.painter.context,e=t.gl;t.activeTexture.set(e.TEXTURE2);const r=this._getLoadedAreaMinimum(),n=()=>{const t=new bw({width:1,height:1},new Float32Array([r]));return[e.R32F,t]},[i,o]=n();this._emptyDEMTextureDirty=!1;let s=this._emptyDEMTexture;return s?s.update(o,{premultiply:!1}):s=this._emptyDEMTexture=new YO(t,o,i,{premultiply:!1}),s}setupElevationDraw(t,e,r){const n=this.painter.context,i=n.gl,o=zj();o.u_exaggeration=this.exaggeration();let s=null,a=null,l=1;if(r&&r.morphing&&this._useVertexMorphing){const e=r.morphing.srcDemTile,n=r.morphing.dstDemTile;l=r.morphing.phase,e&&n&&(this._prepareDemTileUniforms(t,e,o,"_prev")&&(a=e),this._prepareDemTileUniforms(t,n,o)&&(s=n))}const c=t=>t&&t.demTexture&&this.painter.linearFloatFilteringSupported()?i.LINEAR:i.NEAREST,u=t=>{o.u_dem_size=1===t.size[0]?1:t.size[0]-2};if(a&&s)n.activeTexture.set(i.TEXTURE2),s.demTexture.bind(c(s),i.CLAMP_TO_EDGE),n.activeTexture.set(i.TEXTURE4),a.demTexture.bind(c(a),i.CLAMP_TO_EDGE),s.demTexture&&u(s.demTexture),o.u_dem_lerp=l;else{s=this.terrainTileForTile[t.tileID.key],n.activeTexture.set(i.TEXTURE2);const e=this._prepareDemTileUniforms(t,s,o)?s.demTexture:this.emptyDEMTexture;e.bind(c(s),i.CLAMP_TO_EDGE),u(e)}if(n.activeTexture.set(i.TEXTURE3),r&&r.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE),this._depthFBO&&(o.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.emptyDepthBufferTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE),o.u_depth_size_inv=[1,1]),r&&r.useMeterToDem&&s){const t=(1<<s.tileID.canonical.z)*dx(1,this.painter.transform.center.lat)*this.sourceCache.getSource().tileSize;o.u_meter_to_dem=t}if(r&&r.labelPlaneMatrixInv&&(o.u_label_plane_matrix_inv=r.labelPlaneMatrixInv),e.setTerrainUniformValues(n,o),"globe"===this.painter.transform.projection.name){const i=this.globeUniformValues(this.painter.transform,t.tileID.canonical,r&&r.useDenormalizedUpVectorScale);e.setGlobeUniformValues(n,i)}}globeUniformValues(t,e,r){const n=t.projection;return{u_tile_tl_up:n.upVector(e,0,0),u_tile_tr_up:n.upVector(e,Li,0),u_tile_br_up:n.upVector(e,Li,Li),u_tile_bl_up:n.upVector(e,0,Li),u_tile_up_scale:r?mb(1):n.upVectorScale(e,t.center.lat,t.worldSize).metersToTile}}renderToBackBuffer(t){const e=this.painter,r=this.painter.context;0!==t.length&&(r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height]),e.gpuTimingDeferredRenderStart(),this.renderingToTexture=!1,vj(e,this,this.proxySourceCache,t,this._updateTimestamp),this.renderingToTexture=!0,e.gpuTimingDeferredRenderEnd(),t.splice(0,t.length))}renderBatch(t){if(0===this._drapedRenderBatches.length)return t+1;this.renderingToTexture=!0;const e=this.painter,r=this.painter.context,n=this.proxySourceCache,i=this.proxiedCoords[n.id],o=this._drapedRenderBatches.shift(),s=e.style.order,a=[];let l=0;for(const c of i){const i=n.getTileByID(c.proxyTileKey),u=n.proxyCachedFBO[c.key]?n.proxyCachedFBO[c.key][t]:void 0,h=void 0!==u?n.renderCache[u]:this.pool[l++],f=void 0!==u;if(i.texture=h.tex,f&&!h.dirty){a.push(i.tileID);continue}let d;r.bindFramebuffer.set(h.fb.framebuffer),this.renderedToTile=!1,h.dirty&&(r.clear({color:wn.transparent,stencil:0}),h.dirty=!1);for(let t=o.start;t<=o.end;++t){const n=e.style._mergedLayers[s[t]];if(n.isHidden(e.transform.zoom))continue;const i=e.style.getLayerSourceCache(n),o=i?this.proxyToSource[c.key][i.id]:[c];if(!o)continue;const a=o;r.viewport.set([0,0,h.fb.width,h.fb.height]),d!==(i?i.id:null)&&(this._setupStencil(h,o,n,i),d=i?i.id:null),e.renderLayer(e,i,n,a)}if(0===this._drapedRenderBatches.length)for(const t of this._pendingGroundEffectLayers){const n=e.style._mergedLayers[s[t]];if(n.isHidden(e.transform.zoom))continue;const i=e.style.getLayerSourceCache(n),o=i?this.proxyToSource[c.key][i.id]:[c];if(!o)continue;const a=o;r.viewport.set([0,0,h.fb.width,h.fb.height]),d!==(i?i.id:null)&&(this._setupStencil(h,o,n,i),d=i?i.id:null),e.renderLayer(e,i,n,a)}this.renderedToTile?(h.dirty=!0,a.push(i.tileID)):f||--l,l===Oj&&(l=0,this.renderToBackBuffer(a))}return this.renderToBackBuffer(a),this.renderingToTexture=!1,r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height]),o.end+1}postRender(){}isLayerOrderingCorrect(t){const e=t.order.length;let r=-1,n=e;for(let i=0;i<e;++i){const e=t._mergedLayers[t.order[i]];
2this._style.isLayerDraped(e)?r=Math.max(r,i):n=Math.min(n,i)}return n>r}getMinElevationBelowMSL(){let t=0;const e=30;return this._visibleDemTiles.filter((t=>t.dem)).forEach((e=>{const r=e.dem.tree;t=Math.min(t,r.minimums[0])})),0===t?t:(t-e)*this._exaggeration}raycast(t,e,r){if(!this._visibleDemTiles)return null;const n=this._visibleDemTiles.filter((t=>t.dem)).map((n=>{const i=n.tileID,o=1<<i.overscaledZ,{x:s,y:a}=i.canonical,l=s/o,c=(s+1)/o,u=a/o,h=(a+1)/o;return{minx:l,miny:u,maxx:c,maxy:h,t:n.dem.tree.raycastRoot(l,u,c,h,t,e,r),tile:n}}));n.sort(((t,e)=>(null!==t.t?t.t:Number.MAX_VALUE)-(null!==e.t?e.t:Number.MAX_VALUE)));for(const i of n){if(null==i.t)return null;const n=i.tile.dem.tree.raycast(i.minx,i.miny,i.maxx,i.maxy,t,e,r);if(null!=n)return n}return null}_createFBO(){const t=this.painter.context,e=t.gl,r=this.drapeBufferSize;t.activeTexture.set(e.TEXTURE0);const n=new YO(t,{width:r[0],height:r[1],data:null},e.RGBA);n.bind(e.LINEAR,e.CLAMP_TO_EDGE);const i=t.createFramebuffer(r[0],r[1],!0,null);return i.colorAttachment.set(n.texture),i.depthAttachment=new QC(t,i.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=t.createRenderbuffer(t.gl.DEPTH_STENCIL,r[0],r[1]),this._stencilRef=0,i.depthAttachment.set(this._sharedDepthStencil),t.clear({stencil:0})):i.depthAttachment.set(this._sharedDepthStencil),t.extTextureFilterAnisotropic&&e.texParameterf(e.TEXTURE_2D,t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.extTextureFilterAnisotropicMax),{fb:i,tex:n,dirty:!1}}_initFBOPool(){for(;this.pool.length<Math.min(Oj,this.proxyCoords.length);)this.pool.push(this._createFBO())}_shouldDisableRenderCache(){if(this._style.hasLightTransitions())return!0;for(const t in this._style._mergedSourceCaches)if(this._style._mergedSourceCaches[t].hasTransition())return!0;const t=t=>{const e=this._style._mergedLayers[t],r=e.isHidden(this.painter.transform.zoom);return"custom"===e.type?!r&&e.shouldRedrape():!r&&e.hasTransition()};return this._style.order.some(t)}_clearLineLayersFromRenderCache(){let t=!1;for(const e of this._style.getSources())if(e instanceof jL){t=!0;break}if(!t)return;const e={};for(let t=0;t<this._style.order.length;++t){const r=this._style._mergedLayers[this._style.order[t]],n=this._style.getLayerSourceCache(r);if(n&&!e[n.id]&&(!r.isHidden(this.painter.transform.zoom)&&"line"===r.type&&r.widthExpression()instanceof xa)){e[n.id]=!0;for(const t of this.proxyCoords){const e=this.proxyToSource[t.key][n.id];if(e)for(const t of e)this._clearRenderCacheForTile(n.id,t)}}}}_clearRasterLayersFromRenderCache(){let t=!1;for(const e in this._style._mergedSourceCaches)if(this._style._mergedSourceCaches[e]._source instanceof FL){t=!0;break}if(!t)return;const e={};for(let t=0;t<this._style.order.length;++t){const r=this._style._mergedLayers[this._style.order[t]],n=this._style.getLayerSourceCache(r);if(!n||e[n.id])continue;if(r.isHidden(this.painter.transform.zoom)||"raster"!==r.type)continue;const i=r.paint.get("raster-fade-duration");for(const t of this.proxyCoords){const e=this.proxyToSource[t.key][n.id];if(e)for(const t of e){const e=Tj(n.getTile(t),n.findLoadedParent(t,0),n,this.painter.transform,i);(1!==e.opacity||0!==e.mix)&&this._clearRenderCacheForTile(n.id,t)}}}}_setupDrapedRenderBatches(){const t=this._style.order,e=t.length;if(0===e)return;const r=[];this._pendingGroundEffectLayers=[];let n,i=0,o=this._style._mergedLayers[t[i]];for(;!this._style.isLayerDraped(o)&&o.isHidden(this.painter.transform.zoom)&&++i<e;)o=this._style._mergedLayers[t[i]];for(;i<e;++i){const e=this._style._mergedLayers[t[i]];e.isHidden(this.painter.transform.zoom)||(this._style.isLayerDraped(e)?void 0===n&&(n=i):("fill-extrusion"===e.type&&this._pendingGroundEffectLayers.push(i),void 0!==n&&(r.push({start:n,end:i-1}),n=void 0)))}if(void 0!==n&&r.push({start:n,end:i-1}
2),0!==r.length){const t=r[r.length-1],e=this._pendingGroundEffectLayers.every((e=>e>t.end));e||it("fill-extrusion with flood lighting and/or ground ambient occlusion should be moved to be on top of all draped layers.")}this._drapedRenderBatches=r}_setupRenderCache(t){const e=this.proxySourceCache;if(this._shouldDisableRenderCache()||this.invalidateRenderCache){if(this.invalidateRenderCache=!1,e.renderCache.length>e.renderCachePool.length){const t=Object.values(e.proxyCachedFBO);e.proxyCachedFBO={};for(let r=0;r<t.length;++r){const n=Object.values(t[r]);e.renderCachePool.push(...n)}}return}this._clearRasterLayersFromRenderCache();const r=this.proxyCoords,n=this._tilesDirty;for(let i=r.length-1;i>=0;i--){const o=r[i];if(e.getTileByID(o.key),void 0!==e.proxyCachedFBO[o.key]){const r=t[o.key],i=this.proxyToSource[o.key];let s=0;for(const t in i){const e=i[t],o=r[t];if(!o||o.length!==e.length||e.some(((e,r)=>e!==o[r]||n[t]&&n[t].hasOwnProperty(e.key)))){s=-1;break}++s}for(const t in e.proxyCachedFBO[o.key])e.renderCache[e.proxyCachedFBO[o.key][t]].dirty=s<0||s!==Object.values(r).length}}const i=[...this._drapedRenderBatches];i.sort(((t,e)=>{const r=t.end-t.start;return e.end-e.start-r}));for(const t of i)for(const n of r){if(e.proxyCachedFBO[n.key])continue;let r=e.renderCachePool.pop();void 0===r&&e.renderCache.length<Cj&&(r=e.renderCache.length,e.renderCache.push(this._createFBO())),void 0!==r&&(e.proxyCachedFBO[n.key]={},e.proxyCachedFBO[n.key][t.start]=r,e.renderCache[r].dirty=!0)}this._tilesDirty={}}_setupStencil(t,e,r,n){if(!n||!this._sourceTilesOverlap[n.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const i=this.painter.context,o=i.gl;if(e.length<=1)return void(this._overlapStencilType=!1);let s;if(r.isTileClipped())s=e.length,this._overlapStencilMode.test={func:o.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(e[0].overscaledZ>e[e.length-1].overscaledZ))return void(this._overlapStencilType=!1);s=1,this._overlapStencilMode.test={func:o.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+s>255&&(i.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=s,this._overlapStencilMode.ref=this._stencilRef,r.isTileClipped()&&this._renderTileClippingMasks(e,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return"Clip"===this._overlapStencilType||"Mask"===this._overlapStencilType}stencilModeForRTTOverlap(t){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[t.key]),this._overlapStencilMode):oM.disabled}_renderTileClippingMasks(t,e){const r=this.painter,n=this.painter.context,i=n.gl;r._tileClippingMaskIDs={},n.setColorMode(uM.disabled),n.setDepthMode(rM.disabled);const o=r.getOrCreateProgram("clippingMask");for(const n of t){const t=r._tileClippingMaskIDs[n.key]=--e;o.draw(r,i.TRIANGLES,rM.disabled,new oM({func:i.ALWAYS,mask:0},t,255,i.KEEP,i.KEEP,i.REPLACE),uM.disabled,mM.disabled,Sj(n.projMatrix),"$clipping",r.tileExtentBuffer,r.quadTriangleIndexBuffer,r.tileExtentSegments)}}pointCoordinate(t){const e=this.painter.transform;if(t.x<0||t.x>e.width||t.y<0||t.y>e.height)return null;const r=[t.x,t.y,1,1];uv.transformMat4(r,r,e.pixelMatrixInverse),uv.scale(r,r,1/r[3]),r[0]/=e.worldSize,r[1]/=e.worldSize;const n=e._camera.position,i=dx(1,e.center.lat),o=[n[0],n[1],n[2]/i,0],s=Sv.subtract([],r.slice(0,3),o);Sv.normalize(s,s);const a=this._exaggeration,l=this.raycast(o,s,a);return null!==l&&l?(Sv.scaleAndAdd(o,o,s,l),o[3]=o[2],o[2]*=i,o):null}drawDepth(){const t=this.painter,e=t.context,r=this.proxySourceCache,n=Math.ceil(t.width),i=Math.ceil(t.height);if(!this._depthFBO||this._depthFBO.width===n&&this._depthFBO.height===i||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const t=e.gl,r=e.createFramebuffer(n,i,!0,"renderbuffer");e.activeTexture.set(t.TEXTURE0);const o=new YO(e,{width:n,height:i,data:null},t.RGBA);o.bind(t.NEAREST,t.CLAMP_TO_EDGE),r.colorAttachment.set(o.texture);const s=e.createRenderbuffer(e.gl.DEPTH_COMPONENT16,n,i);r.depthAttachment.set(s),this._depthFBO=r,this._depthTexture=o}e.bindFramebuffer.set(this._depthFBO.framebuffer),e.viewport.set([0,0,n,i]),bj(t,this,r,this.proxyCoords)}_setupProxiedCoordsForOrtho(t,e,r){if(t.getSource()instanceof kP)return this._setupProxiedCoordsForImageSource(t,e,r);this._findCoveringTileCache[t.id]=this._findCoveringTileCache[t.id]||{};const n=this.proxiedCoords[t.id]=[],i=this.proxyCoords;for(let e=0;e<i.length;e++){const o=i[e],s=this._findTileCoveringTileID(o,t);
2if(s){const e=this._createProxiedId(o,s,r[o.key]&&r[o.key][t.id]);n.push(e),this.proxyToSource[o.key][t.id]=[e]}}let o=!1;for(let i=0;i<e.length;i++){const s=t.getTile(e[i]);if(!s||!s.hasData())continue;const a=this._findTileCoveringTileID(s.tileID,this.proxySourceCache);if(a&&a.tileID.canonical.z!==s.tileID.canonical.z){const e=this.proxyToSource[a.tileID.key][t.id],i=this._createProxiedId(a.tileID,s,r[a.tileID.key]&&r[a.tileID.key][t.id]);e?e.splice(e.length-1,0,i):this.proxyToSource[a.tileID.key][t.id]=[i],n.push(i),o=!0}}this._sourceTilesOverlap[t.id]=o}_setupProxiedCoordsForImageSource(t,e,r){if(!t.getSource().loaded())return;const n=this.proxiedCoords[t.id]=[],i=this.proxyCoords,o=t.getSource(),s=o.tileID;if(!s)return;const a=new b(s.x,s.y)._div(1<<s.z),l=o.coordinates.map(wx.fromLngLat).reduce(((t,e)=>(t.min.x=Math.min(t.min.x,e.x-a.x),t.min.y=Math.min(t.min.y,e.y-a.y),t.max.x=Math.max(t.max.x,e.x-a.x),t.max.y=Math.max(t.max.y,e.y-a.y),t)),{min:new b(Number.MAX_VALUE,Number.MAX_VALUE),max:new b(-Number.MAX_VALUE,-Number.MAX_VALUE)}),c=(t,e)=>{const r=t.wrap+t.canonical.x/(1<<t.canonical.z),n=t.canonical.y/(1<<t.canonical.z),i=Li/(1<<t.canonical.z),o=e.wrap+e.canonical.x/(1<<e.canonical.z),s=e.canonical.y/(1<<e.canonical.z);return r+i<o+l.min.x||r>o+l.max.x||n+i<s+l.min.y||n>s+l.max.y};for(let o=0;o<i.length;o++){const s=i[o];for(let i=0;i<e.length;i++){const o=t.getTile(e[i]);if(!o||!o.hasData())continue;if(c(s,o.tileID))continue;const a=this._createProxiedId(s,o,r[s.key]&&r[s.key][t.id]),l=this.proxyToSource[s.key][t.id];l?l.push(a):this.proxyToSource[s.key][t.id]=[a],n.push(a)}}}_createProxiedId(t,e,r){let n=this.orthoMatrix;if(r){const t=r.find((t=>t.key===e.tileID.key));if(t)return t}if(e.tileID.key!==t.key){const r=t.canonical.z-e.tileID.canonical.z;let i,o,s;n=_v.create();const a=e.tileID.wrap-t.wrap<<t.overscaledZ;r>0?(i=Li>>r,o=i*((e.tileID.canonical.x<<r)-t.canonical.x+a),s=i*((e.tileID.canonical.y<<r)-t.canonical.y)):(i=Li<<-r,o=Li*(e.tileID.canonical.x-(t.canonical.x+a<<-r)),s=Li*(e.tileID.canonical.y-(t.canonical.y<<-r))),_v.ortho(n,0,i,0,i,0,1),_v.translate(n,n,[o,s,0])}return new Ij(e.tileID,t.key,n)}_findTileCoveringTileID(t,e){let r=e.getTile(t);if(r&&r.hasData())return r;const n=this._findCoveringTileCache[e.id],i=n[t.key];if(r=i?e.getTileByID(i):null,r&&r.hasData()||null===i)return r;let o=r?r.tileID:t,s=o.overscaledZ;const a=e.getSource().minzoom,l=[];if(!i){const n=e.getSource().maxzoom;if(t.canonical.z>=n){const r=t.canonical.z-n;e.getSource().reparseOverscaled?(s=Math.max(t.canonical.z+2,e.transform.tileZoom),o=new jv(s,t.wrap,n,t.canonical.x>>r,t.canonical.y>>r)):0!==r&&(s=n,o=new jv(s,t.wrap,n,t.canonical.x>>r,t.canonical.y>>r))}o.key!==t.key&&(l.push(o.key),r=e.getTile(o))}const c=t=>{l.forEach((e=>{n[e]=t})),l.length=0};for(s-=1;s>=a&&(!r||!r.hasData());s--){r&&c(r.tileID.key);const t=o.calculateScaledKey(s);if(r=e.getTileByID(t),r&&r.hasData())break;const i=n[t];if(null===i)break;void 0===i?l.push(t):r=e.getTileByID(i)}return c(r?r.tileID.key:null),r&&r.hasData()?r:null}findDEMTileFor(t){return this.enabled?this._findTileCoveringTileID(t,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(t,e){let r=this._tilesDirty[t];r||(r=this._tilesDirty[t]={}),r[e.key]=!0}}function Lj(t,e){const r=e.transform.pointCoordinate(e.transform.getCameraPoint()),n=new b(r.x,r.y);t.sort(((t,e)=>{if(e.overscaledZ-t.overscaledZ)return e.overscaledZ-t.overscaledZ;const r=new b(t.canonical.x+(1<<t.canonical.z)*t.wrap,t.canonical.y),i=new b(e.canonical.x+(1<<e.canonical.z)*e.wrap,e.canonical.y),o=n.mult(1<<t.canonical.z);return o.x-=.5,o.y-=.5,o.distSqr(r)-o.distSqr(i)}))}function Rj(t){const e=new Kc,r=new pu,n=t+2;e.reserve(n*n),r.reserve((n-1)*(n-1)*2);const i=Li/(t-1),o=Li+i/2,s=o+i,a=24575;for(let t=-i;t<s;t+=i)for(let r=-i;r<s;r+=i){const n=r<0||r>o||t<0||t>o?a:0,i=D(Math.round(r),0,Li),s=D(Math.round(t),0,Li);e.emplaceBack(i+n,s)}const l=(n-3)*(n-3)*2,c=(t,e)=>{const i=e*n+t;r.emplaceBack(i+1,i,i+n),r.emplaceBack(i+n,i+n+1,i+1)};for(let t=1;t<n-2;t++)for(let e=1;e<n-2;e++)c(e,t);return[0,n-2].forEach((t=>{for(let e=0;e<n-1;e++)c(e,t),c(t,e)})),[e,r,l]}const Dj=t=>({u_dem:new rh(t),u_dem_prev:new rh(t),u_dem_tl:new ih(t),u_dem_scale:new nh(t),u_dem_tl_prev:new ih(t),u_dem_scale_prev:new nh(t),u_dem_size:new nh(t),u_dem_lerp:new nh(t),u_exaggeration:new nh(t),u_depth:new rh(t),u_depth_size_inv:new ih(t),u_meter_to_dem:new nh(t),u_label_plane_matrix_inv:new ch(t)});function zj(){return{u_dem:2,u_dem_prev:4,u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0}}const Bj=t=>({u_tile_tl_up:new oh(t),u_tile_tr_up:new oh(t),u_tile_br_up:new oh(t),u_tile_bl_up:new oh(t),u_tile_up_scale:new nh(t)}),jj=t=>({u_fog_matrix:new ch(t),u_fog_range:new ih(t),u_fog_color:new sh(t),u_fog_horizon_blend:new nh(t),u_fog_vertical_limit:new ih(t),u_fog_temporal_offset:new nh(t),u_frustum_tl:new oh(t),u_frustum_tr:new oh(t),u_frustum_br:new oh(t),u_frustum_bl:new oh(t),u_globe_pos:new oh(t),u_globe_radius:new nh(t),u_globe_transition:new nh(t),u_is_globe:new rh(t),u_viewport:new ih(t)}),Fj=(t,e,r,n,i,o,s,a,l,c,u,h)=>{const f=t.transform,d=e.properties.get("color").toArray01();d[3]=n;const p=t.frameCounter/1e3%1,[m,g]=e.properties.get("vertical-range");return{u_fog_matrix:r?f.calculateFogTileMatrix(r):h||t.identityMat,u_fog_range:e.getFovAdjustedRange(f._fov),u_fog_color:d,u_fog_horizon_blend:e.properties.get("horizon-blend"),u_fog_vertical_limit:[Math.min(m,g),g],u_fog_temporal_offset:p,u_frustum_tl:i,u_frustum_tr:o,u_frustum_br:s,u_frustum_bl:a,u_globe_pos:l,u_globe_radius:c,u_viewport:u,u_globe_transition:Vb(f.zoom),u_is_globe:+("globe"===f.projection.name)}},Nj=t=>({u_lighting_ambient_color:new oh(t),u_lighting_directional_dir:new oh(t),u_lighting_directional_color:new oh(t),u_ground_radiance:new oh(t)});function $j(t,e,r){const n=Sv.dot(e,t),i=.3,o=Sv.dot(r,[.2126,.7152,.0722]),s=(t,e,r)=>(1-r)*t+r*e,a=s(1-i*Math.min(o,1),1,Math.min(n+1,1));return s(.92,1,Math.asin(D(e[2],-1,1))/Math.PI+.5)*a}function Uj(t,e,r){const n=$j(t,[0,0,1],e),i=[0,0,0];Sv.scale(i,r.slice(0,3),n);const o=[0,0,0];Sv.scale(o,e.slice(0,3),t[2]);const s=[0,0,0];return Sv.add(s,i,o),Et(s)}const Vj=(t,e)=>{const r=t.properties.get("direction"),n=t.properties.get("color").toArray01(),i=t.properties.get("intensity"),o=e.properties.get("color").toArray01(),s=e.properties.get("intensity"),a=[r.x,r.y,r.z],l=wt(o,s),c=wt(n,i);return{u_lighting_ambient_color:l,u_lighting_directional_dir:a,u_lighting_directional_color:c,u_ground_radiance:Uj(a,c,l)}},Gj=t=>({u_light_matrix_0:new ch(t),u_light_matrix_1:new ch(t),u_fade_range:new ih(t),u_shadow_normal_offset:new oh(t),u_shadow_intensity:new nh(t),u_shadow_texel_size:new nh(t),u_shadow_map_resolution:new nh(t),u_shadow_direction:new oh(t),u_shadow_bias:new oh(t),u_shadowmap_0:new rh(t),u_shadowmap_1:new rh(t)});function qj(){return{u_light_matrix_0:new Float32Array(16),u_light_matrix_1:new Float32Array(16),u_shadow_intensity:0,u_fade_range:[0,0],u_shadow_normal_offset:[1,1,1],u_shadow_texel_size:1,u_shadow_map_resolution:1,u_shadow_direction:[0,0,1],u_shadow_bias:[36e-5,.0012,.012],u_shadowmap_0:0,u_shadowmap_1:0}}const Hj=["fill","fillOutline","fillPattern","line","linePattern","background","backgroundPattern","hillshade","raster"],Wj=["stars","fillExtrusion","fillExtrusionGroundEffect","model","symbolSDF","symbolIcon","symbolTextAndIcon"];class Zj{static cacheKey(t,e,r,n){let i=`${e}${n?n.cacheKey:""}`;for(const e of r)t.usedDefines.includes(e)&&(i+=`/${e}`);return i}constructor(t,e,r,n,i,o){const s=t.gl;this.program=s.createProgram(),this.configuration=n,this.name=e,this.fixedDefines=[...o];const a=n?n.getBinderAttributes():[],l=(r.staticAttributes||[]).concat(a);let c=n?n.defines():[];c=c.concat(o.map((t=>`#define ${t}`)));const u="#version 300 es\n";let h=u+c.concat(VB,$B,NB.fragmentSource).join("\n");for(const t of r.fragmentIncludes)h+=`\n${jB[t]}`;h+=`\n${r.fragmentSource}`;let f=u+c.concat(UB,$B,NB.vertexSource).join("\n");for(const t of r.vertexIncludes)f+=`\n${jB[t]}`;f+=`\n${r.vertexSource}`;const d=s.createShader(s.FRAGMENT_SHADER);if(s.isContextLost())return void(this.failedToCreate=!0);s.shaderSource(d,h),s.compileShader(d),s.attachShader(this.program,d);const p=s.createShader(s.VERTEX_SHADER);if(s.isContextLost())this.failedToCreate=!0;else{s.shaderSource(p,f),s.compileShader(p),s.attachShader(this.program,p),this.attributes={},this.numAttributes=l.length;for(let t=0;t<this.numAttributes;t++)if(l[t]){const e=l[t].startsWith("a_")?l[t]:`a_${l[t]}`;s.bindAttribLocation(this.program,t,e),this.attributes[e]=t}s.linkProgram(this.program),s.deleteShader(p),s.deleteShader(d),this.fixedUniforms=i(t),this.binderUniforms=n?n.getUniforms(t):[],o.includes("TERRAIN")&&(this.terrainUniforms=Dj(t)),o.includes("GLOBE")&&(this.globeUniforms=Bj(t)),o.includes("FOG")&&(this.fogUniforms=jj(t)),o.includes("RENDER_CUTOFF")&&(this.cutoffUniforms=cj(t)),o.includes("LIGHTING_3D_MODE")&&(this.lightsUniforms=Nj(t)),o.includes("RENDER_SHADOWS")&&(this.shadowUniforms=Gj(t))}}setTerrainUniformValues(t,e){if(!this.terrainUniforms)return;const r=this.terrainUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)r[t]&&r[t].set(this.program,t,e[t])}}setGlobeUniformValues(t,e){if(!this.globeUniforms)return;const r=this.globeUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)r[t]&&r[t].set(this.program,t,e[t])}}setFogUniformValues(t,e){if(!this.fogUniforms)return;const r=this.fogUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)r[t].set(this.program,t,e[t])}}setCutoffUniformValues(t,e){if(!this.cutoffUniforms)return;const r=this.cutoffUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)r[t].set(this.program,t,e[t])}}setLightsUniformValues(t,e){if(!this.lightsUniforms)return;const r=this.lightsUniforms;if(!this.failedToCreate){t.program.set(this.program);for(const t in e)r[t].set(this.program,t,e[t])}}setShadowUniformValues(t,e){if(this.failedToCreate||!this.shadowUniforms)return;const r=this.shadowUniforms;t.program.set(this.program);for(const t in e)r[t].set(this.program,t,e[t])}_drawDebugWireframe(t,e,r,n,i,o,s,a,l,c){const u=t.options.wireframe;if(!1===u.terrain&&!1===u.layers2D&&!1===u.layers3D)return;const h=t.context;if(!(()=>
2{if(u.terrain&&("terrainRaster"===this.name||"globeRaster"===this.name))return!0;const e=t._terrain&&t._terrain.renderingToTexture;return!(!u.layers2D||e||!Hj.includes(this.name))||!(!u.layers3D||!Wj.includes(this.name))})())return;const f=h.gl,d=t.wireframeDebugCache.getLinesFromTrianglesBuffer(t.frameCounter,i,h);if(!d)return;const p=[...this.fixedDefines];p.push("DEBUG_WIREFRAME");const m=t.getOrCreateProgram(this.name,{config:this.configuration,defines:p});h.program.set(m.program);const g=(t,e,r)=>{if(e[t]&&r[t])for(const n in e[t])r[t][n]&&r[t][n].set(r.program,n,e[t][n].current)};l&&l.setUniforms(m.program,h,m.binderUniforms,s,{zoom:a}),g("fixedUniforms",this,m),g("terrainUniforms",this,m),g("globeUniforms",this,m),g("fogUniforms",this,m),g("lightsUniforms",this,m),g("shadowUniforms",this,m),d.bind(),h.setColorMode(new uM([f.ONE,f.ONE_MINUS_SRC_ALPHA,f.ZERO,f.ONE],wn.transparent,[!0,!0,!0,!1])),h.setDepthMode(new rM(e.func===f.LESS?f.LEQUAL:e.func,rM.ReadOnly,e.range)),h.setStencilMode(oM.disabled);const y=3*o.primitiveLength*2,_=3*o.primitiveOffset*2*2;c&&c>1?f.drawElementsInstanced(f.LINES,y,f.UNSIGNED_SHORT,_,c):f.drawElements(f.LINES,y,f.UNSIGNED_SHORT,_),i.bind(),h.program.set(this.program),h.setDepthMode(e),h.setStencilMode(r),h.setColorMode(n)}draw(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m){const g=t.context,y=g.gl;if(this.failedToCreate)return;g.program.set(this.program),g.setDepthMode(r),g.setStencilMode(n),g.setColorMode(i),g.setCullFace(o);for(const t of Object.keys(this.fixedUniforms))this.fixedUniforms[t].set(this.program,t,s[t]);d&&d.setUniforms(this.program,g,this.binderUniforms,h,{zoom:f});const _={[y.LINES]:2,[y.TRIANGLES]:3,[y.LINE_STRIP]:1}[e],v=m&&m>0?1:void 0;for(const o of u.get()){const s=o.vaos||(o.vaos={});(s[a]||(s[a]=new WB)).bind(g,this,l,d?d.getPaintVertexBuffers():[],c,o.vertexOffset,p||[],v),m&&m>1?y.drawElementsInstanced(e,o.primitiveLength*_,y.UNSIGNED_SHORT,o.primitiveOffset*_*2,m):y.drawElements(e,o.primitiveLength*_,y.UNSIGNED_SHORT,o.primitiveOffset*_*2),e===y.TRIANGLES&&this._drawDebugWireframe(t,r,n,i,c,o,h,f,d,m)}}}function Xj(t,e){const r=Math.pow(2,e.tileID.overscaledZ),n=e.tileSize*Math.pow(2,t.transform.tileZoom)/r,i=n*(e.tileID.canonical.x+e.tileID.wrap*r),o=n*e.tileID.canonical.y;return{u_image:0,u_texsize:e.imageAtlasTexture?e.imageAtlasTexture.size:[0,0],u_tile_units_to_pixels:1/VM(e,1,t.transform.tileZoom),u_pixel_coord_upper:[i>>16,o>>16],u_pixel_coord_lower:[65535&i,65535&o]}}function Yj(t,e,r,n){const i=r.imageManager.getPattern(t.toString(),e),{width:o,height:s}=r.imageManager.getPixelSize(e),a=Math.pow(2,n.tileID.overscaledZ),l=n.tileSize*Math.pow(2,r.transform.tileZoom)/a,c=l*(n.tileID.canonical.x+n.tileID.wrap*a),u=l*n.tileID.canonical.y;return{u_image:0,u_pattern_tl:i.tl,u_pattern_br:i.br,u_texsize:[o,s],u_pattern_size:i.displaySize,u_tile_units_to_pixels:1/VM(n,1,r.transform.tileZoom),u_pixel_coord_upper:[c>>16,u>>16],u_pixel_coord_lower:[65535&c,65535&u]}}const Kj=t=>({u_matrix:new ch(t),u_lightpos:new oh(t),u_lightintensity:new nh(t),u_lightcolor:new oh(t),u_vertical_gradient:new nh(t),u_opacity:new nh(t),u_edge_radius:new nh(t),u_ao:new ih(t),u_tile_id:new oh(t),u_zoom_transition:new nh(t),u_inv_rot_matrix:new ch(t),u_merc_center:new ih(t),u_up_dir:new oh(t),u_height_lift:new nh(t),u_flood_light_color:new oh(t),u_vertical_scale:new nh(t),u_flood_light_intensity:new nh(t),u_ground_shadow_factor:new oh(t),u_emissive_strength:new nh(t)}),Jj=t=>({u_matrix:new ch(t),u_edge_radius:new nh(t),u_vertical_scale:new nh(t)}),Qj=t=>({u_matrix:new ch(t),u_lightpos:new oh(t),u_lightintensity:new nh(t),u_lightcolor:new oh(t),u_vertical_gradient:new nh(t),u_height_factor:new nh(t),u_edge_radius:new nh(t),u_ao:new ih(t),u_tile_id:new oh(t),u_zoom_transition:new nh(t),u_inv_rot_matrix:new ch(t),u_merc_center:new ih(t),u_up_dir:new oh(t),u_height_lift:new nh(t),u_image:new rh(t),u_texsize:new ih(t),u_pixel_coord_upper:new ih(t),u_pixel_coord_lower:new ih(t),u_tile_units_to_pixels:new nh(t),u_opacity:new nh(t)}),tF=t=>({u_matrix:new ch(t),u_opacity:new nh(t),u_ao_pass:new nh(t),u_meter_to_tile:new nh(t),u_ao:new ih(t),u_flood_light_intensity:new nh(t),u_flood_light_color:new oh(t),u_attenuation:new nh(t),u_edge_radius:new nh(t),u_fb:new rh(t),u_fb_size:new nh(t)}),eF=_v.create(),rF=(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m)=>{const g=e.style.light,y=g.properties.get("position"),_=[y.x,y.y,y.z],v=gv.create();"viewport"===g.properties.get("anchor")&&(gv.fromRotation(v,-e.transform.angle),Sv.transformMat3(_,_,v));const b=g.properties.get("color"),x=e.transform,w={u_matrix:t,u_lightpos:_,u_lightintensity:g.properties.get("intensity"),u_lightcolor:[b.r,b.g,b.b],u_vertical_gradient:+r,u_opacity:n,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:eF,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:i,u_edge_radius:o,u_flood_light_color:h,u_vertical_scale:f,u_flood_light_intensity:d,u_ground_shadow_factor:p,u_emissive_strength:m};return"globe"===x.projection.name&&(w.u_tile_id=[s.canonical.x,s.canonical.y,1<<s.canonical.z],w.u_zoom_transition=l,w.u_inv_rot_matrix=u,w.u_merc_center=c,w.u_up_dir=x.projection.upVector(new zv(0,0,0),c[0]*Li,c[1]*Li),w.u_height_lift=a),w},nF=(t,e,r)=>({u_matrix:t,u_edge_radius:e,u_vertical_scale:r}),iF=(t,e,r,n,i,o,s,a,l,c,u,h,f,d)=>{const p=rF(t,e,r,n,i,o,s,l,c,u,h,f,d,1,[0,0,0],0),m={u_height_factor:-Math.pow(2,s.overscaledZ
2)/a.tileSize/8};return U(p,Xj(e,a),m)},oF=(t,e,r,n,i,o,s,a,l,c,u)=>({u_matrix:e,u_opacity:r,u_ao_pass:n?1:0,u_meter_to_tile:i,u_ao:o,u_flood_light_intensity:s,u_flood_light_color:a,u_attenuation:l,u_edge_radius:c,u_fb:0,u_fb_size:u}),sF=t=>({u_matrix:new ch(t),u_emissive_strength:new nh(t)}),aF=t=>({u_matrix:new ch(t),u_emissive_strength:new nh(t),u_image:new rh(t),u_texsize:new ih(t),u_pixel_coord_upper:new ih(t),u_pixel_coord_lower:new ih(t),u_tile_units_to_pixels:new nh(t)}),lF=t=>({u_matrix:new ch(t),u_emissive_strength:new nh(t),u_world:new ih(t)}),cF=t=>({u_matrix:new ch(t),u_emissive_strength:new nh(t),u_world:new ih(t),u_image:new rh(t),u_texsize:new ih(t),u_pixel_coord_upper:new ih(t),u_pixel_coord_lower:new ih(t),u_tile_units_to_pixels:new nh(t)}),uF=(t,e)=>({u_matrix:t,u_emissive_strength:e}),hF=(t,e,r,n)=>U(uF(t,e),Xj(r,n)),fF=(t,e,r)=>({u_matrix:t,u_world:r,u_emissive_strength:e}),dF=(t,e,r,n,i)=>U(hF(t,e,r,n),{u_world:i}),pF=t=>({u_matrix:new ch(t),u_camera_to_center_distance:new nh(t),u_extrude_scale:new ih(t)}),mF=t=>({u_matrix:new ch(t),u_inv_matrix:new ch(t),u_camera_to_center_distance:new nh(t),u_viewport_size:new ih(t)}),gF=(t,e,r,n)=>{const i=Li/r.tileSize;return{u_matrix:t,u_camera_to_center_distance:e.getCameraToCenterDistance(n),u_extrude_scale:[e.pixelsToGLUnits[0]/i,e.pixelsToGLUnits[1]/i]}},yF=(t,e,r,n)=>({u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.getCameraToCenterDistance(n),u_viewport_size:[r.width,r.height]}),_F=t=>({u_color:new ah(t),u_matrix:new ch(t),u_overlay:new rh(t),u_overlay_scale:new nh(t)}),vF=(t,e,r=1)=>({u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}),bF=t=>({u_extrude_scale:new nh(t),u_intensity:new nh(t),u_matrix:new ch(t),u_inv_rot_matrix:new ch(t),u_merc_center:new ih(t),u_tile_id:new oh(t),u_zoom_transition:new nh(t),u_up_dir:new oh(t)}),xF=t=>({u_image:new rh(t),u_color_ramp:new rh(t),u_opacity:new nh(t)}),wF=_v.create(),EF=(t,e,r,n,i,o,s)=>{const a=t.transform,l="globe"===a.projection.name,c=l?jb(a.zoom,e.canonical)*a._pixelsPerMercatorPixel:VM(r,1,o),u={u_matrix:e.projMatrix,u_extrude_scale:c,u_intensity:s,u_inv_rot_matrix:wF,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(l){u.u_inv_rot_matrix=n,u.u_merc_center=i,u.u_tile_id=[e.canonical.x,e.canonical.y,1<<e.canonical.z],u.u_zoom_transition=Vb(a.zoom);const t=i[0]*Li,r=i[1]*Li;u.u_up_dir=a.projection.upVector(new zv(0,0,0),t,r)}return u},SF=(t,e,r,n)=>({u_image:r,u_color_ramp:n,u_opacity:e.paint.get("heatmap-opacity")}),TF=t=>({u_matrix:new ch(t),u_normalize_matrix:new ch(t),u_globe_matrix:new ch(t),u_merc_matrix:new ch(t),u_grid_matrix:new hh(t),u_tl_parent:new ih(t),u_scale_parent:new nh(t),u_fade_t:new nh(t),u_opacity:new nh(t),u_image0:new rh(t),u_image1:new rh(t),u_brightness_low:new nh(t),u_brightness_high:new nh(t),u_saturation_factor:new nh(t),u_contrast_factor:new nh(t),u_spin_weights:new oh(t),u_perspective_transform:new ih(t),u_raster_elevation:new nh(t),u_tl_br:new sh(t),u_zoom_transition:new nh(t),u_merc_center:new ih(t),u_cutoff_params:new sh(t),u_colorization_mix:new sh(t),u_colorization_offset:new nh(t),u_color_ramp:new rh(t),u_texture_offset:new ih(t),u_texture_res:new ih(t),u_emissive_strength:new nh(t)}),AF=(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_,v,b,x)=>({u_matrix:t,u_normalize_matrix:e,u_globe_matrix:r,u_merc_matrix:n,u_grid_matrix:i,u_tl_parent:o,u_scale_parent:u,u_fade_t:h.mix,u_opacity:h.opacity*f.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:f.paint.get("raster-brightness-min"),u_brightness_high:f.paint.get("raster-brightness-max"),u_saturation_factor:kF(f.paint.get("raster-saturation")),u_contrast_factor:MF(f.paint.get("raster-contrast")),u_spin_weights:CF(f.paint.get("raster-hue-rotate")),u_perspective_transform:d,u_raster_elevation:p,u_tl_br:s,u_zoom_transition:a,u_merc_center:l,u_cutoff_params:c,u_colorization_mix:IF(g,_),u_colorization_offset:PF(y,_),u_color_ramp:m,u_texture_offset:[b/(v+2*b),v/(v+2*b)],u_texture_res:[v+2*b,v+2*b],u_emissive_strength:x}),OF=(t,e,r,n,i,o,s,a,l,c,u,h)=>AF(t,e,r,new Float32Array(16),new Float32Array(9),[0,0],[0,0,0,0],0,[0,0],[0,0,0,0],1,n,i,o||[0,0],s,a,l,c,u,1,0,h);function CF(t){t*=Math.PI/180;const e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}function MF(t){return t>0?1/(1-t):1+t}function kF(t){return t>0?1-1/(1.001-t):-t}function IF([t,e,r,n],[i,o]){if(i===o)return[0,0,0,0];const s=(PP+3)/(PP+1)/(o-i);return[t*s,e*s,r*s,n*s]}function PF(t,[e,r]){return e===r?0:((t-e)/(r-e)*(PP+3)-1)/(PP+1)}const LF=t=>({u_is_size_zoom_constant:new rh(t),u_is_size_feature_constant:new rh(t),u_size_t:new nh(t),u_size:new nh(t),u_c
2amera_to_center_distance:new nh(t),u_rotate_symbol:new rh(t),u_aspect_ratio:new nh(t),u_fade_change:new nh(t),u_matrix:new ch(t),u_label_plane_matrix:new ch(t),u_coord_matrix:new ch(t),u_is_text:new rh(t),u_pitch_with_map:new rh(t),u_texsize:new ih(t),u_tile_id:new oh(t),u_zoom_transition:new nh(t),u_inv_rot_matrix:new ch(t),u_merc_center:new ih(t),u_camera_forward:new oh(t),u_tile_matrix:new ch(t),u_up_vector:new oh(t),u_ecef_origin:new oh(t),u_texture:new rh(t),u_icon_transition:new nh(t),u_icon_saturation:new nh(t)}),RF=t=>({u_is_size_zoom_constant:new rh(t),u_is_size_feature_constant:new rh(t),u_size_t:new nh(t),u_size:new nh(t),u_camera_to_center_distance:new nh(t),u_rotate_symbol:new rh(t),u_aspect_ratio:new nh(t),u_fade_change:new nh(t),u_matrix:new ch(t),u_label_plane_matrix:new ch(t),u_coord_matrix:new ch(t),u_is_text:new rh(t),u_pitch_with_map:new rh(t),u_texsize:new ih(t),u_texture:new rh(t),u_gamma_scale:new nh(t),u_device_pixel_ratio:new nh(t),u_tile_id:new oh(t),u_zoom_transition:new nh(t),u_inv_rot_matrix:new ch(t),u_merc_center:new ih(t),u_camera_forward:new oh(t),u_tile_matrix:new ch(t),u_up_vector:new oh(t),u_ecef_origin:new oh(t),u_is_halo:new rh(t)}),DF=t=>({u_is_size_zoom_constant:new rh(t),u_is_size_feature_constant:new rh(t),u_size_t:new nh(t),u_size:new nh(t),u_camera_to_center_distance:new nh(t),u_rotate_symbol:new rh(t),u_aspect_ratio:new nh(t),u_fade_change:new nh(t),u_matrix:new ch(t),u_label_plane_matrix:new ch(t),u_coord_matrix:new ch(t),u_is_text:new rh(t),u_pitch_with_map:new rh(t),u_texsize:new ih(t),u_texsize_icon:new ih(t),u_texture:new rh(t),u_texture_icon:new rh(t),u_gamma_scale:new nh(t),u_device_pixel_ratio:new nh(t),u_is_halo:new rh(t)}),zF=_v.create(),BF=(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y)=>{const _=i.transform,v={u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:_.getCameraToCenterDistance(m),u_rotate_symbol:+r,u_aspect_ratio:_.width/_.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:s,u_coord_matrix:a,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:zF,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:zF,u_up_vector:[0,-1,0],u_icon_transition:y||0,u_icon_saturation:g};return"globe"===m.name&&(v.u_tile_id=[u.canonical.x,u.canonical.y,1<<u.canonical.z],v.u_zoom_transition=h,v.u_inv_rot_matrix=d,v.u_merc_center=f,v.u_camera_forward=_._camera.forward(),v.u_ecef_origin=Pb(_.globeMatrix,u.toUnwrapped()),v.u_tile_matrix=Float32Array.from(_.globeMatrix),v.u_up_vector=p),v},jF=(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g)=>U(BF(t,e,r,n,i,o,s,a,l,c,h,f,d,p,m,g,1),{u_gamma_scale:n?i.transform.getCameraToCenterDistance(g)*Math.cos(i.terrain?0:i.transform._pitch):1,u_device_pixel_ratio:vr.devicePixelRatio,u_is_halo:+u,undefined:void 0}),FF=(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m)=>U(jF(t,e,r,n,i,o,s,a,!0,l,!0,u,h,f,d,p,m),{u_texsize_icon:c,u_texture_icon:1}),NF=t=>({u_matrix:new ch(t),u_emissive_strength:new nh(t),u_opacity:new nh(t),u_color:new ah(t)}),$F=t=>({u_matrix:new ch(t),u_emissive_strength:new nh(t),u_opacity:new nh(t),u_image:new rh(t),u_pattern_tl:new ih(t),u_pattern_br:new ih(t),u_texsize:new ih(t),u_pattern_size:new ih(t),u_pixel_coord_upper:new ih(t),u_pixel_coord_lower:new ih(t),u_tile_units_to_pixels:new nh(t)}),UF=(t,e,r,n)=>({u_matrix:t,u_emissive_strength:e,u_opacity:r,u_color:n}),VF=(t,e,r,n,i,o,s)=>U(Yj(i,o,n,s),{u_matrix:t,u_emissive_strength:e,u_opacity:r}),GF=t=>({u_matrix:new ch(t),u_sun_direction:new oh(t),u_cubemap:new rh(t),u_opacity:new nh(t),u_temporal_offset:new nh(t)}),qF=(t,e,r,n,i)=>({u_matrix:t,u_sun_direction:e,u_cubemap:r,u_opacity:n,u_temporal_offset:i}),HF=t=>({u_matrix:new ch(t),u_color_ramp:new rh(t),u_center_direction:new oh(t),u_radius:new nh(t),u_opacity:new nh(t),u_temporal_offset:new nh(t)}),WF=(t,e,r,n,i)=>({u_matrix:t,u_color_ramp:0,u_center_direction:e,u_radius:S(r),u_opacity:n,u_temporal_offset:i}),ZF=t=>({u_matrix_3f:new hh(t),u_sun_direction:new oh(t),u_sun_intensity:new nh(t),u_color_tint_r:new sh(t),u_color_tint_m:new sh(t),u_luminance:new nh(t)}),XF=(t,e,r,n,i)=>({u_matrix_3f:t,u_sun_direction:e,u_sun_intensity:r,u_color_tint_r:[n.r,n.g,n.b,n.a],u_color_tint_m:[i.r,i.g,i.b,i.a],u_luminance:5e-5}),YF={BaseColor:5,MetallicRoughness:6,Normal:7,Occlusion:8,Emission:9,
2ShadowMap0:10},KF=t=>({u_matrix:new ch(t),u_lighting_matrix:new ch(t),u_normal_matrix:new ch(t),u_lightpos:new oh(t),u_lightintensity:new nh(t),u_lightcolor:new oh(t),u_camera_pos:new oh(t),u_opacity:new nh(t),u_baseColorFactor:new sh(t),u_emissiveFactor:new sh(t),u_metallicFactor:new nh(t),u_roughnessFactor:new nh(t),u_baseTextureIsAlpha:new rh(t),u_alphaMask:new rh(t),u_alphaCutoff:new nh(t),u_baseColorTexture:new rh(t),u_metallicRoughnessTexture:new rh(t),u_normalTexture:new rh(t),u_occlusionTexture:new rh(t),u_emissionTexture:new rh(t),u_color_mix:new sh(t),u_aoIntensity:new nh(t),u_emissive_strength:new nh(t)}),JF=(t,e,r,n,i,o,s,a,l,c,u,h,f=[0,0,0])=>{const d=n.style.light,p=d.properties.get("position"),m=[-p.x,-p.y,p.z],g=gv.create();"viewport"===d.properties.get("anchor")&&(gv.fromRotation(g,-n.transform.angle),Sv.transformMat3(m,m,g));const y="MASK"===c.alphaMode,_=d.properties.get("color"),v=h.paint.get("model-ambient-occlusion-intensity"),b=h.paint.get("model-color").constantOr(wn.white),x=h.paint.get("model-color-mix-intensity").constantOr(0);return{u_matrix:t,u_lighting_matrix:e,u_normal_matrix:r,u_lightpos:m,u_lightintensity:d.properties.get("intensity"),u_lightcolor:[_.r,_.g,_.b],u_camera_pos:f,u_opacity:i,u_baseTextureIsAlpha:0,u_alphaMask:+y,u_alphaCutoff:c.alphaCutoff,u_baseColorFactor:[o.r,o.g,o.b,o.a],u_emissiveFactor:[s[0],s[1],s[2],1],u_metallicFactor:a,u_roughnessFactor:l,u_baseColorTexture:YF.BaseColor,u_metallicRoughnessTexture:YF.MetallicRoughness,u_normalTexture:YF.Normal,u_occlusionTexture:YF.Occlusion,u_emissionTexture:YF.Emission,u_color_mix:[b.r,b.g,b.b,x],u_aoIntensity:v,u_emissive_strength:u}},QF=t=>({u_matrix:new ch(t),u_instance:new ch(t),u_node_matrix:new ch(t)}),tN=new Float32Array(16),eN=(t,e=tN,r=tN)=>({u_matrix:t,u_instance:e,u_node_matrix:r}),rN=(t,e)=>({u_matrix:t,u_ground_shadow_factor:e}),nN=(t,e,r,n)=>({u_matrix:Float32Array.from(t),u_up:e,u_right:r,u_intensity_multiplier:n}),iN={fillExtrusion:Kj,fillExtrusionDepth:Jj,fillExtrusionPattern:Qj,fillExtrusionGroundEffect:tF,fill:sF,fillPattern:aF,fillOutline:lF,fillOutlinePattern:cF,circle:iw,collisionBox:pF,collisionCircle:mF,debug:_F,clippingMask:Ej,heatmap:bF,heatmapTexture:xF,hillshade:ZB,hillshadePrepare:XB,line:uP,linePattern:hP,raster:TF,symbolIcon:LF,symbolSDF:RF,symbolTextAndIcon:DF,background:NF,backgroundPattern:$F,terrainRaster:nj,terrainDepth:nj,skybox:GF,skyboxGradient:HF,skyboxCapture:ZF,globeRaster:oj,globeAtmosphere:sj,model:KF,modelDepth:QF,groundShadow:t=>({u_matrix:new ch(t),u_ground_shadow_factor:new oh(t)}),stars:t=>({u_matrix:new ch(t),u_up:new oh(t),u_right:new oh(t),u_intensity_multiplier:new nh(t)})};let oN;function sN(t,e,r,n,i,o,s){const a=t.context,l=a.gl,c=t.transform,u=t.getOrCreateProgram("collisionBox"),h=[];let f=0,d=0;for(let a=0;a<n.length;a++){const p=n[a],m=e.getTile(p),g=m.getBucket(r);if(!g)continue;const y=AD(p,g,c);let _=y;0===i[0]&&0===i[1]||(_=t.translatePosMatrix(y,m,i,o));const v=s?g.textCollisionBox:g.iconCollisionBox,b=g.collisionCircleArray;if(b.length>0){const t=_v.create(),e=_;_v.mul(t,g.placementInvProjMatrix,c.glCoordMatrix),_v.mul(t,t,g.placementViewportMatrix),h.push({circleArray:b,circleOffset:d,transform:e,invTransform:t,projection:g.getProjection()}),f+=b.length/4,d=f}v&&(t.terrain&&t.terrain.setupElevationDraw(m,u),u.draw(t,l.LINES,rM.disabled,oM.disabled,t.colorModeForRenderPass(),mM.disabled,gF(_,c,m,g.getProjection()),r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,c.zoom,null,[v.collisionVertexBuffer,v.collisionVertexBufferExt]))}if(!s||!h.length)return;const p=t.getOrCreateProgram("collisionCircle"),m=new fu;m.resize(4*f),m._trim();let g=0;for(const t of h)for(let e=0;e<t.circleArray.length/4;e++){const r=4*e,n=t.circleArray[r+0],i=t.circleArray[r+1],o=t.circleArray[r+2],s=t.circleArray[r+3];m.emplace(g++,n,i,o,s,0),m.emplace(g++,n,i,o,s,1),m.emplace(g++,n,i,o,s,2),m.emplace(g++,n,i,o,s,3)}(!oN||oN.length<2*f)&&(oN=aN(f));const y=a.createIndexBuffer(oN,!0),_=a.createVertexBuffer(m,oT.members,!0);for(const e of h){const n=yF(e.transform,e.invTransform,c,e.projection);p.draw(t,l.TRIANGLES,rM.disabled,oM.disabled,t.colorModeForRenderPass(),mM.disabled,n,r.id,_,y,Nu.simpleSegment(0,2*e.circleOffset,e.circleArray.length,e.circleArray.length/2),null,c.zoom)}_.destroy(),y.destroy()}function aN(t){const e=2*t,r=new pu;r.resize(e),r._trim();for(let t=0;t<e;t++){const e=6*t;r.uint16[e+0]=4*t+0,r.uint16[e+1]=4*t+1,r.uint16[e+2]=4*t+2,r.uint16[e+3]=4*t+2,r.uint16[e+4]=4*t
2+3,r.uint16[e+5]=4*t+0}return r}const lN=_v.create();function cN(t,e,r,n,i){if("translucent"!==t.renderPass)return;const o=oM.disabled,s=t.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&fN(n,t,r,e,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),i),0!==r.paint.get("icon-opacity").constantOr(1)&&mN(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),r.paint.get("icon-color-saturation"),o,s),0!==r.paint.get("text-opacity").constantOr(1)&&mN(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),r.paint.get("icon-color-saturation"),o,s),e.map.showCollisionBoxes&&(sN(t,e,r,n,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),sN(t,e,r,n,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))}function uN(t){const e=t._camera.getWorldToCamera(t.worldSize,1),r=_v.multiply([],e,t.globeMatrix);_v.invert(r,r);const n=[0,0,0],i=[0,1,0,0];return uv.transformMat4(i,i,r),n[0]=i[0],n[1]=i[1],n[2]=i[2],Sv.normalize(n,n),n}function hN({width:t,height:e,anchor:r,textOffset:n,textScale:i},o){const{horizontalAlign:s,verticalAlign:a}=VT(r),l=-(s-.5)*t,c=-(a-.5)*e,u=LA(r,n);return new b((l/i+u[0])*o,(c/i+u[1])*o)}function fN(t,e,r,n,i,o,s){const a=e.transform,l="map"===i,c="map"===o;for(const e of t){const t=n.getTile(e),i=t.getBucket(r);if(!i||!i.text||!i.text.segments.get().length)continue;const o=uT(i.textSizeData,a.zoom),u=OD(e,i.getProjection(),a),h=a.calculatePixelsToTileUnitsMatrix(t),f=WM(u,t.tileID.canonical,c,l,a,i.getProjection(),h),d=i.hasIconTextFit()&&i.hasIconData();if(o){const r=Math.pow(2,a.zoom-t.tileID.overscaledZ);dN(i,l,c,s,hT,a,f,e,r,o,d)}}}function dN(t,e,r,n,i,o,s,a,l,c,u){const h=t.text.placedSymbolArray,f=t.text.dynamicLayoutVertexArray,d=t.icon.dynamicLayoutVertexArray,p={},m=t.getProjection(),g=OD(a,m,o),y=o.elevation,_=m.upVectorScale(a.canonical,o.center.lat,o.worldSize).metersToTile;f.clear();for(let d=0;d<h.length;d++){const v=h.get(d),{tileAnchorX:b,tileAnchorY:x,numGlyphs:w}=v,E=t.allowVerticalPlacement&&!v.placedOrientation,S=v.hidden||!v.crossTileID||E?null:n[v.crossTileID];if(S){let n=0,h=0,d=0;if(y){const t=y?y.getAtTileOffset(a,b,x):0,[e,r,i]=m.upVector(a.canonical,b,x);n=t*e*_,h=t*r*_,d=t*i*_}let[E,T,A,O]=YM(v.projectedAnchorX+n,v.projectedAnchorY+h,v.projectedAnchorZ+d,r?g:s);const C=JM(o.getCameraToCenterDistance(m),O);let M=i.evaluateSizeForFeature(t.textSizeData,c,v)*C/sT;r&&(M*=t.tilePixelRatio/l);const k=hN(S,M);r?(({x:E,y:T,z:A}=m.projectTilePoint(b+k.x,x+k.y,a.canonical)),[E,T,A]=YM(E+n,T+h,A+d,s)):(e&&k._rotate(-o.angle),E+=k.x,T+=k.y,A=0);const I=t.allowVerticalPlacement&&v.placedOrientation===TT.vertical?Math.PI/2:0;for(let t=0;t<w;t++)kO(f,E,T,A,I);u&&v.associatedIconIndex>=0&&(p[v.associatedIconIndex]={x:E,y:T,z:A,angle:I})}else lk(w,f)}if(u){d.clear();const e=t.icon.placedSymbolArray;for(let t=0;t<e.length;t++){const r=e.get(t),{numGlyphs:n}=r,i=p[t];
2if(r.hidden||!i)lk(n,d);else{const{x:t,y:e,z:r,angle:o}=i;for(let i=0;i<n;i++)kO(d,t,e,r,o)}}t.icon.dynamicLayoutVertexBuffer.updateData(d)}t.text.dynamicLayoutVertexBuffer.updateData(f)}function pN(t,e,r){return r.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function mN(t,e,r,n,i,o,s,a,l,c,u,h,f){const d=t.context,p=d.gl,m=t.transform,g="map"===a,y="map"===l,_=g&&"point"!==r.layout.get("symbol-placement"),v=g&&!y&&!_,b=void 0!==r.layout.get("symbol-sort-key").constantOr(1);let x=!1;const w=t.depthModeForSublayer(0,rM.ReadOnly),E=[hx(m.center.lng),fx(m.center.lat)],S=r.layout.get("text-variable-anchor"),T="globe"===m.projection.name,A=[],O=[0,-1,0];let C=O;!T&&!m.mercatorFromTransition||g||(C=uN(m));for(const a of n){const n=e.getTile(a),l=n.getBucket(r);if(!l)continue;if("mercator"===l.projection.name&&T)continue;const h=i?l.text:l.icon;if(!h||l.fullyClipped||!h.segments.get().length)continue;const f=h.programConfigurations.get(r.id),d=i||l.sdfIcons,w=i?l.textSizeData:l.iconSizeData,M=y||0!==m.pitch,k=uT(w,m.zoom);let I,P,L,R,D=[0,0],z=null;if(i){if(P=n.glyphAtlasTexture?n.glyphAtlasTexture:null,L=p.LINEAR,I=n.glyphAtlasTexture?n.glyphAtlasTexture.size:[0,0],l.iconsInText){D=n.imageAtlasTexture?n.imageAtlasTexture.size:[0,0],z=n.imageAtlasTexture?n.imageAtlasTexture:null;const e="composite"===w.kind||"camera"===w.kind;R=M||t.options.rotating||t.options.zooming||e?p.LINEAR:p.NEAREST}}else{const e=1!==r.layout.get("icon-size").constantOr(0)||l.iconsNeedLinear;P=n.imageAtlasTexture?n.imageAtlasTexture:null,L=d||t.options.rotating||t.options.zooming||e||M?p.LINEAR:p.NEAREST,I=n.imageAtlasTexture?n.imageAtlasTexture.size:[0,0]}const B="globe"===l.projection.name,j=B?C:O,F=B?Vb(m.zoom):0,N=OD(a,l.getProjection(),m),$=m.calculatePixelsToTileUnitsMatrix(n),U=WM(N,n.tileID.canonical,y,g,m,l.getProjection(),$),V=t.terrain&&y&&_?_v.invert(_v.create(),U):lN,G=XM(N,n.tileID.canonical,y,g,m,l.getProjection(),$),q=S&&l.hasTextData(),H=l.hasIconTextFit()&&q&&l.hasIconData();if(_){const e=m.elevation,r=e?e.getAtTileOffsetFunc(a,m.center.lat,m.worldSize,l.getProjection()):null,o=ZM(N,n.tileID.canonical,y,g,m,l.getProjection(),$);tk(l,N,t,i,o,G,y,c,r,a)}const W=_||i&&S||H,Z=t.translatePosMatrix(N,n,o,s),X=W?lN:U,Y=t.translatePosMatrix(G,n,o,s,!0),K=l.getProjection().createInversionMatrix(m,a.canonical),J=r.paint.get("icon-image-cross-fade").constantOr(0),Q=[];t.terrainRenderModeElevated()&&y&&Q.push("PITCH_WITH_MAP_TERRAIN"),B&&(Q.push("PROJECTION_GLOBE_VIEW"),W&&Q.push("PROJECTED_POS_ON_VIEWPORT")),J>0&&Q.push("ICON_TRANSITION"),h.zOffsetVertexBuffer&&Q.push("Z_OFFSET");const tt=d&&0!==r.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1);let et;d?et=l.iconsInText?FF(w.kind,k,v,y,t,Z,X,Y,I,D,a,F,E,K,j,l.getProjection()):jF(w.kind,k,v,y,t,Z,X,Y,i,I,!0,a,F,E,K,j,l.getProjection()):(u<1&&Q.push("SATURATION"),et=BF(w.kind,k,v,y,t,Z,X,Y,i,I,a,F,E,K,j,l.getProjection(),u,J));const rt={program:t.getOrCreateProgram(pN(d,i,l),{config:f,defines:Q}),buffers:h,uniformValues:et,atlasTexture:P,atlasTextureIcon:z,atlasInterpolation:L,atlasInterpolationIcon:R,isSDF:d,hasHalo:tt,tile:n,labelPlaneMatrixInv:V};if(b&&l.canOverlap){x=!0;const t=h.segments.get();for(const e of t)A.push({segments:new Nu([e]),sortKey:e.sortKey,state:rt})}else A.push({segments:h.segments,sortKey:0,state:rt})}x&&A.sort(((t,e)=>t.sortKey-e.sortKey));for(const e of A){const n=e.state;if(t.terrain){const e={useDepthForOcclusion:m.depthOcclusionForSymbolsAndCircles,labelPlaneMatrixInv:n.labelPlaneMatrixInv};t.terrain.setupElevationDraw(n.tile,n.program,e)}if(d.activeTexture.set(p.TEXTURE0),n.atlasTexture&&n.atlasTexture.bind(n.atlasInterpolation,p.CLAMP_TO_EDGE),n.atlasTextureIcon&&(d.activeTexture.set(p.TEXTURE1),n.atlasTextureIcon&&n.atlasTextureIcon.bind(n.atlasInterpolationIcon,p.CLAMP_TO_EDGE)),t.uploadCommonLightUniforms(t.context,n.program),n.hasHalo){const i=n.uniformValues;i.u_is_halo=1,gN(n.buffers,e.segments,r,t,n.program,w,h,f,i,2),i.u_is_halo=0}else{if(n.isSDF){const i=n.uniformValues;n.hasHalo&&(i.u_is_halo=1,gN(n.buffers,e.segments,r,t,n.program,w,h,f,i,1)),i.u_is_halo=0}gN(n.buffers,e.segments,r,t,n.program,w,h,f,n.uniformValues,1)}}}function gN(t,e,r,n,i,o,s,a,l,c){const u=n.context.gl,h=[t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer,t.iconTransitioningVertexBuffer,t.globeExtVertexBuffer,t.zOffsetVertexBuffer];i.draw(n,u.TRIANGLES,o,s,a,mM.disabled,l,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,n.transform.zoom,t.programConfigurations.get(r.id),h,c)}function yN(t,e,r,n){if("translucent"!==t.renderPass)return;const i=r.paint.get("circle-opacity"),o=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),a=void 0!==r.layout.get("
2circle-sort-key").constantOr(1),l=r.paint.get("circle-emissive-strength");if(0===i.constantOr(1)&&(0===o.constantOr(1)||0===s.constantOr(1)))return;const c=t.context,u=c.gl,h=t.transform,f=t.depthModeForSublayer(0,rM.ReadOnly),d=oM.disabled,p=t.colorModeForDrapableLayerRenderPass(l),m="globe"===h.projection.name,g=[hx(h.center.lng),fx(h.center.lat)],y=[];for(let i=0;i<n.length;i++){const o=n[i],s=e.getTile(o),l=s.getBucket(r);if(!l||l.projection.name!==h.projection.name)continue;const c=l.programConfigurations.get(r.id),u=aw(r),f=t.isTileAffectedByFog(o);m&&u.push("PROJECTION_GLOBE_VIEW");const d=t.getOrCreateProgram("circle",{config:c,defines:u,overrideFog:f}),p=l.layoutVertexBuffer,_=l.globeExtVertexBuffer,v=l.indexBuffer,b=h.projection.createInversionMatrix(h,o.canonical),x={programConfiguration:c,program:d,layoutVertexBuffer:p,globeExtVertexBuffer:_,indexBuffer:v,uniformValues:sw(t,o,s,b,g,r),tile:s};if(a){const t=l.segments.get();for(const e of t)y.push({segments:new Nu([e]),sortKey:e.sortKey,state:x})}else y.push({segments:l.segments,sortKey:0,state:x})}a&&y.sort(((t,e)=>t.sortKey-e.sortKey));const _={useDepthForOcclusion:h.depthOcclusionForSymbolsAndCircles};for(const e of y){const{programConfiguration:n,program:i,layoutVertexBuffer:o,globeExtVertexBuffer:s,indexBuffer:a,uniformValues:l,tile:m}=e.state,g=e.segments;t.terrain&&t.terrain.setupElevationDraw(m,i,_),t.uploadCommonUniforms(c,i,m.tileID.toUnwrapped()),i.draw(t,u.TRIANGLES,f,d,p,mM.disabled,l,r.id,o,a,g,r.paint,h.zoom,n,[s])}}function _N(t,e,r,n){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){const i=t.context,o=i.gl,s=oM.disabled,a=new uM([o.ONE,o.ONE,o.ONE,o.ONE],wn.transparent,[!0,!0,!0,!0]);vN(i,t,r,"globe"===t.transform.projection.name?.5:.25),i.clear({color:wn.transparent});const l=t.transform,c="globe"===l.projection.name,u=c?["PROJECTION_GLOBE_VIEW"]:[],h=c?mM.frontCCW:mM.disabled,f=[hx(l.center.lng),fx(l.center.lat)];for(let d=0;d<n.length;d++){const p=n[d];if(e.hasRenderableParent(p))continue;const m=e.getTile(p),g=m.getBucket(r);if(!g||g.projection.name!==l.projection.name)continue;const y=t.isTileAffectedByFog(p),_=g.programConfigurations.get(r.id),v=t.getOrCreateProgram("heatmap",{config:_,defines:u,overrideFog:y}),{zoom:b}=t.transform;t.terrain&&t.terrain.setupElevationDraw(m,v),t.uploadCommonUniforms(i,v,p.toUnwrapped());const x=l.projection.createInversionMatrix(l,p.canonical);v.draw(t,o.TRIANGLES,rM.disabled,s,a,h,EF(t,p,m,x,f,b,r.paint.get("heatmap-intensity")),r.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,r.paint,t.transform.zoom,_,c?[g.globeExtVertexBuffer]:null)}i.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),xN(t,r))}function vN(t,e,r,n){const i=t.gl,o=e.width*n,s=e.height*n;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,o,s]);let a=r.heatmapFbo;if(!a||a&&(a.width!==o||a.height!==s)){a&&a.destroy();const n=i.createTexture();i.bindTexture(i.TEXTURE_2D,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),a=r.heatmapFbo=t.createFramebuffer(o,s,!0,null),bN(t,e,n,a,o,s)}else i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),t.bindFramebuffer.set(a.framebuffer)}function bN(t,e,r,n,i,o){const s=t.gl,a=t.extRenderToTextureHalfFloat?s.HALF_FLOAT:s.UNSIGNED_BYTE;s.texImage2D(s.TEXTURE_2D,0,t.extRenderToTextureHalfFloat?s.RGBA16F:s.RGBA,i,o,0,s.RGBA,a,null),n.colorAttachment.set(r)}function xN(t,e){const r=t.context,n=r.gl,i=e.heatmapFbo;if(!i)return;r.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),r.activeTexture.set(n.TEXTURE1);let o=e.colorRampTexture;o||(o=e.colorRampTexture=new YO(r,e.colorRamp,n.RGBA)),o.bind(n.LINEAR,n.CLAMP_TO_EDGE),t.getOrCreateProgram("heatmapTexture").draw(t,n.TRIANGLES,rM.disabled,oM.disabled,t.colorModeForRenderPass(),mM.disabled,SF(t,e,0,1),e.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,e.paint,t.transform.zoom)}function wN(t,e,r,n){if("translucent"!==t.renderPass)return;const i=r.paint.get("line-opacity"),o=r.paint.get("line-width");if(0===i.constantOr(1)||0===o.constantOr(1))return;const s=r.paint.get("line-emissive-strength"),a=t.depthModeForSublayer(0,rM.ReadOnly),l=t.colorModeForDrapableLayerRenderPass(s),c=t.terrain&&t.terrain.renderingToTexture?1:vr.devicePixelRatio,u=r.paint.get("line-dasharray"),h=u.constantOr(1),f=r.layout.get("line-cap"),d=r.paint.get("line-pattern"),p=d.constantOr(1),m=r.paint.get("line-pattern").constantOr(1),g=1!==r.paint.get("line-opacity").constantOr(1);let y=!m&&g;const _=r.paint.get("line-gradient"),v=p?"linePattern":"line",b=t.context,x=b.gl,w=gP(r);t.terrain&&t.terrain.clipOrMaskOverlapStencilType()&&(y=!1);for(const i of n){const n=e.getTile(i);if(p&&!n.patternsLoaded())continue;const o=n.getBucket(r);
2if(!o)continue;t.prepareDrawTile();const s=o.programConfigurations.get(r.id),m=t.isTileAffectedByFog(i),g=t.getOrCreateProgram(v,{config:s,defines:w,overrideFog:m}),E=d.constantOr(null);if(E&&n.imageAtlas){const t=n.imageAtlas.patternPositions[E.toString()];t&&s.setConstantPatternPositions(t)}const S=u.constantOr(null),T=f.constantOr(null);if(!p&&S&&T&&n.lineAtlas){const t=n.lineAtlas.getDash(S,T);t&&s.setConstantPatternPositions(t)}let[A,O]=r.paint.get("line-trim-offset");if("round"===T||"square"===T){const t=1;A!==O&&(0===A&&(A-=t),1===O&&(O+=t))}const C=t.terrain?i.projMatrix:null,M=p?dP(t,n,r,C,c):fP(t,n,r,C,o.lineClipsArray.length,c,[A,O]);if(_){const n=o.gradients[r.id];let s=n.texture;if(r.gradientVersion!==n.version){let a=256;if(r.stepInterpolant){const r=e.getSource().maxzoom,n=i.canonical.z===r?Math.ceil(1<<t.transform.maxZoom-i.canonical.z):1;a=D(W(o.maxLineLength/Li*1024*n),256,b.maxTextureSize)}n.gradient=Ew({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:a,image:n.gradient||void 0,clips:o.lineClipsArray}),n.texture?n.texture.update(n.gradient):n.texture=new YO(b,n.gradient,x.RGBA),n.version=r.gradientVersion,s=n.texture}b.activeTexture.set(x.TEXTURE1),s.bind(r.stepInterpolant?x.NEAREST:x.LINEAR,x.CLAMP_TO_EDGE)}h&&(b.activeTexture.set(x.TEXTURE0),n.lineAtlasTexture&&n.lineAtlasTexture.bind(x.LINEAR,x.REPEAT),s.updatePaintBuffers()),p&&(b.activeTexture.set(x.TEXTURE0),n.imageAtlasTexture&&n.imageAtlasTexture.bind(x.LINEAR,x.CLAMP_TO_EDGE),s.updatePaintBuffers()),t.uploadCommonUniforms(b,g,i.toUnwrapped());const k=e=>{g.draw(t,x.TRIANGLES,a,e,l,mM.disabled,M,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,r.paint,t.transform.zoom,s,[o.layoutVertexBuffer2])};if(y){const e=t.stencilModeForClipping(i).ref;0===e&&t.terrain&&b.clear({stencil:0});const r={func:x.EQUAL,mask:255};M.u_alpha_discard_threshold=.8,k(new oM(r,e,255,x.KEEP,x.KEEP,x.INVERT)),M.u_alpha_discard_threshold=0,k(new oM(r,e,255,x.KEEP,x.KEEP,x.KEEP))}else k(t.stencilModeForClipping(i))}y&&(t.resetStencilClippingMasks(),t.terrain&&b.clear({stencil:0}))}function EN(t,e,r,n){const i=r.paint.get("fill-color"),o=r.paint.get("fill-opacity");if(0===o.constantOr(1))return;const s=r.paint.get("fill-emissive-strength"),a=t.colorModeForDrapableLayerRenderPass(s),l=r.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===i.constantOr(wn.transparent).a&&1===o.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){const i=t.depthModeForSublayer(1,"opaque"===t.renderPass?rM.ReadWrite:rM.ReadOnly);SN(t,e,r,n,i,a,!1)}if("translucent"===t.renderPass&&r.paint.get("fill-antialias")){const i=t.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,rM.ReadOnly);SN(t,e,r,n,i,a,!0)}}function SN(t,e,r,n,i,o,s){const a=t.context.gl,l=r.paint.get("fill-pattern"),c=l&&l.constantOr(1);let u,h,f,d,p;s?(h=c&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",u=a.LINES):(h=c?"fillPattern":"fill",u=a.TRIANGLES);for(const m of n){const n=e.getTile(m);if(c&&!n.patternsLoaded())continue;const g=n.getBucket(r);if(!g)continue;t.prepareDrawTile();const y=g.programConfigurations.get(r.id),_=t.isTileAffectedByFog(m),v=t.getOrCreateProgram(h,{config:y,overrideFog:_});c&&(t.context.activeTexture.set(a.TEXTURE0),n.imageAtlasTexture&&n.imageAtlasTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),y.updatePaintBuffers());const b=l.constantOr(null);if(b&&n.imageAtlas){const t=n.imageAtlas.patternPositions[b.toString()];t&&y.setConstantPatternPositions(t)}const x=t.translatePosMatrix(m.projMatrix,n,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor")),w=r.paint.get("fill-emissive-strength");if(s){d=g.indexBuffer2,p=g.segments2;const e=t.terrain&&t.terrain.renderingToTexture?t.terrain.drapeBufferSize:[a.drawingBufferWidth,a.drawingBufferHeight];f="fillOutlinePattern"===h&&c?dF(x,w,t,n,e):fF(x,w,e)}else d=g.indexBuffer,p=g.segments,f=c?hF(x,w,t,n):uF(x,w);t.uploadCommonUniforms(t.context,v,m.toUnwrapped()),v.draw(t,u,i,t.stencilModeForClipping(m),o,mM.disabled,f,r.id,g.layoutVertexBuffer,d,p,r.paint,t.transform.zoom,y,void 0)}}function TN(t,e,r,n){const i=r.paint.get("fill-extrusion-opacity"),o=t.context,s=o.gl,a=t.terrain,l=a&&a.renderingToTexture,c=r.paint.get("fill-extrusion-cutoff-fade-range");if(0===i)return;const u=t.conflationActive&&t.layerUsedInConflation(r,e.getSource());if(u&&ON(t,e,r,n),a||u)for(const i of n){const n=e.getTile(i).getBucket(r);
2n&&MN(t.context,e,i,n,r,a,u)}if("shadow"===t.renderPass&&t.shadowRenderer){const o=t.shadowRenderer;if(a&&i<.65&&r._transitionablePaint._values["fill-extrusion-opacity"].value.expression instanceof xa)return;const s=o.getShadowPassDepthMode(),l=o.getShadowPassColorMode();AN(t,e,r,n,s,oM.disabled,l,u)}else if("translucent"===t.renderPass){const h=!r.paint.get("fill-extrusion-pattern").constantOr(1);if(!l){const o=new rM(t.context.gl.LEQUAL,rM.ReadWrite,t.depthRangeFor3D);0===c&&1===i&&h?AN(t,e,r,n,o,oM.disabled,uM.unblended,u):(AN(t,e,r,n,o,oM.disabled,uM.disabled,u),AN(t,e,r,n,o,t.stencilModeFor3D(),t.colorModeForRenderPass(),u),t.resetStencilClippingMasks())}const f=t.style.enable3dLights(),d=!a,p="globe"!==t.transform.projection.name,m=d&&p;if(f&&h&&(m||l)){const i=r.paint.get("fill-extrusion-opacity"),c=r.paint.get("fill-extrusion-ambient-occlusion-intensity"),h=r.paint.get("fill-extrusion-ambient-occlusion-ground-radius"),f=r.paint.get("fill-extrusion-flood-light-intensity"),d=r.paint.get("fill-extrusion-flood-light-color").toArray01().slice(0,3),p=c>0&&h>0,m=f>0,g=(t,e,r)=>(1-r)*t+r*e,y=o=>{const a=t.depthModeForSublayer(1,rM.ReadOnly,s.LEQUAL,!0),l=o?r.paint.get("fill-extrusion-ambient-occlusion-ground-attenuation"):r.paint.get("fill-extrusion-flood-light-ground-attenuation"),p=g(.1,3,l),m=t._showOverdrawInspector;if(!m){const l=new oM({func:s.ALWAYS,mask:255},255,255,s.KEEP,s.KEEP,s.REPLACE),m=new uM([s.ONE,s.ONE,s.ONE,s.ONE],wn.transparent,[!1,!1,!1,!0],s.MIN);CN(t,e,r,n,a,l,m,mM.disabled,o,"sdf",i,c,h,f,d,p,u,!1)}{const l=m?oM.disabled:new oM({func:s.EQUAL,mask:255},255,255,s.KEEP,s.DECR,s.DECR),g=m?t.colorModeForRenderPass():new uM([s.ONE_MINUS_DST_ALPHA,s.DST_ALPHA,s.ONE,s.ONE],wn.transparent,[!0,!0,!0,!0]);CN(t,e,r,n,a,l,g,mM.disabled,o,"color",i,c,h,f,d,p,u,!1)}};if(l){const l=(o,a,l)=>{const p=t.depthModeForSublayer(1,rM.ReadOnly,s.LEQUAL,!1),m=o?r.paint.get("fill-extrusion-ambient-occlusion-ground-attenuation"):r.paint.get("fill-extrusion-flood-light-ground-attenuation"),y=g(.1,3,m);{const l=new uM([s.ONE,s.ONE,s.ONE,s.ONE],wn.transparent,[!1,!1,!1,!0]);CN(t,e,r,n,p,oM.disabled,l,mM.disabled,o,"clear",i,c,h,f,d,y,u,a)}{const l=new oM({func:s.ALWAYS,mask:255},255,255,s.KEEP,s.KEEP,s.REPLACE),m=new uM([s.ONE,s.ONE,s.ONE,s.ONE],wn.transparent,[!1,!1,!1,!0],s.MIN);CN(t,e,r,n,p,l,m,mM.disabled,o,"sdf",i,c,h,f,d,y,u,a)}{const l=o?s.ZERO:s.ONE_MINUS_DST_ALPHA,m=new oM({func:s.EQUAL,mask:255},255,255,s.KEEP,s.DECR,s.DECR),g=new uM([l,s.DST_ALPHA,s.ONE_MINUS_DST_ALPHA,s.ZERO],wn.transparent,[!0,!0,!0,!0]);CN(t,e,r,n,p,m,g,mM.disabled,o,"color",i,c,h,f,d,y,u,a)}{const m=o?s.ZERO:s.ONE,g=o?s.FUNC_ADD:s.MAX,_=new uM([s.ONE,s.ONE,s.ONE,m],wn.transparent,[!1,!1,!1,!0],g);CN(t,e,r,n,p,oM.disabled,_,mM.disabled,o,"clear",i,c,h,f,d,y,u,a,l)}};if(p||m){let e;if(t.prepareDrawTile(),a){const t=a.drapeBufferSize[0],r=a.drapeBufferSize[1];e=a.framebufferCopyTexture,e&&(!e||e.size[0]===t&&e.size[1]===r)||(e&&e.destroy(),e=a.framebufferCopyTexture=new YO(o,new vw({width:t,height:r}),s.RGBA)),e.bind(s.LINEAR,s.CLAMP_TO_EDGE),s.copyTexImage2D(s.TEXTURE_2D,0,s.RGBA,0,0,t,r,0)}p&&l(!0,!1,e),m&&l(!1,!0,e)}}else p&&y(!0),m&&y(!1)}}}function AN(t,e,r,n,i,o,s,a){r.resetLayerRenderingStats();const l=t.context,c=l.gl,u=t.transform,h=r.paint.get("fill-extrusion-pattern"),f=h.constantOr(1),d=r.paint.get("fill-extrusion-opacity"),p=t.style.enable3dLights()&&!f?r.paint.get("fill-extrusion-ambient-occlusion-wall-radius"):r.paint.get("fill-extrusion-ambient-occlusion-radius"),m=[r.paint.get("fill-extrusion-ambient-occlusion-intensity"),p],g=r.layout.get("fill-extrusion-edge-radius"),y=g>0&&!r.paint.get("fill-extrusion-rounded-roof"),_=y?0:g,v="globe"===u.projection.name?GI():0,b="globe"===u.projection.name,x=b?Vb(u.zoom):0,w=[hx(u.center.lng),fx(u.center.lat)],E=r.paint.get("fill-extrusion-flood-light-color").toArray01().slice(0,3),S=r.paint.get("fill-extrusion-flood-light-intensity"),T=r.paint.get("fill-extrusion-vertical-scale"),A=uj(t,r.paint.get("fill-extrusion-cutoff-fade-range")),O=r.paint.get("fill-extrusion-emissive-strength"),C=[];let M;b&&C.push("PROJECTION_GLOBE_VIEW"),m[0]>0&&C.push("FAUX_AO"),y&&C.push("ZERO_ROOF_RADIUS"),a&&C.push("HAS_CENTROID"),S>0&&C.push("FLOOD_LIGHT"),A.shouldRenderCutoff&&C.push("RENDER_CUTOFF");const k="shadow"===t.renderPass,I=t.shadowRenderer,P=k&&!!I;t.shadowRenderer&&(t.shadowRenderer.useNormalOffset=!0);let L=[0,0,0];
2if(I){const e=t.style.directionalLight,r=t.style.ambientLight;e&&r&&(L=W$(e,r)),M=C.concat(["SHADOWS_SINGLE_CASCADE"])}const R=P?"fillExtrusionDepth":f?"fillExtrusionPattern":"fillExtrusion",D=r.getLayerRenderingStats();for(const p of n){const n=e.getTile(p),g=n.getBucket(r);if(!g||g.projection.name!==u.projection.name)continue;let y=!1;I&&(y=0===I.getMaxCascadeForTile(p.toUnwrapped()));const P=t.isTileAffectedByFog(p),z=g.programConfigurations.get(r.id),B=t.getOrCreateProgram(R,{config:z,defines:y?M:C,overrideFog:P});if(t.terrain&&t.terrain.setupElevationDraw(n,B,{useMeterToDem:!0}),!g.centroidVertexBuffer){const t=B.attributes.a_centroid_pos;void 0!==t&&c.vertexAttrib2f(t,0,0)}!k&&I&&I.setupShadows(n.tileID.toUnwrapped(),B,"vector-tile",n.tileID.overscaledZ),f&&(t.context.activeTexture.set(c.TEXTURE0),n.imageAtlasTexture&&n.imageAtlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE),z.updatePaintBuffers());const j=h.constantOr(null);if(j&&n.imageAtlas){const t=n.imageAtlas.patternPositions[j.toString()];t&&z.setConstantPatternPositions(t)}const F=r.paint.get("fill-extrusion-vertical-gradient");let N;if(k&&I){if(LN(n.tileID,g,t))continue;const e=I.calculateShadowPassMatrixFromTile(n.tileID.toUnwrapped());N=nF(e,_,T)}
2else{const e=t.translatePosMatrix(p.expandedProjMatrix,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),i=u.projection.createInversionMatrix(u,p.canonical);N=f?iF(e,t,F,d,m,_,p,n,v,x,w,i,E,T):rF(e,t,F,d,m,_,p,v,x,w,i,E,T,S,L,O)}t.uploadCommonUniforms(l,B,p.toUnwrapped(),null,A);let $=g.segments;if("mercator"===u.projection.name&&!k&&($=g.getVisibleSegments(n.tileID,t.terrain,t.transform.getFrustum(0)),!$.get().length))continue;if(D)if(k)for(const t of $.get())D.numRenderedVerticesInShadowPass+=t.primitiveLength;else for(const t of $.get())D.numRenderedVerticesInTransparentPass+=t.primitiveLength;const U=[];(t.terrain||a)&&U.push(g.centroidVertexBuffer),b&&U.push(g.layoutVertexExtBuffer),B.draw(t,l.gl.TRIANGLES,i,o,s,mM.backCCW,N,r.id,g.layoutVertexBuffer,g.indexBuffer,$,r.paint,t.transform.zoom,z,U)}t.shadowRenderer&&(t.shadowRenderer.useNormalOffset=!1)}function ON(t,e,r,n){for(const i of n){const n=e.getTile(i).getBucket(r);n&&(n.updateReplacement(i,t.replacementSource),n.uploadCentroid(t.context))}}function CN(t,e,r,n,i,o,s,a,l,c,u,h,f,d,p,m,g,y,_){const v=t.context,b=v.gl,x=t.transform,w=t.transform.zoom,E=[],S=uj(t,r.paint.get("fill-extrusion-cutoff-fade-range"));"clear"===c?(E.push("CLEAR_SUBPASS"),_&&(E.push("CLEAR_FROM_TEXTURE"),v.activeTexture.set(b.TEXTURE0),_.bind(b.LINEAR,b.CLAMP_TO_EDGE))):"sdf"===c&&E.push("SDF_SUBPASS"),g&&E.push("HAS_CENTROID"),S.shouldRenderCutoff&&E.push("RENDER_CUTOFF");const T=r.layout.get("fill-extrusion-edge-radius"),A=(e,n,c,y,b)=>{const x=n.programConfigurations.get(r.id),A=t.isTileAffectedByFog(e),O=t.getOrCreateProgram("fillExtrusionGroundEffect",{config:x,defines:E,overrideFog:A}),C=[h,f*b],M=w>=17?0:T*b,k=_?_.size[0]:0,I=oF(t,y,u,l,b,C,d,p,m,M,k),P=[];g&&P.push(n.hiddenByLandmarkVertexBuffer),t.uploadCommonUniforms(v,O,e.toUnwrapped(),null,S),O.draw(t,v.gl.TRIANGLES,i,o,s,a,I,r.id,n.vertexBuffer,n.indexBuffer,c,r.paint,w,x,P)};for(const i of n){const n=e.getTile(i),o=n.getBucket(r);if(!o||o.projection.name!==x.projection.name||!o.groundEffect||o.groundEffect&&!o.groundEffect.hasData())continue;const s=o.groundEffect,a=1/o.tileToMeter;{const e=t.translatePosMatrix(i.projMatrix,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),o=s.getDefaultSegment();A(i,s,o,e,a)}if(y)for(let o=0;o<4;o++){const s=$v[o](i),l=e.getTile(s);if(!l)continue;const c=l.getBucket(r);if(!c||c.projection.name!==x.projection.name||!c.groundEffect||c.groundEffect&&!c.groundEffect.hasData())continue;const u=c.groundEffect;let h,f;0===o?(h=[-Li,0,0],f=1):1===o?(h=[Li,0,0],f=0):2===o?(h=[0,-Li,0],f=3):(h=[0,Li,0],f=2);const d=u.regionSegments[f];if(!d)continue;const p=new Float32Array(16);_v.translate(p,i.projMatrix,h),A(i,u,d,t.translatePosMatrix(p,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),a)}}}function MN(t,e,r,n,i,o,s){0===n.centroidVertexArray.length&&n.createCentroidsBuffer();const a=o?o.findDEMTileFor(r):null;if(!(a&&a.dem||s))return;const l=(t,e)=>{(t.flags|e.flags)&bI?(t.flags|=bI,e.flags|=bI):(t.flags&=~bI,e.flags&=~bI)},c=t=>new b(Math.ceil((t+wI)*xI),0),u=t=>{const r=e.getSource().minzoom,n=t=>{const r=e.getTileByID(t);if(r&&r.hasData())return r.getBucket(i)},o=[0,-1,1];for(const e of o){if(t.overscaledZ+e<r)continue;const i=n(t.calculateScaledKey(t.overscaledZ+e));if(i)return i}},h=[0,0,0],f=(t,e)=>(h[0]=Math.min(t.min.y,e.min.y),h[1]=Math.max(t.max.y,e.max.y),h[2]=Li-e.min.x>t.max.x?e.min.x-Li:t.max.x,h),d=(t,e)=>(h[0]=Math.min(t.min.x,e.min.x),h[1]=Math.max(t.max.x,e.max.x),h[2]=Li-e.min.y>t.max.y?e.min.y-Li:t.max.y,h),p=[(t,e)=>f(t,e),(t,e)=>f(e,t),(t,e)=>d(t,e),(t,e)=>d(e,t)],m=3,g=(t,e,n,i,s,l,c)=>{if(!o)return 0;const u=[[l?n:t,l?t:n,0],[l?n:e,l?e:n,0]],h=c<0?Li+c:c,f=[l?h:(t+e)/2,l?(t+e)/2:h,0];return 0===n&&c<0||0!==n&&c>0?o.getForTilePoints(s,[f],!0,i):u.push(f),o.getForTilePoints(r,u,!0,a),Math.max(u[0][2],u[1][2],f[2])/o.exaggeration()};for(let t=0;t<4;t++){const e=n.borderFeatureIndices[t];if(0===e.length)continue;const i=$v[t](r),a=u(i);if(!(a&&a instanceof DI))continue;if(n.borderDoneWithNeighborZ[t]===a.canonical.z)continue;0===a.centroidVertexArray.length&&a.createCentroidsBuffer();const h=o?o.findDEMTileFor(i):null;if(!(h&&h.dem||s))continue;const f=(t<2?1:5)-t,d=a.borderDoneWithNeighborZ[f]!==n.canonical.z,y=a.borderFeatureIndices[f];let _=0;if(n.canonical.z!==a.canonical.z){for(const t of e)n.showCentroid(n.featuresOnBorder[t]);if(d)for(const t of y)a.showCentroid(a.featuresOnBorder[t]);n.borderDoneWithNeighborZ[t]=a.canonical.z,a.borderDoneWithNeighborZ[f]=n.canonical.z}for(const r of e){const e=n.featuresOnBorder[r],o=n.centroidData[e.centroidDataIndex],u=e.borders[t];let d;for(;_<y.length;){d=a.featuresOnBorder[y[_]];const t=d.borders[f];if(t[1]>u[0]+m||t[0]>u[0]-m)break;a.showCentroid(d),_++}if(d&&_<y.length){const r=_;let v=0;for(;!(d.borders[f][0]>u[1]-m)&&(v++,++_!==y.length);)d=a.featuresOnBorder[y[_]];if(d=a.featuresOnBorder[y[r]],v>1){const t=d.borders[f];Math.abs(u[0]-t[0])<m&&Math.abs(u[1]-t[1])<m&&(v=1,_=r+1)}else if(0===v){n.showCentroid(e);continue}const x=a.centroidData[d.centroidDataIndex];s&&1===v&&l(o,x);let w=new b(0,0);if(v>1)_=r;else if(h&&h.dem&&!(e.intersectsCount()>1||d.intersectsCount()>1)){const e=p[t](o,x),r=t%2?Li-1:0;w=c(g(e[0],Math.min(Li-1,e[1]),r,h,i,t<2,e[2]))}o.centroidXY=x.centroidXY=w,n.writeCentroidToBuffer(o),a.writeCentroidToBuffer(x)}else n.showCentroid(e)}n.borderDoneWithNeighborZ[t]=a.canonical.z,a.borderDoneWithNeighborZ[f]=n.canonical.z}(n.needsCentroidUpdate||!n.centroidVertexBuffer&&0!==n.centroidVertexArray.length)&&n.uploadCentroid(t)}
2const kN=[1,0,0],IN=[0,1,0],PN=[0,0,1];function LN(t,e,r){const n=r.transform,i=r.shadowRenderer;if(!i)return!0;const o=t.toUnwrapped(),s=n.tileSize*i._cascades[r.currentShadowCascade].scale;let a=e.maxHeight;if(n.elevation){const e=n.elevation.getMinMaxForTile(t);e&&(a+=e.max)}const l=[...i.shadowDirection];l[2]=-l[2];const c=i.computeSimplifiedTileShadowVolume(o,a,s,l);if(!c)return!1;const u=[kN,IN,PN,l,[l[0],0,l[2]],[0,l[1],l[2]]],h="globe"===n.projection.name,f=n.scaleZoom(s),d=rb.fromInvProjectionMatrix(n.invProjMatrix,n.worldSize,f,!h),p=i.getCurrentCascadeFrustum();return 0===d.intersectsPrecise(c.vertices,c.planes,u)||0===p.intersectsPrecise(c.vertices,c.planes,u)}const RN=2;function DN(t,e,r,n,i,o){if("translucent"!==t.renderPass)return;if(0===r.paint.get("raster-opacity"))return;const s=t.context,a=s.gl,l=e.getSource(),c=BN(r,s,a),u=c.defines,h="globe"===t.transform.projection.name;let f=!1;if(l instanceof kP&&!n.length){if(!h)return;if(l.onNorthPole)f=!0,u.push("GLOBE_POLES");else{if(!l.onSouthPole)return;f=!0,u.push("GLOBE_POLES")}}const d=r.paint.get("raster-emissive-strength"),p=t.colorModeForDrapableLayerRenderPass(d),m=t.terrain&&t.terrain.renderingToTexture,g=l instanceof kP&&0!==r.paint.get("raster-elevation"),y=!t.options.moving,_="nearest"===r.paint.get("raster-resampling")?a.NEAREST:a.LINEAR;if(f){const n=e.getSource();if(!(n instanceof kP))return;const i=n.texture;if(!i)return;const o=t.globeSharedBuffers;if(!o)return;const l=new rM(a.LEQUAL,rM.ReadWrite,t.depthRangeFor3D),u=Float32Array.from(t.transform.expandedFarZProjMatrix);let h=Gb(0,0,t.transform);const f=Float32Array.from(Db(bb(new zv(0,0,0)))),m={opacity:1,mix:0};t.terrain&&t.terrain.prepareDrawTile(),s.activeTexture.set(a.TEXTURE0),i.bind(_,a.CLAMP_TO_EDGE),s.activeTexture.set(a.TEXTURE1),i.bind(_,a.CLAMP_TO_EDGE),i.useMipmap&&s.extTextureFilterAnisotropic&&t.transform.pitch>20&&a.texParameterf(a.TEXTURE_2D,s.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,s.extTextureFilterAnisotropicMax);const[g,y,v,b]=o.getPoleBuffers(0,!0);let x;n.onNorthPole?(x=g,t.renderDefaultNorthPole=!1):(h=_v.scale(_v.create(),h,[1,-1,1]),x=y,t.renderDefaultSouthPole=!1);const w=n.perspectiveTransform,E=OF(u,f,h,m,r,w||[0,0],r.paint.get("raster-elevation"),RN,c.mix,c.offset,c.range,d),S=t.getOrCreateProgram("raster",{defines:c.defines});return t.uploadCommonUniforms(s,S,null),void S.draw(t,a.TRIANGLES,l,oM.disabled,p,mM.disabled,E,r.id,x,v,b)}if(!n.length)return;const[v,b]=l instanceof kP||m?[{},n]:t.stencilConfigForOverlap(n),x=b[b.length-1].overscaledZ,w=g&&h;w&&c.defines.push("PROJECTION_GLOBE_VIEW"),g&&c.defines.push("RENDER_CUTOFF");for(const n of b){const i=n.toUnwrapped(),u=e.getTile(n);if(m&&(!u||!u.hasData()))continue;if(!u.texture)continue;let f,b;m?(f=rM.disabled,b=n.projMatrix):g?(f=new rM(a.LEQUAL,rM.ReadWrite,t.depthRangeFor3D),b=h?Float32Array.from(t.transform.expandedFarZProjMatrix):t.transform.calculateProjMatrix(i,y)):(f=t.depthModeForSublayer(n.overscaledZ-x,1===r.paint.get("raster-opacity")?rM.ReadWrite:rM.ReadOnly,a.LESS),b=t.transform.calculateProjMatrix(i,y));const E=t.terrain&&m?t.terrain.stencilModeForRTTOverlap(n):v[n.overscaledZ],S=o?0:r.paint.get("raster-fade-duration");u.registerFadeDuration(S);const T=e.findLoadedParent(n,0),A=Tj(u,T,e,t.transform,S);let O,C;t.terrain&&t.terrain.prepareDrawTile(),s.activeTexture.set(a.TEXTURE0),u.texture&&u.texture.bind(_,a.CLAMP_TO_EDGE),s.activeTexture.set(a.TEXTURE1),T?(T.texture&&T.texture.bind(_,a.CLAMP_TO_EDGE),O=Math.pow(2,T.tileID.overscaledZ-u.tileID.overscaledZ),C=[u.tileID.canonical.x*O%1,u.tileID.canonical.y*O%1]):u.texture&&u.texture.bind(_,a.CLAMP_TO_EDGE),u.texture&&u.texture.useMipmap&&s.extTextureFilterAnisotropic&&t.transform.pitch>20&&a.texParameterf(a.TEXTURE_2D,s.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,s.extTextureFilterAnisotropicMax);const M=t.transform,k=l instanceof kP?l.perspectiveTransform:[0,0],I=g?zN(M):[0,0,0,0];let P,L,R,D,z,B;if(w&&l instanceof kP&&l.coordinates.length>3){P=Float32Array.from(Db(bb(new zv(0,0,0)))),L=Float32Array.from(M.globeMatrix),R=Float32Array.from(Ub(M)),D=[hx(M.center.lng),fx(M.center.lat)],B=[hx(l.coordinates[1][0]),fx(l.coordinates[1][1]),hx(l.coordinates[3][0]),fx(l.coordinates[3][1])];const e=new Oh(l.coordinates[1],l.coordinates[3]);z=Float32Array.from(Hb(new zv(0,0,0),e,0,M.worldSize/t.transform._pixelsPerMercatorPixel))}else P=new Float32Array(16),L=new Float32Array(9),R=new Float32Array(16),D=[0,0],z=new Float32Array(16),B=[0,0,0,0];const j=AF(b,P,L,R,z,C||[0,0],B,Vb(t.transform.zoom),D,I,O||1,A,r,k,g?r.paint.get("raster-elevation"):0,RN,c.mix,c.offset,c.range,1,0,d),F=t.isTileAffectedByFog(n),N=t.getOrCreateProgram("raster",{defines:c.defines,overrideFog:F});if(t.uploadCommonUniforms(s,N,i),l instanceof kP){if(m||!h)l.boundsBuffer&&l.boundsSegments&&N.draw(t,a.TRIANGLES,f,oM.disabled,p,mM.disabled,j,r.id,l.boundsBuffer,t.quadTriangleIndexBuffer,l.boun
2dsSegments);else if(t.globeSharedBuffers){const[e,n,i]=t.globeSharedBuffers.getGridBuffers(0,!1);N.draw(t,a.TRIANGLES,f,oM.disabled,p,mM.frontCCW,j,r.id,e,n,i),N.draw(t,a.TRIANGLES,f,oM.disabled,p,mM.backCCW,j,r.id,e,n,i)}}else{const{tileBoundsBuffer:e,tileBoundsIndexBuffer:n,tileBoundsSegments:i}=t.getTileBoundsBuffers(u);N.draw(t,a.TRIANGLES,f,E,p,mM.disabled,j,r.id,e,n,i)}}t.resetStencilClippingMasks()}function zN(t){const e=t._nearZ,r=t.projection.farthestPixelDistance(t),n=r-e,i=.2*t.height,o=e+i;return[e,r,(o-i-e)/n,(o-e)/n]}function BN(t,e,r){const n=t.paint.get("raster-color"),i=[],o=t.paint.get("raster-resampling"),s=t.paint.get("raster-color-mix"),a=t.paint.get("raster-color-range"),l=[s[0],s[1],s[2],0],c=s[3],u="nearest"===o?r.NEAREST:r.LINEAR;if(n&&i.push("RASTER_COLOR"),n){e.activeTexture.set(r.TEXTURE2);let n=t.colorRampTexture;n||(n=t.colorRampTexture=new YO(e,t.colorRamp,r.RGBA)),n.bind(r.LINEAR,r.CLAMP_TO_EDGE)}return{mix:l,range:a,offset:c,defines:i,resampling:u}}function jN(t,e,r,n){const i=r.paint.get("background-color"),o=r.paint.get("background-opacity"),s=r.paint.get("background-emissive-strength");if(0===o)return;const a=t.context,l=a.gl,c=t.transform,u=c.tileSize,h=r.paint.get("background-pattern");if(t.isPatternMissing(h,r.scope))return;const f=!h&&1===i.a&&1===o&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass!==f)return;const d=oM.disabled,p=t.depthModeForSublayer(0,"opaque"===f?rM.ReadWrite:rM.ReadOnly),m=t.colorModeForDrapableLayerRenderPass(s),g=h?"backgroundPattern":"background";let y,_=n;_||(y=t.getBackgroundTiles(),_=Object.values(y).map((t=>t.tileID))),h&&(a.activeTexture.set(l.TEXTURE0),t.imageManager.bind(t.context,r.scope));for(const f of _){const _=t.isTileAffectedByFog(f),v=t.getOrCreateProgram(g,{overrideFog:_}),b=f.toUnwrapped(),x=n?f.projMatrix:t.transform.calculateProjMatrix(b);t.prepareDrawTile();const w=e?e.getTile(f):y?y[f.key]:new fC(f,u,c.zoom,t),E=h?VF(x,s,o,t,h,r.scope,{tileID:f,tileSize:u}):UF(x,s,o,i);t.uploadCommonUniforms(a,v,b);const{tileBoundsBuffer:S,tileBoundsIndexBuffer:T,tileBoundsSegments:A}=t.getTileBoundsBuffers(w);v.draw(t,l.TRIANGLES,p,d,m,mM.disabled,E,r.id,S,T,A)}}const FN=new wn(1,0,0,1),NN=new wn(0,1,0,1),$N=new wn(0,0,1,1),UN=new wn(1,0,1,1),VN=new wn(0,1,1,1);function GN(t,e,r){for(let n=0;n<r.length;n++)HN(t,e,r[n])}function qN(t){const e=t.transform.padding,r=3;ZN(t,t.transform.height-(e.top||0),r,FN),ZN(t,e.bottom||0,r,NN),XN(t,e.left||0,r,$N),XN(t,t.transform.width-(e.right||0),r,UN);const n=t.transform.centerPoint;WN(t,n.x,t.transform.height-n.y,VN)}function HN(t,e,r){const n=t.context,i=t.transform,o=n.gl,s="globe"===i.projection.name,a=s?["PROJECTION_GLOBE_VIEW"]:[];let l=r.projMatrix;if(s&&Vb(i.zoom)>0){const t=zb(wb(r.canonical,i));l=_v.multiply(new Float32Array(16),i.globeMatrix,t),_v.multiply(l,i.projMatrix,l)}const c=t.getOrCreateProgram("debug",{defines:a}),u=e.getTileByID(r.key);t.terrain&&t.terrain.setupElevationDraw(u,c);const h=rM.disabled,f=oM.disabled,d=t.colorModeForRenderPass(),p="$debug";n.activeTexture.set(o.TEXTURE0),t.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s?u._makeGlobeTileDebugBuffers(t.context,i):u._makeDebugTileBoundsBuffers(t.context,i.projection);const m=u._tileDebugBuffer||t.debugBuffer,g=u._tileDebugIndexBuffer||t.debugIndexBuffer,y=u._tileDebugSegments||t.debugSegments;c.draw(t,o.LINE_STRIP,h,f,d,mM.disabled,vF(l,wn.red),p,m,g,y,null,null,null,[u._globeTileDebugBorderBuffer]);const _=u.latestRawTileData,v=_&&_.byteLength||0,b=Math.floor(v/1024),x=e.getTile(r).tileSize,w=512/Math.min(x,512)*(r.overscaledZ/i.zoom)*.5;let E=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(E+=` => ${r.overscaledZ}`),E+=` ${b}kb`,KN(t,E);const S=u._tileDebugTextBuffer||t.debugBuffer,T=u._tileDebugTextIndexBuffer||t.quadTriangleIndexBuffer,A=u._tileDebugTextSegments||t.debugSegments;c.draw(t,o.TRIANGLES,h,f,uM.alphaBlended,mM.disabled,vF(l,wn.transparent,w),p,S,T,A,null,null,null,[u._globeTileDebugTextBuffer])}function WN(t,e,r,n){const i=20,o=2;YN(t,e-o/2,r-i/2,o,i,n),YN(t,e-i/2,r-o/2,i,o,n)}function ZN(t,e,r,n){YN(t,0,e+r/2,t.transform.width,r,n)}function XN(t,e,r,n){YN(t,e-r/2,0,r,t.transform.height,n)}function YN(t,e,r,n,i,o){const s=t.context,a=s.gl;a.enable(a.SCISSOR_TEST),a.scissor(e*vr.devicePixelRatio,r*vr.devicePixelRatio,n*vr.devicePixelRatio,i*vr.devicePixelRatio),s.clear({color:o}),a.disable(a.SCISSOR_TEST)}function KN(t,e){t.initDebugOverlayCanvas();const r=t.debugOverlayCanvas,n=t.context.gl,i=t.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(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}function JN(t,e,r,n){const i=t.context,o=r.implementation;if(!t.transform.projection.unsupportedLayers||!t.transform.projection.unsupportedLayers.includes("custom")||t.terrain&&(t.terrain.renderingToTexture||"offscreen"===t.renderPass)&&r.isLayerDraped(e)){if("offscreen"===t.renderPass){const e=o.prerender;if(e){if(t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),"globe"===t.transform.projection.name){const r=t.transform.pointMerc;e.call(o,i.gl,t.transform.customLayerMatrix(),t.transform.getProjection(),t.transform.globeToMercatorMatrix(),Vb(t.transform.zoom),[r.x,r.y],t.transform.pixelsPerMeterRatio)}else e.call(o,i.gl,t.transform.customLayerMatrix());i.setDirty(),t.setBaseState()}}else if("translucent"===t.renderPass){if(t.terrain&&t.terrain.renderingToTexture){const e=o.renderToTile;if(e){const r=n[0].canonical,s=new wx(r.x+n[0].wrap*(1<<r.z),r.y,r.z);i.setDepthMode(rM.disabled),i.setStencilMode(oM.disabled),i.setColorMode(t.colorModeForRenderPass()),t.setCustomLayerDefaults(),e.call(o,i.gl,s),i.setDirty(),t.setBaseState()}return}t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),i.setStencilMode(oM.disabled);const e="3d"===o.renderingMode?new rM(t.context.gl.LEQUAL,rM.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,rM.ReadOnly);if(i.setDepthMode(e),"globe"===t.transform.projection.name){const e=t.transform.pointMerc;o.render(i.gl,t.transform.customLayerMatrix(),t.transform.getProjection(),t.transform.globeToMercatorMatrix(),Vb(t.transform.zoom),[e.x,e.y],t.transform.pixelsPerMeterRatio)}else o.render(i.gl,t.transform.customLayerMatrix());i.setDirty(),t.setBaseState(),i.bindFramebuffer.set(null)}}else it("Custom layers are not yet supported with this projection. Use mercator or globe to enable usage of custom layers.")}const QN=Zc([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:t$,size:e$,alignment:r$}=QN;function n$(t,e,r,n){t.emplaceBack(e,r,n)}class i${constructor(t){this.vertexArray=new wu,this.indices=new pu,n$(this.vertexArray,-1,-1,1),n$(this.vertexArray,1,-1,1),n$(this.vertexArray,-1,1,1),n$(this.vertexArray,1,1,1),n$(this.vertexArray,-1,-1,-1),n$(this.vertexArray,1,-1,-1),n$(this.vertexArray,-1,1,-1),n$(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=t.createVertexBuffer(this.vertexArray,t$),this.indexBuffer=t.createIndexBuffer(this.indices),this.segment=Nu.simpleSegment(0,0,36,12)}}function o$(t,e,r){const n=t.transform,i=t._atmosphere?Vb(n.zoom):1,o=r.paint.get("sky-opacity")*i;
2if(0===o)return;const s=t.context,a=r.paint.get("sky-type"),l=new rM(s.gl.LEQUAL,rM.ReadOnly,[0,1]),c=t.frameCounter/1e3%1;"atmosphere"===a?"offscreen"===t.renderPass?r.needsSkyboxCapture(t)&&(c$(t,r,32,32),r.markSkyboxValid(t)):"sky"===t.renderPass&&a$(t,r,l,o,c):"gradient"===a&&"sky"===t.renderPass&&s$(t,r,l,o,c)}function s$(t,e,r,n,i){const o=t.context,s=o.gl,a=t.transform,l=t.getOrCreateProgram("skyboxGradient");e.skyboxGeometry||(e.skyboxGeometry=new i$(o)),o.activeTexture.set(s.TEXTURE0);let c=e.colorRampTexture;c||(c=e.colorRampTexture=new YO(o,e.colorRamp,s.RGBA)),c.bind(s.LINEAR,s.CLAMP_TO_EDGE);const u=WF(a.skyboxMatrix,e.getCenter(t,!1),e.paint.get("sky-gradient-radius"),n,i);t.uploadCommonUniforms(o,l),l.draw(t,s.TRIANGLES,r,oM.disabled,t.colorModeForRenderPass(),mM.backCW,u,"skyboxGradient",e.skyboxGeometry.vertexBuffer,e.skyboxGeometry.indexBuffer,e.skyboxGeometry.segment)}function a$(t,e,r,n,i){const o=t.context,s=o.gl,a=t.transform,l=t.getOrCreateProgram("skybox");o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_CUBE_MAP,e.skyboxTexture);const c=qF(a.skyboxMatrix,e.getCenter(t,!1),0,n,i);t.uploadCommonUniforms(o,l),l.draw(t,s.TRIANGLES,r,oM.disabled,t.colorModeForRenderPass(),mM.backCW,c,"skybox",e.skyboxGeometry.vertexBuffer,e.skyboxGeometry.indexBuffer,e.skyboxGeometry.segment)}function l$(t,e,r,n,i,o){const s=t.context.gl,a=e.paint.get("sky-atmosphere-color"),l=e.paint.get("sky-atmosphere-halo-color"),c=e.paint.get("sky-atmosphere-sun-intensity"),u=XF(gv.fromMat4(gv.create(),n),i,c,a,l),h=s.TEXTURE_CUBE_MAP_POSITIVE_X+o;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,h,e.skyboxTexture,0),r.draw(t,s.TRIANGLES,rM.disabled,oM.disabled,uM.unblended,mM.frontCW,u,"skyboxCapture",e.skyboxGeometry.vertexBuffer,e.skyboxGeometry.indexBuffer,e.skyboxGeometry.segment)}function c$(t,e,r,n){const i=t.context,o=i.gl;let s=e.skyboxFbo;if(!s){s=e.skyboxFbo=i.createFramebuffer(r,n,!0,null),e.skyboxGeometry=new i$(i),e.skyboxTexture=i.gl.createTexture(),o.bindTexture(o.TEXTURE_CUBE_MAP,e.skyboxTexture),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MAG_FILTER,o.LINEAR);for(let t=0;t<6;++t){const e=o.TEXTURE_CUBE_MAP_POSITIVE_X+t;o.texImage2D(e,0,o.RGBA,r,n,0,o.RGBA,o.UNSIGNED_BYTE,null)}}i.bindFramebuffer.set(s.framebuffer),i.viewport.set([0,0,r,n]);const a=e.getCenter(t,!0),l=t.getOrCreateProgram("skyboxCapture"),c=new Float64Array(16);_v.identity(c),_v.rotateY(c,c,.5*-Math.PI),l$(t,e,l,c,a,0),_v.identity(c),_v.rotateY(c,c,.5*Math.PI),l$(t,e,l,c,a,1),_v.identity(c),_v.rotateX(c,c,.5*-Math.PI),l$(t,e,l,c,a,2),_v.identity(c),_v.rotateX(c,c,.5*Math.PI),l$(t,e,l,c,a,3),_v.identity(c),l$(t,e,l,c,a,4),_v.identity(c),_v.rotateY(c,c,Math.PI),l$(t,e,l,c,a,5),i.viewport.set([0,0,t.width,t.height])}const u$=Zc([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class h${constructor(t){const e=new _u;e.emplaceBack(-1,1,1,0,0),e.emplaceBack(1,1,1,1,0),e.emplaceBack(1,-1,1,1,1),e.emplaceBack(-1,-1,1,0,1);const r=new pu;r.emplaceBack(0,1,2),r.emplaceBack(2,3,0),this.vertexBuffer=t.createVertexBuffer(e,u$.members),this.indexBuffer=t.createIndexBuffer(r),this.segments=Nu.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const f$=Zc([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_size_scale",components:1},{type:"Float32",name:"a_fade_opacity",components:1}]);function d$(t){const e=Us(30),r=[];for(let n=0;n<t;++n){const t=2*Math.PI*e(),n=Math.acos(1-2*e())-.5*Math.PI;r.push(Sv.fromValues(Math.cos(n)*Math.cos(t),Math.cos(n)*Math.sin(t),Math.sin(n)))}return r}class p${constructor(){this.colorModeAlphaBlendedWriteRGB=new uM([aM,lM,aM,lM],wn.transparent,[!0,!0,!0,!1]),this.colorModeWriteAlpha=new uM([aM,sM,aM,sM],wn.transparent,[!1,!1,!1,!0])}update(t){const e=t.context;if(!this.atmosphereBuffer){this.atmosphereBuffer=new h$(e);const t=100,r=200,n=d$(16e3),i=Us(300),o=new vu,s=new pu;let a=0;for(let e=0;e<n.length;++e){const l=Sv.scale([],n[e],200),c=Math.max(0,1+.01*t*(1*i()-.5)),u=Math.max(0,1+.01*r*(1*i()-.5));o.emplaceBack(l[0],l[1],l[2],-1,-1,c,u),o.emplaceBack(l[0],l[1],l[2],1,-1,c,u),o.emplaceBack(l[0],l[1],l[2],1,1,c,u),o.emplaceBack(l[0],l[1],l[2],-1,1,c,u),s.emplaceBack(a+0,a+1,a+2),s.emplaceBack(a+0,a+2,a+3),a+=4}this.starsVx=e.createVertexBuffer(o,f$.members),this.starsIdx=e.createIndexBuffer(s),this.starsSegments=Nu.simpleSegment(0,0,o.length,s.length)}}destroy(){this.atmosphereBuffer&&this.atmosphereBuffer.destroy(),this.starsVx&&this.starsVx.destroy(),this.starsIdx&&this.starsIdx.destroy()}drawAtmosphereGlow(t,e){const r=t.context,n=r.gl,i=t.transform,o=new rM(n.LEQUAL,rM.ReadOnly,[0,1]),s=Vb(i.zoom),a=e.properties.get("color").toArray01(),l=e.properties.get("high-color").toArray01(),c=e.properties.get("space-color").toArray01PremultipliedAlpha(),u=5e-4,h=et(e.properties.get("horizon-blend"),0,1,u,.25),f=qb(t,r,i)&&h===u?i.worldSize/(2*Math.PI*1.025)-1:i.globeRadius,d=t.frameCounter/1e3%1,p=i.globeCenterInViewSpace,m=Sv.length(p),g=Math.sqrt(Math.pow(m,2)-Math.pow(f,2)),y=Math.acos(g/m),_=e=>{const u="globe"===i.projection.name?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"];e&&u.push("ALPHA_PASS");const f=t.getOrCreateProgram("globeAtmosphere",{defines:u}),p=lj(i.frustumCorners.TL,i.frustumCorners.TR,i.frustumCorners.BR,i.frustumCorners.BL,i.frustumCorners.horizon,s,h,a,l,c,d,y);t.uploadCommonUniforms(r,f);const m=this.atmosphereBuffer,g=e?this.colorModeWriteAlpha:this.colorModeAlphaBlendedWriteRGB,_=e?"atmosphere_glow_alpha":"atmosphere_glow";m&&f.draw(t,n.TRIANGLES,o,oM.disabled,g,mM.backCW,p,_,m.vertexBuffer,m.indexBuffer,m.segments)};_(!1),_(!0)}drawStars(t,e){const r=D(e.properties.get("star-intensity"),0,1);if(0===r)return;const n=t.context,i=n.gl,o=t.transform,s=t.getOrCreateProgram("stars"),a=.15,l=bv.identity([]);bv.rotateX(l,l,-o._pitch),bv.rotateZ(l,l,-o.angle),bv.rotateX(l,l,S(o._center.lat)),bv.rotateY(l,l,-S(o._center.lng));const c=_v.fromQuat(new Float32Array(16),l),u=_v.multiply([],o.starsProjMatrix,c),h=gv.fromMat4([],c),f=gv.invert([],h),d=[0,1,0];Sv.transformMat3(d,d,f),Sv.scale(d,d,a);const p=[1,0,0];Sv.transformMat3(p,p,f),Sv.scale(p,p,a);const m=nN(u,d,p,r);t.uploadCommonUniforms(n,s),this.starsVx&&this.starsIdx&&s.draw(t,i.TRIANGLES,rM.disabled,oM.disabled,this.colorModeAlphaBlendedWriteRGB,mM.disabled,m,"atmosphere_stars",this.starsVx,this.starsIdx,this.starsSegments)}}function m$(t,e){const r=[...t],n=e.cameraWorldSizeForFog/e.worldSize,i=_v.identity([]);return _v.scale(i,i,[n,n,1]),_v.multiply(r,i,r),_v.multiply(r,e.worldToFogMatrix,r),r}function g$(t,e,r,n){const i=r.material,o=n.context,{baseColorTexture:s,metallicRoughnessTexture:a}=i.pbrMetallicRoughness,{normalTexture:l,occlusionTexture:c,emissionTexture:u}=i;function h(e,r,n){if(e&&(t.push(r),o.activeTexture.set(o.gl.TEXTURE0+n),e.gfxTexture)){const{minFilter:t,magFilter:r,wrapS:n,wrapT:i}=e.sampler;e.gfxTexture.bindExtraParam(t,r,n,i)}}if(h(s,"HAS_TEXTURE_u_baseColorTexture",YF.BaseColor),h(a,"HAS_TEXTURE_u_metallicRoughnessTexture",YF.MetallicRoughness),h(l,"HAS_TEXTURE_u_normalTexture",YF.Normal),h(c,"HAS_TEXTURE_u_occlusionTexture",YF.Occlusion),h(u,"HAS_TEXTURE_u_emissionTexture",YF.Emission),r.texcoordBuffer&&(t.push("HAS_ATTRIBUTE_a_uv_2f"),e.push(r.texcoordBuffer)),r.colorBuffer){const n=12===r.colorBuffer.itemSize?"HAS_ATTRIBUTE_a_color_3f":"HAS_ATTRIBUTE_a_color_4f";
2t.push(n),e.push(r.colorBuffer)}r.normalBuffer&&(t.push("HAS_ATTRIBUTE_a_normal_3f"),e.push(r.normalBuffer)),r.pbrBuffer&&(t.push("HAS_ATTRIBUTE_a_pbr"),t.push("HAS_ATTRIBUTE_a_heightBasedEmissiveStrength"),e.push(r.pbrBuffer)),"OPAQUE"!==i.alphaMode&&"MASK"!==i.alphaMode||t.push("UNPREMULT_TEXTURE_IN_SHADER"),i.defined||t.push("DIFFUSE_SHADED"),t.push("USE_STANDARD_DERIVATIVES")}function y$(t,e,r,n,i,o){const s=r.paint.get("model-opacity"),a=e.context,l=new rM(e.context.gl.LEQUAL,rM.ReadWrite,e.depthRangeFor3D),c=e.transform,u=t.mesh,h=u.material,f=h.pbrMetallicRoughness,d=e.style.fog;let p;p="pixels"===e.transform.projection.zAxisUnit?[...t.nodeModelMatrix]:_v.multiply([],n.zScaleMatrix,t.nodeModelMatrix),_v.multiply(p,n.negCameraPosMatrix,p);const m=_v.invert([],p);_v.transpose(m,m);const g=r.paint.get("model-emissive-strength").constantOr(0),y=JF(new Float32Array(t.worldViewProjection),new Float32Array(p),new Float32Array(m),e,s,f.baseColorFactor,h.emissiveFactor,f.metallicFactor,f.roughnessFactor,h,g,r),_={defines:[]},v=[];g$(_.defines,v,u,e);const b=e.shadowRenderer;b&&(b.useNormalOffset=!1);let x=null;if(d){const r=m$(t.nodeModelMatrix,e.transform);if(x=new Float32Array(r),"globe"!==c.projection.name){const t=u.aabb.min,e=u.aabb.max,[n,i]=d.getOpacityForBounds(r,t[0],t[1],e[0],e[1]);_.overrideFog=n>=rL||i>=rL}}const w=uj(e,r.paint.get("model-cutoff-fade-range"));w.shouldRenderCutoff&&_.defines.push("RENDER_CUTOFF");const E=e.getOrCreateProgram("model",_);e.uploadCommonUniforms(a,E,null,x,w),"shadow"!==e.renderPass&&b&&b.setupShadowsFromMatrix(t.nodeModelMatrix,E);const S=u.material.doubleSided?mM.disabled:mM.backCCW;E.draw(e,a.gl.TRIANGLES,l,i,o,S,y,r.id,u.vertexBuffer,u.indexBuffer,u.segments,r.paint,e.transform.zoom,void 0,v)}function _$(t,e,r){const n=e.getSource();if(!n.loaded())return;if("vector"===n.type||"geojson"===n.type)return void(t.modelManager&&t.modelManager.upload(t,r));if("batched-model"===n.type)return;const i=n.getModels();for(const e of i)e.upload(t.context)}function v$(t,e,r,n,i,o,s){let a;a="globe"===t.projection.name?Ak(r,t):[...r],_v.multiply(a,a,e.matrix);const l=_v.multiply([],n,a);if(e.meshes)for(const t of e.meshes){if("BLEND"!==t.material.alphaMode){const e={mesh:t,depth:0,modelIndex:i,worldViewProjection:l,nodeModelMatrix:a};s.push(e);continue}const e=Sv.transformMat4([],t.centroid,l);if(e[2]>0){const r={mesh:t,depth:e[2],modelIndex:i,worldViewProjection:l,nodeModelMatrix:a};o.push(r)}}if(e.children)for(const a of e.children)v$(t,a,r,n,i,o,s)}function b$(t,e,r,n){const i=r.shadowRenderer;if(!i)return;const o=i.getShadowPassDepthMode(),s=i.getShadowPassColorMode(),a=i.calculateShadowPassMatrixFromMatrix(e),l=eN(a),c=["DEPTH_TEXTURE"],u=r.getOrCreateProgram("modelDepth",{defines:c}),h=r.context;u.draw(r,h.gl.TRIANGLES,o,oM.disabled,s,mM.backCCW,l,n.id,t.vertexBuffer,t.indexBuffer,t.segments,n.paint,r.transform.zoom,void 0,void 0)}function x$(t,e,r,n){if("opaque"===t.renderPass)return;const i=r.paint.get("model-opacity");if(0===i)return;const o=r.paint.get("model-cast-shadows");if("shadow"===t.renderPass){if(!o)return;if(t.terrain&&i<.65&&r._transitionablePaint._values["model-opacity"].value.expression instanceof xa)return}const s=t.shadowRenderer,a=r.paint.get("model-receive-shadows");s&&(s.useNormalOffset=!0,a||(s.enabled=!1));const l=()=>{s&&(s.useNormalOffset=!0,a||(s.enabled=!0))},c=e.getSource();if("light-beam"===t.renderPass&&"batched-model"!==c.type)return;if("vector"===c.type||"geojson"===c.type)return A$(t,e,r,n),void l();if(!c.loaded())return;if("batched-model"===c.type)return I$(t,e,r,n),void l();const u=c.getModels(),h=[],f=t.transform.getFreeCameraOptions().position,d=Sv.scale([],[f.x,f.y,f.z],t.transform.worldSize);Sv.negate(d,d);const p=[],m=[];let g=0;for(const e of u){const n=r.paint.get("model-rotation").constantOr(null),i=r.paint.get("model-scale").constantOr(null),o=r.paint.get("model-translation").constantOr(null);e.computeModelMatrix(t,n,i,o,!0,!0,!1);const s=_v.identity([]),a=1/vx(e.position.lat,t.transform.zoom),l=_v.fromScaling([],[1,1,a]);_v.translate(s,s,d);const c={zScaleMatrix:l,negCameraPosMatrix:s};h.push(c);for(const r of e.nodes)v$(t.transform,r,e.matrix,t.transform.expandedFarZProjMatrix,g,p,m);g++}if(p.sort(((t,e)=>e.depth-t.depth)),"shadow"!==t.renderPass){if(1===i)for(const e of m)y$(e,t,r,h[e.modelIndex],oM.disabled,t.colorModeForRenderPass());else{for(const e of m)y$(e,t,r,h[e.modelIndex],oM.disabled,uM.disabled);for(const e of m)y$(e,t,r,h[e.modelIndex],t.stencilModeFor3D(),t.colorModeForRenderPass());t.resetStencilClippingMasks()}for(const e of p)y$(e,t,r,h[e.modelIndex],oM.disabled,t.colorModeForRenderPass());l()}else{for(const e of m)b$(e.mesh,e.nodeModelMatrix,t,r);for(const e of p)b$(e.mesh,e.nodeModelMatrix,t,r);l()}}function w$(t,e,r){let n,i,o,s=t.terrain?t.terrain.exaggeration():0;if(t.terrain&&s>0){const e=t.terrain,i=e.findDEMTileFor(r);i&&i.dem?n=WS.create(e,r,i):s=0}if(0===s&&(e.terrainElevationMin=0,e.terrainElevationMax=0),s===e.validForExaggeration&&(0===s||n&&n._demTile&&n._demTile.tileID===e.validForDEMTile.id&&n._dem._timestamp===e.validForDEMTile.timestamp))return!1;for(const t in e.instancesPerModel){const r=e.instancesPerModel[t];for(let t=0;t<r.instancedDataArray.length;++t){const a=0|r.instancedDataArray.float32[16*t],l=0|r.instancedDataArray.float32[16*t+1],c=(n?s*n.getElevationAt(a,l,!0,!0):0)+r.instancesEvaluatedElevation[t];r.instancedDataArray.float32[16*t+6]=c,i=i?Math.min(e.terrainElevationMin,c):c,o=o?Math.max(e.terrainElevationMax,c):c}}return e.terrainElevationMin=i||0,e.terrainElevationMax=o||0,e.validForExaggeration=s,e.validForDEMTile=n&&n._demTile?{id:n._demTile.tileID,timestamp:n._dem._timestamp}:{id:void 0,timestamp:0},!0}function E$(t,e,r){const n=e.updateZoomBasedPaintProperties(),i=w$(t,e,r);(n||i)&&(e.uploaded=!1,e.upload(t.context))}const S$={shadowUniformsInitialized:!1,useSingleShadowCascade:!1,tileMatrix:new Float64Array(16),shadowTileMatrix:new Float32Array(16),aabb:new nb([0,0,0],[Li,Li,0])};function T$(t,e){const r=1<<t.canonical.z,n=e.getFreeCameraOptions().position,i=e.elevation,o=t.canonical.x/r,s=(t.canonical.x+1)/r,a=t.canonical.y/r,l=(t.canonical.y+1)/r;
2let c=e._centerAltitude;if(i){const e=i.getMinMaxForTile(t);e&&e.max>c&&(c=e.max)}const u=D(n.x,o,s)-n.x,h=D(n.y,a,l)-n.y,f=dx(c,e.center.lat)-n.z;return e._zoomFromMercatorZ(Math.sqrt(u*u+h*h+f*f))}function A$(t,e,r,n){const i=t.transform;if("mercator"!==i.projection.name)return void it(`Drawing 3D models for ${i.projection.name} projection is not yet implemented`);const o=i.getFreeCameraOptions().position;if(!t.modelManager)return;const s=t.modelManager,a=t.shadowRenderer;if(!r._unevaluatedLayout._values.hasOwnProperty("model-id"))return;const l=r._unevaluatedLayout._values["model-id"],c={...r.layout.get("model-id").parameters};for(const u of n){const n=e.getTile(u).getBucket(r);if(!n||n.projection.name!==i.projection.name)continue;const h=T$(u,i);c.zoom=h;const f=l.possiblyEvaluate(c);if(E$(t,n,u),S$.shadowUniformsInitialized=!1,S$.useSingleShadowCascade=!!a&&0===a.getMaxCascadeForTile(u.toUnwrapped()),"shadow"===t.renderPass&&a){if(1===t.currentShadowCascade&&n.isInsideFirstShadowMapFrustum)continue;const e=i.calculatePosMatrix(u.toUnwrapped(),i.worldSize);if(S$.tileMatrix.set(e),S$.shadowTileMatrix=Float32Array.from(a.calculateShadowPassMatrixFromMatrix(e)),S$.aabb.min.fill(0),S$.aabb.max[0]=S$.aabb.max[1]=Li,S$.aabb.max[2]=0,P$(n,S$,t,r.scope))continue}const d=1<<u.canonical.z,p=[((o.x-u.wrap)*d-u.canonical.x)*Li,(o.y*d-u.canonical.y)*Li,o.z*d*Li];for(let e in n.instancesPerModel){const i=n.instancesPerModel[e];i.features.length>0&&(e=f.evaluate(i.features[0].feature,{}));const o=s.getModel(e,r.scope);if(o&&o.uploaded)for(const e of o.nodes)C$(t,r,e,i,p,u,S$)}}}const O$=20;function C$(t,e,r,n,i,o,s){const a=t.context,l="shadow"===t.renderPass,c=t.shadowRenderer,u=l&&c?c.getShadowPassDepthMode():new rM(a.gl.LEQUAL,rM.ReadWrite,t.depthRangeFor3D),h=t.isTileAffectedByFog(o);if(r.meshes)for(const f of r.meshes){const d=["MODEL_POSITION_ON_GPU"],p=[];let m,g,y;n.instancedDataArray.length>O$&&d.push("INSTANCED_ARRAYS");const _=uj(t,e.paint.get("model-cutoff-fade-range"));if(_.shouldRenderCutoff&&d.push("RENDER_CUTOFF"),l&&c)m=t.getOrCreateProgram("modelDepth",{defines:d}),g=eN(s.shadowTileMatrix,s.shadowTileMatrix,Float32Array.from(r.matrix)),y=c.getShadowPassColorMode();else{g$(d,p,f,t),m=t.getOrCreateProgram("model",{defines:d,overrideFog:h});const n=f.material,l=n.pbrMetallicRoughness,u=e.paint.get("model-opacity"),v=e.paint.get("model-emissive-strength").constantOr(0);g=JF(o.expandedProjMatrix,Float32Array.from(r.matrix),new Float32Array(16),t,u,l.baseColorFactor,n.emissiveFactor,l.metallicFactor,l.roughnessFactor,n,v,e,i),c&&(s.shadowUniformsInitialized?m.setShadowUniformValues(a,c.getShadowUniformValues()):(c.setupShadows(o.toUnwrapped(),m,"model-tile",o.overscaledZ),s.shadowUniformsInitialized=!0)),y=_.shouldRenderCutoff||u<1||"OPAQUE"!==n.alphaMode?uM.alphaBlended:uM.unblended}t.uploadCommonUniforms(a,m,o.toUnwrapped(),null,_);const v=f.material.doubleSided?mM.disabled:mM.backCCW;if(n.instancedDataArray.length>O$)p.push(n.instancedDataBuffer),m.draw(t,a.gl.TRIANGLES,u,oM.disabled,y,v,g,e.id,f.vertexBuffer,f.indexBuffer,f.segments,e.paint,t.transform.zoom,void 0,p,n.instancedDataArray.length);else{const r=l?"u_instance":"u_normal_matrix";for(let i=0;i<n.instancedDataArray.length;++i)g[r]=new Float32Array(n.instancedDataArray.arrayBuffer,64*i,16),m.draw(t,a.gl.TRIANGLES,u,oM.disabled,y,v,g,e.id,f.vertexBuffer,f.indexBuffer,f.segments,e.paint,t.transform.zoom,void 0,p)}}if(r.children)for(const a of r.children)C$(t,e,a,n,i,o,s)}const M$=[1,-1,1];function k$(t,e,r,n){const i=t.terrain?t.terrain.exaggeration():0,o=t.transform.zoom;for(const s of n){const n=e.getTile(s).getBucket(r);n&&(t.conflationActive&&n.updateReplacement(s,t.replacementSource),n.evaluateScale(t,r),t.terrain&&i>0&&n.elevationUpdate(t.terrain,i,s,r.source),n.needsReEvaluation(t,o,r)&&n.evaluate(r))}}function I$(t,e,r,n){const i=t.context,o=t.transform,s=t.style.fog,a=t.shadowRenderer;if("mercator"!==o.projection.name)return void it(`Drawing 3D landmark models for ${o.projection.name} projection is not yet implemented`);const l=t.transform.getFreeCameraOptions().position,c=Sv.scale([],[l.x,l.y,l.z],t.transform.worldSize);Sv.negate(c,c);const u=_v.identity([]),h=1/vx(o.center.lat,o.zoom),f=_v.fromScaling([],[1,1,h]);_v.translate(u,u,c);const d=r.paint.get("model-opacity"),p=new rM(i.gl.LEQUAL,rM.ReadWrite,t.depthRangeFor3D),m=new rM(i.gl.LEQUAL,rM.ReadOnly,t.depthRangeFor3D),g=function(l,c){for(const h of n){const n=e.getTile(h).getBucket(r);
2if(!n||!n.uploaded)continue;let g=!1;a&&(g=0===a.getMaxCascadeForTile(h.toUnwrapped()));const y=o.calculatePosMatrix(h.toUnwrapped(),o.worldSize),_=n.modelTraits;for(const e of n.getNodesInfo()){if(e.hiddenByReplacement)continue;if(!e.node.meshes)continue;const n=e.node,v="light-beam"===t.renderPass,b=[...y],x=e.evaluatedScale;let w=0;t.terrain&&n.elevation&&(w=n.elevation*t.terrain.exaggeration());const E=n.anchor?n.anchor[0]:0,S=n.anchor?n.anchor[1]:0;_v.translate(b,b,[E*(x[0]-1),S*(x[1]-1),w]),x!==Mk&&_v.scale(b,b,x),_v.multiply(b,b,n.matrix);const T=_v.multiply([],f,b);_v.multiply(T,u,T);const A=_v.invert([],T);_v.transpose(A,A),_v.scale(A,A,M$);const O=_v.multiply([],o.expandedFarZProjMatrix,b);for(let u=0;u<n.meshes.length;++u){const f=n.meshes[u],y=u===n.lightMeshIndex;if(y){if(!v&&!t.terrain&&t.shadowRenderer){t.currentLayer<t.firstLightBeamLayer&&(t.firstLightBeamLayer=t.currentLayer);continue}}else if(v)continue;const x={defines:[]},w=[];g$(x.defines,w,f,t),_&Ck.HasMapboxMeshFeatures||x.defines.push("DIFFUSE_SHADED"),g&&x.defines.push("SHADOWS_SINGLE_CASCADE");const E="shadow"===t.renderPass;if(E){b$(f,b,t,r);continue}let S=null;if(s){const e=m$(b,t.transform);if(S=new Float32Array(e),"globe"!==o.projection.name){const t=f.aabb.min,r=f.aabb.max,[n,i]=s.getOpacityForBounds(e,t[0],t[1],r[0],r[1]);x.overrideFog=n>=rL||i>=rL}}const C=t.getOrCreateProgram("model",x);!E&&a&&(a.useNormalOffset=!!f.normalBuffer,a.setupShadowsFromMatrix(b,C,a.useNormalOffset)),t.uploadCommonUniforms(i,C,h.toUnwrapped(),S);const M=f.material,k=M.pbrMetallicRoughness;k.metallicFactor=.9,k.roughnessFactor=.5;const I=0,P=JF(new Float32Array(O),new Float32Array(T),new Float32Array(A),t,d,k.baseColorFactor,M.emissiveFactor,k.metallicFactor,k.roughnessFactor,M,I,r),L=y||d<1||e.hasTranslucentParts,R=l?L?uM.alphaBlended:uM.unblended:uM.disabled,D=c&&!y?p:m;C.draw(t,i.gl.TRIANGLES,D,oM.disabled,R,mM.backCCW,P,r.id,f.vertexBuffer,f.indexBuffer,f.segments,r.paint,t.transform.zoom,void 0,w)}}}};k$(t,e,r,n),1===d?g(!0,!0):(g(!1,!0),g(!0,!1))}function P$(t,e,r,n){if(!r.modelManager)return!0;const i=r.modelManager;if(!r.shadowRenderer)return!0;const o=r.shadowRenderer,s=e.aabb;let a=!0,l=t.maxHeight;if(0===l){let e=0;for(const r in t.instancesPerModel){const t=i.getModel(r,n);t?e=Math.max(e,Math.max(Math.max(t.aabb.max[0],t.aabb.max[1]),t.aabb.max[2])):a=!1}l=t.maxScale*e*1.41+t.maxVerticalOffset,a&&(t.maxHeight=l)}s.max[2]=l,s.min[2]+=t.terrainElevationMin,s.max[2]+=t.terrainElevationMax,Sv.transformMat4(s.min,s.min,e.tileMatrix),Sv.transformMat4(s.max,s.max,e.tileMatrix);const c=s.intersects(o.getCurrentCascadeFrustum());return 0===r.currentShadowCascade&&(t.isInsideFirstShadowMapFrustum=2===c),0===c}class L${}const R$=30;class D${constructor(){this._storage=new Map}getLinesFromTrianglesBuffer(t,e,r){{const r=this._storage.get(e.id);if(r)return r.lastUsedFrameIdx=t,r.buf}const n=r.gl,i=n.getBufferParameter(n.ELEMENT_ARRAY_BUFFER,n.BUFFER_SIZE),o=new ArrayBuffer(i),s=new Int16Array(o);n.getBufferSubData(n.ELEMENT_ARRAY_BUFFER,0,new Int16Array(o));const a=new cu;for(let t=0;t<i/2;t+=3){const e=s[t],r=s[t+1],n=s[t+2];a.emplaceBack(e,r),a.emplaceBack(r,n),a.emplaceBack(n,e)}const l=r.bindVertexArrayOES.current,c=new L$;return c.buf=new pC(r,a),c.lastUsedFrameIdx=t,this._storage.set(e.id,c),r.bindVertexArrayOES.set(l),c.buf}update(t){for(const[e,r]of this._storage)t-r.lastUsedFrameIdx>R$&&(r.buf.destroy(),this._storage.delete(e))}destroy(){for(const[t,e]of this._storage)e.buf.destroy(),this._storage.delete(t)}}const z$={symbol:cN,circle:yN,heatmap:_N,line:wN,fill:EN,"fill-extrusion":TN,hillshade:QB,raster:DN,background:jN,sky:o$,debug:GN,custom:JN,model:x$},B$={modelUpload:_$};class j${constructor(t,e,r){this.context=new gM(t,e),this.transform=r,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.setup(),this.numSublayers=yM.maxUnderzooming+yM.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.deferredRenderGpuTimeQueries=[],this.gpuTimers={},this.frameCounter=0,this._backgroundTiles={},this.conflationActive=!1,this.replacementSource=new tI,this.longestCutoffRange=0,this.minCutoffZoom=0,this._fogVisible=!1,this._cachedTileFogOpacities={},this._shadowRenderer=new V$(this),this._wireframeDebugCache=new D$,this.renderDefaultNorthPole=!0,this.renderDefaultSouthPole=!0}updateTerrain(t,e){const r=!!t&&!!t.terrain&&this.transform.projection.supportsTerrain;if(!(r||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new Pj(this,t));const n=this._terrain;this.transform.elevation=r?n:null,n.update(t,this.transform,e),this.transform.elevation&&!n.enabled&&(this.transform.elevation=null)}_updateFog(t){const e="globe"===this.transform.projection.name,r=t.fog;if(!r||e||r.getOpacity(this.transform.pitch)<1||r.properties.get("horizon-blend")<.03)return void(this.transform.fogCullDistSq=null);const[n,i]=r.getFovAdjustedRange(this.transform._fov);if(n>i)return void(this.transform.fogCullDistSq=null);const o=n+.78*(i-n);this.transform.fogCullDistSq=o*o}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}get shadowRenderer(){return this._shadowRenderer&&this._shadowRenderer.enabled?this._shadowRenderer:null}get wireframeDebugCache(){return this._wireframeDebugCache}resize(t,e){if(this.width=t*vr.devicePixelRatio,this.height=e*vr.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const t of this.style.order)this.style._mergedLayers[t].resize()}setup(){const t=this.context,r=new Kc;r.emplaceBack(0,0),r.emplaceBack(Li,0),r.emplaceBack(0,Li),r.emplaceBack(Li,Li),this.tileExtentBuffer=t.createVertexBuffer(r,Lv.members),this.tileExtentSegments=Nu.simpleSegment(0,0,4,2);const n=new Kc;n.emplaceBack(0,0),n.emplaceBack(Li,0),n.emplaceBack(0,Li),n.emplaceBack(Li,Li),this.debugBuffer=t.createVertexBuffer(n,Lv.members),this.debugSegments=Nu.simpleSegment(0,0,4,5);const i=new Kc;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(-1,1),i.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(i,Lv.members),this.viewportSegments=Nu.simpleSegment(0,0,4,2);const o=new Qc;o.emplaceBack(0,0,0,0),o.emplaceBack(Li,0,Li,0),o.emplaceBack(0,Li,0,Li),o.emplaceBack(Li,Li,Li,Li),this.mercatorBoundsBuffer=t.createVertexBuffer(o,cC.members),this.mercatorBoundsSegments=Nu.simpleSegment(0,0,4,2);const s=new pu;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(s);const a=new xu;for(const t of[0,1,3,2,0])a.emplaceBack(t);this.debugIndexBuffer=t.createIndexBuffer(a),this.emptyTexture=new YO(t,new vw({width:1,height:1},Uint8Array.of(0,0,0,0)),t.gl.RGBA),this.identityMat=_v.create();const l=this.context.gl;this.stencilClearMode=new oM({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO),this.loadTimeStamps.push(e.performance.now())}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(t){return t._makeTileBoundsBuffers(this.context,this.transform.projection),t._tileBoundsBuffer?{tileBoundsBuffer:t._tileBoundsBuffer,tileBoundsIndexBuffer:t._tileBoundsIndexBuffer,tileBoundsSegments:t._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const t=this.context.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.getOrCreateProgram("clippingMask").draw(this,t.TRIANGLES,rM.disabled,this.stencilClearMode,uM.disabled,mM.disabled,Sj(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(t,e,r){if(!e||this.currentStencilSource===e.id||!t.isTileClipped()||!r||0===r.length)return;if(this._tileClippingMaskIDs&&!this.terrain){let t=!1;for(const e of r)if(void 0===this._tileClippingMaskIDs[e.key]){t=!0;break}if(!t)return}this.currentStencilSource=e.id;const n=this.context,i=n.gl;this.nextStencilID+r.length>256&&this.clearStencil(),n.setColorMode(uM.disabled),n.setDepthMode(rM.disabled);const o=this.getOrCreateProgram("clippingMask");this._tileClippingMaskIDs={};for(const t of r){const r=e.getTile(t),n=this._tileClippingMaskIDs[t.key]=this.nextStencilID++,{tileBoundsBuffer:s,tileBoundsIndexBuffer:a,tileBoundsSegments:l}=this.getTileBoundsBuffers(r);o.draw(this,i.TRIANGLES,rM.disabled,new oM({func:i.ALWAYS,mask:0},n,255,i.KEEP,i.KEEP,i.REPLACE),uM.disabled,mM.disabled,Sj(t.projMatrix),"$clipping",s,a,l)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,e=this.context.gl;return new oM({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)}stencilModeForClipping(t){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(t);const e=this.context.gl;return new oM({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)}stencilConfigForOverlap(t){const e=this.context.gl,r=t.sort(((t,e)=>
2e.overscaledZ-t.overscaledZ)),n=r[r.length-1].overscaledZ,i=r[0].overscaledZ-n+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();const t={};for(let r=0;r<i;r++)t[r+n]=new oM({func:e.GEQUAL,mask:255},r+this.nextStencilID,255,e.KEEP,e.KEEP,e.REPLACE);return this.nextStencilID+=i,[t,r]}return[{[n]:oM.disabled},r]}colorModeForRenderPass(){const t=this.context.gl;if(this._showOverdrawInspector){const e=1/8;return new uM([t.CONSTANT_COLOR,t.ONE,t.CONSTANT_COLOR,t.ONE],new wn(e,e,e,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?uM.unblended:uM.alphaBlended}colorModeForDrapableLayerRenderPass(t){const e=()=>this.style&&this.style.enable3dLights()&&this.terrain&&this.terrain.renderingToTexture,r=this.context.gl;return e()&&"translucent"===this.renderPass?new uM([r.ONE,r.ONE_MINUS_SRC_ALPHA,r.CONSTANT_ALPHA,r.ONE_MINUS_SRC_ALPHA],new wn(0,0,0,void 0===t?0:t),[!0,!0,!0,!0]):this.colorModeForRenderPass()}depthModeForSublayer(t,e,r,n=!1){if(!this.opaquePassEnabledForLayer()&&!n)return rM.disabled;const i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new rM(r||this.context.gl.LEQUAL,e,[i,i])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(t,r){this._wireframeDebugCache.update(this.frameCounter),this.style=t,this.options=r;const n=this.style._mergedLayers,i=this.style.order,o=i.map((t=>n[t])),s=this.style._mergedSourceCaches;this.imageManager=t.imageManager,this.modelManager=t.modelManager,this.symbolFadeChange=t.placement.symbolFadeChange(vr.now()),this.imageManager.beginFrame();let a=0,l=!1;for(const t in s){const e=s[t];e.used&&(e.prepare(this.context),e.getSource().usedInConflation&&++a)}const c={},u={},h={},f={},d={};for(const t in s){const e=s[t];c[t]=e.getVisibleCoordinates(),u[t]=c[t].slice().reverse(),h[t]=e.getVisibleCoordinates(!0).reverse(),f[t]=e.getShadowCasterCoordinates(),d[t]=e.sortCoordinatesByDistance(c[t])}const p=t=>{const e=this.style.getLayerSourceCache(t);return e&&e.used?e.getSource():null};if(a){const t=[];for(const e of o)this.layerUsedInConflation(e,p(e))&&t.push(e);if(t&&t.length>1){const e=[];for(const r of t){const t=this.style.getLayerSourceCache(r);t&&t.used&&t.getSource().usedInConflation&&e.push({layer:r.fqid,cache:t})}this.replacementSource.setSources(e),l=!0}}l||this.replacementSource.clear(),this.conflationActive=l,this.minCutoffZoom=0,this.longestCutoffRange=0;for(const t of o){const e=t.cutoffRange();if(this.longestCutoffRange=Math.max(e,this.longestCutoffRange),e>0){const e=p(t);e&&(this.minCutoffZoom=Math.max(e.minzoom,this.minCutoffZoom)),t.minzoom&&(this.minCutoffZoom=Math.max(t.minzoom,this.minCutoffZoom))}}this.opaquePassCutoff=1/0;for(let t=0;t<o.length;t++)if(o[t].is3D()){this.opaquePassCutoff=t;break}const m=this.style&&this.style.fog;m?(this._fogVisible=0!==m.getOpacity(this.transform.pitch),this._fogVisible&&"globe"!==this.transform.projection.name&&(this._fogVisible=m.isVisibleOnFrustum(this.transform.cameraFrustum))):this._fogVisible=!1,this._cachedTileFogOpacities={},this.terrain&&(this.terrain.updateTileBinding(h),this.opaquePassCutoff=0);const g=this._shadowRenderer;if(g){g.updateShadowParameters(this.transform,this.style.directionalLight);for(const t in s)for(const e of c[t]){let t={min:0,max:0};this.terrain&&(t=this.terrain.getMinMaxForTile(e)||t),g.addShadowReceiver(e.toUnwrapped(),t.min,t.max)}}"globe"!==this.transform.projection.name||this.globeSharedBuffers||(this.globeSharedBuffers=new nx(this.context));for(const e of o){if(e.isHidden(this.transform.zoom))continue;const r=t.getLayerSourceCache(e);this.uploadLayer(this,e,r)}if(this.style.fog&&this.transform.projection.supportsFog?(this._atmosphere||(this._atmosphere=new p$),this._atmosphere.update(this)):this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=void 0),!Fe(this.context.gl))return;this.renderPass="offscreen";for(const e of o){const r=t.getLayerSourceCache(e);if(!e.hasOffscreenPass()||e.isHidden(this.transform.zoom))continue;const n=r?u[r.id]:void 0;("custom"===e.type||"raster"===e.type||e.isSky()||n&&n.length)&&this.renderLayer(this,r,e,n)}this.depthRangeFor3D=[0,1-(o.length+2)*this.numSublayers*this.depthEpsilon];const y=this.terrain;y&&(this.style.hasSymbolLayers()||this.style.hasCircleLayers())&&!this.transform.isOrthographic&&y.drawDepth(),this._shadowRenderer&&(this.renderPass="shadow",this._shadowRenderer.drawShadowPass(this.style,f)),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]);const _="globe"===this.transform.projection.name||this.transform.isH
2orizonVisible(),v=(()=>{if(r.showOverdrawInspector)return wn.black;if(this.style.fog&&this.transform.projection.supportsFog&&!_){const t=this.style.fog.properties.get("color").toArray01();return new wn(...t)}if(this.style.fog&&this.transform.projection.supportsFog&&_){const t=this.style.fog.properties.get("space-color").toArray01();return new wn(...t)}return wn.transparent})();if(this.context.clear({color:v,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.renderPass="opaque",this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&_&&this._atmosphere.drawStars(this,this.style.fog),!this.terrain)for(this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){const e=o[this.currentLayer],r=t.getLayerSourceCache(e);if(e.isSky())continue;const n=r?(e.is3D()?d:u)[r.id]:void 0;this._renderTileClippingMasks(e,r,n),this.renderLayer(this,r,e,n)}if(this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&_&&this._atmosphere.drawAtmosphereGlow(this,this.style.fog),this.renderPass="sky",(!this._atmosphere||Vb(this.transform.zoom)>0)&&("globe"===this.transform.projection.name||this.transform.isHorizonVisible()))for(this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){const e=o[this.currentLayer],r=t.getLayerSourceCache(e);if(!e.isSky())continue;const n=r?u[r.id]:void 0;this.renderLayer(this,r,e,n)}this.renderPass="translucent",this.currentLayer=0,this.firstLightBeamLayer=Number.MAX_SAFE_INTEGER;let b=0;for(g&&(b=g.getShadowCastingLayerCount());this.currentLayer<i.length;){const e=o[this.currentLayer],r=t.getLayerSourceCache(e);if(e.isSky()){++this.currentLayer;continue}if(y&&this.style.isLayerDraped(e)){if(e.isHidden(this.transform.zoom)){++this.currentLayer;continue}this.currentLayer,this.currentLayer=y.renderBatch(this.currentLayer);continue}let n;if(r&&(n=("symbol"===e.type?h:e.is3D()?d:u)[r.id]),this._renderTileClippingMasks(e,r,r?c[r.id]:void 0),this.renderLayer(this,r,e,n),!y&&g&&b>0&&e.hasShadowPass()&&0==--b&&(g.drawGroundShadows(),this.firstLightBeamLayer<=this.currentLayer)){const e=this.currentLayer;for(this.renderPass="light-beam",this.currentLayer=this.firstLightBeamLayer;this.currentLayer<=e;this.currentLayer++){const e=o[this.currentLayer];if(!e.hasLightBeamPass())continue;const r=t.getLayerSourceCache(e),n=r?u[r.id]:void 0;this.renderLayer(this,r,e,n)}this.currentLayer=e,this.renderPass="translucent"}++this.currentLayer}if(this.terrain&&this.terrain.postRender(),this.options.showTileBoundaries||this.options.showQueryGeometry||this.options.showTileAABBs){let e=null;o.forEach((r=>{const n=t.getLayerSourceCache(r);n&&!r.isHidden(this.transform.zoom)&&n.getVisibleCoordinates().length&&(!e||e.getSource().maxzoom<n.getSource().maxzoom)&&(e=n)})),e&&this.options.showTileBoundaries&&z$.debug(this,e,e.getVisibleCoordinates())}this.options.showPadding&&qN(this),this.context.setDefault(),this.frameCounter=(this.frameCounter+1)%Number.MAX_SAFE_INTEGER,this.tileLoaded&&this.options.speedIndexTiming&&(this.loadTimeStamps.push(e.performance.now()),this.saveC
2anvasCopy()),l||(this.conflationActive=!1)}uploadLayer(t,e,r){this.gpuTimingStart(e),(!t.transform.projection.unsupportedLayers||!t.transform.projection.unsupportedLayers.includes(e.type)||t.terrain&&"custom"===e.type)&&B$[`${e.type}Upload`]&&B$[`${e.type}Upload`](t,r,e.scope),this.gpuTimingEnd()}renderLayer(t,e,r,n){r.isHidden(this.transform.zoom)||("background"===r.type||"sky"===r.type||"custom"===r.type||"model"===r.type||"raster"===r.type||n&&n.length)&&(this.id=r.id,this.gpuTimingStart(r),(!t.transform.projection.unsupportedLayers||!t.transform.projection.unsupportedLayers.includes(r.type)||t.terrain&&"custom"===r.type)&&z$[r.type](t,e,r,n,this.style.placement.variableOffsets,this.options.isInitialLoad),this.gpuTimingEnd())}gpuTimingStart(t){if(!this.options.gpuTiming)return;const e=this.context.extTimerQuery,r=this.context.gl;let n=this.gpuTimers[t.id];n||(n=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:r.createQuery()}),n.calls++,r.beginQuery(e.TIME_ELAPSED_EXT,n.query)}gpuTimingDeferredRenderStart(){if(this.options.gpuTimingDeferredRender){const t=this.context.extTimerQuery,e=this.context.gl,r=e.createQuery();this.deferredRenderGpuTimeQueries.push(r),e.beginQuery(t.TIME_ELAPSED_EXT,r)}}gpuTimingDeferredRenderEnd(){if(!this.options.gpuTimingDeferredRender)return;const t=this.context.extTimerQuery;this.context.gl.endQuery(t.TIME_ELAPSED_EXT)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const t=this.context.extTimerQuery;this.context.gl.endQuery(t.TIME_ELAPSED_EXT)}collectGpuTimers(){const t=this.gpuTimers;return this.gpuTimers={},t}collectDeferredRenderGpuQueries(){const t=this.deferredRenderGpuTimeQueries;return this.deferredRenderGpuTimeQueries=[],t}queryGpuTimers(t){const e={};for(const r in t){const n=t[r],i=this.context.extTimerQuery,o=this.context.gl,s=i.getQueryParameter(n.query,o.QUERY_RESULT)/1e6;i.deleteQueryEXT(n.query),e[r]=s}return e}queryGpuTimeDeferredRender(t){if(!this.options.gpuTimingDeferredRender)return 0;const e=this.context.extTimerQuery,r=this.context.gl;let n=0;for(const i of t)n+=e.getQueryParameter(i,r.QUERY_RESULT)/1e6,e.deleteQueryEXT(i);return n}translatePosMatrix(t,e,r,n,i){if(!r[0]&&!r[1])return t;const o=i?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(o){const t=Math.sin(o),e=Math.cos(o);r=[r[0]*e-r[1]*t,r[0]*t+r[1]*e]}const s=[i?r[0]:VM(e,r[0],this.transform.zoom),i?r[1]:VM(e,r[1],this.transform.zoom),0],a=new Float32Array(16);return _v.translate(a,t,s),a}saveTileTexture(t){const e=t.size[0],r=this._tileTextures[e];r?r.push(t):this._tileTextures[e]=[t]}getTileTexture(t){const e=this._tileTextures[t];return e&&e.length>0?e.pop():null}isPatternMissing(t,e){return null===t||void 0!==t&&!this.imageManager.getPattern(t.toString(),e)}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}linearFloatFilteringSupported(){return null!=this.context.extTextureFloatLinear}currentGlobalDefines(t,e,r){const n=void 0===r?this.terrain&&this.terrain.renderingToTexture:r,i=this.terrain&&0===this.terrain.exaggeration(),o=[];return this.style&&this.style.enable3dLights()&&("globeRaster"===t||"terrainRaster"===t?(o.push("LIGHTING_3D_MODE"),o.push("LIGHTING_3D_ALPHA_EMISSIVENESS")):n||o.push("LIGHTING_3D_MODE")),"shadow"===this.renderPass?this._shadowMapDebug||o.push("DEPTH_TEXTURE"):this.shadowRenderer&&(this.shadowRenderer.useNormalOffset?o.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"):o.push("RENDER_SHADOWS","DEPTH_TEXTURE")),this.terrainRenderModeElevated()&&(o.push("TERRAIN"),this.linearFloatFilteringSupported()&&o.push("TERRAIN_DEM_FLOAT_FORMAT"),i&&o.push("ZERO_EXAGGERATION")),"globe"===this.transform.projection.name&&o.push("GLOBE"),!this._fogVisible||n||void 0!==e&&!e||o.push("FOG","FOG_DITHERING"),n&&o.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&o.push("OVERDRAW_INSPECTOR"),o}getOrCreateProgram(t,e){this.cache=this.cache||{};const r=e&&e.defines||[],n=e&&e.config,i=e&&e.overrideFog,o=e&&e.overrideRtt,s=this.currentGlobalDefines(t,i,o).concat(r),a=Zj.cacheKey(GB[t],t,s,n);return this.cache[a]||(this.cache[a]=new Zj(this.context,t,GB[t],n,iN[t],s)),this.cache[a]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const t=this.context.gl;this.debugOverlayTexture=new YO(this.context,this.debugOverlayCanvas,t.RGBA)}}destroy(){this._terrain&&this._terrain.destroy(),this._atmosphere&&(this._atmosphere.de
2stroy(),this._atmosphere=void 0),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this._wireframeDebugCache.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}uploadCommonLightUniforms(t,e){if(this.style.enable3dLights()){const r=this.style.directionalLight,n=this.style.ambientLight;if(r&&n){const i=Vj(r,n);e.setLightsUniformValues(t,i)}}}uploadCommonUniforms(t,e,r,n,i){if(this.uploadCommonLightUniforms(t,e),this.terrain&&this.terrain.renderingToTexture)return;const o=this.style.fog;if(o){const i=o.getOpacity(this.transform.pitch),s=Fj(this,o,r,i,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*vr.devicePixelRatio,this.transform.height*vr.devicePixelRatio],n);e.setFogUniformValues(t,s)}i&&e.setCutoffUniformValues(t,i.uniformValues)}setTileLoadedFlag(t){this.tileLoaded=t}saveCanvasCopy(){const t=this.canvasCopy();t&&(this.frameCopies.push(t),this.tileLoaded=!1)}canvasCopy(){const t=this.context.gl,e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.copyTexImage2D(t.TEXTURE_2D,0,t.RGBA,0,0,t.drawingBufferWidth,t.drawingBufferHeight,0),e}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const t=this.style&&this.style.fog;return!!t&&0!==t.getOpacity(this.transform.pitch)}getBackgroundTiles(){const t=this._backgroundTiles,e=this._backgroundTiles={},r=512,n=this.transform.coveringTiles({tileSize:r});for(const i of n)e[i.key]=t[i.key]||new fC(i,r,this.transform.tileZoom,this);return e}clearBackgroundTiles(){this._backgroundTiles={}}layerUsedInConflation(t,e){return!(!t.is3D()||t.minzoom&&t.minzoom>this.transform.zoom||"building"!==t.sourceLayer&&(!e||"batched-model"!==e.type))}isTileAffectedByFog(t){if(!this.style||!this.style.fog)return!1;if("globe"===this.transform.projection.name)return!0;let e=this._cachedTileFogOpacities[t.key];return e||(this._cachedTileFogOpacities[t.key]=e=this.style.fog.getOpacityForTile(t)),e[0]>=rL||e[1]>=rL}}const F$=2,N$=2048;class $${constructor(t,e){this.aabb=t,this.lastCascade=e}}class U${add(t,e){const r=this.receivers[t.key];void 0!==r?(r.aabb.min[0]=Math.min(r.aabb.min[0],e.min[0]),r.aabb.min[1]=Math.min(r.aabb.min[1],e.min[1]),r.aabb.min[2]=Math.min(r.aabb.min[2],e.min[2]),r.aabb.max[0]=Math.max(r.aabb.max[0],e.max[0]),r.aabb.max[1]=Math.max(r.aabb.max[1],e.max[1]),r.aabb.max[2]=Math.max(r.aabb.max[2],e.max[2])):this.receivers[t.key]=new $$(e,null)}clear(){this.receivers={}}get(t){return this.receivers[t.key]}computeRequiredCascades(t,e,r){const n=nb.fromPoints(t.points);let i=0;for(const t in this.receivers){const o=this.receivers[t];if(!o)continue;if(!n.intersectsAabb(o.aabb))continue;o.aabb.min=n.closestPoint(o.aabb.min),o.aabb.max=n.closestPoint(o.aabb.max);const s=o.aabb.getCorners();for(let t=0;t<r.length;t++){let n=!0;for(const i of s){const o=[i[0]*e,i[1]*e,i[2]];if(Sv.transformMat4(o,o,r[t].matrix),o[0]<-1||o[0]>1||o[1]<-1||o[1]>1){n=!1;break}}if(o.lastCascade=t,i=Math.max(i,t),n)break}}return i+1}}class V${constructor(t){this.painter=t,this._enabled=!1,this._shadowLayerCount=0,this._numCascadesToRender=0,this._cascades=[],this._groundShadowTiles=[],this._receivers=new U$,this._depthMode=new rM(t.context.gl.LEQUAL,rM.ReadWrite,[0,1]),this._uniformValues=qj(),this.useNormalOffset=!1}destroy(){for(const t of this._cascades)t.texture.destroy(),t.framebuffer.destroy();this._cascades=[]}updateShadowParameters(t,e){const r=this.painter;if(this._enabled=!1,this._shadowLayerCount=0,this._receivers.clear(),!e||!e.properties)return;const n=e.properties.get("shadow-intensity");if(!e.shadowsEnabled()||n<=0)return;if(this._shadowLayerCount=r.style.order.reduce(((e,n)=>{const i=r.style._mergedLayers[n];return e+(i.hasShadowPass()&&!i.isHidden(t.zoom)?1:0)}),0),this._enabled=this._shadowLayerCount>0,!this._enabled)return;const i=r.context,o=N$,s=N$;if(0===this._cascades.length)for(let t=0;t<F$;++t){const t=r._shadowMapDebug,e=i.gl,n=i.createFramebuffer(o,s,t,"texture"),a=new YO(i,{width:o,height:s,data:null},e.DEPTH_COMPONENT);if(n.depthAttachment.set(a.texture),t){const t=new YO(i,{width:o,height:s,data:null},e.RGBA);n.colorAttachment.set(t.texture)}this._cascades.push({framebuffer:n,texture:a,matrix:[],far:0,boundingSphereRadius:0,frustum:new rb,scale:0})}this.shadowDirection=H$(e);let a=0;if(t.elevation){const e=t.elevation,r=[1e4,-1e4];e.visibleDemTiles.filter((t=>
2t.dem)).forEach((t=>{const e=t.dem.tree;r[0]=Math.min(r[0],e.minimums[0]),r[1]=Math.max(r[1],e.maximums[0])})),1e4!==r[0]&&(a=(r[1]-r[0])*e.exaggeration())}const l=1.5*t.cameraToCenterDistance,c=3*l,u=new Float64Array(16);for(let e=0;e<F$;++e){const r=this._cascades[e];let n=t.height/50,i=1;0===e?i=l:(n=l,i=c);const[o,s]=Z$(t,this.shadowDirection,n,i,N$,a);r.scale=t.scale,r.matrix=o,r.boundingSphereRadius=s,_v.invert(u,r.matrix),r.frustum=rb.fromInvProjectionMatrix(u,1,0,!0),r.far=i}this._uniformValues.u_fade_range=[.75*this._cascades[1].far,this._cascades[1].far],this._uniformValues.u_shadow_intensity=n,this._uniformValues.u_shadow_direction=[this.shadowDirection[0],this.shadowDirection[1],this.shadowDirection[2]],this._uniformValues.u_shadow_texel_size=1/N$,this._uniformValues.u_shadow_map_resolution=N$,this._uniformValues.u_shadowmap_0=YF.ShadowMap0,this._uniformValues.u_shadowmap_1=YF.ShadowMap0+1;const h={tileSize:512,renderWorldCopies:!0};this._groundShadowTiles=r.transform.coveringTiles(h);const f=r.transform.elevation;for(const t of this._groundShadowTiles){let e={min:0,max:0};if(f){const r=f.getMinMaxForTile(t);r&&(e=r)}this.addShadowReceiver(t.toUnwrapped(),e.min,e.max)}}get enabled(){return this._enabled}set enabled(t){this._enabled=t}drawShadowPass(t,e){if(!this._enabled)return;const r=this.painter,n=r.context;this._numCascadesToRender=this._receivers.computeRequiredCascades(r.transform.getFrustum(0),r.transform.worldSize,this._cascades),n.viewport.set([0,0,N$,N$]);for(let i=0;i<this._numCascadesToRender;++i){r.currentShadowCascade=i,n.bindFramebuffer.set(this._cascades[i].framebuffer.framebuffer),n.clear({color:wn.white,depth:1});for(const n of t.order){const i=t._mergedLayers[n];if(!i.hasShadowPass()||i.isHidden(r.transform.zoom))continue;const o=t.getLayerSourceCache(i),s=o?e[o.id]:void 0;("model"===i.type||s&&s.length)&&r.renderLayer(r,o,i,s)}}r.currentShadowCascade=0}drawGroundShadows(){if(!this._enabled)return;const t=this.painter,e=t.style,r=t.context,n=e.directionalLight,i=e.ambientLight;if(!n||!i)return;const o=[],s=uj(t,t.longestCutoffRange);s.shouldRenderCutoff&&o.push("RENDER_CUTOFF");const a=W$(n,i),l=new rM(r.gl.LEQUAL,rM.ReadOnly,t.depthRangeFor3D);for(const e of this._groundShadowTiles){const n=e.toUnwrapped(),i=t.isTileAffectedByFog(e),c=t.getOrCreateProgram("groundShadow",{defines:o,overrideFog:i});this.setupShadows(n,c),t.uploadCommonUniforms(r,c,n,null,s);const u=rN(t.transform.calculateProjMatrix(n),a);c.draw(t,r.gl.TRIANGLES,l,oM.disabled,uM.multiply,mM.disabled,u,"ground_shadow",t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments,{},t.transform.zoom,null,null)}}getShadowPassColorMode(){return this.painter._shadowMapDebug?uM.unblended:uM.disabled}getShadowPassDepthMode(){return this._depthMode}getShadowCastingLayerCount(){return this._shadowLayerCount}calculateShadowPassMatrixFromTile(t){const e=this.painter.transform,r=e.calculatePosMatrix(t,e.worldSize),n=this._cascades[this.painter.currentShadowCascade].matrix;return _v.multiply(r,n,r),Float32Array.from(r)}calculateShadowPassMatrixFromMatrix(t){const e=this._cascades[this.painter.currentShadowCascade].matrix;return _v.multiply(t,e,t),Float32Array.from(t)}setupShadows(t,e,r,n=0){if(!this._enabled)return;const i=this.painter.transform,o=this.painter.context,s=o.gl,a=this._uniformValues,l=new Float64Array(16),c=i.calculatePosMatrix(t,i.worldSize);for(let t=0;t<F$;t++)_v.multiply(l,this._cascades[t].matrix,c),a[0===t?"u_light_matrix_0":"u_light_matrix_1"]=Float32Array.from(l),o.activeTexture.set(s.TEXTURE0+YF.ShadowMap0+t),this._cascades[t].texture.bind(s.NEAREST,s.CLAMP_TO_EDGE);if(this.useNormalOffset=!!r,this.useNormalOffset){const e=xx(t.canonical),o=2/i.tileSize*Li/N$,s=o*this._cascades[0].boundingSphereRadius,l=o*this._cascades[1].boundingSphereRadius,c=("vector-tile"===r?1:3)/Math.pow(2,n-t.canonical.z-(1-i.zoom+Math.floor(i.zoom))),u=s*c,h=l*c;a.u_shadow_normal_offset=[e,u,h],a.u_shadow_bias=[6e-5,.0012,.012]}else a.u_shadow_bias=[36e-5,.0012,.012];e.setShadowUniformValues(o,a)}setupShadowsFromMatrix(t,e,r=!1){if(!this._enabled)return;const n=this.painter.context,i=n.gl,o=this._uniformValues,s=new Float64Array(16);for(let e=0;e<F$;e++)_v.multiply(s,this._cascades[e].matrix,t),o[0===e?"u_light_matrix_0":"u_light_matrix_1"]=Float32Array.from(s),n.activeTexture.set(i.TEXTURE0+YF.ShadowMap0+e),this._cascades[e].texture.bind(i.NEAREST,i.CLAMP_TO_EDGE);if(this.useNormalOffset=r,r){const t=5;o.u_shadow_normal_offset=[1,t,t],o.u_shadow_bias=[6e-5,.0012,.012]}else o.u_shadow_bias=[36e-5,.0012,.012];e.setShadowUniformValues(n,o)}getShadowUniformValues(){return this._uniformValues}getCurrentCascadeFrustum(){return this._cascades[this.painter.currentShadowCascade].frustum}computeSimplifiedTileShadowVolume(t,e,r,n){if(n[2]>=0)return{};const i=G$(t,e,r).getCorners(),o=e/-n[2];n[0]<0?(Sv.add(i[0],i[0],[n[0]*o,0,0]),Sv.add(i[3],i[3],[n[0]*o,0,0])):n[0]>0&&(Sv.add(i[1],i[1],[n[0]*o,0,0]),Sv.add(i[2],i[2],[n[0]*o,0,0])),n[1]<0?(Sv.add(i[0],i[0],[0,n[1]*o,0]),Sv.add(i[1],i[1],[0,n[1]*o,0])):n[1]>0&&(Sv.add(i[2],i[2],[0,n[1]*o,0]),Sv.add(i[3],i[3],[0,n[1]*o,0]));const s={};return s.vertices=i,s.planes=[q$(i[1],i[0],i[4]),q$(i[2],i[1],i[5]),q$(i[3],i[2],i[6]),q$(i[0],i[3],i[7])],s}addShadowReceiver(t,e,r){this._receivers.add(t,nb.fromTileIdAndHeight(t,e,r))}getMaxCascadeForTile(t){const e=this._receivers.get(t);return e&&e.lastCascade?e.lastCascade:0}}function G$(t,e,r){const n=r/(1<<t.canonical.z),i=t.canonical.x*n+t.wrap*r,o=(t.canonical.x+1)*n+t.wrap*r,s=t.canonical.y*n+t.wrap*r,a=(t.canonical.y+1)*n+t.wrap*r;return new nb([i,s,0],[o,a,e])}function q$(t,e,r){const n=Sv.sub([],r,e),i=Sv.sub([],t,e),o=Sv.cross([],n,i),s=Sv.length(o);
2return 0===s?[0,0,1,0]:(Sv.scale(o,o,1/s),[o[0],o[1],o[2],-Sv.dot(o,e)])}function H$(t){const e=t.properties.get("direction"),r=ct(e.x,e.y,e.z),n=75;r[2]=D(r[2],0,n);const i=at([r[0],r[1],r[2]]);return Sv.fromValues(i.x,i.y,i.z)}function W$(t,e){const r=t.properties.get("color"),n=t.properties.get("intensity"),i=t.properties.get("direction"),o=[i.x,i.y,i.z],s=e.properties.get("color"),a=e.properties.get("intensity"),l=[0,0,1],c=Math.max(Sv.dot(l,o),0),u=[0,0,0];Sv.scale(u,s.toArray01Linear().slice(0,3),a);const h=[0,0,0];return Sv.scale(h,r.toArray01Linear().slice(0,3),c*n),Et([u[0]>0?u[0]/(u[0]+h[0]):0,u[1]>0?u[1]/(u[1]+h[1]):0,u[2]>0?u[2]/(u[2]+h[2]):0])}function Z$(t,e,r,n,i,o){const s=t.zoom,a=t.scale,l=t.worldSize,c=1/l,u=t.aspect,h=Math.sqrt(1+u*u)*Math.tan(.5*t.fovX),f=h*h,d=n-r,p=n+r;let m,g;f>d/p?(m=n,g=n*h):(m=.5*p*(1+f),g=.5*Math.sqrt(d*d+2*(n*n+r*r)*f+p*p*f*f));const y=t.projection.pixelsPerMeter(t.center.lat,l),_=t._camera.getCameraToWorldMercator(),v=[0,0,-m*c];Sv.transformMat4(v,v,_);let b=g*c;const x=function(e){return e[0]/=a,e[1]/=a,e[2]=dx(e[2],t._center.lat),e},w=t._edgeInsets;if(!(0===w.left&&0===w.top&&0===w.right&&0===w.bottom||w.left===w.right&&w.top===w.bottom)){const e="meters"===t.projection.zAxisUnit?y:1,i=t._camera.getWorldToCamera(t.worldSize,e),o=t._camera.getCameraToClipPerspective(t._fov,t.width/t.height,r,n);o[8]=2*-t.centerOffset.x/t.width,o[9]=2*t.centerOffset.y/t.height;const a=new Float64Array(16);_v.mul(a,o,i);const c=new Float64Array(16);_v.invert(c,a);const u=rb.fromInvProjectionMatrix(c,l,s,!0);for(const t of u.points){const e=x(t);b=Math.max(b,Sv.len(Sv.subtract([],v,e)))}}b*=i/(i-1);const E=Math.acos(e[2]),S=Math.atan2(-e[0],-e[1]),T=new RM;T.position=v,T.setPitchBearing(E,S);const A=T.getWorldToCamera(l,y),O=b*l,C=Math.min(t._mercatorZfromZoom(17)*l*-2,-2*O),M=(O+o*y)/e[2],k=T.getCameraToClipOrthographic(-O,O,-O,O,C,M),I=new Float64Array(16);_v.multiply(I,k,A);const P=Sv.fromValues(Math.floor(1e6*v[0])/1e6*l,Math.floor(1e6*v[1])/1e6*l,0),L=.5*i,R=[0,0,0];Sv.transformMat4(R,P,I),Sv.scale(R,R,L);const D=[Math.floor(R[0]),Math.floor(R[1]),Math.floor(R[2])],z=[0,0,0];Sv.sub(z,R,D),Sv.scale(z,z,-1/L);const B=new Float64Array(16);return _v.identity(B),_v.translate(B,B,z),_v.multiply(I,B,I),[I,O]}class X$ extends Br{constructor(t){super(),this.requestManager=t,this.models={"":{}},this.numModelsLoading={}}loadModel(t,e){return AR(this.requestManager.transformRequest(e,Vt.Model).url).then((e=>{if(!e)return;const r=$R(e),n=new kk(t,void 0,void 0,r);return n.computeBoundsAndApplyParent(),n})).catch((r=>{this.fire(new zr(new Error(`Could not load model ${t} from ${e}: ${r.message}`)))}))}load(t,e){this.models[e]||(this.models[e]={});const r=Object.keys(t);this.numModelsLoading[e]=(this.numModelsLoading[e]||0)+r.length;const n=[];for(const e of r)n.push(this.loadModel(e,t[e]));Promise.allSettled(n).then((t=>{for(let n=0;n<t.length;n++){const{status:i,value:o}=t[n];"fulfilled"===i&&o&&(this.models[e][r[n]]=o)}this.numModelsLoading[e]-=r.length,this.fire(new Dr("data",{dataType:"style"}))})).catch((t=>{this.fire(new zr(new Error(`Could not load models: ${t.message}`)))}))}isLoaded(){for(const t in this.numModelsLoading)if(this.numModelsLoading[t]>0)return!1;return!0}hasModel(t,e){return!!this.getModel(t,e)}getModel(t,e){return this.models[e]||(this.models[e]={}),this.models[e][t]}addModel(t,e,r){this.models[r]||(this.models[r]={}),this.hasModel(t,r)&&this.removeModel(t,r),this.load({[t]:this.requestManager.normalizeModelURL(e)},r)}addModels(t,e){const r={};for(const e in t)r[e]=this.requestManager.normalizeModelURL(t[e]);this.load(r,e)}removeModel(t,e){this.models[e]||(this.models[e]={});const r=this.models[e][t];delete this.models[e][t],r.destroy()}listModels(t){return this.models[t]||(this.models[t]={}),Object.keys(this.models[t])}upload(t,e){this.models[e]||(this.models[e]={});for(const r in this.models[e])this.models[e][r].upload(t.context)}}const Y$=(t,e)=>Bl(t,e&&e.filter((t=>"source.canvas"!==t.identifier))),K$=V(cD,["addLayer","removeLayer","setLights","setPaintProperty","setLayoutProperty","setSlot","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection","setCamera","addImport","removeImport","setImportUrl","setImportData","setImportConfig"]),J$=V(cD,["setCenter","setZoom","setBearing","setP
2itch"]),Q$=lD(),tU=5,eU={duration:300,delay:0},rU=new Set(["fill","line","background","hillshade","raster"]);class nU extends Br{constructor(t,e={}){super(),this.map=t,this.scope=e.scope||"",this.fragments=[],this.importDepth=e.importDepth||0,this.importsCache=e.importsCache||new Map,this.resolvedImports=e.resolvedImports||new Set,this.transition=U({},eU),this._buildingIndex=new iD(this),this.crossTileSymbolIndex=new cz,this._mergedOrder=[],this._drapedFirstOrder=[],this._mergedLayers={},this._mergedSourceCaches={},this._mergedOtherSourceCaches={},this._mergedSymbolSourceCaches={},this._has3DLayers=!1,this._hasCircleLayers=!1,this._hasSymbolLayers=!1,this._changes=e.styleChanges||new Uc,e.dispatcher?this.dispatcher=e.dispatcher:this.dispatcher=new mL(YL(),this),e.imageManager?this.imageManager=e.imageManager:(this.imageManager=new WP,this.imageManager.setEventedParent(this)),this.imageManager.createScope(this.scope),e.glyphManager?this.glyphManager=e.glyphManager:this.glyphManager=new mA(t._requestManager,e.localFontFamily?pA.all:e.localIdeographFontFamily?pA.ideographs:pA.none,e.localFontFamily||e.localIdeographFontFamily),e.modelManager?this.modelManager=e.modelManager:(this.modelManager=new X$(t._requestManager),this.modelManager.setEventedParent(this)),this._layers={},this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._precompileDone=!1,this._shouldPrecompile=!1,this._availableImages=[],this._order=[],this._markersNeedUpdate=!1,this.options=new Map,this._configDependentLayers=new Set,this._config=e.config,this.dispatcher.broadcast("setReferrer",qt());const r=this;this._rtlTextPluginCallback=nU.registerForPluginStateChange((t=>{const e={pluginStatus:t.pluginStatus,pluginURL:t.pluginURL};r.dispatcher.broadcast("syncRTLPluginState",e,((t,e)=>{if(hc(t),e&&e.every((t=>t)))for(const t in r._sourceCaches){const e=r._sourceCaches[t],n=e.getSource().type;"vector"!==n&&"geojson"!==n||e.reload()}}))})),this.on("data",(t=>{if("source"!==t.dataType||"metadata"!==t.sourceDataType)return;const e=this.getOwnSource(t.sourceId);if(e&&e.vectorLayerIds)for(const t in this._layers){const r=this._layers[t];r.source===e.id&&this._validateLayer(r)}}
2))}loadURL(t,e={}){this.fire(new Dr("dataloading",{dataType:"style"}));const r="boolean"==typeof e.validate?e.validate:!ue(t);t=this.map._requestManager.normalizeStyleURL(t,e.accessToken),this.resolvedImports.add(t);const n=this.importsCache.get(t);if(n)return this._load(n,r);const i=this.map._requestManager.transformRequest(t,Vt.Style);this._request=Yt(i,((e,n)=>{if(this._request=null,e)this.fire(new zr(e));else if(n)return this.importsCache.set(t,n),this._load(n,r)}))}loadJSON(t,e={}){this.fire(new Dr("dataloading",{dataType:"style"})),this._request=vr.frame((()=>{this._request=null,this._load(t,!1!==e.validate)}))}loadEmpty(){this.fire(new Dr("dataloading",{dataType:"style"})),this._load(Q$,!1)}_loadImports(t,e){if(this.importDepth>=tU-1)return it(`Style doesn't support nesting deeper than ${tU}`),Promise.resolve();const r=[];for(const n of t){const t=this._createFragmentStyle(n),i=new Promise((e=>{t.once("style.import.load",e),t.once("error",e)})).then((()=>this.mergeAll()));if(r.push(i),this.resolvedImports.has(n.url)){t.loadEmpty();continue}const o=n.data||this.importsCache.get(n.url);o?t.loadJSON(o,{validate:e}):n.url?t.loadURL(n.url,{validate:e}):t.loadEmpty();const s={style:t,id:n.id,config:n.config};this.fragments.push(s)}return Promise.allSettled(r)}_createFragmentStyle(t){const e=this.scope?Bc(t.id,this.scope):t.id,r=new nU(this.map,{scope:e,styleChanges:this._changes,importDepth:this.importDepth+1,importsCache:this.importsCache,resolvedImports:new Set(this.resolvedImports),dispatcher:this.dispatcher,imageManager:this.imageManager,glyphManager:this.glyphManager,modelManager:this.modelManager,config:t.config});return r.setEventedParent(this.map,{style:r}),r}_reloadImports(){this.mergeAll(),this._updateMapProjection(),this.map._triggerCameraUpdate(this.camera),this.dispatcher.broadcast("setLayers",{layers:this._serializeLayers(this._order),scope:this.scope,options:this.options});const t=this.isRootStyle();this._shouldPrecompile=t,this.fire(new Dr(t?"style.load":"style.import.load"))}_load(t,e){const r=t.schema;if(this.isRootStyle()&&(t.fragment||r&&!1!==t.fragment)){const r=U({},Q$,{imports:[{id:"basemap",data:t,url:""}]});return void this._load(r,e)}if(this.setConfig(this._config,r),e&&Y$(this,Tl(t)))return;this._loaded=!0,this.stylesheet=tt(t);for(const e in t.sources)this.addSource(e,t.sources[e],{validate:!1,isInitialLoad:!0});t.sprite?this._loadSprite(t.sprite):(this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0})),this.glyphManager.setURL(t.glyphs,this.scope);const n=aD(this.stylesheet.layers);if(this._order=n.map((t=>t.id)),this.stylesheet.light&&it("The `light` root property is deprecated, prefer using `lights` with `flat` light type instead."),this.stylesheet.lights)if(1===this.stylesheet.lights.length&&"flat"===this.stylesheet.lights[0].type){const t=this.stylesheet.lights[0];this.light=new XP(t.properties,t.id)}else this.setLights(this.stylesheet.lights);this.light||(this.light=new XP(this.stylesheet.light)),this._layers={},this._serializedLayers={};for(const t of n){const e=VP(t,this.options);e.setScope(this.scope),e.isConfigDependent&&this._configDependentLayers.add(e.fqid),e.setEventedParent(this,{layer:{id:e.id}}),this._layers[e.id]=e,this._serializedLayers[e.id]=e.serialize();const r=this.getOwnLayerSourceCache(e),n=!!this.directionalLight&&this.directionalLight.shadowsEnabled();r&&e.canCastShadows()&&n&&(r.castsShadows=!0)}this.stylesheet.models&&this.modelManager.addModels(this.stylesheet.models,this.scope);const i=this.stylesheet.terrain;i&&(void 0===this.disableElevatedTerrain&&(this.disableElevatedTerrain=vr.hasCanvasFingerprintNoise()),this.disableElevatedTerrain?it("Terrain and hillshade are disabled because of Canvas2D limitations when fingerprinting protection is enabled (e.g. in private browsing mode)."):this.terrainSetForDrapingOnly()||this._createTerrain(i,YP.elevated)),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this.stylesheet.transition&&this.setTransition(this.stylesheet.transition),this.fire(new Dr("data",{dataType:"style"})),t.imports?this._loadImports(t.imports,e).then((()=>this._reloadImports())):this._reloadImports()}isRootStyle(){return 0===this.importDepth}mergeAll(){let t,e,r,n,i,o,s,a;this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle((l=>{if(l.stylesheet){if(null!=l.light&&(t=l.light),l.stylesheet.lights)for(const t of l.stylesheet.lights)"ambient"===t.type&&null!=l.ambientLight&&(e=l.ambientLight),"directional"===t.type&&null!=l.directionalLight&&(r=l.directionalLight);n=this._prioritizeTerrain(n,l.terrain,l.stylesheet.terrain),l.stylesheet.fog&&null!=l.fog&&(i=l.fog),null!=l.stylesheet.camera&&(a=l.stylesheet.camera),null!=l.stylesheet.projection&&(o=l.stylesheet.projection),null!=l.stylesheet.transition&&(s=l.stylesheet.transition)}})),this.light=t,this.ambientLight=e,this.directionalLight=r,this.fog=i,null===n?delete this.terrain:this.terrain=n,this.camera=a||{"camera-projection":"perspective"},this.projection=o||{name:"mercator"},this.transition=U({},eU,s),this.mergeSources(),this.mergeLayers()}forEachFragmentStyle(t){const e=r=>{for(const t of r.fragments)e(t.style);t(r)};e(this)}_prioritizeTerrain(t,e,r){const n=t&&t.drapeRenderMode===YP.deferred,i=e&&e.drapeRenderMode===YP.deferred;if(null===r)return i?e:n?t:null;if(null!=e){const r=e&&e.drapeRenderMode===YP.elevated;if(!t||n||r)return e}return t}mergeTerrain(){let t;this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle((e=>{t=this._prioritizeTerrain(t,e.terrain,e.stylesheet.terrain)})),null===t?delete this.terrain:this.terrain=t}mergeProjection(){let t;this.forEachFragmentStyle((e=>{null!=e.stylesheet.projection&&(t=e.stylesheet.projection)})),this.projection=t||{name:"mercator"}}mergeSources(){const t={},e={},r={};this.forEachFragmentStyle((n=>{for(const e in n._sourceCaches){const r=Bc(e,n.scope);t[r]=n._sourceCaches[e]}for(const t in n._otherSourceCaches){const r=Bc(t,n.scope);e[r]=n._otherSourceCaches[t]}for(const t in n._symbolSourceCaches){const e=Bc(t,n.scope);r[e]=n._symbolSourceCaches[t]}})),this._mergedSourceCaches=t,this._mergedOtherSourceCaches=e,this._mergedSymbolSourceCaches=r}mergeLayers(){const t={},e=[],r={};this._has3DLayers=!1,this._hasCircleLayers=!1,this._hasSymbolLayers=!1,this.forEachFragmentStyle((r=>{for(const n of r._order){const i=r._layers[n];if("slot"===i.type){const e=jc(n);if(t[e])continue;t[e]=[]}i.slot&&t[i.slot]?t[i.slot].push(i):e.push(i)}})),this._mergedOrder=[];const n=(e=[])=>{for(const i of e)if("slot"===i.type){const e=jc(i.id);t[e]&&n(t[e])}else{const t=Bc(i.id,i.scope);this._mergedOrder.push(t),r[t]=i,i.is3D()&&(this._has3DLayers=!0),"circle"===i.type&&(this._hasCircleLayers=!0),"symbol"===i.type&&(this._hasSymbolLayers=!0)}};n(e),this._mergedLayers=r,this.updateDrapeFirstLayers(),this._buildingIndex.processLayersChanged()}terrainSetForDrapingOnly(){return!!this.terrain&&this.terrain.drapeRenderMode===YP.deferred}getCamera(){return this.stylesheet.camera}setCamera(t){return this.stylesheet.camera=U({},this.stylesheet.camera,t),this.camera=this.stylesheet.camera,this}setProjection(t){t?this.stylesheet.projection=t:delete this.stylesheet.projection,this.mergeProjection(),this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.isRootStyle()&&(this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.projection))}_loadSprite(t){this._spriteRequest=GP(t,this.map._requestManager,((t,e)=>{if(this._spriteRequest=null,t)this.fire(new zr(t));else if(e)for(const t in e)this.imageManager.addImage(t,this.scope,e[t]);this.imageManager.setLoaded(!0,this.scope),this._availableImages=this.imageManager.listImages(this.scope),this.dispatcher.broadcast("setImages",{scope:this.scope,images:this._availableImages}),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new Dr("data",{dataType:"style"}))}))}_validateLayer(t){const e=this.getOwnSource(t.source);if(!e)return;const r=t.sourceLayer;r&&("geojson"===e.type||e.vectorLayerIds&&-1===e.vectorLayerIds.indexOf(r))&&this.fire(new zr(new Error(`Source layer "${r}" does not exist on source "${e.id}" as specified by style layer "${t.id}"`)))}loaded(){if(!this._loaded)return!1;
2if(Object.keys(this._changes.getUpdatedSourceCaches()).length)return!1;for(const t in this._sourceCaches)if(!this._sourceCaches[t].loaded())return!1;if(!this.imageManager.isLoaded())return!1;if(!this.modelManager.isLoaded())return!1;for(const{style:t}of this.fragments)if(!t.loaded())return!1;return!0}_serializeImports(){if(this.stylesheet.imports)return this.stylesheet.imports.map(((t,e)=>{const r=this.fragments[e];return r&&r.style&&(t.data=r.style.serialize()),t}))}_serializeSources(){const t={};for(const e in this._sourceCaches){const r=this._sourceCaches[e].getSource();t[r.id]||(t[r.id]=r.serialize())}return t}_serializeLayers(t){const e=[];for(const r of t){const t=this._layers[r];t&&"custom"!==t.type&&e.push(t.serialize())}return e}hasLightTransitions(){return!(!this.light||!this.light.hasTransition())||!(!this.ambientLight||!this.ambientLight.hasTransition())||!(!this.directionalLight||!this.directionalLight.hasTransition())}hasFogTransition(){return!!this.fog&&this.fog.hasTransition()}hasTransitions(){if(this.hasLightTransitions())return!0;if(this.hasFogTransition())return!0;for(const t in this._sourceCaches)if(this._sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}get order(){return this.terrain?this._drapedFirstOrder:this._mergedOrder}isLayerDraped(t){return!!this.terrain&&("function"==typeof t.isLayerDraped?t.isLayerDraped(this.getLayerSourceCache(t)):rU.has(t.type))}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}_checkLayer(t){const e=this.getOwnLayer(t);if(e)return e;this.fire(new zr(new Error(`The layer '${t}' does not exist in the map's style.`)))}_checkSource(t){const e=this.getOwnSource(t);if(e)return e;this.fire(new zr(new Error(`The source '${t}' does not exist in the map's style.`)))}update(t){if(!this._loaded)return;this.ambientLight&&this.ambientLight.recalculate(t),this.directionalLight&&this.directionalLight.recalculate(t);const e=this.calculateLightsBrightness();t.brightness=e||0,e!==this._brightness&&(this._brightness=e,this.dispatcher.broadcast("setBrightness",e));const r=this._changes.isDirty();if(this._changes.isDirty()){const e=this._changes.getLayerUpdatesByScope();for(const t in e){const{updatedIds:r,removedIds:n}=e[t];(r||n)&&this._updateWorkerLayers(t,r,n)}this.updateSourceCaches(),this._updateTilesForChangedImages(),this.updateLayers(t),this.light&&this.light.updateTransitions(t),this.ambientLight&&this.ambientLight.updateTransitions(t),this.directionalLight&&this.directionalLight.updateTransitions(t),this.fog&&this.fog.updateTransitions(t),this._changes.reset()}const n={};for(const t in this._mergedSourceCaches){const e=this._mergedSourceCaches[t];n[t]=e.used,e.used=!1}for(const e of this._mergedOrder){const r=this._mergedLayers[e];if(r.recalculate(t,this._availableImages),!r.isHidden(t.zoom)){const t=this.getLayerSourceCache(r);t&&(t.used=!0)}if(!this._precompileDone&&this._shouldPrecompile)for(let e=r.minzoom||hk;e<(r.maxzoom||fk);e++){const e=this.map.painter;if(e){const n=r.getProgramIds();if(!n)continue;for(const i of n){const n=r.getDefaultProgramParams(i,t.zoom);n&&(e.style=this,this.fog&&(e._fogVisible=!0,n.overrideFog=!0,e.getOrCreateProgram(i,n)),e._fogVisible=!1,n.overrideFog=!1,e.getOrCreateProgram(i,n),(this.stylesheet.terrain||this.stylesheet.projection&&"globe"===this.stylesheet.projection.name)&&(n.overrideRtt=!0,e.getOrCreateProgram(i,n)))}}}}this._shouldPrecompile&&(this._precompileDone=!0);for(const t in n){const e=this._mergedSourceCaches[t];n[t]!==e.used&&e.getSource().fire(new Dr("data",{sourceDataType:"visibility",dataType:"source",sourceId:e.getSource().id}))}this.light&&this.light.recalculate(t),this.terrain&&this.terrain.recalculate(t),this.fog&&this.fog.recalculate(t),this.z=t.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),r&&this.fire(new Dr("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=this._changes.getUpdatedImages();if(t.length){for(const e in this._sourceCaches)this._sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changes.resetUpdatedImages()}}_updateWorkerLayers(t,e,r){const n=this.getFragmentStyle(t);n&&this.dispatcher.broadcast("updateLayers",{layers:e?n._serializeLayers(e):[],scope:t,removedIds:r||[],options:n.options})}setState(t){if(this._checkLoaded(),Y$(this,Tl(t)))return!1;(t=tt(t)).layers=aD(t.layers);const e=bD(this.serialize(),t).filter((t=>!(t.command in J$)));if(0===e.length)return!1;const r=e.filter((t=>!(t.command in K$)));if(r.length>0)throw new Error(`Unimplemented: ${r.map((t=>t.command)).join(", ")}.`);return e.forEach((t=>{this[t.command].apply(this,t.args)})),this.stylesheet=t,this.mergeAll(),this.dispatcher.broadcast("setLayers",{layers:this._serializeLayers(this._order),scope:this.scope,options:this.options}),!0}addImage(t,e){return this.getImage(t)?this.fire(new zr(new Error("An image with this name already exists."))):(this.imageManager.addImage(t,this.scope,e),this._afterImageUpdated(t),this)}updateImage(t,e){this.imageManager.updateImage(t,this.scope,e)}getImage(t){return this.imageManager.getImage(t,this.scope)}removeImage(t){return this.getImage(t)?(this.imageManager.removeImage(t,this.scope),this._afterImageUpdated(t),this):this.fire(new zr(new Error("No image with this name exists.")))}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(this.scope),this._changes.updateImage(t),this.dispatcher.broadcast("setImages",{scope:this.scope,images:this._availableImages}),this.fire(new Dr("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addModel(t,e,r={}
2){return this._checkLoaded(),this._validate(Dl,`models.${t}`,e,null,r)||(this.modelManager.addModel(t,e,this.scope),this._changes.setDirty()),this}hasModel(t){return this.modelManager.hasModel(t,this.scope)}removeModel(t){return this.hasModel(t)?(this.modelManager.removeModel(t,this.scope),this):this.fire(new zr(new Error("No model with this ID exists.")))}listModels(){return this._checkLoaded(),this.modelManager.listModels(this.scope)}addSource(t,e,r={}){if(this._checkLoaded(),void 0!==this.getOwnSource(t))throw new Error(`There is already a source with ID "${t}".`);if(!e.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(e).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(e.type)>=0&&this._validate(Al,`sources.${t}`,e,null,r))return;this.map&&this.map._collectResourceTiming&&(e.collectResourceTiming=!0);const n=XR(t,e,this.dispatcher,this);n.scope=this.scope,n.setEventedParent(this,(()=>({isSourceLoaded:this._isSourceCacheLoaded(n.id),source:n.serialize(),sourceId:n.id})));const i=t=>{const e=(t?"symbol:":"other:")+n.id,r=Bc(e,this.scope),i=this._sourceCaches[e]=new yM(r,n,t);(t?this._symbolSourceCaches:this._otherSourceCaches)[n.id]=i,i.onAdd(this.map)};i(!1),"vector"!==e.type&&"geojson"!==e.type||i(!0),n.onAdd&&n.onAdd(this.map),r.isInitialLoad||(this.mergeSources(),this._changes.setDirty())}removeSource(t){this._checkLoaded();const e=this.getOwnSource(t);if(!e)throw new Error("There is no source with this ID");for(const e in this._layers)if(this._layers[e].source===t)return this.fire(new zr(new Error(`Source "${t}" cannot be removed while layer "${e}" is using it.`)));if(this.terrain&&this.terrain.scope===this.scope&&this.terrain.get().source===t)return this.fire(new zr(new Error(`Source "${t}" cannot be removed while terrain is using it.`)));const r=this.getOwnSourceCaches(t);for(const t of r){const e=jc(t.id);delete this._sourceCaches[e],this._changes.discardSourceCacheUpdate(t.id),t.fire(new Dr("data",{sourceDataType:"metadata",dataType:"source",sourceId:t.getSource().id})),t.setEventedParent(null),t.clearTiles()}return delete this._otherSourceCaches[t],delete this._symbolSourceCaches[t],this.mergeSources(),e.setEventedParent(null),e.onRemove&&e.onRemove(this.map),this._changes.setDirty(),this}setGeoJSONSourceData(t,e){this._checkLoaded(),this.getOwnSource(t).setData(e),this._changes.setDirty()}getOwnSource(t){const e=this.getOwnSourceCache(t);return e&&e.getSource()}getOwnSources(){const t=[];for(const e in this._otherSourceCaches){const r=this.getOwnSourceCache(e);r&&t.push(r.getSource())}return t}setLights(t){if(this._checkLoaded(),!t)return delete this.ambientLight,void delete this.directionalLight;const e=this._getTransitionParameters();for(const r of t){if(this._validate(Cl,"lights",r))return;switch(r.type){case"ambient":if(this.ambientLight){const t=this.ambientLight;t.set(r),t.updateTransitions(e)}else this.ambientLight=new gL(r,yL,this.scope,this.options);break;case"directional":if(this.directionalLight){const t=this.directionalLight;t.set(r),t.updateTransitions(e)}else this.directionalLight=new gL(r,_L,this.scope,this.options)}}const r=new bc(this.z||0,e);this.ambientLight&&this.ambientLight.recalculate(r),this.directionalLight&&this.directionalLight.recalculate(r),this._brightness=this.calculateLightsBrightness(),this.dispatcher.broadcast("setBrightness",this._brightness)}calculateLightsBrightness(){const t=this.directionalLight,e=this.ambientLight;if(!t||!e)return;const r=t=>.2126*(t[0]<=.03928?t[0]/12.92:Math.pow((t[0]+.055)/1.055,2.4))+.7152*(t[1]<=.03928?t[1]/12.92:Math.pow((t[1]+.055)/1.055,2.4))+.0722*(t[2]<=.03928?t[2]/12.92:Math.pow((t[2]+.055)/1.055,2.4)),n=t.properties.get("color").toArray01(),i=t.properties.get("intensity"),o=t.properties.get("direction"),s=1-ct(o.x,o.y,o.z)[2]/90,a=r(n)*i*s,l=e.properties.get("color").toArray01(),c=e.properties.get("intensity");return(a+r(l)*c)/2}getBrightness(){return this._brightness}getLights(){if(!this.enable3dLights())return null;const t=[];return this.directionalLight&&t.push(this.directionalLight.get()),this.ambientLight&&t.push(this.ambientLight.get()),t}enable3dLights(){return!!this.ambientLight&&!!this.directionalLight}getFragmentStyle(t){if(!t)return this;if(zc(t)){const e=Fc(t),r=this.fragments.find((({id:t})=>t===e));if(!r)throw new Error(`Style import not found: ${t}`);const n=jc(t);return r.style.getFragmentStyle(n)}{const e=this.fragments.find((({id:e})=>e===t));if(!e)throw new Error(`Style import not found: ${t}`);return e.style}}getConfigProperty(t,e){const r=this.getFragmentStyle(t);if(!r)return null;const n=r.options.get(e),i=n?n.value||n.default:null;return i?i.serialize():null}setConfigProperty(t,e,r){const n=va(r);if("success"!==n.result)return void Y$(this,n.value);const i=n.value.expression,o=this.getFragmentStyle(t);if(!o)return;const s=o.options.get(e);s&&(o.options.set(e,{...s,value:i}),o.updateConfigDependencies())}setConfig(t,e){if(this._config=t,t||e)if(e){this.options.clear();for(const r in e){let n,i;const o=va(e[r].default);if("success"===o.result&&(n=o.value.expression),t&&void 0!==t[r]){const e=va(t[r]);"success"===e.result&&(i=e.value.expression)}const{minValue:s,maxValue:a,stepValue:l,type:c,values:u}=e[r];n?this.options.set(r,{default:n,value:i,minValue:s,maxValue:a,stepValue:l,type:c,values:u}
2):this.fire(new zr(new Error(`No schema defined for config option "${r}".`)))}}else this.fire(new zr(new Error("Attempting to set config for a style without schema.")))}updateConfigDependencies(){for(const t of this._configDependentLayers){const e=this.getLayer(t);e&&(e.possiblyEvaluateVisibility(),this._updateLayer(e))}this.ambientLight&&this.ambientLight.scope===this.scope&&this.ambientLight.updateConfig(this.options),this.directionalLight&&this.directionalLight.scope===this.scope&&this.directionalLight.updateConfig(this.options),this._changes.setDirty()}addLayer(t,e,r={}){this._checkLoaded();const n=t.id;if(this._layers[n])return void this.fire(new zr(new Error(`Layer with id "${n}" already exists on this map`)));let i;if("custom"===t.type){if(Y$(this,RP(t)))return;i=VP(t,this.options)}else{if("object"==typeof t.source&&(this.addSource(n,t.source),t=U(t=tt(t),{source:n})),this._validate(Il,`layers.${n}`,t,{arrayIndex:-1},r))return;i=VP(t,this.options),this._validateLayer(i),i.setEventedParent(this,{layer:{id:n}}),this._serializedLayers[i.id]=i.serialize()}i.isConfigDependent&&this._configDependentLayers.add(i.fqid),i.setScope(this.scope);let o=this._order.length;if(e){const t=this._order.indexOf(e);
2if(-1===t)return void this.fire(new zr(new Error(`Layer with id "${e}" does not exist on this map.`)));const r=this._layers[e];i.slot===r.slot?o=t:it(`Layer with id "${e}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(o,0,n),this._layerOrderChanged=!0,this._layers[n]=i;const s=this.getOwnLayerSourceCache(i),a=!!this.directionalLight&&this.directionalLight.shadowsEnabled();s&&i.canCastShadows()&&a&&(s.castsShadows=!0);const l=this._changes.getRemovedLayer(i);if(l&&i.source&&s&&"custom"!==i.type){this._changes.discardLayerRemoval(i);const t=Bc(i.source,i.scope);l.type!==i.type?this._changes.updateSourceCache(t,"clear"):(this._changes.updateSourceCache(t,"reload"),s.pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map),i.scope=this.scope,this.mergeLayers()}moveLayer(t,e){this._checkLoaded();const r=this._checkLayer(t);if(!r)return;if(t===e)return;const n=this._order.indexOf(t);this._order.splice(n,1);let i=this._order.length;if(e){const t=this._order.indexOf(e);
2if(-1===t)return void this.fire(new zr(new Error(`Layer with id "${e}" does not exist on this map.`)));const n=this._layers[e];r.slot===n.slot?i=t:it(`Layer with id "${e}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(i,0,t),this._changes.setDirty(),this._layerOrderChanged=!0,this.mergeLayers()}removeLayer(t){this._checkLoaded();const e=this._checkLayer(t);if(!e)return;e.setEventedParent(null);const r=this._order.indexOf(t);this._order.splice(r,1),delete this._layers[t],delete this._serializedLayers[t],this._changes.setDirty(),this._layerOrderChanged=!0,this._configDependentLayers.delete(e.fqid),this._changes.removeLayer(e);const n=this.getOwnLayerSourceCache(e);if(n&&n.castsShadows){let t=!1;for(const r in this._layers)if(this._layers[r].source===e.source&&this._layers[r].canCastShadows()){t=!0;break}n.castsShadows=t}e.onRemove&&e.onRemove(this.map),this.mergeLayers()}getOwnLayer(t){return this._layers[t]}hasLayer(t){return t in this._mergedLayers}hasLayerType(t){for(const e in this._layers)if(this._layers[e].type===t)return!0;return!1}setLayerZoomRange(t,e,r){this._checkLoaded();const n=this._checkLayer(t);n&&(n.minzoom===e&&n.maxzoom===r||(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n)))}setSlot(t,e){this._checkLoaded();const r=this._checkLayer(t);r&&r.slot!==e&&(r.slot=e,this._updateLayer(r))}setFilter(t,e,r={}){this._checkLoaded();const n=this._checkLayer(t);if(n&&!x(n.filter,e))return null==e?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(Pl,`layers.${n.id}.filter`,e,{layerType:n.type},r)||(n.filter=tt(e),this._updateLayer(n)))}getFilter(t){const e=this._checkLayer(t);if(e)return tt(e.filter)}setLayoutProperty(t,e,r,n={}){this._checkLoaded();const i=this._checkLayer(t);i&&(x(i.getLayoutProperty(e),r)||(i.setLayoutProperty(e,r,n),i.isConfigDependent&&this._configDependentLayers.add(i.fqid),this._updateLayer(i)))}getLayoutProperty(t,e){const r=this._checkLayer(t);if(r)return r.getLayoutProperty(e)}setPaintProperty(t,e,r,n={}){this._checkLoaded();const i=this._checkLayer(t);if(!i)return;if(x(i.getPaintProperty(e),r))return;const o=i.setPaintProperty(e,r,n);i.isConfigDependent&&this._configDependentLayers.add(i.fqid),o&&this._updateLayer(i),this._changes.updatePaintProperties(i)}getPaintProperty(t,e){const r=this._checkLayer(t);if(r)return r.getPaintProperty(e)}setFeatureState(t,e){this._checkLoaded();const r=t.source,n=t.sourceLayer,i=this._checkSource(r);if(!i)return;const o=i.type;if("geojson"===o&&n)return void this.fire(new zr(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===o&&!n)return void this.fire(new zr(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===t.id&&this.fire(new zr(new Error("The feature id parameter must be provided.")));const s=this.getOwnSourceCaches(r);for(const r of s)r.setFeatureState(n,t.id,e)}removeFeatureState(t,e){this._checkLoaded();const r=t.source,n=this._checkSource(r);if(!n)return;const i=n.type,o="vector"===i?t.sourceLayer:void 0;if("vector"===i&&!o)return void this.fire(new zr(new Error("The sourceLayer parameter must be provided for vector source types.")));if(e&&"string"!=typeof t.id&&"number"!=typeof t.id)return void this.fire(new zr(new Error("A feature id is required to remove its specific state property.")));const s=this.getOwnSourceCaches(r);for(const r of s)r.removeFeatureState(o,t.id,e)}getFeatureState(t){this._checkLoaded();const e=t.source,r=t.sourceLayer,n=this._checkSource(e);if(n){if("vector"!==n.type||r)return void 0===t.id&&this.fire(new zr(new Error("The feature id parameter must be provided."))),this.getOwnSourceCaches(e)[0].getFeatureState(r,t.id);this.fire(new zr(new Error("The sourceLayer parameter must be provided for vector source types.")))}}setTransition(t){return this.stylesheet.transition=U({},this.stylesheet.transition,t),this.transition=this.stylesheet.transition,this}getTransition(){return U({},this.stylesheet.transition)}serialize(){this._checkLoaded();const t=this.getTerrain(),e=t&&this.terrain&&this.terrain.scope===this.scope?t:this.stylesheet.terrain;return Q({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,imports:this._serializeImports(),schema:this.stylesheet.schema,camera:this.stylesheet.camera,light:this.stylesheet.light,lights:this.stylesheet.lights,terrain:e,fog:this.stylesheet.fog,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:this._serializeSources(),layers:this._serializeLayers(this._order)},(t=>void 0!==t))}_updateLayer(t){this._changes.updateLayer(t);const e=this.getLayerSourceCache(t),r=Bc(t.source,t.scope),n=this._changes.getUpd
2atedSourceCaches();t.source&&!n[r]&&e&&"raster"!==e.getSource().type&&(this._changes.updateSourceCache(r,"reload"),e.pause()),t.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(t){const e=t=>"fill-extrusion"===this._mergedLayers[t].type,r=this.order,n={},i=[];for(let o=r.length-1;o>=0;o--){const s=r[o];if(e(s)){n[s]=o;for(const e of t){const t=e[s];if(t)for(const e of t)i.push(e)}}}i.sort(((t,e)=>e.intersectionZ-t.intersectionZ));const o=[];for(let s=r.length-1;s>=0;s--){const a=r[s];if(e(a))for(let t=i.length-1;t>=0;t--){const e=i[t].feature;if(n[e.layer.id]<s)break;o.push(e),i.pop()}else for(const e of t){const t=e[a];if(t)for(const e of t)o.push(e.feature)}}return o}queryRenderedFeatures(t,e,r){e&&e.filter&&this._validate(Pl,"queryRenderedFeatures.filter",e.filter,null,e),e.scope=this.scope,e.availableImages=this._availableImages,e.serializedLayers=this._serializedLayers;const n={};if(e&&e.layers){if(!Array.isArray(e.layers))return this.fire(new zr(new Error("parameters.layers must be an Array."))),[];for(const t of e.layers){const e=this._mergedLayers[t];if(!e)return this.fire(new zr(new Error(`The layer '${t}' does not exist in the map's style and cannot be queried for features.`))),[];n[e.source]=!0}}const i=[],o=e.serializedLayers||{},s=e&&e.layers?e.layers.some((t=>{const e=this.getLayer(t);return e&&e.is3D()})):this.has3DLayers(),a=vL.createFromScreenPoints(t,r);for(const t in this._mergedSourceCaches){const l=this._mergedSourceCaches[t].getSource();if(!l||l.scope!==e.scope)continue;const c=this._mergedSourceCaches[t].getSource().id;if(e.layers&&!n[c])continue;const u=!!this.map._showQueryGeometry;i.push(QR(this._mergedSourceCaches[t],this._mergedLayers,o,a,e,r,s,u))}return this.placement&&i.push(tD(this._mergedLayers,o,this.getLayerSourceCache.bind(this),a.screenGeometry,e,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(i)}querySourceFeatures(t,e){e&&e.filter&&this._validate(Pl,"querySourceFeatures.filter",e.filter,null,e);const r=this.getOwnSourceCaches(t);let n=[];for(const t of r)n=n.concat(eD(t,e));return n}addSourceType(t,e,r){return nU.getSourceType(t)?r(new Error(`A source type called "${t}" already exists.`)):(nU.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},r):r(null,null))}getFlatLight(){return this.light.getLight()}setFlatLight(t,e,r={}){this._checkLoaded();const n=this.light.getLight();let i=!1;for(const e in t)if(!x(t[e],n[e])){i=!0;break}if(!i)return;const o=this._getTransitionParameters();this.light.setLight(t,e,r),this.light.updateTransitions(o)}getTerrain(){return this.terrain&&this.terrain.drapeRenderMode===YP.elevated?this.terrain.get():null}setTerrainForDraping(){const t={source:"",exaggeration:0};this.setTerrain(t,YP.deferred)}setTerrain(t,e=YP.elevated){if(this._checkLoaded(),!t)return delete this.terrain,null===t?this.stylesheet.terrain=null:delete this.stylesheet.terrain,this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);let r=t;const n=null==t.source;if(e===YP.elevated){if("object"==typeof r.source){const t="terrain-dem-src";this.addSource(t,r.source),r=tt(r),r=U(r,{source:t})}const t=U({},r),e={};if(this.terrain&&n){t.source=this.terrain.get().source;const r=this.terrain?this.getFragmentStyle(this.terrain.scope):null;r&&(e.style=r.serialize())}if(this._validate(Ml,"terrain",t,e))return}if(!this.terrain||this.terrain.scope!==this.scope&&!n||this.terrain&&e!==this.terrain.drapeRenderMode){if(!r)return;this._createTerrain(r,e),this.fire(new Dr("data",{dataType:"style"}))}else{const e=this.terrain,n=e.get();for(const t of Object.keys(jr.terrain))!r.hasOwnProperty(t)&&jr.terrain[t].default&&(r[t]=jr.terrain[t].default);for(const r in t)if(!x(t[r],n[r])){e.set(t,this.options),this.stylesheet.terrain=t;const r=this._getTransitionParameters({duration:0});e.updateTransitions(r),this.fire(new Dr("data",{dataType:"style"}));break}}this.mergeTerrain(),this.updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(t){const e=this.fog=new uL(t,this.map.transform);this.stylesheet.fog=e.get();const r=this._getTransitionParameters({duration:0});e.updateTransitions(r)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask((()=>{for(const t of this.map._markers)t._evaluateOpacity()}))}getFog(){return this.fog?this.fog.get():null}setFog(t){if(this._checkLoaded(),!t)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedU
2pdate=!0);if(this.fog){const e=this.fog;if(!x(e.get(),t)){e.set(t),this.stylesheet.fog=e.get();const r=this._getTransitionParameters({duration:0});e.updateTransitions(r)}}else this._createFog(t);this._markersNeedUpdate=!0}_getTransitionParameters(t){return{now:vr.now(),transition:U(this.transition,t)}}updateDrapeFirstLayers(){if(!this.terrain)return;const t=[],e=[];for(const r in this._mergedLayers){const n=this._mergedLayers[r];this.isLayerDraped(n)?t.push(r):e.push(r)}this._drapedFirstOrder=[],this._drapedFirstOrder.push(...t),this._drapedFirstOrder.push(...e)}_createTerrain(t,e){const r=this.terrain=new JP(t,e,this.scope,this.options);e===YP.elevated&&(this.stylesheet.terrain=t),this.mergeTerrain(),this.updateDrapeFirstLayers(),this._force3DLayerUpdate();const n=this._getTransitionParameters({duration:0});r.updateTransitions(n)}_force3DLayerUpdate(){for(const t in this._layers){const e=this._layers[t];"fill-extrusion"===e.type&&this._updateLayer(e)}}_forceSymbolLayerUpdate(){for(const t in this._layers){const e=this._layers[t];"symbol"===e.type&&this._updateLayer(e)}}_validate(t,e,r,n,i={}){if(i&&!1===i.validate)return!1;const o=U({},this.serialize());return Y$(this,t.call(Tl,U({key:e,style:o,value:r,styleSpec:jr},n)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),dc.off("pluginStateChange",this._rtlTextPluginCallback);for(const t in this._mergedLayers)this._mergedLayers[t].setEventedParent(null);for(const t in this._mergedSourceCaches)this._mergedSourceCaches[t].clearTiles(),this._mergedSourceCaches[t].setEventedParent(null);this.setEventedParent(null),delete this.fog,delete this.terrain,delete this.ambientLight,delete this.directionalLight,this.isRootStyle()&&(this.imageManager.setEventedParent(null),this.modelManager.setEventedParent(null),this.dispatcher.remove())}clearSource(t){const e=this.getSourceCaches(t);for(const t of e)t.clearTiles()}clearSources(){for(const t in this._mergedSourceCaches)this._mergedSourceCaches[t].clearTiles()}reloadSource(t){const e=this.getSourceCaches(t);for(const t of e)t.resume(),t.reload()}reloadSources(){for(const t of this.getSources())t.reload&&t.reload()}updateSources(t){let e;this.directionalLight&&(e=H$(this.directionalLight));for(const r in this._mergedSourceCaches)this._mergedSourceCaches[r].update(t,void 0,void 0,e)}_generateCollisionBoxes(){for(const t in this._sourceCaches){const e=this._sourceCaches[t];e.resume(),e.reload()}}_updatePlacement(t,e,r,n,i=!1){let o=!1,s=!1;const a={},l={};for(const e of this._mergedOrder){const r=this._mergedLayers[e];if("symbol"!==r.type)continue;const n=Bc(r.source,r.scope);let i=a[n];if(!i){const t=this.getLayerSourceCache(r);if(!t)continue;const e=t.getRenderableIds(!0).map((e=>t.getTileByID(e)));l[n]=e.slice(),i=a[n]=e.sort(((t,e)=>e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)))}const s=this.crossTileSymbolIndex.addLayer(r,i,t.center.lng,t.projection);o=o||s}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._mergedOrder),i=i||this._layerOrderChanged||0===r,this._layerOrderChanged&&this.fire(new Dr("neworder")),i||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(vr.now(),t.zoom)){const o=this.fog&&t.projection.supportsFog?this.fog.state:null;this.pauseablePlacement=new XD(t,this._mergedOrder,i,e,r,n,this.placement,o,this._buildingIndex),this._layerOrderChanged=!1}if(this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._mergedOrder,this._mergedLayers,a,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(vr.now()),s=!0),o&&this.pauseablePlacement.placement.setStale()),s||o)for(const t of this._mergedOrder){const e=this._mergedLayers[t];"symbol"===e.type&&this.placement.updateLayerOpacities(e,a[Bc(e.source,e.scope)])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(vr.now())}_releaseSymbolFadeTiles(){for(const t in this._sourceCaches)this._sourceCaches[t].releaseSymbolFadeTiles()}addImport(t){this._checkLoaded();const e=this.stylesheet.imports=this.stylesheet.imports||[],r=e.findIndex((({id:e})=>e===t.id));
2return-1!==r?this.fire(new zr(new Error(`Import with id '${t.id}' already exists in the map's style.`))):(e.push(t),this._loadImports([t],!0),this)}setImportUrl(t,e){this._checkLoaded();const r=this.stylesheet.imports||[],n=this.getImportIndex(t);if(-1===n)return this;r[n].url=e;const i=this.fragments[n];return i.style=this._createFragmentStyle(r[n]),i.style.on("style.import.load",(()=>this.mergeAll())),i.style.loadURL(e),this}setImportData(t,e){this._checkLoaded();const r=this.getImportIndex(t),n=this.stylesheet.imports||[];return-1===r?this:e?(this.fragments[r].style.setState(e),this._reloadImports(),this):(delete n[r].data,this.setImportUrl(t,n[r].url))}setImportConfig(t,e){this._checkLoaded();const r=this.getImportIndex(t),n=this.stylesheet.imports||[];if(-1===r)return this;e?n[r].config=e:delete n[r].config;const i=this.fragments[r],o=i.style.stylesheet&&i.style.stylesheet.schema;return i.config=e,i.style.setConfig(e,o),i.style.updateConfigDependencies(),this}removeImport(t){this._checkLoaded();const e=this.stylesheet.imports||[],r=this.getImportIndex(t);return-1===r||(e.splice(r,1),this.fragments[r].style._remove(),this.fragments.splice(r,1),this._reloadImports()),this}getImportIndex(t){const e=(this.stylesheet.imports||[]).findIndex((e=>e.id===t));return-1===e&&this.fire(new zr(new Error(`Import '${t}' does not exist in the map's style and cannot be updated.`))),e}getLayer(t){return this._mergedLayers[t]}getSources(){const t=[];for(const e in this._mergedOtherSourceCaches){const r=this._mergedOtherSourceCaches[e];r&&t.push(r.getSource())}return t}getSource(t,e){const r=this.getSourceCache(t,e);return r&&r.getSource()}getLayerSource(t){const e=this.getLayerSourceCache(t);return e&&e.getSource()}getSourceCache(t,e){const r=Bc(t,e);return this._mergedOtherSourceCaches[r]}getLayerSourceCache(t){const e=Bc(t.source,t.scope);return"symbol"===t.type?this._mergedSymbolSourceCaches[e]:this._mergedOtherSourceCaches[e]}getSourceCaches(t){const e=[];return this._mergedOtherSourceCaches[t]&&e.push(this._mergedOtherSourceCaches[t]),this._mergedSymbolSourceCaches[t]&&e.push(this._mergedSymbolSourceCaches[t]),e}updateSourceCaches(){const t=this._changes.getUpdatedSourceCaches();for(const e in t){const r=t[e];"reload"===r?this.reloadSource(e):"clear"===r&&this.clearSource(e)}}updateLayers(t){const e=this._changes.getUpdatedPaintProperties();for(const r of e){const e=this.getLayer(r);e&&e.updateTransitions(t)}}getImages(t,e,r){this.imageManager.getImages(e.icons,e.scope,r),this._updateTilesForChangedImages();const n=t=>{t&&t.setDependencies(e.tileID.key,e.type,e.icons)};n(this._otherSourceCaches[e.source]),n(this._symbolSourceCaches[e.source])}getGlyphs(t,e,r){this.glyphManager.getGlyphs(e.stacks,e.scope,r)}getResource(t,e,r){return Xt(e,r)}getOwnSourceCache(t){return this._otherSourceCaches[t]}getOwnLayerSourceCache(t){return"symbol"===t.type?this._symbolSourceCaches[t.source]:this._otherSourceCaches[t.source]}getOwnSourceCaches(t){const e=[];return this._otherSourceCaches[t]&&e.push(this._otherSourceCaches[t]),this._symbolSourceCaches[t]&&e.push(this._symbolSourceCaches[t]),e}_isSourceCacheLoaded(t){const e=this.getOwnSourceCaches(t);return 0===e.length?(this.fire(new zr(new Error(`There is no source with ID '${t}'`))),!1):e.every((t=>t.loaded()))}has3DLayers(){return this._has3DLayers}hasSymbolLayers(){return this._hasSymbolLayers}hasCircleLayers(){return this._hasCircleLayers}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}function iU(t,e){let r=!1,n=null;const i=()=>{n=null,r&&(t(),n=setTimeout(i,e),r=!1)};return()=>(r=!0,n||i(),n)}nU.getSourceType=YR,nU.setSourceType=KR,nU.registerForPluginStateChange=mc;class oU{constructor(t){this._hashName=t&&encodeURIComponent(t),Y(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=iU(this._updateHashUnthrottled.bind(this),300)}addTo(t){return this._map=t,e.addEventListener("hashchange",this._onHashChange,!1),t.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),e.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const t=this._map;if(!t)return"";const r=sU(t);if(this._hashName){const t=this._hashName;let n=!1;const i=e.location.hash.slice(1).split("&").map((e=>{const i=e.split("=")[0];return i===t?(n=!0,`${i}=${r}`):e})).filter((t=>t));return n||i.push(`${t}=${r}`),`#${i.join("&")}`}return`#${r}`}_getCurrentHash(){const t=e.location.hash.replace("#","");if(this._hashName){let e;return t.split("&").map((t=>
2t.split("="))).forEach((t=>{t[0]===this._hashName&&(e=t)})),(e&&e[1]||"").split("/")}return t.split("/")}_onHashChange(){const t=this._map;if(!t)return!1;const e=this._getCurrentHash();if(e.length>=3&&!e.some((t=>isNaN(t)))){const r=t.dragRotate.isEnabled()&&t.touchZoomRotate.isEnabled()?+(e[3]||0):t.getBearing();return t.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:r,pitch:+(e[4]||0)}),!0}return!1}_updateHashUnthrottled(){const t=e.location.href.replace(/(#.+)?$/,this.getHashString());e.history.replaceState(e.history.state,null,t)}}function sU(t,e){const r=t.getCenter(),n=Math.round(100*t.getZoom())/100,i=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,i),s=Math.round(r.lng*o)/o,a=Math.round(r.lat*o)/o,l=t.getBearing(),c=t.getPitch();let u=e?`/${s}/${a}/${n}`:`${n}/${a}/${s}`;return(l||c)&&(u+="/"+Math.round(10*l)/10),c&&(u+=`/${Math.round(c)}`),u}const aU={linearity:.3,easing:L(0,0,.3,1)},lU=U({deceleration:2500,maxSpeed:1400},aU),cU=U({deceleration:20,maxSpeed:1400},aU),uU=U({deceleration:1e3,maxSpeed:360},aU),hU=U({deceleration:1e3,maxSpeed:90},aU);class fU{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:vr.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,e=vr.now(),r=160;for(;t.length>0&&e-t[0].time>r;)t.shift()}_onMoveEnd(t){if(this._map._prefersReducedMotion())return;if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const e={zoom:0,bearing:0,pitch:0,pan:new b(0,0),pinchAround:void 0,around:void 0};for(const{settings:t}of this._inertiaBuffer)e.zoom+=t.zoomDelta||0,e.bearing+=t.bearingDelta||0,e.pitch+=t.pitchDelta||0,t.panDelta&&e.pan._add(t.panDelta),t.around&&(e.around=t.around),t.pinchAround&&(e.pinchAround=t.pinchAround);const r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,n={};if(e.pan.mag()){const i=pU(e.pan.mag(),r,U({},lU,t||{}));n.offset=e.pan.mult(i.amount/e.pan.mag()),n.center=this._map.transform.center,dU(n,i)}if(e.zoom){const t=pU(e.zoom,r,cU);n.zoom=this._map.transform.zoom+t.amount,dU(n,t)}if(e.bearing){const t=pU(e.bearing,r,uU);n.bearing=this._map.transform.bearing+D(t.amount,-179,179),dU(n,t)}if(e.pitch){const t=pU(e.pitch,r,hU);n.pitch=this._map.transform.pitch+t.amount,dU(n,t)}if(n.zoom||n.bearing){const t=void 0===e.pinchAround?e.around:e.pinchAround;n.around=t?this._map.unproject(t):this._map.getCenter()}return this.clear(),n.noMoveStart=!0,n}}function dU(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function pU(t,e,r){const{maxSpeed:n,linearity:i,deceleration:o}=r,s=D(t*i/(e/1e3),-n,n),a=Math.abs(s)/(o*i);return{easing:r.easing,duration:1e3*a,amount:s*(a/2)}}class mU extends Dr{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,e,r,n={}){const i=Mr(e.getCanvasContainer(),r);super(t,U({point:i,lngLat:e.unproject(i),originalEvent:r},n)),this._defaultPrevented=!1,this.target=e}}class gU extends Dr{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,e,r){const n="touchend"===t?r.changedTouches:r.touches,i=kr(e.getCanvasContainer(),n),o=i.map((t=>e.unproject(t))),s=i.reduce(((t,e,r,n)=>t.add(e.div(n.length))),new b(0,0));super(t,{points:i,point:s,lngLats:o,lngLat:e.unproject(s),originalEvent:r}),this._defaultPrevented=!1}}class yU extends Dr{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,e,r){super(t,{originalEvent:r}),this._defaultPrevented=!1}}class _U{constructor(t,e){this._map=t,this._clickTolerance=e.clickTolerance}reset(){this._mousedownPos=void 0}wheel(t){return this._firePreventable(new yU(t.type,this._map,t))}mousedown(t,e){return this._mousedownPos=e,this._firePreventable(new mU(t.type,this._map,t))}mouseup(t){this._map.fire(new mU(t.type,this._map,t))}preclick(t){const e=U({},t);e.type="preclick",this._map.fire(new mU(e.type,this._map,e))}click(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||(this.preclick(t),this._map.fire(new mU(t.type,this._map,t)))}dblclick(t){return this._firePreventable(new mU(t.type,this._map,t))}mouseover(t){this._map.fire(new mU(t.type,this._map,t))}mouseout(t){this._map.fire(new mU(t.type,this._map,t))}touchstart(t){return this._firePreventable(new gU(t.type,this._map,t))}touchmove(t){this._map.fire(new gU(t.type,this._map,t))}touchend(t){this._map.fire(new gU(t.type,this._map,t))}touchcancel(t){this._map.fire(new gU(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class vU{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(t){this._map.fire(new mU(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new mU("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new mU(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class bU{constructor(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(Tr(),this._startPos=this._lastPos=e,this._active=!0)}mousemoveWindow(t,e){if(!this._active)return;const r=e,n=this._startPos,i=this._lastPos;if(!n||!i||i.equals(r)||!this._box&&r.dist(n)<this._clickTolerance)return;this._lastPos=r,this._box||(this._box=br("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));const o=Math.min(n.x,r.x),s=Math.max(n.x,r.x),a=Math.min(n.y,r.y),l=Math.max(n.y,r.y);this._map._requestDomTask((()=>{this._box&&(this._box.style.transform=`translate(${o}px,${a}px)`,this._box.style.width=s-o+"px",this._box.style.height=l-a+"px")}))}mouseupWindow(t,e){if(!this._active)return;const r=this._startPos,n=e;if(r&&0===t.button){if(this.reset(),Cr(),r.x!==n.x||r.y!==n.y)return this._map.fire(new Dr("boxzoomend",{originalEvent:t})),{cameraAnimation:t=>t.fitScreenCoordinates(r,n,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",t)}}keydown(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),Ar(),delete this._startPos,delete this._lastPos}_fireEvent(t,e){return this._map.fire(new Dr(t,{originalEvent:e}))}}function xU(t,e){const r={};for(let n=0;n<t.length;n++)r[t[n].identifier]=e[n];return r}function wU(t){const e=new b(0,0);for(const r of t)e._add(r);return e.div(t.length)}const EU=500,SU=500,TU=30;class AU{constructor(t){this.reset(),this.numTouches=t.numTouches}reset(){this.centroid=void 0,this.startTime=0,this.touches={},this.aborted=!1}touchstart(t,e,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(0===this.startTime&&(this.startTime=t.timeStamp),r.length===this.numTouches&&(this.centroid=wU(e),this.touches=xU(r,e)))}touchmove(t,e,r){if(this.aborted||!this.centroid)return;const n=xU(r,e);for(const t in this.touches){const e=this.touches[t],r=n[t];(!r||r.dist(e)>TU)&&(this.aborted=!0)}}touchend(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>SU)&&(this.aborted=!0),0===r.length){const t=!this.aborted&&this.centroid;if(this.reset(),t)return t}}}class OU{constructor(t){this.singleTap=new AU(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(t,e,r){this.singleTap.touchstart(t,e,r)}touchmove(t,e,r){this.singleTap.touchmove(t,e,r)}touchend(t,e,r){const n=this.singleTap.touchend(t,e,r);
2if(n){const e=t.timeStamp-this.lastTime<EU,r=!this.lastTap||this.lastTap.dist(n)<TU;if(e&&r||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}class CU{constructor(){this._zoomIn=new OU({numTouches:1,numTaps:2}),this._zoomOut=new OU({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)}touchmove(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)}touchend(t,e,r){const n=this._zoomIn.touchend(t,e,r),i=this._zoomOut.touchend(t,e,r);return n?(this._active=!0,t.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:e=>e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(n)},{originalEvent:t})}):i?(this._active=!0,t.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:e=>e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(i)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const MU=0,kU=2,IU={[MU]:1,[kU]:2};function PU(t,e){const r=IU[e];return void 0===t.buttons||(t.buttons&r)!==r}class LU{constructor(t){this.reset(),this._clickTolerance=t.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(t,e){return!1}_move(t,e){return{}}mousedown(t,e){if(this._lastPoint)return;const r=Ir(t);this._correctButton(t,r)&&(this._lastPoint=e,this._eventButton=r)}mousemoveWindow(t,e){const r=this._lastPoint;if(r)if(t.preventDefault(),null!=this._eventButton&&PU(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(r)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(r,e)}mouseupWindow(t){this._lastPoint&&Ir(t)===this._eventButton&&(this._moved&&Cr(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class RU extends LU{mousedown(t,e){super.mousedown(t,e),this._lastPoint&&(this._active=!0)}_correctButton(t,e){return e===MU&&!t.ctrlKey}_move(t,e){return{around:e,panDelta:e.sub(t)}}}class DU extends LU{_correctButton(t,e){return e===MU&&t.ctrlKey||e===kU}_move(t,e){const r=.8,n=(e.x-t.x)*r;if(n)return this._active=!0,{bearingDelta:n}}contextmenu(t){t.preventDefault()}}class zU extends LU{_correctButton(t,e){return e===MU&&t.ctrlKey||e===kU}_move(t,e){const r=-.5,n=(e.y-t.y)*r;if(n)return this._active=!0,{pitchDelta:n}}contextmenu(t){t.preventDefault()}}class BU{constructor(t,e){this._map=t,this._el=t.getCanvasContainer(),this._minTouches=1,this._clickTolerance=e.clickTolerance||1,this.reset(),Y(["_addTouchPanBlocker","_showTouchPanBlockerAlert"],this)}reset(){this._active=!1,this._touches={},this._sum=new b(0,0)}touchstart(t,e,r){return this._calculateTransform(t,e,r)}touchmove(t,e,r){if(this._active&&!(r.length<this._minTouches)){if(this._map._cooperativeGestures&&!this._map.isMoving()){if(1===r.length&&!mt())return void this._showTouchPanBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}return t.cancelable&&t.preventDefault(),this._calculateTransform(t,e,r)}}touchend(t,e,r){this._calculateTransform(t,e,r),this._active&&r.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(t,e,r){r.length>0&&(this._active=!0);const n=xU(r,e),i=new b(0,0),o=new b(0,0);let s=0;for(const t in n){const e=n[t],r=this._touches[t];r&&(i._add(e),o._add(e.sub(r)),s++,n[t]=e)}if(this._touches=n,s<this._minTouches||!o.mag())return;const a=o.div(s);return this._sum._add(a),this._sum.mag()<this._clickTolerance?void 0:{around:i.div(s),panDelta:a}}enable(){this._enabled=!0,this._map._cooperativeGestures&&(this._addTouchPanBlocker(),this._el.classList.add("mapboxgl-touch-pan-blocker-override","mapboxgl-scrollable-page"))}disable(){this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove(),this._el.classList.remove("mapboxgl-touch-pan-blocker-override","mapboxgl-scrollable-page")),this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}_addTouchPanBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=br("div","mapboxgl-touch-pan-blocker",this._map._container),this._alertContainer.textContent=this._map._getUIString("TouchPanBlocker.Message"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showTouchPanBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout((()=>{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")}),500)}}class jU{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(t){}_move(t,e,r){return{}}touchstart(t,e,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([e[0],e[1]]))}touchmove(t,e,r){const n=this._firstTwoTouches;if(!n)return;t.preventDefault();const[i,o]=n,s=FU(r,e,i),a=FU(r,e,o);if(!s||!a)return;const l=this._aroundCenter?null:s.add(a).div(2);return this._move([s,a],l,t)}touchend(t,e,r){if(!this._firstTwoTouches)return;const[n,i]=this._firstTwoTouches,o=FU(r,e,n),s=FU(r,e,i);o&&s||(this._active&&Cr(),this.reset())}touchcancel(){this.reset()}enable(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function FU(t,e,r){for(let n=0;n<t.length;n++)if(t[n].identifier===r)return e[n]}const NU=.1;function $U(t,e){return Math.log(t/e)/Math.LN2}class UU extends jU{reset(){super.reset(),this._distance=0,this._startDistance=0}_start(t){this._startDistance=this._distance=t[0].dist(t[1])}_move(t,e){const r=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs($U(this._distance,this._startDistance))<NU))return this._active=!0,{zoomDelta:$U(this._distance,r),pinchAround:e}}}const VU=25;function GU(t,e){return 180*t.angleWith(e)/Math.PI}class qU extends jU{reset(){super.reset(),this._minDiameter=0,this._startVector=void 0,this._vector=void 0}_start(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])}_move(t,e){const r=this._vector;if(this._vector=t[0].sub(t[1]),r&&(this._active||!this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:GU(this._vector,r),pinchAround:e}}_isBelowThreshold(t){this._minDiameter=Math.min(this._minDiameter,t.mag());const e=Math.PI*this._minDiameter,r=VU/e*360,n=this._startVector;if(!n)return!1;const i=GU(t,n);return Math.abs(i)<r}}function HU(t){return Math.abs(t.y)>Math.abs(t.x)}const WU=100;class ZU extends jU{constructor(t){super(),this._map=t}
vendor: 4,164 bytes, line 2
2reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(t){this._lastPoints=t,HU(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,e,r){const n=this._lastPoints;if(!n)return;const i=t[0].sub(n[0]),o=t[1].sub(n[1]);return this._map._cooperativeGestures&&!mt()&&r.touches.length<3||(this._valid=this.gestureBeginsVertically(i,o,r.timeStamp),!this._valid)?void 0:(this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+o.y)/2*-.5})}gestureBeginsVertically(t,e,r){if(void 0!==this._valid)return this._valid;const n=2,i=t.mag()>=n,o=e.mag()>=n;if(!i&&!o)return;if(!i||!o)return null==this._firstMove&&(this._firstMove=r),r-this._firstMove<WU&&void 0;const s=t.y>0==e.y>0;return HU(t)&&HU(e)&&s}}const XU={panStep:100,bearingStep:15,pitchStep:10};class YU{constructor(){const t=XU;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let e=0,r=0,n=0,i=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?n=-1:(t.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(r=0,n=0),{cameraAnimation:s=>{const a=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:KU,zoom:e?Math.round(a)+e*(t.shiftKey?2:1):a,bearing:s.getBearing()+r*this._bearingStep,pitch:s.getPitch()+n*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:s.getCenter()},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function KU(t){return t*(2-t)}const JU=4.000244140625,QU=.01,tV=1/450,eV=2;class rV{constructor(t,e){this._map=t,this._el=t.getCanvasContainer(),this._handler=e,this._delta=0,this._lastDelta=0,this._defaultZoomRate=QU,this._wheelZoomRate=tV,Y(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around,this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(t.ctrlKey||t.metaKey||this.isZooming()||mt()))return void this._showBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let r=t.deltaMode===e.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const n=vr.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%JU==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}_onTimeout(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)}_start(t){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const e=Mr(this._el,t);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:e,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRe
2nderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const t=this._map.transform;"wheel"===this._type&&t.projection.wrap&&(t._center.lng>=180||t._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const e=()=>t._terrainEnabled()&&this._aroundCoord?t.computeZoomRelativeTo(this._aroundCoord):t.zoom;if(0!==this._delta){const r="wheel"===this._type&&Math.abs(this._delta)>JU?this._wheelZoomRate:this._defaultZoomRate;let n=eV/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==n&&(n=1/n);const i=e(),o=Math.pow(2,i),s="number"==typeof this._targetZoom?t.zoomScale(this._targetZoom):o;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(s*n))),"wheel"===this._type&&(this._startZoom=i,this._easing=this._smoothOutEasing(200)),this._lastDelta=this._delta,this._delta=0}const r="number"==typeof this._targetZoom?this._targetZoom:e(),n=this._startZoom,i=this._easing;let o,s=!1;if("wheel"===this._type&&n&&i){const t=Math.min((vr.now()-this._lastWheelEventTime)/200,1);o=Co(n,r,i(t)),t<1?this._frameId||(this._frameId=!0):s=!0}else o=r,s=!0;this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200));let a=o-e();return a*this._lastDelta<0&&(a=0),{noInertia:!0,needsRenderFrame:!s,zoomDelta:a,around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let e=R;if(this._prevEase){const t=this._prevEase,r=(vr.now()-t.start)/t.duration,n=t.easing(r+.01)-t.easing(r),i=.27/Math.sqrt(n*n+1e-4)*.01;e=L(i,Math.sqrt(.0729-i*i),.25,1)}return this._prevEase={start:vr.now(),duration:t,easing:e},e}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=br("div","mapboxgl-scroll-zoom-blocker",this._map._container),/(Mac|iPad)/i.test(e.navigator.userAgent)?this._alertContainer.textContent=this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._alertContainer.textContent=this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout((()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")}),200)}}class nV{constructor(t,e){this._clickZoom=t,this._tapZoom=e}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class iV{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(t,e){return t.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class oV{constructor(){this._tap=new OU({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>EU&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))}touchmove(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;const n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)}touchend(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class sV{constructor(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r}enable(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class aV{constructor(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class lV{constructor(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const cV=t=>t.zoom||t.drag||t.pitch||t.rotate;class uV extends Dr{}class hV{constructor(){this.constants=[1,1,.01],this.radius=0}setup(t,e){const r=Sv.sub([],e,t);r[2]<0?this.radius=Sv.length(Sv.div([],r,this.constants)):this.radius=Sv.length([r[0],r[1],0])}projectRay(t){Sv.div(t,t,this.constants),Sv.normalize(t,t),Sv.mul(t,t,this.constants);const e=Sv.scale([],t,this.radius);if(e[2]>0){const t=Sv.scale([],[0,0,1],Sv.dot(e,[0,0,1])),r=Sv.scale([],Sv.normalize([],[e[0],e[1],0]),this.radius),n=Sv.add([],e,Sv.scale([],Sv.sub([],Sv.add([],r,t),e),2));e[0]=n[0],e[1]=n[1]}return e}}function fV(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}class dV{constructor(t,r){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new fU(t),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new hV,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(r),Y(["handleEvent","handleWindowEvent"],this);const n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[e.document,"mousemove",{capture:!0}],[e.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[e,"blur",void 0]];for(const[t,r,n]of this._listeners){const i=t===e.document?this.handleWindowEvent:this.handleEvent;t.addEventListener(r,i,n)}}destroy(){for(const[t,r,n]of this._listeners){const i=t===e.document?this.handleWindowEvent:this.handleEvent;t.removeEventListener(r,i,n)}}_addDefaultHandlers(t){const e=this._map,r=e.getCanvasContainer();this._add("mapEvent",new _U(e,t));const n=e.boxZoom=new bU(e,t);this._add("boxZoom",n);const i=new CU,o=new iV;e.doubleClickZoom=new nV(o,i),this._add("tapZoom",i),this._add("clickZoom",o);const s=new oV;this._add("tapDragZoom",s);const a=e.touchPitch=new ZU(e);this._add("touchPitch",a);const l=new DU(t),c=new zU(t);e.dragRotate=new aV(t,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);const u=new RU(t),h=new BU(e,t);e.dragPan=new sV(r,u,h),this._add("mousePan",u),this._add("touchPan",h,["touchZoom","touchRotate"]);const f=new qU,d=new UU;e.touchZoomRotate=new lV(r,d,f,s),this._add("touchRotate",f,["touchPan","touchZoom"]),this._add("touchZoom",d,["touchPan","touchRotate"]),this._add("blockableMapEvent",new vU(e));const p=e.scrollZoom=new rV(e,this);this._add("scrollZoom",p,["mousePan"]);const m=e.keyboard=new YU;this._add("keyboard",m);for(const r of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])t.interactive&&t[r]&&e[r].enable(t[r])}_add(t,e,r){this._handlers.push({handlerName:t,handler:e,allowed:r}),this._handlersById[t]=e}stop(t){if(!this._updatingCamera){for(const{handler:t}of this._handlers)t.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[],this._originalZoom=void 0}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!cV(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(t,e,r){for(const n in t)if(n!==r&&(!e||e.indexOf(n)<0))return!0;return!1}handleWindowEvent(t){this.handleEvent(t,`${t.type}Window`)}_getMapTouches(t){const e=[];for(const r of t){const t=r.target;this._el.contains(t)&&e.push(r)}return e}handleEvent(t,e){this._updatingCamera=!0;const r="renderFrame"===t.type,n=r?void 0:t,i={needsRenderFrame:!1},o={},s={},a=t.touches?this._getMapTouches(t.touches):void 0,l=a?kr(this._el,a):r?void 0:Mr(this._el,t);for(const{handlerName:r,handler:c,allowed:u}of this._handlers){if(!c.isEnabled())continue;let h;this._blockedByActive(s,u,r)?c.reset():c[e||t.type]&&(h=c[e||t.type](t,l,a),this.mergeHandlerResult(i,o,h,r,n),h&&h.needsRenderFrame&&this._triggerRe
2nderFrame()),(h||c.isActive())&&(s[r]=c)}const c={};for(const t in this._previousActiveHandlers)s[t]||(c[t]=n);this._previousActiveHandlers=s,(Object.keys(c).length||fV(i))&&(this._changes.push([i,o,c]),this._triggerRenderFrame()),(Object.keys(s).length||fV(i))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:u}=i;u&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],u(this._map))}mergeHandlerResult(t,e,r,n,i){if(!r)return;U(t,r);const o={handlerName:n,originalEvent:r.originalEvent||i};void 0!==r.zoomDelta&&(e.zoom=o),void 0!==r.panDelta&&(e.drag=o),void 0!==r.pitchDelta&&(e.pitch=o),void 0!==r.bearingDelta&&(e.rotate=o)}_applyChanges(){const t={},e={},r={};for(const[n,i,o]of this._changes)n.panDelta&&(t.panDelta=(t.panDelta||new b(0,0))._add(n.panDelta)),n.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+n.zoomDelta),n.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+n.bearingDelta),n.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+n.pitchDelta),void 0!==n.around&&(t.around=n.around),void 0!==n.aroundCoord&&(t.aroundCoord=n.aroundCoord),void 0!==n.pinchAround&&(t.pinchAround=n.pinchAround),n.noInertia&&(t.noInertia=n.noInertia),U(e,i),U(r,o);this._updateMapTransform(t,e,r),this._changes=[]}_updateMapTransform(t,e,r){const n=this._map,i=n.transform,o=t=>e[t]&&!this._eventsInProgress[t],s=t=>[t.x,t.y,t.z];if((t=>{const e=this._eventsInProgress[t];return e&&!this._handlersById[e.handlerName].isActive()})("drag")&&!fV(t)){const t=i.zoom;i.cameraElevationReference="sea",null!=this._originalZoom&&i._orthographicProjectionAtLowPitch&&"globe"!==i.projection.name&&0===i.pitch?(i.cameraElevationReference="ground",i.zoom=this._originalZoom):(i.recenterOnTerrain(),i.cameraElevationReference="ground"),t!==i.zoom&&this._map._update(!0)}if(i._isCameraConstrained&&n._stop(!0),!fV(t))return void this._fireEvents(e,r,!0);let{panDelta:a,zoomDelta:l,bearingDelta:c,pitchDelta:u,around:h,aroundCoord:f,pinchAround:d}=t;i._isCameraConstrained&&(l>0&&(l=0),i._isCameraConstrained=!1),void 0!==d&&(h=d),(l||o("drag"))&&h&&(this._dragOrigin=s(i.pointCoordinate3D(h)),this._originalZoom=i.zoom,this._trackingEllipsoid.setup(i._camera.position,this._dragOrigin)),i.cameraElevationReference="sea",n._stop(!0),h=h||n.transform.centerPoint,c&&(i.bearing+=c),u&&(i.pitch+=u),i._updateCameraState();const p=[0,0,0];if(a)if("mercator"===i.projection.name){const t=this._trackingEllipsoid.projectRay(i.screenPointToMercatorRay(h).dir),e=this._trackingEllipsoid.projectRay(i.screenPointToMercatorRay(h.sub(a)).dir);p[0]=e[0]-t[0],p[1]=e[1]-t[1]}else{const t=i.pointCoordinate(h);if("globe"===i.projection.name){a=a.rotate(-i.angle);const e=i._pixelsPerMercatorPixel/i.worldSize;p[0]=-a.x*bx(mx(t.y))*e,p[1]=-a.y*bx(i.center.lat)*e}else{const e=i.pointCoordinate(h.sub(a));t&&e&&(p[0]=e.x-t.x,p[1]=e.y-t.y)}}const m=i.zoom,g=[0,0,0];if(l){const t=s(f||i.pointCoordinate3D(h)),e={dir:Sv.normalize([],Sv.sub([],t,i._camera.position))};if(e.dir[2]<0){const r=i.zoomDeltaToMovement(t,l);Sv.scale(g,e.dir,r)}}const y=Sv.add(p,p,g);i._translateCameraConstrained(y),l&&Math.abs(i.zoom-m)>1e-4&&i.recenterOnTerrain(),i.cameraElevationReference="ground",this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,r,!0)}_fireEvents(t,e,r){const n=cV(this._eventsInProgress),i=cV(t),o={};for(const e in t){const{originalEvent:r}=t[e];this._eventsInProgress[e]||(o[`${e}start`]=r),this._eventsInProgress[e]=t[e]}!n&&i&&this._fireEvent("movestart",i.originalEvent);for(const t in o)this._fireEvent(t,o[t]);i&&this._fireEvent("move",i.originalEvent);for(const e in t){const{originalEvent:r}=t[e];this._fireEvent(e,r)}const s={};let a;for(const t in this._eventsInProgress){const{handlerName:r,originalEvent:n}=this._eventsInProgress[t];this._handlersById[r].isActive()||(delete this._eventsInProgress[t],a=e[r]||n,s[`${t}end`]=a)}for(const t in s)this._fireEvent(t,s[t]);const l=cV(this._eventsInProgress);if(r&&(n||i)&&!l){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),e=t=>0!==t&&-this._bearingSnap<t&&t<this._bearingSnap;
2t?(e(t.bearing||this._map.getBearing())&&(t.bearing=0),this._map.easeTo(t,{originalEvent:a})):(this._map.fire(new Dr("moveend",{originalEvent:a})),e(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(t,e){this._map.fire(new Dr(t,e?{originalEvent:e}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((t=>{this._frameId=void 0,this.handleEvent(new uV("renderFrame",{timeStamp:t})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const pV="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class mV extends Br{constructor(t,e){super(),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=e.bearingSnap,this._respectPrefersReducedMotion=!1!==e.respectPrefersReducedMotion,Y(["_renderFrameCallback"],this)}getCenter(){return new ax(this.transform.center.lng,this.transform.center.lat)}setCenter(t,e){return this.jumpTo({center:t},e)}panBy(t,e,r){return t=b.convert(t).mult(-1),this.panTo(this.transform.center,U({offset:t},e),r)}panTo(t,e,r){return this.easeTo(U({center:t},e),r)}getZoom(){return this.transform.zoom}setZoom(t,e){return this.jumpTo({zoom:t},e),this}zoomTo(t,e,r){return this.easeTo(U({zoom:t},e),r)}zoomIn(t,e){return this.zoomTo(this.getZoom()+1,t,e),this}zoomOut(t,e){return this.zoomTo(this.getZoom()-1,t,e),this}getBearing(){return this.transform.bearing}setBearing(t,e){return this.jumpTo({bearing:t},e),this}getPadding(){return this.transform.padding}setPadding(t,e){return this.jumpTo({padding:t},e),this}rotateTo(t,e,r){return this.easeTo(U({bearing:t},e),r)}resetNorth(t,e){return this.rotateTo(0,U({duration:1e3},t),e),this}resetNorthPitch(t,e){return this.easeTo(U({bearing:0,pitch:0,duration:1e3},t),e),this}snapToNorth(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this}getPitch(){return this.transform.pitch}setPitch(t,e){return this.jumpTo({pitch:t},e),this}cameraForBounds(t,e){t=Oh.convert(t);const r=e&&e.bearing||0,n=e&&e.pitch||0,i=t.getNorthWest(),o=t.getSouthEast();return this._cameraForBounds(this.transform,i,o,r,n,e)}_extendCameraOptions(t){const e={top:0,bottom:0,right:0,left:0};if("number"==typeof(t=U({padding:e,offset:[0,0],maxZoom:this.transform.maxZoom},t)).padding){const e=t.padding;t.padding={top:e,bottom:e,right:e,left:e}}return t.padding=U(e,t.padding),t}_minimumAABBFrustumDistance(t,e){const r=e.max[0]-e.min[0],n=e.max[1]-e.min[1];return r/n>t.aspect?r/(2*Math.tan(.5*t.fovX)*t.aspect):n/(2*Math.tan(.5*t.fovY)*t.aspect)}_cameraForBoundsOnGlobe(t,e,r,n,i,o){const s=t.clone(),a=this._extendCameraOptions(o);s.bearing=n,s.pitch=i;const l=ax.convert(e),c=ax.convert(r),u=.5*(l.lat+c.lat),h=.5*(l.lng+c.lng),f=kb(u,h),d=Sv.normalize([],f),p=Sv.normalize([],Sv.cross([],d,[0,1,0])),m=Sv.cross([],p,d),g=[p[0],p[1],p[2],0,m[0],m[1],m[2],0,d[0],d[1],d[2],0,0,0,0,1],y=[f,kb(l.lat,l.lng),kb(c.lat,l.lng),kb(c.lat,c.lng),kb(l.lat,c.lng),kb(u,l.lng),kb(u,c.lng),kb(l.lat,h),kb(c.lat,h)];let _=nb.fromPoints(y.map((t=>[Sv.dot(p,t),Sv.dot(m,t),Sv.dot(d,t)])));const v=Sv.transformMat4([],_.center,g);0===Sv.squaredLength(v)&&Sv.set(v,0,0,1),Sv.normalize(v,v),Sv.scale(v,v,ab),s.center=Mb(v);const b=s.getWorldToCameraMatrix(),x=_v.invert(new Float64Array(16),b);_=nb.applyTransform(_,_v.multiply([],b,g)),Sv.transformMat4(v,v,b);const w=.5*(_.max[2]-_.min[2]),E=this._minimumAABBFrustumDistance(s,_),S=Sv.scale([],[0,0,1],w),T=Sv.add(S,v,S),A=E+(0===s.pitch?0:Sv.distance(v,T)),O=s.globeCenterInViewSpace,C=Sv.sub([],v,[O[0],O[1],O[2]]);Sv.normalize(C,C),Sv.scale(C,C,A);const M=Sv.add([],v,C);Sv.transformMat4(M,M,x);const k=ix/ab,I=Sv.length(M)*k-ix,P=dx(Math.max(I,Number.EPSILON),0),L=Math.min(s.zoomFromMercatorZAdjusted(P),a.maxZoom);return L>.5*(ib+ob)?(s.setProjection({name:"mercator"}),s.zoom=L,this._cameraForBounds(s,e,r,n,i,o)):{center:s.center,zoom:L,bearing:n,pitch:i}}queryTerrainElevation(t,e){const r=this.transform.elevation;return r?(e=U({},{exaggerated:!0},e),r.getAtPoint(wx.fromLngLat(t),null,e.exaggerated)):null}_cameraForBounds(t,e,r,n,i,o){if("globe"===t.projection.name)return this._cameraForBoundsOnGlobe(t,e,r,n,i,o);const s=t.clone(),a=this._extendCameraOptions(o),l=s.padding;s.bearing=n,s.pitch=i;const c=ax.convert(e),u=ax.convert(r),h=new ax(c.lng,u.lat),f=new ax(u.lng,c.lat),d=s.project(c),p=s.project(u),m=this.queryTerrainElevation(c),g=this.queryTerrainElevation(u),y=this.queryTerrainElevation(h),_=this.queryTerrainElevation(f),v=[[d.x,d.y,Math.min(m||0,g||0,y||0,_||0)],[p.x,p.y,Math.max(m||0,g||0,y||0,_||0)]];let x=nb.fromPoints(v);const w=s.getWorldToCameraMatrix(),E=_v.invert(new Float64Array(16),w);x=nb.applyTransform(x,w);const T=Sv.sub([],x.max,x.min),A=l.left||0,O=l.right||0,C=l.bottom||0,M=l.top||0,{left:k,right:I,top:P,bottom:L}=a.padding,R=.5*(A+O),D=.5*(M+C),z=(s.width-(A+O+k+I))/T[0],B=(s.height-(C+M+L+P))/T[1],j=Math.min(s.scaleZoom(s.scale*Math.min(z,B)),a.maxZoom),F=s.scale/s.zoomScale(j);x=new nb([x.min[0]-(k+R)*F,x.min[1]-(L+D)*F,x.min[2]],[x.max[0]+(I+R)*F,x.max[1]+(P+D)*F,x.max[2]]);const N=.5*T[2],$=this._minimumAABBFrustumDistance(s,x),U=[0,0,1,0];uv.transformMat4(U,U,w),uv.normalize(U,U);const V=Sv.scale([],U,$+N),G=Sv.add([],x.center,V),q=("number"==typeof a.offset.x&&"number"==typeof a.offset.y?new b(a.offset.x,a.offset.y):b.convert(a.offset)).rotate(-S(n));x.center[0]-=q.x*F,x.center[1]+=q.y*F,Sv.transformMat4(x.center,x.center,E),Sv.transformMat4(G,G,E);const H=[x.center[0],x.center[1],G[2]*s.pixelsPerMeter];Sv.scale(H,H,1/s.worldSize);const W=px(H[0]),Z=mx(H[1]),X=Math.min(s._zoomFromMercatorZ(H[2]),a.maxZoom),Y=new ax(W,Z),K=.5*(ib+ob);return s.mercatorFromTransition&&X<K?(s.setProjection({name:"globe"}),s.zoom=X,this._cameraForBounds(s,e,r,n,i,o)):{center:Y,zoom:X,bearing:n,pitch:i}}fitBounds(t,e,r){const n=this.cameraForBounds(t,e);return this._fitInternal(n,e,r)}fitScreenCoordinates(t,e,r,n,i){const o=b.convert(t),s=b.convert(e),a=new b(Math.min(o.x,s.x),Math.min(o.y,s.y)),l=new b(Math.max(o.x,s.x),Math.max(o.y,s.y));if("mercator"===this.transform.projection.name&&this.transform.anyCornerOffEdge(o,s))return this;const c=this.transform.pointLocation3D(a),u=this.transform.pointLocation3D(l),h=this.transform.pointLocation3D(new b(a.x,l.y)),f=this.transform.pointLocation3D(new b(l.x,a.y)),d=[Math.min(c.lng,u.lng,h.lng,f.lng),Math.min(c.lat,u.lat,h.lat,f.lat)],p=[Math.max(c.lng,u.lng,h.lng,f.lng),Math.max(c.lat,u.lat,h.lat,f.lat)],m=n&&n.pitch?n.pitch:this.getPitch(),g=this._cameraForBounds(this.transform,d,p,r,m,n);return this._fitInternal(g,n,i)}_fitInternal(t,e,r){return t?(delete(e=U(t,e)).padding,e.linear?this.easeTo(e,r):this.flyTo(e,r)):this}jumpTo(t,e){this.stop();const r=t.preloadOnly?this.transform.clone():this.transform;let n=!1,i=!1,o=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(n=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=ax.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(i=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(o=!0,r.pitch=+t.pitch),null==t.padding||r.isPaddingEqual(t.padding)||(r.padding=t.padding),t.preloadOnly?(this._preloadTiles(r),this):(this.fire(new Dr("movestart",e)).fire(new Dr("move",e)),n&&this.fire(new Dr("zoomstart",e)).fire(new Dr("zoom",e)).fire(new Dr("zoomend",e)),i&&this.fire(new Dr("rotatestart",e)).fire(new Dr("rotate",e)).fire(new Dr("rotateend",e)),o&&this.fire(new Dr("pitchstart",e)).fire(new Dr("pitch",e)).fire(new Dr("pitchend",e)),this.fire(new Dr("moveend",e)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||it(pV),this.transform.getFreeCameraOptions()}setFreeCameraOptions(t,e){const r=this.transform;if(!r.projection.supportsFreeCamera)return it(pV),this;this.stop();const n=r.zoom,i=r.pitch,o=r.bearing;r.setFreeCameraOptions(t);const s=n!==r.zoom,a=i!==r.pitch,l=o!==r.bearing;return this.fire(new Dr("movestart",e)).fire(new Dr("move",e)),s&&this.fire(new Dr("zoomstart",e)).fire(new Dr("zoom",e)).fire(new Dr("zoomend",e)),l&&this.fire(new Dr("rotatestart",e)).fire(new Dr("rotate",e)).fire(new Dr("rotateend",e)),a&&this.fire(new Dr("pitchstart",e)).fire(new Dr("pitch",e)).fire(new Dr("pitchend",e)),this.fire(new Dr("moveend",e)),this}easeTo(t,e){this._stop(!1,t.easeId),(!1===(t=U({offset:[0,0],duration:500,easing:R},t)).animate||this._prefersReducedMotion(t))&&(t.duration=0);const r=this.transform,n=this.getZoom(),i=this.getBearing(),o=this.getPitch(),s=this.getPadding(),a="zoom"in t?+t.zoom:n,l="bearing"in t?this._normalizeBearing(t.bearing,i):i,c="pitch"in t?+t.pitch:o,u="padding"in t?t.padding:r.padding,h=b.convert(t.offset);let f,d,p;if("globe"===r.projection.name){const e=wx.fromLngLat(r.center),n=h.rotate(-r.angle);e.x+=n.x/r.worldSize,e.y+=n.y/r.worldSize;const i=e.toLngLat(),o=ax.convert(t.center||i);this._normalizeCenter(o),f=r.centerPoint.add(n),d=new b(e.x,e.y).mult(r.worldSize),p=new b(hx(o.lng),fx(o.lat)).mult(r.worldSize).sub(d)}else{f=r.centerPoint.add(h);const e=r.pointLocation(f),n=ax.convert(t.center||e);this._normalizeCenter(n),d=r.project(e),p=r.project(n).sub(d)}const m=r.zoomScale(a-n);let g,y;t.around&&(g=ax.convert(t.around),y=r.locationPoint(g));const _=this._zooming||a!==n,v=this._rotating||i!==l,x=this._pitching||c!==o,w=!r.isPaddingEqual(u),E=r=>b=>{if(_&&(r.zoom=Co(n,a,b)),v&&(r.bearing=Co(i,l,b)),x&&(r.pitch=Co(o,c,b)),w&&(r.interpolatePadding(s,u,b),f=r.centerPoint.add(h)),g)r.setLocationAtPoint(g,y);else{const t=r.zoomScale(r.zoom-n),e=a>n?Math.min(2,m):Math.max(.5,m),i=Math.pow(e,1-b),o=r.unproject(d.add(p.mult(b*i)).mult(t));r.setLocationAtPoint(r.renderWorldCopies?o.wrap():o,f)}return t.preloadOnly||this._fireMoveEvents(e),r};if(t.preloadOnly){const e=this._emulate(E,t.duration,r);return this._preloadTiles(e),this}const S={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=_,this._rotating=v,this._pitching=x,this._padding=w,this._easeId=t.easeId,this._prepareEase(e,t.noMoveStart,S),this._ease(E(r),(t=>{"sea"===r.cameraElevationReference&&r.recenterOnTerrain(),this._afterEase(e,t)}),t),this}_prepareEase(t,e,r={}){this._moving=!0,this.transform.cameraElevationReference="sea",this.transform._orthographicProjectionAtLowPitch&&0===this.transform.pitch&&"globe"!==this.transform.projection.name&&(this.transform.cameraElevationReference="ground"),e||r.moving||this.fire(new Dr("movestart",t)),this._zooming&&!r.zooming&&this.fire(new Dr("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new Dr("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new Dr("pitchstart",t))}_fireMoveEvents(t){this.fire(new Dr("move",t)),this._zooming&&this.fire(new Dr("zoom",t)),this._rotating&&this.fire(new Dr("rotate",t)),this._pitching&&this.fire(new Dr("pitch",t))}_afterEase(t,e){if(this._easeId&&e&&this._easeId===e)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new Dr("zoomend",t)),n&&this.fire(new Dr("rotateend",t)),i&&this.fire(new Dr("pitchend",t)),this.fire(new Dr("moveend",t))}flyTo(t,e){if(this._prefersReducedMotion(t)){const r=V(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(r,e)}this.stop(),t=U({offset:[0,0],speed:1.2,curve:1.42,easing:R},t);const r=this.transform,n=this.getZoom(),i=this.getBearing(),o=this.getPitch(),s=this.getPadding(),a="zoom"in t?D(+t.zoom,r.minZoom,r.maxZoom):n,l="bearing"in t?this._normalizeBearing(t.bearing,i):i,c="pitch"in t?+t.pitch:o,u="padding"in t?t.padding:r.padding,h=r.zoomScale(a-n),f=b.convert(t.offset);let d=r.centerPoint.add(f);const p=r.pointLocation(d),m=ax.convert(t.center||p);this._normalizeCenter(m);const g=r.project(p),y=r.project(m).sub(g);let _=t.curve;const v=Math.max(r.width,r.height),x=v/h,w=y.mag();if("minZoom"in t){const e=D(Math.min(t.minZoom,n,a),r.minZoom,r.maxZoom),i=v/r.zoomScale(e-n);_=Math.sqrt(i/w*2)}const E=_*_;function S(t){const e=(x*x-v*v+(t?-1:1)*E*E*w*w)/(2*(t?x:v)*E*w);return Math.log(Math.sqrt(e*e+1)-e)}function T(t){return(Math.exp(t)-Math.exp(-t))/2}function A(t){return(Math.exp(t)+Math.exp(-t))/2}function O(t){return T(t)/A(t)}const C=S(0);let M=function(t){return A(C)/A(C+_*t)},k=function(t){return v*((A(C)*O(C+_*t)-T(C))/E)/w},I=(S(1)-C)/_;if(Math.abs(w)<1e-6||!isFinite(I)){if(Math.abs(v-x)<1e-6)return this.easeTo(t,e);const r=x<v?-1:1;I=Math.abs(Math.log(x/v))/_,k=function(){return 0},M=function(t){return Math.exp(r*_*t)}}if("duration"in t)t.duration=+t.duration;else{const e="screenSpeed"in t?+t.screenSpeed/_:+t.speed;t.duration=1e3*I/e}t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0);const P=!0,L=i!==l,z=c!==o,B=!r.isPaddingEqual(u),j=r=>h=>{const p=h*I,_=1/M(p);r.zoom=1===h?a:n+r.scaleZoom(_),L&&(r.bearing=Co(i,l,h)),z&&(r.pitch=Co(o,c,h)),B&&(r.interpolatePadding(s,u,h),d=r.centerPoint.add(f));const v=1===h?m:r.unproject(g.add(y.mult(k(p))).mult(_));return r.setLocationAtPoint(r.renderWorldCopies?v.wrap():v,d),r._updateCameraOnTerrain(),t.preloadOnly||this._fireMoveEvents(e),r};if(t.preloadOnly){const e=this._emulate(j,t.duration,r);return this._preloadTiles(e),this}return this._zooming=P,this._rotating=L,this._pitching=z,this._padding=B,this._prepareEase(e,!1),this._ease(j(r),(()=>this._afterEase(e)),t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const t=this._onEaseEnd;this._onEaseEnd=void 0,t.call(this,e)}if(!t){const t=this.handlers;t&&t.stop(!1)}return this}_ease(t,e,r){!1===r.animate||0===r.duration?(t(1),e()):(this._easeStart=vr.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const t=Math.min((vr.now()-this._easeStart)/this._easeOptions.duration,1),e=this._onEaseFrame;e&&e(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(t,e){t=B(t,-180,180);const r=Math.abs(t-e);return Math.abs(t-360-e)<r&&(t-=360),Math.abs(t+360-e)<r&&(t+=360),t}_normalizeCenter(t){const e=this.transform;if(e.maxBounds)return;if("globe"!==e.projection.name&&!e.renderWorldCopies)return;const r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}_prefersReducedMotion(t){const e=t&&t.essential;return this._respectPrefersReducedMotion&&vr.prefersReducedMotion&&!e}_emulate(t,e,r){const n=15,i=Math.ceil(e*n/1e3),o=[],s=t(r.clone());for(let t=0;t<=i;t++){const e=s(t/i);o.push(e.clone())}return o}}class gV{constructor(t={}){this.options=t,Y(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(t){const e=this.options&&this.options.compact;return this._map=t,this._container=br("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=br("button","mapboxgl-ctrl-attrib-button",this._container),br("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=br("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(t,e){const r=this._map._getUIString(`AttributionControl.${e}`);t.removeAttribute("title"),t.firstElementChild&&t.firstElementChild.setAttribute("title",r)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded"
vendor: 4,247 bytes, line 2
2,"false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));const e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.ACCESS_TOKEN}];if(t){const r=e.reduce(((t,r,n)=>(r.value&&(t+=`${r.key}=${r.value}${n<e.length-1?"&":""}`),t)),"?");t.href=`${i.FEEDBACK_URL}/${r}#${sU(this._map,!0)}`,t.rel="noopener nofollow",this._setElementTitle(t,"MapFeedback")}}_updateData(t){!t||"metadata"!==t.sourceDataType&&"visibility"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())}_updateAttributions(){if(!this._map.style)return;let t=[];if(this._map.style.stylesheet){const t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}const e=this._map.style._mergedSourceCaches;for(const r in e){const n=e[r];if(n.used){const e=n.getSource();e.attribution&&t.indexOf(e.attribution)<0&&t.push(e.attribution)}}t.sort(((t,e)=>t.length-e.length)),t=t.filter(((e,r)=>{for(let n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0})),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=[...this.options.customAttribution,...t]:t.unshift(this.options.customAttribution));const r=t.join(" | ");r!==this._attribHTML&&(this._attribHTML=r,t.length?(this._innerContainer.innerHTML=r,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class yV{constructor(){Y(["_updateLogo","_updateCompact"],this)}onAdd(t){this._map=t,this._container=br("div","mapboxgl-ctrl");const e=br("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const t=this._map.style._sourceCaches;if(0===Object.entries(t).length)return!0;for(const e in t){const r=t[e].getSource();if(r.hasOwnProperty("mapbox_logo")&&!r.mapbox_logo)return!1}return!0}_updateCompact(){const t=this._container.children;if(t.length){const e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}}}class _V{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e}remove(t){const e=this._currentlyRunning,r=e?this._queue.concat(e):this._queue;for(const e of r)if(e.id===t)return void(e.cancelled=!0)}run(t=0){const e=this._currentlyRunning=this._queue;this._queue=[];for(const r of e)if(!r.cancelled&&(r.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function vV(t,e,r){if(t=new ax(t.lng,t.lat),e){const n=new ax(t.lng-360,t.lat),i=new ax(t.lng+360,t.lat),o=360*Math.ceil(Math.abs(t.lng-r.center.lng)/360),s=r.locationPoint(t).distSqr(e),a=e.x<0||e.y<0||e.x>r.width||e.y>r.height;r.locationPoint(n).distSqr(e)<s&&(a||Math.abs(n.lng-r.center.lng)<o)?t=n:r.locationPoint(i).distSqr(e)<s&&(a||Math.abs(i.lng-r.center.lng)<o)&&(t=i)}for(;Math.abs(t.lng-r.center.lng)>180;){const e=r.locationPoint(t);if(e.x>=0&&e.y>=0&&e.x<=r.width&&e.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}
2const bV={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class xV extends Br{constructor(t,r){if(super(),(t instanceof e.HTMLElement||r)&&(t=U({element:t},r)),Y(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment||"auto",this._updateMoving=()=>this._update(!0),this._occludedOpacity=t&&t.occludedOpacity||.2,t&&t.element)this._element=t.element,this._offset=b.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=br("div");const e=41,r=27,n=xr("svg",{display:"block",height:e*this._scale+"px",width:r*this._scale+"px",viewBox:`0 0 ${r} ${e}`},this._element),i=xr("radialGradient",{id:"shadowGradient"},xr("defs",{},n));xr("stop",{offset:"10%","stop-opacity":.4},i),xr("stop",{offset:"100%","stop-opacity":.05},i),xr("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},n),xr("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},n),xr("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},n),xr("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},n),this._offset=b.convert(t&&t.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.hasAttribute("role")||this._element.setAttribute("role","img"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(t=>{t.preventDefault()})),this._element.addEventListener("mousedown",(t=>{t.preventDefault()}));const n=this._element.classList;for(const t in bV)n.remove(`mapboxgl-marker-anchor-${t}`);n.add(`mapboxgl-marker-anchor-${this._anchor}`);const i=t&&t.className?t.className.trim().split(/\s+/):[];n.add(...i),this._popup=null}addTo(t){return t===this._map||(this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._updateMoving),t.on("moveend",this._update),t.on("remove",this._clearFadeTimer),t._addMarker(this),this.setDraggable(this._draggable),this._update(),t.on("click",this._onMapClick)),this}remove(){const t=this._map;return t&&(t.off("click",this._onMapClick),t.off("move",this._updateMoving),t.off("moveend",this._update),t.off("mousedown",this._addDragHandler),t.off("touchstart",this._addDragHandler),t.off("mouseup",this._onUp),t.off("touchend",this._onUp),t.off("mousemove",this._onMove),t.off("touchmove",this._onMove),t.off("remove",this._clearFadeTimer),t._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=ax.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const e=38.1,r=13.5,n=Math.sqrt(Math.pow(r,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
20,-e],"bottom-left":[n,-1*(e-r+n)],"bottom-right":[-n,-1*(e-r+n)],left:[r,-1*(e-r)],right:[-r,-1*(e-r)]}:this._offset}this._popup=t,t._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(t){const e=t.code,r=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==r&&13!==r||this.togglePopup()}_onMapClick(t){const e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const t=this._popup;return t?(t.isOpen()?(t.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(t.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const t=this._map,e=this._pos;if(!t||!e)return!1;const r=t.unproject(e),n=t.getFreeCameraOptions();if(!n.position)return!1;const i=n.position.toLngLat();return i.distanceTo(r)<.9*i.distanceTo(this._lngLat)}_evaluateOpacity(){const t=this._map;if(!t)return;const e=this._pos;if(!e||e.x<0||e.x>t.transform.width||e.y<0||e.y>t.transform.height)return void this._clearFadeTimer();const r=t.unproject(e);let n;t._showingGlobe()&&Kb(t.transform,this._lngLat)?n=0:(n=1-t._queryFogOpacity(r),t.transform._terrainEnabled()&&t.getTerrain()&&this._behindTerrain()&&(n*=this._occludedOpacity)),this._element.style.opacity=`${n}`,this._element.style.pointerEvents=n>0?"auto":"none",this._popup&&this._popup._setOpacity(n),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const t=this._pos,e=this._map;if(!t||!e)return;const r=this._offset.mult(this._scale);this._element.style.transform=`\n            translate(${t.x}px,${t.y}px)\n            ${bV[this._anchor]}\n            ${this._calculateXYTransform()} ${this._calculateZTransform()}\n            translate(${r.x}px,${r.y}px)\n        `}_calculateXYTransform(){const t=this._pos,e=this._map,r=this.getPitchAlignment();if(!e||!t||"map"!==r)return"";if(!e._showingGlobe()){const t=e.getPitch();return t?`rotateX(${t}deg)`:""}const n=T(Yb(e.transform,this._lngLat)),i=t.sub(Zb(e.transform)),o=Math.abs(i.x)+Math.abs(i.y);if(0===o)return"";const s=n/o,a=i.x*s;return`rotateX(${-i.y*s}deg) rotateY(${a}deg)`}_calculateZTransform(){const t=this._pos,e=this._map;if(!e||!t)return"";let r=0;const n=this.getRotationAlignment();if("map"===n)if(e._showingGlobe()){const t=e.project(new ax(this._lngLat.lng,this._lngLat.lat+.001)),n=e.project(new ax(this._lngLat.lng,this._lngLat.lat-.001)).sub(t);r=T(Math.atan2(n.y,n.x))-90}else r=-e.getBearing();else if("horizon"===n){const n=z(4,6,e.getZoom()),i=Zb(e.transform);i.y+=n*e.transform.height;const o=t.sub(i),s=T(Math.atan2(o.y,o.x));r=(s>90?s-270:s+90)*(1-n)}return r+=this._rotation,r?`rotateZ(${r}deg)`:""}_update(t){e.cancelAnimationFrame(this._updateFrameId);const r=this._map;
vendor: 6,363 bytes, line 2
2r&&(r.transform.renderWorldCopies&&(this._lngLat=vV(this._lngLat,this._pos,r.transform)),this._pos=r.project(this._lngLat),!0===t?this._updateFrameId=e.requestAnimationFrame((()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())})):this._pos=this._pos.round(),r._requestDomTask((()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(r._showingGlobe()||r.getTerrain()||r.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))})))}getOffset(){return this._offset}setOffset(t){return this._offset=b.convert(t),this._update(),this}addClassName(t){return this._element.classList.add(t),this}removeClassName(t){return this._element.classList.remove(t),this}toggleClassName(t){return this._element.classList.toggle(t)}_onMove(t){const e=this._map;if(!e)return;const r=this._pointerdownPos,n=this._positionDelta;if(r&&n){if(!this._isDragging){const n=this._clickTolerance||e._clickTolerance;if(t.point.dist(r)<n)return;this._isDragging=!0}this._pos=t.point.sub(n),this._lngLat=e.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new Dr("dragstart"))),this.fire(new Dr("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const t=this._map;t&&(t.off("mousemove",this._onMove),t.off("touchmove",this._onMove)),"active"===this._state&&this.fire(new Dr("dragend")),this._state="inactive"}_addDragHandler(t){const e=this._map,r=this._pos;e&&r&&this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(r),this._pointerdownPos=t.point,this._state="pending",e.on("mousemove",this._onMove),e.on("touchmove",this._onMove),e.once("mouseup",this._onUp),e.once("touchend",this._onUp))}setDraggable(t){this._draggable=!!t;const e=this._map;return e&&(t?(e.on("mousedown",this._addDragHandler),e.on("touchstart",this._addDragHandler)):(e.off("mousedown",this._addDragHandler),e.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return"auto"===this._rotationAlignment||"horizon"===this._rotationAlignment&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t||"auto",this._update(),this}getPitchAlignment(){return"auto"===this._pitchAlignment?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(t){return this._occludedOpacity=t||.2,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const wV={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},EV=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class SV extends Br{constructor(t){super(),this.options=U(Object.create(wV),t),Y(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(t&&t.className?t.className.trim().split(/\s+/):[])}addTo(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&t.on("preclick",this._onClose),this.options.closeOnMove&&t.on("move",this._onClose),t.on("remove",this.remove),this._update(),t._addPopup(this),this._focusFirstElement(),this._trackPointer?(t.on("mousemove",this._onMouseEvent),t.on("mouseup",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")):t.on("move",this._update),this.fire(new Dr("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const t=this._map;return t&&(t.off("move",this._update),t.off("move",this._onClose),t.off("preclick",this._onClose),t.off("click",this._onClose),t.off("remove",this.remove),t.off("mousemove",this._onMouseEvent),t.off("mouseup",this._onMouseEvent),t.off("drag",this._onMouseEvent),t._canvasContainer&&t._canvasContainer.classList.remove("mapboxgl-track-pointer"),t._removePopup(this),this._map=void 0),this.fire(new Dr("close")),this}getLngLat(){return this._lngLat}setLngLat(t){this._lngLat=ax.convert(t),this._pos=null,this._trackPointer=!1,this._update();const e=this._map;return e&&(e.on("move",this._update),e.off("mousemove",this._onMouseEvent),e._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const t=this._map;return t&&(t.off("move",this._update),t.on("mousemove",this._onMouseEvent),t.on("drag",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(t){return this.setDOMContent(e.document.createTextNode(t))}setHTML(t){const r=e.document.createDocumentFragment(),n=e.document.createElement("body");let i;for(n.innerHTML=t;i=n.firstChild,i;)r.appendChild(i);return this.setDOMContent(r)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(t){return this.options.maxWidth=t,this._update(),this}setDOMContent(t){let e=this._content;if(e)for(;e.hasChildNodes();)e.firstChild&&e.removeChild(e.firstChild);else e=this._content=br("div","mapboxgl-popup-content",this._container||void 0);if(e.appendChild(t),this.options.closeButton){const t=this._closeButton=br("button","mapboxgl-popup-close-button",e);t.type="button",t.setAttribute("aria-label","Close popup"),t.setAttribute("aria-hidden","true"),t.innerHTML="&#215;",t.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(t){return this._classList.add(t),this._updateClassList(),this}removeClassName(t){return this._classList.delete(t),this._updateClassList(),this}setOffset(t){return this.options.offset=t,this._update(),this}toggleClassName(t){let e;return this._classList.delete(t)?e=!1:(this._classList.add(t),e=!0),this._updateClassList(),e}_onMouseEvent(t){this._update(t.point)}_getAnchor(t){if(this.options.anchor)return this.options.anchor;const e=this._map,r=this._container,n=this._pos;if(!e||!r||!n)return"bottom";
2const i=r.offsetWidth,o=r.offsetHeight,s=n.y+t<o,a=n.y>e.transform.height-o,l=n.x<i/2,c=n.x>e.transform.width-i/2;if(s)return l?"top-left":c?"top-right":"top";if(a){if(l)return"bottom-left";if(c)return"bottom-right"}return l?"left":c?"right":"bottom"}_updateClassList(){const t=this._container;if(!t)return;const e=[...this._classList];e.push("mapboxgl-popup"),this._anchor&&e.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&e.push("mapboxgl-popup-track-pointer"),t.className=e.join(" ")}_update(t){const e=this._lngLat||this._trackPointer,r=this._map,n=this._content;if(!r||!e||!n)return;let i=this._container;if(i||(i=this._container=br("div","mapboxgl-popup",r.getContainer()),this._tip=br("div","mapboxgl-popup-tip",i),i.appendChild(n)),this.options.maxWidth&&i.style.maxWidth!==this.options.maxWidth&&(i.style.maxWidth=this.options.maxWidth),r.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=vV(this._lngLat,this._pos,r.transform)),!this._trackPointer||t){const e=this._pos=this._trackPointer&&t?t:r.project(this._lngLat),n=TV(this.options.offset),i=this._anchor=this._getAnchor(n.y),o=TV(this.options.offset,i),s=e.add(o).round();r._requestDomTask((()=>{this._container&&i&&(this._container.style.transform=`${bV[i]} translate(${s.x}px,${s.y}px)`)}))}if(!this._marker&&r._showingGlobe()){const t=Kb(r.transform,this._lngLat)?0:1;this._setOpacity(t)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const t=this._container.querySelector(EV);t&&t.focus()}_onClose(){this.remove()}_setOpacity(t){this._container&&(this._container.style.opacity=`${t}`),this._content&&(this._content.style.pointerEvents=t?"auto":"none")}}function TV(t=new b(0,0),e="bottom"){if("number"==typeof t){const r=Math.round(Math.sqrt(.5*Math.pow(t,2)));switch(e){case"top":return new b(0,t);case"top-left":return new b(r,r);case"top-right":return new b(-r,r);case"bottom":return new b(0,-t);case"bottom-left":return new b(r,-r);case"bottom-right":return new b(-r,-r);case"left":return new b(t,0);case"right":return new b(-t,0)}return new b(0,0)}return t instanceof b||Array.isArray(t)?b.convert(t):b.convert(t[e]||[0,0])}class AV{constructor(t){this.jumpTo(t)}getValue(t){if(t<=this._startTime)return this._start;if(t>=this._endTime)return this._end;const e=C((t-this._startTime)/(this._endTime-this._startTime));return this._start*(1-e)+this._end*e}isEasing(t){return t>=this._startTime&&t<=this._endTime}jumpTo(t){this._startTime=-1/0,this._endTime=-1/0,this._start=t,this._end=t}easeTo(t,e,r){this._start=this.getValue(e),this._end=t,this._startTime=e,this._endTime=e+r}}const OV={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use ⌘ + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},CV=500,MV=300,kV=1,IV=1e-4,PV=-2,LV=22,RV=0,DV=85,zV={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:PV,maxZoom:LV,minPitch:RV,maxPitch:DV,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,antialias:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,respectPrefersReducedMotion:!0,crossSourceCollisions:!0,collectResourceTiming:!1,testMode:!1};let BV=class extends mV{constructor(t){Ue.mark($e.create);const r=t;if(null!=(t=U({},zV,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<RV)throw new Error(`minPitch must be greater than or equal to ${RV}`);if(null!=t.maxPitch&&t.maxPitch>DV)throw new Error(`maxPitch must be less than or equal to ${DV}`);if(t.antialias&&pt(e)&&(t.antialias=!1,it("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new _k(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),t),this._interactive=t.interactive,this._minTileCacheSize=t.minTileCacheSize,this._maxTileC
2acheSize=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._isInitialLoad=!0,this._crossSourceCollisions=t.crossSourceCollisions,this._collectResourceTiming=t.collectResourceTiming,this._language=this._parseLanguage(t.language),this._worldview=t.worldview,this._renderTaskQueue=new _V,this._domRenderTaskQueue=new _V,this._controls=[],this._markers=[],this._popups=[],this._mapId=q(),this._locale=U({},OV,t.locale),this._clickTolerance=t.clickTolerance,this._cooperativeGestures=t.cooperativeGestures,this._performanceMetricsCollection=t.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new AV(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new ce(t.transformRequest,t.accessToken,t.testMode),this._silenceAuthErrors=!!t.testMode,t.contextCreateOptions?this._contextCreateOptions={...t.contextCreateOptions}:this._contextCreateOptions={},"string"==typeof t.container){if(this._container=e.document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container.toString()}' not found.`)}else{if(!(t.container instanceof e.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(this._container.childNodes.length>0&&it("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),t.maxBounds&&this.setMaxBounds(t.maxBounds),Y(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");if(this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),void 0!==e&&(this._fullscreenchangeEvent="onfullscreenchange"in e.document?"fullscreenchange":"webkitfullscreenchange",e.addEventListener("online",this._onWindowOnline,!1),e.addEventListener("resize",this._onWindowResize,!1),e.addEventListener("orientationchange",this._onWindowResize,!1),e.addEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),e.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new dV(this,t),this._localFontFamily=t.localFontFamily,this._localIdeographFontFamily=t.localIdeographFontFamily,t.style||!t.testMode){const e=t.style||i.DEFAULT_STYLE;this.setStyle(e,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily})}t.projection&&this.setProjection(t.projection);const n="string"==typeof t.hash&&t.hash||void 0;if(t.hash&&(this._hash=new oU(n).addTo(this)),!this._hash||!this._hash._onHashChange()){null==r.center&&null==r.zoom||(this.transform._unmodified=!1),this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch});const e=t.bounds;e&&(this.resize(),this.fitBounds(e,U({},t.fitBoundsOptions,{duration:0})))}this.resize(),t.attributionControl&&this.addControl(new gV({customAttribution:t.customAttribution})),this._logoControl=new yV,this.addControl(this._logoControl,t.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(t=>{this._update("style"===t.dataType),this.fire(new Dr(`${t.dataType}data`,t))})),this.on("dataloading",(t=>{this.fire(new Dr(`${t.dataType}dataloading`,t))}))}_getMapId(){return this._mapId}addControl(t,e){if(void 0===e&&(e=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new zr(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=t.onAdd(this);this._controls.push(t);const n=this._controlPositions[e];
2return-1!==e.indexOf("bottom")?n.insertBefore(r,n.firstChild):n.appendChild(r),this}removeControl(t){if(!t||!t.onRemove)return this.fire(new zr(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(t);return e>-1&&this._controls.splice(e,1),t.onRemove(this),this}hasControl(t){return this._controls.indexOf(t)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(t){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const e=!this._moving;return e&&this.fire(new Dr("movestart",t)).fire(new Dr("move",t)),this.fire(new Dr("resize",t)),e&&this.fire(new Dr("moveend",t)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(t){return this.transform.setMaxBounds(Oh.convert(t)),this._update()}setMinZoom(t){if((t=null==t?PV:t)>=PV&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t?this.setZoom(t):this.fire(new Dr("zoomstart")).fire(new Dr("zoom")).fire(new Dr("zoomend")),this;throw new Error(`minZoom must be between ${PV} and the current maxZoom, inclusive`)}getMinZoom(){return this.transform.minZoom}setMaxZoom(t){if((t=null==t?LV:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t?this.setZoom(t):this.fire(new Dr("zoomstart")).fire(new Dr("zoom")).fire(new Dr("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(t){if((t=null==t?RV:t)<RV)throw new Error(`minPitch must be greater than or equal to ${RV}`);if(t>=RV&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t?this.setPitch(t):this.fire(new Dr("pitchstart")).fire(new Dr("pitch")).fire(new Dr("pitchend")),this;throw new Error(`minPitch must be between ${RV} and the current maxPitch, inclusive`)}getMinPitch(){return this.transform.minPitch}setMaxPitch(t){if((t=null==t?DV:t)>DV)throw new Error(`maxPitch must be less than or equal to ${DV}`);if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t?this.setPitch(t):this.fire(new Dr("pitchstart")).fire(new Dr("pitch")).fire(new Dr("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(t){return this.transform.renderWorldCopies=t,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(t){return"auto"===t?e.navigator.language:Array.isArray(t)?0===t.length?void 0:t.map((t=>"auto"===t?e.navigator.language:t)):t}setLanguage(t){const e=this._parseLanguage(t);if(!this.style||e===this._language)return this;this._language=e,this.style.reloadSources();for(const t of this._controls)t._setLanguage&&t._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(t){return this.style&&t!==this._worldview?(this._worldview=t,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return"globe"===this.transform.projection.name}setProjection(t){return this._lazyInitEmptyStyle(),t?"string"==typeof t&&(t={name:t}):t=null,this._useExplicitProjection=!!t,this._prioritizeAndUpdateProjection(t,this.style.projection)}_updateProjectionTransition(){if("globe"!==this.getProjection().name)return;const t=this.transform,e=t.projection.name;let r;"globe"===e&&t.zoom>=ob?(t.setMercatorFromTransition(),r=!0):"mercator"===e&&t.zoom<ob&&(t.setProjection({name:"globe"}),r=!0),r&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayer
2Update())}_prioritizeAndUpdateProjection(t,e){const r=t||e||{name:"mercator"};return this._updateProjection(r)}_updateProjection(t){let e;return e="globe"===t.name&&this.transform.zoom>=ob?this.transform.setMercatorFromTransition():this.transform.setProjection(t),this.style.applyProjectionUpdate(),e&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(t){return this.transform.locationPoint3D(ax.convert(t))}unproject(t){return this.transform.pointLocation3D(b.convert(t))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(t,e,r){if("mouseenter"===t||"mouseover"===t){let n=!1;const i=i=>{const o=e.filter((t=>this.getLayer(t))),s=o.length?this.queryRenderedFeatures(i.point,{layers:o}):[];s.length?n||(n=!0,r.call(this,new mU(t,this,i.originalEvent,{features:s}))):n=!1},o=()=>{n=!1};return{layers:new Set(e),listener:r,delegates:{mousemove:i,mouseout:o}}}if("mouseleave"===t||"mouseout"===t){let n=!1;const i=i=>{const o=e.filter((t=>this.getLayer(t)));(o.length?this.queryRenderedFeatures(i.point,{layers:o}):[]).length?n=!0:n&&(n=!1,r.call(this,new mU(t,this,i.originalEvent)))},o=e=>{n&&(n=!1,r.call(this,new mU(t,this,e.originalEvent)))};return{layers:new Set(e),listener:r,delegates:{mousemove:i,mouseout:o}}}{const n=t=>{const n=e.filter((t=>this.getLayer(t))),i=n.length?this.queryRenderedFeatures(t.point,{layers:n}):[];i.length&&(t.features=i,r.call(this,t),delete t.features)};return{layers:new Set(e),listener:r,delegates:{[t]:n}}}}on(t,e,r){if(void 0===r)return super.on(t,e);if(Array.isArray(e)||(e=[e]),e)for(const t of e)if(!this._isValidId(t))return this;const n=this._createDelegatedListener(t,e,r);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(n);for(const t in n.delegates)this.on(t,n.delegates[t]);return this}once(t,e,r){if(void 0===r)return super.once(t,e);if(Array.isArray(e)||(e=[e]),e)for(const t of e)if(!this._isValidId(t))return this;const n=this._createDelegatedListener(t,e,r);for(const t in n.delegates)this.once(t,n.delegates[t]);return this}off(t,e,r){if(void 0===r)return super.off(t,e);e=new Set(Array.isArray(e)?e:[e]);for(const t of e)if(!this._isValidId(t))return this;const n=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0},i=t=>{for(let i=0;i<t.length;i++){const o=t[i];if(o.listener===r&&n(o.layers,e)){for(const t in o.delegates)this.off(t,o.delegates[t]);return t.splice(i,1),this}}},o=this._delegatedListeners?this._delegatedListeners[t]:void 0;return o&&i(o),this}queryRenderedFeatures(t,e){if(!this.style)return[];if(void 0!==e||void 0===t||t instanceof b||Array.isArray(t)||(e=t,t=void 0),e=e||{},t=t||[[0,0],[this.transform.width,this.transform.height]],e.layers&&Array.isArray(e.layers))for(const t of e.layers)if(!this._isValidId(t))return[];return this.style.queryRenderedFeatures(t,e,this.transform)}querySourceFeatures(t,e){return this._isValidId(t)?this.style.querySourceFeatures(t,e):[]}isPointOnSurface(t){const{name:e}=this.transform.projection;return"globe"!==e&&"mercator"!==e&&it(`${e} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(b.convert(t))}setStyle(t,e){return!1!==(e=U({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},e)).diff&&e.localIdeographFontFamily===this._localIdeographFontFamily&&e.localFontFamily===this._localFontFamily&&this.style&&t?(this._diffStyle(t,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._localFontFamily=e.localFontFamily,this._updateStyle(t,e))}_getUIString(t){const e=this._locale[t];if(null==e)throw new Error(`Missing UI string '${t}'`);return e}_updateStyle(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),t&&(this.style=new nU(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t)),this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new nU(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(t,e){if("string"==typeof t){const r=this._requestManager.normalizeStyleURL(t),n=this._requestManager.transformRequest(r,Vt.Style);Yt(n,((t,r)=>{t?this.fire(new zr(t)):r&&this._updateDiff(r,e)}))}else"object"==typeof t&&this._updateDiff(t,e)}_updateDiff(t,e){try{this.style.setState(t)&&this._update(!0)}catch(r){it(`Unable to perform style diff: ${r.message||r.error||r}.  Rebuilding the style from scratch.`),this._updateStyle(t,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(it("There is no style added to the map."),!1)}_isValidId(t){return null==t?(this.fire(new zr(new Error("IDs can't be empty."))),!1):!zc(t)||(this.fire(new zr(new Error(`IDs can't 
2contain special symbols: "${t}".`))),!1)}addSource(t,e){return this._isValidId(t)?(this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)):this}isSourceLoaded(t){return!!this._isValidId(t)&&!!this.style&&this.style._isSourceCacheLoaded(t)}areTilesLoaded(){const t=this.style&&this.style._sourceCaches;for(const e in t){const r=t[e]._tiles;for(const t in r){const e=r[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}}return!0}addSourceType(t,e,r){this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,r)}removeSource(t){return this._isValidId(t)?(this.style.removeSource(t),this._updateTerrain(),this._update(!0)):this}getSource(t){return this._isValidId(t)?this.style.getOwnSource(t):null}addImage(t,r,{pixelRatio:n=1,sdf:i=!1,stretchX:o,stretchY:s,content:a}={}){this._lazyInitEmptyStyle();const l=0;if(r instanceof e.HTMLImageElement||e.ImageBitmap&&r instanceof e.ImageBitmap){const{width:e,height:c,data:u}=vr.getImageData(r);this.style.addImage(t,{data:new vw({width:e,height:c},u),pixelRatio:n,stretchX:o,stretchY:s,content:a,sdf:i,version:l})}else if(void 0===r.width||void 0===r.height)this.fire(new zr(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:e,height:c}=r,u=r,h=u.data;this.style.addImage(t,{data:new vw({width:e,height:c},new Uint8Array(h)),pixelRatio:n,stretchX:o,stretchY:s,content:a,sdf:i,version:l,userImage:u}),u.onAdd&&u.onAdd(this,t)}}updateImage(t,r){this._lazyInitEmptyStyle();const n=this.style.getImage(t);if(!n)return void this.fire(new zr(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const i=r instanceof e.HTMLImageElement||e.ImageBitmap&&r instanceof e.ImageBitmap?vr.getImageData(r):r,{width:o,height:s}=i,a=i.data;if(void 0===o||void 0===s)return void this.fire(new zr(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(o!==n.data.width||s!==n.data.height)return void this.fire(new zr(new Error(`The width and height of the updated image (${o}, ${s})\n                must be that same as the previous version of the image\n                (${n.data.width}, ${n.data.height})`)));const l=!(r instanceof e.HTMLImageElement||e.ImageBitmap&&r instanceof e.ImageBitmap);n.data.replace(a,l),this.style.updateImage(t,n)}hasImage(t){return t?!!this.style&&!!this.style.getImage(t):(this.fire(new zr(new Error("Missing required image id"))),!1)}removeImage(t){this.style.removeImage(t)}loadImage(t,r){se(this._requestManager.transformRequest(t,Vt.Image),((t,n)=>{r(t,n instanceof e.HTMLImageElement?vr.getImageData(n):n)}))}listImages(){return this.style.listImages()}addModel(t,e){this._lazyInitEmptyStyle(),this.style.addModel(t,e)}hasModel(t){return t?this.style.hasModel(t):(this.fire(new zr(new Error("Missing required model id"))),!1)}removeModel(t){this.style.removeModel(t)}listModels(){return this.style.listModels()}addLayer(t,e){return this._isValidId(t.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)):this}moveLayer(t,e){return this._isValidId(t)?(this.style.moveLayer(t,e),this._update(!0)):this}removeLayer(t){return this._isValidId(t)?(this.style.removeLayer(t),this._update(!0)):this}getLayer(t){return this._isValidId(t)?this.style.getOwnLayer(t):null}setLayerZoomRange(t,e,r){return this._isValidId(t)?(this.style.setLayerZoomRange(t,e,r),this._update(!0)):this}setFilter(t,e,r={}){return this._isValidId(t)?(this.style.setFilter(t,e,r),this._update(!0)):this}getFilter(t){return this._isValidId(t)?this.style.getFilter(t):null}setPaintProperty(t,e,r,n={}){return this._isValidId(t)?(this.style.setPaintProperty(t,e,r,n),this._update(!0)):this}getPaintProperty(t,e){return this._isValidId(t)?this.style.getPaintProperty(t,e):null}setLayoutProperty(t,e,r,n={}){return this._isValidId(t)?(this.style.setLayoutProperty(t,e,r,n),this._update(!0)):this}getLayoutProperty(t,e){return this._isValidId(t)?this.style.getLayoutProperty(t,e):null}getConfigProperty(t,e){return this.style.getConfigProperty(t,e)}setConfigProperty(t,e,r){return this.style.setConfigProperty(t,e,r),this._update(!0)}setLights(t){if(this._lazyInitEmptyStyle(),t&&1===t.length&&"flat"===t[0].type){const e=t[0];e.properties?this.style.setFlatLight(e.properties,e.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(t),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const t=this.style.getLights()||[];return 0===t.length&&t.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),t}setLight(t,e={}
2){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:t}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(t){return this._lazyInitEmptyStyle(),!t&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(t),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(t){return this._lazyInitEmptyStyle(),this.style.setFog(t),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setCamera(t){return this.style.setCamera(t),this._triggerCameraUpdate(t)}_triggerCameraUpdate(t){return this._update(this.transform.setOrthographicProjectionAtLowPitch("orthographic"===t["camera-projection"]))}getCamera(){return this.style.camera}_queryFogOpacity(t){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(ax.convert(t),this.transform):0}setFeatureState(t,e){return this._isValidId(t.source)?(this.style.setFeatureState(t,e),this._update()):this}removeFeatureState(t,e){return this._isValidId(t.source)?(this.style.removeFeatureState(t,e),this._update()):this}getFeatureState(t){return this._isValidId(t.source)?this.style.getFeatureState(t):null}_updateContainerDimensions(){if(!this._container)return;const t=this._container.getBoundingClientRect().width||400,r=this._container.getBoundingClientRect().height||300;let n,i,o,s=this._container;for(;s&&(!i||!o);){const t=e.getComputedStyle(s).transform;t&&"none"!==t&&(n=t.match(/matrix.*\((.+)\)/)[1].split(", "),n[0]&&"0"!==n[0]&&"1"!==n[0]&&(i=n[0]),n[3]&&"0"!==n[3]&&"1"!==n[3]&&(o=n[3])),s=s.parentElement}this._containerWidth=i?Math.abs(t/i):t,this._containerHeight=o?Math.abs(r/o):r}_detectMissingCSS(){"rgb(250, 128, 114)"!==e.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&it("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/.")}_setupContainer(){const t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=br("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();const e=this._canvasContainer=br("div","mapboxgl-canvas-container",t);this._canvas=br("canvas","mapboxgl-canvas",e),this._interactive&&(e.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const r=this._controlContainer=br("div","mapboxgl-control-container",t),n=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((t=>{n[t]=br("div",`mapboxgl-ctrl-${t}`,r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(t,e){const r=vr.devicePixelRatio||1;this._canvas.width=r*Math.ceil(t),this._canvas.height=r*Math.ceil(e),this._canvas.style.width=`${t}px`,this._canvas.style.height=`${e}px`}_addMarker(t){this._markers.push(t)}_removeMarker(t){const e=this._markers.indexOf(t);-1!==e&&this._markers.splice(e,1)}_addPopup(t){this._popups.push(t)}_removePopup(t){const e=this._popups.indexOf(t);-1!==e&&this._popups.splice(e,1)}_setupPainter(){const t=U({},Ye.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),e=this._canvas.getContext("webgl2",t);e?(je(e,!0),this.painter=new j$(e,this._contextCreateOptions,this.transform),this.on("data",(t=>{"source"===t.dataType&&this.painter.setTileLoadedFlag(!0)})),o.testSupport(e)):this.fire(new zr(new Error("Failed to initialize WebGL")))}_contextLost(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new Dr("webglcontextlost",{originalEvent:t}))}_contextRestored(t){this._setupPainter(),this.resize(),this._update(),this.fire(new Dr("webglcontextrestored",{originalEvent:t}))}_onMapScroll(t){if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(t){return this._update(),this._renderTaskQueue.add(t)}_cancelRenderFrame(t){this._renderTaskQueue.remove(t)}_requestDomTask(t){!this.loaded()||this.loaded()&&!this.isMoving()?t():this._domRenderTaskQueue.add(t)}_render(t){let r;this.fire(new Dr("renderstart"));const n=this.painter.context.extTimerQuery,i=vr.now(),o=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(r=o.createQuery(),o.beginQuery(n.TIME_ELAPSED_EXT,r)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&
2(this._interactionRange[0]=Math.min(this._interactionRange[0],e.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],e.performance.now())),this._renderTaskQueue.run(t),this._domRenderTaskQueue.run(t),this._removed)return;this._updateProjectionTransition();const s=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,e=this.transform.pitch,r=vr.now(),n=new bc(t,{now:r,fadeDuration:s,pitch:e,transition:this.style.transition});this.style.update(n)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let a=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),a=this._updateAverageElevation(i),this.style.updateSources(this.transform),this._forceMarkerAndPopupUpdate()):a=this._updateAverageElevation(i),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,s,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:s,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new Dr("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new Dr("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),r){const t=vr.now()-i;o.endQuery(n.TIME_ELAPSED_EXT),setTimeout((()=>{const n=o.getQueryParameter(r,o.QUERY_RESULT)/1e6;o.deleteQuery(r),this.fire(new Dr("gpu-timing-frame",{cpuTime:t,gpuTime:n})),e.performance.mark("frame-gpu",{startTime:i,detail:{gpuTime:n}})}),50)}if(this.listens("gpu-timing-layer")){const t=this.painter.collectGpuTimers();setTimeout((()=>{const e=this.painter.queryGpuTimers(t);this.fire(new Dr("gpu-timing-layer",{layerTimes:e}))}),50)}if(this.listens("gpu-timing-deferred-render")){const t=this.painter.collectDeferredRenderGpuQueries();setTimeout((()=>{const e=this.painter.queryGpuTimeDeferredRender(t);this.fire(new Dr("gpu-timing-deferred-render",{gpuTime:e}))}),50)}const l=this._sourcesDirty||this._styleDirty||this._placementDirty||a;if(l||this._repaint)this.triggerRepaint();else{const t=!this.isMoving()&&this.loaded();if(t&&(a=this._updateAverageElevation(i,!0)),a)this.triggerRepaint();else if(this._triggerFrame(!1),t&&(this.fire(new Dr("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const t=this._calculateSpeedIndex();this.fire(new Dr("speedindexcompleted",{speedIndex:t})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||l||(this._fullyLoaded=!0,Ue.mark($e.fullLoad),this._performanceMetricsCollection&&Re(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(t){for(const e of this._markers)t&&!this.getRenderWorldCopies()&&(e._lngLat=e._lngLat.wrap()),e._update();for(const e of this._popups)!t||this.getRenderWorldCopies()||e._trackPointer||(e._lngLat=e._lngLat.wrap()),e._update()}_updateAverageElevation(t,e=!1){const r=t=>(this.transform.averageElevation=t,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&r(0);const n=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,i=e||t-this._averageElevationLastSampledAt>CV;if(n||i&&!this._averageElevation.isEasing(t)){const e=this.transform.averageElevation;let i=this.transform.sampleAverageElevation();this.transform.elevation&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(i)?i=0:this._averageElevationLastSampledAt=t;const o=Math.abs(e-i);if(o>kV){if(this._isInitialLoad||n)return this._averageElevation.jumpTo(i),r(i);this._averageElevation.easeTo(i,t,MV)}else if(o>IV)return this._averageElevation.jumpTo(i),r(i)}return!!this._averageElevation.isEasing(t)&&r(this._averageElevation.getValue(t))}
2_authenticate(){ze(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(t=>{if(t&&(t.message===le||401===t.status)){const t=this.painter.context.gl;je(t,!1),this._logoControl instanceof yV&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new zr(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}})),Pe(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(()=>{}))}_updateTerrain(){const t=this._isDragging();this.painter.updateTerrain(this.style,t)}_calculateSpeedIndex(){const t=this.painter.canvasCopy(),e=this.painter.getCanvasCopiesAndTimestamps();e.timeStamps.push(performance.now());const r=this.painter.context.gl,n=r.createFramebuffer();function i(t){r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0);const e=new Uint8Array(r.drawingBufferWidth*r.drawingBufferHeight*4);return r.readPixels(0,0,r.drawingBufferWidth,r.drawingBufferHeight,r.RGBA,r.UNSIGNED_BYTE,e),e}return r.bindFramebuffer(r.FRAMEBUFFER,n),this._canvasPixelComparison(i(t),e.canvasCopies.map(i),e.timeStamps)}_canvasPixelComparison(t,e,r){let n=r[1]-r[0];const i=t.length/4;for(let o=0;o<e.length;o++){const s=e[o];let a=0;for(let e=0;e<s.length;e+=4)s[e]===t[e]&&s[e+1]===t[e+1]&&s[e+2]===t[e+2]&&s[e+3]===t[e+3]&&(a+=1);n+=(r[o+2]-r[o+1])*(1-a/i)}return n}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),void 0!==e&&(e.removeEventListener("resize",this._onWindowResize,!1),e.removeEventListener("orientationchange",this._onWindowResize,!1),e.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),e.removeEventListener("online",this._onWindowOnline,!1),e.removeEventListener("visibilitychange",this._onVisibilityChange,!1));const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),Ne(this.painter.context.gl),this._removed=!0,this.fire(new Dr("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(t){this._renderNextFrame=this._renderNextFrame||t,this.style&&!this._frame&&(this._frame=vr.frame((t=>{const e=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,e&&this._render(t)})))}_preloadTiles(t){return F(this.style?Object.values(this.style._sourceCaches):[],((e,r)=>e._preloadTiles(t,r)),(()=>{this.triggerRepaint()})),this}_onWindowOnline(){this._update()}_onWindowResize(t){this._trackResize&&this.resize({originalEvent:t})._update()}_onVisibilityChange(){"hidden"===e.document.visibilityState&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(t){this._showTerrainWireframe!==t&&(this._showTerrainWireframe=t,this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(t){this._showLayers2DWireframe!==t&&(this._showLayers2DWireframe=t,this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(t){this._showLayers3DWireframe!==t&&(this._showLayers3DWireframe=t,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(t){this._speedIndexTiming!==t&&(this._speedIndexTiming=t,this._update())}get showPadding(){return!!this._showPadding}set showPadding(t){this._showPadding!==t&&(this._showPadding=t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())}get repaint(){return!!this._repaint}set repaint(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(t){this._vertices=t,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(t){this._showTileAABBs!==t&&(this._showTileAABBs=t,t&&this._update())}_setCacheLimits(t,e){Ut(t,e)}get version(){return r}};const jV={showCompass:!0,showZoom:!0,visualizePitch:!1};class FV{constructor(t){this.options=U({},jV,t),this._container=br("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(t=>t.preventDefault())),this.options.showZoom&&(Y(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(t=>{this._map&&this._map.zoomIn({},{originalEvent:t})})),br("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(t=>{this._map&&this._map.zoomOut({},{originalEvent:t})})),br("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(Y(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(t=>{const e=this._map;e&&(this.options.visualizePitch?e.resetNorthPitch({},{originalEvent:t}):e.resetNorth({},{originalEvent:t}))})),this._compassIcon=br("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const t=this._map;if(!t)return;
2const e=t.getZoom(),r=e===t.getMaxZoom(),n=e===t.getMinZoom();this._zoomInButton.disabled=r,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const t=this._map;if(!t)return;const e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(t.transform.pitch*(Math.PI/180)),.5)}) rotateX(${t.transform.pitch}deg) rotateZ(${t.transform.angle*(180/Math.PI)}deg)`:`rotate(${t.transform.angle*(180/Math.PI)}deg)`;t._requestDomTask((()=>{this._compassIcon&&(this._compassIcon.style.transform=e)}))}onAdd(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),t.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&t.on("pitch",this._rotateCompassArrow),t.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new NV(t,this._compass,this.options.visualizePitch)),this._container}onRemove(){const t=this._map;t&&(this._container.remove(),this.options.showZoom&&t.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&t.off("pitch",this._rotateCompassArrow),t.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(t,e){const r=br("button",t,this._container);return r.type="button",r.addEventListener("click",e),r}_setButtonTitle(t,e){if(!this._map)return;const r=this._map._getUIString(`NavigationControl.${e}`);t.setAttribute("aria-label",r),t.firstElementChild&&t.firstElementChild.setAttribute("title",r)}}class NV{constructor(t,e,r=!1){this._clickTolerance=10,this.element=e,this.mouseRotate=new DU({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,r&&(this.mousePitch=new zU({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),Y(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),e.addEventListener("mousedown",this.mousedown),e.addEventListener("touchstart",this.touchstart,{passive:!1}),e.addEventListener("touchmove",this.touchmove),e.addEventListener("touchend",this.touchend),e.addEventListener("touchcancel",this.reset)}down(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),Tr()}move(t,e){const r=this.map,n=this.mouseRotate.mousemoveWindow(t,e),i=n&&n.bearingDelta;if(i&&r.setBearing(r.getBearing()+i),this.mousePitch){const n=this.mousePitch.mousemoveWindow(t,e),i=n&&n.pitchDelta;i&&r.setPitch(r.getPitch()+i)}}off(){const t=this.element;t.removeEventListener("mousedown",this.mousedown),t.removeEventListener("touchstart",this.touchstart,{passive:!1}),t.removeEventListener("touchmove",this.touchmove),t.removeEventListener("touchend",this.touchend),t.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){Ar(),e.removeEventListener("mousemove",this.mousemove),e.removeEventListener("mouseup",this.mouseup)}mousedown(t){this.down(U({},t,{ctrlKey:!0,preventDefault:()=>t.preventDefault()}),Mr(this.element,t)),e.addEventListener("mousemove",this.mousemove),e.addEventListener("mouseup",this.mouseup)}mousemove(t){this.move(t,Mr(this.element,t))}mouseup(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()}touchstart(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=kr(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>t.preventDefault()},this._startPos))}touchmove(t){1!==t.targetTouches.length?this.reset():(this._lastPos=kr(this.element,t.targetTouches)[0],this.move({preventDefault:()=>t.preventDefault()},this._lastPos))}touchend(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}const $V={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1};class UV extends Br{constructor(t){super();const r=e.navigator.geolocation;this.options=U({geolocation:r},$V,t),Y(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=iU(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(t){return this._map=t,this._container=br("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(t){const r=(e=!!this.options.geolocation)=>{this._supportsGeolocation=e,t(e)};void 0!==this._supportsGeolocation?t(this._supportsGeolocation):void 0!==e.navigator.permissions?e.navigator.permissions.query({name:"geolocation"}).then((t=>r("denied"!==t.state))).catch((()=>r())):r()}_isOutOfMapMaxBounds(t){const e=this._map.getMaxBounds(),r=t.coords;return!!e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
2RROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new Dr("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new Dr("geolocate",t)),this._finish()}}_updateCamera(t){const e=new ax(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,n=U({bearing:this._map.getBearing()},this.options.fitBoundsOptions);this._map.fitBounds(e.toBounds(r),n,{geolocateSource:!0})}_updateMarker(t){if(t){const e=new ax(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(e).addTo(this._map),this._userLocationDotMarker.setLngLat(e).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const t=this._map.transform,e=dx(1,t._center.lat)*t.worldSize,r=Math.ceil(2*this._accuracy*e);this._circleElement.style.width=`${r}px`,this._circleElement.style.height=`${r}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&"number"==typeof this._heading?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&this._noTimeout)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new Dr("error",t)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(t){if(void 0!==this._map){if(this._container.addEventListener("contextmenu",(t=>t.preventDefault())),this._geolocateButton=br("button","mapboxgl-ctrl-geolocate",this._container),br("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===t){it("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
2se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=br("div","mapboxgl-user-location"),this._dotElement.appendChild(br("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(br("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new xV({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=br("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xV({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(t=>{const e=t.originalEvent&&"resize"===t.originalEvent.type;t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new Dr("trackuserlocationend")))}))}}_onDeviceOrientation(t){this._userLocationDotMarker&&(t.webkitCompassHeading?this._heading=t.webkitCompassHeading:!0===t.absolute&&(this._heading=-1*t.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return it("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 Dr("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new Dr("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 Dr("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(t={maximumAge:6e5,timeout:0},this._noTimeout=!0):(t=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,t),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const t=()=>{"ondeviceorientationabsolute"in e?e.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):e.addEventListener("deviceorientation",this._onDeviceOrientation)};void 0!==e.DeviceMotionEvent&&"function"==typeof e.DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((e=>{"granted"===e&&t()})).catch(console.error):t()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),e.removeEventListener("deviceorientation",this._onDeviceOrientation),e.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","fal
2se"),this.options.showUserLocation&&this._updateMarker(null)}}const VV={maxWidth:100,unit:"metric"},GV={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"};class qV{constructor(t){this.options=U({},VV,t),this._isNumberFormatSupported=HV(),Y(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const t=this.options.maxWidth||100,e=this._map,r=e._containerHeight/2,n=e._containerWidth/2-t/2,i=e.unproject([n,r]),o=e.unproject([n+t,r]),s=i.distanceTo(o);if("imperial"===this.options.unit){const e=3.2808*s;if(e>5280){const r=e/5280;this._setScale(t,r,"mile")}else this._setScale(t,e,"foot")}else if("nautical"===this.options.unit){const e=s/1852;this._setScale(t,e,"nautical-mile")}else s>=1e3?this._setScale(t,s/1e3,"kilometer"):this._setScale(t,s,"meter")}_setScale(t,e,r){this._map._requestDomTask((()=>{const n=ZV(e),i=n/e;this._isNumberFormatSupported&&"nautical-mile"!==r?this._container.innerHTML=new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:r}).format(n):this._container.innerHTML=`${n}&nbsp;${GV[r]}`,this._container.style.width=t*i+"px"}))}onAdd(t){return this._map=t,this._language=t.getLanguage(),this._container=br("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(t){this._language=t,this._update()}setUnit(t){this.options.unit=t,this._update()}}function HV(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch(t){return!1}}function WV(t){const e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}function ZV(t){const e=Math.pow(10,`${Math.floor(t)}`.length-1);let r=t/e;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:WV(r),e*r}class XV{constructor(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.HTMLElement?this._container=t.container:it("Full screen control 'container' must be a DOM element.")),Y(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in e.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=br("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",it("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,e.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!e.document.fullscreenEnabled&&!e.document.webkitFullscreenEnabled)}_setupUI(){const t=this._fullscreenButton=br("button","mapboxgl-ctrl-fullscreen",this._controlContainer);br("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden","true"),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",t)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(e.document.fullscreenElement||e.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?e.document.exitFullscreen?e.document.exitFullscreen():e.document.webkitCancelFullScreen&&e.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}}e.performance;const YV={version:r,supported:Ye,setRTLTextPlugin:gc,getRTLTextPluginStatus:pc,Map:BV,NavigationControl:FV,GeolocateControl:UV,AttributionControl:gV,ScaleControl:qV,FullscreenControl:XV,Popup:SV,Marker:xV,Style:nU,LngLat:ax,LngLatBounds:Oh,Point:b,MercatorCoordinate:wx,FreeCameraOptions:LM,Evented:Br,config:i,prewarm:KL,clearPrewarmedResources:JL,get accessToken(){return i.ACCESS_TOKEN},set accessToken(t){i.ACCESS_TOKEN=t},get baseApiUrl(){return i.API_URL}
2,set baseApiUrl(t){i.API_URL=t},get workerCount(){return ZL.workerCount},set workerCount(t){ZL.workerCount=t},get maxParallelImageRequests(){return i.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){i.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage(t){$t(t)},workerUrl:"",workerClass:null,get dracoUrl(){return iR()},set dracoUrl(t){oR(t)},setNow:vr.setNow,restoreNow:vr.restoreNow};t.A=pL,t.D=qS,t.E=Li,t.F=ZS,t.K=QD,t.O=jv,t.P=b,t.T=Xk,t.V=WE,t.a=ME,t.b=QE,t.c=VP,t.d=BL,t.e=va,t.f=Xe,t.g=p,t.h=Yt,t.i=Kt,t.j=UR,t.k=bc,t.l=OR,t.m=_O,t.n=_c,t.o=Dr,t.p=_,t.q=Nt,t.r=oD,t.s=YV,t.t=xx,t.v=N,t.w=e})),n(["./shared"],(function(t){function e(t){if("number"==typeof t||"boolean"==typeof t||"string"==typeof t||null==t)return JSON.stringify(t);if(Array.isArray(t)){let r="[";for(const n of t)r+=`${e(n)},`;return`${r}]`}let r="{";for(const n of Object.keys(t).sort())r+=`${n}:${e(t[n])},`;return`${r}}`}function r(r){let n="";for(const i of t.r)n+=`/${e(r[i])}`;return n}function n(t,e){const n={};for(let i=0;i<t.length;i++){const o=e&&e[t[i].id]||r(t[i]);e&&(e[t[i].id]=o);let s=n[o];s||(s=n[o]=[]),s.push(t[i])}const i=[];for(const t in n)i.push(n[t]);return i}class i{constructor(t){this.keyCache={},this._layers={},this._layerConfigs={},t&&this.replace(t)}replace(t,e){this._layerConfigs={},this._layers={},this.update(t,[],e)}update(e,r,i){this._options=i;for(const r of e){this._layerConfigs[r.id]=r;const e=this._layers[r.id]=t.c(r,this._options);e.setScope(this.scope),e.compileFilter(),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(const t of r)delete this.keyCache[t],delete this._layerConfigs[t],delete this._layers[t];this.familiesBySource={};const o=n(t.v(this._layerConfigs),this.keyCache);for(const t of o){const e=t.map((t=>this._layers[t.id])),r=e[0];if("none"===r.visibility)continue;const n=r.source||"";let i=this.familiesBySource[n];i||(i=this.familiesBySource[n]={});const o=r.sourceLayer||"_geojsonTileLayer";let s=i[o];s||(s=i[o]=[]),s.push(e)}}}class o{loadTile(e,r){const{uid:n,encoding:i,rawImageData:o,padding:s}=e,a=t.w.ImageBitmap&&o instanceof t.w.ImageBitmap?this.getImageData(o,s):o;r(null,new t.D(n,a,i,s<1))}getImageData(t,e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);const r=this.offscreenCanvasContext.getImageData(-e,-e,t.width+2*e,t.height+2*e);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),r}}var s=a;function a(t,e){var r,n=t&&t.type;if("FeatureCollection"===n)for(r=0;r<t.features.length;r++)a(t.features[r],e);else if("GeometryCollection"===n)for(r=0;r<t.geometries.length;r++)a(t.geometries[r],e);else if("Feature"===n)a(t.geometry,e);else if("Polygon"===n)l(t.coordinates,e);else if("MultiPolygon"===n)for(r=0;r<t.coordinates.length;r++)l(t.coordinates[r],e);return t}function l(t,e){if(0!==t.length){c(t[0],e);for(var r=1;r<t.length;r++)c(t[r],!e)}}function c(t,e){for(var r=0,n=0,i=0,o=t.length,s=o-1;i<o;s=i++){var a=(t[i][0]-t[s][0])*(t[s][1]+t[i][1]),l=r+a;n+=Math.abs(r)>=Math.abs(a)?r-l+a:a-l+r,r=l}r+n>=0!=!!e&&t.reverse()}var u=t.g(s);const h=t.V.prototype.toGeoJSON;let f=class{constructor(e){this._feature=e,this.extent=t.E,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}loadGeometry(){if(1===this._feature.type){const e=[];for(const r of this._feature.geometry)e.push([new t.P(r[0],r[1])]);return e}{const e=[];for(const r of this._feature.geometry){const n=[];for(const e of r)n.push(new t.P(e[0],e[1]));e.push(n)}return e}}toGeoJSON(t,e,r){return h.call(this,t,e,r)}},d=class{constructor(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.E,this.length=e.length,this._features=e}feature(t){return new f(this._features[t])}};var p={exports:{}},m=t.p,g=t.a.VectorTileFeature,y=_;function _(t,e){this.options=e||{},this.features=t,this.length=t.length}function v(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}_.prototype.feature=function(t){return new v(this.features[t],this.options.extent)},v.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],n=[],i=0;i<r.length;i++)n.push(new m(r[i][0],r[i][1]));this.geometry.push(n)}return this.geometry},v.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,o=0;o<t.length;o++)for(var s=t[o],a=0;a<s.length;a++){var l=s[a];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},v.prototype.toGeoJSON=g.prototype.toGeoJSON;var b=t.b,x=y;function w(t){var e=new b;return S(t,e),e.finish()}function E(t,e){e=e||{};var r={};for(var n in t)r[n]=new x(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return w({layers:r})}
vendor: 5,553 bytes, line 2
2function S(t,e){for(var r in t.layers)e.writeMessage(3,T,t.layers[r])}function T(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,A,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var o=n.values;for(r=0;r<o.length;r++)e.writeMessage(4,I,o[r])}function A(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,O,t),e.writeVarintField(3,r.type),e.writeMessage(4,k,r)}function O(t,e){var r=t.feature,n=t.keys,i=t.values,o=t.keycache,s=t.valuecache;for(var a in r.properties){var l=r.properties[a],c=o[a];if(null!==l){void 0===c&&(n.push(a),c=n.length-1,o[a]=c),e.writeVarint(c);var u=typeof l;"string"!==u&&"boolean"!==u&&"number"!==u&&(l=JSON.stringify(l));var h=u+":"+l,f=s[h];void 0===f&&(i.push(l),f=i.length-1,s[h]=f),e.writeVarint(f)}}}function C(t,e){return(e<<3)+(7&t)}function M(t){return t<<1^t>>31}function k(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,o=0,s=r.length,a=0;a<s;a++){var l=r[a],c=1;1===n&&(c=l.length),e.writeVarint(C(1,c));for(var u=3===n?l.length-1:l.length,h=0;h<u;h++){1===h&&1!==n&&e.writeVarint(C(2,u-1));var f=l[h].x-i,d=l[h].y-o;e.writeVarint(M(f)),e.writeVarint(M(d)),i+=f,o+=d}3===n&&e.writeVarint(C(7,1))}}function I(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}p.exports=w,p.exports.fromVectorTileJs=w,p.exports.fromGeojsonVt=E,p.exports.GeoJSONWrapper=x;var P=p.exports,L=t.g(P);const R={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},D=Math.fround||(z=new Float32Array(1),t=>(z[0]=+t,z[0]));var z;const B=2,j=3,F=4,N=5,$=6;class U{constructor(t){this.options=Object.assign(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;const o=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,i]=r.geometry.coordinates,s=D(q(n)),a=D(H(i));o.push(s,a,1/0,e,-1,1),this.options.reduce&&o.push(0)}let s=this.trees[n+1]=this._createTree(o);e&&console.timeEnd(i);for(let t=n;t>=r;t--){const r=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){const t=this.getClusters([r,n,180,o],e),s=this.getClusters([-180,n,i,o],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(q(r),H(o),q(i),H(n)),l=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(l[e+N]>1?V(l,e,this.clusterProps):this.points[l[e+j]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);const o=i.data;if(e*this.stride>=o.length)throw new Error(n);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=o[e*this.stride],l=o[e*this.stride+1],c=i.within(a,l,s),u=[];for(const e of c){const r=e*this.stride;o[r+F]===t&&u.push(o[r+N]>1?V(o,r,this.clusterProps):this.points[o[r+j]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:s}=this.options,a=s/o,l=(r-a)/i,c=(r+1+a)/i,u={features:[]};return this._addTileFeatures(n.range((e-a)/i,l,(e+1+a)/i,c),n.data,e,r,i,u),0===e&&this._addTileFeatures(n.range(1-a/i,l,1,c),n.data,i,r,i,u),e===i-1&&this._addTileFeatures(n.range(0,l,a/i,c),n.data,-1,r,i,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,i){const o=this.getChildren(e);for(const e of o){const o=e.properties;if(o&&o.cluster?i+o.point_count<=n?i+=o.point_count:i=this._appendLeaves(t,o.cluster_id,r,n,i):i<n?i++:t.push(e),t.length===r)break}return i}_createTree(e){const r=new t.K(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let t=0;t<e.length;t+=this.stride)r.add(e[t],e[t+1]);return r.finish(),r.data=e,r}_addTileFeatures(t,e,r,n,i,o){for(const s of t){const t=s*this.stride,a=e[t+N]>1;let l,c,u;if(a)l=G(e,t,this.clusterProps),c=e[t],u=e[t+1];else{const r=this.points[e[t+j]];l=r.properties;const[n,i]=r.geometry.coordinates;c=q(n),u=H(i)}const h={type:1,geometry:[[Math.round(this.options.extent*(c*i-r)),Math.round(this.options.extent*(u*i-n))]],tags:l};let f;f=a||this.options.generateId?e[t+j]:this.points[e[t+j]].id,void 0!==f&&(h.id=f),o.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:i,minPoints:o}=this.options,s=r/(n*Math.pow(2,e)),a=t.data,l=[],c=this.stride;for(let r=0;r<a.length;r+=c){if(a[r+B]<=e)continue;a[r+B]=e;const n=a[r],u=a[r+1],h=t.within(a[r],a[r+1],s),f=a[r+N];let d=f;
2for(const t of h){const r=t*c;a[r+B]>e&&(d+=a[r+N])}if(d>f&&d>=o){let t,o=n*f,s=u*f,p=-1;const m=((r/c|0)<<5)+(e+1)+this.points.length;for(const n of h){const l=n*c;if(a[l+B]<=e)continue;a[l+B]=e;const u=a[l+N];o+=a[l]*u,s+=a[l+1]*u,a[l+F]=m,i&&(t||(t=this._map(a,r,!0),p=this.clusterProps.length,this.clusterProps.push(t)),i(t,this._map(a,l)))}a[r+F]=m,l.push(o/d,s/d,1/0,m,-1,d),i&&l.push(p)}else{for(let t=0;t<c;t++)l.push(a[r+t]);if(d>1)for(const t of h){const r=t*c;if(!(a[r+B]<=e)){a[r+B]=e;for(let t=0;t<c;t++)l.push(a[r+t])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+N]>1){const n=this.clusterProps[t[e+$]];return r?Object.assign({},n):n}const n=this.points[t[e+j]].properties,i=this.options.map(n);return r&&i===n?Object.assign({},i):i}}function V(t,e,r){return{type:"Feature",id:t[e+j],properties:G(t,e,r),geometry:{type:"Point",coordinates:[W(t[e]),Z(t[e+1])]}}}function G(t,e,r){const n=t[e+N],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=t[e+$],s=-1===o?{}:Object.assign({},r[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+j],point_count:n,point_count_abbreviated:i})}function q(t){return t/360+.5}function H(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function W(t){return 360*(t-.5)}function Z(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var X={exports:{}};!function(t,e){!function(e,r){t.exports=r()}(0,(function(){function t(r,n,i,o){for(var s,a=o,l=i-n>>1,c=i-n,u=r[n],h=r[n+1],f=r[i],d=r[i+1],p=n+3;p<i;p+=3){var m=e(r[p],r[p+1],u,h,f,d);if(m>a)s=p,a=m;else if(m===a){var g=Math.abs(p-l);g<c&&(s=p,c=g)}}a>o&&(s-n>3&&t(r,n,s,o),r[s+2]=a,i-s>3&&t(r,s,i,o))}function e(t,e,r,n,i,o){var s=i-r,a=o-n;if(0!==s||0!==a){var l=((t-r)*s+(e-n)*a)/(s*s+a*a);l>1?(r=i,n=o):l>0&&(r+=s*l,n+=a*l)}return(s=t-r)*s+(a=e-n)*a}function r(t,e,r,i){var o={id:void 0===t?null:t,type:e,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return n(o),o}function n(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)i(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n<e.length;n++)i(t,e[n]);else if("MultiPolygon"===r)for(n=0;n<e.length;n++)for(var o=0;o<e[n].length;o++)i(t,e[n][o])}function i(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function o(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)s(r,t.features[n],e,n);else"Feature"===t.type?s(r,t,e):s(r,{geometry:t},e);return r}function s(t,e,n,i){if(e.geometry){var o=e.geometry.coordinates,u=e.geometry.type,h=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),f=[],d=e.id;if(n.promoteId?d=e.properties[n.promoteId]:n.generateId&&(d=i||0),"Point"===u)a(o,f);else if("MultiPoint"===u)for(var p=0;p<o.length;p++)a(o[p],f);else if("LineString"===u)l(o,f,h,!1);else if("MultiLineString"===u){if(n.lineMetrics){for(p=0;p<o.length;p++)f=[],l(o[p],f,h,!1),t.push(r(d,"LineString",f,e.properties));return}c(o,f,h,!1)}else if("Polygon"===u)c(o,f,h,!0);else{if("MultiPolygon"!==u){if("GeometryCollection"===u){for(p=0;p<e.geometry.geometries.length;p++)s(t,{id:d,geometry:e.geometry.geometries[p],properties:e.properties},n,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(p=0;p<o.length;p++){var m=[];c(o[p],m,h,!0),f.push(m)}}t.push(r(d,u,f,e.properties))}}function a(t,e){e.push(u(t[0])),e.push(h(t[1])),e.push(0)}function l(e,r,n,i){for(var o,s,a=0,l=0;l<e.length;l++){var c=u(e[l][0]),f=h(e[l][1]);r.push(c),r.push(f),r.push(0),l>0&&(a+=i?(o*f-c*s)/2:Math.sqrt(Math.pow(c-o,2)+Math.pow(f-s,2))),o=c,s=f}var d=r.length-3;r[2]=1,t(r,0,d,n),r[d+2]=1,r.size=Math.abs(a),r.start=0,r.end=r.size}function c(t,e,r,n){for(var i=0;i<t.length;i++){var o=[];l(t[i],o,r,n),e.push(o)}}function u(t){return t/360+.5}function h(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function f(t,e,n,i,o,s,a,l){if(i/=e,s>=(n/=e)&&a<i)return t;if(a<n||s>=i)return null;for(var c=[],u=0;u<t.length;u++){var h=t[u],f=h.geometry,m=h.type,y=0===o?h.minX:h.minY,_=0===o?h.maxX:h.maxY;if(y>=n&&_<i)c.push(h);else if(!(_<n||y>=i)){var v=[];
vendor: 9,476 bytes, line 2
2if("Point"===m||"MultiPoint"===m)d(f,v,n,i,o);else if("LineString"===m)p(f,v,n,i,o,!1,l.lineMetrics);else if("MultiLineString"===m)g(f,v,n,i,o,!1);else if("Polygon"===m)g(f,v,n,i,o,!0);else if("MultiPolygon"===m)for(var b=0;b<f.length;b++){var x=[];g(f[b],x,n,i,o,!0),x.length&&v.push(x)}if(v.length){if(l.lineMetrics&&"LineString"===m){for(b=0;b<v.length;b++)c.push(r(h.id,m,v[b],h.tags));continue}"LineString"!==m&&"MultiLineString"!==m||(1===v.length?(m="LineString",v=v[0]):m="MultiLineString"),"Point"!==m&&"MultiPoint"!==m||(m=3===v.length?"Point":"MultiPoint"),c.push(r(h.id,m,v,h.tags))}}}return c.length?c:null}function d(t,e,r,n,i){for(var o=0;o<t.length;o+=3){var s=t[o+i];s>=r&&s<=n&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function p(t,e,r,n,i,o,s){for(var a,l,c=m(t),u=0===i?_:v,h=t.start,f=0;f<t.length-3;f+=3){var d=t[f],p=t[f+1],g=t[f+2],b=t[f+3],x=t[f+4],w=0===i?d:p,E=0===i?b:x,S=!1;s&&(a=Math.sqrt(Math.pow(d-b,2)+Math.pow(p-x,2))),w<r?E>r&&(l=u(c,d,p,b,x,r),s&&(c.start=h+a*l)):w>n?E<n&&(l=u(c,d,p,b,x,n),s&&(c.start=h+a*l)):y(c,d,p,g),E<r&&w>=r&&(l=u(c,d,p,b,x,r),S=!0),E>n&&w<=n&&(l=u(c,d,p,b,x,n),S=!0),!o&&S&&(s&&(c.end=h+a*l),e.push(c),c=m(t)),s&&(h+=a)}var T=t.length-3;d=t[T],p=t[T+1],g=t[T+2],(w=0===i?d:p)>=r&&w<=n&&y(c,d,p,g),T=c.length-3,o&&T>=3&&(c[T]!==c[0]||c[T+1]!==c[1])&&y(c,c[0],c[1],c[2]),c.length&&e.push(c)}function m(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function g(t,e,r,n,i,o){for(var s=0;s<t.length;s++)p(t[s],e,r,n,i,o,!1)}function y(t,e,r,n){t.push(e),t.push(r),t.push(n)}function _(t,e,r,n,i,o){var s=(o-e)/(n-e);return t.push(o),t.push(r+(i-r)*s),t.push(1),s}function v(t,e,r,n,i,o){var s=(o-r)/(i-r);return t.push(e+(n-e)*s),t.push(o),t.push(1),s}function b(t,e){var r=e.buffer/e.extent,n=t,i=f(t,1,-1-r,r,0,-1,2,e),o=f(t,1,1-r,2+r,0,-1,2,e);return(i||o)&&(n=f(t,1,-r,1+r,0,-1,2,e)||[],i&&(n=x(i,1).concat(n)),o&&(n=n.concat(x(o,-1)))),n}function x(t,e){for(var n=[],i=0;i<t.length;i++){var o,s=t[i],a=s.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)o=w(s.geometry,e);else if("MultiLineString"===a||"Polygon"===a){o=[];for(var l=0;l<s.geometry.length;l++)o.push(w(s.geometry[l],e))}else if("MultiPolygon"===a)for(o=[],l=0;l<s.geometry.length;l++){for(var c=[],u=0;u<s.geometry[l].length;u++)c.push(w(s.geometry[l][u],e));o.push(c)}n.push(r(s.id,a,o,s.tags))}return n}function w(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var n=0;n<t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function E(t,e){if(t.transformed)return t;var r,n,i,o=1<<t.z,s=t.x,a=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(n=0;n<c.length;n+=2)l.geometry.push(S(c[n],c[n+1],e,o,s,a));else for(n=0;n<c.length;n++){var h=[];for(i=0;i<c[n].length;i+=2)h.push(S(c[n][i],c[n][i+1],e,o,s,a));l.geometry.push(h)}}return t.transformed=!0,t}function S(t,e,r,n,i,o){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-o))]}function T(t,e,r,n,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},a=0;a<t.length;a++){s.numFeatures++,A(s,t[a],o,i);var l=t[a].minX,c=t[a].minY,u=t[a].maxX,h=t[a].maxY;l<s.minX&&(s.minX=l),c<s.minY&&(s.minY=c),u>s.maxX&&(s.maxX=u),h>s.maxY&&(s.maxY=h)}return s}function A(t,e,r,n){var i=e.geometry,o=e.type,s=[];if("Point"===o||"MultiPoint"===o)for(var a=0;a<i.length;a+=3)s.push(i[a]),s.push(i[a+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)O(s,i,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(a=0;a<i.length;a++)O(s,i[a],t,r,"Polygon"===o,0===a);else if("MultiPolygon"===o)for(var l=0;l<i.length;l++){var c=i[l];for(a=0;a<c.length;a++)O(s,c[a],t,r,!0,0===a)}if(s.length){var u=e.tags||null;if("LineString"===o&&n.lineMetrics){for(var h in u={},e.tags)u[h]=e.tags[h];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var f={geometry:s,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:u};null!==e.id&&(f.id=e.id),t.features.push(f)}}function O(t,e,r,n,i,o){var s=n*n;if(n>0&&e.size<(i?s:n))r.numPoints+=e.length/3;else{for(var a=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>s)&&(r.numSimplified++,a.push(e[l]),a.push(e[l+1])),r.numPoints++;i&&C(a,o),t.push(a)}}function C(t,e){for(var r=0,n=0,i=t.length,o=i-2;n<i;o=n,n+=2)r+=(t[n]-t[o])*(t[n+1]+t[o+1]);if(r>0===e)for(n=0,i=t.length;n<i/2;n+=2){var s=t[n],a=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=s,t[i-1-n]=a}}function M(t,e){return new k(t,e)}function k(t,e){var r=(e=this.options=P(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=o(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=b(n,e)).length&&this.splitTile(n,0,0,0),r&&(n.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 I(t,e,r){return 32*((1<<t)*r+e)+t}function P(t,e){for(var r in e)t[r]=e[r];return t}return k.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},k.prototype.splitTile=function(t,e,r,n,i,o,s){for(var a=[t,e,r,n],l=this.options,c=l.debug;a.length;){n=a.pop(),r=a.pop(),e=a.pop(),t=a.pop();var u=1<<e,h=I(e,r,n),d=this.tiles[h];if(!d&&(c>1&&console.time("creation"),d=this.tiles[h]=T(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(d.source=t,i){if(e===l.maxZoom||e===i)continue;var m=1<<i-e;if(r!==Math.floor(o/m)||n!==Math.floor(s/m))continue}else if(e===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue;if(d.source=null,0!==t.length){c>1&&console.time("clipping");var g,y,_,v,b,x,w=.5*l.buffer/l.extent,E=.5-w,S=.5+w,A=1+w;g=y=_=v=null,b=f(t,u,r-w,r+S,0,d.minX,d.maxX,l),x=f(t,u,r+E,r+A,0,d.minX,d.maxX,l),t=null,b&&(g=f(b,u,n-w,n+S,1,d.minY,d.maxY,l),y=f(b,u,n+E,n+A,1,d.minY,d.maxY,l),b=null),x&&(_=f(x,u,n-w,n+S,1,d.minY,d.maxY,l),v=f(x,u,n+E,n+A,1,d.minY,d.maxY,l),x=null),c>1&&console.timeEnd("clipping"),a.push(g||[],e+1,2*r,2*n),a.push(y||[],e+1,2*r,2*n+1),a.push(_||[],e+1,2*r+1,2*n),a.push(v||[],e+1,2*r+1,2*n+1)}}},k.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,o=n.debug;if(t<0||t>24)return null;var s=1<<t,a=I(t,e=(e%s+s)%s,r);if(this.tiles[a])return E(this.tiles[a],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,c=t,u=e,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[I(c,u,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,h),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,t,e,r),o>1&&console.timeEnd("drilling down"),this.tiles[a]?E(this.tiles[a],i):null):null},M}))}(X);var Y=X.exports,K=t.g(Y);function J(t,e){const r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);const n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);const i=new d(n.features);let o=L(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:i,rawData:o.buffer})}class Q extends t.d{constructor(t,e,r,n,i,o){super(t,e,r,n,J,o),i&&(this.loadGeoJSON=i)}loadData(e,r){const n=e&&e.request,i=n&&n.collectResourceTiming;this.loadGeoJSON(e,((o,s)=>{if(o||!s)return r(o);if("object"!=typeof s)return r(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`));{u(s,!0);try{if(e.filter){const r=t.e(e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw new Error(r.value.map((t=>`${t.key}: ${t.message}`)).join(", "));const n=s.features.filter((t=>r.value.evaluate({zoom:0},t)));s={type:"FeatureCollection",features:n}}this._geoJSONIndex=e.cluster?new U(tt(e)).load(s.features):K(s,e.geojsonVtOptions)}catch(o){return r(o)}this.loaded={};const a={};if(i){const r=t.f(n);r&&(a.resourceTiming={},a.resourceTiming[e.source]=JSON.parse(JSON.stringify(r)))}r(null,a)}}))}reloadTile(t,e){const r=this.loaded,n=t.uid;return r&&r[n]?super.reloadTile(t,e):this.loadTile(t,e)}loadGeoJSON(e,r){if(e.request)t.h(e.request,r);else{if("string"!=typeof e.data)return r(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}}getClusterChildren(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}}getClusterLeaves(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}}}function tt({superclusterOptions:e,clusterProperties:r}){if(!r||!e)return e;const n={},i={},o={accumulated:null,zoom:0},s={properties:null},a=Object.keys(r);
2for(const e of a){const[o,s]=r[e],a=t.e(s),l=t.e("string"==typeof o?[o,["accumulated"],["get",e]]:o);n[e]=a.value,i[e]=l.value}return e.map=t=>{s.properties=t;const e={};for(const t of a)e[t]=n[t].evaluate(o,s);return e},e.reduce=(t,e)=>{s.properties=e;for(const e of a)o.accumulated=t[e],t[e]=i[e].evaluate(o,s)},e}class et{constructor(e,r){this.tileID=new t.O(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.tileZoom=e.tileZoom,this.uid=e.uid,this.zoom=e.zoom,this.canonical=e.tileID.canonical,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.projection=e.projection,this.brightness=r}parse(e,r,n,i){this.status="parsing";const o=new t.O(n.tileID.overscaledZ,n.tileID.wrap,n.tileID.canonical.z,n.tileID.canonical.x,n.tileID.canonical.y),s={},a=r.familiesBySource[n.source],l=new t.F(o,n.promoteId);return l.bucketLayerIDs=[],t.l(e).then((e=>{if(!e)return i(new Error("Could not parse tile"));const r=t.j(e,1/t.t(n.tileID.canonical)),c=e.json.extensionsUsed&&e.json.extensionsUsed.includes("MAPBOX_mesh_features"),u=new t.k(this.zoom,{brightness:this.brightness});for(const n in a)for(const i of a[n]){const n=i[0],a=e.json.extensionsUsed;n.recalculate(u,[]);const l=new t.T(r,o,a&&a.includes("MAPBOX_mesh_features"),this.brightness);c||(l.needsUpload=!0),s[n.fqid]=l,l.evaluate(n)}this.status="done",i(null,{buckets:s,featureIndex:l})})).catch((t=>i(new Error(t.message))))}}class rt{constructor(t,e,r,n,i,o){this.actor=t,this.layerIndex=e,this.brightness=o,this.loading={},this.loaded={}}loadTile(e,r){const n=e.uid,i=this.loading[n]=new et(e,this.brightness);t.i(e.request,((t,o)=>{const s=!this.loading[n];if(delete this.loading[n],s||t)return i.status="done",s||(this.loaded[n]=i),r(t);if(!o||0===o.byteLength)return i.status="done",this.loaded[n]=i,r();const a=(t,e)=>{i.status="done",this.loaded=this.loaded||{},this.loaded[n]=i,t||!e?r(t):r(null,e)};i.parse(o,this.layerIndex,e,a)}))}reloadTile(t,e){const r=this.loaded,n=t.uid;if(r&&r[n]){const i=r[n];i.projection=t.projection,i.brightness=t.brightness;const o=(r,n)=>{i.reloadCallback&&(delete i.reloadCallback,this.loadTile(t,e)),e(r,n)};"parsing"===i.status?i.reloadCallback=o:"done"===i.status&&this.loadTile(t,e)}}abortTile(t,e){const r=t.uid;this.loading[r]&&delete this.loading[r],e()}removeTile(t,e){const r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()}}class nt{constructor(e){this.self=e,this.actor=new t.A(e,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=t.m({name:"mercator"}),this.workerSourceTypes={vector:t.d,geojson:Q,"batched-model":rt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(t,e)=>{if(this.workerSourceTypes[t])throw new Error(`Worker source with name "${t}" already registered.`);this.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=e=>{if(t.n.isParsed())throw new Error("RTL text plugin already registered.");t.n.applyArabicShaping=e.applyArabicShaping,t.n.processBidirectionalText=e.processBidirectionalText,t.n.processStyledBidirectionalText=e.processStyledBidirectionalText}}clearCaches(t,e,r){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],r()}checkIfReady(t,e,r){r()}setReferrer(t,e){this.referrer=e}spriteLoaded(e,{scope:r,isLoaded:n}){if(this.isSpriteLoaded[e]||(this.isSpriteLoaded[e]={}),this.isSpriteLoaded[e][r]=n,this.workerSources[e]&&this.workerSources[e][r])for(const i in this.workerSources[e][r]){const o=this.workerSources[e][r][i];for(const e in o)o[e]instanceof t.d&&(o[e].isSpriteLoaded=n,o[e].fire(new t.o("isSpriteLoaded")))}}setImages(t,{scope:e,images:r},n){if(this.availableImages[t]||(this.availableImages[t]={}),this.availableImages[t][e]=r,this.workerSources[t]&&this.workerSources[t][e]){for(const n in this.workerSources[t][e]){const i=this.workerSources[t][e][n];for(const t in i)i[t].availableImages=r}n()}else n()}setProjection(e,r){this.projections[e]=t.m(r)}setBrightness(t,e,r){this.brightness=e,r()}setLayers(t,e,r){this.getLayerIndex(t,e.scope).replace(e.layers,e.options),r()}updateLayers(t,e,r){this.getLayerIndex(t,e.scope).update(e.layers,e.removedIds,e.options),r()}loadTile(t,e,r){e.projection=this.projections[t]||this.defaultProjection,this.getWorkerSource(t,e.type,e.source,e.scope).loadTile(e,r)}
2loadDEMTile(t,e,r){this.getDEMWorkerSource(t,e.source,e.scope).loadTile(e,r)}reloadTile(t,e,r){e.projection=this.projections[t]||this.defaultProjection,this.getWorkerSource(t,e.type,e.source,e.scope).reloadTile(e,r)}abortTile(t,e,r){this.getWorkerSource(t,e.type,e.source,e.scope).abortTile(e,r)}removeTile(t,e,r){this.getWorkerSource(t,e.type,e.source,e.scope).removeTile(e,r)}removeSource(t,e,r){if(!(this.workerSources[t]&&this.workerSources[t][e.scope]&&this.workerSources[t][e.scope][e.type]&&this.workerSources[t][e.scope][e.type][e.source]))return;const n=this.workerSources[t][e.scope][e.type][e.source];delete this.workerSources[t][e.scope][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}loadWorkerSource(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}}syncRTLPluginState(e,r,n){try{t.n.setState(r);const e=t.n.getPluginURL();if(t.n.isLoaded()&&!t.n.isParsed()&&null!=e){this.self.importScripts(e);const r=t.n.isParsed();n(r?void 0:new Error(`RTL Text Plugin failed to import scripts from ${e}`),r)}}catch(t){n(t.toString())}}setDracoUrl(t,e){this.dracoUrl=e}getAvailableImages(t,e){this.availableImages[t]||(this.availableImages[t]={});let r=this.availableImages[t][e];return r||(r=[]),r}getLayerIndex(t,e){this.layerIndexes[t]||(this.layerIndexes[t]={});let r=this.layerIndexes[t][e];return r||(r=this.layerIndexes[t][e]=new i,r.scope=e),r}getWorkerSource(t,e,r,n){if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][n]||(this.workerSources[t][n]={}),this.workerSources[t][n][e]||(this.workerSources[t][n][e]={}),this.isSpriteLoaded[t]||(this.isSpriteLoaded[t]={}),!this.workerSources[t][n][e][r]){const i={send:(e,r,n,i,o,s)=>{this.actor.send(e,r,n,t,o,s)},scheduler:this.actor.scheduler};this.workerSources[t][n][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t,n),this.getAvailableImages(t,n),this.isSpriteLoaded[t][n],void 0,this.brightness)}return this.workerSources[t][n][e][r]}getDEMWorkerSource(t,e,r){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][r]||(this.demWorkerSources[t][r]={}),this.demWorkerSources[t][r][e]||(this.demWorkerSources[t][r][e]=new o),this.demWorkerSources[t][r][e]}enforceCacheSizeLimit(e,r){t.q(r)}getWorkerPerformanceMetrics(t,e,r){r(void 0,void 0)}}return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new nt(self)),nt})),n(["./shared"],(function(t){return t.s})),r}()},6016:(t,e,r)=>{"use strict";r.r(e)},2765:(t,e,r)=>{"use strict";r.r(e)},7229:(t,e,r)=>{"use strict";r.r(e)},8162:(t,e,r)=>{var n;!function(i,o){function s(t){return function(){var e={method:t},r=Array.prototype.slice.call(arguments);/^get/.test(t)?(a.assert(r.length>0,"Get methods require a callback."),r.unshift(e)):(/^set/.test(t)&&(a.assert(0!==r.length,"Set methods require a value."),e.value=r[0]),r=[e]),this.send.apply(this,r)}}var a={DEBUG:!1,VERSION:"0.0.11",CONTEXT:"player.js"};a.POST_MESSAGE=!!i.postMessage,a.origin=function(t){return"//"===t.substr(0,2)&&(t=i.location.protocol+t),t.split("/").slice(0,3).join("/")},a.addEvent=function(t,e,r){t&&(t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):t["on"+e]=r)},a.log=function(){a.log.history=a.log.history||[],a.log.history.push(arguments),i.console&&a.DEBUG&&i.console.log(Array.prototype.slice.call(arguments))},a.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},a.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},a.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.isNone=function(t){return null==t},a.has=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.indexOf=function(t,e){if(null==t)return-1;var r=0,n=t.length;if(Array.prototype.IndexOf&&t.indexOf===Array.prototype.IndexOf)return t.indexOf(e);for(;n>r;r++)if(t[r]===e)return r;return-1},a.assert=function(t,e){if(!t)throw e||"Player.js Assert Failed"},a.Keeper=function(){this.init()},a.Keeper.prototype.init=function(){this.data={}},a.Keeper.prototype.getUUID=function(){return"listener-xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},a.Keeper.prototype.has=function(t,e){if(!this.data.hasOwnProperty(t))return!1;if(a.isNone(e))return!0;for(var r=this.data[t],n=0;n<r.length;n++)if(r[n].id===e)return!0;return!1},a.Keeper.prototype.add=function(t,e,r,n,i){var o={id:t,event:e,cb:r,ctx:n,one:i};this.has(e)?this.data[e].push(o):this.data[e]=[o]},a.Keeper.prototype.execute=function(t,e,r,n){if(!this.has(t,e))return!1;for(var i=[],o=[],s=0;s<this.data[t].length;s++){var l=this.data[t][s];a.isNone(e)||!a.isNone(e)&&l.id===e?(o.push({cb:l.cb,ctx:l.ctx?l.ctx:n,data:r}),!1===l.one&&i.push(l)):i.push(l)}0===i.length?delete this.data[t]:this.data[t]=i;for(var c=0;c<o.length;c++){var u=o[c];u.cb.call(u.ctx,u.data)}},a.Keeper.prototype.on=function(t,e,r,n){this.add(t,e,r,n,!1)},a.Keeper.prototype.one=function(t,e,r,n){this.add(t,e,r,n,!0)},a.Keeper.prototype.off=function(t,e){var r=[];if(!this.data.hasOwnProperty(t))return r;for(var n=[],i=0;i<this.data[t].length;i++){var o=this.data[t][i];a.isNone(e)||o.cb===e?a.isNone(o.id)||r.push(o.id):n.push(o)}return 0===n.length?delete this.data[t]:this.data[t]=n,r},a.Player=function(t,e){return this instanceof a.Player?void this.init(t,e):new a.Player(t,e)},a.EVENTS={READY:"ready",PLAY:"play",PAUSE:"pause",ENDED:"ended",TIMEUPDATE:"timeupdate",PROGRESS:"progress",ERROR:"error"},a.EVENTS.all=function(){var t=[];for(var e in a.EVENTS)a.has(a.EVENTS,e)&&a.isString(a.EVENTS[e])&&t.push(a.EVENTS[e]);return t},a.METHODS={PLAY:"play",PAUSE:"pause",GETPAUSED:"getPaused",MUTE:"mute",UNMUTE:"unmute",GETMUTED:"getMuted",SETVOLUME:"setVolume",GETVOLUME:"getVolume",GETDURATION:"getDuration",SETCURRENTTIME:"setCurrentTime",GETCURRENTTIME:"getCurrentTime",SETLOOP:"setLoop",GETLOOP:"getL
2oop",REMOVEEVENTLISTENER:"removeEventListener",ADDEVENTLISTENER:"addEventListener"},a.METHODS.all=function(){var t=[];for(var e in a.METHODS)a.has(a.METHODS,e)&&a.isString(a.METHODS[e])&&t.push(a.METHODS[e]);return t},a.READIED=[],a.Player.prototype.init=function(t,e){var r=this;a.isString(t)&&(t=o.getElementById(t)),this.elem=t,a.assert("IFRAME"===t.nodeName,'playerjs.Player constructor requires an Iframe, got "'+t.nodeName+'"'),a.assert(t.src,"playerjs.Player constructor requires a Iframe with a 'src' attribute."),this.origin=a.origin(t.src),this.keeper=new a.Keeper,this.isReady=!1,this.queue=[],this.events=a.EVENTS.all(),this.methods=a.METHODS.all(),a.POST_MESSAGE?a.addEvent(i,"message",(function(t){r.receive(t)})):a.log("Post Message is not Available."),a.indexOf(a.READIED,t.src)>-1?r.loaded=!0:this.elem.onload=function(){r.loaded=!0}},a.Player.prototype.send=function(t,e,r){if(t.context=a.CONTEXT,t.version=a.VERSION,e){var n=this.keeper.getUUID();t.listener=n,this.keeper.one(n,t.method,e,r)}return this.isReady||"ready"===t.value?(a.log("Player.send",t,this.origin),!0===this.loaded&&this.elem.contentWindow.postMessage(JSON.stringify(t),this.origin),!0):(a.log("Player.queue",t),this.queue.push(t),!1)},a.Player.prototype.receive=function(t){if(a.log("Player.receive",t),t.origin!==this.origin)return!1;var e;try{e=JSON.parse(t.data)}catch(t){return!1}return e.context===a.CONTEXT&&("ready"===e.event&&e.value&&e.value.src===this.elem.src&&this.ready(e),void(this.keeper.has(e.event,e.listener)&&this.keeper.execute(e.event,e.listener,e.value,this)))},a.Player.prototype.ready=function(t){if(!0===this.isReady)return!1;t.value.events&&(this.events=t.value.events),t.value.methods&&(this.methods=t.value.methods),this.isReady=!0,this.loaded=!0;for(var e=0;e<this.queue.length;e++){var r=this.queue[e];a.log("Player.dequeue",r),"ready"===t.event&&this.keeper.execute(r.event,r.listener,!0,this),this.send(r)}this.queue=[]},a.Player.prototype.on=function(t,e,r){var n=this.keeper.getUUID();return"ready"===t?this.keeper.one(n,t,e,r):this.keeper.on(n,t,e,r),this.send({method:"addEventListener",value:t,listener:n}),!0},a.Player.prototype.off=function(t,e){var r=this.keeper.off(t,e);if(a.log("Player.off",r),r.length>0)for(var n in r)return this.send({method:"removeEventListener",value:t,listener:r[n]}),!0;return!1},a.Player.prototype.supports=function(t,e){a.assert(a.indexOf(["method","event"],t)>-1,'evtOrMethod needs to be either "event" or "method" got '+t),e=a.isArray(e)?e:[e];for(var r="event"===t?this.events:this.methods,n=0;n<e.length;n++)if(-1===a.indexOf(r,e[n]))return!1;return!0};for(var l=0,c=a.METHODS.all().length;c>l;l++){var u=a.METHODS.all()[l];a.Player.prototype.hasOwnProperty(u)||(a.Player.prototype[u]=s(u))}a.addEvent(i,"message",(function(t){var e;try{e=JSON.parse(t.data)}catch(t){return!1}return e.context===a.CONTEXT&&void("ready"===e.event&&e.value&&e.value.src&&a.READIED.push(e.value.src))})),a.Receiver=function(t,e){this.init(t,e)},a.Receiver.prototype.init=function(t,e){var r=this;this.isReady=!1,this.origin=a.origin(o.referrer),this.methods={},this.supported={events:t||a.EVENTS.all(),methods:e||a.METHODS.all()},this.eventListeners={},this.reject=!(i.self!==i.top&&a.POST_MESSAGE),this.reject||a.addEvent(i,"message",(function(t){r.receive(t)}))},a.Receiver.prototype.receive=function(t){if(t.origin!==this.origin)return!1;var e={};if(a.isObject(t.data))e=t.data;else try{e=i.JSON.parse(t.data)}catch(t){a.log("JSON Parse Error",t)}if(a.log("Receiver.receive",t,e),!e.method)return!1;if(e.context!==a.CONTEXT)return!1;if(-1===a.indexOf(a.METHODS.all(),e.method))return this.emit("error",{code:2,msg:'Invalid Method "'+e.method+'"'}),!1;var r=a.isNone(e.listener)?null:e.listener;if("addEventListener"===e.method)this.eventListeners.hasOwnProperty(e.value)?-1===a.indexOf(this.eventListeners[e.value],r)&&this.eventListeners[e.value].push(r):this.eventListeners[e.value]=[r],"ready"===e.value&&this.isReady&&this.ready();else if("removeEventListener"===e.method){if(this.eventListeners.hasOwnProperty(e.value)){var n=a.indexOf(this.eventListeners[e.value],r);
2n>-1&&this.eventListeners[e.value].splice(n,1),0===this.eventListeners[e.value].length&&delete this.eventListeners[e.value]}}else this.get(e.method,e.value,r)},a.Receiver.prototype.get=function(t,e,r){var n=this;if(!this.methods.hasOwnProperty(t))return this.emit("error",{code:3,msg:'Method Not Supported"'+t+'"'}),!1;var i=this.methods[t];if("get"===t.substr(0,3)){i.call(this,(function(e){n.send(t,e,r)}))}else i.call(this,e)},a.Receiver.prototype.on=function(t,e){this.methods[t]=e},a.Receiver.prototype.send=function(t,e,r){if(a.log("Receiver.send",t,e,r),this.reject)return a.log("Receiver.send.reject",t,e,r),!1;var n={context:a.CONTEXT,version:a.VERSION,event:t};a.isNone(e)||(n.value=e),a.isNone(r)||(n.listener=r);var o=JSON.stringify(n);i.parent.postMessage(o,""===this.origin?"*":this.origin)},a.Receiver.prototype.emit=function(t,e){if(!this.eventListeners.hasOwnProperty(t))return!1;a.log("Instance.emit",t,e,this.eventListeners[t]);for(var r=0;r<this.eventListeners[t].length;r++){var n=this.eventListeners[t][r];this.send(t,e,n)}return!0},a.Receiver.prototype.ready=function(){a.log("Receiver.ready"),this.isReady=!0;var t={src:i.location.toString(),events:this.supported.events,methods:this.supported.methods};this.emit("ready",t)||this.send("ready",t)},a.HTML5Adapter=function(t){return this instanceof a.HTML5Adapter?void this.init(t):new a.HTML5Adapter(t)},a.HTML5Adapter.prototype.init=function(t){a.assert(t,"playerjs.HTML5Adapter requires a video element");var e=this.receiver=new a.Receiver;t.addEventListener("playing",(function(){e.emit("play")})),t.addEventListener("pause",(function(){e.emit("pause")})),t.addEventListener("ended",(function(){e.emit("ended")})),t.addEventListener("timeupdate",(function(){e.emit("timeupdate",{seconds:t.currentTime,duration:t.duration})})),t.addEventListener("progress",(function(){e.emit("buffered",{percent:t.buffered.length})})),e.on("play",(function(){t.play()})),e.on("pause",(function(){t.pause()})),e.on("getPaused",(function(e){e(t.paused)})),e.on("getCurrentTime",(function(e){e(t.currentTime)})),e.on("setCurrentTime",(function(e){t.currentTime=e})),e.on("getDuration",(function(e){e(t.duration)})),e.on("getVolume",(function(e){e(100*t.volume)})),e.on("setVolume",(function(e){t.volume=e/100})),e.on("mute",(function(){t.muted=!0})),e.on("unmute",(function(){t.muted=!1})),e.on("getMuted",(function(e){e(t.muted)})),e.on("getLoop",(function(e){e(t.loop)})),e.on("setLoop",(function(e){t.loop=e}))},a.HTML5Adapter.prototype.ready=function(){this.receiver.ready()},a.JWPlayerAdapter=function(t){return this instanceof a.JWPlayerAdapter?void this.init(t):new a.JWPlayerAdapter(t)},a.JWPlayerAdapter.prototype.init=function(t){a.assert(t,"playerjs.JWPlayerAdapter requires a player object");var e=this.receiver=new a.Receiver;this.looped=!1,t.on("pause",(function(){e.emit("pause")})),t.on("play",(function(){e.emit("play")})),t.on("time",(function(t){var r=t.position,n=t.duration;if(!r||!n)return!1;var i={seconds:r,duration:n};e.emit("timeupdate",i)}));var r=this;t.on("complete",(function(){!0===r.looped?t.seek(0):e.emit("ended")})),t.on("error",(function(){e.emit("error")})),e.on("play",(function(){t.play(!0)})),e.on("pause",(function(){t.pause(!0)})),e.on("getPaused",(function(e){e(t.getState().toLowerCase()!=="PLAYING".toLowerCase())})),e.on("getCurrentTime",(function(e){e(t.getPosition())})),e.on("setCurrentTime",(function(e){t.seek(e)})),e.on("getDuration",(function(e){e(t.getDuration())})),e.on("getVolume",(function(e){e(t.getVolume())})),e.on("setVolume",(function(e){t.setVolume(e)})),e.on("mute",(function(){t.setMute(!0)})),e.on("unmute",(function(){t.setMute(!1)})),e.on("getMuted",(function(e){e(!0===t.getMute())})),e.on("getLoop",(function(t){t(this.looped)}),this),e.on("setLoop",(function(t){this.looped=t}),this)},a.JWPlayerAdapter.prototype.ready=function(){this.receiver.ready()},a.MockAdapter=function(){return this instanceof a.MockAdapter?void this.init():new a.MockAdapter},a.MockAdapter.prototype.init=function(){var t={duration:20,currentTime:0,interval:null,timeupdate:function(){},volume:100,mute:!1,playing:!1,loop:!1,play:function(){t.interval=setInterval((function(){t.currentTime+=.25,t.timeupdate({seconds:t.currentTime,duration:t.duration})}),250),t.playing=!0},pause:function(){clearInterval(t.interval),t.playing=!1}},e=this.receiver=new a.Receiver;e.on("play",(function(){var e=this;
2t.play(),this.emit("play"),t.timeupdate=function(t){e.emit("timeupdate",t)}})),e.on("pause",(function(){t.pause(),this.emit("pause")})),e.on("getPaused",(function(e){e(!t.playing)})),e.on("getCurrentTime",(function(e){e(t.currentTime)})),e.on("setCurrentTime",(function(e){t.currentTime=e})),e.on("getDuration",(function(e){e(t.duration)})),e.on("getVolume",(function(e){e(t.volume)})),e.on("setVolume",(function(e){t.volume=e})),e.on("mute",(function(){t.mute=!0})),e.on("unmute",(function(){t.mute=!1})),e.on("getMuted",(function(e){e(t.mute)})),e.on("getLoop",(function(e){e(t.loop)})),e.on("setLoop",(function(e){t.loop=e}))},a.MockAdapter.prototype.ready=function(){this.receiver.ready()},a.VideoJSAdapter=function(t){return this instanceof a.VideoJSAdapter?void this.init(t):new a.VideoJSAdapter(t)},a.VideoJSAdapter.prototype.init=function(t){a.assert(t,"playerjs.VideoJSReceiver requires a player object");var e=this.receiver=new a.Receiver;t.on("pause",(function(){e.emit("pause")})),t.on("play",(function(){e.emit("play")})),t.on("timeupdate",(function(r){var n=t.currentTime(),i=t.duration();if(!n||!i)return!1;var o={seconds:n,duration:i};e.emit("timeupdate",o)})),t.on("ended",(function(){e.emit("ended")})),t.on("error",(function(){e.emit("error")})),e.on("play",(function(){t.play()})),e.on("pause",(function(){t.pause()})),e.on("getPaused",(function(e){e(t.paused())})),e.on("getCurrentTime",(function(e){e(t.currentTime())})),e.on("setCurrentTime",(function(e){t.currentTime(e)})),e.on("getDuration",(function(e){e(t.duration())})),e.on("getVolume",(function(e){e(100*t.volume())})),e.on("setVolume",(function(e){t.volume(e/100)})),e.on("mute",(function(){t.volume(0)})),e.on("unmute",(function(){t.volume(1)})),e.on("getMuted",(function(e){e(0===t.volume())})),e.on("getLoop",(function(e){e(t.loop())})),e.on("setLoop",(function(e){t.loop(e)}))},a.VideoJSAdapter.prototype.ready=function(){this.receiver.ready()},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}(window,document)},5766:function(t,e,r){t.exports=function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,i,o=function(t){return t&&t.Math==Math&&t},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=Object.defineProperty,l=function(t,e){try{a(s,t,{value:e,configurable:!0,writable:!0})}catch(r){s[t]=e}return e},c=s["__core-js_shared__"]||l("__core-js_shared__",{}),u=e((function(t){(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.6",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE",source:"https://github.com/zloirock/core-js"})})),h=function(t){try{return!!t()}catch(t){return!0}},f=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),d=Function.prototype,p=d.bind,m=d.call,g=f&&p.bind(m,m),y=f?function(t){return t&&g(t)}:function(t){return t&&function(){return m.apply(t,arguments)}},_=s.TypeError,v=function(t){if(null==t)throw _("Can't call method on "+t);return t},b=s.Object,x=function(t){return b(v(t))},w=y({}.hasOwnProperty),E=Object.hasOwn||function(t,e){return w(x(t),e)},S=0,T=Math.random(),A=y(1..toString),O=function(t){return"Symbol("+(void 0===t?"":t)+")_"+A(++S+T,36)},C=function(t){return"function"==typeof t},M=function(t){return C(t)?t:void 0},k=function(t,e){return arguments.length<2?M(s[t]):s[t]&&s[t][e]},I=k("navigator","userAgent")||"",P=s.process,L=s.Deno,R=P&&P.versions||L&&L.version,D=R&&R.v8;D&&(i=(n=D.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&I&&(!(n=I.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=I.match(/Chrome\/(\d+)/))&&(i=+n[1]);var z=i,B=!!Object.getOwnPropertySymbols&&!h((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&z&&z<41})),j=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=u("wks"),N=s.Symbol,$=N&&N.for,U=j?N:N&&N.withoutSetter||O,V=function(t){if(!E(F,t)||!B&&"string"!=typeof F[t]){var e="Symbol."+t;B&&E(N,t)?F[t]=N[t]:F[t]=j&&$?$(e):U(e)}return F[t]},G={};G[V("toStringTag")]="z";var q="[object z]"===String(G),H=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}}
2)[1]})),W=function(t){return"object"==typeof t?null!==t:C(t)},Z=s.document,X=W(Z)&&W(Z.createElement),Y=function(t){return X?Z.createElement(t):{}},K=!H&&!h((function(){return 7!=Object.defineProperty(Y("div"),"a",{get:function(){return 7}}).a})),J=H&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Q=s.String,tt=s.TypeError,et=function(t){if(W(t))return t;throw tt(Q(t)+" is not an object")},rt=Function.prototype.call,nt=f?rt.bind(rt):function(){return rt.apply(rt,arguments)},it=y({}.isPrototypeOf),ot=s.Object,st=j?function(t){return"symbol"==typeof t}:function(t){var e=k("Symbol");return C(e)&&it(e.prototype,ot(t))},at=s.String,lt=function(t){try{return at(t)}catch(t){return"Object"}},ct=s.TypeError,ut=function(t){if(C(t))return t;throw ct(lt(t)+" is not a function")},ht=function(t,e){var r=t[e];return null==r?void 0:ut(r)},ft=s.TypeError,dt=s.TypeError,pt=V("toPrimitive"),mt=function(t,e){if(!W(t)||st(t))return t;var r,n=ht(t,pt);if(n){if(void 0===e&&(e="default"),r=nt(n,t,e),!W(r)||st(r))return r;throw dt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&C(r=t.toString)&&!W(n=nt(r,t)))return n;if(C(r=t.valueOf)&&!W(n=nt(r,t)))return n;if("string"!==e&&C(r=t.toString)&&!W(n=nt(r,t)))return n;throw ft("Can't convert object to primitive value")}(t,e)},gt=function(t){var e=mt(t,"string");return st(e)?e:e+""},yt=s.TypeError,_t=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,bt={f:H?J?function(t,e,r){if(et(t),e=gt(e),et(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=vt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return _t(t,e,r)}:_t:function(t,e,r){if(et(t),e=gt(e),et(r),K)try{return _t(t,e,r)}catch(t){}if("get"in r||"set"in r)throw yt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},xt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},wt=H?function(t,e,r){return bt.f(t,e,xt(1,r))}:function(t,e,r){return t[e]=r,t},Et=Function.prototype,St=H&&Object.getOwnPropertyDescriptor,Tt=E(Et,"name"),At={EXISTS:Tt,PROPER:Tt&&"something"===function(){}.name,CONFIGURABLE:Tt&&(!H||H&&St(Et,"name").configurable)},Ot=y(Function.toString);C(c.inspectSource)||(c.inspectSource=function(t){return Ot(t)});var Ct,Mt,kt,It=c.inspectSource,Pt=s.WeakMap,Lt=C(Pt)&&/native code/.test(It(Pt)),Rt=u("keys"),Dt=function(t){return Rt[t]||(Rt[t]=O(t))},zt={},Bt=s.TypeError,jt=s.WeakMap;if(Lt||c.state){var Ft=c.state||(c.state=new jt),Nt=y(Ft.get),$t=y(Ft.has),Ut=y(Ft.set);Ct=function(t,e){if($t(Ft,t))throw new Bt("Object already initialized");return e.facade=t,Ut(Ft,t,e),e},Mt=function(t){return Nt(Ft,t)||{}},kt=function(t){return $t(Ft,t)}}else{var Vt=Dt("state");zt[Vt]=!0,Ct=function(t,e){if(E(t,Vt))throw new Bt("Object already initialized");return e.facade=t,wt(t,Vt,e),e},Mt=function(t){return E(t,Vt)?t[Vt]:{}},kt=function(t){return E(t,Vt)}}var Gt={set:Ct,get:Mt,has:kt,enforce:function(t){return kt(t)?Mt(t):Ct(t,{})},getterFor:function(t){return function(e){var r;if(!W(e)||(r=Mt(e)).type!==t)throw Bt("Incompatible receiver, "+t+" required");return r}}},qt=e((function(t){var e=At.CONFIGURABLE,r=Gt.enforce,n=Gt.get,i=Object.defineProperty,o=H&&!h((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),a=t.exports=function(t,n,a){if("Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!E(t,"name")||e&&t.name!==n)&&i(t,"name",{value:n,configurable:!0}),o&&a&&E(a,"arity")&&t.length!==a.arity&&i(t,"length",{value:a.arity}),a&&E(a,"constructor")&&a.constructor){if(H)try{i(t,"prototype",{writable:!1})}catch(t){}}else t.prototype=void 0;var l=r(t);return E(l,"source")||(l.source=s.join("string"==typeof n?n:"")),t};Function.prototype.toString=a((function(){return C(this)&&n(this).source||It(this)}),"toString")})),Ht=function(t,e,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:e;return C(r)&&qt(r,o,n),n.global?i?t[e]=r:l(e,r):(n.unsafe?t[e]&&(i=!0):delete t[e],i?t[e]=r:wt(t,e,r)),t},Wt=y({}.toString),Zt=y("".slice),Xt=function(t){return Zt(Wt(t),8,-1)},Yt=V("toStringTag"),Kt=s.Object,Jt="Arguments"==Xt(function(){return arguments}()),Qt=q?Xt:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}
vendor: 4,990 bytes, line 2
2(e=Kt(t),Yt))?r:Jt?Xt(e):"Object"==(n=Xt(e))&&C(e.callee)?"Arguments":n},te=q?{}.toString:function(){return"[object "+Qt(this)+"]"};q||Ht(Object.prototype,"toString",te,{unsafe:!0});var ee={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},re=Y("span").classList,ne=re&&re.constructor&&re.constructor.prototype,ie=ne===Object.prototype?void 0:ne,oe=y(y.bind),se=function(t,e){return ut(t),void 0===e?t:f?oe(t,e):function(){return t.apply(e,arguments)}},ae=s.Object,le=y("".split),ce=h((function(){return!ae("z").propertyIsEnumerable(0)}))?function(t){return"String"==Xt(t)?le(t,""):ae(t)}:ae,ue=Math.ceil,he=Math.floor,fe=Math.trunc||function(t){var e=+t;return(e>0?he:ue)(e)},de=function(t){var e=+t;return e!=e||0===e?0:fe(e)},pe=Math.min,me=function(t){return t>0?pe(de(t),9007199254740991):0},ge=function(t){return me(t.length)},ye=Array.isArray||function(t){return"Array"==Xt(t)},_e=function(){},ve=[],be=k("Reflect","construct"),xe=/^\s*(?:class|function)\b/,we=y(xe.exec),Ee=!xe.exec(_e),Se=function(t){if(!C(t))return!1;try{return be(_e,ve,t),!0}catch(t){return!1}},Te=function(t){if(!C(t))return!1;switch(Qt(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ee||!!we(xe,It(t))}catch(t){return!0}};Te.sham=!0;var Ae=!be||h((function(){var t;return Se(Se.call)||!Se(Object)||!Se((function(){t=!0}))||t}))?Te:Se,Oe=V("species"),Ce=s.Array,Me=function(t,e){return new(function(t){var e;return ye(t)&&(e=t.constructor,(Ae(e)&&(e===Ce||ye(e.prototype))||W(e)&&null===(e=e[Oe]))&&(e=void 0)),void 0===e?Ce:e}(t))(0===e?0:e)},ke=y([].push),Ie=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,o=6==t,s=7==t,a=5==t||o;return function(l,c,u,h){for(var f,d,p=x(l),m=ce(p),g=se(c,u),y=ge(m),_=0,v=h||Me,b=e?v(l,y):r||s?v(l,0):void 0;y>_;_++)if((a||_ in m)&&(d=g(f=m[_],_,p),t))if(e)b[_]=d;else if(d)switch(t){case 3:return!0;case 5:return f;case 6:return _;case 2:ke(b,f)}else switch(t){case 4:return!1;case 7:ke(b,f)}return o?-1:n||i?i:b}},Pe={forEach:Ie(0),map:Ie(1),filter:Ie(2),some:Ie(3),every:Ie(4),find:Ie(5),findIndex:Ie(6),filterReject:Ie(7)},Le=function(t,e){var r=[][t];return!!r&&h((function(){r.call(null,e||function(){return 1},1)}))},Re=Pe.forEach,De=Le("forEach")?[].forEach:function(t){return Re(this,t,arguments.length>1?arguments[1]:void 0)},ze=function(t){if(t&&t.forEach!==De)try{wt(t,"forEach",De)}catch(e){t.forEach=De}};for(var Be in ee)ee[Be]&&ze(s[Be]&&s[Be].prototype);ze(ie);var je=!("undefined"==typeof window||!window.document||!window.document.createElement),Fe={}.propertyIsEnumerable,Ne=Object.getOwnPropertyDescriptor,$e={f:Ne&&!Fe.call({1:2},1)?function(t){var e=Ne(this,t);return!!e&&e.enumerable}:Fe},Ue=function(t){return ce(v(t))},Ve=Object.getOwnPropertyDescriptor,Ge={f:H?Ve:function(t,e){if(t=Ue(t),e=gt(e),K)try{return Ve(t,e)}catch(t){}if(E(t,e))return xt(!nt($e.f,t,e),t[e])}},qe=Math.max,He=Math.min,We=function(t,e){var r=de(t);return r<0?qe(r+e,0):He(r,e)},Ze=function(t){return function(e,r,n){var i,o=Ue(e),s=ge(o),a=We(n,s);if(t&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},Xe=(Ze(!0),Ze(!1)),Ye=y([].push),Ke=function(t,e){var r,n=Ue(t),i=0,o=[];for(r in n)!E(zt,r)&&E(n,r)&&Ye(o,r);for(;e.length>i;)E(n,r=e[i++])&&(~Xe(o,r)||Ye(o,r));return o},Je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qe=Je.concat("length","prototype"),tr={f:Object.getOwnPropertyNames||function(t){return Ke(t,Qe)}},er={f:Object.getOwnPropertySymbols},rr=y([].concat),nr=k("Reflect","ownKeys")||function(t){var e=tr.f(et(t)),r=er.f;return r?rr(e,r(t)):e},ir=function(t,e,r){for(var n=nr(e),i=bt.f,o=Ge.f,s=0;s<n.length;s++){var a=n[s];E(t,a)||r&&E(r,a)||i(t,a,o(e,a))}},or=/#|\.prototype\./,sr=function(t,e){var r=lr[ar(t)];return r==ur||r!=cr&&(C(e)?h(e):!!e)},ar=sr.normalize=function(t){return String(t).replace(or,".").toLowerCase()},lr=sr.data={},cr=sr.NATIVE="N",ur=sr.POLYFILL="P",hr=sr,fr=Ge.f,dr=function(t,e){var r,n,i,o,a,c=t.target,u=t.global,h=t.stat;if(r=u?s:h?s[c]||l(c,{}):(s[c]||{}).prototype)for(n in e){if(o=e[n],i=t.dontCallGetSet?(a=fr(r,n))&&a.value:r[n],!hr(u?n:c+(h?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;ir(o,i)}(t.sham||i&&i.sham)&&wt(o,"sham",!0),Ht(r,n,o,t)}},pr=s.String,mr=function(t){if("Symbol"===Qt(t))throw TypeError("Cannot convert a Symbol value to a string");return pr(t)},gr="\t\n\v\f\r                 \u2028\u2029\ufeff",yr=y("".replace),_r
2="["+gr+"]",vr=RegExp("^"+_r+_r+"*"),br=RegExp(_r+_r+"*$"),xr=function(t){return function(e){var r=mr(v(e));return 1&t&&(r=yr(r,vr,"")),2&t&&(r=yr(r,br,"")),r}},wr=(xr(1),xr(2),xr(3)),Er=s.parseInt,Sr=s.Symbol,Tr=Sr&&Sr.iterator,Ar=/^[+-]?0x/i,Or=y(Ar.exec),Cr=8!==Er(gr+"08")||22!==Er(gr+"0x16")||Tr&&!h((function(){Er(Object(Tr))}))?function(t,e){var r=wr(mr(t));return Er(r,e>>>0||(Or(Ar,r)?16:10))}:Er;dr({global:!0,forced:parseInt!=Cr},{parseInt:Cr});var Mr=Object.keys||function(t){return Ke(t,Je)},kr=Object.assign,Ir=Object.defineProperty,Pr=y([].concat),Lr=!kr||h((function(){if(H&&1!==kr({b:1},kr(Ir({},"a",{enumerable:!0,get:function(){Ir(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=kr({},t)[r]||"abcdefghijklmnopqrst"!=Mr(kr({},e)).join("")}))?function(t,e){for(var r=x(t),n=arguments.length,i=1,o=er.f,s=$e.f;n>i;)for(var a,l=ce(arguments[i++]),c=o?Pr(Mr(l),o(l)):Mr(l),u=c.length,h=0;u>h;)a=c[h++],H&&!nt(s,l,a)||(r[a]=l[a]);return r}:kr;dr({target:"Object",stat:!0,arity:2,forced:Object.assign!==Lr},{assign:Lr});var Rr,Dr=V("species"),zr=Pe.filter,Br=(Rr="filter",z>=51||!h((function(){var t=[];return(t.constructor={})[Dr]=function(){return{foo:1}},1!==t[Rr](Boolean).foo})));dr({target:"Array",proto:!0,forced:!Br},{filter:function(t){return zr(this,t,arguments.length>1?arguments[1]:void 0)}});var jr,Fr={f:H&&!J?Object.defineProperties:function(t,e){et(t);for(var r,n=Ue(e),i=Mr(e),o=i.length,s=0;o>s;)bt.f(t,r=i[s++],n[r]);return t}},Nr=k("document","documentElement"),$r=Dt("IE_PROTO"),Ur=function(){},Vr=function(t){return"<script>"+t+"<\/script>"},Gr=function(t){t.write(Vr("")),t.close();var e=t.parentWindow.Object;return t=null,e},qr=function(){try{jr=new ActiveXObject("htmlfile")}catch(t){}var t,e;qr="undefined"!=typeof document?document.domain&&jr?Gr(jr):((e=Y("iframe")).style.display="none",Nr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Vr("document.F=Object")),t.close(),t.F):Gr(jr);for(var r=Je.length;r--;)delete qr.prototype[Je[r]];return qr()};zt[$r]=!0;var Hr=Object.create||function(t,e){var r;return null!==t?(Ur.prototype=et(t),r=new Ur,Ur.prototype=null,r[$r]=t):r=qr(),void 0===e?r:Fr.f(r,e)},Wr=bt.f,Zr=V("unscopables"),Xr=Array.prototype;null==Xr[Zr]&&Wr(Xr,Zr,{configurable:!0,value:Hr(null)});var Yr,Kr,Jr,Qr=function(t){Xr[Zr][t]=!0},tn={},en=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),rn=Dt("IE_PROTO"),nn=s.Object,on=nn.prototype,sn=en?nn.getPrototypeOf:function(t){var e=x(t);if(E(e,rn))return e[rn];var r=e.constructor;return C(r)&&e instanceof r?r.prototype:e instanceof nn?on:null},an=V("iterator"),ln=!1;[].keys&&("next"in(Jr=[].keys())?(Kr=sn(sn(Jr)))!==Object.prototype&&(Yr=Kr):ln=!0),(null==Yr||h((function(){var t={};return Yr[an].call(t)!==t})))&&(Yr={}),C(Yr[an])||Ht(Yr,an,(function(){return this}));var cn={IteratorPrototype:Yr,BUGGY_SAFARI_ITERATORS:ln},un=bt.f,hn=V("toStringTag"),fn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!E(t,hn)&&un(t,hn,{configurable:!0,value:e})},dn=cn.IteratorPrototype,pn=function(){return this},mn=s.String,gn=s.TypeError,yn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=y(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return et(r),function(t){if("object"==typeof t||C(t))return t;throw gn("Can't set "+mn(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),_n=At.PROPER,vn=At.CONFIGURABLE,bn=cn.IteratorPrototype,xn=cn.BUGGY_SAFARI_ITERATORS,wn=V("iterator"),En=function(){return this},Sn=function(t,e,r,n,i,o,s){!function(t,e,r,n){var i=e+" Iterator";t.prototype=Hr(dn,{next:xt(+!n,r)}),fn(t,i,!1),tn[i]=pn}(r,e,n);var a,l,c,u=function(t){if(t===i&&m)return m;if(!xn&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",f=!1,d=t.prototype,p=d[wn]||d["@@iterator"]||i&&d[i],m=!xn&&p||u(i),g="Array"==e&&d.entries||p;if(g&&(a=sn(g.call(new t)))!==Object.prototype&&a.next&&(sn(a)!==bn&&(yn?yn(a,bn):C(a[wn])||Ht(a,wn,En)),fn(a,h,!0)),_n&&"values"==i&&p&&"values"!==p.name&&(vn?wt(d,"name","values"):(f=!0,m=function(){return nt(p,this)})),i)if(l={values:u("values"),keys:o?m:u("keys"),entries:u("entries")}
vendor: 9,897 bytes, line 2
2,s)for(c in l)(xn||f||!(c in d))&&Ht(d,c,l[c]);else dr({target:e,proto:!0,forced:xn||f},l);return d[wn]!==m&&Ht(d,wn,m,{name:i}),tn[e]=m,l},Tn=bt.f,An=Gt.set,On=Gt.getterFor("Array Iterator"),Cn=Sn(Array,"Array",(function(t,e){An(this,{type:"Array Iterator",target:Ue(t),index:0,kind:e})}),(function(){var t=On(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),Mn=tn.Arguments=tn.Array;if(Qr("keys"),Qr("values"),Qr("entries"),H&&"values"!==Mn.name)try{Tn(Mn,"name",{value:"values"})}catch(t){}var kn=y("".charAt),In=y("".charCodeAt),Pn=y("".slice),Ln=function(t){return function(e,r){var n,i,o=mr(v(e)),s=de(r),a=o.length;return s<0||s>=a?t?"":void 0:(n=In(o,s))<55296||n>56319||s+1===a||(i=In(o,s+1))<56320||i>57343?t?kn(o,s):n:t?Pn(o,s,s+2):i-56320+(n-55296<<10)+65536}},Rn={codeAt:Ln(!1),charAt:Ln(!0)},Dn=Rn.charAt,zn=Gt.set,Bn=Gt.getterFor("String Iterator");Sn(String,"String",(function(t){zn(this,{type:"String Iterator",string:mr(t),index:0})}),(function(){var t,e=Bn(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Dn(r,n),e.index+=t.length,{value:t,done:!1})}));var jn=function(t,e,r){for(var n in e)Ht(t,n,e[n],r);return t},Fn=s.Array,Nn=Math.max,$n=tr.f,Un="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Vn=function(t){try{return $n(t)}catch(t){return function(t,e,r){for(var n,i,o,s,a=ge(t),l=We(e,a),c=We(void 0===r?a:r,a),u=Fn(Nn(c-l,0)),h=0;l<c;l++,h++)n=u,i=h,o=t[l],s=void 0,(s=gt(i))in n?bt.f(n,s,xt(0,o)):n[s]=o;return u.length=h,u}(Un)}},Gn={f:function(t){return Un&&"Window"==Xt(t)?Vn(t):$n(Ue(t))}},qn=h((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Hn=Object.isExtensible,Wn=h((function(){Hn(1)}))||qn?function(t){return!!W(t)&&(!qn||"ArrayBuffer"!=Xt(t))&&(!Hn||Hn(t))}:Hn,Zn=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),Xn=e((function(t){var e=bt.f,r=!1,n=O("meta"),i=0,o=function(t){e(t,n,{value:{objectID:"O"+i++,weakData:{}}})},s=t.exports={enable:function(){s.enable=function(){},r=!0;var t=tr.f,e=y([].splice),i={};i[n]=1,t(i).length&&(tr.f=function(r){for(var i=t(r),o=0,s=i.length;o<s;o++)if(i[o]===n){e(i,o,1);break}return i},dr({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Gn.f}))},fastKey:function(t,e){if(!W(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!E(t,n)){if(!Wn(t))return"F";if(!e)return"E";o(t)}return t[n].objectID},getWeakData:function(t,e){if(!E(t,n)){if(!Wn(t))return!0;if(!e)return!1;o(t)}return t[n].weakData},onFreeze:function(t){return Zn&&r&&Wn(t)&&!E(t,n)&&o(t),t}};zt[n]=!0})),Yn=(Xn.enable,Xn.fastKey,Xn.getWeakData,Xn.onFreeze,V("iterator")),Kn=Array.prototype,Jn=V("iterator"),Qn=function(t){if(null!=t)return ht(t,Jn)||ht(t,"@@iterator")||tn[Qt(t)]},ti=s.TypeError,ei=function(t,e,r){var n,i;et(t);try{if(!(n=ht(t,"return"))){if("throw"===e)throw r;return r}n=nt(n,t)}catch(t){i=!0,n=t}if("throw"===e)throw r;if(i)throw n;return et(n),r},ri=s.TypeError,ni=function(t,e){this.stopped=t,this.result=e},ii=ni.prototype,oi=function(t,e,r){var n,i,o,s,a,l,c,u,h=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),m=se(e,h),g=function(t){return n&&ei(n,"normal",t),new ni(!0,t)},y=function(t){return f?(et(t),p?m(t[0],t[1],g):m(t[0],t[1])):p?m(t,g):m(t)};if(d)n=t;else{if(!(i=Qn(t)))throw ri(lt(t)+" is not iterable");if(void 0!==(u=i)&&(tn.Array===u||Kn[Yn]===u)){for(o=0,s=ge(t);s>o;o++)if((a=y(t[o]))&&it(ii,a))return a;return new ni(!1)}n=function(t,e){var r=arguments.length<2?Qn(t):e;if(ut(r))return et(nt(r,t));throw ti(lt(t)+" is not iterable")}(t,i)}for(l=n.next;!(c=nt(l,n)).done;){try{a=y(c.value)}catch(t){ei(n,"throw",t)}if("object"==typeof a&&a&&it(ii,a))return a}return new ni(!1)},si=s.TypeError,ai=function(t,e){if(it(e,t))return t;throw si("Incorrect invocation")},li=V("iterator"),ci=!1;try{var ui=0,hi={next:function(){return{done:!!ui++}},return:function(){ci=!0}};hi[li]=function(){return this},Array.from(hi,(function(){throw 2}))}catch(t){}var fi=Xn.getWeakData,di=Gt.set,pi=Gt.getterFor,mi=Pe.find,gi=Pe.findIndex,yi=y([].splice),_i=0,vi=function(t){return t.frozen||(t.frozen=new bi)},bi=function(){this.entries=[]},xi=function(t,e){return mi(t.entries,(function(t){return t[0]===e}))};bi.prototype={get:function(t){var e=xi(this,t);if(e)return e[1]},has:function(t){return!!xi(this,t)},set:function(t,e){var r=xi(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=gi(this.entries,(function(e){return e[0]===t}));return~e&&yi(this.entries,e,1),!!~e}};var wi,Ei={getConstructor:function(t,e,r,n){var i=t((function(t,i){ai(t,o),di(t,{type:e,id:_i++,frozen:void 0}),null!=i&&oi(i,t[n],{that:t,AS_ENTRIES:r})})),o=i.prototype,s=pi(e),a=function(t,e,r){var n=s(t),i=fi(et(e),!0);return!0===i?vi(n).set(e,r):i[n.id]=r,t};return jn(o,{delete:function(t){var e=s(this);if(!W(t))return!1;var r=fi(t);return!0===r?vi(e).delete(t):r&&E(r,e.id)&&delete r[e.id]},has:function(t){var e=s(this);if(!W(t))return!1;var r=fi(t);return!0===r?vi(e).has(t):r&&E(r,e.id)}}),jn(o,r?{get:function(t){var e=s(this);if(W(t)){var r=fi(t);return!0===r?vi(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),i}},Si=Gt.enforce,Ti=!s.ActiveXObject&&"ActiveXObject"in s,Ai=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Oi=function(t,e,r){var n=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),o=n?"set":"add",a=s[t],l=a&&a.prototype,c=a,u={},f=function(t){var e=y(l[t]);Ht(l,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!W(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return i&&!W(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!W(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(hr(t,!C(a)||!(i||l.forEach&&!h((function(){(new a).entries().next()})))))c=r.getConstructor(e,t,n,o),Xn.enable();else if(hr(t,!0)){var d=new c,p=d[o](i?{}:-0,1)!=d,m=h((function(){d.has(1)})),g=function(t,e){if(!ci)return!1;var r=!1;try{var n={};n[li]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new a(t)})),_=!i&&h((function(){for(var t=new a,e=5;e--;)t[o](e,e);return!t.has(-0)}));g||((c=e((function(t,e){ai(t,l);var r=function(t,e,r){var n,i;return yn&&C(n=e.constructor)&&n!==r&&W(i=n.prototype)&&i!==r.prototype&&yn(t,i),t}(new a,t,c);return null!=e&&oi(e,r[o],{that:r,AS_ENTRIES:n}),r}))).prototype=l,l.constructor=c),(m||_)&&(f("delete"),f("has"),n&&f("get")),(_||p)&&f(o),i&&l.clear&&delete l.clear}return u[t]=c,dr({global:!0,constructor:!0,forced:c!=a},u),fn(c,t),i||r.setStrong(c,t,n),c}("WeakMap",Ai,Ei);if(Lt&&Ti){wi=Ei.getConstructor(Ai,"WeakMap",!0),Xn.enable();var Ci=Oi.prototype,Mi=y(Ci.delete),ki=y(Ci.has),Ii=y(Ci.get),Pi=y(Ci.set);jn(Ci,{delete:function(t){if(W(t)&&!Wn(t)){var e=Si(this);return e.frozen||(e.frozen=new wi),Mi(this,t)||e.frozen.delete(t)}return Mi(this,t)},has:function(t){if(W(t)&&!Wn(t)){var e=Si(this);return e.frozen||(e.frozen=new wi),ki(this,t)||e.frozen.has(t)}return ki(this,t)},get:function(t){if(W(t)&&!Wn(t)){var e=Si(this);return e.frozen||(e.frozen=new wi),ki(this,t)?Ii(this,t):e.frozen.get(t)}return Ii(this,t)},set:function(t,e){if(W(t)&&!Wn(t)){var r=Si(this);r.frozen||(r.frozen=new wi),ki(this,t)?Pi(this,t,e):r.frozen.set(t,e)}else Pi(this,t,e);return this}})}var Li=V("iterator"),Ri=V("toStringTag"),Di=Cn.values,zi=function(t,e){if(t){if(t[Li]!==Di)try{wt(t,Li,Di)}catch(e){t[Li]=Di}if(t[Ri]||wt(t,Ri,e),ee[e])for(var r in Cn)if(t[r]!==Cn[r])try{wt(t,r,Cn[r])}catch(e){t[r]=Cn[r]}}};for(var Bi in ee)zi(s[Bi]&&s[Bi].prototype,Bi);zi(ie,"DOMTokenList");var ji=/^\s+|\s+$/g,Fi=/^[-+]0x[0-9a-f]+$/i,Ni=/^0b[01]+$/i,$i=/^0o[0-7]+$/i,Ui=parseInt,Vi="object"==typeof t&&t&&t.Object===Object&&t,Gi="object"==typeof self&&self&&self.Object===Object&&self,qi=Vi||Gi||Function("return this")(),Hi=Object.prototype.toString,Wi=Math.max,Zi=Math.min,Xi=function(){return qi.Date.now()};function Yi(t,e,r){var n,i,o,s,a,l,c=0,u=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var r=n,o=i;return n=i=void 0,c=e,s=t.apply(o,r)}function p(t){return c=t,a=setTimeout(g,e),u?d(t):s}function m(t){var r=t-l;return void 0===l||r>=e||r<0||h&&t-c>=o}function g(){var t=Xi();if(m(t))return y(t);a=setTimeout(g,function(t){var r=e-(t-l);return h?Zi(r,o-(t-c)):r}(t))}function y(t){return a=void 0,f&&n?d(t):(n=i=void 0,s)}function _(){var t=Xi(),r=m(t);if(n=arguments,i=this,l=t,r){if(void 0===a)return p(l);if(h)return a=setTimeout(g,e),d(l)}return void 0===a&&(a=setTimeout(g,e)),s}return e=Ji(e)||0,Ki(r)&&(u=!!r.leading,o=(h="maxWait"in r)?Wi(Ji(r.maxWait)||0,e):o,f="trailing"in r?!!r.trailing:f),_.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=i=a=void 0},_.flush=function(){return void 0===a?s:y(Xi())},_}function Ki(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ji(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==Hi.call(t)}(t))return NaN;if(Ki(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ki(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ji,"");var r=Ni.test(t);return r||$i.test(t)?Ui(t.slice(2),r?2:8):Fi.test(t)?NaN:+t}var Qi=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Ki(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Yi(t,e,{leading:n,maxWait:e,trailing:i})},to=/^\s+|\s+$/g,eo=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,no=/^0o[0-7]+$/i,io=parseInt,oo="object"==typeof t&&t&&t.Object===Object&&t,s
vendor: 4,311 bytes, line 2
2o="object"==typeof self&&self&&self.Object===Object&&self,ao=oo||so||Function("return this")(),lo=Object.prototype.toString,co=Math.max,uo=Math.min,ho=function(){return ao.Date.now()};function fo(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function po(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==lo.call(t)}(t))return NaN;if(fo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=fo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(to,"");var r=ro.test(t);return r||no.test(t)?io(t.slice(2),r?2:8):eo.test(t)?NaN:+t}var mo=function(t,e,r){var n,i,o,s,a,l,c=0,u=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var r=n,o=i;return n=i=void 0,c=e,s=t.apply(o,r)}function p(t){return c=t,a=setTimeout(g,e),u?d(t):s}function m(t){var r=t-l;return void 0===l||r>=e||r<0||h&&t-c>=o}function g(){var t=ho();if(m(t))return y(t);a=setTimeout(g,function(t){var r=e-(t-l);return h?uo(r,o-(t-c)):r}(t))}function y(t){return a=void 0,f&&n?d(t):(n=i=void 0,s)}function _(){var t=ho(),r=m(t);if(n=arguments,i=this,l=t,r){if(void 0===a)return p(l);if(h)return a=setTimeout(g,e),d(l)}return void 0===a&&(a=setTimeout(g,e)),s}return e=po(e)||0,fo(r)&&(u=!!r.leading,o=(h="maxWait"in r)?co(po(r.maxWait)||0,e):o,f="trailing"in r?!!r.trailing:f),_.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=i=a=void 0},_.flush=function(){return void 0===a?s:y(ho())},_},go=/^\[object .+?Constructor\]$/,yo="object"==typeof t&&t&&t.Object===Object&&t,_o="object"==typeof self&&self&&self.Object===Object&&self,vo=yo||_o||Function("return this")(),bo=Array.prototype,xo=Function.prototype,wo=Object.prototype,Eo=vo["__core-js_shared__"],So=function(){var t=/[^.]+$/.exec(Eo&&Eo.keys&&Eo.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),To=xo.toString,Ao=wo.hasOwnProperty,Oo=wo.toString,Co=RegExp("^"+To.call(Ao).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=bo.splice,ko=jo(vo,"Map"),Io=jo(Object,"create");function Po(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Lo(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ro(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Do(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function zo(t){return!(!No(t)||(e=t,So&&So in e))&&(function(t){var e=No(t)?Oo.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Co:go).test(function(t){if(null!=t){try{return To.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Bo(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function jo(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return zo(r)?r:void 0}function Fo(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(Fo.Cache||Ro),r}function No(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Po.prototype.clear=function(){this.__data__=Io?Io(null):{}},Po.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Po.prototype.get=function(t){var e=this.__data__;if(Io){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Ao.call(e,t)?e[t]:void 0},Po.prototype.has=function(t){var e=this.__data__;return Io?void 0!==e[t]:Ao.call(e,t)},Po.prototype.set=function(t,e){return this.__data__[t]=Io&&void 0===e?"__lodash_hash_undefined__":e,this},Lo.prototype.clear=function(){this.__data__=[]},Lo.prototype.delete=function(t){var e=this.__data__,r=Do(e,t);return!(r<0||(r==e.length-1?e.pop():Mo.call(e,r,1),0))},Lo.prototype.get=function(t){var e=this.__data__,r=Do(e,t);return r<0?void 0:e[r][1]},Lo.prototype.has=function(t){return Do(this.__data__,t)>-1}
vendor: 8,710 bytes, line 2
2,Lo.prototype.set=function(t,e){var r=this.__data__,n=Do(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Ro.prototype.clear=function(){this.__data__={hash:new Po,map:new(ko||Lo),string:new Po}},Ro.prototype.delete=function(t){return Bo(this,t).delete(t)},Ro.prototype.get=function(t){return Bo(this,t).get(t)},Ro.prototype.has=function(t){return Bo(this,t).has(t)},Ro.prototype.set=function(t,e){return Bo(this,t).set(t,e),this},Fo.Cache=Ro;var $o,Uo=Fo,Vo=[],Go="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}($o||($o={}));var qo,Ho=function(t){return Object.freeze(t)},Wo=function(t,e){this.inlineSize=t,this.blockSize=e,Ho(this)},Zo=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ho(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Xo=function(t){return t instanceof SVGElement&&"getBBox"in t},Yo=function(t){if(Xo(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},Ko=function(t){var e,r;if(t instanceof Element)return!0;var n=null===(r=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===r?void 0:r.defaultView;return!!(n&&t instanceof n.Element)},Jo="undefined"!=typeof window?window:{},Qo=new WeakMap,ts=/auto|scroll/,es=/^tb|vertical/,rs=/msie|trident/i.test(Jo.navigator&&Jo.navigator.userAgent),ns=function(t){return parseFloat(t||"0")},is=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new Wo((r?e:t)||0,(r?t:e)||0)},os=Ho({devicePixelContentBoxSize:is(),borderBoxSize:is(),contentBoxSize:is(),contentRect:new Zo(0,0,0,0)}),ss=function(t,e){if(void 0===e&&(e=!1),Qo.has(t)&&!e)return Qo.get(t);if(Yo(t))return Qo.set(t,os),os;var r=getComputedStyle(t),n=Xo(t)&&t.ownerSVGElement&&t.getBBox(),i=!rs&&"border-box"===r.boxSizing,o=es.test(r.writingMode||""),s=!n&&ts.test(r.overflowY||""),a=!n&&ts.test(r.overflowX||""),l=n?0:ns(r.paddingTop),c=n?0:ns(r.paddingRight),u=n?0:ns(r.paddingBottom),h=n?0:ns(r.paddingLeft),f=n?0:ns(r.borderTopWidth),d=n?0:ns(r.borderRightWidth),p=n?0:ns(r.borderBottomWidth),m=h+c,g=l+u,y=(n?0:ns(r.borderLeftWidth))+d,_=f+p,v=a?t.offsetHeight-_-t.clientHeight:0,b=s?t.offsetWidth-y-t.clientWidth:0,x=i?m+y:0,w=i?g+_:0,E=n?n.width:ns(r.width)-x-b,S=n?n.height:ns(r.height)-w-v,T=E+m+b+y,A=S+g+v+_,O=Ho({devicePixelContentBoxSize:is(Math.round(E*devicePixelRatio),Math.round(S*devicePixelRatio),o),borderBoxSize:is(T,A,o),contentBoxSize:is(E,S,o),contentRect:new Zo(h,l,E,S)});return Qo.set(t,O),O},as=function(t,e,r){var n=ss(t,r),i=n.borderBoxSize,o=n.contentBoxSize,s=n.devicePixelContentBoxSize;switch(e){case $o.DEVICE_PIXEL_CONTENT_BOX:return s;case $o.BORDER_BOX:return i;default:return o}},ls=function(t){var e=ss(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=Ho([e.borderBoxSize]),this.contentBoxSize=Ho([e.contentBoxSize]),this.devicePixelContentBoxSize=Ho([e.devicePixelContentBoxSize])},cs=function(t){if(Yo(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},us=function(){var t=1/0,e=[];Vo.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new ls(e.target),i=cs(e.target);n.push(r),e.lastReportedSize=as(e.target,e.observedBox),i<t&&(t=i)})),e.push((function(){r.callback.call(r.observer,n,r.observer)})),r.activeTargets.splice(0,r.activeTargets.length)}}));for(var r=0,n=e;r<n.length;r++)(0,n[r])();return t},hs=function(t){Vo.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(r){r.isActive()&&(cs(r.target)>t?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},fs=function(){var t,e=0;for(hs(e);Vo.some((function(t){return t.activeTargets.length>0}));)e=us(),hs(e);return Vo.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:Go}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=Go),window.dispatchEvent(t)),e>0},ds=[],ps=function(t){if(!qo){var e=0,r=document.createTextNode("");new MutationObserver((function(){return ds.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),qo=function(){r.textContent=""+(e?e--:e++)}}ds.push(t),qo()},ms=0,gs={attributes:!0,characterData:!0,childList:!0,subtree:!0},ys=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],_s=function(t){return void 0===t&&(t=0),Date.now()+t},vs=!1,bs=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!vs){vs=!0;var r,n=_s(t);r=function(){var r=!1;try{r=fs()}finally{if(vs=!1,t=n-_s(),!ms)return;r?e.run(1e3):t>0?e.run(t):e.start()}},ps((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,gs)};document.body?e():Jo.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ys.forEach((function(e){return Jo.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),ys.forEach((function(e){return Jo.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),xs=function(t){!ms&&t>0&&bs.start(),!(ms+=t)&&bs.stop()},ws=function(){function t(t,e){this.target=t,this.observedBox=e||$o.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=as(this.target,this.observedBox,!0);return t=this.target,Xo(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Es=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Ss=new WeakMap,Ts=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},As=function(){function t(){}return t.connect=function(t,e){var r=new Es(t,e);Ss.set(t,r)},t.observe=function(t,e,r){var n=Ss.get(t),i=0===n.observationTargets.length;Ts(n.observationTargets,e)<0&&(i&&Vo.push(n),n.observationTargets.push(new ws(e,r&&r.box)),xs(1),bs.schedule())},t.unobserve=function(t,e){var r=Ss.get(t),n=Ts(r.observationTargets,e),i=1===r.observationTargets.length;n>=0&&(i&&Vo.splice(Vo.indexOf(r),1),r.observationTargets.splice(n,1),xs(-1))},t.disconnect=function(t){var e=this,r=Ss.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Os=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");As.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ko(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");As.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ko(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");As.unobserve(this,t)},t.prototype.disconnect=function(){As.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Cs=s.TypeError,Ms=function(t){return function(e,r,n,i){ut(r);var o=x(e),s=ce(o),a=ge(o),l=t?a-1:0,c=t?-1:1;if(n<2)for(;;){if(l in s){i=s[l],l+=c;break}
vendor: 5,004 bytes, line 2
2if(l+=c,t?l<0:a<=l)throw Cs("Reduce of empty array with no initial value")}for(;t?l>=0:a>l;l+=c)l in s&&(i=r(i,s[l],l,o));return i}},ks={left:Ms(!1),right:Ms(!0)},Is="process"==Xt(s.process),Ps=ks.left,Ls=Le("reduce");dr({target:"Array",proto:!0,forced:!Ls||!Is&&z>79&&z<83},{reduce:function(t){var e=arguments.length;return Ps(this,t,e,e>1?arguments[1]:void 0)}});var Rs,Ds,zs=function(){var t=et(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Bs=s.RegExp,js=h((function(){var t=Bs("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Fs=js||h((function(){return!Bs("a","y").sticky})),Ns={BROKEN_CARET:js||h((function(){var t=Bs("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Fs,UNSUPPORTED_Y:js},$s=s.RegExp,Us=h((function(){var t=$s(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Vs=s.RegExp,Gs=h((function(){var t=Vs("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),qs=Gt.get,Hs=u("native-string-replace",String.prototype.replace),Ws=RegExp.prototype.exec,Zs=Ws,Xs=y("".charAt),Ys=y("".indexOf),Ks=y("".replace),Js=y("".slice),Qs=(Ds=/b*/g,nt(Ws,Rs=/a/,"a"),nt(Ws,Ds,"a"),0!==Rs.lastIndex||0!==Ds.lastIndex),ta=Ns.BROKEN_CARET,ea=void 0!==/()??/.exec("")[1];(Qs||ea||ta||Us||Gs)&&(Zs=function(t){var e,r,n,i,o,s,a,l=this,c=qs(l),u=mr(t),h=c.raw;if(h)return h.lastIndex=l.lastIndex,e=nt(Zs,h,u),l.lastIndex=h.lastIndex,e;var f=c.groups,d=ta&&l.sticky,p=nt(zs,l),m=l.source,g=0,y=u;if(d&&(p=Ks(p,"y",""),-1===Ys(p,"g")&&(p+="g"),y=Js(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Xs(u,l.lastIndex-1))&&(m="(?: "+m+")",y=" "+y,g++),r=new RegExp("^(?:"+m+")",p)),ea&&(r=new RegExp("^"+m+"$(?!\\s)",p)),Qs&&(n=l.lastIndex),i=nt(Ws,d?r:l,y),d?i?(i.input=Js(i.input,g),i[0]=Js(i[0],g),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:Qs&&i&&(l.lastIndex=l.global?i.index+i[0].length:n),ea&&i&&i.length>1&&nt(Hs,i[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&f)for(i.groups=s=Hr(null),o=0;o<f.length;o++)s[(a=f[o])[0]]=i[a[1]];return i});var ra=Zs;dr({target:"RegExp",proto:!0,forced:/./.exec!==ra},{exec:ra});var na=V("species"),ia=RegExp.prototype,oa=function(t,e,r,n){var i=V(t),o=!h((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),s=o&&!h((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[na]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return e=!0,null},r[i](""),!e}));if(!o||!s||r){var a=y(/./[i]),l=e(i,""[t],(function(t,e,r,n,i){var s=y(t),l=e.exec;return l===ra||l===ia.exec?o&&!i?{done:!0,value:a(e,r,n)}:{done:!0,value:s(r,e,n)}:{done:!1}}));Ht(String.prototype,t,l[0]),Ht(ia,i,l[1])}n&&wt(ia[i],"sham",!0)},sa=Rn.charAt,aa=function(t,e,r){return e+(r?sa(t,e).length:1)},la=s.TypeError,ca=function(t,e){var r=t.exec;if(C(r)){var n=nt(r,t,e);return null!==n&&et(n),n}if("RegExp"===Xt(t))return nt(ra,t,e);throw la("RegExp#exec called on incompatible receiver")};oa("match",(function(t,e,r){return[function(e){var r=v(this),n=null==e?void 0:ht(e,t);return n?nt(n,e,r):new RegExp(e)[t](mr(r))},function(t){var n=et(this),i=mr(t),o=r(e,n,i);if(o.done)return o.value;if(!n.global)return ca(n,i);var s=n.unicode;n.lastIndex=0;for(var a,l=[],c=0;null!==(a=ca(n,i));){var u=mr(a[0]);l[c]=u,""===u&&(n.lastIndex=aa(i,me(n.lastIndex),s)),c++}return 0===c?null:l}]}));var ua=At.EXISTS,ha=bt.f,fa=Function.prototype,da=y(fa.toString),pa=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ma=y(pa.exec);H&&!ua&&ha(fa,"name",{configurable:!0,get:function(){try{return ma(pa,da(this))[1]}catch(t){return""}}});var ga=Function.prototype,ya=ga.apply,_a=ga.call,va="object"==typeof Reflect&&Reflect.apply||(f?_a.bind(ya):function(){return _a.apply(ya,arguments)}),ba=Math.floor,xa=y("".charAt),wa=y("".replace),Ea=y("".slice),Sa=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ta=/\$([$&'`]|\d{1,2})/g,Aa=function(t,e,r,n,i,o){var s=r+t.length,a=n.length,l=Ta;return void 0!==i&&(i=x(i),l=Sa),wa(o,l,(function(o,l){var c;switch(xa(l,0)){case"$":return"$";case"&":return t;case"`":return Ea(e,0,r);case"'":return Ea(e,s);case"<":c=i[Ea(l,1,-1)];break;default:var u=+l;if(0===u)return o;if(u>a){var h=ba(u/10);return 0===h?o:h<=a?void 0===n[h-1]?xa(l,1):n[h-1]+xa(l,1):o}c=n[u-1]}return void 0===c?"":c}))},Oa=V("replace"),Ca=Math.max,Ma=Math.min,ka=y([].concat),Ia=y([].push),Pa=y("".indexOf),La=y("".slice),Ra="$0"==="a".replace(/./,"$0"),Da=!!/./[Oa]&&""===/./[Oa]("a","$0");oa("replace",(function(t,e,r){var n=Da?"$":"$0";return[function(t,r){var n=v(this),i=null==t?void 0:ht(t,Oa);return i?nt(i,t,n,r):nt(e,mr(n),t,r)},function(t,i){var o=et(this),s=mr(t);if("string"==typeof i&&-1===Pa(i,n)&&-1===Pa(i,"$<")){var a=r(e,o,s,i);if(a.done)return a.value}var l=C(i);l||(i=mr(i));var c=o.global;if(c){var u=o.unicode;o.lastIndex=0}for(var h=[];;){var f=ca(o,s);if(null===f)break;
2if(Ia(h,f),!c)break;""===mr(f[0])&&(o.lastIndex=aa(s,me(o.lastIndex),u))}for(var d,p="",m=0,g=0;g<h.length;g++){for(var y=mr((f=h[g])[0]),_=Ca(Ma(de(f.index),s.length),0),v=[],b=1;b<f.length;b++)Ia(v,void 0===(d=f[b])?d:String(d));var x=f.groups;if(l){var w=ka([y],v,_,s);void 0!==x&&Ia(w,x);var E=mr(va(i,void 0,w))}else E=Aa(y,s,_,v,x,i);_>=m&&(p+=La(s,m,_)+E,m=_+y.length)}return p+La(s,m)}]}),!!h((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ra||Da);var za=function(t){return Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var n=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[n]=!0;break;case"false":t[n]=!1;break;case void 0:t[n]=!0;break;default:t[n]=e.value}}return t}),{})};function Ba(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function ja(t){return t&&t.ownerDocument?t.ownerDocument:document}var Fa=null,Na=null;function $a(t){if(null===Fa){var e=ja(t);if(void 0===e)return Fa=0;var r=e.body,n=e.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),Fa=i}return Fa}je&&window.addEventListener("resize",(function(){Na!==window.devicePixelRatio&&(Na=window.devicePixelRatio,Fa=null)}));var Ua=function(){function t(e,r){var n=this;this.onScroll=function(){var t=Ba(n.el);n.scrollXTicking||(t.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(t.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0)},this.scrollX=function(){n.axis.x.isOverflowing&&(n.showScrollbar("x"),n.positionScrollbar("x")),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&(n.showScrollbar("y"),n.positionScrollbar("y")),n.scrollYTicking=!1},this.onMouseEnter=function(){n.showScrollbar("x"),n.showScrollbar("y")},this.onMouseMove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this.onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.hideScrollbars=function(){n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.track.rect)||(n.axis.y.scrollbar.el.classList.remove(n.classNames.visible),n.axis.y.isVisible=!1),n.isWithinBounds(n.axis.x.track.rect)||(n.axis.x.scrollbar.el.classList.remove(n.classNames.visible),n.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(e=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(r=n.isWithinBounds(n.axis.y.track.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(t,"x"):n.onTrackClick(t,"x")),r&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(t,"y"):n.onTrackClick(t,"y"))))},this.drag=function(e){var r=n.axis[n.draggedAxis].track,i=r.rect[n.axis[n.draggedAxis].sizeAttr],o=n.axis[n.draggedAxis].scrollbar,s=n.contentWrapperEl[n.axis[n.draggedAxis].scrollSizeAttr],a=parseInt(n.elStyles[n.axis[n.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var l=(("y"===n.draggedAxis?e.pageY:e.pageX)-r.rect[n.axis[n.draggedAxis].offsetAttr]-n.axis[n.draggedAxis].dragOffset)/(i-o.size)*(s-a);"x"===n.draggedAxis&&(l=n.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l-(i+o.size):l,l=n.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-l:l),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=l},this.onEndDrag=function(t){var e=ja(n.el),r=Ba(n.el);t.preventDefault(),t.stopPropagation(),n.el.classList.remove(n.classNames.dragging),e.removeEventListener("mousemove",n.drag,!0),e.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=r.setTimeout((function(){e.removeEventListener("click",n.preventClick,!0),e.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,r),this.classNames=Object.assign({},t.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Qi(this.recalculate.bind(this),64),this.onMouseMove=Qi(this.onMouseMove.bind(this),64),this.hideScrollbars=mo(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=mo(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Uo(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var n=r.firstElementChild;r.scrollLeft=0;var i=t.getOffset(r),o=t.getOffset(n);r.scrollLeft=999;var s=t.getOffset(n);return{isRtlScrollingInverted:i.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),r=ja(t),n=Ba(t);return{top:e.top+(n.pageYOffset||r.documentElement.scrollTop),left
2:e.left+(n.pageXOffset||r.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),je&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.setAccessibilityAttributes=function(){var t=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",t)},e.initListeners=function(){var t=this,e=Ba(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})}
2)),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var r=!1,n=e.ResizeObserver||Os;this.resizeObserver=new n((function(){r&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){r=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=Ba(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1,n=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=r?n+"px":"auto",this.placeholderEl.style.height=a+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=l>n,this.axis.y.isOverflowing=a>c,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&l>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>c-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],n=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=n/r;return e=Math.max(~~(i*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-i),l=~~((n-o.size)*a);l="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l+(n-o.size):l,o.el.style.transform="x"===e?"translate3d("+l+"px, 0, 0)":"translate3d(0, "+l+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=ja(this.el),n=Ba(this.el),i=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-i.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(n.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var r=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var n=Ba(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var i=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=("y"===e?this.mouseY-i:this.mouseX-i)<0?-1:1,l=-1===a?s-o:s+o;!function t(){var i,o;-1===a?s>l&&(s-=r.options.clickOnTrackSpeed,r.contentWrapperEl.scrollTo(((i={})[r.axis[e].offsetAttr]=s,i)),n.requestAnimationFrame(t)):s<l&&(s+=r.options.clickOnTrackSpeed,r.contentWrapperEl.scrollTo(((o={})[r.axis[e].offsetAttr]=s,o)),n.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:$a(this.el)}catch(t){return $a(this.el)}},e.removeListeners=function(){var t=this,e=Ba(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})}
2)),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();return Ua.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Ua.instances=new WeakMap,Ua.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Ua.instances.has(t)||new Ua(t,za(t.attributes))}))},Ua.removeObserver=function(){this.globalObserver.disconnect()},Ua.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Ua.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},Ua.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Ua.instances.has(t)&&document.documentElement.contains(t)&&new Ua(t,za(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"!==t.getAttribute("data-simplebar")&&!Ua.instances.has(t)&&document.documentElement.contains(t)&&new Ua(t,za(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?Ua.instances.has(t)&&!document.documentElement.contains(t)&&Ua.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Ua.instances.has(t)&&!document.documentElement.contains(t)&&Ua.instances.get(t).unMount()})))}))}))},Ua.getOptions=za,je&&Ua.initHtmlApi(),Ua}()},6612:function(t){t.exports=function(){"use strict";const{hasOwnProperty:t,toString:e}=Object.prototype;function r(e,r){return t.call(e,r)}const n=/\B([A-Z])/g,i=X((t=>t.replace(n,"-$1").toLowerCase())),o=/-(\w)/g,s=X((t=>t.replace(o,l))),a=X((t=>t.length?l(null,t.charAt(0))+t.slice(1):""));function l(t,e){return e?e.toUpperCase():""}function c(t,e){return null==t||null==t.startsWith?void 0:t.startsWith(e)}function u(t,e){return null==t||null==t.endsWith?void 0:t.endsWith(e)}function h(t,e){return null==t||null==t.includes?void 0:t.includes(e)}function f(t,e){return null==t||null==t.findIndex?void 0:t.findIndex(e)}const{isArray:d,from:p}=Array,{assign:m}=Object;function g(t){return"function"==typeof t}function y(t){return null!==t&&"object"==typeof t}function _(t){return"[object Object]"===e.call(t)}function v(t){return y(t)&&t===t.window}function b(t){return 9===E(t)}function x(t){return E(t)>=1}function w(t){return 1===E(t)}function E(t){return!v(t)&&y(t)&&t.nodeType}function S(t){return"boolean"==typeof t}function T(t){return"string"==typeof t}function A(t){return"number"==typeof t}function O(t){return A(t)||T(t)&&!isNaN(t-parseFloat(t))}function C(t){return!(d(t)?t.length:y(t)&&Object.keys(t).length)}function M(t){return void 0===t}function k(t){return S(t)?t:"true"===t||"1"===t||""===t||"false"!==t&&"0"!==t&&t}function I(t){const e=Number(t);return!isNaN(e)&&e}function P(t){return parseFloat(t)||0}function L(t){return R(t)[0]}function R(t){return t&&(x(t)?[t]:Array.from(t).filter(x))||[]}function D(t){var e;if(v(t))return t;const r=b(t=L(t))?t:null==(e=t)?void 0:e.ownerDocument;return(null==r?void 0:r.defaultView)||window}function z(t){return t?u(t,"ms")?P(t):1e3*P(t):0}function B(t,e){return t===e||y(t)&&y(e)&&Object.keys(t).length===Object.keys(e).length&&N(t,((t,r)=>t===e[r]))}function j(t,e,r){return t.replace(new RegExp(e+"|"+r,"g"),(t=>t===e?r:e))}function F(t){return t[t.length-1]}function N(t,e){for(const r in t)if(!1===e(t[r],r))return!1;return!0}function $(t,e){return t.slice().sort(((t,r)=>{let{[e]:n=0}=t,{[e]:i=0}=r;return n>i?1:i>n?-1:0}))}function U(t,e){const r=new Set;return t.filter((t=>{let{[e]:n}=t;return!r.has(n)&&r.add(n)}))}function V(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=1),Math.min(Math.max(I(t)||0,e),r)}function G(){}function q(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return[["bottom","top"],["right","left"]].every((t=>{let[r,n]=t;return Math.min(...e.map((t=>{let{[r]:e}=t;return e})))-Math.max(...e.map((t=>{let{[n]:e}=t;return e})))>0}))}function H(t,e){return t.x<=e.right&&t.x>=e.left&&t.y<=e.bottom&&t.y>=e.top}const W={ratio(t,e,r){const n="width"===e?"height":"width";return{[n]:t[e]?Math.round(r*t[n]/t[e]):t[n],[e]:r}},contain(t,e){return N(t={...t},((r,n)=>t=t[n]>e[n]?this.ratio(t,n,e[n]):t)),t},cover(t,e){return N(t=this.contain(t,e),((r,n)=>t=t[n]<e[n]?this.ratio(t,n,e[n]):t)),t}};function Z(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=!1),e=R(e);const{length:i}=e;return i?(t=O(t)?I(t):"next"===t?r+1:"previous"===t?r-1:e.indexOf(L(t)),n?V(t,0,i-1):(t%=i)<0?t+i:t):-1}function X(t){const e=Object.create(null);return r=>e[r]||(e[r]=t(r))}class Y{constructor(){this.promise=new Promise(((t,e)=>{this.reject=e,this.resolve=t}))}}function K(t,e,r){if(y(e))for(const r in e)K(t,r,e[r]);else{var n;if(M(r))return null==(n=L(t))?void 0:n.getAttribute(e);for(const n of R(t))g(r)&&(r=r.call(n,K(n,e))),null===r?Q(n,e):n.setAttribute(e,r)}}function J(t,e){return R(t).some((t=>t.hasAttribute(e)))}function Q(t,e){const r=R(t);for(const t of e.split(" "))for(const e of r)e.removeAttribute(t)}function tt(t,e){for(const r of[e,"data-"+e])if(J(t,r))return K(t,r)}const et={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function rt(t){return R(t).some((t=>et[t.tagName.toLowerCase()]))}function nt(t){return R(t).some((t=>t.offsetWidth||t.offsetHeight||t.getClientRects().length))}const it="input,select,textarea,button";function ot(t){return R(t).some((t=>ut(t,it)))}const st=it+",a[href],[tabindex]";function at(t){return ut(t,st)}function lt(t){var e;return null==(e=L(t))?void 0:e.parentElement}function ct(t,e){return R(t).filter((t=>ut(t,e)))}function ut(t,e){return R(t).some((t=>t.matches(e)))}function ht(t,e){return c(e,">")&&(e=e.slice(1)),w(t)?t.closest(e):R(t).map((t=>
2ht(t,e))).filter(Boolean)}function ft(t,e){return T(e)?ut(t,e)||!!ht(t,e):t===e||L(e).contains(L(t))}function dt(t,e){const r=[];for(;t=lt(t);)e&&!ut(t,e)||r.push(t);return r}function pt(t,e){const r=(t=L(t))?R(t.children):[];return e?ct(r,e):r}function mt(t,e){return e?R(t).indexOf(L(e)):pt(lt(t)).indexOf(t)}function gt(t,e){return _t(t,wt(t,e))}function yt(t,e){return vt(t,wt(t,e))}function _t(t,e){return L(Tt(t,e,"querySelector"))}function vt(t,e){return R(Tt(t,e,"querySelectorAll"))}const bt=/(^|[^\\],)\s*[!>+~-]/,xt=X((t=>t.match(bt)));function wt(t,e){return void 0===e&&(e=document),T(t)&&xt(t)||b(e)?e:e.ownerDocument}const Et=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,St=X((t=>t.replace(Et,"$1 *")));function Tt(t,e,r){if(void 0===e&&(e=document),!t||!T(t))return t;if(t=St(t),xt(t)){const r=Ot(t);t="";for(let n of r){let i=e;if("!"===n[0]){const t=n.substr(1).trim().split(" ");if(i=ht(lt(e),t[0]),n=t.slice(1).join(" ").trim(),!n.length&&1===r.length)return i}if("-"===n[0]){const t=n.substr(1).trim().split(" "),r=(i||e).previousElementSibling;i=ut(r,n.substr(1))?r:null,n=t.slice(1).join(" ")}i&&(t+=(t?",":"")+Ct(i)+" "+n)}e=document}try{return e[r](t)}catch(t){return null}}const At=/.*?[^\\](?:,|$)/g,Ot=X((t=>t.match(At).map((t=>t.replace(/,$/,"").trim()))));function Ct(t){const e=[];for(;t.parentNode;){const r=K(t,"id");if(r){e.unshift("#"+Mt(r));break}{let{tagName:r}=t;"HTML"!==r&&(r+=":nth-child("+(mt(t)+1)+")"),e.unshift(r),t=t.parentNode}}return e.join(" > ")}function Mt(t){return T(t)?CSS.escape(t):""}function kt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];let[n,i,o,s,a=!1]=Dt(e);s.length>1&&(s=Bt(s)),null!=a&&a.self&&(s=jt(s)),o&&(s=zt(o,s));for(const t of i)for(const e of n)e.addEventListener(t,s,a);return()=>It(n,i,s,a)}function It(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];let[n,i,,o,s=!1]=Dt(e);for(const t of i)for(const e of n)e.removeEventListener(t,o,s)}function Pt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const[n,i,o,s,a=!1,l]=Dt(e),c=kt(n,i,o,(t=>{const e=!l||l(t);e&&(c(),s(t,e))}),a);return c}function Lt(t,e,r){return $t(t).every((t=>t.dispatchEvent(Rt(e,!0,!0,r))))}function Rt(t,e,r,n){return void 0===e&&(e=!0),void 0===r&&(r=!1),T(t)&&(t=new CustomEvent(t,{bubbles:e,cancelable:r,detail:n})),t}function Dt(t){return t[0]=$t(t[0]),T(t[1])&&(t[1]=t[1].split(" ")),g(t[2])&&t.splice(2,0,!1),t}function zt(t,e){return r=>{const n=">"===t[0]?vt(t,r.currentTarget).reverse().filter((t=>ft(r.target,t)))[0]:ht(r.target,t);n&&(r.current=n,e.call(this,r))}}function Bt(t){return e=>d(e.detail)?t(e,...e.detail):t(e)}function jt(t){return function(e){if(e.target===e.currentTarget||e.target===e.current)return t.call(null,e)}}function Ft(t){return t&&"addEventListener"in t}function Nt(t){return Ft(t)?t:L(t)}function $t(t){return d(t)?t.map(Nt).filter(Boolean):T(t)?vt(t):Ft(t)?[t]:R(t)}function Ut(t){return"touch"===t.pointerType||!!t.touches}function Vt(t){var e,r;const{clientX:n,clientY:i}=(null==(e=t.touches)?void 0:e[0])||(null==(r=t.changedTouches)?void 0:r[0])||t;return{x:n,y:i}}function Gt(t,e){const r={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:G,responseType:"",...e};return Promise.resolve().then((()=>r.beforeSend(r))).then((()=>qt(t,r)))}function qt(t,e){return new Promise(((r,n)=>{const{xhr:i}=e;for(const t in e)if(t in i)try{i[t]=e[t]}catch(t){}i.open(e.method.toUpperCase(),t);for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);kt(i,"load",(()=>{0===i.status||i.status>=200&&i.status<300||304===i.status?r(i):n(m(Error(i.statusText),{xhr:i,status:i.status}))})),kt(i,"error",(()=>n(m(Error("Network Error"),{xhr:i})))),kt(i,"timeout",(()=>n(m(Error("Network Timeout"),{xhr:i})))),i.send(e.data)}))}function Ht(t,e,r){return new Promise(((n,i)=>{const o=new Image;o.onerror=t=>{i(t)},o.onload=()=>{n(o)},r&&(o.sizes=r),e&&(o.srcset=e),o.src=t}))}const Wt={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function Zt(t,e,r,n){void 0===n&&(n="");const i=R(t);for(const t of i)if(T(e)){if(e=Qt(e),M(r))return Yt(t,e);r||A(r)?t.style.setProperty(e,O(r)&&!Wt[e]?r+"px":r,n):t.style.removeProperty(e)}else{if(d(e)){const r=Xt(t),n={};for(const t of e)n[t]=r[Qt(t)];return n}y(e)&&(n=r,N(e,((e,r)=>Zt(t,r,e,n))))}return i[0]}function Xt(t,e){return D(t).getComputedStyle(t,e)}function Yt(t,e,r){return Xt(t,r)[e]}const Kt=/^\s*(["'])?(.*?)\1\s*$/;function Jt(t){return Xt(document.documentElement).getPropertyValue("--uk-"+t).replace(Kt,"$2")}const Qt=X((t=>ee(t))),te=["webkit","moz"];function ee(t){t=i(t);const{style:e}=document.documentElement;if(t in e)return t;let r,n=te.length;for(;n--;)if(r="-"+te[n]+"-"+t,r in e)return r}function re(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];le(t,r,"add")}function ne(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];le(t,r,"remove")}function ie(t,e){K(t,"class",(t=>(t||"").replace(new RegExp("\\b"+e+"\\b","g"),"")))}function oe(t){(arguments.length<=1?void 0:arguments[1])&&ne(t,arguments.length<=1?void 0:arguments[1]),(arguments.length<=2?void 0:arguments[2])&&re(t,arguments.length<=2?void 0:arguments[2])}function se(t,e){return[e]=ce(e),!!e&&R(t).some((t=>t.classList.contains(e)))}function ae(t,e,r){const n=ce(e);M(r)||(r=!!r);for(const e of R(t))for(const t of n)e.classList.toggle(t,r)}function le(t,e,r){e=e.reduce(((t,e)=>t.concat(ce(e))),[]);for(const n of R(t))n.classList[r](...e)}
2function ce(t){return String(t).split(/\s|,/).filter(Boolean)}function ue(t,e,r,n){return void 0===r&&(r=400),void 0===n&&(n="linear"),Promise.all(R(t).map((t=>new Promise(((i,o)=>{for(const r in e){const e=Zt(t,r);""===e&&Zt(t,r,e)}const s=setTimeout((()=>Lt(t,"transitionend")),r);Pt(t,"transitionend transitioncanceled",(e=>{let{type:r}=e;clearTimeout(s),ne(t,"uk-transition"),Zt(t,{transitionProperty:"",transitionDuration:"",transitionTimingFunction:""}),"transitioncanceled"===r?o():i(t)}),{self:!0}),re(t,"uk-transition"),Zt(t,{transitionProperty:Object.keys(e).map(Qt).join(","),transitionDuration:r+"ms",transitionTimingFunction:n,...e})})))))}const he={start:ue,stop:t=>(Lt(t,"transitionend"),Promise.resolve()),cancel(t){Lt(t,"transitioncanceled")},inProgress:t=>se(t,"uk-transition")},fe="uk-animation-";function de(t,e,r,n,i){return void 0===r&&(r=200),Promise.all(R(t).map((t=>new Promise(((o,s)=>{Lt(t,"animationcanceled");const a=setTimeout((()=>Lt(t,"animationend")),r);Pt(t,"animationend animationcanceled",(e=>{let{type:r}=e;clearTimeout(a),"animationcanceled"===r?s():o(t),Zt(t,"animationDuration",""),ie(t,fe+"\\S*")}),{self:!0}),Zt(t,"animationDuration",r+"ms"),re(t,e,fe+(i?"leave":"enter")),c(e,fe)&&(n&&re(t,"uk-transform-origin-"+n),i&&re(t,fe+"reverse"))})))))}const pe=new RegExp(fe+"(enter|leave)"),me={in:de,out:(t,e,r,n)=>de(t,e,r,n,!0),inProgress:t=>pe.test(K(t,"class")),cancel(t){Lt(t,"animationcanceled")}},ge={width:["left","right"],height:["top","bottom"]};function ye(t){const e=w(t)?L(t).getBoundingClientRect():{height:xe(t),width:we(t),top:0,left:0};return{height:e.height,width:e.width,top:e.top,left:e.left,bottom:e.top+e.height,right:e.left+e.width}}function _e(t,e){const r=ye(t);if(t){const{scrollY:e,scrollX:n}=D(t),i={height:e,width:n};for(const t in ge)for(const e in ge[t])r[ge[t][e]]+=i[t]}if(!e)return r;const n=Zt(t,"position");N(Zt(t,["left","top"]),((i,o)=>Zt(t,o,e[o]-r[o]+P("absolute"===n&&"auto"===i?ve(t)[o]:i))))}function ve(t){let{top:e,left:r}=_e(t);const{ownerDocument:{body:n,documentElement:i},offsetParent:o}=L(t);let s=o||i;for(;s&&(s===n||s===i)&&"static"===Zt(s,"position");)s=s.parentNode;if(w(s)){const t=_e(s);e-=t.top+P(Zt(s,"borderTopWidth")),r-=t.left+P(Zt(s,"borderLeftWidth"))}return{top:e-P(Zt(t,"marginTop")),left:r-P(Zt(t,"marginLeft"))}}function be(t){const e=[0,0];t=L(t);
2do{if(e[0]+=t.offsetTop,e[1]+=t.offsetLeft,"fixed"===Zt(t,"position")){const r=D(t);return e[0]+=r.scrollY,e[1]+=r.scrollX,e}}while(t=t.offsetParent);return e}const xe=Ee("height"),we=Ee("width");function Ee(t){const e=a(t);return(r,n)=>{if(M(n)){if(v(r))return r["inner"+e];if(b(r)){const t=r.documentElement;return Math.max(t["offset"+e],t["scroll"+e])}return(n="auto"===(n=Zt(r=L(r),t))?r["offset"+e]:P(n)||0)-Se(r,t)}return Zt(r,t,n||0===n?+n+Se(r,t)+"px":"")}}function Se(t,e,r){return void 0===r&&(r="border-box"),Zt(t,"boxSizing")===r?ge[e].map(a).reduce(((e,r)=>e+P(Zt(t,"padding"+r))+P(Zt(t,"border"+r+"Width"))),0):0}function Te(t){for(const e in ge)for(const r in ge[e])if(ge[e][r]===t)return ge[e][1-r];return t}function Ae(t,e,r,n){return void 0===e&&(e="width"),void 0===r&&(r=window),void 0===n&&(n=!1),T(t)?Ce(t).reduce(((t,i)=>{const o=ke(i);return o&&(i=Ie("vh"===o?xe(D(r)):"vw"===o?we(D(r)):n?r["offset"+a(e)]:ye(r)[e],i)),t+P(i)}),0):P(t)}const Oe=/-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g,Ce=X((t=>t.toString().replace(/\s/g,"").match(Oe)||[])),Me=/(?:v[hw]|%)$/,ke=X((t=>(t.match(Me)||[])[0]));function Ie(t,e){return t*P(e)/100}function Pe(t){"loading"===document.readyState?Pt(document,"DOMContentLoaded",t):t()}function Le(t,e){var r;return(null==t||null==(r=t.tagName)?void 0:r.toLowerCase())===e.toLowerCase()}function Re(t){return ze(t,"")}function De(t,e){return M(e)?Ke(t).innerHTML:ze(t,e)}const ze=$e("replaceChildren"),Be=$e("prepend"),je=$e("append"),Fe=$e("before"),Ne=$e("after");function $e(t){return function(e,r){var n;const i=R(T(r)?Ze(r):r);return null==(n=Ke(e))||n[t](...i),Xe(i)}}function Ue(t){R(t).forEach((t=>t.remove()))}function Ve(t,e){for(e=L(Fe(t,e));e.firstChild;)e=e.firstChild;return je(e,t),e}function Ge(t,e){return R(R(t).map((t=>t.hasChildNodes()?Ve(R(t.childNodes),e):je(t,e))))}function qe(t){R(t).map(lt).filter(((t,e,r)=>r.indexOf(t)===e)).forEach((t=>t.replaceWith(...t.childNodes)))}const He=/^\s*<(\w+|!)[^>]*>/,We=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Ze(t){const e=We.exec(t);if(e)return document.createElement(e[1]);const r=document.createElement("div");return He.test(t)?r.insertAdjacentHTML("beforeend",t.trim()):r.textContent=t,Xe(r.childNodes)}function Xe(t){return t.length>1?t:t[0]}function Ye(t,e){if(w(t))for(e(t),t=t.firstElementChild;t;){const r=t.nextElementSibling;Ye(t,e),t=r}}function Ke(t,e){return Qe(t)?L(Ze(t)):_t(t,e)}function Je(t,e){return Qe(t)?R(Ze(t)):vt(t,e)}function Qe(t){return T(t)&&c(t.trim(),"<")}const tr="undefined"!=typeof window,er=tr&&"rtl"===K(document.documentElement,"dir"),rr=tr&&"ontouchstart"in window,nr=tr&&window.PointerEvent,ir=nr?"pointerdown":rr?"touchstart":"mousedown",or=nr?"pointermove":rr?"touchmove":"mousemove",sr=nr?"pointerup":rr?"touchend":"mouseup",ar=nr?"pointerenter":rr?"":"mouseenter",lr=nr?"pointerleave":rr?"":"mouseleave",cr=nr?"pointercancel":"touchcancel",ur={reads:[],writes:[],read(t){return this.reads.push(t),dr(),t},write(t){return this.writes.push(t),dr(),t},clear(t){mr(this.reads,t),mr(this.writes,t)},flush:hr};function hr(t){pr(ur.reads),pr(ur.writes.splice(0)),ur.scheduled=!1,(ur.reads.length||ur.writes.length)&&dr(t+1)}const fr=4;function dr(t){ur.scheduled||(ur.scheduled=!0,t&&t<fr?Promise.resolve().then((()=>hr(t))):requestAnimationFrame((()=>hr(1))))}function pr(t){let e;for(;e=t.shift();)try{e()}catch(t){console.error(t)}}function mr(t,e){const r=t.indexOf(e);return~r&&t.splice(r,1)}function gr(){}function yr(t,e){let[{x:r,y:n},{x:i,y:o}]=t,[{x:s,y:a},{x:l,y:c}]=e;const u=(c-a)*(i-r)-(l-s)*(o-n);if(0===u)return!1;const h=((l-s)*(n-a)-(c-a)*(r-s))/u;return!(h<0)&&{x:r+h*(i-r),y:n+h*(o-n)}}function _r(t,e,r,n){return void 0===n&&(n=!0),Sr(IntersectionObserver,t,n?(t,r)=>{t.some((t=>t.isIntersecting))&&e(t,r)}:e,r)}gr.prototype={positions:[],init(){let t;this.positions=[],this.unbind=kt(document,"mousemove",(e=>t=Vt(e))),this.interval=setInterval((()=>{t&&(this.positions.push(t),this.positions.length>5&&this.positions.shift())}),50)},cancel(){var t;null==(t=this.unbind)||t.call(this),this.interval&&clearInterval(this.interval)},movesTo(t){if(this.positions.length<2)return!1;const e=t.getBoundingClientRect(),{left:r,right:n,top:i,bottom:o}=e,[s]=this.positions,a=F(this.positions),l=[s,a];return!H(a,e)&&[[{x:r,y:i},{x:n,y:o}],[{x:r,y:o},{x:n,y:i}]].some((t=>{const r=yr(l,t);return r&&H(r,e)}))}};const vr=window.ResizeObserver;function br(t,e,r){return void 0===r&&(r={box:"border-box"}),vr?Sr(ResizeObserver,t,e,r):(wr(),xr.add(e),{disconnect(){xr.delete(e)}})}let xr;function wr(){if(xr)return;let t;xr=new Set;const e=()=>{if(!t){t=!0,ur.read((()=>t=!1));for(const t of xr)t()}};kt(window,"load resize",e),kt(document,"loadedmetadata load",e,!0)}function Er(t,e,r){return Sr(MutationObserver,t,e,r)}function Sr(t,e,r,n){const i=new t(r);for(const t of R(e))i.observe(t,n);return i}const Tr={};function Ar(t,e,r){return Tr.computed(g(t)?t.call(r,r):t,g(e)?e.call(r,r):e)}function Or(t,e){return t=t&&!d(t)?[t]:t,e?t?t.concat(e):d(e)?e:[e]:t}function Cr(t,e){return M(e)?t:e}function Mr(t,e,n){const i={};if(g(e)&&(e=e.options),e.extends&&(t=Mr(t,e.extends,n)),e.mixins)for(const r of e.mixins)t=Mr(t,r,n);for(const e in t)o(e);for(const n in e)r(t,n)||o(n);function o(r){i[r]=(Tr[r]||Cr)(t[r],e[r],n)}return i}function kr(t,e){void 0===e&&(e=[]);try{return t?c(t,"{")?JSON.parse(t):e.length&&!h(t,":")?{[e[0]]:t}:t.split(";").reduce(((t,e)=>{const[r,n]=e.split(/:(.*)/);return r&&!M(n)&&(t[r.trim()]=n.trim()),t}),{}):{}}catch(t){return{}}}function Ir(t){if(zr(t)&&Fr(t,{func:"playVideo",method:"play"}),Dr(t))try{t.play().catch(G)}catch(t){}}function Pr(t){zr(t)&&Fr(t,{func:"pauseVideo",method:"pause"}),Dr(t)&&t.pause()}function Lr(t){zr(t)&&Fr(t,{func:"mute",method:"setVolume",value:0}),Dr(t)&&(t.muted=!0)}function Rr(t){return Dr(t)||zr(t)}function Dr(t){return Le(t,"video")}function zr(t){return Le(t,"iframe")&&(Br(t)||jr(t))}function Br(t){return!!t.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/)}function jr(t){return!!t.src.match(/vimeo\.com\/video\/.*/)}async function Fr(t,e){await Vr(t),Nr(t,e)}function Nr(t,e){try{t.contentWindow.postMessage(JSON.stringify({event:"command",...e}),"*")}catch(t){}}Tr.events=Tr.created=Tr.beforeConnect=Tr.connected=Tr.beforeDisconnect=Tr.disconnected=Tr.destroy=Or,Tr.args=function(t,e){return!1!==e&&Or(e||t)},Tr.update=function(t,e){return $(Or(t,g(e)?{read:e}:e),"order")},Tr.props=function(t,e){if(d(e)){const t={};for(const r of e)t[r]=String;e=t}return Tr.methods(t,e)},Tr.computed=Tr.methods=function(t,e){return e?t?{...t,...e}
2:e:t},Tr.data=function(t,e,r){return r?Ar(t,e,r):e?t?function(r){return Ar(t,e,r)}:e:t};const $r="_ukPlayer";let Ur=0;function Vr(t){if(t[$r])return t[$r];const e=Br(t),r=jr(t),n=++Ur;let i;return t[$r]=new Promise((o=>{e&&Pt(t,"load",(()=>{const e=()=>Nr(t,{event:"listening",id:n});i=setInterval(e,100),e()})),Pt(window,"message",o,!1,(t=>{let{data:i}=t;try{return i=JSON.parse(i),i&&(e&&i.id===n&&"onReady"===i.event||r&&Number(i.player_id)===n)}catch(t){}})),t.src=t.src+(h(t.src,"?")?"&":"?")+(e?"enablejsapi=1":"api=1&player_id="+n)})).then((()=>clearInterval(i)))}function Gr(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=0),!!nt(t)&&q(...Zr(t).map((t=>{const{top:n,left:i,bottom:o,right:s}=_e(Xr(t));return{top:n-e,left:i-r,bottom:o+e,right:s+r}})).concat(_e(t)))}function qr(t,e){if(t=v(t)||b(t)?Kr(t):L(t),M(e))return t.scrollTop;t.scrollTop=e}function Hr(t,e){let{offset:r=0}=void 0===e?{}:e;const n=nt(t)?Zr(t):[];return n.reduce(((e,o,s)=>{const{scrollTop:a,scrollHeight:l,offsetHeight:c}=o,u=l-Yr(o),{height:h,top:f}=_e(n[s-1]||t);let d=Math.ceil(f-_e(Xr(o)).top-r+a);return r>0&&c<h+r?d+=r:r=0,d>u?(r-=d-u,d=u):d<0&&(r-=d,d=0),()=>i(o,d-a).then(e)}),(()=>Promise.resolve()))();function i(t,e){return new Promise((r=>{const n=t.scrollTop,i=o(Math.abs(e)),a=Date.now();!function o(){const l=s(V((Date.now()-a)/i));qr(t,n+e*l),1===l?r():requestAnimationFrame(o)}()}))}function o(t){return 40*Math.pow(t,.375)}function s(t){return.5*(1-Math.cos(Math.PI*t))}}function Wr(t,e,r){if(void 0===e&&(e=0),void 0===r&&(r=0),!nt(t))return 0;const[n]=Zr(t,/auto|scroll/,!0),{scrollHeight:i,scrollTop:o}=n,s=Yr(n),a=i-s,l=be(t)[0]-be(n)[0],c=Math.max(0,l-s+e);return V((o-c)/(Math.min(a,l+t.offsetHeight-r)-c))}function Zr(t,e,r){void 0===e&&(e=/auto|scroll|hidden/),void 0===r&&(r=!1);const n=Kr(t);let i=dt(t).reverse();i=i.slice(i.indexOf(n)+1);const o=f(i,(t=>"fixed"===Zt(t,"position")));return~o&&(i=i.slice(o)),[n].concat(i.filter((t=>e.test(Zt(t,"overflow"))&&(!r||t.scrollHeight>Yr(t))))).reverse()}function Xr(t){return t===Kr(t)?window:t}function Yr(t){return(t===Kr(t)?document.documentElement:t).clientHeight}function Kr(t){const{document:e}=D(t);return e.scrollingElement||e.documentElement}const Jr={width:["x","left","right"],height:["y","top","bottom"]};function Qr(t,e,r,n,i,o,s,a){r=en(r),n=en(n);const l={element:r,target:n};if(!t||!e)return l;const c=_e(t),u=_e(e),f=u;if(tn(f,r,c,-1),tn(f,n,u,1),i=rn(i,c.width,c.height),o=rn(o,u.width,u.height),i.x+=o.x,i.y+=o.y,f.left+=i.x,f.top+=i.y,s){let e=Zr(t).map(Xr);a&&!h(e,a)&&e.unshift(a),e=e.map((t=>_e(t))),N(Jr,((t,o)=>{let[a,d,p]=t;(!0===s||h(s,a))&&e.some((t=>{const e=r[a]===d?-c[o]:r[a]===p?c[o]:0,s=n[a]===d?u[o]:n[a]===p?-u[o]:0;if(f[d]<t[d]||f[d]+c[o]>t[p]){const t=c[o]/2,i="center"===n[a]?-u[o]/2:0;return"center"===r[a]&&(h(t,i)||h(-t,-i))||h(e,s)}function h(e,r){const n=P((f[d]+e+r-2*i[a]).toFixed(4));if(n>=t[d]&&n+c[o]<=t[p]){f[d]=n;for(const t of["element","target"])e&&(l[t][a]=l[t][a]===Jr[o][1]?Jr[o][2]:Jr[o][1]);return!0}}}))}))}return _e(t,f),l}function tn(t,e,r,n){N(Jr,((i,o)=>{let[s,a,l]=i;e[s]===l?t[a]+=r[o]*n:"center"===e[s]&&(t[a]+=r[o]*n/2)}))}function en(t){const e=/left|center|right/,r=/top|center|bottom/;return 1===(t=(t||"").split(" ")).length&&(t=e.test(t[0])?t.concat("center"):r.test(t[0])?["center"].concat(t):["center","center"]),{x:e.test(t[0])?t[0]:"center",y:r.test(t[1])?t[1]:"center"}}function rn(t,e,r){const[n,i]=(t||"").split(" ");return{x:n?P(n)*(u(n,"%")?e/100:1):0,y:i?P(i)*(u(i,"%")?r/100:1):0}}var nn=Object.freeze({__proto__:null,ajax:Gt,getImage:Ht,transition:ue,Transition:he,animate:de,Animation:me,attr:K,hasAttr:J,removeAttr:Q,data:tt,addClass:re,removeClass:ne,removeClasses:ie,replaceClass:oe,hasClass:se,toggleClass:ae,dimensions:ye,offset:_e,position:ve,offsetPosition:be,height:xe,width:we,boxModelAdjust:Se,flipPosition:Te,toPx:Ae,ready:Pe,isTag:Le,empty:Re,html:De,replaceChildren:ze,prepend:Be,append:je,before:Fe,after:Ne,remove:Ue,wrapAll:Ve,wrapInner:Ge,unwrap:qe,fragment:Ze,apply:Ye,$:Ke,$$:Je,inBrowser:tr,isRtl:er,hasTouch:rr,pointerDown:ir,pointerMove:or,pointerUp:sr,pointerEnter:ar,pointerLeave:lr,pointerCancel:cr,on:kt,off:It,once:Pt,trigger:Lt,createEvent:Rt,toEventTargets:$t,isTouch:Ut,getEventPos:Vt,fastdom:ur,isVoidElement:rt,isVisible:nt,selInput:it,isInput:ot,selFocusable:st,isFocusable:at,parent:lt,filter:ct,matches:ut,closest:ht,within:ft,parents:dt,children:pt,index:mt,hasOwn:r,hyphenate:i,camelize:s,ucfirst:a,startsWith:c,endsWith:u,includes:h,findIndex:f,isArray:d,toArray:p,assign:m,isFunction:g,isObject:y,isPlainObject:_,isWindow:v,isDocument:b,isNode:x,isElement:w,isBoolean:S,isString:T,isNumber:A,isNumeric:O,isEmpty:C,isUndefined:M,toBoolean:k,toNumber:I,toFloat:P,toNode:L,toNodes:R,toWindow:D,toMs:z,isEqual:B,swap:j,last:F,each:N,sortBy:$,uniqueBy:U,clamp:V,noop:G,intersectRect:q,pointInRect:H,Dimensions:W,getIndex:Z,memoize:X,Deferred:Y,MouseTracker:gr,observeIntersection:_r,observeResize:br,observeMutation:Er,mergeOptions:Mr,parseOptions:kr,play:Ir,pause:Pr,mute:Lr,isVideo:Rr,positionAt:Qr,query:gt,queryAll:yt,find:_t,findAll:vt,escape:Mt,css:Zt,getCssVar:Jt,propName:Qt,isInView:Gr,scrollTop:qr,scrollIntoView:Hr,scrolledOver:Wr,scrollParents:Zr,getViewport:Xr,getViewportClientHeight:Yr,getScrollingElement:Kr});function on(t){const e=t.data;let r;function n(t,e){if(t)for(const r in t)t[r]._connected&&t[r]._callUpdate(e)}t.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},t.mixin=function(e,r){(r=(T(r)?t.component(r):r)||this).options=Mr(r.options,e)},t.extend=function(t){t=t||{};const e=this,r=function(t){this._init(t)};return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.options=Mr(e.options,t),r.super=e,r.extend=e.extend,r},t.update=function(t,r){t=t?L(t):document.body;for(const i of dt(t).reverse())n(i[e],r);Ye(t,(t=>n(t[e],r)))},Object.defineProperty(t,"container",{get:()=>r||document.body,set(t){r=Ke(t)}})}function sn(t){function e(t){for(const{read:e,write:r,events:n=[]}of this.$options.update){if(!t.has("update")&&!n.some((e=>t.has(e))))continue;let i;e&&(i=e.call(this,this._data,t),i&&_(i)&&m(this._data,i)),r&&!1!==i&&ur.write((()=>r.call(this,this._data,t)))}}function n(t){const{$options:{computed:e}}=this,n={...this._computed};this._computed={};for(const i in e){const{watch:o,immediate:s}=e[i];o&&(t&&s||r(n,i)&&!B(n[i],this[i]))&&o.call(this,this[i],n[i])}}t.prototype._callHook=function(t){var e;null==(e=this.$options[t])||e.forEach((t=>t.call(this)))},t.prototype._callConnected=function(){this._connected||(this._data={},this._computed={},this._initProps(),this._callHook("beforeConnect"),this._connected=!0,this._initEvents(),this._initOb
2servers(),this._callHook("connected"),this._callUpdate())},t.prototype._callDisconnected=function(){this._connected&&(this._callHook("beforeDisconnect"),this._disconnectObservers(),this._unbindEvents(),this._callHook("disconnected"),this._connected=!1,delete this._watch)},t.prototype._callUpdate=function(t){void 0===t&&(t="update"),this._connected&&("update"!==t&&"resize"!==t||this._callWatches(),this.$options.update&&(this._updates||(this._updates=new Set,ur.read((()=>{this._connected&&e.call(this,this._updates),delete this._updates}))),this._updates.add(t.type||t)))},t.prototype._callWatches=function(){if(this._watch)return;const t=!r(this,"_watch");this._watch=ur.read((()=>{this._connected&&n.call(this,t),this._watch=null}))}}function an(t){let e=0;t.prototype._init=function(t){(t=t||{}).data=pn(t,this.constructor.options),this.$options=Mr(this.constructor.options,t,this),this.$el=null,this.$props={},this._uid=e++,this._initData(),this._initMethods(),this._initComputeds(),this._callHook("created"),t.el&&this.$mount(t.el)},t.prototype._initData=function(){const{data:t={}}=this.$options;for(const e in t)this.$props[e]=this[e]=t[e]},t.prototype._initMethods=function(){const{methods:t}=this.$options;if(t)for(const e in t)this[e]=t[e].bind(this)},t.prototype._initComputeds=function(){const{computed:t}=this.$options;if(this._computed={},t)for(const e in t)cn(this,e,t[e])},t.prototype._initProps=function(t){let e;for(e in t=t||ln(this.$options,this.$name))M(t[e])||(this.$props[e]=t[e]);const r=[this.$options.computed,this.$options.methods];for(e in this.$props)e in t&&hn(r,e)&&(this[e]=this.$props[e])},t.prototype._initEvents=function(){this._events=[];for(const t of this.$options.events||[])if(r(t,"handler"))un(this,t);else for(const e in t)un(this,t[e],e)},t.prototype._unbindEvents=function(){this._events.forEach((t=>t())),delete this._events},t.prototype._initObservers=function(){this._observers=[gn(this)],this.$options.computed&&this.registerObserver(mn(this))},t.prototype.registerObserver=function(t){this._observers.push(t)},t.prototype._disconnectObservers=function(){this._observers.forEach((t=>null==t?void 0:t.disconnect()))}}function ln(t,e){const r={},{args:n=[],props:o={},el:a}=t;if(!o)return r;for(const t in o){const e=i(t);let n=tt(a,e);M(n)||(n=o[t]===Boolean&&""===n||fn(o[t],n),("target"!==e||n&&!c(n,"_"))&&(r[t]=n))}const l=kr(tt(a,e),n);for(const t in l){const e=s(t);void 0!==o[e]&&(r[e]=fn(o[e],l[t]))}return r}function cn(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get(){const{_computed:i,$props:o,$el:s}=t;return r(i,e)||(i[e]=(n.get||n).call(t,o,s)),i[e]},set(r){const{_computed:i}=t;i[e]=n.set?n.set.call(t,r):r,M(i[e])&&delete i[e]}})}function un(t,e,r){_(e)||(e={name:r,handler:e});let{name:n,el:i,handler:o,capture:s,passive:a,delegate:l,filter:c,self:u}=e;i=g(i)?i.call(t):i||t.$el,d(i)?i.forEach((n=>un(t,{...e,el:n},r))):!i||c&&!c.call(t)||t._events.push(kt(i,n,l?T(l)?l:l.call(t):null,T(o)?t[o]:o.bind(t),{passive:a,capture:s,self:u}))}function hn(t,e){return t.every((t=>!t||!r(t,e)))}function fn(t,e){return t===Boolean?k(e):t===Number?I(e):"list"===t?dn(e):t?t(e):e}function dn(t){return d(t)?t:T(t)?t.split(/,(?![^(]*\))/).map((t=>O(t)?I(t):k(t.trim()))):[t]}function pn(t,e){let{data:r={}}=t,{args:n=[],props:i={}}=e;d(r)&&(r=r.slice(0,n.length).reduce(((t,e,r)=>(_(e)?m(t,e):t[n[r]]=e,t)),{}));for(const t in r)M(r[t])?delete r[t]:i[t]&&(r[t]=fn(i[t],r[t]));return r}function mn(t){const{el:e}=t.$options,r=new MutationObserver((()=>t.$emit()));return r.observe(e,{childList:!0,subtree:!0}),r}function gn(t){const{$name:e,$options:r,$props:n}=t,{attrs:o,props:a,el:l}=r;if(!a||!1===o)return;const c=d(o)?o:Object.keys(a),u=c.map((t=>i(t))).concat(e),h=new MutationObserver((i=>{const o=ln(r,e);i.some((t=>{let{attributeName:r}=t;const i=r.replace("data-","");return(i===e?c:[s(i),s(r)]).some((t=>!M(o[t])&&o[t]!==n[t]))}))&&t.$reset()}));return h.observe(l,{attributes:!0,attributeFilter:u.concat(u.map((t=>"data-"+t)))}),h}function yn(t){const e=t.data;t.prototype.$create=function(e,r,n){return t[e](r,n)},t.prototype.$mount=function(t){const{name:r}=this.$options;t[e]||(t[e]={}),t[e][r]||(t[e][r]=this,this.$el=this.$options.el=this.$options.el||t,ft(t,document)&&this._callConnected())},t.prototype.$reset=function(){this._callDisconnected(),this._callConnected()},t.prototype.$destroy=function(t){void 0===t&&(t=!1);const{el:r,name:n}=this.$options;r&&this._callDisconnected(),this._callHook("destroy"),null!=r&&r[e]&&(delete r[e][n],C(r[e])||delete r[e],t&&Ue(this.$el))},t.prototype.$emit=function(t){this._callUpdate(t)},t.prototype.$update=function(e,r){void 0===e&&(e=this.$el),t.update(e,r)},t.prototype.$getComponent=t.getComponent;const r=X((e=>t.prefix+i(e)));Object.defineProperties(t.prototype,{$container:Object.getOwnPropertyDescriptor(t,"container"),$name:{get(){return r(this.$options.name)}}})}function _n(t){const e=t.data,r={};t.component=function(e,n){const o=i(e);if(e=s(o),!n)return _(r[e])&&(r[e]=t.extend(r[e])),r[e];t[e]=function(r,n){const i=t.component(e);return i.options.functional?new i({data:_(r)?r:[...arguments]}):r?Je(r).map(o)[0]:o();function o(r){const o=t.getComponent(r,e);if(o){if(!n)return o;o.$destroy()}return new i({el:r,data:n})}};const a=_(n)?{...n}:n.options;return a.name=e,null==a.install||a.install(t,a,e),t._initialized&&!a.functional&&ur.read((()=>t[e]("[uk-"+o+"],[data-uk-"+o+"]"))),r[e]=_(n)?a:n},t.getComponents=t=>(null==t?void 0:t[e])||{},t.getComponent=(e,r)=>t.getComponents(e)[r],t.connect=n=>{if(n[e])for(const t in n[e])n[e][t]._callConnected();for(const e of n.attributes){const i=vn(e.name);i&&i in r&&t[i](n)}},t.disconnect=t=>{for(const r in t[e])t[e][r]._callDisconnected()}}const vn=X((t=>!(!c(t,"uk-")&&!c(t,"data-uk-"))&&s(t.replace("data-uk-","").replace("uk-","")))),bn=function(t){this._init(t)};function xn(){if(!tr)return;let t=0;kt(document,"animationstart",(e=>{let{target:r}=e;(Zt(r,"animationName")||"").match(/^uk-.*(left|right)/)&&(t++,Zt(document.documentElement,"overflowX","hidden"),setTimeout((()=>{--t||Zt(document.documentElement,"overflowX","")}),z(Zt(r,"animationDuration"))+100))}),!0)}function wn(t){const{connect:e,disconnect:r}=t;function n(t){let{addedNodes:n,removedNodes:i}=t;
2for(const t of n)Ye(t,e);for(const t of i)Ye(t,r)}function i(e){var r;let{target:n,attributeName:i}=e;const o=vn(i);o&&o in t&&(J(n,i)?t[o](n):null==(r=t.getComponent(n,o))||r.$destroy())}tr&&window.MutationObserver&&ur.read((function(){document.body&&Ye(document.body,e),new MutationObserver((t=>t.forEach(n))).observe(document,{childList:!0,subtree:!0}),new MutationObserver((t=>t.forEach(i))).observe(document,{attributes:!0,subtree:!0}),t._initialized=!0}))}bn.util=nn,bn.data="__uikit__",bn.prefix="uk-",bn.options={},bn.version="3.13.1",on(bn),sn(bn),an(bn),_n(bn),yn(bn);var En={connected(){!se(this.$el,this.$name)&&re(this.$el,this.$name)}},Sn={methods:{lazyload(t,e){void 0===t&&(t=this.$el),void 0===e&&(e=this.$el),this.registerObserver(_r(t,((t,r)=>{for(const t of R(g(e)?e():e))Je('[loading="lazy"]',t).forEach((t=>Q(t,"loading")));for(const e of t.filter((t=>{let{isIntersecting:e}=t;return e})).map((t=>{let{target:e}=t;return e})))r.unobserve(e)})))}}},Tn={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation(t){let{animation:e}=t;return!!e[0]},hasTransition(t){let{animation:e}=t;return this.hasAnimation&&!0===e[0]}},methods:{toggleElement(t,e,r){return new Promise((n=>Promise.all(R(t).map((t=>{const n=S(e)?e:!this.isToggled(t);if(!Lt(t,"before"+(n?"show":"hide"),[this]))return Promise.reject();const i=(g(r)?r:!1!==r&&this.hasAnimation?this.hasTransition?An(this):On(this):this._toggle)(t,n),o=n?this.clsEnter:this.clsLeave;re(t,o),Lt(t,n?"show":"hide",[this]);const s=()=>{ne(t,o),Lt(t,n?"shown":"hidden",[this]),this.$update(t)};return i?i.then(s,(()=>(ne(t,o),Promise.reject()))):s()}))).then(n,G)))},isToggled(t){return void 0===t&&(t=this.$el),[t]=R(t),!!se(t,this.clsEnter)||!se(t,this.clsLeave)&&(this.cls?se(t,this.cls.split(" ")[0]):nt(t))},_toggle(t,e){if(!t)return;let r;e=Boolean(e),this.cls?(r=h(this.cls," ")||e!==se(t,this.cls),r&&ae(t,this.cls,h(this.cls," ")?void 0:e)):(r=e===t.hidden,r&&(t.hidden=!e)),Je("[autofocus]",t).some((t=>nt(t)?t.focus()||!0:t.blur())),r&&(Lt(t,"toggled",[e,this]),this.$update(t))}}};function An(t){let{isToggled:e,duration:r,initProps:n,hideProps:i,transition:o,_toggle:s}=t;return(t,a)=>{const l=he.inProgress(t),c=t.hasChildNodes()?P(Zt(t.firstElementChild,"marginTop"))+P(Zt(t.lastElementChild,"marginBottom")):0,u=nt(t)?xe(t)+(l?0:c):0;he.cancel(t),e(t)||s(t,!0),xe(t,""),ur.flush();const h=xe(t)+(l?0:c);return xe(t,u),(a?he.start(t,{...n,overflow:"hidden",height:h},Math.round(r*(1-u/h)),o):he.start(t,i,Math.round(r*(u/h)),o).then((()=>s(t,!1)))).then((()=>Zt(t,n)))}}function On(t){return(e,r)=>{me.cancel(e);const{animation:n,duration:i,_toggle:o}=t;return r?(o(e,!0),me.in(e,n[0],i,t.origin)):me.out(e,n[1]||n[0],i,t.origin).then((()=>o(e,!1)))}}var Cn={mixins:[En,Sn,Tn],props:{targets:String,active:null,collapsible:Boolean,multiple:Boolean,toggle:String,content:String,transition:String,offset:Number},data:{targets:"> *",active:!1,animation:[!0],collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",transition:"ease",offset:0},computed:{items:{get(t,e){let{targets:r}=t;return Je(r,e)},watch(t,e){if(t.forEach((t=>Mn(Ke(this.content,t),!se(t,this.clsOpen)))),e||se(t,this.clsOpen))return;const r=!1!==this.active&&t[Number(this.active)]||!this.collapsible&&t[0];r&&this.toggle(r,!1)},immediate:!0},toggles(t){let{toggle:e}=t;return this.items.map((t=>Ke(e,t)))}},connected(){this.lazyload()},events:[{name:"click",delegate(){return this.targets+" "+this.$props.toggle},handler(t){t.preventDefault(),this.toggle(mt(this.toggles,t.current))}}],methods:{toggle(t,e){let r=[this.items[Z(t,this.items)]];const n=ct(this.items,"."+this.clsOpen);if(this.multiple||h(n,r[0])||(r=r.concat(n)),this.collapsible||!(n.length<2)||ct(r,"
2:not(."+this.clsOpen+")").length)for(const t of r)this.toggleElement(t,!se(t,this.clsOpen),(async(t,r)=>{ae(t,this.clsOpen,r),K(Ke(this.$props.toggle,t),"aria-expanded",r);const n=Ke((t._wrapper?"> * ":"")+this.content,t);if(!1!==e&&this.hasTransition){if(t._wrapper||(t._wrapper=Ve(n,"<div"+(r?" hidden":"")+">")),Mn(n,!1),await An(this)(t._wrapper,r),Mn(n,!r),delete t._wrapper,qe(n),r){const e=Ke(this.$props.toggle,t);ur.read((()=>{Gr(e)||Hr(e,{offset:this.offset})}))}}else Mn(n,!r)}))}}};function Mn(t,e){t&&(t.hidden=e)}var kn={mixins:[En,Tn],args:"animation",props:{close:String},data:{animation:[!0],selClose:".uk-alert-close",duration:150,hideProps:{opacity:0,...Tn.data.hideProps}},events:[{name:"click",delegate(){return this.selClose},handler(t){t.preventDefault(),this.close()}}],methods:{async close(){await this.toggleElement(this.$el),this.$destroy(!0)}}},In={args:"autoplay",props:{automute:Boolean,autoplay:Boolean},data:{automute:!1,autoplay:!0},connected(){this.inView="inview"===this.autoplay,this.inView&&!J(this.$el,"preload")&&(this.$el.preload="none"),this.automute&&Lr(this.$el),this.registerObserver(_r(this.$el,(()=>this.$emit("scroll")),{},!1))},update:{read(){return!!Rr(this.$el)&&{visible:nt(this.$el)&&"hidden"!==Zt(this.$el,"visibility"),inView:this.inView&&Gr(this.$el)}},write(t){let{visible:e,inView:r}=t;!e||this.inView&&!r?Pr(this.$el):(!0===this.autoplay||this.inView&&r)&&Ir(this.$el)}}},Pn={connected(){var t;this.registerObserver(br((null==(t=this.$options.resizeTargets)?void 0:t.call(this))||this.$el,(()=>this.$emit("resize"))))}},Ln={mixins:[Pn,In],props:{width:Number,height:Number},data:{automute:!0},events:{load(){this.$emit("resize")}},resizeTargets(){return[this.$el,lt(this.$el)]},update:{read(){const t=this.$el,{offsetHeight:e,offsetWidth:r}=Rn(t)||lt(t),n=W.cover({width:this.width||t.naturalWidth||t.videoWidth||t.clientWidth,height:this.height||t.naturalHeight||t.videoHeight||t.clientHeight},{width:r+(r%2?1:0),height:e+(e%2?1:0)});return!(!n.width||!n.height)&&n},write(t){let{height:e,width:r}=t;Zt(this.$el,{height:e,width:r})},events:["resize"]}};function Rn(t){for(;t=lt(t);)if("static"!==Zt(t,"position"))return t}var Dn={props:{container:Boolean},data:{container:!0},computed:{container(t){let{container:e}=t;return!0===e&&this.$container||e&&Ke(e)}}},zn={props:{pos:String,offset:null,flip:Boolean,clsPos:String},data:{pos:"bottom-"+(er?"right":"left"),flip:!0,offset:!1,clsPos:""},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),this.dir=this.pos[0],this.align=this.pos[1]},methods:{positionAt(t,e,r){ie(t,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?");let{offset:n}=this;const i=this.getAxis(),o=this.pos[0],s=this.pos[1];if(!O(n)){const t=Ke(n);n=t?_e(t)["x"===i?"left":"top"]-_e(e)["x"===i?"right":"bottom"]:0}const{x:a,y:l}=Qr(t,e,"x"===i?Te(o)+" "+s:s+" "+Te(o),"x"===i?o+" "+s:s+" "+o,"x"===i?""+("left"===o?-n:n):" "+("top"===o?-n:n),null,this.flip,r).target;this.dir="x"===i?a:l,this.align="x"===i?l:a,ae(t,this.clsPos+"-"+this.dir+"-"+this.align,!1===this.offset)},getAxis(){return"top"===this.dir||"bottom"===this.dir?"y":"x"}}};let Bn;var jn={mixins:[Dn,Sn,zn,Tn],args:"pos",props:{mode:"list",toggle:Boolean,boundary:Boolean,boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},data:{mode:["click","hover"],toggle:"- *",boundary:!0,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,animation:["uk-animation-fade"],cls:"uk-open",container:!1},created(){this.tracker=new gr},connected(){this.clsPos=this.clsDrop=this.$props.clsDrop||"uk-"+this.$options.name,re(this.$el,this.clsDrop),this.toggle&&!this.target&&(this.target=this.$create("toggle",gt(this.toggle,this.$el),{target:this.$el,mode:this.mode}).$el,K(this.target,"aria-haspopup",!0),this.lazyload(this.target))},disconnected(){this.isActive()&&(Bn=null)},events:[{name:"click",delegate(){return"."+this.clsDrop+"-close"},handler(t){t.preventDefault(),this.hide(!1)}},{name:"click",delegate:()=>'a[href^="#"]',handler(t){let{defaultPrevented:e,current:{hash:r}}=t;e||!r||ft(r,this.$el)||this.hide(!1)}},{name:"beforescroll",handler(){this.hide(!1)}},{name:"toggle",self:!0,handler(t,e){t.preventDefault(),this.isToggled()?this.hide(!1):this.show(e.$el,!1)}},{name:"toggleshow",self:!0,handler(t,e){t.preventDefault(),this.show(e.$el)}},{name:"togglehide",self:!0,handler(t){t.preventDefault(),ut(this.$el,":focus,:hover")||this.hide()}},{name:ar+" focusin",filter(){return h(this.mode,"hover")},handler(t){Ut(t)||this.clearTimers()}},{name:lr+" focusout",filter(){return h(this.mode,"hover")},handler(t){!Ut(t)&&t.relatedTarget&&this.hide()}},{name:"toggled",self:!0,handler(t,e){e&&(this.clearTimers(),this.position())}}
2,{name:"show",self:!0,handler(){Bn=this,this.tracker.init();for(const t of[kt(document,ir,(t=>{let{target:e}=t;return!ft(e,this.$el)&&Pt(document,sr+" "+cr+" scroll",(t=>{let{defaultPrevented:r,type:n,target:i}=t;r||n!==sr||e!==i||this.target&&ft(e,this.target)||this.hide(!1)}),!0)})),kt(document,"keydown",(t=>{27===t.keyCode&&this.hide(!1)})),kt(window,"resize",(()=>this.$emit("resize")))])Pt(this.$el,"hide",t,{self:!0})}},{name:"beforehide",self:!0,handler(){this.clearTimers()}},{name:"hide",handler(t){let{target:e}=t;this.$el===e?(Bn=this.isActive()?null:Bn,this.tracker.cancel()):Bn=null===Bn&&ft(e,this.$el)&&this.isToggled()?this:Bn}}],update:{write(){this.isToggled()&&!se(this.$el,this.clsEnter)&&this.position()},events:["resize"]},methods:{show(t,e){if(void 0===t&&(t=this.target),void 0===e&&(e=!0),this.isToggled()&&t&&this.target&&t!==this.target&&this.hide(!1),this.target=t,this.clearTimers(),!this.isActive()){if(Bn){if(e&&Bn.isDelaying)return void(this.showTimer=setTimeout((()=>ut(t,":hover")&&this.show()),10));let r;for(;Bn&&r!==Bn&&!ft(this.$el,Bn.$el);)r=Bn,Bn.hide(!1)}this.container&&lt(this.$el)!==this.container&&je(this.container,this.$el),this.showTimer=setTimeout((()=>this.toggleElement(this.$el,!0)),e&&this.delayShow||0)}},hide(t){void 0===t&&(t=!0);const e=()=>this.toggleElement(this.$el,!1,!1);this.clearTimers(),this.isDelaying=Fn(this.$el).some((t=>this.tracker.movesTo(t))),t&&this.isDelaying?this.hideTimer=setTimeout(this.hide,50):t&&this.delayHide?this.hideTimer=setTimeout(e,this.delayHide):e()},clearTimers(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive(){return Bn===this},position(){const t=!0===this.boundary?window:gt(this.boundary,this.$el);ne(this.$el,this.clsDrop+"-stack"),ae(this.$el,this.clsDrop+"-boundary",this.boundaryAlign);const e=_e(t),r=this.boundaryAlign?e:_e(this.target);if("justify"===this.align){const t="y"===this.getAxis()?"width":"height";Zt(this.$el,t,r[t])}else t&&this.$el.offsetWidth>Math.max(e.right-r.left,r.right-e.left)&&re(this.$el,this.clsDrop+"-stack");this.positionAt(this.$el,this.boundaryAlign?t:this.target,t)}}};function Fn(t){const e=[];return Ye(t,(t=>"static"!==Zt(t,"position")&&e.push(t))),e}var Nn={mixins:[En],args:"target",props:{target:Boolean},data:{target:!1},computed:{input:(t,e)=>Ke(it,e),state(){return this.input.nextElementSibling},target(t,e){let{target:r}=t;return r&&(!0===r&&lt(this.input)===e&&this.input.nextElementSibling||Ke(r,e))}},update(){var t;const{target:e,input:r}=this;if(!e)return;let n;const i=ot(e)?"value":"textContent",o=e[i],s=null!=(t=r.files)&&t[0]?r.files[0].name:ut(r,"select")&&(n=Je("option",r).filter((t=>t.selected))[0])?n.textContent:r.value;o!==s&&(e[i]=s)},events:[{name:"change",handler(){this.$emit()}},{name:"reset",el(){return ht(this.$el,"form")},handler(){this.$emit()}}]},$n={mixins:[Pn],props:{margin:String,firstColumn:Boolean},data:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},resizeTargets(){return this.$el.children},connected(){this.registerObserver(Er(this.$el,(()=>this.$reset()),{childList:!0}))},update:{read(){const t=Un(this.$el.children);return{rows:t,columns:Vn(t)}},write(t){let{columns:e,rows:r}=t;for(const t of r)for(const n of t)ae(n,this.margin,r[0]!==t),ae(n,this.firstColumn,!!~e[0].indexOf(n))},events:["resize"]}};function Un(t){return Gn(t,"top","bottom")}function Vn(t){const e=[];for(const r of t){const t=Gn(r,"left","right");for(let r=0;r<t.length;r++)e[r]=e[r]?e[r].concat(t[r]):t[r]}return er?e.reverse():e}function Gn(t,e,r){const n=[[]];for(const i of t){if(!nt(i))continue;let t=qn(i);for(let o=n.length-1;o>=0;o--){const s=n[o];if(!s[0]){s.push(i);break}let a;if(s[0].offsetParent===i.offsetParent?a=qn(s[0]):(t=qn(i,!0),a=qn(s[0],!0)),t[e]>=a[r]-1&&t[e]!==a[e]){n.push([i]);break}if(t[r]-1>a[e]||t[e]===a[e]){s.push(i);break}if(0===o){n.unshift([i]);break}}}return n}function qn(t,e){void 0===e&&(e=!1);let{offsetTop:r,offsetLeft:n,offsetHeight:i,offsetWidth:o}=t;return e&&([r,n]=be(t)),{top:r,left:n,bottom:r+i,right:n+o}}var Hn={connected(){Xn(this._uid,(()=>this.$emit("scroll")))},disconnected(){Yn(this._uid)}};const Wn=new Map;let Zn;function Xn(t,e){Zn=Zn||kt(window,"scroll",(()=>
2Wn.forEach((t=>t()))),{passive:!0,capture:!0}),Wn.set(t,e)}function Yn(t){Wn.delete(t),Zn&&!Wn.size&&(Zn(),Zn=null)}var Kn={extends:$n,mixins:[En,Hn],name:"grid",props:{masonry:Boolean,parallax:Number},data:{margin:"uk-grid-margin",clsStack:"uk-grid-stack",masonry:!1,parallax:0},connected(){this.masonry&&re(this.$el,"uk-flex-top uk-flex-wrap-top")},update:[{write(t){let{columns:e}=t;ae(this.$el,this.clsStack,e.length<2)},events:["resize"]},{read(t){let{columns:e,rows:r}=t;if(!e.length||!this.masonry&&!this.parallax||Jn(this.$el))return t.translates=!1,!1;let n=!1;const i=pt(this.$el),o=ei(e),s=ti(i,this.margin)*(r.length-1),a=Math.max(...o)+s;this.masonry&&(e=e.map((t=>$(t,"offsetTop"))),n=Qn(r,e));let l=Math.abs(this.parallax);return l&&(l=o.reduce(((t,e,r)=>Math.max(t,e+s+(r%2?l:l/8)-a)),0)),{padding:l,columns:e,translates:n,height:n?a:""}},write(t){let{height:e,padding:r}=t;Zt(this.$el,"paddingBottom",r||""),!1!==e&&Zt(this.$el,"height",e)},events:["resize"]},{read(){return(!this.parallax||!Jn(this.$el))&&{scrolled:!!this.parallax&&Wr(this.$el)*Math.abs(this.parallax)}},write(t){let{columns:e,scrolled:r,translates:n}=t;(!1!==r||n)&&e.forEach(((t,e)=>t.forEach(((t,i)=>Zt(t,"transform",r||n?"translateY("+((n&&-n[e][i])+(r?e%2?r:r/8:0))+"px)":"")))))},events:["scroll","resize"]}]};function Jn(t){return pt(t).some((t=>"absolute"===Zt(t,"position")))}function Qn(t,e){const r=t.map((t=>Math.max(...t.map((t=>t.offsetHeight)))));return e.map((t=>{let e=0;return t.map(((n,i)=>e+=i?r[i-1]-t[i-1].offsetHeight:0))}))}function ti(t,e){const[r]=t.filter((t=>se(t,e)));return P(r?Zt(r,"marginTop"):Zt(t[0],"paddingLeft"))}function ei(t){return t.map((t=>t.reduce(((t,e)=>t+e.offsetHeight),0)))}var ri={args:"target",props:{target:String,row:Boolean},data:{target:"> *",row:!0,forceHeight:!0},computed:{elements:{get(t,e){let{target:r}=t;return Je(r,e)},watch(){this.$reset()}}},resizeTargets(){return this.elements},update:{read(){return{rows:(this.row?Un(this.elements):[this.elements]).map(ni)}},write(t){let{rows:e}=t;for(const{heights:t,elements:r}of e)r.forEach(((e,r)=>Zt(e,"minHeight",t[r])))},events:["resize"]}};function ni(t){if(t.length<2)return{heights:[""],elements:t};let e=t.map(ii),r=Math.max(...e);const n=t.some((t=>t.style.minHeight)),i=t.some(((t,n)=>!t.style.minHeight&&e[n]<r));return n&&i&&(Zt(t,"minHeight",""),e=t.map(ii),r=Math.max(...e)),e=t.map(((t,n)=>e[n]===r&&P(t.style.minHeight).toFixed(2)!==r.toFixed(2)?"":r)),{heights:e,elements:t}}function ii(t){let e=!1;nt(t)||(e=t.style.display,Zt(t,"display","block","important"));const r=ye(t).height-Se(t,"height","content-box");return!1!==e&&Zt(t,"display",e),r}var oi={mixins:[En,Pn],props:{expand:Boolean,offsetTop:Boolean,offsetBottom:Boolean,minHeight:Number},data:{expand:!1,offsetTop:!1,offsetBottom:!1,minHeight:0},resizeTargets(){return[this.$el,document.documentElement]},update:{read(t){let{minHeight:e}=t;if(!nt(this.$el))return!1;let r="";const n=Se(this.$el,"height","content-box");if(this.expand)r=xe(window)-(ye(document.documentElement).height-ye(this.$el).height)-n||"";else{if(r="calc(100vh",this.offsetTop){const{top:t}=_e(this.$el);r+=t>0&&t<xe(window)/2?" - "+t+"px":""}!0===this.offsetBottom?r+=" - "+ye(this.$el.nextElementSibling).height+"px":O(this.offsetBottom)?r+=" - "+this.offsetBottom+"vh":this.offsetBottom&&u(this.offsetBottom,"px")?r+=" - "+P(this.offsetBottom)+"px":T(this.offsetBottom)&&(r+=" - "+ye(gt(this.offsetBottom,this.$el)).height+"px"),r+=(n?" - "+n+"px":"")+")"}return{minHeight:r,prev:e}},write(t){let{minHeight:e}=t;Zt(this.$el,{minHeight:e}),this.minHeight&&P(Zt(this.$el,"minHeight"))<this.minHeight&&Zt(this.$el,"minHeight",this.minHeight)},events:["resize"]}},si={args:"src",props:{id:Boolean,icon:String,src:String,style:String,width:Number,height:Number,ratio:Number,class:String,strokeAnimation:Boolean,focusable:Boolean,attributes:"list"},data:{ratio:1,include:["style","class","focusable"],class:"",strokeAnimation:!1},beforeConnect(){this.class+=" uk-svg"},connected(){!this.icon&&h(this.src,"#")&&([this.src,this.icon]=this.src.split("#")),this.svg=this.getSvg().then((t=>{if(this._connected){const e=pi(t,this.$el);return this.svgEl&&e!==this.svgEl&&Ue(this.svgEl),this.applyAttributes(e,t),this.svgEl=e}}),G),this.strokeAnimation&&this.svg.then((t=>{this._connected&&(fi(t),this.registerObserver(_r(t,((e,r)=>{fi(t),r.disconnect()}))))}
2))},disconnected(){this.svg.then((t=>{this._connected||(rt(this.$el)&&(this.$el.hidden=!1),Ue(t),this.svgEl=null)})),this.svg=null},methods:{async getSvg(){return Le(this.$el,"img")&&!this.$el.complete&&"lazy"===this.$el.loading?new Promise((t=>Pt(this.$el,"load",(()=>t(this.getSvg()))))):li(await ai(this.src),this.icon)||Promise.reject("SVG not found.")},applyAttributes(t,e){for(const e in this.$options.props)h(this.include,e)&&e in this&&K(t,e,this[e]);for(const e in this.attributes){const[r,n]=this.attributes[e].split(":",2);K(t,r,n)}this.id||Q(t,"id");const r=["width","height"];let n=r.map((t=>this[t]));n.some((t=>t))||(n=r.map((t=>K(e,t))));const i=K(e,"viewBox");i&&!n.some((t=>t))&&(n=i.split(" ").slice(2)),n.forEach(((e,n)=>K(t,r[n],P(e)*this.ratio||null)))}}};const ai=X((async t=>t?c(t,"data:")?decodeURIComponent(t.split(",")[1]):(await fetch(t)).text():Promise.reject()));function li(t,e){var r;return e&&h(t,"<symbol")&&(t=hi(t,e)||t),(null==(r=t=Ke(t.substr(t.indexOf("<svg"))))?void 0:r.hasChildNodes())&&t}const ci=/<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g,ui={};function hi(t,e){if(!ui[t]){let e;for(ui[t]={},ci.lastIndex=0;e=ci.exec(t);)ui[t][e[3]]='<svg xmlns="http://www.w3.org/2000/svg"'+e[1]+"svg>"}return ui[t][e]}function fi(t){const e=di(t);e&&t.style.setProperty("--uk-animation-stroke",e)}function di(t){return Math.ceil(Math.max(0,...Je("[stroke]",t).map((t=>{try{return t.getTotalLength()}catch(t){return 0}}))))}function pi(t,e){if(rt(e)||Le(e,"canvas")){e.hidden=!0;const r=e.nextElementSibling;return mi(t,r)?r:Ne(e,t)}const r=e.lastElementChild;return mi(t,r)?r:je(e,t)}function mi(t,e){return Le(t,"svg")&&Le(e,"svg")&&gi(t)===gi(e)}function gi(t){return(t.innerHTML||(new XMLSerializer).serializeToString(t).replace(/<svg.*?>(.*?)<\/svg>/g,"$1")).replace(/\s/g,"")}const yi={spinner:'<svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" cx="15" cy="15" r="14"/></svg>',totop:'<svg width="18" height="10" viewBox="0 0 18 10" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 9 9 1 17 9 "/></svg>',marker:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="4" width="1" height="11"/><rect x="4" y="9" width="11" height="1"/></svg>',"close-icon":'<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"/><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"/></svg>',"close-large":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><line fill="none" stroke="#000" stroke-width="1.4" x1="1" y1="1" x2="19" y2="19"/><line fill="none" stroke="#000" stroke-width="1.4" x1="19" y1="1" x2="1" y2="19"/></svg>',"navbar-toggle-icon":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect y="9" width="20" height="2"/><rect y="3" width="20" height="2"/><rect y="15" width="20" height="2"/></svg>',"overlay-icon":'<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><rect x="19" y="0" width="1" height="40"/><rect x="0" y="19" width="40" height="1"/></svg>',"pagination-next":'<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 1 6 6 1 11"/></svg>',"pagination-previous":'<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="6 1 1 6 6 11"/></svg>',"search-icon":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"/><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"/></svg>',"search-large":'<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.8" cx="17.5" cy="17.5" r="16.5"/><line fill="none" stroke="#000" stroke-width="1.8" x1="38" y1="39" x2="29" y2="30"/></svg>',"search-navbar":'<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.1" cx="10.5" cy="10.5" r="9.5"/><line fill="none" stroke="#000" stroke-width="1.1" x1="23" y1="23" x2="17" y2="17"/></svg>',"slidenav-next":'<svg width="14" height="24" viewBox="0 0 14 24" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.4" points="1.225,23 12.775,12 1.225,1 "/></svg>',"slidenav-next-large":'<svg width="25" height="40" viewBox="0 0 25 40" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="2" points="4.002,38.547 22.527,20.024 4,1.5 "/></svg>',"slidenav-previous":'<svg width="14" height="24" viewBox="0 0 14 24" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.4" points="12.775,1 1.225,12 12.775,23 "/></svg>',"slidenav-previous-large":'<svg width="25" height="40" viewBox="0 0 25 40" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="2" points="20.527,1.5 2,20.024 20.525,38.547 "/></svg>'},_i={install:Ti,extends:si,args:"icon",props:["icon"],data:{include:["focu
2sable"]},isIcon:!0,beforeConnect(){re(this.$el,"uk-icon")},methods:{async getSvg(){const t=Ai(this.icon);if(!t)throw"Icon not found.";return t}}},vi={args:!1,extends:_i,data:t=>({icon:i(t.constructor.options.name)}),beforeConnect(){re(this.$el,this.$name)}},bi={extends:vi,beforeConnect(){re(this.$el,"uk-slidenav");const t=this.$props.icon;this.icon=se(this.$el,"uk-slidenav-large")?t+"-large":t}},xi={extends:vi,beforeConnect(){this.icon=se(this.$el,"uk-search-icon")&&dt(this.$el,".uk-search-large").length?"search-large":dt(this.$el,".uk-search-navbar").length?"search-navbar":this.$props.icon}},wi={extends:vi,beforeConnect(){this.icon="close-"+(se(this.$el,"uk-close-large")?"large":"icon")}},Ei={extends:vi,methods:{async getSvg(){const t=await _i.methods.getSvg.call(this);return 1!==this.ratio&&Zt(Ke("circle",t),"strokeWidth",1/this.ratio),t}}},Si={};function Ti(t){t.icon.add=(e,r)=>{const n=T(e)?{[e]:r}:e;N(n,((t,e)=>{yi[e]=t,delete Si[e]})),t._initialized&&Ye(document.body,(e=>N(t.getComponents(e),(t=>{t.$options.isIcon&&t.icon in n&&t.$reset()}))))}}function Ai(t){return yi[t]?(Si[t]||(Si[t]=Ke((yi[Oi(t)]||yi[t]).trim())),Si[t].cloneNode(!0)):null}function Oi(t){return er?j(j(t,"left","right"),"previous","next"):t}const Ci="loading"in HTMLImageElement.prototype;var Mi={args:"dataSrc",props:{dataSrc:String,sources:String,offsetTop:String,offsetLeft:String,target:String,loading:String},data:{dataSrc:"",sources:!1,offsetTop:"50vh",offsetLeft:"50vw",target:!1,loading:"lazy"},connected(){if("lazy"!==this.loading)return void this.load();const t=[this.$el,...yt(this.$props.target,this.$el)];Ci&&qi(this.$el)&&(this.$el.loading="lazy",ki(this.$el),1===t.length)||(Vi(this.$el),this.registerObserver(_r(t,((t,e)=>{this.load(),e.disconnect()}),{rootMargin:Ae(this.offsetTop,"height")+"px "+Ae(this.offsetLeft,"width")+"px"})))},disconnected(){this._data.image&&(this._data.image.onload="")},update:{write(t){if(!this.observer||qi(this.$el))return!1;const e=tt(this.$el,"data-srcset");if(e&&1!==window.devicePixelRatio){const r=Zt(this.$el,"backgroundSize");(r.match(/^(auto\s?)+$/)||P(r)===t.bgSize)&&(t.bgSize=Ui(e,tt(this.$el,"sizes")),Zt(this.$el,"backgroundSize",t.bgSize+"px"))}},events:["resize"]},methods:{load(){if(this._data.image)return this._data.image;const t=qi(this.$el)?this.$el:Li(this.$el,this.dataSrc,this.sources);return Q(t,"loading"),ki(this.$el,t.currentSrc),this._data.image=t}}};function ki(t,e){if(qi(t)){const e=lt(t);(Gi(e)?pt(e):[t]).forEach((t=>Pi(t,t)))}else e&&!h(t.style.backgroundImage,e)&&(Zt(t,"backgroundImage","url("+Mt(e)+")"),Lt(t,Rt("load",!1)))}const Ii=["data-src","data-srcset","sizes"];function Pi(t,e){Ii.forEach((r=>{const n=tt(t,r);n&&K(e,r.replace(/^(data-)+/,""),n)}))}function Li(t,e,r){const n=new Image;return Ri(n,r),Pi(t,n),n.onload=()=>{ki(t,n.currentSrc)},K(n,"src",e),n}function Ri(t,e){if((e=Di(e)).length){const r=Ze("<picture>");for(const t of e){const e=Ze("<source>");K(e,t),je(r,e)}je(r,t)}}function Di(t){if(!t)return[];if(c(t,"["))try{t=JSON.parse(t)}catch(e){t=[]}else t=kr(t);return d(t)||(t=[t]),t.filter((t=>!C(t)))}const zi=/\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;function Bi(t){let e;for(zi.lastIndex=0;e=zi.exec(t);)if(!e[1]||window.matchMedia(e[1]).matches){e=Ni(e[2]);break}return e||"100vw"}const ji=/\d+(?:\w+|%)/g,Fi=/[+-]?(\d+)/g;function Ni(t){return c(t,"calc")?t.slice(5,-1).replace(ji,(t=>Ae(t))).replace(/ /g,"").match(Fi).reduce(((t,e)=>t+ +e),0):t}const $i=/\s+\d+w\s*(?:,|$)/g;function Ui(t,e){const r=Ae(Bi(e)),n=(t.match($i)||[]).map(P).sort(((t,e)=>t-e));return n.filter((t=>t>=r))[0]||n.pop()||""}function Vi(t){qi(t)&&!J(t,"src")&&K(t,"src",'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>')}function Gi(t){return Le(t,"picture")}function qi(t){return Le(t,"img")}var Hi={props:{media:Boolean},data:{media:!1},connected(){const t=Wi(this.media);this.mediaObj=window.matchMedia(t);const e=()=>{this.matchMedia=this.mediaObj.matches,Lt(this.$el,Rt("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=kt(this.mediaObj,"change",(()=>{e(),this.$emit("resize")})),e()},disconnected(){var t;null==(t=this.offMediaObj)||t.call(this)}};function Wi(t){if(T(t))if(c(t,"@")){const e="breakpoint-"+t.substr(1);t=P(Jt(e))}else if(isNaN(t))return t;return t&&O(t)?"(min-width: "+t+"px)":""}var Zi={mixins:[En,Hi,Pn],props:{fill:String},data:{fill:"",clsWrapper:"uk-leader-fill",clsHide:"uk-leader-hide",attrFill:"data-fill"},computed:{fill(t){let{fill:e}=t;return e||Jt("leader-fill-content")}},connected(){[this.wrapper]=Ge(this.$el,'<span class="'+this.clsWrapper+'">')},disconnected(){qe(this.wrapper.childNodes)},update:{read(){return{width:Math.trunc(this.$el.offsetWidth/2),fill:this.fill,hide:!this.matchMedia}},write(t){let{width:e,fill:r,hide:n}=t;ae(this.wrapper,this.clsHide,n),K(this.wrapper,this.attrFill,new Array(e).join(r))},events:["resize"]}};const Xi=[];var Yi={mixins:[En,Dn,Tn],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(t,e){let{selPanel:r}=t;return Ke(r,e)},transitionElement(){return this.panel},bgClose(t){let{bgClose:e}=t;return e&&this.panel}},beforeDisconnect(){h(Xi,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(t){t.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===h(Xi,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(h(Xi,this))return!1;!this.stack&&Xi.length?(Promise.all(Xi.map((t=>t.hide()))).then(this.show),t.preventDefault()):Xi.push(this)}}
2,{name:"show",self:!0,handler(){const t=document.documentElement;we(window)>t.clientWidth&&this.overlay&&Zt(document.body,"overflowY","scroll"),this.stack&&Zt(this.$el,"zIndex",P(Zt(this.$el,"zIndex"))+Xi.length),re(t,this.clsPage),this.bgClose&&Pt(this.$el,"hide",kt(document,ir,(t=>{let{target:e}=t;F(Xi)!==this||this.overlay&&!ft(e,this.$el)||ft(e,this.panel)||Pt(document,sr+" "+cr+" scroll",(t=>{let{defaultPrevented:r,type:n,target:i}=t;r||n!==sr||e!==i||this.hide()}),!0)})),{self:!0}),this.escClose&&Pt(this.$el,"hide",kt(document,"keydown",(t=>{27===t.keyCode&&F(Xi)===this&&this.hide()})),{self:!0})}},{name:"shown",self:!0,handler(){at(this.$el)||K(this.$el,"tabindex","-1"),Ke(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){h(Xi,this)&&Xi.splice(Xi.indexOf(this),1),Xi.length||Zt(document.body,"overflowY",""),Zt(this.$el,"zIndex",""),Xi.some((t=>t.clsPage===this.clsPage))||ne(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&lt(this.$el)!==this.container?(je(this.container,this.$el),new Promise((t=>requestAnimationFrame((()=>this.show().then(t)))))):this.toggleElement(this.$el,!0,Ki(this))},hide(){return this.toggleElement(this.$el,!1,Ki(this))}}};function Ki(t){let{transitionElement:e,_toggle:r}=t;return(t,n)=>new Promise(((i,o)=>Pt(t,"show hide",(()=>{t._reject&&t._reject(),t._reject=o,r(t,n);const s=Pt(e,"transitionstart",(()=>{Pt(e,"transitionend transitioncancel",i,{self:!0}),clearTimeout(a)}),{self:!0}),a=setTimeout((()=>{s(),i()}),z(Zt(e,"transitionDuration")))})))).then((()=>delete t._reject))}var Ji={install:Qi,mixins:[Yi],data:{clsPage:"uk-modal-page",selPanel:".uk-modal-dialog",selClose:".uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full"},events:[{name:"show",self:!0,handler(){se(this.panel,"uk-margin-auto-vertical")?re(this.$el,"uk-flex"):Zt(this.$el,"display","block"),xe(this.$el)}},{name:"hidden",self:!0,handler(){Zt(this.$el,"display",""),ne(this.$el,"uk-flex")}}]};function Qi(t){let{modal:e}=t;function r(t,r,n,i){r={bgClose:!1,escClose:!0,labels:e.labels,...r};const o=e.dialog(t(r),r),s=new Y;let a=!1;return kt(o.$el,"submit","form",(t=>{t.preventDefault(),s.resolve(null==i?void 0:i(o)),a=!0,o.hide()})),kt(o.$el,"hide",(()=>!a&&n(s))),s.promise.dialog=o,s.promise}e.dialog=function(t,r){const n=e('<div class="uk-modal"> <div class="uk-modal-dialog">'+t+"</div> </div>",r);return n.show(),kt(n.$el,"hidden",(async()=>{await Promise.resolve(),n.$destroy(!0)}),{self:!0}),n},e.alert=function(t,e){return r((e=>{let{labels:r}=e;return'<div class="uk-modal-body">'+(T(t)?t:De(t))+'</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-primary uk-modal-close" autofocus>'+r.ok+"</button> </div>"}),e,(t=>t.resolve()))},e.confirm=function(t,e){return r((e=>{let{labels:r}=e;return'<form> <div class="uk-modal-body">'+(T(t)?t:De(t))+'</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">'+r.cancel+'</button> <button class="uk-button uk-button-primary" autofocus>'+r.ok+"</button> </div> </form>"}),e,(t=>t.reject()))},e.prompt=function(t,e,n){return r((r=>{let{labels:n}=r;return'<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>'+(T(t)?t:De(t))+'</label> <input class="uk-input" value="'+(e||"")+'" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">'+n.cancel+'</button> <button class="uk-button uk-button-primary">'+n.ok+"</button> </div> </form>"}),n,(t=>t.resolve(null)),(t=>Ke("input",t.$el).value))},e.labels={ok:"Ok",cancel:"Cancel"}}var to={extends:Cn,data:{targets:"> .uk-parent",toggle:"> a",content:"> ul"}};const eo=".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle";var ro={mixins:[En,Dn],props:{dropdown:String,mode:"list",align:String,offset:Number,boundary:Boolean,boundaryAlign:Boolean,clsDrop:String,delayShow:Number,delayHide:Number,dropbar:Boolean,dropbarMode:String,dropbarAnchor:Boolean,duration:Number},data:{dropdown:eo,align:er?"right":"left",clsDrop:"uk-navbar-dropdown",mode:void 0,offset:void 0,delayShow:void 0,delayHide:void 0,boundaryAlign:void 0,flip:"x",boundary:!0,dropbar:!1,dropbarMode:"slide",dropbarAnchor:!1,duration:200,forceHeight:!0,selMinHeight:eo,container:!1},computed:{boundary(t,e){let{boundary:r,boundaryAlign:n}=t;return!0===r||n?e:r},dropbarAnchor(t,e){let{dropbarAnchor:r}=t;return gt(r,e)},pos(t){let{align:e}=t;return"bottom-"+e},dropbar:{get(t){let{dropbar:e}=t;return e?(e=this._dropbar||gt(e,this.$el)||Ke("+ .uk-navbar-dropbar",this.$el),e||(this._dropbar=Ke("<div></div>"))):null},watch(t){re(t,"uk-navbar-dropbar")},immediate:!0},dropContainer(t,e){return this.container||e},dropdowns:{get(t,e){let{clsDrop:r}=t;const n=Je("."+r,e);if(this.dropContainer!==e)for(const t of Je("."+r,this.dropContainer)){var i;const e=null==(i=this.getDropdown(t))?void 0:i.target;!h(n,t)&&e&&ft(e,this.$el)&&n.push(t)}return n},watch(t){this.$create("drop",t.filter((t=>!this.getDropdown(t))),{...this.$props,boundary:this.boundary,pos:this.pos,offset:this.dropbar||this.offset})},immediate:!0},toggles(t,e){let{dropdown:r}=t;return Je(r,e)}},disconnected(){this.dropbar&&Ue(this.dropbar),delete this._dropbar},events:[{name:"mouseover focusin",delegate(){return this.dropdown},handler(t){let{current:e}=t;const r=this.getActive();r&&h(r.mode,"hover")&&r.target&&!ft(r.target,e)&&!r.isDelaying&&r.hide(!1)}},{name:"keydown",delegate(){return this.dropdown},handler(t){const{current:e,keyCode:r}=t,n=this.getActive();r===oo.DOWN&&J(e,"aria-expanded")&&(t.preventDefault(),n&&n.target===e?io(n.$el):(e.click(),Pt(this.dropContainer,"show",(t=>{let{target:e}=t;return io(e)})))),no(t,this.toggles,n)}},{name:"keydown",el(){return this.dropContainer},delegate(){return"."+this.clsDrop},handler(t){const{current:e,keyCode:r}=t;if(!h(this.dropdowns,e))return;const n=this.getActive(),i=Je(st,e),o=f(i,(t=>ut(t,":focus")));var s;r===oo.UP&&(t.preventDefault(),o>0&&i[o-1].focus()),r===oo.DOWN&&(t.preventDefault(),o<i.length-1&&i[o+1].focus()),r===oo.ESC&&(null==n||null==(s=n.target)||s.focus()),no(t,this.toggles,n)}},{name:"mouseleave",el(){return this.dropbar},filter(){return this.dropbar},handler(){const t=this.getActive();t&&h(t.mode,"hover")&&!this.dropdowns.some((t=>ut(t,":hover")))&&t.hide()}},{name:"beforeshow",el(){return this.dropContainer},filter(){return this.dropbar},handler(){lt(this.dropbar)||Ne(this.dropbarAnchor||this.$el,this.dropbar)}},{name:"show",el(){return this.dropContainer},filter(){return this.dropbar},handler(t,e){let{$el:r,dir:n}=e;se(r,this.clsDrop)&&("slide"===this.dropbarMode&&re(this.dropbar,"uk-navbar-dropbar-slide"),this.clsDrop&&re(r,this.clsDrop+"-dropbar"),"bottom"===n&&this.transitionTo(r.offsetHeight+P(Zt(r,"marginTop"))+P(Zt(r,"marginBottom")),r))}},{name:"beforehide",el(){return this.dropContainer},filter(){return this.dropbar},handler(t,e){let{$el:r}=e;const n=this.getActive();ut(this.dropbar,":hover")&&(null==n?void 0:n.$el)===r&&!this.toggles.some((t=>n.target!==t&&ut(t,":focus")))&&t.preventDefault()}},{name:"hide",el(){return this.dropContainer},filter(){return this.dropbar},handler(t,e){let{$el:r}=e;if(!se(r,this.clsDrop))return;const n=this.getActive();n&&(null==n?void 0:n.$el)!==r||this.transitionTo(0)}}],methods:{getActive(){return Bn&&ft(Bn.target,this.$el)&&Bn},transitionTo(t,e){const{dropbar:r}=this,n=nt(r)?xe(r):0;return Zt(e=n<t&&e,"clip","rect(0,"+e.offsetWidth+"px,"+n+"px,0)"),xe(r,n),he.cancel([e,r]),Promise.all([he.start(r,{height:t},this.duration),he.start(e,{clip:"rect(0,"+e.offsetWidth+"px,"+t+"px,0)"},this.duration)]).catch(G).then((()=>{Zt(e,{clip:""}),this.$update(r)}))},getDropdown(t){return this.$getComponent(t,"drop")||this.$getComponent(t,"dropdown")}}};function no(t,e,r){const{current:n,keyCode:i}=t,o=(null==r?void 0:r.target)||n,s=e.indexOf(o);i===oo.LEFT&&s>0&&(null==r||r.hide(!1),e[s-1].focus()),i===oo.RIGHT&&s<e.length-1&&(null==r||r.hide(!1),e[s+1].focus()),i===oo.TAB&&(o.focus(),null==r||r.hide(!1))}function io(t){var e;Ke(":focus",t)||null==(e=Ke(st,t))||e.focus()}const oo={TAB:9,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40};var so={props:{swiping:Boolean},data:{swiping:!0},computed:{swipeTarget:(t,e)=>e},connected(){this.swiping&&un(this,{el:this.swipeTarget,name:ir,passive:!0,handler(t){if(!Ut(t))return;const e=Vt(t),r="tagName"in t.target?t.target:lt(t.target);
2Pt(document,sr+" "+cr+" scroll",(t=>{const{x:n,y:i}=Vt(t);("scroll"!==t.type&&r&&n&&Math.abs(e.x-n)>100||i&&Math.abs(e.y-i)>100)&&setTimeout((()=>{Lt(r,"swipe"),Lt(r,"swipe"+ao(e.x,e.y,n,i))}))}))}})}};function ao(t,e,r,n){return Math.abs(t-r)>=Math.abs(e-n)?t-r>0?"Left":"Right":e-n>0?"Up":"Down"}var lo={mixins:[Yi,so],args:"mode",props:{mode:String,flip:Boolean,overlay:Boolean},data:{mode:"slide",flip:!1,overlay:!1,clsPage:"uk-offcanvas-page",clsContainer:"uk-offcanvas-container",selPanel:".uk-offcanvas-bar",clsFlip:"uk-offcanvas-flip",clsContainerAnimation:"uk-offcanvas-container-animation",clsSidebarAnimation:"uk-offcanvas-bar-animation",clsMode:"uk-offcanvas",clsOverlay:"uk-offcanvas-overlay",selClose:".uk-offcanvas-close",container:!1},computed:{clsFlip(t){let{flip:e,clsFlip:r}=t;return e?r:""},clsOverlay(t){let{overlay:e,clsOverlay:r}=t;return e?r:""},clsMode(t){let{mode:e,clsMode:r}=t;return r+"-"+e},clsSidebarAnimation(t){let{mode:e,clsSidebarAnimation:r}=t;return"none"===e||"reveal"===e?"":r},clsContainerAnimation(t){let{mode:e,clsContainerAnimation:r}=t;return"push"!==e&&"reveal"!==e?"":r},transitionElement(t){let{mode:e}=t;return"reveal"===e?lt(this.panel):this.panel}},update:{read(){this.isToggled()&&!nt(this.$el)&&this.hide()},events:["resize"]},events:[{name:"click",delegate:()=>'a[href^="#"]',handler(t){let{current:{hash:e},defaultPrevented:r}=t;!r&&e&&Ke(e,document.body)&&this.hide()}},{name:"touchstart",passive:!0,el(){return this.panel},handler(t){let{targetTouches:e}=t;1===e.length&&(this.clientY=e[0].clientY)}},{name:"touchmove",self:!0,passive:!1,filter(){return this.overlay},handler(t){t.cancelable&&t.preventDefault()}},{name:"touchmove",passive:!1,el(){return this.panel},handler(t){if(1!==t.targetTouches.length)return;const e=t.targetTouches[0].clientY-this.clientY,{scrollTop:r,scrollHeight:n,clientHeight:i}=this.panel;(i>=n||0===r&&e>0||n-r<=i&&e<0)&&t.cancelable&&t.preventDefault()}},{name:"show",self:!0,handler(){"reveal"!==this.mode||se(lt(this.panel),this.clsMode)||(Ve(this.panel,"<div>"),re(lt(this.panel),this.clsMode)),Zt(document.documentElement,"overflowY",this.overlay?"hidden":""),re(document.body,this.clsContainer,this.clsFlip),Zt(document.body,"touch-action","pan-y pinch-zoom"),Zt(this.$el,"display","block"),re(this.$el,this.clsOverlay),re(this.panel,this.clsSidebarAnimation,"reveal"!==this.mode?this.clsMode:""),xe(document.body),re(document.body,this.clsContainerAnimation),this.clsContainerAnimation&&co()}},{name:"hide",self:!0,handler(){ne(document.body,this.clsContainerAnimation),Zt(document.body,"touch-action","")}},{name:"hidden",self:!0,handler(){this.clsContainerAnimation&&uo(),"reveal"===this.mode&&qe(this.panel),ne(this.panel,this.clsSidebarAnimation,this.clsMode),ne(this.$el,this.clsOverlay),Zt(this.$el,"display",""),ne(document.body,this.clsContainer,this.clsFlip),Zt(document.documentElement,"overflowY","")}},{name:"swipeLeft swipeRight",handler(t){this.isToggled()&&u(t.type,"Left")^this.flip&&this.hide()}}]};function co(){ho().content+=",user-scalable=0"}function uo(){const t=ho();t.content=t.content.replace(/,user-scalable=0$/,"")}function ho(){return Ke('meta[name="viewport"]',document.head)||je(document.head,'<meta name="viewport">')}var fo={mixins:[En,Pn],props:{selContainer:String,selContent:String,minHeight:Number},data:{selContainer:".uk-modal",selContent:".uk-modal-dialog",minHeight:150},computed:{container(t,e){let{selContainer:r}=t;return ht(e,r)},content(t,e){let{selContent:r}=t;return ht(e,r)}},resizeTargets(){return[this.container,this.content]},update:{read(){return!!(this.content&&this.container&&nt(this.$el))&&{max:Math.max(this.minHeight,xe(this.container)-(ye(this.content).height-xe(this.$el)))}},write(t){let{max:e}=t;Zt(this.$el,{minHeight:this.minHeight,maxHeight:e})},events:["resize"]}},po={mixin:[Pn],props:["width","height"],resizeTargets(){return[this.$el,lt(this.$el)]},connected(){re(this.$el,"uk-responsive-width")},update:{read(){return!!(nt(this.$el)&&this.width&&this.height)&&{width:we(lt(this.$el)),height:this.height}},write(t){xe(this.$el,W.contain({height:this.height,width:this.width},t).height)},events:["resize"]}},mo={props:{offset:Number},data:{offset:0},methods:{async scrollTo(t){t=t&&Ke(t)||document.body,Lt(this.$el,"beforescroll",[this,t])&&(await Hr(t,{offset:this.offset}),Lt(this.$el,"scrolled",[this,t]))}},events:{click(t){t.defaultPrevented||(t.preventDefault(),this.scrollTo(go(this.$el)))}}};function go(t){return document.getElementById(decodeURIComponent(t.hash).substring(1))}const yo="_ukScrollspy";var _o={mixins:[Hn],args:"cls",props:{cls:String,target:String,hidden:Boolean,offsetTop:Number,offsetLeft:Number,repeat:Boolean,delay:Number},data:()=>({cls:"",target:!1,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0,inViewClass:"uk-scrollspy-inview"}),computed:{elements:{get(t,e){let{target:r}=t;return r?Je(r,e):[e]},watch(t){this.hidden&&Zt(ct(t,":not(."+this.inViewClass+")"),"visibility","hidden")},immediate:!0}},disconnected(){for(const e of this.elements){var t;ne(e,this.inViewClass,(null==(t=e[yo])?void 0:t.cls)||""),delete e[yo]}},update:[{read(){for(const t of this.elements)t[yo]||(t[yo]={cls:tt(t,"uk-scrollspy-class")||this.cls}),!this.repeat&&t[yo].show||(t[yo].show=Gr(t,this.offsetTop,this.offsetLeft))},write(t){for(const e of this.elements){const r=e[yo];!r.show||r.inview||r.queued?!r.show&&r.inview&&!r.queued&&this.repeat&&this.toggle(e,!1):(r.queued=!0,t.promise=(t.promise||Promise.resolve()).then((()=>new Promise((t=>setTimeout(t,this.delay))))).then((()=>{this.toggle(e,!0),setTimeout((()=>{r.queued=!1,this.$emit()}),300)})))}},events:["scroll","resize"]}],methods:{toggle(t,e){const r=t[yo];if(null==r.off||r.off(),Zt(t,"visibility",!e&&this.hidden?"hidden":""),ae(t,this.inViewClass,e),ae(t,r.cls),/\buk-animation-/.test(r.cls)){const n=()=>ie(t,"uk-animation-[\\w-]+");e?r.off=Pt(t,"animationcancel animationend",n):n()}Lt(t,e?"inview":"outview"),r.inview=e,this.$update(t)}}},vo={mixins:[Hn],props:{cls:String,closest:String,scroll:Boolean,overflow:Boolean,offset:Number},data:{cls:"uk-active",closest:!1,scroll:!1,overflow:!0,offset:0},computed:{links:{get:(t,e)=>Je('a[href^="#"]',e).filter((t=>t.hash)),watch(t){this.scroll&&this.$create("scroll",t,{offset:this.offset||0})},immediate:!0},elements(t){let{closest:e}=t;return ht(this.links,e||"*")}}
2,update:[{read(){const t=this.links.map(go).filter(Boolean),{length:e}=t;if(!e||!nt(this.$el))return!1;const[r]=Zr(t,/auto|scroll/,!0),{scrollTop:n,scrollHeight:i}=r;let o=!1;if(n===i-Yr(r))o=e-1;else{for(const e in t){if(_e(t[e]).top-_e(Xr(r)).top-this.offset>0)break;o=+e}!1===o&&this.overflow&&(o=0)}return{active:o}},write(t){let{active:e}=t;const r=!1!==e&&!se(this.elements[e],this.cls);this.links.forEach((t=>t.blur()));for(const t in this.elements)ae(this.elements[t],this.cls,+t===e);r&&Lt(this.$el,"active",[e,this.elements[e]])},events:["scroll","resize"]}]},bo={mixins:[En,Hi,Pn,Hn],props:{position:String,top:null,bottom:Boolean,offset:String,animation:String,clsActive:String,clsInactive:String,clsFixed:String,clsBelow:String,selTarget:String,showOnUp:Boolean,targetOffset:Number},data:{position:"top",top:0,bottom:!1,offset:0,animation:"",clsActive:"uk-active",clsInactive:"",clsFixed:"uk-sticky-fixed",clsBelow:"uk-sticky-below",selTarget:"",showOnUp:!1,targetOffset:!1},computed:{selTarget(t,e){let{selTarget:r}=t;return r&&Ke(r,e)||e}},resizeTargets:()=>document.documentElement,connected(){this.placeholder=Ke("+ .uk-sticky-placeholder",this.$el)||Ke('<div class="uk-sticky-placeholder"></div>'),this.isFixed=!1,this.setActive(!1)},disconnected(){this.isFixed&&(this.hide(),ne(this.selTarget,this.clsInactive)),Ue(this.placeholder),this.placeholder=null},events:[{name:"load hashchange popstate",el:()=>window,filter(){return!1!==this.targetOffset},handler(){location.hash&&0!==qr(window)&&ur.read((()=>{const t=_e(Ke(location.hash)),e=_e(this.$el);this.isFixed&&q(t,e)&&qr(window,t.top-e.height-Ae(this.targetOffset,"height")-Ae(this.offset,"height"))}))}}],update:[{read(t,e){let{height:r,margin:n}=t;if(this.inactive=!this.matchMedia||!nt(this.$el),this.inactive)return!1;const i=this.isActive&&e.has("resize");i&&(Zt(this.selTarget,"transition","0s"),this.hide()),this.isActive||(r=_e(this.$el).height,n=Zt(this.$el,"margin")),i&&(this.show(),ur.write((()=>Zt(this.selTarget,"transition",""))));const o=this.isFixed?this.placeholder:this.$el,s=xe(window);let a=this.position;"auto"===a&&r>s&&(a="bottom");let l=Ae(this.offset,"height",o);"bottom"===a&&(l+=s-r);const c=Math.max(0,r+l-s),u=_e(o).top,h=xo(this.top,this.$el,u),f=xo(this.bottom,this.$el,u+r,!0);return{start:Math.max(h,u)-l,end:f?f-_e(this.$el).height+c-l:Kr(this.$el).scrollHeight-s,offset:l,overflow:c,topOffset:u,height:r,margin:n,width:ye(o).width,top:be(o)[0]}},write(t){let{height:e,margin:r}=t;const{placeholder:n}=this;Zt(n,{height:e,margin:r}),ft(n,document)||(Ne(this.$el,n),n.hidden=!0)},events:["resize"]},{read(t){let{scroll:e=0,dir:r="down",overflow:n,overflowScroll:i=0,start:o,end:s}=t;const a=qr(window);return{dir:e<=a?"down":"up",prevDir:r,scroll:a,prevScroll:e,offsetParentTop:_e(this.$el.offsetParent).top,overflowScroll:V(i+V(a,o,s)-V(e,o,s),0,n)}},write(t,e){const r=e.has("scroll"),{initTimestamp:n=0,dir:i,prevDir:o,scroll:s,prevScroll:a=0,top:l,start:c,topOffset:u,height:h}=t;if(s<0||s===a&&r||this.showOnUp&&!r&&!this.isFixed)return;const f=Date.now();if((f-n>300||i!==o)&&(t.initScroll=s,t.initTimestamp=f),!(this.showOnUp&&!this.isFixed&&Math.abs(t.initScroll-s)<=30&&Math.abs(a-s)<=10))if(this.inactive||s<c||this.showOnUp&&(s<=c||"down"===i&&r||"up"===i&&!this.isFixed&&s<=u+h)){if(!this.isFixed)return void(me.inProgress(this.$el)&&l>s&&(me.cancel(this.$el),this.hide()));this.isFixed=!1,this.animation&&s>u?(me.cancel(this.$el),me.out(this.$el,this.animation).then((()=>this.hide()),G)):this.hide()}else this.isFixed?this.update():this.animation&&s>u?(me.cancel(this.$el),this.show(),me.in(this.$el,this.animation).catch(G)):this.show()},events:["resize","scroll"]}],methods:{show(){this.isFixed=!0,this.update(),this.placeholder.hidden=!1},hide(){this.setActive(!1),ne(this.$el,this.clsFixed,this.clsBelow),Zt(this.$el,{position:"",top:"",width:""}),this.placeholder.hidden=!0},update(){let{width:t,scroll:e=0,overflow:r,overflowScroll:n=0,start:i,end:o,offset:s,topOffset:a,height:l,offsetParentTop:c}=this._data;const u=0!==i||e>i;let h="fixed";e>o&&(s+=o-c,h="absolute"),r&&(s-=n),Zt(this.$el,{position:h,top:s+"px",width:t}),this.setActive(u),ae(this.$el,this.clsBelow,e>a+l),re(this.$el,this.clsFixed)}
2,setActive(t){const e=this.active;this.active=t,t?(oe(this.selTarget,this.clsInactive,this.clsActive),e!==t&&Lt(this.$el,"active")):(oe(this.selTarget,this.clsActive,this.clsInactive),e!==t&&Lt(this.$el,"inactive"))}}};function xo(t,e,r,n){if(!t)return 0;if(T(t)&&t.match(/^-?\d/))return r+Ae(t);{const r=!0===t?lt(e):gt(t,e);return _e(r).bottom-(n&&r&&ft(e,r)?P(Zt(r,"paddingBottom")):0)}}var wo={mixins:[Sn,so,Tn],args:"connect",props:{connect:String,toggle:String,itemNav:String,active:Number},data:{connect:"~.uk-switcher",toggle:"> * > :first-child",itemNav:!1,active:0,cls:"uk-active",attrItem:"uk-switcher-item"},computed:{connects:{get(t,e){let{connect:r}=t;return yt(r,e)},watch(t){this.swiping&&Zt(t,"touch-action","pan-y pinch-zoom");const e=this.index();this.connects.forEach((t=>pt(t).forEach(((t,r)=>ae(t,this.cls,r===e)))))},immediate:!0},toggles:{get(t,e){let{toggle:r}=t;return Je(r,e).filter((t=>!ut(t,".uk-disabled *, .uk-disabled, [disabled]")))},watch(t){const e=this.index();this.show(~e?e:t[this.active]||t[0])},immediate:!0},children(){return pt(this.$el).filter((t=>this.toggles.some((e=>ft(e,t)))))},swipeTarget(){return this.connects}},connected(){this.lazyload(this.$el,this.connects),Pe((()=>this.$emit()))},events:[{name:"click",delegate(){return this.toggle},handler(t){t.preventDefault(),this.show(t.current)}},{name:"click",el(){return this.connects.concat(this.itemNav?yt(this.itemNav,this.$el):[])},delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(t){t.preventDefault(),this.show(tt(t.current,this.attrItem))}},{name:"swipeRight swipeLeft",filter(){return this.swiping},el(){return this.connects},handler(t){let{type:e}=t;this.show(u(e,"Left")?"next":"previous")}}],methods:{index(){return f(this.children,(t=>se(t,this.cls)))},show(t){const e=this.index(),r=Z(this.children[Z(t,this.toggles,e)],pt(this.$el));e!==r&&(pt(this.$el).forEach(((t,e)=>{ae(t,this.cls,r===e),K(this.toggles[e],"aria-expanded",r===e)})),this.connects.forEach((async t=>{let{children:n}=t;await this.toggleElement(R(n).filter((t=>se(t,this.cls))),!1,e>=0),await this.toggleElement(n[r],!0,e>=0)})))}}},Eo={mixins:[En],extends:wo,props:{media:Boolean},data:{media:960,attrItem:"uk-tab-item"},connected(){const t=se(this.$el,"uk-tab-left")?"uk-tab-left":!!se(this.$el,"uk-tab-right")&&"uk-tab-right";t&&this.$create("toggle",this.$el,{cls:t,mode:"media",media:this.media})}};const So=32;var To={mixins:[Sn,Hi,Tn],args:"target",props:{href:String,target:null,mode:"list",queued:Boolean},data:{href:!1,target:!1,mode:"click",queued:!0},computed:{target:{get(t,e){let{href:r,target:n}=t;return n=yt(n||r,e),n.length&&n||[e]},watch(){this.updateAria()},immediate:!0}},connected(){h(this.mode,"media")||at(this.$el)||K(this.$el,"tabindex","0"),this.lazyload(this.$el,this.target),Pe((()=>this.$emit()))},events:[{name:ir,filter(){return h(this.mode,"hover")},handler(t){Ut(t)&&!this._showState&&(Lt(this.$el,"focus"),Pt(document,ir,(()=>Lt(this.$el,"blur")),!0,(t=>!ft(t.target,this.$el))),h(this.mode,"click")&&(this._preventClick=!0))}},{name:ar+" "+lr+" focus blur",filter(){return h(this.mode,"hover")},handler(t){if(Ut(t))return;const e=h([ar,"focus"],t.type),r=K(this.$el,"aria-expanded");!e&&(t.type===lr&&ut(this.$el,":focus")||"blur"===t.type&&ut(this.$el,":hover"))||(this._showState&&e===(r!==this._showState)?e||(this._showState=null):(this._showState=e?r:null,this.toggle("toggle"+(e?"show":"hide"))))}},{name:"keydown",filter(){return h(this.mode,"click")&&!Le(this.$el,"input")},handler(t){t.keyCode===So&&(t.preventDefault(),this.$el.click())}},{name:"click",filter(){return h(this.mode,"click")},handler(t){if(this._preventClick)return this._preventClick=null;let e;(ht(t.target,'a[href="#"], a[href=""]')||(e=ht(t.target,"a[href]"))&&("true"!==K(this.$el,"aria-expanded")||e.hash&&ut(this.target,e.hash)))&&t.preventDefault(),this.toggle()}},{name:"toggled",self:!0,el(){return this.target},handler(t,e){t.target===this.target[0]&&this.updateAria(e)}},{name:"mediachange",filter(){return h(this.mode,"media")},el(){return this.target},handler(t,e){e.matches^this.isToggled(this.target)&&this.toggle()}}],methods:{async toggle(t){if(!Lt(this.target,t||"toggle",[this]))return;if(!this.queued)return this.toggleElement(this.target);const e=this.target.filter((t=>se(t,this.clsLeave)));if(e.length){for(const t of this.target){const r=h(e,t);this.toggleElement(t,r,r)}return}const r=this.target.filter(this.isToggled);await this.toggleElement(r,!1),await this.toggleElement(this.target.filter((t=>!h(r,t))),!0)},updateAria(t){h(this.mode,"media")||K(this.$el,"aria-expanded",S(t)?t:this.isToggled(this.target))}}};N(Object.freeze({__proto__:null,Accordion:Cn,Alert:kn,Cover:Ln,Drop:jn,Dropdown:jn,FormCustom:Nn,Grid:Kn,HeightMatch:ri,HeightViewport:oi,Icon:_i,Img:Mi,Leader:Zi,Margin:$n,Modal:Ji,Nav:to,Navbar:ro,Offcanvas:lo,OverflowAuto:fo,Responsive:po,Scroll:mo,Scrollspy:_o,ScrollspyNav:vo,Sticky:bo,Svg:si,Switcher:wo,Tab:Eo,Toggle:To,
2Video:In,Close:wi,Spinner:Ei,SlidenavNext:bi,SlidenavPrevious:bi,SearchIcon:xi,Marker:vi,NavbarToggleIcon:vi,OverlayIcon:vi,PaginationNext:vi,PaginationPrevious:vi,Totop:vi}),((t,e)=>bn.component(e,t))),bn.use(xn),wn(bn);const Ao=["days","hours","minutes","seconds"];var Oo={mixins:[En],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el:()=>document,handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const t=Co(this.date);(!this.date||t.total<=0)&&(this.stop(),t.days=t.hours=t.minutes=t.seconds=0);for(const e of Ao){const r=Ke(this.clsWrapper.replace("%unit%",e),this.$el);if(!r)continue;let n=String(Math.trunc(t[e]));n=n.length<2?"0"+n:n,r.textContent!==n&&(n=n.split(""),n.length!==r.children.length&&De(r,n.map((()=>"<span></span>
2")).join("")),n.forEach(((t,e)=>r.children[e].textContent=t)))}}}};function Co(t){const e=t-Date.now();return{total:e,seconds:e/1e3%60,minutes:e/1e3/60%60,hours:e/1e3/60/60%24,days:e/1e3/60/60/24}}const Mo="uk-transition-leave",ko="uk-transition-enter";function Io(t,e,r,n){void 0===n&&(n=0);const i=Po(e,!0),o={opacity:1},s={opacity:0},a=t=>()=>i===Po(e)?t():Promise.reject(),l=a((()=>(re(e,Mo),Promise.all(Ro(e).map(((t,e)=>new Promise((i=>setTimeout((()=>he.start(t,s,r/2,"ease").then(i)),e*n)))))).then((()=>ne(e,Mo)))))),c=a((()=>{const a=xe(e);return re(e,ko),t(),Zt(pt(e),{opacity:0}),new Promise((t=>requestAnimationFrame((()=>{const l=pt(e),c=xe(e);Zt(e,"alignContent","flex-start"),xe(e,a);const u=Ro(e);Zt(l,s);const h=u.map(((t,e)=>new Promise((i=>setTimeout((()=>he.start(t,o,r/2,"ease").then(i)),e*n)))));a!==c&&h.push(he.start(e,{height:c},r/2+u.length*n,"ease")),Promise.all(h).then((()=>{ne(e,ko),i===Po(e)&&(Zt(e,{height:"",alignContent:""}),Zt(l,{opacity:""}),delete e.dataset.transition),t()}))}))))}));return se(e,Mo)?Lo(e).then(c):se(e,ko)?Lo(e).then(l).then(c):l().then(c)}function Po(t,e){return e&&(t.dataset.transition=1+Po(t)),I(t.dataset.transition)||0}function Lo(t){return Promise.all(pt(t).filter(he.inProgress).map((t=>new Promise((e=>Pt(t,"transitionend transitioncanceled",e))))))}function Ro(t){return Un(pt(t)).reduce(((t,e)=>t.concat($(e.filter((t=>Gr(t))),"offsetLeft"))),[])}function Do(t,e,r){return new Promise((n=>requestAnimationFrame((()=>{let i=pt(e);const o=i.map((t=>zo(t,!0))),s=Zt(e,["height","padding"]);he.cancel(e),i.forEach(he.cancel),jo(e),t(),i=i.concat(pt(e).filter((t=>!h(i,t)))),Promise.resolve().then((()=>{ur.flush();const t=Zt(e,["height","padding"]),[a,l]=Bo(e,i,o);i.forEach(((t,e)=>l[e]&&Zt(t,l[e]))),Zt(e,{display:"block",...s}),requestAnimationFrame((()=>{const o=i.map(((t,n)=>lt(t)===e&&he.start(t,a[n],r,"ease"))).concat(he.start(e,t,r,"ease"));Promise.all(o).then((()=>{i.forEach(((t,r)=>lt(t)===e&&Zt(t,"display",0===a[r].opacity?"none":""))),jo(e)}),G).then(n)}))}))}))))}function zo(t,e){const r=Zt(t,"zIndex");return!!nt(t)&&{display:"",opacity:e?Zt(t,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:"auto"===r?mt(t):r,...Fo(t)}}function Bo(t,e,r){const n=e.map(((t,e)=>!(!lt(t)||!(e in r))&&(r[e]?nt(t)?Fo(t):{opacity:0}:{opacity:nt(t)?1:0}))),i=n.map(((n,i)=>{const o=lt(e[i])===t&&(r[i]||zo(e[i]));if(!o)return!1;if(n){if(!("opacity"in n)){const{opacity:t}=o;t%1?n.opacity=1:delete o.opacity}}else delete o.opacity;return o}
2));return[n,i]}function jo(t){Zt(t.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),Zt(t,{height:"",display:"",padding:""})}function Fo(t){const{height:e,width:r}=_e(t),{top:n,left:i}=ve(t),{marginLeft:o,marginTop:s}=Zt(t,["marginTop","marginLeft"]);return{top:n,left:i,height:e,width:r,marginLeft:o,marginTop:s,transform:""}}var No={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(t,e){void 0===e&&(e=this.$el);const r=this.animation,n="fade"===r?Io:"delayed-fade"===r?function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Io(...e,40)}:r?Do:()=>(t(),Promise.resolve());return n(t,e,this.duration).then((()=>this.$update(e,"resize")),G)}}},$o={mixins:[No],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get(t,e){let{attrItem:r}=t;return Je("["+r+"],[data-"+r+"]",e)},watch(){if(this.updateState(),!1!==this.selActive){const t=Je(this.selActive,this.$el);this.toggles.forEach((e=>ae(e,this.cls,h(t,e))))}},immediate:!0},children:{get(t,e){let{target:r}=t;return Je(r+" > *",e)},watch(t,e){e&&!Wo(t,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(t){t.preventDefault(),this.apply(t.current)}}],methods:{apply(t){const e=this.getState(),r=qo(t,this.attrItem,this.getState());Vo(e,r)||this.setState(r)},getState(){return this.toggles.filter((t=>se(t,this.cls))).reduce(((t,e)=>qo(e,this.attrItem,t)),{filter:{"":""},sort:[]})},setState(t,e){void 0===e&&(e=!0),t={filter:{"":""},sort:[],...t},Lt(this.$el,"beforeFilter",[this,t]),this.toggles.forEach((e=>ae(e,this.cls,!!Ho(e,this.attrItem,t)))),Promise.all(Je(this.target,this.$el).map((r=>{const n=()=>{Go(t,r,pt(r)),this.$update(this.$el)};return e?this.animate(n,r):n()}))).then((()=>Lt(this.$el,"afterFilter",[this])))},updateState(){ur.write((()=>this.setState(this.getState(),!1)))}}};function Uo(t,e){return kr(tt(t,e),["filter"])}function Vo(t,e){return["filter","sort"].every((r=>B(t[r],e[r])))}function Go(t,e,r){const n=Zo(t);r.forEach((t=>Zt(t,"display",n&&!ut(t,n)?"none":"")));const[i,o]=t.sort;if(i){const t=Xo(r,i,o);B(t,r)||je(e,t)}}function qo(t,e,r){const n=Uo(t,e),{filter:i,group:o,sort:s,order:a="asc"}=n;return(i||M(s))&&(o?i?(delete r.filter[""],r.filter[o]=i):(delete r.filter[o],(C(r.filter)||""in r.filter)&&(r.filter={"":i||""})):r.filter={"":i||""}),M(s)||(r.sort=[s,a]),r}function Ho(t,e,r){let{filter:n={"":""},sort:[i,o]}=r;const{filter:s="",group:a="",sort:l,order:c="asc"}=Uo(t,e);return M(l)?a in n&&s===n[a]||!s&&a&&!(a in n)&&!n[""]:i===l&&o===c}function Wo(t,e){return t.length===e.length&&t.every((t=>~e.indexOf(t)))}function Zo(t){let{filter:e}=t,r="";return N(e,(t=>r+=t||"")),r}function Xo(t,e,r){return[...t].sort(((t,n)=>tt(t,e).localeCompare(tt(n,e),void 0,{numeric:!0})*("asc"===r||-1)))}var Yo={slide:{show:t=>[{transform:Jo(-100*t)},{transform:Jo()}],percent:t=>Ko(t),translate:(t,e)=>[{transform:Jo(-100*e*t)},{transform:Jo(100*e*(1-t))}]}};function Ko(t){return Math.abs(Zt(t,"transform").split(",")[4]/t.offsetWidth)||0}function Jo(t,e){return void 0===t&&(t=0),void 0===e&&(e="%"),"translate3d("+(t+=t?e:"")+", 0, 0)"}function Qo(t){return"scale3d("+t+", "+t+", 1)"}var ts={...Yo,fade:{show:()=>[{opacity:0},{opacity:1}],percent:t=>1-Zt(t,"opacity"),translate:t=>[{opacity:1-t},{opacity:t}]},scale:{show:()=>[{opacity:0,transform:Qo(.8)},{opacity:1,transform:Qo(1)}],percent:t=>1-Zt(t,"opacity"),translate:t=>[{opacity:1-t,transform:Qo(1-.2*t)},{opacity:t,transform:Qo(.8+.2*t)}]}};function es(t,e,r,n){let{animation:i,easing:o}=n;const{percent:s,translate:a,show:l=G}=i,c=l(r),u=new Y;return{dir:r,show(n,i,s){void 0===i&&(i=0);const a=s?"linear":o;return n-=Math.round(n*V(i,-1,1)),this.translate(i),rs(e,"itemin",{percent:i,duration:n,timing:a,dir:r}),rs(t,"itemout",{percent:1-i,duration:n,timing:a,dir:r}),Promise.all([he.start(e,c[1],n,a),he.start(t,c[0],n,a)]).then((()=>{this.reset(),u.resolve()}),G),u.promise},cancel(){he.cancel([e,t])},reset(){for(const r in c[0])Zt([e,t],r,"")},forward(r,n){return void 0===n&&(n=this.percent()),he.cancel([e,t]),this.show(r,n,!0)},translate(n){this.reset();const i=a(n,r);Zt(e,i[1]),Zt(t,i[0]),rs(e,"itemtranslatein",{percent:n,dir:r}),rs(t,"itemtranslateout",{percent:1-n,dir:r})},percent:()=>s(t||e,e,r),getDistance:()=>null==t?void 0:t.offsetWidth}}function rs(t,e,r){Lt(t,Rt(e,!1,!1,r))}var ns={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){K(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:()=>document,filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval((()=>(!this.draggable||!Ke(":focus",this.$el))&&(!this.pauseOnHover||!ut(this.$el,":hover"))&&!this.stack.length&&this.show("next")),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},is={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=t=>{const r=Vt(t).x*(er?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,e(t)}}},events:[{name:ir,delegate(){return this.selSlides},handler(t){!this.draggable||!Ut(t)&&os(t.target)||ht(t.target,it)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,kt(document,or,this.move,{passive:!1}),kt(document,sr+" "+cr+" input",this.end,!0),Zt(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(0===e||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;Zt(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:r}=this;let{prevIndex:n}=this,i=Math.abs(e),o=this.getIndex(n+this.dir,n),s=this._getDistance(n,o)||r[n].offsetWidth;for(;o!==n&&i>s;)this.drag-=s*this.dir,n=o,i-=s,o=this.getIndex(n+this.dir,n),s=this._getDistance(n,o)||r[n].offsetWidth;this.percent=i/s;
2const a=r[n],l=r[o],c=this.index!==o,u=n===o;let f;[this.index,this.prevIndex].filter((t=>!h([o,n],t))).forEach((t=>{Lt(r[t],"itemhidden",[this]),u&&(f=!0,this.prevIndex=n)})),(this.index===n&&this.prevIndex!==n||f)&&Lt(r[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=o,!u&&Lt(a,"beforeitemhide",[this]),Lt(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!u&&l),c&&(!u&&Lt(a,"itemhide",[this]),Lt(l,"itemshow",[this]))},end(){if(It(document,or,this.move,{passive:!1}),It(document,sr+" "+cr+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(er?this.dir*(er?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}Zt(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function os(t){return!t.children.length&&t.childNodes.length}var ss={mixins:[ns,is,{data:{selNav:!1},computed:{nav(t,e){let{selNav:r}=t;return Ke(r,e)},selNavItem(t){let{attrItem:e}=t;return"["+e+"],[data-"+e+"]"},navItems(t,e){return Je(this.selNavItem,e)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&De(this.nav,this.slides.map(((t,e)=>"<li "+this.attrItem+'="'+e+'"><a href></a></li>')).join("")),this.navItems.concat(this.nav).forEach((t=>t&&(t.hidden=!this.maxIndex))),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(t){t.preventDefault(),this.show(tt(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const r=tt(e,this.attrItem);ae(e,this.clsActive,I(r)===t),ae(e,"uk-invisible",this.finite&&("previous"===r&&0===t||"next"===r&&t>=this.maxIndex))}}}},Pn],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){ne(this.slides,this.clsActive)},computed:{duration(t,e){let{velocity:r}=t;return ls(e.offsetWidth/r)},list(t,e){let{selList:r}=t;return Ke(r,e)},maxIndex(){return this.length-1},selSlides(t){let{selList:e,selSlides:r}=t;return e+" "+(r||"> *")},slides:{get(){return Je(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(t,e){if(void 0===e&&(e=!1),this.dragging||!this.length)return;const{stack:r}=this,n=e?0:r.length,i=()=>{r.splice(n,1),r.length&&this.show(r.shift(),!0)};if(r[e?"unshift":"push"](t),!e&&r.length>1)return void(2===r.length&&this._transitioner.forward(Math.min(this.duration,200)));const o=this.getIndex(this.index),s=se(this.slides,this.clsActive)&&this.slides[o],a=this.getIndex(t,this.index),l=this.slides[a];if(s===l)return void i();if(this.dir=as(t,o),this.prevIndex=o,this.index=a,s&&!Lt(s,"beforeitemhide",[this])||!Lt(l,"beforeitemshow",[this,s]))return this.index=this.prevIndex,void i();const c=this._show(s,l,e).then((()=>(s&&Lt(s,"itemhidden",[this]),Lt(l,"itemshown",[this]),new Promise((t=>{ur.write((()=>{r.shift(),r.length?this.show(r.shift(),!0):this._transitioner=null,t()}))})))));return s&&Lt(s,"itemhide",[this]),Lt(l,"itemshow",[this]),c},getIndex(t,e){return void 0===t&&(t=this.index),void 0===e&&(e=this.index),V(Z(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex(t,e){return void 0===t&&(t=this.index),void 0===e&&(e=this.prevIndex),this.getIndex(t,e)},_show(t,e,r){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:r?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!r&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)}
2,_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e,r){void 0===e&&(e=this.prevIndex),void 0===r&&(r=this.index);const n=this._getTransitioner(e!==r&&e,r);return n.translate(t),n},_getTransitioner(t,e,r,n){return void 0===t&&(t=this.prevIndex),void 0===e&&(e=this.index),void 0===r&&(r=this.dir||1),void 0===n&&(n=this.transitionOptions),new this.Transitioner(A(t)?this.slides[t]:t,A(e)?this.slides[e]:e,r*(er?-1:1),n)}}};function as(t,e){return"next"===t?1:"previous"===t||t<e?-1:1}function ls(t){return.5*t+300}var cs={mixins:[ss],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:Yo,Transitioner:es},computed:{animation(t){let{animation:e,Animations:r}=t;return{...r[e]||r.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(t){let{target:e}=t;re(e,this.clsActive)},itemshown(t){let{target:e}=t;re(e,this.clsActivated)},itemhidden(t){let{target:e}=t;ne(e,this.clsActive,this.clsActivated)}}},us={mixins:[Dn,Yi,Tn,cs],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:ts,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-sli
2de-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const t=Ke(this.template),e=Ke(this.selList,t);this.items.forEach((()=>je(e,"<li>"))),this.$mount(je(this.container,t))},computed:{caption(t,e){let{selCaption:r}=t;return Ke(r,e)}},events:[{name:or+" "+ir+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),ne(this.slides,this.clsActive),he.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el:()=>document,handler(t){if(this.isToggled(this.$el)&&this.draggable)switch(t.keyCode){case 37:this.show("previous");break;case 39:this.show("next")}}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=ts.scale,ne(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){De(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,e){const{source:r,type:n,alt:i="",poster:o,attrs:s={}}=e;if(this.setItem(e,"<span uk-spinner></span>"),!r)return;let a;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if("image"===n||r.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:t,height:n}=await Ht(r,s.srcset,s.size);this.setItem(e,hs("img",{src:r,width:t,height:n,alt:i,...s}))}catch(t){this.setError(e)}else if("video"===n||r.match(/\.(mp4|webm|ogv)($|\?)/i)){const t=hs("video",{src:r,poster:o,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...s});kt(t,"loadedmetadata",(()=>{K(t,{width:t.videoWidth,height:t.videoHeight}),this.setItem(e,t)})),kt(t,"error",(()=>this.setError(e)))}else if("iframe"===n||r.match(/\.(html|php)($|\?)/i))this.setItem(e,hs("iframe",{src:r,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...s}));else if(a=r.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(e,hs("iframe",{src:"https://www.youtube"+(a[1]||"")+".com/embed/"+a[2]+(a[3]?"?"+a[3]:""),width:1920,height:1080,...l,...s}));else if(a=r.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:t,width:n}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(r),{credentials:"omit"})).json();this.setItem(e,hs("iframe",{src:"https://player.vimeo.com/video/"+a[1]+(a[2]?"?"+a[2]:""),width:n,height:t,...l,...s}))}catch(t){this.setError(e)}}}],methods:{loadItem(t){void 0===t&&(t=this.index);const e=this.getItem(t);this.getSlide(e).childElementCount||Lt(this.$el,"itemload",[e])},getItem(t){return void 0===t&&(t=this.index),this.items[Z(t,this.slides)]},setItem(t,e){Lt(this.$el,"itemloaded",[this,De(this.getSlide(t),e)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),re(this.$el,"uk-active","uk-transition-active")},hideControls(){ne(this.$el,"uk-active","uk-transition-active")}}};function hs(t,e){const r=Ze("<"+t+">");return K(r,e),r}var fs={install:ds,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get(t,e){let{toggle:r}=t;return Je(r,e)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return this.toggle+":not(.uk-disabled)"},handler(t){t.preventDefault(),this.show(t.current)}}],methods:{show(t){const e=U(this.toggles.map(ps),"source");if(w(t)){const{source:r}=ps(t);t=f(e,(t=>{let{source:e}=t;return r===e}))}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:e}),kt(this.panel.$el,"hidden",(()=>this.panel=!1)),this.panel.show(t)},hide(){var t;return null==(t=this.panel)?void 0:t.hide()}}};function ds(t,e){t.lightboxPanel||t.component("lightboxPanel",us),m(e.props,t.component("lightboxPanel").options.props)}function ps(t){const e={};for(const r of["href","caption","type","poster","alt","attrs"])e["href"===r?"source":r]=tt(t,r);return e.attrs=kr(e.attrs),e}var ms={mixins:[Dn],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:gs,computed:{marginProp(t){let{pos:e}=t;return"margin"+(c(e,"top")?"Top":"Bottom")},startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const t=Ke("."+this.clsContainer+"-"+this.pos,this.container)||je(this.container,'<div class="'+this.clsContainer+" "+this.clsContainer+"-"+this.pos+'" style="display: block"></div>');this.$mount(je(t,'<div class="'+this.clsMsg+(this.status?" "+this.clsMsg+"-"+this.status:"")+'"> <a href class="'+this.clsClose+'" data-uk-close></a> <div>'+this.message+"</div> </div>"))},async connected(){const t=P(Zt(this.$el,this.marginProp));await he.start(Zt(this.$el,this.startProps),{opacity:1,[this.marginProp]:t}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(t){ht(t.target,'a[href="#"],a[href=""]')&&t.preventDefault(),this.close()},[ar](){this.timer&&clearTimeout(this.timer)},[lr](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(t){const e=t=>{const e=lt(t);Lt(t,"close",[this]),Ue(t),null!=e&&e.hasChildNodes()||Ue(e)};this.timer&&clearTimeout(this.timer),t||await he.start(this.$el,this.startProps),e(this.$el)}}};function gs(t){t.notification.closeAll=function(e,r){Ye(document.body,(n=>{const i=t.getComponent(n,"notification");!i||e&&e!==i.group||i.close(r)}))}}const ys={x:bs,y:bs,rotate:bs,scale:bs,color:xs,backgroundColor:xs,borderColor:xs,blur:Es,hue:Es,fopacity:Es,grayscale:Es,invert:Es,saturate:Es,sepia:Es,opacity:Ss,stroke:Ts,bgx:As,bgy:As},{keys:_s}=Object;var vs={mixins:[Hi],props:js(_s(ys),"list"),data:js(_s(ys),void 0),computed:{props:(t,e)=>_s(ys).reduce(((r,n)=>(M(t[n])||(r[n]=ys[n](n,e,t[n].slice())),r)),{})},events:{load(){this.$emit()}},methods:{reset(){N(this.getCss(0),((t,e)=>Zt(this.$el,e,"")))},getCss(t){const e={transform:"",filter:""};for(const r in this.props)this.props[r](e,t);return e}}};function bs(t,e,r){const n=zs(r)||{x:"px",y:"px",rotate:"deg"}[t]||"";let i;return"x"!==t&&"y"!==t||(t="translate"+a(t),i=t=>P(P(t).toFixed("px"===n?0:6))),1===r.length&&r.unshift("scale"===t?1:0),r=Ps(r,i),(e,i)=>{e.transform+=" "+t+"("+Rs(r,i)+n+")"}}function xs(t,e,r){return 1===r.length&&r.unshift(Bs(e,t,"")),r=Ps(r,(t=>ws(e,t))),(e,n)=>{const[i,o,s]=Ls(r,n),a=i.map(((t,e)=>(t+=s*(o[e]-t),3===e?P(t):parseInt(t,10)))).join(",");e[t]="rgba("+a+")"}}function ws(t,e){return Bs(t,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(P)}function Es(t,e,r){1===r.length&&r.unshift(0);const n=zs(r)||{blur:"px",hue:"deg"}[t]||"%";return t={fopacity:"opacity",hue:"hue-rotate"}[t]||t,r=Ps(r),(e,i)=>{const o=Rs(r,i);e.filter+=" "+t+"("+(o+n)+")"}}function Ss(t,e,r){return 1===r.length&&r.unshift(Bs(e,t,"")),r=Ps(r),(e,n)=>{e[t]=Rs(r,n)}}function Ts(t,e,r){1===r.length&&r.unshift(0);const n=zs(r),i=di(e);return r=Ps(r.reverse(),(t=>
2(t=P(t),"%"===n?t*i/100:t))),r.some((t=>{let[e]=t;return e}))?(Zt(e,"strokeDasharray",i),(t,e)=>{t.strokeDashoffset=Rs(r,e)}):G}function As(t,e,r){1===r.length&&r.unshift(0);const n="y"===(t=t.substr(-1))?"height":"width";r=Ps(r,(t=>Ae(t,n,e)));const i=Bs(e,"background-position-"+t,"");return"cover"===Bs(e,"backgroundSize","")?Os(t,e,r,i,n):Cs(t,r,i)}function Os(t,e,r,n,i){const o=ks(e);if(!o.width)return G;const s=r.map((t=>{let[e]=t;return e})),a=Math.min(...s),l=Math.max(...s),c=s.indexOf(a)<s.indexOf(l),u=l-a;let h=(c?-u:0)-(c?a:l);const f={width:e.offsetWidth,height:e.offsetHeight},d=W.cover(o,f),p=d[i]-f[i];if(p<u)f[i]=d[i]+u-p;else if(p>u){const t=f[i]/Ae(n,i,e,!0);t&&(h-=(p-u)/t)}const m=W.cover(o,f),g=Cs(t,r,h+"px");return(t,e)=>{g(t,e),t.backgroundSize=m.width+"px "+m.height+"px",t.backgroundRepeat="no-repeat"}}function Cs(t,e,r){return function(n,i){n["background-position-"+t]="calc("+r+" + "+Rs(e,i)+"px)"}}const Ms={};function ks(t){const e=Zt(t,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(Ms[e])return Ms[e];const r=new Image;return e&&(r.src=e,!r.naturalWidth)?(r.onload=()=>{Ms[e]=Is(r),Lt(t,Rt("load",!1))},Is(r)):Ms[e]=Is(r)}function Is(t){return{width:t.naturalWidth,height:t.naturalHeight}}function Ps(t,e){void 0===e&&(e=P);const r=[],{length:n}=t;let i=0;for(let o=0;o<n;o++){let[s,a]=T(t[o])?t[o].trim().split(" "):[t[o]];if(s=e(s),a=a?P(a)/100:null,0===o?null===a?a=0:a&&r.push([s,0]):o===n-1&&(null===a?a=1:1!==a&&(r.push([s,a]),a=1)),r.push([s,a]),null===a)i++;else if(i){const t=r[o-i-1][1],e=(a-t)/(i+1);for(let n=i;n>0;n--)r[o-n][1]=t+e*(i-n+1);i=0}}return r}function Ls(t,e){const r=f(t.slice(1),(t=>{let[,r]=t;return e<=r}))+1;return[t[r-1][0],t[r][0],(e-t[r-1][1])/(t[r][1]-t[r-1][1])]}function Rs(t,e){const[r,n,i]=Ls(t,e);return A(r)?r+Math.abs(r-n)*i*(r<n?1:-1):+n}const Ds=/^-?\d+([^\s]*)/;function zs(t,e){for(const e of t){const t=null==e.match?void 0:e.match(Ds);if(t)return t[1]}return e}function Bs(t,e,r){const n=t.style[e],i=Zt(Zt(t,e,r),e);return t.style[e]=n,i}function js(t,e){return t.reduce(((t,r)=>(t[r]=e,t)),{})}var Fs={mixins:[vs,Pn,Hn],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target(t,e){let{target:r}=t;return $s(r&&gt(r,e)||e)},start(t){let{start:e}=t;return Ae(e,"height",this.target,!0)},end(t){let{end:e,viewport:r}=t;return Ae(e||(r=100*(1-r))&&r+"vh+"+r+"%","height",this.target,!0)}},update:{read(t,e){let{percent:r}=t;if(e.has("scroll")||(r=!1),!this.matchMedia)return;const n=r;return r=Ns(Wr(this.target,this.start,this.end),this.easing),{percent:r,style:n!==r&&this.getCss(r)}},write(t){let{style:e}=t;this.matchMedia?e&&Zt(this.$el,e):this.reset()},events:["scroll","resize"]}};function Ns(t,e){return e>=0?Math.pow(t,e+1):1-Math.pow(1-t,1-e)}function $s(t){return t?"offsetTop"in t?t:$s(lt(t)):document.documentElement}var Us={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);~this.prevIndex&&this.index===t||this.show(t)},events:["resize"]}},Vs={mixins:[Sn],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function Gs(t,e,r,n){let{center:i,easing:o,list:s}=n;const a=new Y,l=t?qs(t,s,i):qs(e,s,i)+ye(e).width*r,c=e?qs(e,s,i):l+ye(t).width*r*(er?-1:1);return{dir:r,show(e,n,i){void 0===n&&(n=0);const l=i?"linear":o;return e-=Math.round(e*V(n,-1,1)),this.translate(n),n=t?n:V(n,0,1),Ks(this.getItemIn(),"itemin",{percent:n,duration:e,timing:l,dir:r}),t&&Ks(this.getItemIn(!0),"itemout",{percent:1-n,duration:e,timing:l,dir:r}),he.start(s,{transform:Jo(-c*(er?-1:1),"px")},e,l).then(a.resolve,G),a.promise},cancel(){he.cancel(s)},reset(){Zt(s,"transform","")},forward(t,e){return void 0===e&&(e=this.percent()),he.cancel(s),this.show(t,e,!0)},translate(n){const i=this.getDistance()*r*(er?-1:1);Zt(s,"transform",Jo(V(i-i*n-c,-Ws(s),ye(s).width)*(er?-1:1),"px"));const o=this.getActives(),a=this.getItemIn(),l=this.getItemIn(!0);n=t?V(n,-1,1):0;for(const i of pt(s)){const c=h(o,i),u=i===a,f=i===l;Ks(i,"itemtranslate"+(u||!f&&(c||r*(er?-1:1)==-1^Xs(i,s)>Xs(t||e))?"in":"out"),{dir:r,percent:f?1-n:u?n:c?1:0})}},percent:()=>Math.abs((Zt(s,"transform").split(",")[4]*(er?-1:1)+l)/(c-l)),getDistance:()=>Math.abs(c-l),getItemIn(r){void 0===r&&(r=!1);let n=this.getActives(),o=Ys(s,qs(e||t,s,i));if(r){const t=n;n=o,o=t}return o[f(o,(t=>!h(n,t)))]},getActives:()=>Ys(s,qs(t||e,s,i))}}function qs(t,e,r){const n=Xs(t,e);return r?n-Zs(t,e):Math.min(n,Hs(e))}function Hs(t){return Math.max(0,Ws(t)-ye(t).width)}function Ws(t){return pt(t).reduce(((t,e)=>ye(e).width+t),0)}function Zs(t,e){return ye(e).width/2-ye(t).width/2}function Xs(t,e){return t&&(ve(t).left+(er?ye(t).width-ye(e).width:0))*(er?-1:1)||0}function Ys(t,e){e-=1;const r=ye(t).width,n=e+r+2;return pt(t).filter((i=>{const o=Xs(i,t),s=o+Math.min(ye(i).width,r);return o>=e&&s<=n}))}function Ks(t,e,r){Lt(t,Rt(e,!1,!1,r))}var Js={mixins:[En,ss,Us,Vs],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:Gs},computed:{avgWidth(){return Ws(this.list)/this.length},finite(t){let{finite:e}=t;return e||Math.ceil(Ws(this.list))<Math.trunc(ye(this.list).width+Qs(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return F(this.sets);let t=0;const e=Hs(this.list),r=f(this.slides,(r=>{if(t>=e)return!0;t+=ye(r).width}));return~r?r:this.length-1},sets(t){let{sets:e}=t;if(!e)return;let r=0;const n=[],i=ye(this.list).width;for(let t in this.slides){const e=ye(this.slides[t]).width;r+e>i&&(r=0),this.center?r<i/2&&r+e+ye(this.slides[+t+1]).width/2>i/2&&(n.push(+t),r=i/2-e/2):0===r&&n.push(Math.min(+t,this.maxIndex)),r+=e}return n.length?n:void 0},transitionOptions(){return{center:this.center,list:this.list}}},connected(){ae(this.$el,this.clsContainer,!Ke("."+this.clsContainer,this.$el))},update:{write(){for(const t of this.navItems){const e=I(tt(t,this.attrItem));!1!==e&&(t.hidden=!this.maxIndex||e>this.maxIndex||this.sets&&!h(this.sets,e))}!this.length||this.dragging||this.stack.length||(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!h(this.sets,this.index)&&(this.index=this.getValidIndex());const e=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&e>1){for(let t=0;t<e;t++)this.stack.splice(1,0,this.dir>0?"next":"previous");return void t.preventDefault()}const r=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=ls(this.avgWidth/this.velocity)*(ye(this.slides[r]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&re(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite)return void Zt(this.slides,"order","");const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;
2if(this.slides.forEach(((e,r)=>Zt(e,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:""))),!this.center)return;const e=this.slides[t];let r=ye(this.list).width/2-ye(e).width/2,n=0;for(;r>0;){const e=this.getIndex(--n+t,t),i=this.slides[e];Zt(i,"order",e>t?-2:-1),r-=ye(i).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),e=[this.clsActive,(!this.sets||h(this.sets,P(this.index)))&&this.clsActivated||""];for(const r of this.slides)ae(r,e,h(t,r))},getValidIndex(t,e){if(void 0===t&&(t=this.index),void 0===e&&(e=this.prevIndex),t=this.getIndex(t,e),!this.sets)return t;let r;do{if(h(this.sets,t))return t;r=t,t=this.getIndex(t+this.dir,e)}while(t!==r);return t},getAdjacentSlides(){const{width:t}=ye(this.list),e=-t,r=2*t,n=ye(this.slides[this.index]).width,i=this.center?t/2-n/2:0,o=new Set;for(const t of[-1,1]){let s=i+(t>0?n:0),a=0;do{const e=this.slides[this.getIndex(this.index+t+a++*t)];s+=ye(e).width*t,o.add(e)}while(this.slides.length>a&&s>e&&s<r)}return Array.from(o)}}};function Qs(t){return Math.max(0,...pt(t).map((t=>ye(t).width)))}var ta={mixins:[vs],data:{selItem:"!li"},connected(){this.item=gt(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(t){let{type:e,detail:{percent:r,duration:n,timing:i,dir:o}}=t;ur.read((()=>{const t=this.getCss(ra(e,o,r)),s=this.getCss(ea(e)?.5:o>0?1:0);ur.write((()=>{Zt(this.$el,t),he.start(this.$el,s,n,i).catch(G)}))}))}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){he.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(t){let{type:e,detail:{percent:r,dir:n}}=t;ur.read((()=>{const t=this.getCss(ra(e,n,r));ur.write((()=>Zt(this.$el,t)))}))}}]};function ea(t){return u(t,"in")}function ra(t,e,r){return r/=2,ea(t)^e<0?r:1-r}var na={...Yo,fade:{show:()=>[{opacity:0,zIndex:0},{zIndex:-1}],percent:t=>1-Zt(t,"opacity"),translate:t=>[{opacity:1-t,zIndex:0},{zIndex:-1}]},scale:{show:()=>[{opacity:0,transform:Qo(1.5),zIndex:0},{zIndex:-1}],percent:t=>1-Zt(t,"opacity"),translate:t=>[{opacity:1-t,transform:Qo(1+.5*t),zIndex:0},{zIndex:-1}]},pull:{show:t=>t<0?[{transform:Jo(30),zIndex:-1},{transform:Jo(),zIndex:0}]:[{transform:Jo(-100),zIndex:0},{transform:Jo(),zIndex:-1}],percent:(t,e,r)=>r<0?1-Ko(e):Ko(t),translate:(t,e)=>e<0?[{transform:Jo(30*t),zIndex:-1},{transform:Jo(-100*(1-t)),zIndex:0}]:[{transform:Jo(100*-t),zIndex:0},{transform:Jo(30*(1-t)),zIndex:-1}]},push:{show:t=>t<0?[{transform:Jo(100),zIndex:0},{transform:Jo(),zIndex:-1}]:[{transform:Jo(-30),zIndex:-1},{transform:Jo(),zIndex:0}],percent:(t,e,r)=>r>0?1-Ko(e):Ko(t),translate:(t,e)=>e<0?[{transform:Jo(100*t),zIndex:0},{transform:Jo(-30*(1-t)),zIndex:-1}]:[{transform:Jo(-30*t),zIndex:-1},{transform:Jo(100*(1-t)),zIndex:0}]}},ia={mixins:[En,cs,Us,Vs],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:na},update:{read(){if(!this.list)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-Se(this.list,"height","content-box")}},write(t){let{height:e}=t;e>0&&Zt(this.list,"minHeight",e)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map((t=>this.slides[this.getIndex(this.index+t)]))}}},oa={mixins:[En,No],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const t of["init","start","move","end"]){const e=this[t];this[t]=t=>{m(this.pos,Vt(t)),e(t)}}},events:{name:ir,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return pt(this.target)},isEmpty:{get(){return C(this.items)},watch(t){ae(this.target,this.clsEmpty,t)},immediate:!0},handles:{get(t,e){let{handle:r}=t;return r?Je(r,e):this.items},watch(t,e){Zt(e,{touchAction:"",userSelect:""}),Zt(t,{touchAction:rr?"none":"",userSelect:"none"})},immediate:!0}},update:{write(t){if(!this.drag||!lt(this.placeholder))return;const{pos:{x:e,y:r},origin:{offsetTop:n,offsetLeft:i},placeholder:o}=this;Zt(this.drag,{top:r-n,left:e-i});const s=this.getSortable(document.elementFromPoint(e,r));if(!s)return;const{items:a}=s;if(a.some(he.inProgress))return;const l=ua(a,{x:e,y:r});if(a.length&&(!l||l===o))return;const c=this.getSortable(o),u=ha(s.target,l,o,e,r,s===c&&t.moved!==l);!1!==u&&(u&&o===u||(s!==c?(c.remove(o),t.moved=l):delete t.moved,s.insert(o,u),this.touched.add(s)))},events:["move"]},methods:{init(t){const{target:e,button:r,defaultPrevented:n}=t,[i]=this.items.filter((t=>ft(e,t)));!i||n||r>0||ot(e)||ft(e,"."+this.clsNoDrag)||this.handle&&!ft(e,this.handle)||(t.preventDefault(),this.touched=new Set([this]),this.placeholder=i,this.origin={target:e,index:mt(i),...this.pos},kt(document,or,this.move),kt(document,sr,this.end),this.threshold||this.start(t))},start(t){this.drag=ca(this.$container,this.placeholder);const{left:e,top:r}=this.placeholder.getBoundingClientRect();m(this.origin,{offsetLeft:this.pos.x-e,offsetTop:this.pos.y-r}),re(this.drag,this.clsDrag,this.clsCustom),re(this.placeholder,this.clsPlaceholder),re(this.items,this.clsItem),re(document.documentElement,this.clsDragState),Lt(this.$el,"start",[this,this.placeholder]),aa(this.pos),this.move(t)},move(t){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(t)},end(){if(It(document,or,this.move),It(document,sr,this.end),!this.drag)return;la();const t=this.getSortable(this.placeholder);this===t?this.origin.index!==mt(this.placeholder)&&Lt(this.$el,"moved",[this,this.placeholder]):(Lt(t.$el,"added",[t,this.placeholder]),Lt(this.$el,"removed",[this,this.placeholder])),Lt(this.$el,"stop",[this,this.placeholder]),Ue(this.drag),this.drag=null;for(const{clsPlaceholder:t,clsItem:e}
2of this.touched)for(const r of this.touched)ne(r.items,t,e);this.touched=null,ne(document.documentElement,this.clsDragState)},insert(t,e){re(this.items,this.clsItem);const r=()=>e?Fe(e,t):je(this.target,t);this.animate(r)},remove(t){ft(t,this.target)&&this.animate((()=>Ue(t)))},getSortable(t){do{const e=this.$getComponent(t,"sortable");if(e&&(e===this||!1!==this.group&&e.group===this.group))return e}while(t=lt(t))}}};let sa;function aa(t){let e=Date.now();sa=setInterval((()=>{let{x:r,y:n}=t;n+=qr(window);const i=.3*(Date.now()-e);e=Date.now(),Zr(document.elementFromPoint(r,t.y),/auto|scroll/).reverse().some((t=>{let{scrollTop:e,scrollHeight:r}=t;const{top:o,bottom:s,height:a}=_e(Xr(t));if(o<n&&o+35>n)e-=i;else{if(!(s>n&&s-35<n))return;e+=i}if(e>0&&e<r-a)return qr(t,e),!0}))}),15)}function la(){clearInterval(sa)}function ca(t,e){const r=je(t,e.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return Zt(r,"margin","0","important"),Zt(r,{boxSizing:"border-box",width:e.offsetWidth,height:e.offsetHeight,padding:Zt(e,"padding")}),xe(r.firstElementChild,xe(e.firstElementChild)),r}function ua(t,e){return t[f(t,(t=>H(e,t.getBoundingClientRect())))]}function ha(t,e,r,n,i,o){if(!pt(t).length)return;const s=e.getBoundingClientRect();if(!o)return fa(t,r)||i<s.top+s.height/2?e:e.nextElementSibling;const a=r.getBoundingClientRect(),l=da([s.top,s.bottom],[a.top,a.bottom]),c=l?n:i,u=l?"width":"height",h=l?"left":"top",f=l?"right":"bottom",d=a[u]<s[u]?s[u]-a[u]:0;return a[h]<s[h]?!(d&&c<s[h]+d)&&e.nextElementSibling:!(d&&c>s[f]-d)&&e}function fa(t,e){const r=1===pt(t).length;r&&je(t,e);const n=pt(t),i=n.some(((t,e)=>{const r=t.getBoundingClientRect();return n.slice(e+1).some((t=>{const e=t.getBoundingClientRect();return!da([r.left,r.right],[e.left,e.right])}))}));return r&&Ue(e),i}function da(t,e){return t[1]>e[0]&&e[1]>t[0]}var pa={mixins:[Dn,Tn,zn],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active",clsPos:"uk-tooltip"},beforeConnect(){this._hasTitle=J(this.$el,"title"),K(this.$el,"title",""),this.updateAria(!1),ma(this.$el)},disconnected(){this.hide(),K(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){!this.isToggled(this.tooltip||null)&&this.title&&(this._unbind=Pt(document,"show keydown "+ir,this.hide,!1,(t=>t.type===ir&&!ft(t.target,this.$el)||"keydown"===t.type&&27===t.keyCode||"show"===t.type&&t.detail[0]!==this&&t.detail[0].$name===this.$name)),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){ut(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),Ue(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=je(this.container,'<div class="'+this.clsPos+'"> <div class="'+this.clsPos+'-inner">'+this.title+"</div> </div>"),kt(this.tooltip,"toggled",((t,e)=>{this.updateAria(e),e&&(this.positionAt(this.tooltip,this.$el),this.origin="y"===this.getAxis()?Te(this.dir)+"-"+this.align:this.align+"-"+Te(this.dir))})),this.toggleElement(this.tooltip,!0)},updateAria(t){K(this.$el,"aria-expanded",t)}},events:{focus:"show",blur:"hide",[ar+" "+lr](t){Ut(t)||this[t.type===ar?"show":"hide"]()},[ir](t){Ut(t)&&this.show()}}};function ma(t){at(t)||K(t,"tabindex","0")}var ga={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:G,beforeAll:G,beforeSend:G,complete:G,completeAll:G,error:G,fail:G,load:G,loadEnd:G,loadStart:G,progress:G},events:{change(t){ut(t.target,'input[type="file"]')&&(t.preventDefault(),t.target.files&&this.upload(t.target.files),t.target.value="")},drop(t){va(t);const e=t.dataTransfer;null!=e&&e.files&&(ne(this.$el,this.clsDragover),this.upload(e.files))},dragenter(t){va(t)},dragover(t){va(t),re(this.$el,this.clsDragover)},dragleave(t){va(t),ne(this.$el,this.clsDragover)}},methods:{async upload(t){if(!t.length)return;Lt(this.$el,"upload",[t]);for(const e of t){if(this.maxSize&&1e3*this.maxSize<e.size)return void this.fail(this.msgInvalidSize.replace("%s",this.maxSize));if(this.allow&&!ya(this.allow,e.name))return void this.fail(this.msgInvalidName.replace("%s",this.allow));if(this.mime&&!ya(this.mime,e.type))return void this.fail(this.msgInvalidMime.replace("%s",this.mime))}this.multiple||(t=t.slice(0,1)),this.beforeAll(this,t);const e=_a(t,this.concurrent),r=async t=>{const n=new FormData;t.forEach((t=>n.append(this.name,t)));for(const t in this.params)n.append(t,this.params[t]);try{const t=await Gt(this.url,{data:n,method:this.method,responseType:this.t
2ype,beforeSend:t=>{const{xhr:e}=t;e.upload&&kt(e.upload,"progress",this.progress);for(const t of["loadStart","load","loadEnd","abort"])kt(e,t.toLowerCase(),this[t]);return this.beforeSend(t)}});this.complete(t),e.length?await r(e.shift()):this.completeAll(t)}catch(t){this.error(t)}};await r(e.shift())}}};function ya(t,e){return e.match(new RegExp("^"+t.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function _a(t,e){t=p(t);const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function va(t){t.preventDefault(),t.stopPropagation()}return N(Object.freeze({__proto__:null,Countdown:Oo,Filter:$o,Lightbox:fs,LightboxPanel:us,Notification:ms,Parallax:Fs,Slider:Js,SliderParallax:ta,Slideshow:ia,SlideshowParallax:ta,Sortable:oa,Tooltip:pa,Upload:ga}),((t,e)=>bn.component(e,t))),bn}()},5877:(t,e,r)=>{var n=r(3570),i=r(1171),o=i;o.v1=n,o.v4=i,t.exports=o},5327:t=>{for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,r){var n=r||0,i=e;return[i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]]].join("")}},5217:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},3570:(t,e,r)=>{var n,i,o=r(5217),s=r(5327),a=0,l=0;t.exports=function(t,e,r){var c=e&&r||0,u=e||[],h=(t=t||{}).node||n,f=void 0!==t.clockseq?t.clockseq:i;if(null==h||null==f){var d=o();null==h&&(h=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=i=16383&(d[6]<<8|d[7]))}var p=void 0!==t.msecs?t.msecs:(new Date).getTime(),m=void 0!==t.nsecs?t.nsecs:l+1,g=p-a+(m-l)/1e4;if(g<0&&void 0===t.clockseq&&(f=f+1&16383),(g<0||p>a)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,l=m,i=f;var y=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;u[c++]=y>>>24&255,u[c++]=y>>>16&255,u[c++]=y>>>8&255,u[c++]=255&y;var _=p/4294967296*1e4&268435455;u[c++]=_>>>8&255,u[c++]=255&_,u[c++]=_>>>24&15|16,u[c++]=_>>>16&255,u[c++]=f>>>8|128,u[c++]=255&f;for(var v=0;v<6;++v)u[c+v]=h[v];return e||s(u)}},1171:(t,e,r)=>{var n=r(5217),i=r(5327);t.exports=function(t,e,r){var o=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var s=(t=t||{}).random||(t.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;++a)e[o+a]=s[a];return e||i(s)}},6509:function(t){t.exports=function(){"use strict";function t(e){t.installed||e.icon.add({"360-view":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M19.9881,7.9666a2.7073,2.7073,0,0,0-.0639-.3979h-.066a3.4591,3.4591,0,0,1-.66,1.3064,4.6658,4.6658,0,0,1-1.032.9336A9.4865,9.4865,0,0,1,15.6288,10.98q-.6759.2082-1.3725.3547-.695.1486-1.4033.2411c-.4316.0556-.865.1-1.3.1307l1.92,1.187-1.96,1.19.1183-.0106a15.5767,15.5767,0,0,0,1.6176-.2563,12.7312,12.7312,0,0,0,3.1084-1.0848,9.4394,9.4394,0,0,0,1.4183-.8814,7.0574,7.0574,0,0,0,1.2234-1.1656c.0441-.056.09-.109.1317-.1672l.1244-.1739.0614-.0867.0572-.0909c.0383-.06.075-.1213.1114-.1821a4.1955,4.1955,0,0,0,.3472-.78,3.29,3.29,0,0,0,.1089-.4091c.0162-.0678.0215-.14.0321-.2083a1.6747,1.6747,0,0,0,.0211-.2075L20,8.1719C20,8.1033,19.9932,8.0343,19.9881,7.9666Z"/><path d="M12.3334,12.8934,7.4313,9.8624l-.0072,1.747c-.0924-.0108-.1848-.0218-.2771-.0337q-.7077-.0926-1.4033-.2411-.6954-.1467-1.3725-.3547A9.4865,9.4865,0,0,1,1.8334,9.8087a4.6658,4.6658,0,0,1-1.032-.9336,3.4591,3.4591,0,0,1-.66-1.3064H.0758a2.7073,2.7073,0,0,0-.0639.3979C.0068,8.0343,0,8.1033,0,8.1719l.0059.207a1.6747,1.6747,0,0,0,.0211.2075c.0106.0686.0159.1405.0321.2083a3.29,3.29,0,0,0,.1089.4091,4.1955,4.1955,0,0,0,.3472.78c.0364.0608.0731.1218.1114.1821l.0572.0909.0614.0867L.87,10.517c.0417.0582.0876.1112.1317.1672A7.0574,7.0574,0,0,0,2.2247,11.85a9.4394,9.4394,0,0,0,1.4183.8814A12.7312,12.7312,0,0,0,6.7514,13.816c.22.0471.4413.0878.663.125l-.0081,1.9425Z"/><path d="M5.13,5.9668a.1764.1764,0,0,0,.1652-.0661.6656.6656,0,0,0,.0991-.3766c0-.2908-.2115-.489-.6146-.489a2.5408,2.5408,0,0,0-.8128.1454l-.5353.1784-.3039-.6278a2.899,2.899,0,0,1,1.7049-.6146c.8855,0,1.5463.4428,1.5463,1.2159a1.2788,1.2788,0,0,1-.456.9318,1.0136,1.0136,0,0,1,.6014.9516c0,.8261-.641,1.4142-1.6917,1.4142a2.6947,2.6947,0,0,1-1.8768-.7269L3.28,7.3216,3.7751,7.5A3.0035,3.0035,0,0,0,4.78,7.718c.423,0,.6939-.1718.6939-.5418,0-.304-.1124-.41-.4824-.41H4.4029c-.0925,0-.1321-.02-.1321-.1058V5.9668Z"/><path d="M10.2047,5.0879a2.6969,2.6969,0,0,0-.6609-.0924c-.6806,0-1.011.3039-1.11,1.0308l.1255-.0595a2.2571,2.2571,0,0,1,.9714-.2313A1.3238,1.3238,0,0,1,10.9712,7.09,1.5614,1.5614,0,0,1,9.2927,8.63a1.8917,1.8917,0,0,1-1.91-2.1014
2V6.4955a2.1088,2.1088,0,0,1,2.0486-2.379A2.2991,2.2991,0,0,1,10.7069,4.5l-.2511.6476ZM8.4271,6.8127a.8673.8673,0,0,0,.8524.9318A.66.66,0,0,0,9.9932,7.09c0-.3766-.2643-.5683-.6939-.5683a2.02,2.02,0,0,0-.7467.152C8.4271,6.7334,8.4271,6.7533,8.4271,6.8127Z"/><path d="M11.6515,6.3964V6.35c0-1.434.7468-2.2336,1.9032-2.2336s1.9032.8,1.9032,2.2336v.0463c0,1.434-.7467,2.2336-1.9032,2.2336S11.6515,7.83,11.6515,6.3964Zm2.7557,0V6.35c0-.9384-.2842-1.2688-.8525-1.2688s-.8524.33-.8524,1.2688v.0463c0,.945.2841,1.2688.8524,1.2688S14.4072,7.3414,14.4072,6.3964Z"/><path d="M16.0655,5.2928a1.203,1.203,0,1,1,1.2027,1.1763A1.1589,1.1589,0,0,1,16.0655,5.2928Zm1.6455,0a.4428.4428,0,1,0-.8856,0,.4428.4428,0,1,0,.8856,0Z"/></svg>',"arrow-down":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polygon points="10.5,16.08 5.63,10.66 6.37,10 10.5,14.58 14.63,10 15.37,10.66"/><line fill="none" stroke="#000" x1="10.5" y1="4" x2="10.5" y2="15"/></svg>',"arrow-left":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" points="10 14 5 9.5 10 5"/><line fill="none" stroke="#000" x1="16" y1="9.5" x2="5" y2="9.52"/></svg>',"arrow-right":'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 12.9998L16.17 12.9998L10.58 18.5898L12 19.9998L20 11.9998L12 3.99976L10.59 5.40976L16.17 10.9998L4 10.9998L4 12.9998Z" fill="#000"/></svg>',"arrow-up":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polygon points="10.5,4 15.37,9.4 14.63,10.08 10.5,5.49 6.37,10.08 5.63,9.4"/><line fill="none" stroke="#000" x1="10.5" y1="16" x2="10.5" y2="5"/></svg>',"bed-4":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M10.0005,19.9432A9.9995,9.9995,0,1,1,20,9.95,9.9937,9.9937,0,0,1,10.0005,19.9432ZM10.0059.4616A9.4839,9.4839,0,1,0,19.4849,9.95,9.478,9.478,0,0,0,10.0059.4616Z" fill="#5b5b5b"/><path d="M3.2572,10.8556h.1181q6.78,0,13.5609.0012a.4623.4623,0,0,1,.1694.0292.2033.2033,0,0,1,.124.1742.5654.5654,0,0,1,.0052.07q0,1.0037,0,2.0075a.2644.2644,0,0,1-.0833.2215.236.236,0,0,1-.2618.04.2387.2387,0,0,1-.147-.2346q-.0006-.5265,0-1.0529v-.7624H3.2572v.0852q0,.8668,0,1.7338a.2462.2462,0,0,1-.21.2509.2413.2413,0,0,1-.2648-.1611.4954.4954,0,0,1-.0163-.1451q-.0018-.67-.0007-1.3407,0-2.5336,0-5.0674A1.1534,1.1534,0,0,1,2.77,6.5857a.2382.2382,0,0,1,.2456-.22.2459.2459,0,0,1,.2414.2352c.0011.021,0,.0421,0,.0632v4.1916Z" fill="#5b5b5b"/><path d="M12.7772,10.4049c-1.3851,0-2.77-.0022-4.1552.0024a.2691.2691,0,0,1-.2988-.3c.0038-1.0669.0017-2.1338.0019-3.2006,0-.1563.0578-.2477.18-.2806a.4049.4049,0,0,1,.104-.0086q3.0462-.0006,6.0923-.0021a3.2166,3.2166,0,0,1,1.1686.1863,1.9647,1.9647,0,0,1,1.33,1.6432,3.1768,3.1768,0,0,1,.033.4325c.0043.4141.0019.8282.0009,1.2424a.4232.4232,0,0,1-.0157.1241.2321.2321,0,0,1-.2374.1605c-.2994.0008-.5989,0-.8984,0Zm3.9658-.4914V9.8292c0-.3135.0026-.6271-.0013-.9406a2.8983,2.8983,0,0,0-.0278-.3769,1.4762,1.4762,0,0,0-.9551-1.225A2.7,2.7,0,0,0,14.71,7.1042q-2.892.0039-5.7841.0013H8.8237v2.808Z" fill="#5b5b5b"/><path d="M11.4932,12.4294v2.848H12.1v.6815h-.6041V17.04H10.681V15.9631H8.33v-.1453c0-.1263.0042-.2528-.0013-.3789a.407.407,0,0,1,.0993-.283q.4918-.6174.98-1.2377c.3511-.4439.7046-.8858,1.0516-1.3328a.3641.3641,0,0,1,.3279-.1584C11.0176,12.4357,11.2491,12.4294,11.4932,12.4294Zm-.8174.9246c-.4933.6551-.9674,1.3041-1.4858,1.92h1.4858Z" fill="#b21818"/><path d="M7.3922,9.8728V9.7712q0-1.4427,0-2.8853a.2467.2467,0,0,1,.3321-.2542.2246.2246,0,0,1,.1549.1907.7076.7076,0,0,1,.0048.091q0,1.58,0,3.159c0,.1569-.0574.2467-.18.28a.2928.2928,0,0,1-.076.0081q-1.7935.0006-3.5872,0a.2453.2453,0,0,1-.2567-.24A.2421.2421,0,0,1,4.04,9.8731q1.6216-.0009,3.2433,0Z" fill="#5b5b5b"/><path d="M5.723,9.364A1.3733,1.3733,0,1,1,7.1018,7.9888,1.37,1.37,0,0,1,5.723,9.364Zm.8863-1.3714a.8883.8883,0,1,0-.8919.8833A.8918.8918,0,0,0,6.6093,7.9926Z" fill="#5b5b5b"/><path d="M10.849,4.8552a.1488.1488,0,0,1-.1354-.094c-.0768-.1547-.157-.3078-.2309-.4639a.2516.2516,0,0,0-.1276-.13c-.1542-.0724-.3049-.1522-.4582-.2266a.1477.1477,0,0,1-.0024-.2794c.1635-.08.3268-.1607.4878-.2458a.2155.2155,0,0,0,.0844-.0852c.0838-.159.1634-.32.2423-.4818a.1555.1555,0,0,1,.1383-.1024.1536.1536,0,0,1,.1449.1028c.0747.1532.1538.3043.2268.4582a.242.242,0,0,0,.1229.1247c.1543.0723.305.1522.4583.2268a.1539.1539,0,0,1,.104.1438.157.157,0,0,1-.1069.1422c-.1532.0747-.3043.1538-.4583.2268a.2356.2356,0,0,0-.1186.12c-.0743.156-.1538.3095-.23.4645A.1549.1549,0,0,1,10.849,4.8552Zm.5884-1.
20543a1.85,1.85,0,0,0-.19-.0946.4763.4763,0,0,1-.3038-.3037,1.8892,1.8892,0,0,0-.0926-.1882c-.0589.117-.1047.2193-.1611.3155a.32.32,0,0,1-.11.11c-.0981.0573-.2024.1043-.3165.1617.11.0553.212.1.3068.1573a.3779.3779,0,0,1,.124.1234c.0569.0942.1012.196.1564.306.0556-.1108.1069-.2074.1527-.3066a.2532.2532,0,0,1,.13-.1292C11.2323,3.9062,11.329,3.8552,11.4374,3.8009Z" fill="#b21818"/><path d="M10.083,4.71a.154.154,0,0,1-.096.14c-.13.064-.2605.1266-.3877.1956a.2346.2346,0,0,0-.089.09c-.0677.1252-.13.2536-.1919.3817a.1466.1466,0,0,1-.2757.0021c-.0631-.1277-.1243-.2564-.1931-.3809a.2637.2637,0,0,0-.1-.098c-.1225-.0676-.2489-.1282-.3747-.19a.1465.1465,0,0,1-.0016-.2753c.1341-.0658.2679-.1322.4-.2018a.1672.1672,0,0,0,.066-.0661c.0684-.13.1335-.262.1983-.394a.1483.1483,0,0,1,.2823-.0015c.0644.1323.13.2641.1983.3943a.1658.1658,0,0,0,.0658.066c.1343.0707.27.138.4065.2052A.1481.1481,0,0,1,10.083,4.71Zm-1.3352.0036a.6135.6135,0,0,1,.4332.4316A.62.62,0,0,1,9.6154,4.71a.61.61,0,0,1-.4371-.4314A.61.61,0,0,1,8.7478,4.7133Z" fill="#b21818"/></svg>',"bed-6":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="19.999" viewBox="0 0 20 19.999"><path d="M10.0006,0A9.9995,9.9995,0,1,1,0,9.9975,9.994,9.994,0,0,1,10.0006,0ZM9.9965,19.4816A9.484,9.484,0,1,0,.5152,9.9952,9.4777,9.4777,0,0,0,9.9965,19.4816Z" fill="#5b5b5b"/><path d="M16.7426,11.4005H3.2569v.0884q0,.8564,0,1.7127a.2425.2425,0,0,1-.27.2666.2286.2286,0,0,1-.2153-.2183c-.0032-.0982-.0011-.1965-.0011-.2948q0-.8108,0-1.6214c0-1.5488.0019-3.0976-.0027-4.6463a.2468.2468,0,0,1,.327-.25.241.241,0,0,1,.1623.2244c.0021.0232,0,.0468,0,.07v4.1776H16.8936c.0328,0,.0656-.0011.0983.0008a.2333.2333,0,0,1,.2375.2487c.0008.3323,0,.6645,0,.9967q0,.5265,0,1.0529a.2343.2343,0,0,1-.2378.2611.2412.2412,0,0,1-.2489-.2613q-.0012-.86,0-1.72Z" fill="#5b5b5b"/><path d="M12.7759,10.4606q-2.078,0-4.1557,0a.4676.4676,0,0,1-.1108-.0115A.2252.2252,0,0,1,8.33,10.22q-.0008-1.6531,0-3.3063a.2291.2291,0,0,1,.2376-.2395c.1077-.0016.2153,0,.3229,0q3.001,0,6.0019.0017a2.61,2.61,0,0,1,1.3993.3892,1.9066,1.9066,0,0,1,.8913,1.3414,3.3022,3.3022,0,0,1,.0447.53c.0062.4187-.0025.837
27.0042,1.2564a.2594.2594,0,0,1-.2723.2693Q14.8677,10.459,12.7759,10.4606ZM16.7426,9.97V9.8873c0-.3112.0027-.6224-.0013-.9335a2.9909,2.9909,0,0,0-.0285-.4048,1.4648,1.4648,0,0,0-.8709-1.1739A2.5382,2.5382,0,0,0,14.7452,7.16q-2.9131.005-5.8262.0015H8.8225V9.97Z" fill="#5b5b5b"/><path d="M11.7645,12.7408l-.2072.5181c-.1279-.0318-.2509-.0666-.3758-.0927a1.9066,1.9066,0,0,0-.91-.0031,1.2035,1.2035,0,0,0-.8742.9254c-.0337.1272-.0483.26-.0753.4094l.181-.0814A2.4325,2.4325,0,0,1,10.6,14.1631a1.3541,1.3541,0,0,1,1.2811.7791,1.5426,1.5426,0,0,1-.6511,2.0009,1.86,1.86,0,0,1-2.1143-.2542,2,2,0,0,1-.5544-1.0362,3.12,3.12,0,0,1,.2177-2.06,1.9739,1.9739,0,0,1,1.4465-1.1521A2.1042,2.1042,0,0,1,11.7645,12.7408Zm-1.4291,3.695c.0187,0,.0375,0,.0562,0a.8016.8016,0,0,0,.7913-.5662,1.2768,1.2768,0,0,0,.0393-.38.6157.6157,0,0,0-.5007-.6187,1.626,1.626,0,0,0-.7709.0079,1.8537,1.8537,0,0,0-.5249.19.2062.2062,0,0,0-.1154.2073c.0078.1.0129.2008.0289.3A.9669.9669,0,0,0,10.3354,16.4358Z" fill="#b21818"/><path d="M7.3918,9.9264v-.1q0-1.425.0009-2.85a.4752.4752,0,0,1,.0215-.1513.2387.2387,0,0,1,.2783-.1478.2322.2322,0,0,1,.1861.2314q.0008,1.6355,0,3.271a.2275.2275,0,0,1-.21.23.5222.5222,0,0,1-.056.0023q-1.7795,0-3.5588,0a.2426.2426,0,0,1-.0777-.478.7439.7439,0,0,1,.1258-.0075q1.5864-.0006,3.1728,0Z" fill="#5b5b5b"/><path d="M7.0977,8.0443A1.3758,1.3758,0,1,1,5.7249,6.6726,1.3652,1.3652,0,0,1,7.0977,8.0443ZM5.7206,7.1612a.886.886,0,1,0,.8909.8839A.8891.8891,0,0,0,5.7206,7.1612Z" fill="#5b5b5b"/><path d="M10.8488,4.9075a.1466.1466,0,0,1-.1355-.0935c-.082-.1678-.1653-.3351-.2515-.5008a.177.177,0,0,0-.071-.0707q-.2454-.1278-.4946-.2484a.1466.1466,0,0,1-.0015-.2781c.1617-.0787.3231-.1582.482-.2423a.2283.2283,0,0,0,.09-.089c.0844-.1587.1637-.32.2427-.4816a.1481.1481,0,0,1,.282.001c.08.1635.1607.327.245.4885a.19.19,0,0,0,.076.0755c.1615.0842.3248.1648.4884.2449a.1488.1488,0,0,1,.0016.2827c-.1637.08-.3269.1609-.488.2456a.2033.2033,0,0,0-.08.08c-.0857.1633-.1675.3287-.2489.4943A.1445.1445,0,0,1,10.8488,4.9075ZM10.2627,3.855c.1093.055.2014.1054.297.1481a.27.27,0,0,1,.143.1445c.0433.0959.0941.1885.1479.2946.0584-.1161.1057-.22.1626-.3187a.3.3,0,0,1,.1047-.1047c.1-.0577.2053-.1058.3209-.164-.1131-.0569-.2173-.1034-.3149-.1609A.3372.3372,0,0,1,11.01,3.58c-.0576-.0974-.1043-.2013-.16-.3125-.056.1114-.1013.2141-.1583.31a.3549.3549,0,0,1-.1184.1191C10.4778,3.7529,10.3755,3.7982,10.2627,3.855Z" fill="#b21818"/><path d="M9.1809,5.6657a.1412.1412,0,0,1-.1368-.0905c-.0644-.1322-.1289-.2643-.1982-.394a.2069.2069,0,0,0-.08-.08c-.13-.0693-.2618-.1339-.3941-.1982A.1467.1467,0,0,1,8.37,4.63c.13-.0642.26-.1266.3876-.1953a.2344.2344,0,0,0,.09-.089c.0679-.125.13-.2534.1922-.3814a.1485.1485,0,0,1,.2793-.0017c.0643.13.127.26.1952.3877a.2063.2063,0,0,0,.08.08c.1275.0684.2576.1317.3875.1955a.1508.1508,0,0,1,.1.1393.1485.1485,0,0,1-.0982.14c-.13.0637-.26.1273-.3875.1956a.2056.2056,0,0,0-.0806.08c-.0694.13-.1325.2624-.1992.3934A.1354.1354,0,0,1,9.1809,5.6657Zm.4228-.8814-.001-.0189a1.184,1.184,0,0,1-.2673-.1566A1.1807,1.1807,0,0,1,9.1789,4.34a1.1753,1.1753,0,0,1-.1564.2709,1.1392,1.1392,0,0,1-.2659.1525l-.0055.0184a.5809.5809,0,0,1,.43.416A.5567.5567,0,0,1,9.6037,4.7843Z" fill="#b21818"/></svg>',"bed-7":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M0,9.9967A10,10,0,1,1,9.9036,20.0014,9.9992,9.9992,0,0,1,0,9.9967Zm19.4829.0049a9.4845,9.4845,0,1,0-9.5758,9.4847A9.4836,9.4836,0,0,0,19.4829,10.0016Z" fill="#5b5b5b"/><path d="M12.7793,10.4633H8.6233c-.2074,0-.2969-.0879-.2969-.2925q0-1.6041,0-3.2082A.2459.2459,0,0,1,8.4,6.7458a.5948.5948,0,0,1,.1559-.0679.1932.1932,0,0,1,.0628-.0014c2.092,0,4.1841-.0041,6.276.0026a2.5013,2.5013,0,0,1,1.6042.5375,1.8973,1.8973,0,0,1,.6857,1.2028,3.6073,3.6073,0,0,1,.0433.5508c.0062.4071.002.8143.0019,1.2215a.2455.2455,0,0,1-.2738.2715Q14.8677,10.4635,12.7793,10.4633Zm-3.9626-3.3c-.0016.0346-.0041.0622-.0041.09q0,1.316,0,2.632c0,.09.0005.0905.0939.0905l2.45,0q2.65,0,5.2992.0014c.07,0,.092-.0166.0906-.0892-.0047-.2456.0016-.4914-.0028-.7369a5.0925,5.0925,0,0,0-.0279-.5733,1.4692,1.4692,0,0,0-.9573-1.2372,2.6282,2.6282,0,0,0-1.02-.1789q-2.9092.005-5.8185.0016Z" fill="#5b5b5b"/><path d="M3.2521,10.9119h.1334l13.5128,0c.035,0,.07-.0013.1052.0016a.2341.2341,0,0,1,.2265.2454q0,1.0318,0,2.0637a.2428.2428,0,1,1-.4854.0054c-.0019-.3323-.0007-.6645-.0007-.9968q0-.372,0-.7441V11.404c-.0351-.0022-.0646-.0058-.0941-.0058q-6.6546,0-13.3
2091-.0017c-.0708,0-.09.02-.09.09.0028.5662.002,1.1325.0009,1.6987a.4245.4245,0,0,1-.0176.1376.2417.2417,0,0,1-.4634-.0587.7454.7454,0,0,1-.0042-.091q0-.6879,0-1.3758,0-2.5269,0-5.0538a.9422.9422,0,0,1,.0037-.105.2417.2417,0,0,1,.4808.0073c.0024.0279.0013.0561.0013.0842v4.1818Z" fill="#5b5b5b"/><path d="M10.1659,17.089H9.3238c.0136-.1636.0235-.3237.0406-.483a3.5635,3.5635,0,0,1,.4639-1.3714c.3586-.6379.7322-1.2669,1.1485-1.87.0382-.0553.078-.1094.1274-.1787h-.0933q-1.19,0-2.38.0014c-.0659,0-.0886-.0145-.087-.084.0046-.2054.0016-.411.0016-.6217h3.46a.42.42,0,0,1,.0067.0516c.0009.0632-.0057.127.0015.1894a.9307.9307,0,0,1-.1732.6181q-.5571.892-1.09,1.7992a3.85,3.85,0,0,0-.5036,1.3149c-.0321.191-.05.3845-.074.5768Z" fill="#b21818"/><path d="M7.3935,9.929V9.8279q0-1.4457,0-2.8914a.2412.2412,0,0,1,.1407-.2389.2165.2165,0,0,1,.2552.033.5446.5446,0,0,1,.089.1667.1847.1847,0,0,1,.0024.07c0,1.0527-.0025,2.1054.0025,3.1581a.2655.2655,0,0,1-.2909.2922c-1.179-.0043-2.358-.002-3.537-.0023a.2419.2419,0,0,1-.27-.2529.2381.2381,0,0,1,.2084-.2277.853.853,0,0,1,.1049-.005q1.593,0,3.1862,0Z" fill="#5b5b5b"/><path d="M7.0944,8.0474a1.3742,1.3742,0,1,1-2.7484-.014,1.3742,1.3742,0,0,1,2.7484.014Zm-.4872.0037a.8877.8877,0,0,0-1.7753-.0037.8877.8877,0,0,0,1.7753.0037Z" fill="#5b5b5b"/><path d="M10.8328,4.91c-.0527.0011-.0939-.0384-.1231-.0974-.0808-.1632-.16-.327-.2454-.4881A.2148.2148,0,0,0,10.379,4.24c-.159-.0839-.32-.1638-.4817-.2425a.1481.1481,0,0,1,.0016-.2822c.1593-.0781.3189-.1559.4754-.2394a.2408.2408,0,0,0,.0935-.0948c.0834-.1566.1608-.3163.24-.4753a.1489.1489,0,0,1,.2829-.0014c.0805.1634.1609.3268.2455.488a.2032.2032,0,0,0,.08.08c.1592.0835.32.1634.4823.2417A.149.149,0,0,1,11.797,4c-.1578.0759-.3152.1531-.4695.2359a.2546.2546,0,0,0-.0982.0995c-.0849.1584-.1635.32-.2431.4814A.1527.1527,0,0,1,10.8328,4.91Zm-.5722-1.0527c.1121.0561.2089.1074.3083.1531a.2526.2526,0,0,1,.1293.13c.0458.0984.0965.1945.1511.3034.057-.1137.1025-.2163.1592-.3122a.3378.3378,0,0,1,.1146-.1143c.0971-.0572.2007-.1033.3148-.1606-.1173-.0587-.2232-.107-.3239-.1644a.2816.2816,0,0,1-.1-.1c-.0576-.1006-.1063-.2064-.1643-.3215-.0564.1119-.1034.2159-.1607.314a.3163.3163,0,0,1-.1093.11C10.4813,3.7521,10.377,3.7988,10.2606,3.8572Z" fill="#b21818"/><path d="M9.1811,5.668a.14.14,0,0,1-.1376-.0894c-.0632-.1275-.13-.2535-.19-.3824a.2051.2051,0,0,0-.1057-.104c-.1181-.056-.2337-.1172-.3515-.1738-.0645-.031-.1184-.0688-.1193-.1484s.051-.1191.1161-.15c.12-.0577.24-.1152.3563-.1795a.2674.2674,0,0,0,.0994-.0984c.0657-.1183.1236-.2409.1833-.3624.03-.0618.0668-.1115.1453-.112a.1556.1556,0,0,1,.1467.1094c.0612.126.1224.2521.1885.3755a.207.207,0,0,0,.08.08c.1212.0652.245.1257.369.1857.0641.0311.1185.0674.1193.1481s-.0512.1187-.1162.15c-.122.0587-.2442.1176-.3627.1828a.25.25,0,0,0-.0936.0947c-.0692.127-.132.2575-.1958.3874A.138.138,0,0,1,9.1811,5.668Zm.4426-.8913a1.3064,1.3064,0,0,1-.29-.1656,1.1668,1.1668,0,0,1-.1547-.27,1.1957,1.1957,0,0,1-.1569.2715,1.3,1.3,0,0,1-.2864.1646A.6022.6022,0,0,1,9.183,5.2.575.575,0,0,1,9.6237,4.7767Z" fill="#b21818"/></svg>',"bunk-bed":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M0,10A10,10,0,1,1,9.9,20.0014,9.9991,9.9991,0,0,1,0,10Zm2.7278,6.0966.0243-.0045V12.2274c0-.0281-.0009-.0562.0008-.0842a.2411.2411,0,0,1,.48-.0139,1.022,1.022,0,0,1,.0047.1121q0,2.0146.0005,4.03c0,.15-.0188.1308.13.1308q6.7148.0006,13.4294,0a.4322.4322,0,0,1,.105.0019c.0709.0181.1112-.0175.1541-.0655a9.557,9.557,0,0,0,1.4722-2.1864,9.39,9.39,0,0,0,.9491-3.7758A9.46,9.46,0,0,0,16.494,3.0948,9.3193,9.3193,0,0,0,9.7369.5219a8.9867,8.9867,0,0,0-2.03.2731,9.47,9.47,0,0,0-4.3978,2.48.2257.2257,0,0,0-.0722.1781q.0025,2.0182.0015,4.0366c0,.1389-.0161.1225.1243.1225q6.7182,0,13.4364,0c.0444,0,.0889.001.1331.005a.2337.2337,0,0,1,.2136.19A.237.237,0,0,1,17,8.0805a.4443.4443,0,0,1-.1446.0171q-6.8938.001-13.7875.0007c-.03,0-.0609.0012-.0912-.0008a.2313.2313,0,0,1-.2237-.2262c-.0015-.0257-.0006-.0515-.0006-.0772V3.9091l-.0258-.0045a9.5141,9.5141,0,0,0,.0015,12.192Zm13.7638.7972H3.4836A9.4819,9.4819,0,0,0,12.6805,19.1,9.14,9.14,0,0,0,16.4916,16.8938Z" fill="#5b5b5b"/><path d="M12.7574,15.9534H8.5953a.2559.2559,0,0,1-.2889-.2891q-.0006-1.6074-.0007-3.2146a.2628.2628,0,0,1,.2861-.2851c2.0892.0031,4.1784-.0012,6.2676.0041a2.5474,2.5474,0,0,1,1.58.5044,1.8932,1.8932,0,0,1,.7319,1.2583,4.2142,4.2142,0,0,1,.0426.586c.0063.3836.0019.7673.0018,1.151a.25.25,0,0,1-.2827.285Zm-3.964-3.3V15.36c0,.1063,0,.1064.1065.1064h7.7276c.0164,0,.0328-.001.0491,0,.0386.0026.0546-.0136.0538-.0533-.0018-.0865.0012-.1731-.0008-.26-.0086-.3644.0028-.7308
2-.0332-1.0925a1.39,1.39,0,0,0-.5946-1.03,2.0886,2.0886,0,0,0-1.2341-.3746c-1.9957-.0051-3.9913-.0022-5.987-.0022Z" fill="#5b5b5b"/><path d="M12.7655,7.1637H8.5965a.2548.2548,0,0,1-.29-.2872q-.0006-1.6073,0-3.2145a.2517.2517,0,0,1,.2842-.285q3.13,0,6.2605.0011a2.7034,2.7034,0,0,1,1.3124.3252,1.9193,1.9193,0,0,1,1.0076,1.4308,3.6074,3.6074,0,0,1,.0431.5509c.0062.4023.0021.8047.0019,1.2071a.2454.2454,0,0,1-.2745.2715Zm-3.9721-3.3V6.57c0,.1061,0,.1062.1067.1062h7.7274c.014,0,.0281-.0012.0421,0,.045.0044.0624-.014.0611-.06-.0027-.0935.0011-.1871-.0011-.2807-.0085-.355.003-.7121-.0331-1.0643a1.3953,1.3953,0,0,0-.6123-1.0423,2.1345,2.1345,0,0,0-1.2382-.3633Q11.8667,3.86,8.8873,3.864Z" fill="#5b5b5b"/><path d="M5.8174,7.1216q-.8847,0-1.7692,0A.2489.2489,0,0,1,3.77,6.88a.2335.2335,0,0,1,.24-.2456c.3486-.0011.6973,0,1.046,0q1.1057,0,2.2114,0c.128,0,.1111.0081.1111-.1145q.0006-1.4426,0-2.8853a.2439.2439,0,0,1,.334-.2418.239.239,0,0,1,.152.2371q0,1.3444,0,2.6888,0,.2633,0,.5266a.2491.2491,0,0,1-.2782.2762q-.674.0007-1.3479,0Z" fill="#5b5b5b"/><path d="M7.3785,15.4191v-.1033q0-1.4455,0-2.8913a.2436.2436,0,0,1,.3394-.2405.24.24,0,0,1,.1465.2339q0,1.014,0,2.0281,0,.6,0,1.2a.2357.2357,0,0,1-.2554.2587q-1.7931.0009-3.5861,0a.2417.2417,0,1,1-.016-.483c.03-.0026.0607-.0026.0911-.0026l3.158,0Z" fill="#5b5b5b"/><path d="M7.08,4.7541A1.3753,1.3753,0,1,1,5.7067,3.3769,1.374,1.374,0,0,1,7.08,4.7541Zm-.4871-.006a.8882.8882,0,1,0-.8884.8893A.8878.8878,0,0,0,6.5932,4.7481Z" fill="#5b5b5b"/><path d="M7.08,13.5427a1.3753,1.3753,0,1,1-1.367-1.3761A1.3751,1.3751,0,0,1,7.08,13.5427Zm-1.3712-.8889a.8866.8866,0,1,0,.8841.89A.8869.8869,0,0,0,5.7091,12.6538Z" fill="#5b5b5b"/><path d="M9.7068,9.7073a.1435.1435,0,0,1,.0927-.14c.1652-.0821.3308-.1635.494-.2494a.2017.2017,0,0,0,.08-.08c.0837-.1591.1634-.32.2424-.4816a.15.15,0,0,1,.2857.0017c.0786.1616.1585.3227.2422.4817a.2034.2034,0,0,0,.0809.08c.1612.0847.3244.1655.4878.2458a.1482.1482,0,0,1,.0014.2795c-.1611.08-.3229.1584-.4818.2423a.2284.2284,0,0,0-.09.0887c-.0842.1587-.1631.32-.2423.4816a.1481.1481,0,0,1-.2821-.0015c-.0785-.1618-.1583-.323-.2422-.4819a.2151.2151,0,0,0-.0853-.0844c-.1611-.0847-.3251-.1641-.488-.2454A.1391.1391,0,0,1,9.7068,9.7073Zm1.0513.585a2.3291,2.3291,0,0,0,.1031-.209.4341.4341,0,0,1,.27-.2718,2.2124,2.2124,0,0,0,.2154-.1065c-.1036-.0518-.1917-.1-.2831-.14a.2968.2968,0,0,1-.1631-.1623c-.04-.0928-.09-.1814-.1417-.2853-.056.1112-.1069.2051-.151.3021a.2588.2588,0,0,1-.1345.1343c-.0978.0452-.1929.0962-.3018.1511.1158.0581.22.1053.3182.1621a.3.3,0,0,1,.105.1051C10.6519,10.07,10.6991,10.1745,10.7581,10.2923Z" fill="#b21818"/><path d="M9.9889,10.6136a.143.143,0,0,1-.09.1372c-.134.0659-.2681.1319-.4.2021a.1925.1925,0,0,0-.0753.0755c-.069.13-.1335.262-.1983.394a.146.146,0,0,1-.1345.0952.1481.1481,0,0,1-.14-.0972c-.0647-.1321-.1293-.2643-.1983-.3942a.193.193,0,0,0-.0759-.0751c-.13-.069-.2619-.1339-.394-.1984a.1446.1446,0,0,1-.0947-.1344.1465.1465,0,0,1,.0959-.1411c.1174-.0573.2322-.12.3513-.1739a.2662.2662,0,0,0,.142-.1434c.0517-.1149.1127-.2256.1674-.3391a.1507.1507,0,0,1,.2891.0021c.0579.12.12.2373.1774.3574a.2141.2141,0,0,0,.1087.1106c.127.059.2508.1246.3761.1871A.1441.1441,0,0,1,9.9889,10.6136Zm-.91.4457a1.2831,1.2831,0,0,1,.1638-.2862,1.3439,1.3439,0,0,1,.29-.1675.5867.5867,0,0,1-.4451-.4189.6287.6287,0,0,1-.4309.431A.5792.5792,0,0,1,9.0791,11.0593Z" fill="#b21818"/></svg>',"check-big":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 21.56L6.43996 16L4.54663 17.88L12 25.3333L28 9.33334L26.12 7.45334L12 21.56Z" fill="#000"/></svg>',check:'<svg width="29" height="28" viewBox="0 0 29 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.0002 18.865L6.13518 14L4.47852 15.645L11.0002 22.1667L25.0002 8.16667L23.3552 6.52167L11.0002 18.865Z" fill="#000"/></svg>',"chevron-down":'<svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.12 12.9594L16 19.066L9.88 12.9594L8 14.8394L16 22.8394L24 14.8394L22.12 12.9594Z" fill="#000"/></svg>',"chevron-left":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.2133 22.12L13.1066 16L19.2133 9.88L17.3333 8L9.33331 16L17.3333 24L19.2133 22.12Z" fill="#000"/></svg>',"chevron-right":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.3333 8L11.4533 9.88L17.56 16L11.4533 22.12L13.3333 24L21.3333 16L13.3333 8Z" fill="#000"/></svg>',"chevron-up":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.03" points="4 13 10 7 16 13"/></svg>',close:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 7.20857L16.7914 6L12 10.7914L7.20857 6L6 7.20857L10.7914 12L6 16.7914L7.20857 18L12 13.2086L16.7914 18L18 16.7914L13.2086 12L18 7.20857Z" fill="#000"/></svg>',configuration:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 20 20" style="enable-background:new 0 0 20 20" xml:space="preserve"><rect x="8.5" y="5.2" width="9.4" height=".4"/><rect x="2" y="10.3" width="9.4" height=".4"/><rect x="14" y="15.5" width="4" height=".4"/><path d="M6.1,7c0.8,0,1.5-0.7,1.5-1.5S6.9,3.9,6.1,3.9c-0.8,0-1.4,0.6-1.5,1.3H2v0.4h2.6C4.7,6.4,5.3,7,6.1,7z M6.1,4.3 c0.6,0,1.1,0.5,1.1,1.1S6.7,6.6,6.1,6.6c-0.6,0-1.1-0.5-1.1-1.1C4.9,4.8,5.4,4.3,6.1,4.3z"/><path d="M11.7,14.1c-0.8,0-1.4,0.6-1.5,1.3H2v0.4h8.2c0.1,0.8,0.9,1.4,1.7,1.3c0.8-0.1,1.4-0.9,1.3-1.7 C13.1,14.7,12.4,14.1,11.7,14.1z M11.7,16.8c-0.6,0-1.1-0.5-1.1-1.1c0-0.6,0.5-1.1,1.1-1.1c0.6,0,1.1,0.5,1.1,1.1 C12.8,16.3,12.3,16.8,11.7,16.8z"/><path d="M13.6,12.1c-0.8,0-1.5-0.7-1.5-1.5S12.7,9,13.5,9c0.8,0,1.4,0.6,1.5,1.3h2.9v0.4h-2.9C15,11.5,14.3,12.1,13.6,12.1z M13.6,9.4c-0.6,0-1.1,0.5-1.1,1.1c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1C14.7,9.9,14.2,9.4,13.6,9.4z"/></svg>',"country-switch":'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.99 2C6.47 2 2 6.48 2 12C2 17.52 6.47 22 11.99 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 11.99 2ZM18.92 8H15.97C15.65 6.75 15.19 5.55 14.59 4.44C16.43 5.07 17.96 6.35 18.92 8ZM12 4.04C12.83 5.24 13.48 6.57 13.91 8H10.09C10.52 6.57 11.17 5.24 12 4.04ZM4.26 14C4.1 13.36 4 12.69 4 12C4 11.31 4.1 10.64 4.26 10H7.64C7.56 10.66 7.5 11.32 7.5 12C7.5 12.68 7.56 13.34 7.64 14H4.26ZM5.08 16H8.03C8.35 17.25 8.81 18.45 9.41 19.56C7.57 18.93 6.04 17.66 5.08 16ZM8.03 8H5.08C6.04 6.34 7.57 5.07 9.41 4.44C8.81 5.55 8.35 6.75 8.03 8ZM12 19.96C11.17 18.76 10.52 17.43 10.09 16H13.91C13.48 17.43 12.83 18.76 12 19.96ZM14.34 14H9.66C9.57 13.34 9.5 12.68 9.5 12C9.5 11.32 9.57 10.65 9.66 10H14.34C14.43 10.65 14.5 11.32 14.5 12C14.5 12.68 14.43 13.34 14.34 14ZM14.59 19.56C15.19 18.45 15.65 17.25 15.97 16H18.92C17.96 17.65 16.43 18.93 14.59 19.56ZM16.36 14C16.44 13.34 16.5 12.68 16.5 12C16.5 11.32 16.44 10.66 16.36 10H19.74C19.9 10.64 20 11.31 20 12C20 12.69 19.9 13.36 19.74 14H16.36Z" fill="#000"/></svg>',"dealer-search":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M8.415,6.8848A1.5376,1.5376,0,1,0,9.9521,5.3467,1.5392,1.5392,0,0,0,8.415,6.8848Zm2.6748,0A1.1372,1.1372,0,1,1,9.9521,5.7471,1.139,1.139,0,0,1,11.09,6.8848Z"/><path d="M9.9521,1.5063A5.2851,5.2851,0,0,0,4.6729,6.7856c0,2.8248,4.76,10.8873,4.8076,10.9683a.5493.5493,0,0,0,.9443,0c.02-.0342.88-1.4936,1.8661-3.3755l-.3445-.1988c-.735,1.4087-1.438,2.6523-1.8653,3.3692a.1483.1483,0,0,1-.2569,0c-1.2324-2.0674-4.751-8.4829-4.751-10.7632a4.879,4.879,0,0,1,9.7579,0c0,1.2447-1.0477,3.7179-2.1991,6.0455l.3463.2c1.1493-2.3128,2.2531-4.8845,2.2531-6.2455A5.2851,5.2851,0,0,0,9.9521,1.5063Z"/></svg>',dots:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.20001 10.4C6.32001 10.4 5.60001 11.12 5.60001 12C5.60001 12.88 6.32001 13.6 7.20001 13.6C8.08001 13.6 8.80001 12.88 8.80001 12C8.80001 11.12 8.08001 10.4 7.20001 10.4ZM16.8 10.4C15.92 10.4 15.2 11.12 15.2 12C15.2 12.88 15.92 13.6 16.8 13.6C17.68 13.6 18.4 12.88 18.4 12C18.4 11.12 17.68 10.4 16.8 10.4ZM12 10.4C11.12 10.4 10.4 11.12 10.4 12C10.4 12.88 11.12 13.6 12 13.6C12.88 13.6 13.6 12.88 13.6 12C13.6 11.12 12.88 10.4 12 10.4Z" fill="#000"/></svg>',download:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 9H15V3H9V9H5L12 16L19 9ZM5 18V20H19V18H5Z" fill="#000"/></svg>',facebook:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
2<path d="M20,10.1215A10,10,0,1,0,8.4375,20V13.0122H5.8984V10.1215H8.4375V7.9184a3.5288,3.5288,0,0,1,3.7771-3.8906,15.3791,15.3791,0,0,1,2.2385.1953V6.684h-1.261a1.4453,1.4453,0,0,0-1.63,1.5617v1.8758h2.7734l-.4433,2.8907h-2.33V20A10.0024,10.0024,0,0,0,20,10.1215Z"/></svg>',"free-on-tour":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M8.9917,13.732c1.7656-.643,5.0992-1.0932,11.0083.2861V11.2973l-1.5593-1.1184-.7487.6987L12.7839,9.1725,10.06,10.56,7.4305,9.6838,0,12.6257v1.6527A15.4512,15.4512,0,0,1,8.9917,13.732Z"/><path d="M7.4221,9.38l2.6147.8717,2.7259-1.3885,4.8605,1.6884.7938-.741L20,10.9463V5.5189A5.5189,5.5189,0,0,0,14.4811,0H5.5188A5.5189,5.5189,0,0,0,0,5.5189v6.8Zm6.002-6.1a2.9714,2.9714,0,0,1,.55.1992,1.7264,1.7264,0,0,1,.7745.6607,2.523,2.523,0,0,1,.82-.4614,3.4865,3.4865,0,0,1,.54-.1378,3.1959,3.1959,0,0,1,.55-.0447,7.4783,7.4783,0,0,0-1.0065.3854,2.8671,2.8671,0,0,0-.8431.5852l-.1566.1677L14.57,4.4174a1.1609,1.1609,0,0,0-.2795-.4131,2.2667,2.2667,0,0,0-.4247-.3276,6.416,6.416,0,0,0-1.0127-.489A3.28,3.28,0,0,1,13.4241,3.28Z"/><path d="M9.4013,13.8942c.1554.01.3478.0268.585.0509,1.9051.1938,5.554,1.2917,5.554,2.0344s-3.2614,1.1624-4.4884,1.1947.9221,1.0839,1.3239,1.3239c.4637.2771,1.7737.9738,2.71,1.4672A5.5183,5.5183,0,0,0,20,14.4812V14.31C14.4526,13.0067,11.2075,13.3234,9.4013,13.8942Z"/><path d="M7.7259,16.9482C7.5733,15.6232,9.6552,15.88,9.6552,15.88s3.205.1963,3.7862-.2557-4.3879-1.5738-4.3879-1.5738-.0355-.011-.08-.0273l-.0156-.0044a15.17,15.17,0,0,0-8.9533.5617A5.5162,5.5162,0,0,0,5.5188,20h4.5249C9.2,19.3378,7.8605,18.117,7.7259,16.9482Z"/></svg>',"handwriting-curve":'<svg data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M18.5522,12.8735c-3.0659-.4956-5.545-.7646-8.5278-1.4351C6.113,10.5591,3.146,8.377,1.7226,4.6A29.6893,29.6893,0,0,1,.6885,1.4564C.5635.9574.7132.5619.94.4992a.711.711,0,0,1,.8239.5763C2.15,2.1524,2.4045,3.156,2.8247,4.2186c1.471,3.72,4.3246,5.3718,8.1639,6.1093,2.6937.5174,4.9671.9691,7.7285,1.2382.4883.0419.8084.2312.8227.6572C19.5538,12.6418,19.2953,12.9957,18.5522,12.8735Z"/></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.9837.0615a9.8891,9.8891,0,1,0,9.8892,9.8891A9.8891,9.8891,0,0,0,9.9837.0615Zm1.161,15.1939H8.8036V7.43h2.3411Zm0-8.98H8.8036V4.03h1.7953c.4178,0,.5458.1443.5458.4975Z"/></svg>',instagram:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M13.55,1H6.46C3.45,1,1,3.44,1,6.44v7.12c0,3,2.45,5.44,5.46,5.44h7.08c3.02,0,5.46-2.44,5.46-5.44V6.44 C19.01,3.44,16.56,1,13.55,1z M17.5,14c0,1.93-1.57,3.5-3.5,3.5H6c-1.93,0-3.5-1.57-3.5-3.5V6c0-1.93,1.57-3.5,3.5-3.5h8 c1.93,0,3.5,1.57,3.5,3.5V14z"/><circle cx="14.87" cy="5.26" r="1.09"/><path d="M10.03,5.45c-2.55,0-4.63,2.06-4.63,4.6c0,2.55,2.07,4.61,4.63,4.61c2.56,0,4.63-2.061,4.63-4.61 C14.65,7.51,12.58,5.45,10.03,5.45L10.03,5.45L10.03,5.45z M10.08,13c-1.66,0-3-1.34-3-2.99c0-1.65,1.34-2.99,3-2.99s3,1.34,3,2.99 C13.08,11.66,11.74,13,10.08,13L10.08,13L10.08,13z"/></svg>',"language-switch":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="19.999" viewBox="0 0 20 19.999"><defs><clipPath id="a"><rect x="25" y="9.501" width="15" height="1" fill="none"/></clipPath></defs><g clip-path="url(#a)"><rect x="19.231" y="7.001" width="26.538" height="6"/></g><path d="M6.6029,18.1981h0a1.004,1.004,0,0,1-.8928-.5412L4.8116,15.97a.7194.7194,0,0,0-.6435-.3857H1.5942a1.6,1.6,0,0,1-1.1273-.4637A1.5781,1.5781,0,0,1,0,14.0012V7.4151H.87v6.5861a.7278.7278,0,0,0,.7246.72H4.1681a1.59,1.59,0,0,1,1.4145.8463l.887,1.6868a.1411.1411,0,0,0,.255,0l.887-1.6868a1.59,1.59,0,0,1,1.4145-.8463h9.38a.7278.7278,0,0,0,.7246-.72V3.3851a.7221.7221,0,0,0-.7246-.72H1.5942a.7221.7221,0,0,0-.7246.72V5.2619H0V3.3851A1.5887,1.5887,0,0,1,1.5942,1.8019H18.4058A1.5887,1.5887,0,0,1,20,3.3851V14.0012a1.5888,1.5888,0,0,1-1.5942,1.5832H9.0319a.7194.7194,0,0,0-.6435.3857l-.8927,1.6868A1.004,1.004,0,0,1,6.6029,18.1981Z"/></svg>',linkedin:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.77,17.89 L5.77,7.17 L2.21,7.17 L2.21,17.89 L5.77,17.89 L5.77,17.89 Z M3.99,5.71 C5.23,5.71 6.01,4.89 6.01,3.86 C5.99,2.8 5.24,2 4.02,2 C2.8,2 2,2.8 2,3.85 C2,4.88 2.77,5.7 3.97,5.7 L3.99,5.7 L3.99,5.71 L3.99,5.71 Z"/><path d="M7.75,17.89 L11.31,17.89 L11.31,11.9 C11.31,11.58 11.33,11.26 11.43,11.03 C11.69,10.39 12.27,9.73 13.26,9.73 C14.55,9.73 15.06,10.71 15.06,12.15 L15.06,17.89 L18.62,17.89 L18.62,11.74 C18.62,8.45 16.86,6.92 14.52,6.92 C12.6,6.92 11.75,7.99 11.28,8.73 L11.3,8.73 L11.3,7.17 L7.75,7.17 C7.79,8.17 7.75,17.89 7.75,17.89 L7.75,17.89 L7.75,17.89 Z"/></svg>',location:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#000" stroke-width="1.01" d="M10,0.5 C6.41,0.5 3.5,3.39 3.5,6.98 C3.5,11.83 10,19 10,19 C10,
219 16.5,11.83 16.5,6.98 C16.5,3.39 13.59,0.5 10,0.5 L10,0.5 Z"/><circle fill="none" stroke="#000" cx="10" cy="6.8" r="2.3"/></svg>',mail:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" points="1.4,6.5 10,11 18.6,6.5"/><path d="M 1,4 1,16 19,16 19,4 1,4 Z M 18,15 2,15 2,5 18,5 18,15 Z"/></svg>',menu:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z" fill="#000"/></svg>',minus:'<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63.3332 43.3332H16.6665V36.6665H63.3332V43.3332Z" fill="#000"/></svg>',"play-circle":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polygon fill="none" stroke="#000" stroke-width="1.1" points="8.5 7 13.5 10 8.5 13"/><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"/></svg>',"plus-red":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><defs><style>.cls-1{fill:none;stroke:#b71c1a;stroke-linejoin:round}</style></defs><g id="Rot"><line class="cls-1" x1="10" y1="5" x2="10" y2="15"/><line class="cls-1" x1="15" y1="10" x2="5" y2="10"/></g><path d="M10,20A10,10,0,1,1,20,10h0A10,10,0,0,1,10,20ZM10,.52A9.49,9.49,0,1,0,19.48,10v0h0A9.47,9.47,0,0,0,10,.52Z" style="fill:#5b5b5b"/></svg>',plus:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="1" width="1" height="17"/><rect x="1" y="9" width="17" height="1"/></svg>',"question-mark":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M10.1387,0A10.001,10.001,0,1,0,20,10.0906,9.9991,9.9991,0,0,0,10.1387,0Zm1.1884,16.42H8.6982V13.9717h2.1973c.3232,0,.4316.126.4316.414Zm-.1435-5.0234-.3242,1.458H9.0947l-.2158-1.332a4.2737,4.2737,0,0,1-.0723-.6123c0-.3956.1621-.6123.6661-.9l.6484-.378c1.3682-.792,1.8359-1.17,1.8359-1.8007,0-.6836-.54-1.0977-1.5478-1.0977a7.2824,7.2824,0,0,0-2.2149.4678l-1.1162.3965L6.1592,6.0488a7.0458,7.0458,0,0,1,4.4121-1.7461c2.2148,0,4.123,1.2061,4.123,3.4571C14.6943,9.542,13.416,10.748,11.1836,11.3965Z"/></svg>',"raise-bed":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20.002" viewBox="0 0 20 20.002"><path d="M0,9.9974A10,10,0,1,1,9.9043,20.0015,9.9993,9.9993,0,0,1,0,9.9974Zm19.4829.0061a9.4845,9.4845,0,1,0-9.5706,9.4829A9.4836,9.4836,0,0,0,19.4829,10.0035Z" fill="#5b5b5b"/><path d="M13.0075,11.5474H8.8455c-.2033,0-.2875-.0852-.2875-.2906v-3.2a.2574.2574,0,0,1,.2957-.2957c2.08,0,4.16-.0038,6.2394.0027a2.6619,2.6619,0,0,1,1.4338.395,1.9,1.9,0,0,1,.8823,1.3086,3.7477,3.7477,0,0,1,.0562.6126c.0086.3882.0025.7767.0025,1.1651,0,.2174-.0842.3028-.2984.3028Zm-3.9633-.4913h7.9365V10.97c0-.2925.0046-.5851-.0017-.8775a3.37,3.37,0,0,0-.0409-.495,1.45,1.45,0,0,0-.7653-1.0811A2.2671,2.2671,0,0,0,15.081,8.25q-2.973-.0068-5.9459-.002c-.0908,0-.0909,0-.0909.0927v2.7156Z" fill="#5b5b5b"/><path d="M3.4839,12.001H17.1255a.2466.2466,0,0,1,.266.1811.24.24,0,0,1-.2161.304c-.0326.0021-.0655.002-.0982.002q-6.876,0-13.7519,0a.9644.9644,0,0,1-.1262-.0036.2432.2432,0,0,1-.2-.2223c-.0019-.0256-.0012-.0515-.0012-.0772q0-2.1833,0-4.3664a.5528.5528,0,0,1,.0049-.1047.2377.2377,0,0,1,.2649-.1968.2321.2321,0,0,1,.2161.2473q0,2.0639,0,4.1277Z" fill="#5b5b5b"/><path d="M8.8882,14.5016h2.2161v1.4717h.8649L9.9959,17.9466,8.027,15.9777h.8612Z" fill="#b21818"/><path d="M8.8954,4.3992H8.0308L10.0042,2.426l1.972,1.972h-.869V5.8712H8.8954Z" fill="#b21818"/><path d="M7.6294,11.0181v-.1043q0-1.4426,0-2.8851a.24.24,0,0,1,.1676-.2538.2451.2451,0,0,1,.319.2221c.0014.0186,0,.0374,0,.0561V11.219a.2485.2485,0,0,1-.2811.2862q-1.7726,0-3.545,0a.2443.2443,0,1,1-.0454-.4865c.0232-.0018.0467,0,.07,0H7.6294Z" fill="#5b5b5b"/><path d="M4.5775,9.1342A1.3766,1.3766,0,1,1,5.9406,10.51,1.3788,1.3788,0,0,1,4.5775,9.1342Zm1.3713.887a.8856.8856,0,1,0-.8843-.8842A.8918.8918,0,0,0,5.9488,10.0212Z" fill="#5b5b5b"/><path d="M6.18,3.2064a.15.15,0,0,1,.1488.0952c.0809.1632.1609.3269.2457.488a.2148.2148,0,0,0,.0843.0853c.1568.0829.3161.1613.4757.239a.15.15,0,0,1,.0023.2888c-.1553.0757-.3081.1565-.4642.2305a.2165.2165,0,0,0-.1089.11c-.0737.1536-.1524.3049-.2272.4579a.16.16,0,0,1-.1466.1113c-.0768,0-.1153-.0491-.146-.1117-.0791-.1614-.1588-.3226-.2418-.4821a.177.177,0,0,0-.0713-.07c-.1614-.0842-.3244-.1656-.488-.2455A.16.16,0,0,1,5.1356,4.26a.1555.1555,0,0,1,.1046-.144c.1635-.08.3267-.1612.488-.2457a.1893.1893,0,0,0,.0753-.0755c.0854-.1634.1668-.329.2488-.4942A.1434.1434,0,0,1,6.18,3.2064Zm.6,1.0525A2.145,2.145,0,0,0,6.575,4.158.45.45,0,0,1,6.29,3.8729a1.91,1.91,0,0,0-.1-.1989c-.0435.086-.0862.1564-.1157.232a.3872.3872,0,0,1-.2327.2346c-.0771.03-.1488.0735-.2374.1183.1121.0566.2141.1018.309.1586a.3575.3575,0,0,1,.12.1191c.0569.0954.102.198.1577.3092.0526-.1045.103-.1964.1455-.2919a.2764.2764,0,0,1,.1489-.1482C6.58,4.3632,6.6715,4.3133,6.78,4.2589Z" fill="#b21818"/><path d="M4.517,6.072a.1482.1482,0,0,1-.1343-.0949C4.3193,5.85,4.2583,5.7206,4.19,5.596A.2642.2642,0,0,0,4.09,5.4976c-.1206-.0664-.2452-.1255-.3689-.186a.1484.1484,0,0,1-.0019-.2822c.13-.0632.26-.127.3878-.1949a.1933.1933,0,0,0,.0757-.0757c.069-.13.134-.2618.1983-.3941a.15.15,0,0,1,.1411-.0972.1478.1478,0,0,1,.1348.0956c.0638.1325.1292.2643.1982.3941A.1915.1915,0,0,0,4.93,4.833c.1257.0669.2539.1291.3819.1916a.1507.1507,0,0,1,.0023.2892c-.1261.0609-.2522.1222-.3751.1891a.2358.2358,0,0,0-.0892.09c-.0689.1272-.1318.2577-.1955.3876A.1455.1455,0,0,1,4.517,6.072Zm.4347-.902a.6192.6192,0,0,1-.4323-.4326.5878.5878,0,0,1-.4448.424,1.2686,1.2686,0,0,1,.2869.162,1.3271,1.3271,0,0,1,.1682.2889A.5857.5857,0,0,1,4.9517,5.17Z" fill="#b21818"/></svg>',"remote-key":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M10.1909,19.4723a9.9725,9.9725,0,0,1-1.8182-.14A9.2807,9.2807,0,0,1,5.7168,18.45a9.4135,9.4135,0,0,1-3.67-3.3018A9.4665,9.4665,0,0,1,3.2706,3.3251,9.4763,9.4763,0,0,1,11.1764.5925a9.5588,9.5588,0,0,1,2.008.4768,9.4163,9.4163,0,0,1,2.3616,1.244.2721.2721,0,0,0,.2243.06.2436.2436,0,0,0,.2021-.1933.2663.2663,0,0,0-.1232-.2922A9.9234,9.9234,0,0,0,10.8726.0371,10.0414,10.0414,0,0,0,9.2192.0311,9.5246,9.5246,0,0,0,7.5831.2932,10.0147,10.0147,0,0,0,.0122,9.5573a9.61,9.61,0,0,0,.1544,2.2593,9.9985,9.9985,0,0,0,4.298,6.5046,9.83,9.83,0,0,0,4.8247,1.645,10.1656,10.1656,0,0,0,1.6881-.0205,9.7289,9.7289,0,0,0,1.3908-.2361,9.9068,9.9068,0,0,0,3.56-1.665.3247.3247,0,0,0,.0858-.0918.26.26,0,0,0-.3946-.327,9.4672,9.4672,0,0,1-1.5563.9324A9.3633,9.3633,0,0,1,10.1909,19.4723Zm.7077-8.7729c.1033.0977.2178.2031.3288.312a.2862.2862,0,0,0,.2144.0887c.2595-.
20024.519-.003.7785,0a.2974.2974,0,0,0,.2325-.0963q.4713-.489.9459-.9749a.2415.2415,0,0,0-.0005-.3868c-.1921-.1949-.3867-.3873-.576-.5849a.3279.3279,0,0,0-.2563-.1074c-.854.0027-1.708.0015-2.562.0015-.5568,0-1.1136-.0014-1.67.0017-.0734,0-.0921-.0221-.09-.0924.0044-.1556.0075-.3118-.0021-.467a.8.8,0,0,0-.373-.6771.9214.9214,0,0,0-.5009-.1225q-1.8084,0-3.6166.0007a2.423,2.423,0,0,0-.2468.0133.7576.7576,0,0,0-.7083.7829q0,1.4932,0,2.9867c0,.1415-.0089.2838.003.4244a.7372.7372,0,0,0,.4023.6315,1.0094,1.0094,0,0,0,.4786.1032q1.8471.0006,3.6944-.0011a1.1441,1.1441,0,0,0,.2727-.03.79.79,0,0,0,.5953-.769c.0051-.1863.0046-.3728.0016-.559-.001-.061.0144-.0807.0784-.08.38.0031.76.0005,1.14.0024a.2656.2656,0,0,0,.213-.0907c.0327-.0369.0658-.0735.092-.1027a1.0616,1.0616,0,0,0,.2471.1759,1.33,1.33,0,0,0,.3006.0177.3337.3337,0,0,0,.286-.1221C10.6957,10.8777,10.8027,10.7882,10.8986,10.6994ZM20,10.0025a9.98,9.98,0,0,0-2.8964-7.0432.2641.2641,0,1,0-.3805.3659c.0448.0486.0923.0945.1379.1423a9.4652,9.4652,0,0,1-.15,13.2125.2648.2648,0,1,0,.3708.3753c.0964-.097.1914-.1956.2831-.297A9.9442,9.9442,0,0,0,20,10.0025ZM17.99,9.9972a7.8838,7.8838,0,0,0-.18-1.6927A7.783,7.783,0,0,0,16.4076,5.229c-.2211-.2929-.4723-.5635-.7168-.838a.2617.2617,0,0,0-.4035.0094.2681.2681,0,0,0,.0384.3695,7.1382,7.1382,0,0,1,.9018,1.1149A7.3939,7.3939,0,0,1,17.3948,10.99a7.2393,7.2393,0,0,1-.7015,2.308,7.4667,7.4667,0,0,1-1.4061,1.9641.2653.2653,0,0,0-.0156.38.2685.2685,0,0,0,.3862-.0042c.0427-.0406.0828-.0839.1231-.1269A7.9509,7.9509,0,0,0,17.99,9.9972Zm-1.98-.0207a5.9592,5.9592,0,0,0-1.6848-4.1541.2648.2648,0,1,0-.3842.3623,5.3514,5.3514,0,0,1,1.4853,4.5475,5.2314,5.2314,0,0,1-1.185,2.6946c-.1166.1419-.2483.2713-.37.4094a.2581.2581,0,0,0,.0167.3685.2608.2608,0,0,0,.3641-.0063c.0444-.0423.0864-.0871.1282-.1319A5.923,5.923,0,0,0,16.0093,9.9765Z" fill="#fff"/><path d="M10.1909,19.4723a9.3633,9.3633,0,0,0,3.8717-.9141,9.4672,9.4672,0,0,0,1.5563-.9324.26.26,0,0,1,.3946.327.3247.3247,0,0,1-.0858.0918,9.9068,9.9068,0,0,1-3.5595,1.665,9.7289,9.7289,0,0,1-1.3908.2361,10.1656,10.1656,0,0,1-1.6881.0205,9.83,9.83,0,0,1-4.8247-1.645,9.9985,9.9985,0,0,1-4.298-6.5046A9.61,9.61,0,0,1,.0122,9.5573,10.0147,10.0147,0,0,1,7.5831.2932,9.5246,9.5246,0,0,1,9.2192.0311a10.0414,10.0414,0,0,1,1.6534.006,9.9234,9.9234,0,0,1,4.9766,1.851.2663.2663,0,0,1,.1232.2922.2436.2436,0,0,1-.2021.1933.2721.2721,0,0,1-.2243-.06,9.4163,9.4163,0,0,0-2.3616-1.244,9.5588,9.5588,0,0,0-2.008-.4768A9.4845,9.4845,0,0,0,.7237,8.0486a9.4777,9.4777,0,0,0,1.3231,7.1,9.4135,9.4135,0,0,0,3.67,3.3018,9.2807,9.2807,0,0,0,2.6559.8823A9.9725,9.9725,0,0,0,10.1909,19.4723Z" fill="#5b5b5b"/><path d="M10.8986,10.6994c-.0959.0888-.2029.1783-.2983.2788a.3337.3337,0,0,1-.286.1221,1.33,1.33,0,0,1-.3006-.0177,1.0616,1.0616,0,0,1-.2471-.1759c-.0262.0292-.0593.0658-.092.1027a.2656.2656,0,0,1-.213.0907c-.38-.0019-.76.0007-1.1395-.0024-.064,0-.0794.0192-.0784.08.003.1862.0035.3727-.0016.559a.79.79,0,0,1-.5953.769,1.1441,1.1441,0,0,1-.2727.03q-1.8473.0029-3.6944.0011a1.0094,1.0094,0,0,1-.4786-.1032.7372.7372,0,0,1-.4023-.6315c-.0119-.1406-.003-.2829-.003-.4244q0-1.4934,0-2.9867a.7576.7576,0,0,1,.7083-.7829,2.423,2.423,0,0,1,.2468-.0133q1.8082-.0013,3.6166-.0007a.9214.9214,0,0,1,.5009.1225.8.8,0,0,1,.373.6771c.01.1552.0065.3114.0021.467-.0019.07.0168.0928.09.0924.5567-.0031,1.1135-.0017,1.67-.0017.854,0,1.708.0012,2.562-.0015a.3279.3279,0,0,1,.2563.1074c.1893.1976.3839.39.576.5849a.2415.2415,0,0,1,.0005.3868q-.4741.4863-.9459.9749A.2974.2974,0,0,1,12.22,11.1c-.2595-.0033-.519-.0027-.7785,0a.2862.2862,0,0,1-.2144-.0887C11.1164,10.9025,11.0019,10.7971,10.8986,10.6994Zm2.051-.8708c-.1244-.12-.2456-.2324-.36-.3508a.2182.2182,0,0,0-.1732-.071q-2.1727.003-4.3455.0013a.6311.6311,0,0,1-.1057-.006.2114.2114,0,0,1-.1693-.1688.653.653,0,0,1-.0071-.1056c-.0028-.2405,0-.4812-.0083-.7216A.3265.3265,0,0,0,7.4754,8.06a.8735.8735,0,0,0-.12-.0042q-1.2739,0-2.5479,0c-.3916,0-.7832-.0022-1.1748.0016a.3352.3352,0,0,0-.38.3849q0,1.6173,0,3.2344a.772.772,0,0,0,.0066.1128.2875.2875,0,0,0,.2364.265,1.045,1.045,0,0,0,.21.0253q1.5888.0023,3.1777.0011c.1675,0,.335.0015.5025,0a.3494.3494,0,0,0,.395-.372c.01-.252.0137-.5048.0054-.7568-.0072-.2208.0923-.32.3
2188-.3155.4056.0088.8115.0036,1.2172.0006a.1847.1847,0,0,0,.11-.0444c.062-.054.1152-.118.1734-.1764a.23.23,0,0,1,.345-.0024c.0605.06.1194.1208.1786.1816a.1255.1255,0,0,0,.1949.0008q.19-.1954.38-.3906a.2363.2363,0,0,1,.3758-.0041c.13.13.2563.264.3881.3923a.168.168,0,0,0,.1032.0431c.1768.0043.3539.0047.5307,0a.1778.1778,0,0,0,.1085-.0471c.1134-.11.2214-.2254.3314-.3389Z" fill="#5b5b5b"/><path d="M20,10.0025a9.9442,9.9442,0,0,1-2.6353,6.7558c-.0917.1014-.1867.2-.2831.297a.2648.2648,0,1,1-.3708-.3753,9.4189,9.4189,0,0,0,2.4579-4.3007A9.4605,9.4605,0,0,0,16.861,3.4675c-.0456-.0478-.0931-.0937-.1379-.1423a.2641.2641,0,1,1,.3805-.3659A9.9926,9.9926,0,0,1,20,10.0025Z" fill="#b21818"/><path d="M17.99,9.9972a7.9509,7.9509,0,0,1-2.2086,5.5137c-.04.043-.08.0863-.1231.1269a.2685.2685,0,0,1-.3862.0042.2653.2653,0,0,1,.0156-.38,7.4667,7.4667,0,0,0,1.4061-1.9641,7.2393,7.2393,0,0,0,.7015-2.308,7.3939,7.3939,0,0,0-1.1673-5.1047A7.1382,7.1382,0,0,0,15.3257,4.77.2681.2681,0,0,1,15.2873,4.4a.2617.2617,0,0,1,.4035-.0094c.2445.2745.4957.5451.7168.838A7.783,7.783,0,0,1,17.809,8.3045,7.8838,7.8838,0,0,1,17.99,9.9972Z" fill="#b21818"/><path d="M16.0093,9.9765a5.923,5.923,0,0,1-1.63,4.09c-.0418.0448-.0838.09-.1282.1319a.2608.2608,0,0,1-.3641.0063.2581.2581,0,0,1-.0167-.3685c.1215-.1381.2532-.2675.37-.4094a5.2314,5.2314,0,0,0,1.185-2.6946A5.3514,5.3514,0,0,0,13.94,6.1847a.2648.2648,0,1,1,.3842-.3623,5.9592,5.9592,0,0,1,1.6848,4.1541Z" fill="#b21818"/><path d="M12.95,9.8286l-.4088.4215c-.11.1135-.218.229-.3314.3389a.1778.1778,0,0,1-.1085.0471c-.1768.0049-.3539.0045-.5307,0a.168.168,0,0,1-.1032-.0431c-.1318-.1283-.2584-.2619-.3881-.3923a.2363.2363,0,0,0-.3758.0041q-.19.1951-.38.3906a.1255.1255,0,0,1-.1949-.0008c-.0592-.0608-.1181-.1219-.1786-.1816a.23.23,0,0,0-.345.0024c-.0582.0584-.1114.1224-.1734.1764a.1847.1847,0,0,1-.11.0444c-.4057.003-.8116.0082-1.2172-.0006-.2265-.0049-.326.0947-.3188.3155.0083.252.0042.5048-.0054.7568a.3494.3494,0,0,1-.395.372c-.1675.0019-.335,0-.5025,0q-1.5888,0-3.1777-.0011a1.045,1.045,0,0,1-.21-.0253.2875.2875,0,0,1-.2364-.265.772.772,0,0,1-.0066-.1128q-.0006-1.6171,0-3.2344a.3352.3352,0,0,1,.38-.3849c.3916-.0038.7832-.0016,1.1748-.0016q1.2739,0,2.5479,0a.8735.8735,0,0,1,.12.0042.3265.3265,0,0,1,.3049.3464c.0078.24.0055.4811.0083.7216a.653.653,0,0,0,.0071.1056.2114.2114,0,0,0,.1693.1688.6311.6311,0,0,0,.1057.006q2.1727,0,4.3455-.0013a.2182.2182,0,0,1,.1732.071C12.704,9.5962,12.8252,9.7083,12.95,9.8286Zm-9.2336.2545q0,.6651,0,1.33a.2277.2277,0,0,0,.2543.252q.5061,0,1.012,0a.2324.2324,0,0,0,.2593-.256q0-1.32,0-2.6395a.2268.2268,0,0,0-.2494-.2568q-.5166-.0019-1.0332,0a.2209.2209,0,0,0-.243.2464Q3.7157,9.4215,3.716,10.0831Z" fill="#fff"/><path d="M3.716,10.0831q0-.6616,0-1.3234a.2209.2209,0,0,1,.243-.2464q.5166-.0021,1.0332,0a.2268.2268,0,0,1,.2494.2568q0,1.32,0,2.64a.2324.2324,0,0,1-.2593.256q-.506,0-1.012,0a.2277.2277,0,0,1-.2543-.252Q3.7157,10.7483,3.716,10.0831Zm1.06,1.1182V8.9694c-.1744,0-.3438.0032-.513-.0015-.07-.002-.0917.0179-.0915.09.0028.6836.0016,1.3672.0019,2.0508,0,.03.0031.06.0049.0924Z" fill="#5b5b5b"/></svg>',replay:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.9997 6.66658V1.33325L9.33301 7.99992L15.9997 14.6666V9.33325C20.413 9.33325 23.9997 12.9199 23.9997 17.3333C23.9997 21.7466 20.413 25.3333 15.9997 25.3333C11.5863 25.3333 7.99967 21.7466 7.99967 17.3333H5.33301C5.33301 23.2266 10.1063 27.9999 15.9997 27.9999C21.893 27.9999 26.6663 23.2266 26.6663 17.3333C26.6663 11.4399 21.893 6.66658 15.9997 6.66658Z" fill="#000"/></svg>',search:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"/><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"/></svg>',"slidenav-next":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.3333 8L11.4533 9.88L17.56 16L11.4533 22.12L13.3333 24L21.3333 16L13.3333 8Z" fill="#000"/></svg>',"slidenav-previous":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.2133 22.12L13.1066 16L19.2133 9.88L17.3333 8L9.33331 16L17.3333 24L19.2133 22.12Z" fill="#000"/></svg>',twitter:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19,4.74 C18.339,5.029 17.626,5.229 16.881,5.32 C17.644,4.86 18.227,4.139 18.503,3.28 C17.79,3.7 17.001,4.009 16.159,4.17 C15.485,3.45 14.526,3 13.464,3 C11.423,3 9.771,4.66 9.771,6.7 C9.771,6.99 9.804,7.269 9.868,7.539 C6.795,7.38 4.076,5.919 2.254,3.679 C1.936,4.219 1.754,4.86 1.754,5.539 C1.754,6.82 2.405,7.95 3.397,8.61 C2.79,8.589 2.22,8.429 1.723,8.149 L1.723,8.189 C1.723,9.978 2.997,11.478 4.686,11.82 C4.376,11.899 4.049,11.939 3.713,11.939 C3.475,11.939 3.245,11.919 3.018,11.88 C3.49,13.349 4.852,14.419 6.469,14.449 C5.205,15.429 3.612,16.019 1.882,16.019 C1.583,16.019 1.29,16.009 1,15.969 C2.635,17.019 4.576,17.629 6.662,17.629 C13.454,17.629 17.17,12 17.17,7.129 
2C17.17,6.969 17.166,6.809 17.157,6.649 C17.879,6.129 18.504,5.478 19,4.74"/></svg>',"vehicle-advisor":'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M7.1687,11.3955a1.15,1.15,0,1,0,0,.4h5.844v-.4Zm-1.164.948a.772.772,0,1,1,.764-.772A.7722.7722,0,0,1,6.0047,12.3435Z"/><path d="M13.48,18.0213a.6048.6048,0,0,1-.5254-.3066l-.9287-1.7764a1.1989,1.1989,0,0,0-1.0654-.6445H1.2577A1.2064,1.2064,0,0,1,.06,14.0965V3.0331A1.206,1.206,0,0,1,1.2577,1.8543l17.4043-.02a1.2006,1.2006,0,0,1,1.1992,1.1988V14.0956a1.2035,1.2035,0,0,1-1.1982,1.2109H15.9941a1.1874,1.1874,0,0,0-1.0586.6436l-.9268,1.7587A.6049.6049,0,0,1,13.48,18.0213Zm-2.5195-3.1279a1.595,1.595,0,0,1,1.42.8594l.9248,1.77a.2155.2155,0,0,0,.3515-.0049l.9239-1.7529a1.5846,1.5846,0,0,1,1.4131-.8594H18.662a.8037.8037,0,0,0,.7989-.81V3.0331a.7994.7994,0,0,0-.7989-.7984l-17.4043.02A.8013.8013,0,0,0,.46,3.037V14.0956a.8022.8022,0,0,0,.7988.7978h9.7022Z"/><path d="M17.7287,8.6675l-1.568-3.292a.6759.6759,0,0,0-.5921-.364H3.4447a.68.68,0,0,0-.68.68v5.424a.68.68,0,0,0,.68.68h.992v-.4h-.992a.28.28,0,0,1-.28-.28V5.6915a.28.28,0,0,1,.28-.28H15.5686a.2839.2839,0,0,1,.248.144l.4361.92H14.8286a.44.44,0,0,0-.44.44v1.756a.44.44,0,0,0,.44.436h2.56v2a.2839.2839,0,0,1-.28.28h-1.364a1.16,1.16,0,1,0,0,.4h1.3679a.68.68,0,0,0,.68-.68v-2.16A.6928.6928,0,0,0,17.7287,8.6675Zm-2.9.05a.04.04,0,0,1-.04-.0368V6.9164a.04.04,0,0,1,.04-.04h1.6l.872,1.8412Zm-.2373,3.6259a.772.772,0,1,1,.764-.772A.7721.7721,0,0,1,14.5913,12.3435Z"/><path d="M11.1207,10.9915V6.9635a.44.44,0,0,0-.44-.44H9.1687a.44.44,0,0,0-.44.44v4.028h.4V6.9635a.0439.0439,0,0,1,.04-.04h1.516a.04.04,0,0,1,.04.04v4.028Z"/><path d="M5.2287,8.3275V7.1435a.2.2,0,0,1,.2-.2h1.796a.2.2,0,0,1,.2.2v1.2a.2.2,0,0,1-.2.2H5.4327a.2.2,0,0,1-.2-.2Zm2,.6a.6.6,0,0,0,.6-.6V7.1435a.6.6,0,0,0-.6-.6H5.4327a.6.6,0,0,0-.6.6v1.2a.6.6,0,0,0,.6.6Z"/></svg>',vimeo:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.065,7.59C1.84,7.367,1.654,7.082,1.468,6.838c-0.332-0.42-0.137-0.411,0.274-0.772c1.026-0.91,2.004-1.896,3.127-2.688 c1.017-0.713,2.365-1.173,3.286-0.039c0.849,1.045,0.869,2.629,1.084,3.891c0.215,1.309,0.421,2.648,0.88,3.901 c0.127,0.352,0.37,1.018,0.81,1.074c0.567,0.078,1.145-0.917,1.408-1.289c0.684-0.987,1.611-2.317,1.494-3.587 c-0.115-1.349-1.572-1.095-2.482-0.773c0.146-1.514,1.555-3.216,2.912-3.792c1.439-0.597,3.579-0.587,4.302,1.036 c0.772,1.759,0.078,3.802-0.763,5.396c-0.918,1.731-2.1,3.333-3.363,4.829c-1.114,1.329-2.432,2.787-4.093,3.422 c-1.897,0.723-3.021-0.686-3.667-2.318c-0.705-1.777-1.056-3.771-1.565-5.621C4.898,8.726,4.644,7.836,4.136,7.191 C3.473,6.358,2.72,7.141,2.065,7.59C1.977,7.502,2.115,7.551,2.065,7.59L2.065,7.59z"/></svg>',world:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#000" d="M1,10.5 L19,10.5"/><path fill="none" stroke="#000" d="M2.35,15.5 L17.65,15.5"/><path fill="none" stroke="#000" d="M2.35,5.5 L17.523,5.5"/><path fill="none" stroke="#000" d="M10,19.46 L9.98,19.46 C7.31,17.33 5.61,14.141 5.61,10.58 C5.61,7.02 7.33,3.83 10,1.7 C10.01,1.7 9.99,1.7 10,1.7 L10,1.7 C12.67,3.83 14.4,7.02 14.4,10.58 C14.4,14.141 12.67,17.33 10,19.46 L10,19.46 L10,19.46 L10,19.46 Z"/><circle fill="none" stroke="#000" cx="10" cy="10.5" r="9"/></svg>',xing:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4.4,4.56 C4.24,4.56 4.11,4.61 4.05,4.72 C3.98,4.83 3.99,4.97 4.07,5.12 L5.82,8.16 L5.82,8.17 L3.06,13.04 C2.99,13.18 2.99,13.33 3.06,13.44 C3.12,13.55 3.24,13.62 3.4,13.62 L6,13.62 C6.39,13.62 6.57,13.36 6.71,13.12 C6.71,13.12 9.41,8.35 9.51,8.16 C9.49,8.14 7.72,5.04 7.72,5.04 C7.58,4.81 7.39,4.56 6.99,4.56 L4.4,4.56 L4.4,4.56 Z"/><path d="M15.3,1 C14.91,1 14.74,1.25 14.6,1.5 C14.6,1.5 9.01,11.42 8.82,11.74 C8.83,11.76 12.51,18.51 12.51,18.51 C12.64,18.74 12.84,19 13.23,19 L15.82,19 C15.98,19 16.1,18.94 16.16,18.83 C16.23,18.72 16.23,18.57 16.16,18.43 L12.5,11.74 L12.5,11.72 L18.25,1.56 C18.32,1.42 18.32,1.27 18.25,1.16 C18.21,1.06 18.08,1 17.93,1 L15.3,1 L15.3,1 Z"/></svg>',youtube:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15,4.1c1,0.1,2.3,0,3,0.8c0.8,0.8,0.9,2.1,0.9,3.1C19,9.2,19,10.9,19,12c-0.1,1.1,0,2.4-0.5,3.4c-0.5,1.1-1.4,1.5-2.5,1.6 c-1.2,0.1-8.6,0.1-11,0c-1.1-0.1-2.4-0.1-3.2-1c-0.7-0.8-0.7-2-0.8-3C1,11.8,1,10.1,1,8.9c0-1.1,0-2.4,0.5-3.4C2,4.5,3,4.3,4.1,4.2 C5.3,4.1,12.6,4,15,4.1z M8,7.5v6l5.5-3L8,7.5z"/></svg>'})}return"undefined"!=typeof window&&window.UIkit&&window.UIkit.use(t),t}()}
vendor: 5,105 bytes, line 2
2,7503:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(489),r(1539),r(1299),r(2419),r(1703),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(8309),r(5069),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(4916),r(4765),r(1058),r(7042);var i=h(r(7330)),o=r(3028),s=r(5522),a=r(8732),l=r(8524),c=h(r(5125)),u=r(4724);function h(t){return t&&t.__esModule?t:{default:t}}function f(){f=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function d(){}function p(){}function m(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=u(t[o],t,s);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,l(v,"constructor",m),l(m,"constructor",p),p.displayName=l(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function d(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y(this,r)}}function y(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _(t)}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var b=(0,s.useDealerSearch)().search,x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(s,t);var e,r,n,i=g(s);function s(t){var e,r,n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=i.call(this,t)).initialized=!1,e.isAutocompletion=1===parseInt(t.dataset.autocompletion),e.isMobile=!(0,u.matchBreakpoint)("small").matches,e.$refs.searchInput.value.length>0&&e.$refs.searchClear.removeAttribute("hidden"),e.$refs.searchInput.addEventListener("input",(function(t){t.target.value.length>0?e.$refs.searchClear.removeAttribute("hidden"):e.$refs.searchClear.setAttribute("hidden","hidden")})),e.$refs.searchClear.addEventListener("click",(function(){e.$refs.searchInput.value=""})),e.isAutocompletion)var h=new c.default({selector:function(){return e.$refs.searchInput},data:{src:(r=f().mark((function t(){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.$refs.searchInput.value,t.next=3,b(r,e.$el.dataset.country,!0);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})),n=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);function s(t){d(o,n,i,s,a,"next",t)}function a(t){d(o,n,i,s,a,"throw",t)}s(void 0)}))},function(){return n.apply(this,arguments)}),keys:["matching_place_name","place_name"],cache:!1},resultsList:{tag:"ul",id:"ac-"+crypto.randomUUID(),class:"results_list",position:"afterend",maxResults:5,noResults:!0},debounce:300,searchEngine:function(t,e){if(e){var r=String(e),n=(0,a.fuzzyMatch)(t,r);if(n&&!(n.score<=a.FUZZY_MATCH_THRESHOLD))return(0,l.escapeHtml)(r.slice(0,n.start))+"<mark>"+(0,l.escapeHtml)(r.slice(n.start,n.end))+"</mark>"+(0,l.escapeHtml)(r.slice(n.end))}},onSelection:function(t){e.$refs.searchInput.value=t.selection.value},events:{input:{focus:function(){h.input.value.length&&h.start()},close:function(){this.isMobile&&h.open()},selection:function(e){var r=e.detail.selection;h.input.blur();var n=r.value[r.key];h.input.value=n,document.dispatchEvent(new CustomEvent(o.DEALER_SEARCH_COMMIT_SEARCH,{detail:{searchValue:n,src:t,feature:r.value}}))}}}});return document.addEventListener(o.DEALER_SEARCH_COMMIT_SEARCH,(function(t){t.detail.src!==_(e)&&(e.$refs.searchInput.value=t.detail.searchValue)})),e}return e=s,r&&p(e.prototype,r),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(i.default);e.default=x},8394:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(5069),r(7042),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(3210),r(8309),r(4603),r(8450),r(4916),r(8386),r(9714),r(7601),r(4723),r(1539),r(8674),r(2222),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(539),a=r(6486);function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,c(v,"constructor",m),c(m,"constructor",p),p.displayName=c(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),c(v,a,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function c(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(m,t);var e,r,n,i,o,d=f(m);function m(t){var e,r,n,i,o;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),(i=d.call(this,t)).error=i.$refs.error.dataset.error,i.errors=JSON.parse(i.$refs.error.dataset.errors||"{}"),i.minlength=i.$refs.input.minLength,i.maxlength=i.$refs.input.maxLength,i.pattern=i.$refs.input.pattern,i.autocomplete=i.$refs.input.autocomplete,i.changeEvent=i.$refs.input.dataset.changeEvent,i.required="true"===i.$el.dataset.required,i.searchIcon=null===(e=i.$refs)||void 0===e?void 0:e.searchInputIcon,null===(r=i.searchIcon)||void 0===r||r.addEventListener("click",i.handleInputChange.bind(p(i))),"dealerPostCode"===i.$refs.input.dataset.formRole)&&("funnel"===(null===(o=i.form)||void 0===o?void 0:o.dataset.layout)?i.initFunnelPostCodeBehavior():i.$refs.input.addEventListener("input",i.handleInputChange.bind(p(i))));return i.$refs.input.addEventListener("change",i.handleInputChange.bind(p(i))),i.labelEl=i.$el.querySelector(".uk-form-label"),i.updateFloatingLabel(),i.$refs.input.addEventListener("focus",i.updateFloatingLabel.bind(p(i))),i.$refs.input.addEventListener("blur",i.updateFloatingLabel.bind(p(i))),i.$refs.input.addEventListener("input",i.updateFloatingLabel.bind(p(i))),i.inlineValidation&&(i.hasInteracted=!1,i.$refs.input.addEventListener("focus",(function(){i.hasInteracted=!0})),i.$refs.input.addEventListener("change",(function(t){i.hasInteracted=!0,i.validate(),"dealerPostCode"!==i.$refs.input.dataset.formRole&&i.notifyListeners("change",t)})),i.$refs.input.addEventListener("blur",(function(){return i.validate()}))),i.$refs.input.addEventListener("keydown",(function(t){"Enter"===t.key&&(t.preventDefault(),t.stopPropagation(),i.searchIcon&&i.handleInputChange())})),i.searchIcon&&i.toggleSearchIcon(),i.clearButton=i.$el.querySelector('[data-form-role="clear"]'),i.clearButton&&i.clearButton.addEventListener("click",i.clearInput.bind(p(i))),"postCode"!==i.$refs.input.dataset.formRole&&"dealerPostCode"!==i.$refs.input.dataset.formRole||(i.form.addEventListener(s.COUNTRY_CHANGED,i.searchCorrectPostCode.bind(p(i))),i.form.addEventListener(s.CHANGE_POSTCODE,i.updatePostCo
2de.bind(p(i)))),null===(n=i.form)||void 0===n||n.addEventListener(i.changeEvent,i.clearSearchInput.bind(p(i))),i.$refs.input.addEventListener("keydown",(function(t){"Enter"===t.key&&(t.preventDefault(),t.stopPropagation())})),i}return e=m,r=[{key:"updateFloatingLabel",value:function(){if(this.labelEl){var t=this.$refs.input.value.trim().length>0,e=document.activeElement===this.$refs.input;t||e?this.$el.classList.add("has-floating-label"):this.$el.classList.remove("has-floating-label")}}},{key:"handleInputChange",value:function(){var t,e=this.$refs.input.value.trim(),r=this.clearButton;if(e&&r){if(this.$el.classList.add("has-clear-button"),"close"===(null===(t=this.searchIcon)||void 0===t?void 0:t.getAttribute("uk-icon"))&&e.length>0)return void this.clearInput()}else this.$el.classList.remove("has-clear-button");if(this.searchIcon&&this.searchIcon.removeAttribute("uk-icon"),"dealerPostCode"!==this.$refs.input.dataset.formRole&&"postCode"!==this.$refs.input.dataset.formRole||this.dispatchCustomEvent(s.POST_CODE_CHANGED,{postCode:this.errorCondition?null:this.$refs.input.value}),this.changeEvent){var n={name:this.$refs.input.name,value:this.$refs.input.value};this.dispatchCustomEvent(this.changeEvent,n)}}},{key:"clearInput",value:function(){if(this.$refs.input.value="",this.$el.classList.remove("has-clear-button"),this.hideDealerSearchResults(),"search"!==this.$refs.input.type&&this.validate(),this.toggleSearchIcon(),this.changeEvent){var t={name:this.$refs.input.name,value:this.$refs.input.value};this.dispatchCustomEvent(this.changeEvent,t)}}},{key:"initFunnelPostCodeBehavior",value:function(){var t=this;this.$refs.input.addEventListener("input",(0,a.debounce)((function(){var e=t.$refs.input.value.trim();e?(t.form.dispatchEvent(new CustomEvent(s.SEARCH_DEALER_EVENT,{detail:{postCode:e}})),t.showDealerSearchResults()):t.hideDealerSearchResults()}),500))}},{key:"showDealerSearchResults",value:function(){var t=document.querySelector(".m-dealersearchresults");t&&t.removeAttribute("hidden")}},{key:"hideDealerSearchResults",value:function(){var t=document.querySelector(".m-dealersearchresults");t&&!t.hidden&&t.setAttribute("hidden",!0)}}
2,{key:"updatePostCode",value:function(t){this.$refs.input.value=t.detail.postCode,this.validate(),this.handleInputChange()}},{key:"clearSearchInput",value:function(t){var e;this.$refs.input.name===(null===(e=t.detail)||void 0===e?void 0:e.name)&&""===t.detail.value&&(this.$refs.input.value="",this.$el.classList.remove("has-clear-button"),this.toggleSearchIcon())}},{key:"errorCondition",get:function(){var t=this.$refs.input.value;return!(!this.required||0!==t.length)||this.minlength>=0&&t.length<this.minlength||this.maxlength>=0&&t.length>this.maxlength||!(!(this.pattern&&t.length>0)||new RegExp(this.pattern).test(t))}},{key:"validate",value:function(){this.hasInteracted=!0,this.hasInteracted&&this.errorCondition?this.showError():this.hideError()}},{key:"showError",value:function(){this.$el.classList.add("has-error"),this.$refs.error.classList.remove("uk-invisible"),this.$refs.error.textContent=this.getErrorMessage()}},{key:"hideError",value:function(){this.$el.classList.remove("has-error"),this.$refs.error.classList.add("uk-invisible")}},{key:"getErrorMessage",value:function(){var t,e,r,n=this.$refs.input.value.length;if(this.required&&0===n)return(null===(t=this.errors)||void 0===t?void 0:t.required)||this.error;if(this.minlength>=0&&n<this.minlength)return(null===(e=this.errors)||void 0===e?void 0:e.minlength)||this.error;if(this.maxlength>=0&&n>this.maxlength)return(null===(r=this.errors)||void 0===r?void 0:r.maxlength)||this.error;if(this.pattern&&n>0){var i,o=new RegExp(this.pattern);if(!this.$refs.input.value.match(o))return null===(i=this.errors)||void 0===i?void 0:i.pattern}return""}},{key:"searchCorrectPostCode",value:(i=l().mark((function t(e){var r,n,i,o,s,a;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.$refs.input,i=e.detail.countryCode,o=null===(r=n.dataset)||void 0===r?void 0:r.dynamicPatternUrl,t.prev=3,!i||!o){t.next=12;break}return t.next=7,fetch("".concat(o,"?countryCode=").concat(i));case 7:return s=t.sent,t.next=10,s.json();case 10:(a=t.sent)&&a.pattern&&(n.pattern=this.pattern=a.pattern,n.value&&(n.focus(),n.blur()));case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(3),console.error(t.t0);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function s(t){c(o,r,n,s,a,"next",t)}function a(t){c(o,r,n,s,a,"throw",t)}s(void 0)}))},function(t){return o.apply(this,arguments)})},{key:"reset",value:function(){"postCode"!==this.$refs.input.dataset.formRole&&"dealerPostCode"!==this.$refs.input.dataset.formRole&&(this.$refs.input.value="",this.hideError(),this.$el.classList.remove("has-clear-button"))}},{key:"getState",value:function(){var t={},e=this.$refs.input.value.trim();return t[this.$refs.input.name]=e.length>0?e:null,t}},{key:"setState",value:function(t){this.reset();var e=t[this.$refs.input.name];e&&(this.$refs.input.value=e)}},{key:"toggleSearchIcon",value:function(){var t=this.$refs.input.value.trim();this.searchIcon&&this.searchIcon.setAttribute("uk-icon",t.length>0?"close":"search")}},{key:"dispatchCustomEvent",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=new CustomEvent(t,{detail:r,bubbles:n});null===(e=this.form)||void 0===e||e.dispatchEvent(i)}}],r&&u(e.prototype,r),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),m}(o.default);e.default=g},1179:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=a(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},s.apply(this,arguments)}function a(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}
2function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}r(1299),r(2419),r(1703),r(4819),r(5003),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(4916),r(5306),r(489);var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(a,t);var e,r,n,i=c(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(r=[{key:"toggleDropDown",value:function(){if(s(h(a.prototype),"toggleDropDown",this).call(this),this.$el.hasAttribute("aria-expanded"))this.$el.removeAttribute("aria-expanded");else{var t=this.$el.closest(".o-filter");t&&t.querySelectorAll(".a-select-multiple[aria-expanded]").forEach((function(t){var e;null===(e=t.controller)||void 0===e||e.toggleDropDown()})),this.$el.setAttribute("aria-expanded",!0)}}},{key:"updateDisplayText",value:function(){0===this.selectedLabels.length?this.displayValues.textContent=this.placeholder:1===this.selectedLabels.length?this.displayValues.textContent=this.$el.dataset.labelSingleItem.replace("%s",this.selectedLabels[0]):this.displayValues.textContent=this.$el.dataset.labelItemCount.replace("%s",this.selectedLabels.length)}},{key:"onChangeFilter",value:function(t){s(h(a.prototype),"onChangeFilter",this).call(this,t),this.$el.dataset.hasSelectedItems=this.selectedValues.length>0?"true":"false"}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(((i=r(7202))&&i.__esModule?i:{default:i}).default);e.default=f},9560:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=a(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},s.apply(this,arguments)}function a(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}r(1299),r(2419),r(1703),r(4819),r(5003),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(a,t);var e,r,n,i=c(a);function a(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var r=(e=i.call(this,t)).$refs.select.querySelector("option");return r&&e.$el.setAttribute("data-placeholder",r.textContent),e}return e=a,(r=[{key:"toggleDropdown",value:function(){var t=this,e=this.$el.closest(".o-filter");e&&e.querySelectorAll(".a-select:has(.a-select__label[aria-expanded=true])").forEach((function(e){var r;e!==t.$el&&(null===(r=e.controller)||void 0===r||r.toggleDropdown())})),s(h(a.prototype),"toggleDropdown",this).call(this)}},{key:"onChange",value:function(t){s(h(a.prototype),"onChange",this).call(this,t);var e=this.$refs.select.value;e&&"any"!==e&&" "!==e?this.$el.classList.add("has-value"):this.$el.classList.remove("has-value")}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(((i=r(2942))&&i.__esModule?i:{default:i}).default);e.default=f},2275:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1539),r(4747),r(6755),r(7327),r(1038),r(8783),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(9521),a=r(9092);function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(o,t);var e,r,n,i=u(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),s.gsap.registerPlugin(a.ScrollTrigger),a.ScrollTrigger.create({trigger:e.$el,start:"bottom top",endTrigger:"html",end:"bottom bottom",toggleClass:{className:"is-sticky-js",targets:".b-anchornavigation"}}),e.initAnchorLink(),e}return e=o,(r=[{key:"initAnchorLink",value:function(){var t=this,e=this.$el.querySelector('[data-ref="anchorlinks"]');if(e){var r=e.querySelectorAll('a[href^="#"]'),n=[];r.forEach((function(e){var i=e.getAttribute("href");if(i&&i.startsWith("#")){var o=document.getElementById(i.substring(1));if(o){var s=Array.from(r).filter((function(t){return t.getAttribute("href")===i}));n.push({links:s,section:o}),a.ScrollTrigger.create({trigger:o,start:"top top",end:"bottom bottom",onEnter:function(){return t.activateSection(o)},onEnterBack:function(){return t.activateSection(o)}})}}})),r.forEach((function(t){t.addEventListener("click",(function(e){var r=t.getAttribute("href"),n=document.querySelector(r);n&&(e.preventDefault(),n.scrollIntoView({behavior:"smooth",block:"start"}))}))}))}}},{key:"activateSection",value:function(t){var e=t.querySelector(".b-imagecarousel"),r=(null==e?void 0:e.__scrollTrigger)||(null==e?void 0:e.scrollTrigger);if(!(r&&r.progress<1)){var n=Array.from(this.$el.querySelectorAll('[data-ref="anchorlinks"] a')).filter((function(e){return e.getAttribute("href")==="#".concat(t.id)}));this.$el.querySelectorAll('[data-ref="anchorlinks"] a').forEach((function(t){return t.classList.remove("active","selected")})),n.forEach((function(t){return t.classList.add("active","selected")}))}}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},1066:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,t)).checkboxes=e.$el.querySelectorAll(".b-catalogform__dowloadItemCheckbox input.a-checkbox__field"),e.required&&e.inlineValidation&&e.checkboxes.forEach((function(t){t.addEventListener("click",(function(){return e.validate()}))})),e}return e=l,(r=[{key:"errorCondition",get:function(){var t=!0;return this.checkboxes.forEach((function(e){e.checked&&(t=!1)})),this.required&&t}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(9067))&&i.__esModule?i:{default:i}).default);e.default=u},8193:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(9521),a=r(9092);function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(o,t);var e,r,n,i=u(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),s.gsap.registerPlugin(a.ScrollTrigger),a.ScrollTrigger.create({trigger:e.$el,start:"bottom top",endTrigger:"html",end:"bottom bottom",toggleClass:{className:"b-ctabar--sticky",targets:".b-ctabar"}}),e}return e=o,r&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(o.default);e.default=d},2362:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(9601),r(489);var i=s(r(7330)),o=s(r(6612));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(s,t);var e,r,n,i=c(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=i.call(this,t)).initSlideshows(),e.initLightbox(),e}return e=s,(r=[{key:"initSlideshows",value:function(){for(var t={animation:"scale",autoplay:!0,draggable:!1,minHeight:!1,velocity:.15,ratio:!1},e={animation:"fade",autoplay:!0,draggable:!1,minHeight:!1,velocity:.15,ratio:!1},r=1;r<=5;r++)this.$refs["slot"+r]&&o.default.slideshow(this.$refs["slot"+r],Object.assign(t,{autoplayInterval:1e4-1e3*r}));for(var n=1;n<=5;n++)this.$refs["captionSlot"+n]&&o.default.slideshow(this.$refs["captionSlot"+n],Object.assign(e,{autoplayInterval:1e4-1e3*n}))}},{key:"initLightbox",value:function(){o.default.lightbox(this.$el,{toggle:".b-impressiongallery__lightbox-link"})}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(i.default);e.default=f},9994:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(1058),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(9521);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).ACTIVE_ITEM_CLASS="b-informationslider__item--active",e.ACTIVE_BUTTON_CLASS="b-informationslider__navigationButton--active",e.AUTO_PLAY_DURATION_SEC=8,e.useAutoplay="true"===e.$el.dataset.autoplay,e.navButtons=e.$el.querySelectorAll(".b-informationslider__navigationButton"),e.slides=e.$el.querySelectorAll(".b-informationslider__item"),e.timer=null,e.activeIndex=0,!e.slides||e.slides.length<2?u(e):(e.navButtons.forEach((function(t){t.addEventListener("click",e.onNavButtonClicked.bind(h(e)))})),e.$el.addEventListener("mouseenter",e.onMouseEnterComponent.bind(h(e))),e.$el.addEventListener("mouseleave",e.onMouseLeaveComponent.bind(h(e))),e.useAutoplay&&e.startTimer(),e)}return e=o,(r=[{key:"onMouseEnterComponent",value:function(){this.timer&&this.timer.pause()}},{key:"onMouseLeaveComponent",value:function(){this.timer&&this.timer.resume()}},{key:"onNavButtonClicked",value:function(t){var e=parseInt(t.currentTarget.dataset.id);this.setActiveSlide(e),this.useAutoplay&&this.startTimer()}},{key:"startTimer",value:function(){this.timer&&this.timer.kill();var t=this.navButtons[this.activeIndex].querySelector(".b-informationslider__progress");this.timer=s.gsap.fromTo(t,{scaleX:0},{scaleX:1,duration:this.AUTO_PLAY_DURATION_SEC,ease:"linear",onComplete:this.onTimerComplete.bind(this)})}},{key:"onTimerComplete",value:function(){var t=(this.activeIndex+1)%this.slides.length;this.setActiveSlide(t),this.useAutoplay&&this.startTimer()}},{key:"setActiveSlide",value:function(t){var e=this;
2this.slides.forEach((function(r,n){r.classList.remove(e.ACTIVE_ITEM_CLASS),e.navButtons[n].classList.remove(e.ACTIVE_BUTTON_CLASS),e.navButtons[n].querySelector(".b-informationslider__progress").style.removeProperty("transform"),n===t&&(r.classList.add(e.ACTIVE_ITEM_CLASS),e.navButtons[n].classList.add(e.ACTIVE_BUTTON_CLASS))})),this.activeIndex=t}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},9430:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var i=a(r(7330)),o=a(r(6612)),s=r(4724);function a(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(a,t);var e,r,n,i=u(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this,t)).WALL_MODE_CLASS="b-teaserwall--isWall",e.matchBreakpointMedium=(0,s.matchBreakpoint)("medium",e.checkBreakpointMatch.bind(f(e))),e.checkBreakpointMatch(),e}return e=a,(r=[{key:"checkBreakpointMatch",value:function(){var t=this;this.matchBreakpointMedium.matches?(o.default.slider(this.$el).$destroy(),setTimeout((function(){t.$el.querySelectorAll(".b-teaserwall__itemList,.b-teaserwall__item").forEach((function(t){t.removeAttribute("style"),t.removeAttribute("tabindex")})),t.$el.classList.add(t.WALL_MODE_CLASS)}),0)):(this.$el.classList.remove(this.WALL_MODE_CLASS),o.default.slider(this.$el,{finite:!0}))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.default);e.default=p},4822:(t,e,r)=>{"use strict";r(1703),r(7042),r(1539),r(8309),r(1038),r(8783),r(4916),r(7601),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(7229);var n=h(r(7090));r(7274);var i=h(r(6612)),o=h(r(6509)),s=r(6486),a=h(r(6179)),l=h(r(6317)),c=h(r(3615)),u=r(3028);function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t}
2,f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var m=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n.default.cfg.customMedia={small:"(min-width: 640px)",medium:"(min-width: 960px)",large:"(min-width: 1200px)",xlarge:"(min-width: 1600px)"},i.default.use(o.default),document.addEventListener("DOMContentLoaded",this.domReady.bind(this)),document.addEventListener(u.LOCK_SCROLLING_EVENT,this.onLockScrollEvent.bind(this)),document.addEventListener(u.UNLOCK_SCROLLING_EVENT,this.onUnlockScrollEvent.bind(this)),window.addEventListener("resize",(0,s.debounce)(this.handleResize.bind(this),150))}var e,r,h;return e=t,(r=[{key:"domReady",value:function(){(new a.default).setUtmParams(),this.initComponents(),document.dispatchEvent(new CustomEvent(u.CONTROLLERS_INITIALIZED)),this.handleResize()}},{key:"initComponents",value:function(){var t,e=f(document.querySelectorAll("[data-controller]"));try{for(e.s();!(t=e.n()).done;){var r=t.value;if(!r.controller){var n=r.dataset.controller;r.controller=new l.default(c.default,n,r)}}}catch(t){e.e(t)}finally{e.f()}}},{key:"onLockScrollEvent",value:function(){document.querySelector("body").classList.add("noScroll")}},{key:"onUnlockScrollEvent",value:function(){document.querySelector("body").classList.remove("noScroll")}},{key:"handleResize",value:function(){var t=window.innerHeight,e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px")),document.documentElement.style.setProperty("--vh-100","".concat(t,"px"))}}])&&p(e.prototype,r),h&&p(e,h),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=m},3615:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=Y(r(9557)),i=Y(r(8394)),o=Y(r(9795)),s=Y(r(218)),a=Y(r(3483)),l=Y(r(9560)),c=Y(r(1179)),u=Y(r(4829)),h=Y(r(970)),f=Y(r(7084)),d=Y(r(1753)),p=Y(r(8652)),m=Y(r(1279)),g=Y(r(6652)),y=Y(r(1287)),_=Y(r(8778)),v=Y(r(9388)),b=Y(r(1834)),x=Y(r(2580)),w=Y(r(7904)),E=Y(r(4886)),S=Y(r(7360)),T=Y(r(9118)),A=Y(r(359)),O=Y(r(9430)),C=Y(r(2362)),M=Y(r(8175)),k=Y(r(8193)),I=Y(r(1440)),P=Y(r(1602)),L=Y(r(9994)),R=Y(r(1066)),D=Y(r(8480)),z=Y(r(1547)),B=Y(r(8372)),j=Y(r(8495)),F=Y(r(2275)),N=Y(r(239)),$=Y(r(4561)),U=Y(r(6646)),V=Y(r(7349)),G=Y(r(5481)),q=Y(r(7503)),H=Y(r(4900)),W=Y(r(7766)),Z=Y(r(9485)),X=Y(r(1557));function Y(t){return t&&t.__esModule?t:{default:t}}var K={FilterTag:n.default,Iframe:S.default,Input:i.default,Radio:o.default,Checkbox:s.default,Combobox:a.default,Select:l.default,SelectMultiple:c.default,Datepicker:u.default,Textarea:h.default,StreamingVideo:f.default,Slideshow:d.default,Header:p.default,Filter:m.default,ShowMore:g.default,Slider:y.default,Floorplan:_.default,Accordion:v.default,Form:b.default,ConsentPlaceholder:E.default,Button:x.default,Teaser:w.default,SearchForm:T.default,Lightbox:A.default,Teaserwall:O.default,ImpressionGallery:C.default,Ctabar:k.default,ThumbnailGallery:M.default,Toggle:I.default,Stage:P.default,InformationSlider:L.default,Catalogform:R.default,Footer:D.default,Movingimage:z.default,Modal:B.default,InteractiveGallery:j.default,Anchornavigation:F.default,Banner:N.default,CustomizableForm:$.default,DealerSearchResults:V.default,DealerSearchButton:U.default,DealerSelectButton:G.default,DealerSearchForm:q.default,DealerSearchMap:H.default,DealerSearchOverlay:W.default,DealerSearch:Z.default,ImageSequence:X.default};e.default=K},3028:(t,e,r)=>{"use strict";r(1539),r(4747),r(7941),Object.defineProperty(e,"__esModule",{value:!0});var n={TOGGLE_TEASER_IMAGE:!0,DEALER_SEARCH_SHOW:!0,DEALER_SEARCH_HIDE:!0,DEALER_SEARCH_HIDDEN:!0,DEALER_SEARCH_LOADING:!0,DEALER_SEARCH_COMMIT_SEARCH:!0,DEALER_SEARCH_INITIALIZED:!0,IMAGE_SEQUENCE_START:!0,IMAGE_SEQUENCE_LOADED:!0,LA
2NGUAGE_CHANGED:!0};e.TOGGLE_TEASER_IMAGE=e.LANGUAGE_CHANGED=e.IMAGE_SEQUENCE_START=e.IMAGE_SEQUENCE_LOADED=e.DEALER_SEARCH_SHOW=e.DEALER_SEARCH_LOADING=e.DEALER_SEARCH_INITIALIZED=e.DEALER_SEARCH_HIDE=e.DEALER_SEARCH_HIDDEN=e.DEALER_SEARCH_COMMIT_SEARCH=void 0;var i=r(539);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));e.TOGGLE_TEASER_IMAGE="TOGGLE_TEASER_IMAGE";e.DEALER_SEARCH_SHOW="dealer.search.show";e.DEALER_SEARCH_HIDE="dealer.search.hide";e.DEALER_SEARCH_HIDDEN="dealer.search.hidden";e.DEALER_SEARCH_LOADING="dealer.search.loading";e.DEALER_SEARCH_COMMIT_SEARCH="dealer.search.commit-search";e.DEALER_SEARCH_INITIALIZED="dealer.search.initialized";e.IMAGE_SEQUENCE_START="IMAGE_SEQUENCE_START";e.IMAGE_SEQUENCE_LOADED="IMAGE_SEQUENCE_LOADED";e.LANGUAGE_CHANGED="LANGUAGE_CHANGED"},5522:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(2526),r(1817),r(2165),r(2443),r(3680),r(3706),r(408),r(489),r(8309),r(5069),r(7042),r(1038),r(7941),r(5003),r(9337),Object.defineProperty(e,"__esModule",{value:!0}),e.useDealerSearch=void 0,r(1539),r(8674),r(6699),r(2023),r(8862),r(1703),r(9600),r(6992),r(189),r(8783),r(3948),r(1249),r(7327),r(4916),r(7601),r(4747),r(2707),r(2222),r(9826);var i,o=r(4501),s=(i=r(5596))&&i.__esModule?i:{default:i};function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){f=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function d(){}function p(){}function m(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=u(t[o],t,s);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 4,424 bytes, line 2
2(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,l(v,"constructor",m),l(m,"constructor",p),p.displayName=l(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function d(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function p(t){return function(){var e=this,r=arguments;
2return new Promise((function(n,i){var o=t.apply(e,r);function s(t){d(o,n,i,s,a,"next",t)}function a(t){d(o,n,i,s,a,"throw",t)}s(void 0)}))}}var m,g=[],y=[],_=!1,v=new Promise((function(t){m=t}));e.useDealerSearch=function(){var t=function(){var t=p(f().mark((function t(r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e(r);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),console.error("error while fetching the dealers ",t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}(),e=function(){var t=p(f().mark((function t(e){var r,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,location.host.includes("storybook")?fetch(e):fetch(e,{method:"POST",body:JSON.stringify({countryId:"INT"})});case 2:if((r=t.sent).ok){t.next=5;break}throw new Error("network error");case 5:return t.next=7,r.json();case 7:n=t.sent,g=n.dealers,y=u(new Set(g.filter((function(t){return t.country&&/^[a-zA-Z]{2}$/.test(t.country)})).map((function(t){return t.country})))).join(","),_=!0,m();case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t.lng||!t.lat)return!1;if(e.length>0)for(var n=0;n<e.length;n++)if(!t.services[e[n]])return!1;if(r.length>0)for(var i=0;i<r.length;i++)if(!t.vehicleCategories[r[i]])return!1;return!0},n=function(){var t=p(f().mark((function t(){var e,n,i,o=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=o.length>0&&void 0!==o[0]?o[0]:[],n=o.length>1&&void 0!==o[1]?o[1]:[],_){t.next=5;break}return t.next=5,v;case 5:return i=[],g.forEach((function(t){t.lng&&t.lat&&r(t,e,n)&&i.push(t)})),t.abrupt("return",i);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),i=function(){var t=p(f().mark((function t(e){var r,n,i,a,c,h,d,p,m,b=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=b.length>1&&void 0!==b[1]?b[1]:null,n=b.length>2&&void 0!==b[2]&&b[2],i=[],_){t.next=6;break}return t.next=6,v;case 6:if(g.forEach((function(t){if(t.lng&&t.lat){var r,s=null!==(r=t.companyName)&&void 0!==r?r:t.addressName,a=(0,o.normalize)(s),c=(0,o.normalize)(e),u=n?(0,o.fuzzySearch)(c,a):null;(null!==u?u>o.FUZZY_MATCH_THRESHOLD:c===a)&&i.push({dealer:l({},t),place_type:["poi"],context:[{id:"country",short_code:t.country.toLowerCase()}],place_name:s,center:[t.lng,t.lat],score:null!==u?u:1})}})),n||1!==i.length){t.next=9;break}return t.abrupt("return",i);case 9:return n&&i.length>0&&i.sort((function(t,e){return e.score-t.score})),a=/^\d+$/.test(e)?"postcode":"country,region,place,postcode,address",c="https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(encodeURIComponent(e),".json?access_token=").concat(s.default.accessToken,"&autocomplete=true&types=").concat(a,"&language=").concat(document.documentElement.lang,"&country=").concat(y,"&proximity=ip"),t.prev=12,t.next=15,fetch(c);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!((null===(h=p.features)||void 0===h?void 0:h.length)>0)){t.next=25;break}return m=[].concat(i,u(p.features)),r&&m.sort((function(t,e){var n,i,o=null===(n=t.context)||void 0===n?void 0:n.find((function(t){return t.short_code===r.toLowerCase()})),s=null===(i=e.context)||void 0===i?void 0:i.find((function(t){return t.short_code===r.toLowerCase()}));return o&&!s?-1:!o&&s?1:0})),t.abrupt("return",m);case 25:return t.abrupt("return",[{place_type:["country"],properties:{short_code:"de"},bbox:[5.866315,47.270238,15.041832,55.1286491],center:[10.0183432948567,51.1334813439932]}]);case 26:t.next=31;break;case 28:t.prev=28,t.t0=t.catch(12),console.error("Error during search:",t.t0);case 31:return t.abrupt("return",i);case 32:case"end":return t.stop()}}),t,null,[[12,28]])})));return function(e){return t.apply(this,arguments)}}();return{init:t,isInitialized:function(){return _},getDealers:n,search:i,getCountryFeature:function(t){var e="https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(encodeURIComponent(t),".json?access_token=").concat(s.default.accessToken,"&types=").concat("country","&language=").concat(document.documentElement.lang);return new Promise((function(r,n){fetch(e).then((function(t){return t.json()})).then((function(e){if(e.features&&e.features.length>0){var i=e.features.find((function(e){return e.properties.short_code===t}));i&&r(i),n("Country not found")}else n("Country not found")}
2)).catch((function(t){n(t)}))}))}}}},8732:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzySearch=e.fuzzyMatch=e.FUZZY_MATCH_THRESHOLD=void 0,r(1249);var n=r(8524),i=function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;for(var r=[],n=0;n<=e.length;n++)r[n]=[n];for(var i=0;i<=t.length;i++)r[0][i]=i;for(var o=1;o<=e.length;o++)for(var s=1;s<=t.length;s++)e.charAt(o-1)===t.charAt(s-1)?r[o][s]=r[o-1][s-1]:r[o][s]=Math.min(r[o-1][s-1]+1,Math.min(r[o][s-1]+1,r[o-1][s]+1));return r[e.length][t.length]};e.FUZZY_MATCH_THRESHOLD=.7;var o=function(t,e){for(var r={score:0,index:0},n=0;n<=e.length-t.length;n++){var o=e.substring(n,n+t.length),s=1-i(t,o)/Math.max(t.length,o.length);s>r.score&&(r={score:s,index:n})}return r};e.fuzzySearch=function(t,e){return t=(0,n.normalize)(t),e=(0,n.normalize)(e),o(t,e).score};e.fuzzyMatch=function(t,e){var r=(0,n.normalizeMapped)(t).value,i=(0,n.normalizeMapped)(e),s=i.value,a=i.map,l=o(r,s),c=l.score,u=l.index;return{score:c,start:a[u],end:a[u+r.length-1]+1}}},4501:(t,e,r)=>{"use strict";r(1539),r(4747),r(7941),Object.defineProperty(e,"__esModule",{value:!0});var n=r(8732);Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var i=r(8524);
2Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}))},8524:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escapeHtml=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&quot;").replace(/'/g,"&#039;")},e.trim=e.normalizeMapped=e.normalize=void 0,r(4916),r(7601),r(9600),r(3210),r(5306);var n=function(t){for(var e=[],r=[],n=0;n<t.length;n++)/\s/.test(t[n])||(e.push(t[n].toLowerCase()),r.push(n));return{value:e.join(""),map:r}};e.normalizeMapped=n;e.normalize=function(t){return n(t).value};e.trim=function(t){return t.replace(/\s{2,}/g," ").trim()}},4900:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(489),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(8309),r(5069),r(1038),r(7601),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(4916),r(4765),r(1539),r(8674),r(1058),r(4747),r(9826),r(6755),r(1249),r(2707),r(7042),r(5306),r(2222),r(9600),r(7327);var i=h(r(7330)),o=r(5522),s=r(3028),a=h(r(5596));r(6016);var l=r(3028),c=r(9521),u=h(r(9127));function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(){m=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function f(){}function d(){}function p(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=p.prototype=f.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=u(t[o],t,s);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 4,424 bytes, line 2
2(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,l(v,"constructor",p),l(p,"constructor",d),d.displayName=l(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function g(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function y(t){return function(){var e=this,r=arguments;
2return new Promise((function(n,i){var o=t.apply(e,r);function s(t){g(o,n,i,s,a,"next",t)}function a(t){g(o,n,i,s,a,"throw",t)}s(void 0)}))}}function _(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var i=w(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return x(this,r)}}function x(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}c.gsap.registerPlugin(u.default);var E="__ds-show-map",S=(0,o.useDealerSearch)(),T=S.getDealers,A=S.search,O=S.getCountryFeature,C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(c,t);var e,r,n,i,o=b(c);function c(t){var e,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(r=o.call(this,t)).initialized=!1,r.initializationPromise=new Promise((function(t){r.initializationPromiseResolve=t})),r.$parentBrick=t.closest(".b-brick"),r.currentCountry=t.dataset.country,r.$dealers=[],r.serviceTypeFilters=t.querySelectorAll('.m-ds-map__filter-content .a-selectMultiple[data-form-role="services"] .a-selectMultiple__options-items input'),r.vehicleCategoryFilters=t.querySelectorAll('.m-ds-map__filter-content .a-selectMultiple[data-form-role="vehicleCategories"] .a-selectMultiple__options-items input'),r.$filters=t.querySelectorAll(".m-ds-map__filter-content .a-selectMultiple__options-items input"),r.$center=[10.4541,51.1642],r.$searchResult=null,r.$searchResultIsCountry=!1,r.$sortedMarkers=[],r.$markers=[],r.detailPageUrl=r.$el.dataset.detailPage,r.detailPageWildcard=r.$el.dataset.detailPageWildcard,r.tagTemplate=document.getElementById("dealer-tag"),r.returnButton=null===(e=r.$refs)||void 0===e?void 0:e.returnbtn,r.totalResultContainer=r.$refs.resultCount,a.default.accessToken=r.$el.dataset.accessToken,r._initListeners(),document.addEventListener(s.DEALER_SEARCH_COMMIT_SEARCH,(function(){T().then((function(t){r.$dealers=t,r._initMap()}))})),r}return e=c,r=[{key:"_initListeners",value:function(){var t,e=this;document.addEventListener(s.DEALER_SEARCH_COMMIT_SEARCH,function(){var t=y(m().mark((function t(r){var n,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.detail.src.closest(".b-brick")!==e.$parentBrick){t.next=7;break}if(i=1!==parseInt(null===(n=e.$parentBrick.querySelector(".o-dealer-search"))||void 0===n?void 0:n.dataset.withoutOverlay),e._toggleIsUpdating(!0),e.initialized){t.next=6;break}return t.next=6,e.initializationPromise;case 6:r.detail.feature?e._searchLocation(r.detail.feature).then((function(){i&&document.body.classList.add(E)})):A(r.detail.searchValue,e.$el.dataset.country,!1).then((function(t){i&&document.body.classList.add(E),t.length>0?e._searchLocation(t[0]):(document.dispatchEvent(new CustomEvent(l.DEALER_SEARCH_INITIALIZED)),e._refresh())}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),document.addEventListener(s.DEALER_SEARCH_HIDDEN,(function(){e._hideMap()})),this.$filters.forEach((function(t){t.addEventListener("change",(function(){e._filterMarkers()}))})),null===(t=this.returnButton)||void 0===t||t.addEventListener("click",(function(){return e._resetSearch()}))}},{key:"_resetSearch",value:function(){var t,e=this;this.$refs.mapContainer.setAttribute("hidden","hidden"),document.body.classList.remove("__ds-show-map"),this._clearDealerDetail&&this._clearDealerDetail(),null!==(t=this.$markers)&&void 0!==t&&t.length&&(this.$markers.forEac
2h((function(t){return t.remove()})),this.$markers=[]),this.$map&&this.$map.remove(),this.$refs.list.innerHTML="",this.initialized=!1,this.initializationPromise=new Promise((function(t){e.initializationPromiseResolve=t})),this.$searchResult=null,this.$searchResultIsCountry=!1;var r=document.querySelector(".m-ds-overlay");r&&r.removeAttribute("hidden")}},{key:"_clearFilters",value:function(){this.$filters.forEach((function(t){return t.checked=!1})),this._filterMarkers()}},{key:"_filterMarkers",value:function(){var t=this;this._toggleIsUpdating(!0);var e=[],r=[];this.serviceTypeFilters.forEach((function(t){t.checked&&e.push(t.value)})),this.vehicleCategoryFilters.forEach((function(t){t.checked&&r.push(t.value)})),T(e,r).then((function(e){t.$dealers=e,t._refresh()}))}},{key:"_refresh",value:function(){var t=this;this._updateDealerMarkers().then((function(){t._sortMarkers(!0),t._updateList()}))}},{key:"_getCountryCode",value:function(t,e){if(e)return t.properties.short_code;if(t.context){var r=t.context.find((function(t){return t.id.startsWith("country")}));return r?r.short_code:"Land nicht gefunden"}}},{key:"_searchLocation",value:(i=y(m().mark((function t(e){var r=this;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.dealer&&this._clearFilters(),this.$center=e.center,this.$searchResult=e,this.$searchResultIsCountry="country"===e.place_type[0],this.currentCountry=this._getCountryCode(this.$searchResult,this.$searchResultIsCountry),this._updateDealerMarkers().then((function(){r._sortMarkers(!0),e.dealer&&r._showDealerDetails(1,e.dealer.id)}));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_sortMarkers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=f(this.$center,2),n=r[0],i=r[1];if(this.$sortedMarkers=this.$markers.map((function(e){var r=e.getLngLat();return{marker:e,distance:t._getDistance(r.lat,r.lng,i,n)}})),this.$searchResultIsCountry?this.$sortedMarkers=this.$sortedMarkers.sort((function(t,e){return t.marker.dealer.companyName>e.marker.dealer.companyName?1:-1})):this.$sortedMarkers=this.$sortedMarkers.sort((function(t,e){return t.distance-e.distance})),e&&this.$searchResult)if(this.$dealers.length>0){var o=this.$sortedMarkers.slice(0,5);if(this.$map.setCenter(this.$searchResult.center),this.$center=this.$searchResult.center,"country"===this.$searchResult.place_type[0]){var s=this.$searchResult.bbox;this.$map.fitBounds([[s[0],s[1]],[s[2],s[3]]],{padding:150})}else{var l=new a.default.LngLatBounds(this.$center,this.$center);o.forEach((function(t){return l.extend(t.marker.getLngLat())})),this.$map.fitBounds(l,{padding:50})}}else{var c=this.$searchResult.bbox;this.$map.fitBounds([[c[0],c[1]],[c[2],c[3]]],{padding:150})}}},{key:"_getDistance",value:function(t,e,r,n){if(t===r&&e===n)return 0;var i=Math.PI,o=t*i/180,s=e*i/180,a=r*i/180,l=n*i/180,c=Math.acos(Math.sin(o)*Math.sin(a)+Math.cos(o)*Math.cos(a)*Math.cos(l-s));return c=60*(c=180*c/i)*1.1515*1.609344}},{key:"_updateList",value:function(){var t=this;this.$refs.list.innerHTML="";var e=0;this.$sortedMarkers.forEach((function(r){if(t.$map.getBounds().contains(r.marker.getLngLat())&&e<5){e++;var n=r.marker.dealer,i=t._generateListItem(n,r.distance,e);t._updateMarkerStyling(r.marker,e),t.$refs.list.append(i)}else t._updateMarkerStyling(r.marker)})),this.updateResultHeader(this.$searchResult,e)}},{key:"_updateMarkerStyling",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=t.getElement();-1===e?r.removeAttribute("data-index"):r.setAttribute("data-index",e+"")}},{key:"_hideMap",value:function(){document.body.classList.remove(E),this._clearDealerDetail()}},{key:"_initMap",value:function(){var t=this;O(this.$el.dataset.country).then((function(e){t.$refs.mapContainer.removeAttribute("hidden"),t._initMapWithFeature(e.center)})).catch((function(){return t._initMapWithFeature()}))}},{key:"_initMapWithFeature",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[10.4541,51.1642];this.$center=e;
2var r={container:this.$refs.map,minZoom:2,zoom:window.innerWidth<600?3:4,center:e,style:this.$el.dataset.mapStyles,interactive:!0,scrollZoom:!0,doubleClickZoom:!1,fitBoundsOptions:{maxZoom:11},cooperativeGestures:!1};this.$map=new a.default.Map(r),this.$map.addControl(new a.default.NavigationControl);var n=this;this.$map.on("load",(function(){t._updateDealerMarkers(),t.initialized=!0,t.initializationPromiseResolve();var e=function(){n._sortMarkers(),n._updateList(),document.dispatchEvent(new CustomEvent(l.DEALER_SEARCH_INITIALIZED)),t._toggleIsUpdating(!1)};t.$map.on("moveend",(function(){e()})),t.$map.on("zoomend",(function(){e()})),t._sortMarkers(!0),t._updateList()})),this.$map.on("data",(function(e){"style"===e.dataType&&t.$map.setLayoutProperty("country-label","text-field",["get","name_"+t.language])}))}},{key:"_toggleIsUpdating",value:function(t){t?document.body.classList.add("__ds-map-updating"):document.body.classList.remove("__ds-map-updating")}},{key:"_updateDealerMarkers",value:function(){var t=this;return new Promise((function(e){t._clearMarkers();var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=d(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(t.$dealers);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(i.country.toLowerCase()===t.currentCountry){var o=document.createElement("div");o.className="m-ds-map__marker";var s=new a.default.Marker(o).setLngLat({lng:i.lng,lat:i.lat}).addTo(t.$map);s.dealer=i,t.$markers.push(s)}}}catch(t){n.e(t)}finally{n.f()}e()}))}},{key:"_clearMarkers",value:function(){this.$markers.forEach((function(t){return t.remove()})),this.$markers=[]}},{key:"_generateListItem",value:function(t,e,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=document.getElementById("dealer-entry").content.cloneNode(!0).firstElementChild;i?o.querySelector(".m-ds-map__list-item--default").classList.add("m-ds-map__list-item__detail"):o.querySelector(".m-ds-map__list-item--default").classList.add("m-ds-map__list-item--default"),o.dataset.index=r+"",null!=this.detailPageUrl&&(o.href=this.detailPageUrl.replace(this.detailPageWildcard,t.id+"-"+encodeURI(t.companyName.toLowerCase()).replace("%20","-"))),o.querySelector(".m-ds-map__list-item__dealer-location").innerText="".concat(t.city," | ").concat(Math.round(10*e)/10," km"),o.querySelector(".m-ds-map__list-item__dealer-name").innerText="".concat(t.companyName);var s=document.createElement("div");return s.classList.add("m-ds-map__list-item__services"),this.$filters.forEach((function(e){var r=e.value;if(t.services[r]||t.vehicleCategories[r]){var i=n.tagTemplate.content.cloneNode(!0).firstElementChild;i.querySelector(".a-tag__text").textContent=e.parentElement.innerText,s.append(i)}})),o.querySelector(".m-ds-map__list-item").appendChild(s),o}},{key:"updateResultHeader",value:function(t){var e,r,n,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t&&this.totalResultContainer){var s=null===(e=this.$el.dataset)||void 0===e?void 0:e.resultsLabel,a=null===(r=this.$el.dataset)||void 0===r?void 0:r.singleResultLabel,l=null===(n=this.$el.dataset)||void 0===n?void 0:n.noResultLabel,c="",u="",h=t.context||[],f=h.find((function(t){return t.id.startsWith("country")}));switch(f&&(u=f.text),null===(i=t.place_type)||void 0===i?void 0:i[0]){case"postcode":var d=h.find((function(t){return t.id.startsWith("place")}))||h.find((function(t){return t.id.startsWith("locality")}))||h.find((function(t){return t.id.startsWith("district")}));d&&(c=d.text);break;case"place":case"locality":case"district":c=t.text;break;default:var p=h.find((function(t){return t.id.startsWith("place")}))||h.find((function(t){return t.id.startsWith("locality")}))||h.find((function(t){return t.id.startsWith("region")}));c=(null==p?void 0:p.text)||t.text||""}var m=[c,u].filter((function(t){return!!t})).join(", ")||"";this.totalResultContainer.innerHTML="";var g=document.createElement("h6");g.textContent=m;var y=document.createElement("span"),_=1===o?a:s.replace("%s",o);y.textContent=o?_:l,this.totalResultContainer.append(g,y)}}}],r&&_(e.prototype,r),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(i.default);e.default=C},7766:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(3028);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f="__ds-active",d="__ds-loading",p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),document.addEventListener(s.DEALER_SEARCH_SHOW,(function(){document.body.classList.add(f),t.querySelector(".a-ds-form__search").focus()})),document.addEventListener(s.DEALER_SEARCH_HIDE,(function(){e._close()})),document.addEventListener(s.DEALER_SEARCH_LOADING,(function(){document.body.classList.add(d)})),document.addEventListener(s.DEALER_SEARCH_INITIALIZED,(function(){document.body.classList.remove(d)})),document.addEventListener(s.DEALER_SEARCH_COMMIT_SEARCH,(function(){e.$el.setAttribute("hidden","hidden")})),e.$refs.background.addEventListener("click",(function(){e._close()})),e}return e=o,(r=[{key:"_close",value:function(){document.body.classList.remove(f),document.body.classList.remove(d),document.dispatchEvent(new CustomEvent(s.DEALER_SEARCH_HIDDEN))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=p},1547:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,t)).video=e.$el.querySelector("video"),e.placeholder=e.$el.querySelector(".m-movingimage__placeholderimage"),e.playButton=e.$el.nextElementSibling,e.fadeVideo(),e.video.addEventListener("ended",(function(){e.$el.classList.add("m-movingimage__showPlayButton")})),e.playButton.addEventListener("click",(function(){e.fadeVideo(),e.video.play(),e.$el.classList.remove("m-movingimage__showPlayButton")})),e}return e=l,(r=[{key:"fadeVideo",value:function(){var t=this;this.placeholder&&this.placeholder.classList.add("fadeOut"),this.video.classList.add("fade"),new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&e.intersectionRatio>=.6&&!t.$el.classList.contains("m-movingimage__showPlayButton")?t.video.play():t.video.pause()}))}),{root:null,threshold:[0,.6,1]}).observe(this.video)}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(7330))&&i.__esModule?i:{default:i}).default);e.default=u},1753:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(7941),r(2526),r(7327),r(5003),r(9337),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var i=h(r(7330)),o=h(r(6612)),s=r(8483),a=r(9521),l=r(9092),c=r(4724),u=r(3028);function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}
2var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(h,t);var e,r,n,i=y(h);function h(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=i.call(this,t)).scrollAnimation="true"===(e.$el.dataset.scrollAnimation||"").toLowerCase(),e.isDesktop=(0,c.matchBreakpoint)().matches,e.scrollAnimation?e.setupScrollAnimation():e.setupUIKitSlideshow(),e}return e=h,(r=[{key:"setupUIKitSlideshow",value:function(){o.default.util.on(this.$el,"itemshow",this.handleItemShow.bind(this)),o.default.util.on(this.$el,"itemhide",this.handleItemHide.bind(this)),o.default.util.on(this.$el,"itemshown",this.onItemShown.bind(this)),this.slideshow=o.default.slideshow(this.$el)}},{key:"setupScrollAnimation",value:function(){var t,e=this;this.variant=null!==(t=this.$el.dataset.variant)&&void 0!==t?t:"default",this.slides=this.$el.querySelectorAll(".m-slideshow__item"),this._updateProgressDots(0);var r=this.$el.parentElement.querySelector(".m-slideshow__navigationContainerwithScrollAnimation");if(this.isDesktop)r.style.height=Math.floor(.8*this.$el.querySelector(".m-slideshow__items").clientHeight)+"px";else{var n=this.$el.querySelector(".m-slideshow__items").getBoundingClientRect();r.style.top=n.height+"px",r.style.width=n.width+"px"}a.gsap.registerPlugin(l.ScrollTrigger);var i=a.gsap.timeline();this.slides.forEach((function(t,e){a.gsap.set(t,{opacity:0===e?1:0})})),this.slides.forEach((function(t,r){i.addLabel("slide-"+r),r>0&&(i.to(e.slides[r-1],{opacity:0,duration:1,ease:"power2.inOut"}),i.to(t,{opacity:1,duration:1,ease:"power2.inOut",onReverseComplete:function(){return e._updateProgressDots(r-1)},onComplete:function(){return e._updateProgressDots(r)}},"<"));var n=t.querySelector(".m-slideshow__imagesequence");n&&i.to(t,{duration:10,ease:"none",onStart:function(){n.dispatchEvent(new CustomEvent(u.IMAGE_SEQUENCE_START))}},"<")}));var o=this.$el.offsetHeight,s=document.createElement("div");s.style.height=o*this.slides.length+"px",this.$el.parentNode.insertBefore(s,this.$el.nextSibling),this.scrollTrigger=l.ScrollTrigger.create({trigger:this.$el,pin:!0,pinSpacing:!1,start:"top top",end:"+="+s.style.height,scrub:!0,animation:i}),this.$el.querySelector(".m-slideshow__imagesequence")?this.$el.querySelectorAll(".m-slideshow__imagesequence").forEach((function(t){t.addEventListener(u.IMAGE_SEQUENCE_LOADED,(function(){return e.deferredRefresh()}))})):document.addEventListener(u.CONTROLLERS_INITIALIZED,(function(){return e.refreshOnIntersection()}))}},{key:"refreshOnIntersection",value:function(){var t=this;this.observer=new IntersectionObserver((function(e){var r;e[0].isIntersecting&&(t.scrollTrigger.refresh(),null===(r=t.observer)||void 0===r||r.disconnect())}),{root:null,threshold:0}),this.observer.observe(this.$el)}},{key:"deferredRefresh",value:function(){var t=this;setTimeout((function(){t.scrollTrigger.refresh()}),600)}},{key:"onItemShown",value:function(t){if(this.slideshow){var e=t.detail[0].index;if(!this.scrollAnimation){var r=1===t.detail[0].dir?"right":"left";(0,s.trackEvent)(this.$el,s.MEDIA_GALLERY_CLICK_EVENT,"media-gallery-click",r)}this._updateProgressDots(e);var n=this.slideshow.slides[e],i=n.querySelector(".m-slideshow__image");i?a.gsap.killTweensOf(i):(n.querySelector(".m-slideshow__imagesequence").dispatchEvent(new CustomEvent(u.IMAGE_SEQUENCE_START)),this.scrollTrigger.disable(!1))}}},{key:"_updateProgressDots",value:function(t){var e=this;this.$el.querySelectorAll(".m-slideshow__progressdot .m-slideshow__progressfill").forEach((function(r,n){var i=n>=t?0===n?20:0:100,o=e.isDesktop?{height:"".concat(i,"%")}:{width:"".concat(i,"%")};a.gsap.to(r,d(d({},o),{},{duration:.3,ease:"power2.out"}))}))}},{key:"handleItemShow",value:function(t){this.$refs.currentItem&&(this.$refs.currentItem.innerHTML=t.detail[0].index+1);var e=this.$el.querySelector(".m-slideshow__caption--"+t.detail[0].index);e&&e.removeAttribute("hidden")}},{key:"handleItemHide",value:function(){this.$el.querySelectorAll(".m-slideshow__caption").forEach((function(t){return t.setAttribute("hidden",!0)}))}}])&&m(e.prototype,r),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(i.default);e.default=b},1602:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(9521),a=r(9092),l=r(4724);r(6486);function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(o,t);var e,r,n,i=h(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).image=e.$el.querySelector(".m-stage__image"),e.video=e.$el.querySelector(".m-stage__movingimage"),e.imageHeadline=e.$el.querySelector(".m-stage__media-headline"),e.imageHeadline&&(e.image&&e.image.addEventListener("lazyloaded",e.imageLoadedHandler.bind(d(e))),e.video&&e.addText()),e.parallax="true"===e.$el.getAttribute("data-parallax"),e.isProductPage="true"===e.$el.getAttribute("data-is-product-page"),e.initScrollAnimation(),e.matchMedia=(0,l.matchBreakpoint)("small"),e.matchMedia.matches&&e.refresh.bind(d(e)),e}return e=o,(r=[{key:"refresh",value:function(){a.ScrollTrigger.refresh()}},{key:"initScrollAnimation",value:function(){var t=this;this.matchMedia=(0,l.matchBreakpoint)("small");var e=this.$el.querySelector(".m-stage--mediaContainter"),r=this.$el.querySelector(".m-stage__media, .m-stage__mediaVideo"),n=document.querySelector(".o-header"),i=this.$el.querySelector(".a-image, .m-movingimage");this.parallax&&e&&r&&i&&(s.gsap.registerPlugin(a.ScrollTrigger),a.ScrollTrigger.create({trigger:this.isProductPage?n:r,endTrigger:r,pin:r,start:"top top",end:function(){return t.isProductPage?"bottom "+n.getBoundingClientRect().height:"+=100%"},scrub:.5,onUpdate:function(n){r.classList.contains("m-stage__media")&&(i=t.matchMedia.matches?t.$el.querySelector(".m-stage__imageDesktop.a-image"):t.$el.querySelector(".m-stage__imageMobile.a-image"));var o=i.clientHeight,s=(1-n.progress)*o,a=s+(n.end-n.start)*n.progress-(t.isProductPage&&1===n.progress?15:0);r.style.height="".concat(s,"px"),e.style.height="".concat(a,"px")}}))}},{key:"imageLoadedHandler",value:function(){var t=s.gsap.timeline({delay:2});t.fromTo(this.image.querySelector("img"),{filter:"brightness(100%)"},{filter:"brightness(65%)",duration:1},0),t.to(this.imageHeadline,{opacity:1,clipPath:"inset(0px 0px 0px 0px)",duration:1.8,ease:"sine.out"},.5)}},{key:"addText",value:function(){s.gsap.timeline({delay:2}).to(this.imageHeadline,{opacity:1,clipPath:"inset(0px 0px 0px 0px)",duration:1.8,ease:"sine.out"},.5)}}])&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=m},7904:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var i,o=(i=r(7670))&&i.__esModule?i:{default:i},s=r(3028);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).hideAllTeasers(),window.addEventListener(s.TOGGLE_TEASER_IMAGE,e.switchImage.bind(h(e))),document.addEventListener(s.LANGUAGE_CHANGED,e.onLanguageChange.bind(h(e))),e}return e=o,(r=[{key:"handleMouseEnter",value:function(){}},{key:"handleMouseLeave",value:function(){}},{key:"switchImage",value:function(t){var e,r=null===(e=t.detail)||void 0===e?void 0:e.toggle,n=this.$el.querySelector(".m-teaser__image:not(.m-teaser__alt-image)"),i=this.$el.querySelector(".m-teaser__alt-image");n&&i&&("main"===r?n.removeAttribute("hidden"):n.setAttribute("hidden","hidden"),"alt"===r?i.classList.add("m-teaser__alt-image-show"):i.classList.remove("m-teaser__alt-image-show"))}},{key:"onLanguageChange",value:function(t){var e,r=null===(e=t.detail)||void 0===e?void 0:e.language;this.filterTeasersByLanguage(r)}},{key:"hideAllTeasers",value:function(){document.querySelectorAll(".m-teaser[data-language-filter]").forEach((function(t){t.setAttribute("hidden",!0)}))}},{key:"filterTeasersByLanguage",value:function(t){document.querySelectorAll(".m-teaser[data-language-filter]").forEach((function(e){var r=e.getAttribute("data-language-filter");t&&r===t?e.removeAttribute("hidden"):e.setAttribute("hidden","")}))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},239:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(8674),r(489);var i=s(r(7330)),o=s(r(6612));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}
2function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(s,t);var e,r,n,i=c(s);function s(t){var e,r,n,a;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=i.call(this,t)).iconRotateClass="o-banner__expandButton-iconRotate",n.closeButton=n.$el.querySelector(".o-banner__close"),n.contentExpand=n.$refs.additionalcontenexpand,n.drop=n.$el.querySelector("[uk-drop]"),n.icon=null===(e=n.contentExpand)||void 0===e?void 0:e.querySelector("[uk-icon]"),n.isOpen="true"===(null===(r=n.$el)||void 0===r?void 0:r.dataset.open),n.closeButton&&n.closeButton.addEventListener("click",(function(){n.banner=n.closeButton.closest(".o-banner"),n.banner&&n.close()})),n.drop&&(o.default.util.on(n.drop,"hide",(function(){var t;null===(t=n.icon)||void 0===t||t.classList.remove(n.iconRotateClass)})),o.default.util.on(n.drop,"show",(function(){var t;null===(t=n.icon)||void 0===t||t.classList.add(n.iconRotateClass)}))),n.isOpen&&n.drop)&&(o.default.drop(n.drop).show(),null===(a=n.icon)||void 0===a||a.classList.add(n.iconRotateClass));return n}return e=s,(r=[{key:"rotateIcon",value:function(){this.icon.toggle(this.iconRotateClass)}},{key:"close",value:function(){var t=this;this.banner.classList.add("hide"),this.banner.closest(".b-banner")&&this.banner.closest(".b-banner").classList.add("hide"),document.documentElement.style.setProperty("--banner-height","0px"),setTimeout((function(){return t.banner.remove()}),300)}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(i.default);e.default=f},9485:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(5522),a=r(3028);function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(o,t);var e,r,n,i=u(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),(0,(0,s.useDealerSearch)().init)(t.dataset.dealerUrl),document.querySelectorAll('.a-button[href="#dealer-search"]').forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),document.dispatchEvent(new CustomEvent(a.DEALER_SEARCH_SHOW))}))})),e}return e=o,r&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(o.default);e.default=d},8778:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(1038),r(7042),r(8309),r(4916),r(7601),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1539),r(4747),r(4363),r(9653),r(489);var i=a(r(7330)),o=a(r(6612)),s=r(4724);function a(t){return t&&t.__esModule?t:{default:t}}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(a,t);var e,r,n,i=f(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this,t)).currentIndex=0,e.hoverIndex=-1,e.matchMedia=(0,s.matchBreakpoint)("medium"),e.$refs.slider=e.$el.querySelector(".o-floorplan__slider"),e.$refs.links=e.$el.querySelectorAll(".o-floorplan__slider-link"),e.$refs.contents=e.$el.querySelectorAll(".o-floorplan__content-item"),e.$refs.media=e.$el.querySelectorAll(".o-floorplan__media"),e.$refs.details=e.$el.querySelectorAll(".o-floorplan__details"),e.$refs.buttons=e.$refs.content.querySelectorAll(".a-button"),e.$refs.hoverAreas=e.$el.querySelectorAll(".o-floorplan__hover-area"),e.$refs.hiddenAreas=e.$el.querySelectorAll(".o-floorplan__hidden-area"),e.$refs.overlay=document.createElement("div"),e.$refs.overlay.classList.add("o-floorplan__overlay"),e.$el.querySelector(".uk-slider-container").prepend(e.$refs.overlay),e.$refs.links.forEach((function(t){return t.addEventListener("click",e.switchActiveItem.bind(p(e)))})),e.$refs.links.forEach((function(t){return t.addEventListener("mouseenter",e.handleMouseEnter.bind(p(e)))})),e.$refs.links.forEach((function(t){return t.addEventListener("mouseleave",e.handleMouseLeave.bind(p(e)))})),o.default.util.on(e.$refs.slider,"itemshow",e.sliderShow.bind(p(e))),o.default.util.on(e.$refs.slider,"itemshown",e.sliderShown.bind(p(e))),document.addEventListener("resize",e.resizeUi.bind(p(e))),e.switchMediumBreakpoint(),e.updateUi(),e}return e=a,(r=[{key:"handleMouseEnter",value:function(t){this.hoverIndex=l(this.$refs.links).indexOf(t.target),this.updateUi()}},{key:"handleMouseLeave",value:function(){var t=this;this.hoverIndex=-1,setTimeout((function(){t.updateUi()}),0)}},{key:"switchActiveItem",value:function(t){this.matchMedia.matches&&(this.currentIndex=l(this.$refs.links).indexOf(t.currentTarget),this._setActiveItem(),this.handleMouseLeave())}},{key:"sliderShow",value:function(t){this.matchMedia.matches||(this.currentIndex=t.detail[0].index,this._setActiveItem()),this.$refs.overlay.style.display="none"}},{key:"sliderShown",value:function(){this.resizeUi(),this.$refs.overlay.style.display="block"}},{key:"_setActiveItem",value:function(){this.$refs.links.forEach((function(t){return t.classList.remove("is-active")}
2)),this.$refs.contents.forEach((function(t){return t.classList.add("uk-hidden")})),this.$refs.links[this.currentIndex].classList.add("is-active"),this.$refs.contents[this.currentIndex].classList.remove("uk-hidden"),o.default.update(this.$refs.contents[this.currentIndex],"update")}},{key:"switchMediumBreakpoint",value:function(){this.matchMedia.matches?this.$refs.buttons.forEach((function(t){t.classList.add("a-button--preserve-style")})):this.$refs.buttons.forEach((function(t){t.classList.remove("a-button--preserve-style")}))}},{key:"updateUi",value:function(){var t=l(this.$refs.links),e=l(this.$refs.media),r=l(this.$refs.details),n=l(this.$refs.contents),i=this.currentIndex,o=this.hoverIndex;if(-1!==o&&i!==o)for(var s=0;s<t.length;s++)o<i&&s<i&&s>=o||o>i&&s>i&&s<=o?t[s].classList.add("is-shown"):t[s].classList.remove("is-shown"),n[s].classList.add("uk-hidden"),n[o].classList.remove("uk-hidden"),r[s].classList.add("hide");else t.forEach((function(t){return t.classList.remove("is-shown")})),e.forEach((function(t){return t.classList.remove("hide")})),r.forEach((function(t){return t.classList.remove("hide")})),n.forEach((function(t){return t.classList.add("uk-hidden")})),n[i].classList.remove("uk-hidden");this.resizeUi()}},{key:"resizeUi",value:function(){this.resizeAreas(),this.resizeOverlay()}},{key:"resizeAreas",value:function(){for(var t=l(this.$refs.links),e=l(this.$refs.hoverAreas),r=l(this.$refs.hiddenAreas),n=0;n<t.length;n++){var i=t[n],o=i.classList.contains("is-shown"),s=e[n],a=r[n],c=i.clientHeight,u=i.querySelector(".last-keyfact"),h=u.getBoundingClientRect().top+u.clientHeight-i.getBoundingClientRect().top+10,f=c-h;s.style.height="".concat(o?c:h,"px"),a.style.height="".concat(f,"px")}}},{key:"resizeOverlay",value:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MAX_SAFE_INTEGER;this.$el.querySelectorAll(".is-shown, .is-active").forEach((function(r){var n=r.getBoundingClientRect(),i=r.closest(".uk-slider-container").getBoundingClientRect();t=Math.max(0,Math.min(t,n.left-i.left)),e=Math.max(0,Math.min(e,i.right-n.right))})),this.$refs.overlay.style.left="".concat(t,"px"),this.$refs.overlay.style.right="".concat(e,"px")}}])&&u(e.prototype,r),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.default);e.default=g},8652:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(7042),r(8309),r(1038),r(8783),r(4916),r(7601),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(489);var i=c(r(7330)),o=c(r(6612)),s=r(6486),a=r(4724),l=r(539);function c(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(c,t);var e,r,n,i=p(c);function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=i.call(this,t)).isProductPage="true"===e.$el.getAttribute("data-is-product-page"),e.matchMedia=(0,a.matchBreakpoint)("medium",e.initNavigation.bind(g(e))),e.navbarConfig={mode:"click",boundary:".o-header__nav",boundaryAlign:!0,pos:"bottom-justify"},e.initNavigation(),e.isProductPage||e.switchNavigation(),document.addEventListener(l.CONTROLLERS_INITIALIZED,(function(){e.setCSSVarHeaderHeight(),e.setCSSVarBannerHeight()})),window.addEventListener("resize",(0,s.debounce)(e.handleResize.bind(g(e)),300)),e}return e=c,(r=[{key:"initNavigation",value:function(){var t=this,e=this.$el.querySelectorAll(".uk-nav-sub");if(this.matchMedia.matches){o.default.nav(this.$refs.navigation).$destroy(),this.$refs.navigation.removeAttribute("hidden"),this.$refs.navigation.classList.add("uk-navbar-nav");var r,n=this.$refs.headerOverlay,i=u(e);try{for(i.s();!(r=i.n()).done;){var s=r.value;s.parentNode.classList.contains("uk-navbar-dropdown")||(s.removeAttribute("hidden"),s.outerHTML='<div class="uk-navbar-dropdown">'.concat(s.outerHTML,"</div>"))}}catch(t){i.e(t)}finally{i.f()}o.default.navbar(this.$el,this.navbarConfig),o.default.util.on(this.$refs.navigation,"show",(function(){n.hidden=!1,document.querySelector("body").classList.add("noScroll")})),o.default.util.on(this.$refs.navigation,"hide",(function(){n.hidden=!0,document.querySelector("body").classList.remove("noScroll")}))}else{o.default.nav(this.$refs.navigation).$destroy(),document.querySelector("body").classList.remove("noScroll"),this.$refs.navToggle.setAttribute("uk-icon","menu"),this.$refs.navigation.setAttribute("hidden",null),this.$refs.navigation.classList.remove("uk-navbar-nav"),this.$el.classList.remove("uk-navbar");var a,l=u(e);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.parentNode.classList.contains("uk-navbar-dropdown")&&(c.parentNode.outerHTML="".concat(c.outerHTML))}}catch(t){l.e(t)}finally{l.f()}o.default.nav(this.$refs.navigation,{}),o.default.navbar(this.$el,this.navbarConfig),o.default.util.on(this.$refs.navigation,"show",(function(){t.$refs.navToggle.setAttribute("uk-icon","close"),document.querySelector("body").classList.add("noScroll")})),o.default.util.on(this.$refs.navigation,"hide",(function(e){e.target.classList.contains("o-header__navigation")&&(t.$refs.navToggle.setAttribute("uk-icon","menu"),document.querySelector("body").classList.remove("noScroll"))}))}}},{key:"switchNavigation",value:function(){var t=this,e=document.querySelector(".b-stage"),r=this.$refs.header,n=this.$el.offsetHeight;new IntersectionObserver((function(e){e[0].isIntersecting?(r.classList.remove("o-header__nav--compact"),t.$el.classList.remove("o-header__compact")):(r.classList.add("o-header__nav--compact"),t.$el.classList.add("o-header__compact"))}),{root:null,threshold:0,rootMargin:"-".concat(n,"px 0px 0px 0px")}).observe(e)}},{key:"handleResize",value:function(){this.setCSSVarBannerHeight(),this.setCSSVarHeaderHeight()}},{key:"setCSSVarHeaderHeight",value:function(){var t=this.$el.offsetHeight;document.documentElement.style.setProperty("--header-height","".concat(t,"px"))}},{key:"setCSSVarBannerHeight",value:function(){if(this.banner=document.querySelector(".o-banner--top"),this.banner&&this.$el){var t=this.banner.offsetHeight;document.documentElement.style.setProperty("--banner-height","".concat(t,"px"))}else document.documentElement.style.setProperty("--banner-height","0px")}}])&&f(e.prototype,r),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(i.default);e.default=_},8495:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1038),r(8783),r(1539),r(4747),r(5069),r(1058),r(561),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(9521),a=r(5317),l=r(4724),c=r(6486);function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(o,t);var e,r,n,i=f(o);function o(t){var e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),r=i.call(this,t),s.gsap.registerPlugin(a.Timeline),r.TIMINGS={slideTimeIn:1,slideTimeInMobile:1,slideTime:1,slideTimeMobile:.9,staggerTime:.4,staggerTimeMobile:.3},r.isAnimating=!1,r.tl=new a.Timeline({onComplete:function(){r.isAnimating=!1}});var n=t.querySelectorAll(".o-interactivegallery__controls li");r.arrControlButtons=Array.from(n),null===(e=r.arrControlButtons)||void 0===e||e.forEach((function(t){t.addEventListener("click",r.onControlButtonClick.bind(p(r)))}));var l=(0,c.debounce)((function(){return r.calculateValues()}),250);window.addEventListener("load",(function(){return r.calculateValues()})),window.addEventListener("resize",l),r.calculateValues();var u=r.createGalleryScrolltrigger();if(null==u)return d(r);var h=new IntersectionObserver((function(t){t.forEach((function(t){t.isIntersecting?u.restart(!0,!1):u.reverse()}))}),{root:null,rootMargin:"0px",threshold:.2}),f=r.$el;return f&&h.observe(f),r}return e=o,(r=[{key:"createGalleryScrolltrigger",value:function(){var t=this,e=this.$el.querySelector(".o-interactivegallery__row");if(null==e)return null;var r=this.$el.querySelector(".o-interactivegallery__wrapper"),n=e.querySelectorAll(".a-image.is-active"),i=s.gsap.timeline({paused:!0});return n.forEach((function(e){i.fromTo(e,{height:"0%"},{height:"100%",duration:t.slideTimeIn,ease:"power2.inOut"},"-="+t.staggerTime)})),s.gsap.set(r,{opacity:1}),i}},{key:"calculateValues",value:function(){this.matchMedia=(0,l.matchBreakpoint)("small"),this.imageContainers=this.$el.querySelectorAll('[class^="o-interactivegallery__image"]'),this.slideTimeIn=this.matchMedia.matches?this.TIMINGS.slideTimeIn:this.TIMINGS.slideTimeInMobile,this.staggerTime=this.matchMedia.matches?this.TIMINGS.staggerTime:this.TIMINGS.staggerTimeMobile,this.slideTime=this.matchMedia.matches?this.TIMINGS.slideTime:this.TIMINGS.slideTimeMobile,this.isPortrait=window.matchMedia("(orientation: portrait)").matches}},{key:"onControlButtonClick",value:function(t){var e=this.$el.querySelectorAll(".o-interactivegallery__optiontext"),r=this.$el.querySelectorAll(".o-interactivegallery__description");this.arrControlButtons.forEach((function(t){t.classList.remove("is-active")})),e.forEach((function(t){t.classList.remove("is-active")})),r.forEach((function(t){t.classList.remove("is-active")}));var n=t.currentTarget.getAttribute("data-optionid");n=n?parseInt(n):1;var i=this.$el.querySelector('[data-optionid-headline="'+n+'"]'),o=this.$el.querySelector('[data-optionid-description="'+n+'"]');t.currentTarget.classList.add("is-active"),null==i||i.classList.add("is-active"),null==o||o.classList.add("is-active");var s=[],a=[];
2this.imageContainers.forEach((function(t){var e=t.querySelectorAll(".a-image");if(e&&e.length>0&&n>=1&&n<=e.length){var r=e[n-1];r&&s.push(r);var i=Array.from(e);i.splice(n-1,1),a.push.apply(a,i)}})),this.createImageAnimation(s,a)}},{key:"createImageAnimation",value:function(t,e){var r=this;!0===this.isAnimating&&this.tl.progress(1),this.isAnimating=!0,t&&t.length>0&&(s.gsap.set(t,{zIndex:3}),s.gsap.set(e,{zIndex:1}),t.forEach((function(t,e){0===e?r.tl.add(r.tl.to(t,{height:"100%",duration:r.slideTime,ease:"power2.inOut"})):r.tl.add(r.tl.to(t,{height:"100%",duration:r.slideTime,ease:"power2.inOut"},">-"+r.staggerTime))}))),e&&e.length>0&&this.tl.add(this.tl.to(e,{height:"0%",zIndex:1,duration:0}))}}])&&u(e.prototype,r),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=g},1557:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(489),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(4916),r(4723),r(2222),r(3112),r(1539),r(9714),r(1058),r(2707);var i=h(r(7330)),o=r(3028),s=r(4724),a=r(9521),l=r(5317),c=h(r(9127)),u=h(r(9092));function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var y=function(){return window.innerWidth>window.innerHeight},_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(h,t);var e,r,n,i=p(h);function h(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=i.call(this,t)).isImagesequence=!!e.$el.getAttribute("data-sequence-path"),e.isVideoSequence=e.$el.getAttribute("data-video");var r=e.$el.classList.contains("m-slideshow__imagesequence"),n=null,f=!1;if(e.highlightSequence=e.$el.closest(".b-highlightsequence"),e.isDesktop=(0,s.matchBreakpoint)("small").matches,e.isImagesequence&&!0===e.isImagesequence){var d=y(),p=e.$el.querySelector(".o-product-imagesequence__canvas"),m=e.$el.querySelector(".o-product-imagesequence__canvas-container"),g=p.getContext("2d");r&&e.$el.addEventListener(o.IMAGE_SEQUENCE_START,(function(){f&&(n=window.scrollY)})),p.width=d?1920:1080,p.height=d?1080:1920;var _=d||""===e.$el.getAttribute("data-sequence-pathmobile")?e.$el.getAttribute("data-sequence-path"):e.$el.getAttribute("data-sequence-pathmobile"),v=parseInt(e.$el.getAttribute("data-sequence-frames"),10),b=function(t){return function(t,e){var r=e.match(/^(.+?)(\d{3})\.(\w+)$/);if(r){var n=r[1],i=r[3];return"".concat(n).concat((t+1).toString().padStart(3,"0"),".").concat(i)}}(t,_)},x=[],w=e.$el,E=-1,S=function(t){x.sort((function(t,e){var r=t.src.toLowerCase(),n=e.src.toLowerCase();return r.localeCompare(n)}));var e=x[t];if(E!==t&&e){try{g.clearRect(0,0,p.width,p.height),g.drawImage(e,0,0,p.width,p.width*e.height/e.width)}catch(t){console.log(t)}E=t}};window.addEventListener("scroll",(function(){var t;if(!r||null!==n){var i=m.getBoundingClientRect(),o=null!==(t=n)&&void 0!==t?t:i.top+window.scrollY,s=(document.documentElement.scrollTop-o)/(n?n+m.clientHeight:m.clientHeight-window.innerHeight),a=Math.min(v-1,Math.ceil(s*v));if(a<0)return S(0),p.classList.remove("o-product-imagesequence__canvas--active"),m.classList.remove("o-product-imagesequence__canvas-container--end"),void e._dispatchProgress(1,!0,
2!0);switch(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.getBoundingClientRect();return r.top<=0&&r.bottom<window.innerHeight?2:r.top<=0&&r.bottom>=window.innerHeight||e&&r.top>0?1:0}(m,r)){case 0:S(0),p.classList.remove("o-product-imagesequence__canvas--active"),m.classList.remove("o-product-imagesequence__canvas-container--end");break;case 1:p.classList.add("o-product-imagesequence__canvas--active"),m.classList.remove("o-product-imagesequence__canvas-container--end"),requestAnimationFrame((function(){return S(a)})),e._dispatchProgress(s,!1,!1);break;case 2:S(v-1),p.classList.remove("o-product-imagesequence__canvas--active"),m.classList.add("o-product-imagesequence__canvas-container--end"),e._dispatchProgress(s,!0)}}})),function(){for(var t=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=new Image;i.onload=function(){x.push(i),0===e&&S(0),x.length>=v&&r&&(w.dispatchEvent(new CustomEvent(o.IMAGE_SEQUENCE_LOADED)),f=!0)},i.onerror=function(){n<3&&t(e,n+1)},i.src=b(e)},e=0;e<v;e++)t(e)}(),window.addEventListener("resize",(function(){p&&e._throttledResize(p)})),e._throttledResize(p),e.imageSequenceContainer=e.$el.querySelector(".o-product-imagesequence__canvas-container"),e.imageSequenceContainer&&e.highlightSequence&&v>99&&(e.isDesktop?e.imageSequenceContainer.style.height="400vh":e.imageSequenceContainer.style.height="300vh")}if(e.isVideoSequence&&"true"===e.isVideoSequence){a.gsap.registerPlugin(l.Timeline,u.default,c.default);var T=t.querySelector(".o-product-imagesequence__video");if(T){var A=T.querySelector("video"),O=!1;A.addEventListener("playing",(function(){setTimeout((function(){O||A.pause()}),100)}));var C=t.getAttribute("data-playonce");u.default.create({trigger:t,start:"top top",markers:!1,onEnter:function(){"true"==C?(A.play(),O=!0):(A.currentTime=0,A.play(),O=!0)},onLeaveBack:function(){A.pause(),O=!1}})}}return e}return e=h,r=[{key:"_dispatchProgress",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=100*t;(n=e?n-100:n)>=0&&n<=100&&this.$el.dispatchEvent(new CustomEvent(e?o.SCROLLTRIGGER_PROGRESS_LEAVING:o.SCROLLTRIGGER_PROGRESS,{bubbles:!0,detail:{progressPercent:n,trigger:this.$el,isScrollingUp:r}}))}},{key:"_throttledResize",value:function(t){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((function(){window.innerWidth/window.innerHeight>(y()?1.777777777777778:.5625)?(t.style.width="100vw",t.style.height="unset"):(t.style.width="unset",t.style.height="100vh")}),100)}}],r&&f(e.prototype,r),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(i.default);e.default=_},8175:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(489);var i=a(r(7330)),o=r(4724),s=a(r(6612));function a(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}r(5766),r(2765);var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(a,t);var e,r,n,i=u(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this,t)).VERTICAL_MODE_CLASS="o-thumbnailgallery--isVertical",e.ACTIVE_THUMB_CLASS="o-thumbnailgallery__sliderItemLink--active",e.THUMBNAIL_CLICK_THRESHOLD=2,e.matchBreakpointMedium=(0,o.matchBreakpoint)("medium",e.checkBreakpointMatch.bind(f(e))),e.thumbnails=e.$el.querySelectorAll(".o-thumbnailgallery__sliderItemLink"),e.thumbnails.forEach((function(t){t.addEventListener("click",e.onThumbnailClicked.bind(f(e))),t.addEventListener("mousedown",e.storeInitialThumbnailClickPosition.bind(f(e)))})),e.initialThumbnailClickPosition=null,e.checkBreakpointMatch(),e}return e=a,(r=[{key:"checkBreakpointMatch",value:function(){var t=this;this.matchBreakpointMedium.matches?(s.default.slider(this.$refs.slider).$destroy(),setTimeout((function(){t.$el.querySelectorAll(".o-thumbnailgallery__sliderItemList,.o-thumbnailgallery__sliderItem").forEach((function(t){t.removeAttribute("style"),t.removeAttribute("tabindex")})),t.$refs.sliderItemsList.classList.remove("uk-slider-items"),t.$el.classList.add(t.VERTICAL_MODE_CLASS)}),0)):(this.$refs.sliderItemsList.classList.add("uk-slider-items"),this.$el.classList.remove(this.VERTICAL_MODE_CLASS),s.default.slider(this.$refs.slider,{finite:!0}))}},{key:"onThumbnailClicked",value:function(t){if(this.initialThumbnailClickPosition){var e=Math.abs(t.screenX-this.initialThumbnailClickPosition.x),r=Math.abs(t.screenY-this.initialThumbnailClickPosition.y);if(this.initialThumbnailClickPosition=null,e>this.THUMBNAIL_CLICK_THRESHOLD||r>this.THUMBNAIL_CLICK_THRESHOLD)return void t.preventDefault()}var n=t.currentTarget.dataset.id;this.setActiveThumbnail(n),s.default.slideshow(this.$refs.slideshow).show(n)}},{key:"setActiveThumbnail",value:function(t){var e=this;this.thumbnails.forEach((function(r){r.dataset.id===t?r.classList.add(e.ACTIVE_THUMB_CLASS):r.classList.remove(e.ACTIVE_THUMB_CLASS)}))}},{key:"storeInitialThumbnailClickPosition",value:function(t){this.initialThumbnailClickPosition={x:t.screenX,y:t.screenY}}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.default);e.default=p},1440:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1058),r(489);var i=l(r(7330)),o=r(9521),s=l(r(6612)),a=r(4724);function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(l,t);var e,r,n,i=h(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,t)).navItems=e.$el.querySelectorAll(".o-toggle__nav-item"),e.matchBreakpointMedium=(0,a.matchBreakpoint)("medium",e.checkBreakpointMatch.bind(d(e))),e.$refs.select.addEventListener("change",e.onSelectChange.bind(d(e))),s.default.util.on(e.$refs.toggleItems,"beforehide",e.onItemShow.bind(d(e))),setTimeout((function(){e.setBackground(0)}),200),e}return e=l,(r=[{key:"checkBreakpointMatch",value:function(){var t=s.default.switcher(this.$refs.switcher).index();this.matchBreakpointMedium.matches&&this.setBackground(t)}},{key:"onItemShow",value:function(t){var e=t.detail[0].index();this.setBackground(e),this.setSelectIndex(e)}},{key:"onSelectChange",value:function(){var t=parseInt(this.$refs.select.value);s.default.switcher(this.$refs.switcher).show(t)}},{key:"setSelectIndex",value:function(t){this.$refs.select.selectedIndex=t}},{key:"setBackground",value:function(t){var e=this;this.$refs.activeBackground&&requestAnimationFrame((function(){var r,n,i=(null===(r=e.navItems[t])||void 0===r?void 0:r.offsetWidth)+2,s=null===(n=e.navItems[t])||void 0===n?void 0:n.offsetLeft;o.gsap.to(e.$refs.activeBackground,{x:s,duration:.5}),o.gsap.to(e.$refs.activeBackground,{width:i,duration:.3})}))}}])&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.default);e.default=m},2580:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1058),r(6755),r(3210),r(489);var i,o=r(8483),s=(i=r(9067))&&i.__esModule?i:{default:i},a=r(3028);function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(s,t);var e,r,n,i=u(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=i.call(this,t)).$el.addEventListener("click",e.handleClick.bind(f(e))),e}return e=s,(r=[{key:"handleClick",value:function(t){var e,r,n;if("previous"===this.$el.dataset.formRole){var i=parseInt(this.group.dataset.index);this.form.dispatchEvent(new CustomEvent(a.CHANGE_ACTIVE_GROUP,{detail:{index:i-1}}))}if("next"===this.$el.dataset.formRole){t.preventDefault();var s=parseInt(this.group.dataset.index);this.form.dispatchEvent(new CustomEvent(a.CHANGE_ACTIVE_GROUP,{detail:{index:s+1}}))}var l=this.$el.attributes.href&&this.$el.attributes.href.value,c=!0;l&&"#"!==l&&!l.toLowerCase().startsWith("javascript:")||(c=!1,l=this.$el.textContent.trim()),(0,o.trackEvent)(this.$el,o.CTA_CLICK_EVENT,"cta-click",l,c,!0,{},null!==(e=null===(r=this.form)||void 0===r||null===(n=r.dataset)||void 0===n?void 0:n.trackingParam)&&void 0!==e?e:null)}},{key:"errorCondition",get:function(){return!1}},{key:"reset",value:function(){this.$el.classList.remove("active","disabled"),this.$el.disabled=!1}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(s.default);e.default=p},218:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(8309),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(8483);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).error=e.$refs.error.dataset.error,e.errors=JSON.parse(e.$refs.error.dataset.errors||"{}"),e.changeEvent=e.$el.dataset.changeEvent,e.formRole=e.$refs.input.dataset.formRole,e.formRole&&e.$refs.input.addEventListener("change",e.handleCheckboxChange.bind(h(e))),e.required&&e.inlineValidation&&e.$refs.input.addEventListener("change",(function(t){e.validate(),e.onChangeEvent(t),e.notifyListeners("change",t)})),e}return e=o,(r=[{key:"onChangeEvent",value:function(t){if(this.changeEvent){var e,r={name:t.target.name,value:t.target.value},n=new CustomEvent(this.changeEvent,{detail:r,bubbles:!0});null===(e=this.form)||void 0===e||e.dispatchEvent(n)}}},{key:"errorCondition",get:function(){return this.required&&!this.$refs.input.checked}},{key:"validate",value:function(){this.errorCondition?this.showError():this.hideError()}},{key:"showError",value:function(){var t;this.$el.classList.add("has-error"),this.$refs.error.classList.remove("uk-invisible"),this.$refs.error.textContent=(null===(t=this.errors)||void 0===t?void 0:t.required)||this.error}},{key:"hideError",value:function(){this.$el.classList.remove("has-error"),this.$refs.error.classList.add("uk-invisible")}},{key:"handleCheckboxChange",value:function(t){if(t.target.checked){var e,r,n,i=(0,s.getEventByRole)(this.formRole),o=i.event,a=i.name;o&&(0,s.trackEvent)(this.form,o,a,"",!1,!0,{},null!==(e=null===(r=this.form)||void 0===r||null===(n=r.dataset)||void 0===n?void 0:n.trackingParam)&&void 0!==e?e:null)}}},{key:"reset",value:function(){this.$refs.input.checked=!1,this.hideError(),this.$el.classList.remove("has-error")}},{key:"getState",value:function(){var t={},e=this.$refs.input;return e.checked?t[e.name]=e.value:t[e.name]=null,t}},{key:"setState",value:function(t){this.reset(),t[this.$refs.input.name]&&(this.$refs.input.checked=!0)}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},3483:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(5069),r(7042),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(8309),r(3210),r(1249),r(7327),r(1539),r(6699),r(2023),r(4916),r(5306),r(8674),r(2222),r(4723),r(5827),r(4747),r(2707),r(7941),r(489);var i=l(r(9067)),o=l(r(5125)),s=r(539),a=r(4724);function l(t){return t&&t.__esModule?t:{default:t}}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);
vendor: 5,609 bytes, line 2
2if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,l(v,"constructor",m),l(m,"constructor",p),p.displayName=l(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function u(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function h(t){return function(){var e=this,r=arguments;
2return new Promise((function(n,i){var o=t.apply(e,r);function s(t){u(o,n,i,s,a,"next",t)}function a(t){u(o,n,i,s,a,"throw",t)}s(void 0)}))}}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(m,t);var e,r,n,i,l,u=p(m);function m(t){var e,r,n;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),(r=u.call(this,t)).hasInteracted=!1,r.isAutocompletion="1"===r.$el.dataset.autocompletion,r.country=r.$el.dataset.country,r.mapBoxUrl=r.$el.dataset.mapboxurl,r.language=r.$el.dataset.language,r.changeEvent=r.$el.dataset.changeEvent,r.options=JSON.parse(r.$el.dataset.options),r.inputField=r.$refs.searchInput,r.errorElement=r.$refs.error,r.clearIcon=r.$refs.clearIcon,r.errors=JSON.parse(r.errorElement.dataset.errors||"{}"),r.required=r.inputField.hasAttribute("required"),r.dropdownIcon=r.$refs.dropdownIcon,r.changeEvent=r.$el.dataset.changeEvent,r.addEventListeners(),r.isAutocompletion&&r.initAutoComplete(),null===(e=r.form)||void 0===e||e.addEventListener(s.COUNTRY_CHANGED,r.onCountryChange.bind(g(r))),r.changeEvent)&&(null===(n=r.form)||void 0===n||n.addEventListener(r.changeEvent,(function(t){t.detail.name===r.inputField.name&&(r.inputField.value=(0,a.unarrayify)(t.detail.value),r.updateClearIcon())})));return r}return e=m,r=[{key:"name",get:function(){return this.inputField.name}},{key:"autoCompleteWrapper",get:function(){return this.$el.querySelector(".results_list")}},{key:"addEventListeners",value:function(){var t,e,r,n=this;this.inputField.addEventListener("focus",this.onFocus.bind(this)),this.inputField.addEventListener("input",this.onInput.bind(this)),this.inputField.addEventListener("blur",this.onBlur.bind(this)),this.inputField.addEventListener("change",(function(){return n.dispatchChangeEvent()})),null===(t=this.clearIcon)||void 0===t||t.addEventListener("click",this.clearInput.bind(this)),null===(e=this.dropdownIcon)||void 0===e||e.addEventListener("click",this.toggleDropdown.bind(this)),null===(r=this.form)||void 0===r||r.addEventListener("reset",(function(){return n.reset()}))}},{key:"onFocus",value:function(){this.hasInteracted=!0,this.$el.setAttribute("aria-expanded","true"),this.isAutocompletion&&this.openAutocompleteDropdown()}},{key:"onInput",value:function(){if(this.updateClearIcon(),this.isAutocompletion)if(this.canOpenDropdown()){if("true"===this.$el.getAttribute("aria-expanded")){var t;null===(t=this.autoCompleteJS)||void 0===t||t.start()}}else this.updateDropdownState(!1)}},{key:"onBlur",value:function(){this.hasInteracted=!0,this.validate(),this.updateDropdownState(!1),this.$el.setAttribute("aria-expanded","false")}},{key:"onCountryChange",value:function(t){var e;null!=t&&null!==(e=t.detail)&&void 0!==e&&e.countryCode&&(this.country=t.detail.countryCode)}},{key:"toggleDropdown",value:function(){var t,e="true"===this.$el.getAttribute("aria-expanded");(e||this.canOpenDropdown())&&(this.updateDropdownState(!e),e||(this.inputField.focus(),null===(t=this.autoCompleteJS)||void 0===t||t.start()))}},{key:"updateDropdownState",value:function(t){var e;!this.isAutocompletion&&t||t&&!this.canOpenDropdown()||(this.$el.setAttribute("aria-expanded",t?"true":"false"),null===(e=this.dropdownIcon)||void 0===e||e.setAttribute("uk-icon","icon: ".concat(t?"chevron-up":"chevron-down")),this.isAutocompletion&&this.autoCompleteWrapper?this.autoCompleteWrapper.classList.toggle("uk-hidden",!t):this.autoCompleteWrapper&&this.autoCompleteWrapper.classList.add("uk-hidden"))}},{key:"openAutocompleteDropdown",value:function(){var t;this.isAutocompletion&&this.canOpenDropdown()&&(this.updateDropdownState(!0),this.inputField.focus(),null===(t=this.autoCompleteJS)||void 0===t||t.start())}},{key:"validate",value:function(){this.errorCondition?this.showError():this.hideError()}},{key:"errorCondition",get:function(){return!(!this.required||this.inputField.value&&""!==this.inputField.value.trim())}},{key:"hasLocalOptions",get:function(){return Array.isArray(this.options)&&this.options.length>0}},{key:"canOpenDropdown",value:function(){return!this.errorCondition&&(this.inputField.value.trim().length>0||this.hasLocalOptions)}},{key:"showError",value:function(t){var e;this.$el.classList.add("has-error"),this.errorElement.classList.remove("uk-invisible"),null===(e=this.autoCompleteWrapper)||void 0===e||e.classList.add("uk-hidden"),t?this.errorElement.textContent=t:this.$refs.error.textContent=this.getErrorMessage()}},{key:"hideError",value:function(){var t;this.$el.classList.remove("has-error"),this.errorElement.classList.add("uk-invisible"),null===(t=this.autoCompleteWrapper)||void 0===t||t.classList.remove("uk-hidden")}},{key:"getErrorMessage",value:function(){var t,e=this.$refs.searchInput.value.length;return this.required&&0===e?(null===(t=this.errors)||void 0===t?void 0:t.required)||this.error:""}},{key:"updateClearIcon",value:function(){if(this.clearIcon){var t=this.inputField.value.trim().length>0;this.clearIcon.style.display=t?"inline-block":"none"}}},{key:"formatOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(this.options)?this.options.filter((function(e){return e&&"string"==typeof e.label&&e.label.toLowerCase().includes(t.toLowerCase())})).map((function(t){var e;return{label:t.label,group:null===(e=t.group)||void 0===e?void 0:e.toUpperCase(),source:"local"}})):[]}},{key:"searchMapbox",value:(l=h(c().mark((function t(e){var r,n,i,o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mapBoxUrl){t.next=2;break}return t.abrupt("return",[]);case 2:return n=this.mapBoxUrl.replace("{{query}}",encodeURIComponent(e)).replace("{{country}}",this.country?this.country:this.getHiddenField("country")).replace("{{language}}",null!==(r=this.getHiddenField("language"))&&void 0!==r?r:this.language),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:return o=t.sent,t.abrupt("return",o.features.map((function(t){var e;return{label:t.place_name,value:t.place_name,group:null===(e=t.place_name[0])||void 0===e?void 0:e.toUpperCase(),source:"mapbox",longitude:t.center[0],latitude:t.center[1]}})));case 13:return t.prev=13,t.t0=t.catch(3),this.showError(this.errors.errorMessage),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,this,[[3,13]])}))),function(t){return l.apply(this,arguments)})},{key:"getResults",value:(i=h(c().mark((function t(e){var r,n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.formatOptions(e),!e){t.next=6;break}return t.next=4,this.searchMapbox(e);case 4:n=t.sent,r=r.concat(n);case 6:return r.length?this.hideError():this.showError(this.errors.errorMessage),t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"createListItem",value:function(t){var e=document.createElement("li");return e.innerHTML=t.match||t.value.label,e.setAttribute("aria-selected","false"),e.setAttribute("data-source",t.value.source),e}},{key:"createGroupHeader",value:function(t){var e=document.createElement("span");return e.className="a-combobox__group-header",e.textContent=t,e}},{key:"handleSelection",value:function(t,e){var r=e.value.label;this.inputField.value=r,this.inputField.blur(),this.updateClearIcon(),this.isPostCode()&&this.handleDealerPostCodeSelection(r),this.dispatchChangeEvent()}},{key:"handleDealerPostCodeSelection",value:function(t){var e;"funnel"===(null===(e=this.form)||void 0===e?void 0:e.dataset.layout)?(this.$el.dispatchEvent(new CustomEvent(s.SEARCH_DEALER_EVENT,{bubbles:!0,detail:{postCode:t}})),t?this.showDealerSearchResults():this.hideDealerSearchResults()):this.$el.dispatchEvent(new CustomEvent(s.POST_CODE_CHANGED,{bubbles:!0,detail:{postCode:this.errorCondition?null:t}}))}},{key:"initAutoComplete",value:function(){var t=this;this.autoCompleteJS=new o.default({selector:function(){return t.inputField},data:{src:function(){var e=t.inputField.value.toLowerCase();return t.canOpenDropdown()?t.getResults(e):[]},keys:["label"],cache:!1},threshold:0,debounce:300,searchEngine:"loose",resultItem:{highlight:!0,diacritics:!0},resultsList:{tag:"ul",class:"results_list",position:"afterend",maxResults:20,noResults:!0,element:function(e,r){if(e.innerHTML="",r.results.length){var n=t.groupResultsByCategory(r.results);t.renderGroupedResults(e,n)}}},events:{input:{focus:function(){var e;t.canOpenDropdown()&&(null===(e=t.autoCompleteJS)||void 0===e||e.start())},open:function(){return t.updateDropdownState(!0)},close:function(){return t.updateDropdownState(!1)},selection:function(e){return t.handleSelection(e,e.detail.selection)}}}})}},{key:"groupResultsByCategory",value:function(t){return t.reduce((function(t,e){var r=e.value.group||"__ungrouped__";return t[r]=t[r]||[],t[r].push(e),t}),{})}},{key:"renderGroupedResults",value:function(t,e){var r=this;
2Object.keys(e).sort().forEach((function(n){"__ungrouped__"!==n&&t.appendChild(r.createGroupHeader(n)),e[n].forEach((function(e){var n=r.createListItem(e);t.appendChild(n)}))}))}},{key:"clearInput",value:function(){var t;this.inputField.value="",this.updateClearIcon(),this.hideError(),null===(t=this.autoCompleteWrapper)||void 0===t||t.classList.add("uk-hidden"),this.isPostCode()&&this.handleDealerPostCodeSelection(null),this.dispatchChangeEvent()}},{key:"showDealerSearchResults",value:function(){var t,e=null===(t=this.form)||void 0===t?void 0:t.querySelector(".m-dealersearchresults");e&&e.removeAttribute("hidden")}},{key:"hideDealerSearchResults",value:function(){var t,e=null===(t=this.form)||void 0===t?void 0:t.querySelector(".m-dealersearchresults");e&&!e.hidden&&e.setAttribute("hidden",!0)}},{key:"getState",value:function(){var t={},e=this.inputField.value.trim();return t[this.inputField.name]=e.length>0?e:null,t}},{key:"setState",value:function(t){var e=t[this.inputField.name];e&&(this.inputField.value=e)}},{key:"reset",value:function(){this.clearInput(),this.updateDropdownState(!1),this.hasInteracted=!1}},{key:"isPostCode",value:function(){return"postCode"===this.inputField.dataset.formRole||"dealerPostCode"===this.inputField.dataset.formRole}},{key:"dispatchChangeEvent",value:function(){var t;if(this.changeEvent){var e=new CustomEvent(this.changeEvent,{detail:{name:this.inputField.name,value:this.inputField.value},bubbles:!0});null===(t=this.form)||void 0===t||t.dispatchEvent(e)}}}],r&&f(e.prototype,r),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),m}(i.default);e.default=_},4829:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(4819),r(5003),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(8309),r(3210),r(4603),r(8450),r(4916),r(8386),r(9714),r(4723),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(4724),a=r(5289);function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=u(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},c.apply(this,arguments)}function u(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(o,t);var e,r,n,i=f(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).changeEvent=e.$el.dataset.changeEvent,e.custom="true"===e.$el.dataset.custom,e.custom?(e.display=e.$refs.display,e.toggle=e.$refs.toggle,e.openDatePicker=!0,e.dateFormat=e.resolveDateFormat(e.$el.dataset.customFormat),e.bindEventsCustom(),e.
2initCustom()):e.bindEvents(),e}return e=o,(r=[{key:"bindEvents",value:function(){var t=this;this.isDesktop=(0,s.matchBreakpoint)("small").matches;var e=this.$refs.input;this.required&&this.inlineValidation&&e.addEventListener("blur",(function(){return t.validate()})),e.addEventListener("change",this.onChange.bind(this)),this.isDesktop?e.addEventListener("click",this.openNativePicker.bind(this)):e.addEventListener("pointerdown",(function(){e.disabled||"date"===e.type||(e.type="date")}))}},{key:"openNativePicker",value:function(t){t.preventDefault();var e=this.$refs.input;this.isDesktop&&e&&!e.disabled&&("date"!==e.type&&(e.type="date"),e.focus({preventScroll:!0}),"function"==typeof e.showPicker&&e.showPicker())}},{key:"onChange",value:function(t){if(this.changeEvent){var e,r={name:t.target.name,value:t.target.value},n=new CustomEvent(this.changeEvent,{detail:r,bubbles:!0});null===(e=this.form)||void 0===e||e.dispatchEvent(n)}this.notifyListeners("change",t)}},{key:"initCustom",value:function(){this.$refs.input.value&&(this.display.value=this.formatToLocaleCustom(this.$refs.input.value))}},{key:"bindEventsCustom",value:function(){var t,e=this;this.display.addEventListener("input",this.onDisplayInputCustom.bind(this)),this.display.addEventListener("change",this.onDisplayChangeCustom.bind(this)),null===(t=this.toggle)||void 0===t||t.addEventListener("click",(function(t){t.preventDefault(),e.openNativePickerCustom()})),this.$refs.input.addEventListener("change",this.onPickerChangeCustom.bind(this)),this.display.addEventListener("click",this.onDisplayClickCustom.bind(this)),this.display.addEventListener("focusout",this.onDisplayFocusLeaveCustom.bind(this))}},{key:"onDisplayClickCustom",value:function(){this.openDatePicker?(this.openNativePickerCustom(),this.openDatePicker=!1):this.openDatePicker=!0}},{key:"onDisplayFocusLeaveCustom",value:function(){this.openDatePicker=!0,this.required&&this.inlineValidation&&this.validate()}},{key:"openNativePickerCustom",value:function(){var t=this.$refs.input;if(!t.disabled&&"function"==typeof t.showPicker)try{t.showPicker()}catch(t){}}},{key:"resolveDateFormat",value:function(t){return"auto"===t?a.DateFormat.resolve(document.documentElement.lang||"de-DE"):t?JSON.parse(t):a.ISO_FORMAT}},{key:"formatToLocaleCustom",value:function(t){return a.DateFormat.format(t,this.dateFormat)}},{key:"parseFromLocaleCustom",value:function(t){return a.DateFormat.parse(t,this.dateFormat)}},{key:"isWithinRangeCustom",value:function(t){var e=this.$refs.input,r=e.min,n=e.max;return!(r&&t<r||n&&t>n)}},{key:"syncIsoFromDisplayCustom",value:function(){var t=this.parseFromLocaleCustom(this.display.value);return t&&!this.isWithinRangeCustom(t)&&(t=""),this.$refs.input.value=t,t}},{key:"applyValidationStateCustom",value:function(){var t=this.display.value.trim(),e=this.$refs.input.value;t&&!e?this.showError():this.required&&this.inlineValidation?this.validate():this.hideError()}},{key:"onDisplayInputCustom",value:function(){this.syncIsoFromDisplayCustom(),this.applyValidationStateCustom()}},{key:"onDisplayChangeCustom",value:function(){var t=this.syncIsoFromDisplayCustom();t&&(this.display.value=this.formatToLocaleCustom(t)),this.applyValidationStateCustom(),this.emitChangeCustom(t)}},{key:"onPickerChangeCustom",value:function(){var t=this.$refs.input.value;this.display.value=t?this.formatToLocaleCustom(t):"",this.applyValidationStateCustom(),this.emitChangeCustom(t),this.openDatePicker=!0}},{key:"emitChangeCustom",value:function(t){var e={name:this.$refs.input.name,value:t};if(this.changeEvent){var r,n=new CustomEvent(this.changeEvent,{detail:e,bubbles:!0});null===(r=this.form)||void 0===r||r.dispatchEvent(n)}this.notifyListeners("change",e)}},{key:"showError",value:function(){var t,e=this.$el.classList.contains("has-error");if(c(p(o.prototype),"showError",this).call(this),this.custom){null===(t=this.display)||void 0===t||t.setAttribute("aria-invalid","true");var r=this.$refs.error;if(r&&!e){var n=r.textContent;r.textContent="",r.textContent=n}}}},{key:"hideError",value:function(){var t;c(p(o.prototype),"hideError",this).call(this),this.custom&&(null===(t=this.display)||void 0===t||t.setAttribute("aria-invalid","false"))}},{key:"errorCondition",get:function(){var t=this.$refs.input.value,e=this.validationPattern?new RegExp(this.validationPattern,"g"):null;if(this.required){if(0===t.length)return!0;
2if(e&&null===t.match(e))return!0}else if(t.length>0&&e&&null===t.match(e))return!0;return!1}},{key:"reset",value:function(){this.$refs.input.value=this.custom?"":null,this.custom&&(this.display.value=""),this.hideError()}},{key:"getState",value:function(){var t={},e=this.$refs.input.value;return t[this.$refs.input.name]=e.length>0?e:null,t}},{key:"setState",value:function(t){this.reset();var e=t[this.$refs.input.name];e&&(this.$refs.input.value=e,this.custom&&(this.display.value=this.formatToLocaleCustom(e)))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=m},9557:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(8309),r(1249),r(7327),r(1539),r(4747),r(2222),r(9826),r(9601),r(9600),r(7042),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(4724);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t)).groups=JSON.parse(r.$el.dataset.groups),r.changeEvent=r.$el.dataset.changeEvent,r.labelFormats=JSON.parse(r.$el.dataset.labelFormats),r.filterTagDisplay=r.$refs.filterTagDisplay,r.clearButton=r.$refs.clearButton,r.headline=r.$refs.headline,r.clearButton&&r.clearButton.addEventListener("click",(function(t){t.preventDefault(),r.removeAllTags()})),r.renderAllTags(),null===(e=r.form)||void 0===e||e.addEventListener(r.changeEvent,r.handleTagUpdate.bind(h(r))),r.filterTagDisplay.addEventListener("click",r.handleRemoveTag.bind(h(r))),r}return e=o,(r=[{key:"handleTagUpdate",value:function(t){var e=t.detail,r=e.name,n=e.value;this.groups=this.groups.map((function(e){if(e.name===r){var i=t.detail.tags;i||(i=(0,s.arrayify)(n).map((function(t){return{label:t,value:t}}))),i=i.filter((function(t){return t.value})),e.tags=i}return e})),this.renderAllTags()}},{key:"dispatchChangeEvent",value:function(t){var e;if(this.changeEvent){var r=new CustomEvent(this.changeEvent,{detail:{name:t.name,value:t.tags.map((function(t){return t.value})),tags:t.tags},bubbles:!0});null===(e=this.form)||void 0===e||e.dispatchEvent(r)}}},{key:"renderAllTags",value:function(){var t=this;this.filterTagDisplay.innerHTML="";var e=this.groups.filter((function(t){return t.tags.length>0}));e.forEach((function(r,n){r.tags.forEach((function(e){t.renderSingleTag(r.name,e)})),n<e.length-1&&t.addSeparator()})),this.clearButton&&(0===e.length?this.clearButton.setAttribute("hidden",!0):this.clearButton.removeAttribute("hidden")),this.headline&&(0===e.length?this.headline.setAttribute("hidden",!0):this.headline.removeAttribute("hidden"))}},{key:"renderSingleTag",value:function(t,e){var r=this.formatLabel(t,e),n='\n      <div class="filterTag__items" data-ref="filterTagContaner" data-group="'.concat(t,'" data-value="').concat(e.value,'">\n        <div class="filterTag__items-title">').concat(r,'</div>\n        <button data-ref="closeBtn" class="filterTag__items-btn" uk-icon="close"></button>\n      </div>\n    ');this.filterTagDisplay.insertAdjacentHTML("beforeend",n)}},{key:"addSeparator",value:function(){this.filterTagDisplay.insertAdjacentHTML("beforeend",'<span class="filterTag__separator"></span>')}},{key:"handleRemoveTag",value:function(t){var e=t.target.closest('[data-ref="closeBtn"]');if(e){var r=e.closest('[data-ref="filterTagContaner"]'),n=r.dataset.group,i=r.dataset.value;this.removeTag(n,i)}}},{key:"removeTag",value:function(t,e){this.groups=this.groups.map((function(r){return r.name===t&&(r.tags=r.tags.filter((function(t){return String(t.value)!==e}))),r}));var r=this.groups.find((function(e){return e.name===t}));r&&(this.dispatchChangeEvent(r),this.renderAllTags())}},{key:"removeAllTags",value:function(){var t=this;this.groups.forEach((function(e){e.tags=[],t.dispatchChangeEvent(e),t.renderAllTags()}))}},{key:"formatLabel",value:function(t,e){for(var r=[];e;)r.unshift(e),e=e.parent;var n=Object.assign({prefix:"",suffix:"",start:0,delimiter:" "},this.labelFormats[t]),i=n.start;i<0&&(i=r.length+i);var o=n.delimiter,s=r.map((function(t){return t.label})).slice(i).join(o);return n.prefix+s+n.suffix}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},9795:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(1038),r(7042),r(4916),r(7601),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1539),r(4747),r(8309),r(1249),r(7327),r(6699),r(2023),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(3028);function a(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(o,t);var e,r,n,i=h(o);function o(t){var e,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t)).inputs=a(r.$el.querySelectorAll('input[type="radio"]')),r.changeEvent=r.$el.dataset.changeEvent,null===(e=r.inputs)||void 0===e||e.forEach((function(t){return t.addEventListener("change",r.onChangeFilter.bind(d(r)))})),"series"!==r.$el.dataset.formRole&&"model"!==r.$el.dataset.formRole||r.form.addEventListener(s.SEGMENT_CHANGED,r.onSegmentChanged.bind(d(r))),"model"===r.$el.dataset.formRole&&r.form.addEventListener(s.SERIES_CHANGED,r.onSeriesChanged.bind(d(r))),r.inlineValidation&&r.inputs.forEach((function(t){return t.addEventListener("click",(function(){return r.validate()}))})),r}return e=o,(r=[{key:"name",get:function(){return this.$el.dataset.name}},{key:"errorCondition",get:function(){return this.required&&!this.inputs.some((function(t){return t.checked}))}},{key:"onChangeEvent",value:function(t){var e=this;if(this.changeEvent){var r,n=t.target.name,i=this.inputs.filter((function(t){return t.checked&&t.name===n})).map((function(t){return t.value})),o={name:n,value:i[0],label:i.map((function(t){var r;return null===(r=e.$refs["label_"+t])||void 0===r?void 0:r.innerText}))[0]},s=new CustomEvent(this.changeEvent,{detail:o,bubbles:!0});null===(r=this.form)||void 0===r||r.dispatchEvent(s)}}},{key:"onChangeFilter",value:function(t){var e=t.target.value?[{id:t.target.value}]:[];if("segment"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.SEGMENT_CHANGED,{detail:{segments:e}})),"series"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.SERIES_CHANGED,{detail:{series:e}})),"model"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.MODEL_CHANGED,{detail:{models:e}})),"country"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.COUNTRY_CHANGED,{detail:{countryCode:t.target.value}})),this.notifyListeners("change",t),this.changeEvent){var r,n={name:t.target.name,value:t.target.value},i=new CustomEvent(this.changeEvent,{detail:n,bubbles:!0});null===(r=this.form)||void 0===r||r.dispatchEvent(i)}}},{key:"onSegmentChanged",value:function(t){this.filterOptions("filterSegment",t.detail.segments)}},{key:"onSeriesChanged",value:function(t){this.filterOptions("filterSeries",t.detail.series)}},{key:"filterOptions",value:function(t,e){var r=e.map((function(t){return t.id}));
2this.inputs.forEach((function(e){var n,i=null===(n=e.dataset)||void 0===n?void 0:n[t],o=""===e.value,s=e.closest("label");s&&(o||!r.length||r.includes(i)?(s.closest("label").style.display=null,e.disabled=!1):(s.closest("label").style.display="none",e.disabled=!0))}))}},{key:"reset",value:function(){var t=this;this.inputs.forEach((function(e){e.checked=!1,t.onChangeEvent({target:e})}))}},{key:"getState",value:function(){var t={};return this.inputs.forEach((function(e){e.checked&&(t[e.name]=e.value)})),t}},{key:"setState",value:function(t){var e=this;this.reset(),this.inputs.forEach((function(r){t[r.name]===r.value&&(r.checked=!0),e.onChangeEvent({target:r})}))}}])&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=m},7202:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(8309),r(1249),r(7327),r(1539),r(3210),r(1038),r(8783),r(4747),r(9600),r(2222),r(6699),r(2023),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(539),a=r(4724);function l(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(o,t);var e,r,n,i=h(o);function o(t){var e,r,n,a,l;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).placeholder=n.$el.dataset.placeholder,n.changeEvent=n.$el.dataset.changeEvent,n.placeholderDisplay=n.$el.dataset.placeholderDisplay,n.button=n.$refs.openButton,n.selectoptions=n.$refs.selectoptions,n.icon=n.$refs.icon,n.overlay=n.$refs.overlay,n.displayValues=n.$refs.displayValues,n.button.addEventListener("click",n.toggleDropDown.bind(d(n))),n.overlay.addEventListener("click",n.closeDropDown.bind(d(n))),"series"===n.$el.dataset.formRole||"model"===n.$el.dataset.formRole)&&(null===(a=n.form)||void 0===a||a.addEventListener(s.SEGMENT_CHANGED,n.onSegmentChanged.bind(d(n))));"model"===n.$el.dataset.formRole&&(null===(l=n.form)||void 0===l||l.addEventListener(s.SERIES_CHANGED,n.onSeriesChanged.bind(d(n))));return n.initializeItems(),n.filterGroup=null===(e=n.$el.dataset.filterGroup)||void 0===e?void 0:e.toLowerCase(),null===(r=n.form)||void 0===r||r.addEventListener(n.changeEvent,n.updateSelectedItems.bind(d(n))),n}return e=o,r=[{key:"name",get:function(){return this.$el.dataset.name?this.$el.dataset.name:this.$el.dataset.formRole}},{key:"errorCondition",get:function(){return this.required&&0===this.selectedValues.length}},{key:"values",get:function(){return this.checkboxes.map((function(t){return t.value}))}},{key:"selectedValues",get:function(){return this.checkboxes.filter((function(t){return t.checked})).map((function(t){return t.value}))}},{key:"selectedLabels",get:function(){var t=this;return this.selectedValues.map((function(e){return t.getLabel(e)}
2))}},{key:"getLabel",value:function(t){return this.$el.querySelector('input[value="'.concat(t,'"]')).closest("label").textContent.trim()}},{key:"setOptionState",value:function(t,e){var r=t.closest("li");e?(t.checked=!0,r.classList.add("uk-active"),r.querySelector("span").removeAttribute("hidden")):(t.checked=!1,r.classList.remove("uk-active"),r.querySelector("span").setAttribute("hidden","hidden"))}},{key:"initializeItems",value:function(){var t=this;this.checkboxes=Array.from(this.$refs.selectoptionsitems.querySelectorAll('input[type="checkbox"]')),this.checkboxes.forEach((function(e){return t.setOptionState(e,e.checked&&!e.disabled)})),this.updateDisplayText(),this.onChangeFilter(),this.$refs.selectoptionsitems.querySelectorAll("li").forEach((function(e){return e.addEventListener("click",t.onSelectedItem.bind(t))}))}},{key:"toggleDropDown",value:function(){this.selectoptions.toggleAttribute("hidden"),this.icon.classList.toggle("a-selectMultiple__rotateIcon"),this.overlay.style.display=this.selectoptions.hasAttribute("hidden")?"none":"block"}},{key:"closeDropDown",value:function(){this.selectoptions.hasAttribute("hidden")||(this.toggleDropDown(),this.dispatchOnChangeEvent())}},{key:"onSelectedItem",value:function(t){var e=this;if(this.disabled)return t.preventDefault(),void t.stopImmediatePropagation();var r,n=t.currentTarget,i=null==n?void 0:n.querySelector("input");i&&(this.setOptionState(i,!i.disabled&&!i.checked),this.filterGroup&&(this.$refs.filterControl.classList.remove("uk-active"),r="true"===this.$el.dataset.filterMultiple?0===this.selectedValues.length?"*":this.selectedValues.map((function(t){return"[data-".concat(t,"='1']")})).join(","):0===this.selectedValues.length?"[data-".concat(this.filterGroup,"]"):this.selectedValues.map((function(t){return"[data-".concat(e.filterGroup,"='").concat(t,"']")})).join(","),this.$refs.filterControl.setAttribute("uk-filter-control","filter: "+r+"; group: "+this.filterGroup),this.$refs.filterControl.click())),this.updateDisplayText(),this.dispatchOnChangeEvent(),this.onChangeFilter(t)}},{key:"updateDisplayText",value:function(){"placeholder"===this.placeholderDisplay?this.displayValues.textContent=this.placeholder:"comma-separated-values"===this.placeholderDisplay&&(0===this.selectedValues.length?this.displayValues.textContent=this.placeholder:this.displayValues.textContent=this.selectedLabels.join(", "))}},{key:"onChangeFilter",value:function(t){var e,r=this.selectedValues.map((function(t){return{id:t}}));if("segment"===this.$el.dataset.formRole)null===(e=this.form)||void 0===e||e.dispatchEvent(new CustomEvent(s.SEGMENT_CHANGED,{detail:{segments:r}}));else if("series"===this.$el.dataset.formRole){var n;null===(n=this.form)||void 0===n||n.dispatchEvent(new CustomEvent(s.SERIES_CHANGED,{detail:{series:r}}))}else if("model"===this.$el.dataset.formRole){var i;null===(i=this.form)||void 0===i||i.dispatchEvent(new CustomEvent(s.MODEL_CHANGED,{detail:{models:r}}))}this.notifyListeners("change",t)}},{key:"dispatchOnChangeEvent",value:function(){var t=this;if(this.changeEvent){var e,r=new CustomEvent(this.changeEvent,{detail:{name:this.name,value:this.selectedValues,label:this.selectedLabels,tags:this.selectedValues.map((function(e){return{value:e,label:t.getLabel(e)}}))},bubbles:!0});null===(e=this.form)||void 0===e||e.dispatchEvent(r)}}},{key:"onSegmentChanged",value:function(t){this.filterOptions("filterSegment",t.detail.segments)}},{key:"onSeriesChanged",value:function(t){this.filterOptions("filterSeries",t.detail.series)}},{key:"resetSelection",value:function(t){t.checked=!1;var e=t.closest("li");e.classList.toggle("uk-active",!1),e.querySelector("span").toggleAttribute("hidden")}},{key:"filterOptions",value:function(t,e){var r=this,n=e.map((function(t){return t.id})),i=this.$refs.selectoptions.querySelectorAll('input[type="checkbox"]');null==i||i.forEach((function(e){var i,o=null===(i=e.dataset)||void 0===i?void 0:i[t];!n.length||n.includes(o)?(e.closest("li").style.display="flex",e.disabled=!1):(e.closest("li").style.display="none",e.disabled=!0,e.checked&&r.resetSelection(e))})),this.updateDisplayText()}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t){var e=this.$refs.selectoptionsitems.querySelector('input[value="'.concat(t,'"]'));return this.resetSelection(e),void this.updateDisplayText()}
2this.checkboxes.forEach((function(t){t.checked=!1;var e=t.closest("li");e.classList.remove("uk-active"),e.querySelector("span").setAttribute("hidden","true")})),this.updateDisplayText()}},{key:"getState",value:function(){return l({},this.name,this.selectedValues)}},{key:"setState",value:function(t){var e=this,r=(0,a.arrayify)(t[this.name]);this.checkboxes.forEach((function(t){return e.setOptionState(t,r.includes(t.value))})),this.updateDisplayText()}},{key:"setDisabled",value:function(t){this.disabled=t}},{key:"updateSelectedItems",value:function(t){t.detail.name===this.name&&this.setState(l({},this.name,(0,a.arrayify)(t.detail.value)))}}],r&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=m},2942:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(1038),r(7042),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(4916),r(7601),r(7327),r(9826),r(5069),r(8309),r(3210),r(6992),r(8783),r(3948),r(285),r(1637),r(1249),r(3123),r(9494),r(9653),r(6699),r(2023),r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(539);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(o,t);var e,r,n,i=d(o);function o(t){var e,r,n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).error=n.$refs.error.dataset.error,n.errors=JSON.parse((null===(e=n.$refs.error)||void 0===e?void 0:e.dataset.errors)||"{}"),n.changeEvent=n.$refs.select.dataset.changeEvent,n.hasInteracted=!1,n.$refs.select.addEventListener("focus",(function(){n.hasInteracted=!0,n.validate()})),n.$refs.select.addEventListener("blur",(function(){n.hasInteracted=!0,n.validate()})),n.$refs.select.addEventListener("change",(function(t){t.preventDefault(),n.onChange(t),n.validate()}
2)),"series"!==n.$el.dataset.formRole&&"model"!==n.$el.dataset.formRole||n.form.addEventListener(s.SEGMENT_CHANGED,n.onSegmentChanged.bind(m(n))),"model"===n.$el.dataset.formRole&&n.form.addEventListener(s.SERIES_CHANGED,n.onSeriesChange.bind(m(n))),"time"===n.$el.dataset.formRole)"event"===n.getHiddenField("caseType")&&(n.form.addEventListener(s.DAY_CHANGED,n.onDayChange.bind(m(n))),n.filterTimeslots(null));else if("date"===n.$el.dataset.formRole){var a;null===(a=n.$refs.select)||void 0===a||a.querySelectorAll("option").forEach((function(t){if(""!==t.value){var e=t.value;/\\d{4}-\\d{2}-\\d{2}/.test(e)&&(t.innerText=new Date(e).toLocaleDateString(n.getHiddenField("language"),{day:"2-digit",month:"2-digit",year:"2-digit"}))}}))}return"country"!==n.$el.dataset.formRole&&"phonePrefix"!==n.$el.dataset.formRole||n.form.addEventListener(s.COUNTRY_CHANGED,n.onCountryChange.bind(m(n))),n.label=n.$el.querySelector(".js-custom-select-label"),n.label&&(n.label.addEventListener("click",n.handleLabelClick.bind(m(n)),!1),n.label.addEventListener("keydown",n.handleLabelKeydown.bind(m(n)),!1)),n.options=n.$el.querySelector(".js-custom-select-options"),n.options&&(n.optionsList=n.options.querySelectorAll(".js-custom-select-option"),n.optionsList.forEach((function(t){t.addEventListener("click",n.handleOptionClick.bind(m(n)),!1),t.addEventListener("keydown",n.handleOptionKeydown.bind(m(n)),!1)}))),n.selectField=n.$el.querySelector(".js-select-field"),n.selectField&&n.selectField.addEventListener("change",n.handleSelectChange.bind(m(n))),n.initialSelectedIndex=n.$refs.select.selectedIndex,n.initPreselectedValue(),window.addEventListener("resize",n.adjustDropdownHeight.bind(m(n))),document.addEventListener("click",n.hideSelectOptions.bind(m(n))),document.addEventListener(s.CONTROLLERS_INITIALIZED,(function(){n.$refs.select.value&&n.onChange(null)})),null===(r=n.form)||void 0===r||r.addEventListener(n.changeEvent,n.updateSelectedItem.bind(m(n))),n}return e=o,(r=[{key:"selectedOption",get:function(){return this.$refs.select.options[this.$refs.select.selectedIndex]}},{key:"errorCondition",get:function(){var t;return this.required?!this.$refs.select.value||this.selectedOption.disabled:!(null===(t=this.selectedOption)||void 0===t||!t.disabled||!this.$refs.select.value)}},{key:"validate",value:function(){this.errorCondition?this.showError():this.hideError()}},{key:"showError",value:function(){var t;this.$el.classList.add("has-error"),this.$refs.error.classList.remove("uk-invisible"),this.$refs.error.textContent=(null===(t=this.errors)||void 0===t?void 0:t.required)||this.error}},{key:"hideError",value:function(){this.$el.classList.remove("has-error"),this.$refs.error.classList.add("uk-invisible")}},{key:"handleLabelClick",value:function(){this.toggleDropdown(),this.options.classList.contains("hide")||this.focusSelectedOrFirstOption()}},{key:"handleLabelKeydown",value:function(t){var e=!this.options.classList.contains("hide");switch(t.key){case"Enter":case" ":t.preventDefault(),this.toggleDropdown(),e||this.focusSelectedOrFirstOption();break;case"ArrowDown":t.preventDefault(),e||this.toggleDropdown(),this.focusSelectedOrFirstOption();break;case"ArrowUp":t.preventDefault(),e||this.toggleDropdown(),this.focusLastOption();break;case"Escape":e&&(t.preventDefault(),this.toggleDropdown())}}},{key:"handleOptionClick",value:function(t){this.selectField.value=t.currentTarget.dataset.value,this.selectField.dispatchEvent(new Event("change")),this.toggleDropdown(),this.label.focus()}},{key:"handleOptionKeydown",value:function(t){var e=l(this.optionsList).filter((function(t){return!t.hasAttribute("disabled")})),r=e.indexOf(t.currentTarget);switch(t.key){case"ArrowDown":t.preventDefault(),r<e.length-1&&e[r+1].focus();break;case"ArrowUp":t.preventDefault(),r>0?e[r-1].focus():this.label.focus();break;case"Enter":case" ":t.preventDefault(),this.selectField.value=t.currentTarget.dataset.value,this.selectField.dispatchEvent(new Event("change")),this.toggleDropdown(),this.label.focus();break;case"Escape":t.preventDefault(),this.toggleDropdown(),this.label.focus();break;case"Tab":this.toggleDropdown()}}},{key:"focusSelectedOrFirstOption",value:function(){var t=l(this.optionsList),e=t.find((function(t){return t.classList.contains("selected")&&!t.hasAttribute("disabled")}))||t.find((function(t){return!t.hasAttribute("disabled")}));null==e||e.focus()}},{key:"focusLastOption",value:function(){var t=l(this.optionsList),e=l(t).reverse().find((function(t){return!t.hasAttribute("disabled")}));null==e||e.focus()}},{key:"handleSelectChange",value:function(){var t=this.selectField.value;this.updateSelectDropdown(t)}},{key:"hideSelectOptions",value:function(t){var e;!t.target.classList.contains("a-select__label")&&null!==(e=this.label)&&void 0!==e&&e.classList.contains("opened")&&this.toggleDropdown()}},{key:"updateSelectDropdown",value:function(t){var e=this;this.optionsList.forEach((function(r){r.dataset.value===t?(e.label.innerHTML=r.innerHTML,e.label.dataset.value=t,r.classList.add("selected"),r.setAttribute("aria-selected","true")):(r.classList.remove("selected"),r.setAttribute("aria-selected","false"))}))}},{key:"toggleDropdown",value:function(){var t=this,e=this.options.classList.contains("hide");e&&document.querySelectorAll(".js-custom-select-options").forEach((function(e){var r;if(e!==t.options){e.classList.add("hide"),e.setAttribute("aria-hidden","true"),e.style.removeProperty("width");var n=null===(r=e.closest("[data-controller]"))||void 0===r?void 0:r.querySelector(".js-custom-select-label");n&&(n.classList.remove("opened"),n.setAttribute("aria-expanded","fal
2se"))}})),this.options.classList.toggle("hide"),this.label.classList.toggle("opened"),this.label.setAttribute("aria-expanded",e?"true":"false"),this.options.setAttribute("aria-hidden",e?"false":"true"),this.adjustDropdownHeight()}},{key:"closeDropdown",value:function(){this.options.classList.add("hide"),this.label.classList.remove("opened"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true"),this.options.style.removeProperty("width")}},{key:"dispatchChange",value:function(){if(this.changeEvent){var t,e,r=this.$refs.select,n={name:r.name,value:r.value,label:null===(t=r.options[r.selectedIndex])||void 0===t||null===(e=t.text)||void 0===e?void 0:e.trim()},i=new CustomEvent(this.changeEvent,{detail:n,bubbles:!0});this.form.dispatchEvent(i)}}},{key:"initPreselectedValue",value:function(){var t,e,r,n=null===(e=new URL(null===(t=window.location)||void 0===t?void 0:t.href).searchParams)||void 0===e?void 0:e.get(null===(r=this.selectField)||void 0===r?void 0:r.name);n&&(this.selectField.value=n,this.updateSelectDropdown(n))}},{key:"adjustDropdownHeight",value:function(){this.options&&(this.options.style.height="auto")}},{key:"resetSelectContent",value:function(){var t=this.$el.querySelector("select");if(t&&t){var e=t.innerHTML;if(!t.querySelector('option[value=""]'))return;t.value="",t.innerHTML=e}}},{key:"onChange",value:function(t){var e=this.$refs.select,r=null==e?void 0:e.value,n=r?[{id:r}]:[];"segment"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.SEGMENT_CHANGED,{detail:{segments:n}})),"series"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.SERIES_CHANGED,{detail:{series:n}})),"model"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.MODEL_CHANGED,{detail:{models:n}})),"country"===this.$el.dataset.formRole?this.form.dispatchEvent(new CustomEvent(s.COUNTRY_CHANGED,{detail:{countryCode:r}})):"date"===this.$el.dataset.formRole&&this.form.dispatchEvent(new CustomEvent(s.DAY_CHANGED,{detail:{day:r}})),this.notifyListeners("change",t),t&&this.dispatchChangeEvent()}},{key:"dispatchChangeEvent",value:function(){if(this.changeEvent){var t,e,r,n=this.$refs.select,i=null===(t=n.options[n.selectedIndex])||void 0===t||null===(e=t.text)||void 0===e?void 0:e.trim(),o={name:this.$refs.select.name,value:this.$refs.select.value,label:i,tags:[{label:i,value:this.$refs.select.value}]},s=new CustomEvent(this.changeEvent,{detail:o,bubbles:!0});null===(r=this.form)||void 0===r||r.dispatchEvent(s)}}},{key:"onSegmentChanged",value:function(t){this.filterOptions("filterSegment",t.detail.segments),this.resetSelectContent()}},{key:"onSeriesChange",value:function(t){this.filterOptions("filterSeries",t.detail.series),this.resetSelectContent()}},{key:"onDayChange",value:function(t){this.filterTimeslots(t.detail.day)}},{key:"onCountryChange",value:function(t){var e,r,n,i;(null==t||null===(e=t.detail)||void 0===e?void 0:e.countryCode)!==this.$refs.select.value&&null!=t&&null!==(r=t.detail)&&void 0!==r&&r.countryCode&&l(null!==(n=null===(i=this.$refs.select)||void 0===i?void 0:i.querySelectorAll("option"))&&void 0!==n?n:[]).find((function(e){return e.value===t.detail.countryCode}))&&this.setValue(t.detail.countryCode)}},{key:"filterTimeslots",value:function(t){var e;if(t){var r=new Date(Date.now()),n=new Date(t),i=null===(e=this.$refs.select)||void 0===e?void 0:e.querySelectorAll("option"),o=0;r.getDay()===n.getDay()&&r.getMonth()===n.getMonth()&&r.getFullYear()===n.getFullYear()?null==i||i.forEach((function(t){if(""!==t.value){var e=a(t.innerText.split(":").map((function(t){return Number.parseInt(t)})),2),n=e[0],i=e[1];r.getHours()>n||r.getHours()===n&&r.getMinutes()>=i?(t.style.display="none",t.disabled=!0):(t.style.display=null,t.disabled=!1,o++)}})):null==i||i.forEach((function(t){t.style.display=null,t.disabled=!1,o++})),this.$refs.select.disabled=0===o}else this.$refs.select.disabled=!0}},{key:"filterOptions",value:function(t,e){var r,n=e.map((function(t){return t.id})),i=null===(r=this.$refs.select)||void 0===r?void 0:r.querySelectorAll("option");
2null==i||i.forEach((function(e){var r,i=null===(r=e.dataset)||void 0===r?void 0:r[t];""===e.value||!n.length||n.includes(i)?(e.style.display="block",e.disabled=!1):(e.style.display="none",e.disabled=!0)}))}},{key:"setValue",value:function(t){this.$refs.select.value=t,this.$refs.select.dispatchEvent(new Event("change"))}},{key:"reset",value:function(){var t=this.$refs.select;t&&(this.setValue(null),t.selectedIndex=this.initialSelectedIndex,this.hideError())}},{key:"getState",value:function(){var t={};return this.$refs.select&&(t[this.$refs.select.name]=this.$refs.select.value),t}},{key:"setState",value:function(t){this.reset();var e=t[this.$refs.select.name];e&&(this.$refs.select.value=e,this.dispatchChange())}},{key:"updateSelectedItem",value:function(t){if(t.detail.name===this.$refs.select.name){var e=Array.isArray(t.detail.value)?t.detail.value[0]:t.detail.value;this.$refs.select.value=e||"",this.handleSelectChange()}}}])&&h(e.prototype,r),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=y},970:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(3210),r(8309),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,t)).error=e.$refs.error.dataset.error,e.errors=JSON.parse(e.$refs.error.dataset.errors||"{}"),e.minlength=e.$refs.input.minLength,e.maxlength=e.$refs.input.maxLength,e.required="true"===e.$el.dataset.required,e.changeEvent=e.$el.dataset.changeEvent,e.placeholder=e.$refs.input.getAttribute("placeholder"),e.placeholderAsValue="true"===e.$el.dataset.placeholderAsValue,e.hasInteracted=!1,e.$refs.input.addEventListener("focus",(function(){e.hasInteracted=!0})),e.$refs.input.addEventListener("blur",(function(t){e.validate(),e.dispatchChangeEvent(t),e.notifyListeners("change",t)})),e}return e=l,(r=[{key:"dispatchChangeEvent",value:function(t){if(this.changeEvent){var e=t.target,r=e.value.trim();!r&&this.placeholderAsValue&&(r=this.placeholder);var n={name:e.name,value:r},i=new CustomEvent(this.changeEvent,{detail:n});this.form.dispatchEvent(i)}}},{key:"getState",value:function(){var t={},e=this.$refs.input.value.trim();return!e&&this.placeholderAsValue?t[this.$refs.input.name]=this.placeholder:t[this.$refs.input.name]=e.length>0?e:null,t}},{key:"setState",value:function(t){this.reset();var e=t[this.$refs.input.name];e&&(this.$refs.input.value=e)}},{key:"errorCondition",get:function(){var t=this.$refs.input.value.trim().length;return this.required&&0===t?!this.placeholderAsValue:this.minlength>=0&&t<this.minlength||this.maxlength>=0&&t>this.maxlength}},{key:"validate",value:function(){this.errorCondition?this.showError():this.hideError()}},{key:"showError",value:function(){this.$el.classList.add("has-error"),this.$refs.error.classList.remove("uk-invisible"),this.$refs.error.textContent=this.getErrorMessage()}},{key:"hideError",value:function(){this.$el.classList.remove("has-error"),this.$refs.error.classList.add("uk-invisible")}},{key:"getErrorMessage",value:function(){var t,e,r,n=this.$refs.input.value.length;return this.required&&0===n?(null===(t=this.errors)||void 0===t?void 0:t.required)||this.error:this.minlength>=0&&n<this.minlength?(null===(e=this.errors)||void 0===e?void 0:e.minlength)||this.error:this.maxlength>=0&&n>this.maxlength?(null===(r=this.errors)||void 0===r?void 0:r.maxlength)||this.error:""}},{key:"reset",value:function(){this.$refs.input.value="",this.hasInteracted=!1,this.hideError()}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(9067))&&i.__esModule?i:{default:i}).default);e.default=u},539:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WISHLIST_FETCHED=e.WISHLIST_COUNT_CHANGED=e.WISHLISTITEM__REMOVED=e.WISHLISTITEM__OPTION_CHANGED=e.UNLOCK_SCROLLING_EVENT=e.TOGGLE_TEASER_IMAGE=e.TOGGLE_CHANGED_EVENT=e.TAB_CLICKED=e.SHOW_SPINNER_LOADING=e.SHOW_SLIDER_EVENT=e.SHOW_MODAL_EVENT=e.SHOW_DIVEIN_
2EVENT=e.SHOW_API_FORM_ERRORS_EVENT=e.SHOWMORE_FILTER=e.SHOWMORE_DYNAMIC_ITEMS_LOADED=e.SERIES_CHANGED=e.SELECTED_DEALER_DATA_EVENT=e.SEGMENT_CHANGED=e.SEARCH_STARTED=e.SEARCH_SAVED=e.SEARCH_RESULTS_UPDATED=e.SEARCH_FORM_RESET=e.SEARCH_ERROR=e.SEARCH_DEALER_EVENT=e.SCROLLTRIGGER_PROGRESS_LEAVING=e.SCROLLTRIGGER_PROGRESS=e.RESET_DEALER_EVENT=e.PRODUCT_SEARCH_PARAM_CHANGED=e.PRODUCT_SEARCH_PARAMS_CHANGED=e.POST_CODE_CHANGED=e.OPEN_FINANCING=e.MODEL_CHANGED=e.MARKET_PREFERENCES_FETCHED=e.LOCK_SCROLLING_EVENT=e.LANGUAGE_CHANGED=e.HIDE_SLIDER_EVENT=e.HIDE_DIVEIN_EVENT=e.FILTER_TAG_REMOVED=e.DEALER_SEARCH_PARAM_CHANGED=e.DAY_CHANGED=e.COUNTRY_CHANGED=e.CONTROLLERS_INITIALIZED=e.COMPARE_SELECT_CLICK=e.COMPARE_ITEM_CLICK=e.CHANGE_SHOWMORE_DYNAMIC_ITEMS=e.CHANGE_POSTCODE=e.CHANGE_ACTIVE_GROUP=void 0;e.LOCK_SCROLLING_EVENT="LOCK_SCROLLING_EVENT";e.UNLOCK_SCROLLING_EVENT="UNLOCK_SCROLLING_EVENT";e.SHOW_MODAL_EVENT="SHOW_MODAL_EVENT";e.SHOW_DIVEIN_EVENT="SHOW_DIVEIN_EVENT";e.HIDE_DIVEIN_EVENT="HIDE_DIVEIN_EVENT";e.SHOW_SLIDER_EVENT="SHOW_SLIDER_EVENT";e.HIDE_SLIDER_EVENT="HIDE_SLIDER_EVENT";e.SCROLLTRIGGER_PROGRESS="SCROLLTRIGGER_PROGRESS";e.SCROLLTRIGGER_PROGRESS_LEAVING="SCROLLTRIGGER_PROGRESS_LEAVING";e.TAB_CLICKED="TAB_CLICKED";e.SHOWMORE_FILTER="SHOWMORE_FILTER";e.CONTROLLERS_INITIALIZED="CONTROLLERS_INITIALIZED";e.TOGGLE_TEASER_IMAGE="TOGGLE_TEASER_IMAGE";e.PRODUCT_SEARCH_PARAM_CHANGED="PRODUCT_SEARCH_PARAM_CHANGED";e.PRODUCT_SEARCH_PARAMS_CHANGED="PRODUCT_SEARCH_PARAMS_CHANGED";e.DEALER_SEARCH_PARAM_CHANGED="DEALER_SEARCH_PARAM_CHANGED";e.CHANGE_SHOWMORE_DYNAMIC_ITEMS="CHANGE_SHOWMORE_DYNAMIC_ITEMS";e.SHOWMORE_DYNAMIC_ITEMS_LOADED="SHOWMORE_DYNAMIC_ITEMS_LOADED";e.WISHLIST_FETCHED="WISHLIST_FETCHED";e.WISHLIST_COUNT_CHANGED="WISHLIST_COUNT_CHANGED";e.OPEN_FINANCING="OPEN_FINANCING";e.WISHLISTITEM__REMOVED="WISHLISTITEM__REMOVED";e.SHOW_SPINNER_LOADING="SHOW_SPINNER_LOADING";e.WISHLISTITEM__OPTION_CHANGED="WISHLISTITEM__OPTION_CHANGED";e.SEARCH_STARTED="SEARCH_STARTED";e.SEARCH_ERROR="SEARCH_ERROR";e.SEARCH_RESULTS_UPDATED="SEARCH_RESULTS_UPDATED";e.SEARCH_FORM_RESET="SEARCH_FORM_RESET";e.SEARCH_SAVED="SEARCH_SAVED";e.FILTER_TAG_REMOVED="FILTER_TAG_REMOVED";e.MARKET_PREFERENCES_FETCHED="MARKET_PREFERENCES_FETCHED";e.SHOW_API_FORM_ERRORS_EVENT="SHOW_API_FORM_ERRORS_EVENT";e.SEARCH_DEALER_EVENT="SEARCH_DEALER_EVENT";e.RESET_DEALER_EVENT="RESET_DEALER_EVENT";e.CHANGE_POSTCODE="CHANGE_POSTCODE";e.SELECTED_DEALER_DATA_EVENT="SELECTED_DEALER_DATA_EVENT";e.SEGMENT_CHANGED="SEGMENT_CHANGED";e.SERIES_CHANGED="SERIES_CHANGED";e.MODEL_CHANGED="MODEL_CHANGED";e.COUNTRY_CHANGED="COUNTRY_CHANGED";e.POST_CODE_CHANGED="POST_CODE_CHANGED";e.DAY_CHANGED="DAY_CHANGED";e.LANGUAGE_CHANGED="LANGUAGE_CHANGED";e.CHANGE_ACTIVE_GROUP="CHANGE_ACTIVE_GROUP";e.TOGGLE_CHANGED_EVENT="toggle_changed";e.COMPARE_ITEM_CLICK="compare_item_click";e.COMPARE_SELECT_CLICK="compare_select_click"},8262:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(4526),i=r(1666),o=r(7117),s=r(2769),a=r(3817),l=r(1373),c=r(6837),u=r(4846),h=r(7806),f=r(2011),d=r(2665),p=r(540),m=r(1545),g=r(6298),y=r(6337),_=r(3821),v={MarketWishlistButtonMixin:n.MarketWishlistButtonMixin,SearchButtonMixin:i.SearchButtonMixin,ShopProductTeaserMixin:o.ShopProductTeaserMixin,MarketVehicleTeaserMixin:s.MarketVehicleTeaserMixin,VehicleSlideshowMixin:a.VehicleSlideshowMixin,FilterTagHandleRemovalMixin:l.FilterTagHandleRemovalMixin,SetStateFromUrlMixin:c.SetStateFromUrlMixin,SetComplexStateFromUrlMixin:u.SetComplexStateFromUrlMixin,UpdateMultiselectOptionsMixin:h.UpdateMultiselectOptionsMixin,UpdateRangeMixin:f.UpdateRangeMixin,UpdateSelectMixin:d.UpdateSelectMixin,UpdateSelectMultipleMixin:p.UpdateSelectMultipleMixin,LockFieldMixin:m.LockFieldMixin,ComboboxGeopointSearchMixin:_.ComboboxGeopointSearchMixin,MarketWishlistBadgeMixin:y.MarketWishlistBadgeMixin,MarketUserPreferencesMixin:g.MarketUserPreferencesMixin};e.default=v},4526:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.MarketWishlistButtonMixin=void 0,r(1539),r(8674),r(6699),r(2023),r(489);var i=a(r(2106)),o=r(539),s=a(r(6612));function a(t){return t&&t.__esModule?t:{default:t}}function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,c(v,"constructor",m),c(m,"constructor",p),p.displayName=c(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),c(v,a,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function c(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(a,t);var e,r,n,i=f(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),e=i.call(this,t),t.updateIcon=function(t,e){var r=t.querySelector(".a-button__icon-wrapper"),n=e?"bookmark-primary":"bookmark";r.setAttribute("uk-icon","icon: ".concat(n)),s.default.icon(r,{icon:n})},t.$el.addEventListener(o.MARKET_PREFERENCES_FETCHED,e.handlePrefs.bind(t)),e}return e=a,r=[{key:"postInit",value:function(t){t.$el.addEventListener("click",this.handleClick.bind(t))}},{key:"handleClick",value:function(){var t=this,e=this.$el.formAction;fetch(e,{method:"POST",headers:{"Content-Type":"application/json"}}).then(function(){var e,r=(e=l().mark((function e(r){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.t1=t.$el,e.next=4,r.json();case 4:if(e.t3=n=e.sent,e.t2=null===e.t3,e.t2){e.next=8;break}e.t2=void 0===n;case 8:if(!e.t2){e.next=12;break}e.t4=void 0,e.next=13;break;case 12:e.t4=n.wishlisted;case 13:return e.t5=e.t4,e.abrupt("return",e.t0.updateIcon.call(e.t0,e.t1,e.t5));case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(t){c(o,n,i,s,a,"next",t)}function a(t){c(o,n,i,s,a,"throw",t)}s(void 0)}))});return function(t){return r.apply(this,arguments)}}())}},{key:"handlePrefs",value:function(t){var e;t.detail&&"savedVehicles"in t.detail&&null!==(e=t.detail.savedVehicles)&&void 0!==e&&e.includes(this.productID)&&this.updateIcon(this.$el,!0)}}],r&&u(e.prototype,r),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.default);e.MarketWishlistButtonMixin=m},1666:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.SearchButtonMixin=void 0,r(7941),r(1539),r(8674),r(8862),r(489);var i=a(r(2106)),o=r(539),s=a(r(6612));function a(t){return t&&t.__esModule?t:{default:t}}function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,c(v,"constructor",m),c(m,"constructor",p),p.displayName=c(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),c(v,a,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function c(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(p,t);var e,r,n,i,a,d=f(p);function p(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),d.call(this,t)}return e=p,r=[{key:"postInit",value:function(t){var e,r;"submit"===this.$el.type?(null===(e=t.form)||void 0===e||e.addEventListener(o.SEARCH_STARTED,this.handleSearchStarted.bind(t)),null===(r=t.form)||void 0===r||r.addEventListener(o.SEARCH_RESULTS_UPDATED,this.handleSearchResult.bind(t)),t.buttonSpinner=this.$el.querySelector(".a-button__spinner"),t.submitButtonTextElement=this.$el.querySelector(".a-button__text"),t._toggleButtonSpinner=this._toggleButtonSpinner.bind(t)):"save"===this.$el.dataset.formRole?(t.updateIcon=function(t,e){var r=t.querySelector(".a-button__icon-wrapper"),n=e?"bookmark-primary":"bookmark";r.setAttribute("uk-icon","icon: ".concat(n)),s.default.icon(r,{icon:n})},this.$el.addEventListener("click",this.saveSearch.bind(t))):"detailSearch"===this.$el.dataset.formRole&&this.$el.addEventListener("click",this.showDetailSearch.bind(t))}},{key:"saveSearch",value:(i=l().mark((function t(){var e,r,n,i,s,a,c;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(n=null===(e=this.form)||void 0===e?void 0:e.controller.params)&&0!==Object.keys(n).length){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,fetch(this.$el.formAction,{method:"POST",body:JSON.stringify({params:n.state})});case 6:return i=t.sent,t.next=9,i.json();case 9:(s=t.sent).success||null===(a=this.form)||void 0===a||a.controller._handleError(s.status),null===(r=this.form)||void 0===r||r.dispatchEvent(new CustomEvent(o.SEARCH_SAVED,{detail:s,bubbles:!0})),this.updateIcon(this.$el,!0),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),null===(c=this.form)||void 0===c||c.controller._handleError(0);case 18:case"end":return t.stop()}}),t,this,[[0,15]])})),a=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function s(t){c(o,r,n,s,a,"next",t)}function a(t){c(o,r,n,s,a,"throw",t)}s(void 0)}))},function(){return a.apply(this,arguments)})},{key:"showDetailSearch",value:function(t){var e;t.preventDefault(),null===(e=this.form)||void 0===e||e.controller.submitForm(this.$el)}},{key:"handleSearchStarted",value:function(){this._toggleButtonSpinner(!0),this.$el.toggleAttribute("disabled",!0)}},{key:"handleSearchResult",value:function(t){var e;this._toggleButtonSpinner(!1),this.$el.toggleAttribute("disabled",!1);var r=this.$el.querySelector(".a-button__text");r&&null!==(e=t.detail)&&void 0!==e&&e.resultCountText&&(r.innerText=t.detail.resultCountText)}},{key:"_toggleButtonSpinner",value:function(t){this.buttonSpinner&&(t?this.buttonSpinner.removeAttribute("hidden"):this.buttonSpinner.setAttribute("hidden",!0))}}],r&&u(e.prototype,r),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),p}(i.default);e.SearchButtonMixin=m},6298:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.MarketUserPreferencesMixin=void 0,r(1539),r(8674),r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(539);function a(){a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,c(v,"constructor",m),c(m,"constructor",p),p.displayName=c(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,l,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),c(v,l,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=null,m=null,g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(d,t);var e,r,n,i,o,f=h(d);function d(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),(e=f.call(this,t)).$el=t.$el,e.PREFS_URL="/wls/api/market/preferences",e}return e=d,r=[{key:"postInit",value:function(){var t=this;p?this.$el.dispatchEvent(new CustomEvent(s.MARKET_PREFERENCES_FETCHED,{detail:p})):(null==m&&(m=this._fetchPreferences()),m.then((function(e){t.$el.dispatchEvent(new CustomEvent(s.MARKET_PREFERENCES_FETCHED,{detail:null!=e?e:{}}))})))}},{key:"_fetchPreferences",value:(i=a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!p){t.next=2;break}return t.abrupt("return",p);case 2:return t.prev=2,t.next=5,fetch(this.PREFS_URL,{method:"get",credentials:"include"});case 5:if(200!==(e=t.sent).status){t.next=11;break}return t.next=9,e.json();case 9:return p=t.sent,t.abrupt("return",p);case 11:return t.abrupt("return",{});case 14:return t.prev=14,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",{});case 18:case"end":return t.stop()}}),t,this,[[2,14]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function s(t){l(o,r,n,s,a,"next",t)}function a(t){l(o,r,n,s,a,"throw",t)}s(void 0)}))},function(){return o.apply(this,arguments)})}],r&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),d}(o.default);e.MarketUserPreferencesMixin=g},3817:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.VehicleSlideshowMixin=void 0,r(489);var i=a(r(2106)),o=r(3028),s=a(r(6612));function a(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(a,t);var e,r,n,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(r=[{key:"postInit",value:function(t){document.addEventListener(o.TOGGLE_TEASER_IMAGE,this.handleToggle.bind(t))}},{key:"handleToggle",value:function(t){var e,r,n;"main"===(null===(e=t.detail)||void 0===e?void 0:e.toggle)?(s.default.slideshow(this.$el).show(null!==(r=this.lastIndex)&&void 0!==r?r:0),this.setActiveThumbnail(null!==(n=this.lastIndex)&&void 0!==n?n:0)):(this.lastIndex=this.currentIndex,s.default.slideshow(this.$el).show(this.totalItems-1),this.setActiveThumbnail(this.totalItems-1))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.default);e.VehicleSlideshowMixin=d},2769:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(7042),r(8309),r(1038),r(7601),Object.defineProperty(e,"__esModule",{value:!0}),e.MarketVehicleTeaserMixin=void 0,r(6699),r(2023),r(4916),r(3123),r(5306),r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(4724),a=r(539);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(o,t);var e,r,n,i=f(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),t.$el.addEventListener(a.MARKET_PREFERENCES_FETCHED,e.handleMarketPreferencesFetched.bind(t)),e}return e=o,(r=[{key:"handleMarketPreferencesFetched",value:function(t){var e,r;if(t.detail&&(t.detail.savedVehicles&&null!==(e=t.detail.savedVehicles)&&void 0!==e&&e.includes(this.productID)&&this.setWishlisted(!0),null!==(r=t.detail)&&void 0!==r&&r.geolocation)){var n,i,o,a,c,u,h,f=t.detail.geolocation,d=f.lat,p=f.lng;if(!d||!p)return;var m=l(null!==(n=null===(i=this.$refs.dealer)||void 0===i||null===(o=i.dataset)||void 0===o||null===(a=o.dealerLocation)||void 0===a?void 0:a.split(";"))&&void 0!==n?n:[],2),g=m[0],y=m[1],_=(0,s.haversineDistance)(g,y,d,p);if(!_)return;this.$refs.distanceValue.innerText=null===(c=this.$refs.dealer)||void 0===c||null===(u=c.dataset)||void 0===u||null===(h=u.dealerDistanceValueFormat)||void 0===h?void 0:h.replace("%s",Math.round(_)),this.$refs.distance.classList.remove("uk-invisible")}}}])&&u(e.prototype,r),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.MarketVehicleTeaserMixin=m},7117:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.ShopProductTeaserMixin=void 0,r(9826),r(1539),r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(539);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=null,d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),document.addEventListener(s.WISHLIST_FETCHED,e.handleWishlistFetched.bind(t)),e}return e=o,(r=[{key:"postInit",value:function(t){f&&this.handleWishlistFetched.call(t,{detail:{wishlist:f}})}},{key:"handleWishlistFetched",value:function(t){var e,r=this;null!==(e=t.detail)&&void 0!==e&&e.wishlist&&(f=t.detail.wishlist,this.setWishlisted(!!t.detail.wishlist.find((function(t){return t.code===r.productID||t.parentCode===r.productID}))))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.ShopProductTeaserMixin=d},6337:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.MarketWishlistBadgeMixin=void 0,r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(539);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),t.$el.addEventListener(s.MARKET_PREFERENCES_FETCHED,e.handleMarketPreferencesFetched.bind(t)),e}return e=o,(r=[{key:"handleMarketPreferencesFetched",value:function(t){var e,r,n;this.setWishlistCount(null!==(e=null===(r=t.detail)||void 0===r||null===(n=r.savedVehicles)||void 0===n?void 0:n.length)&&void 0!==e?e:0)}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.MarketWishlistBadgeMixin=f},3821:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.ComboboxGeopointSearchMixin=void 0,r(3210),r(8309),r(4916),r(3123),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),e=i.call(this,t),t.getState=e.getState.bind(t),t.setState=e.setState.bind(t),t.handleSelection=e.handleSelection.bind(t),t.dispatchChangeEvent=e.dispatchChangeEvent.bind(t),t.clearInput=e.clearInput.bind(t),e}return e=l,(r=[{key:"getState",value:function(){var t,e={},r=null===(t=this.selectedValue)||void 0===t?void 0:t.trim();return e[this.inputField.name]=r.length>0?r:null,e}},{key:"setState",value:function(t){var e,r=t[this.inputField.name];r&&(this.inputField.value=null!==(e=r.split(";")[2])&&void 0!==e?e:"",this.toggleClearIcon(r.trim().length>0),this.selectedValue=r)}},{key:"handleSelection",value:function(t,e){var r=e.value.label;this.inputField.value=r,this.inputField.blur(),e.value.longitude&&e.value.latitude&&(this.selectedValue=e.value.longitude+";"+e.value.latitude+";"+r),this.dispatchChangeEvent()}},{key:"dispatchChangeEvent",value:function(){var t,e;if(this.changeEvent){var r=null===(t=this.selectedValue)||void 0===t?void 0:t.trim(),n={name:this.inputField.name,value:(null==r?void 0:r.length)>0?r:null,label:this.inputField.value},i=new CustomEvent(this.changeEvent,{detail:n,bubbles:!0});null===(e=this.form)||void 0===e||e.dispatchEvent(i)}}},{key:"clearInput",value:function(){var t;this.inputField.value="",this.selectedValue=null,this.toggleClearIcon(!1),this.hideError(),null===(t=this.autoCompleteWrapper)||void 0===t||t.classList.add("uk-hidden"),this.dispatchChangeEvent()}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(2106))&&i.__esModule?i:{default:i}).default);e.ComboboxGeopointSearchMixin=u},1373:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.FilterTagHandleRemovalMixin=void 0,r(8309),r(6699),r(2023),r(2479),r(1539),r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(539);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}
2function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),t.reset&&t.getState&&(e.elementReset=t.reset.bind(t),e.elementGetState=t.getState.bind(t)),e}return e=o,(r=[{key:"postInit",value:function(t){var e;this.elementReset&&(null===(e=t.form)||void 0===e||e.addEventListener(s.FILTER_TAG_REMOVED,this.handleTagRemoved.bind(this)))}},{key:"handleTagRemoved",value:function(t){if(null!=t&&t.detail){var e=t.detail,r=e.name,n=e.value,i=this.elementGetState();this.tryReset(r,i,n)||this.tryReset(r+"[]",i,n)}}},{key:"tryReset",value:function(t,e,r){return!(!(t in e)||!this.hasValue(e[t],r)||(this.elementReset(r),0))}},{key:"hasValue",value:function(t,e){if(!t)return!1;if("string"==typeof t)return t===e;if(Array.isArray(t))return t.includes(e);var r=Object.values(e);return Object.values(t).some((function(t){return!t||r.includes(t)}))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.FilterTagHandleRemovalMixin=f},1545:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.LockFieldMixin=void 0,r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(539);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,(r=[{key:"postInit",value:function(t){var e,r,n,i=this;t.form&&(null===(e=t.form)||void 0===e||e.addEventListener(s.SEARCH_STARTED,this.handleSearchStart.bind(t)),null===(r=t.form)||void 0===r||r.addEventListener(s.SEARCH_RESULTS_UPDATED,this.handleSearchStop.bind(t)),null===(n=t.form)||void 0===n||n.addEventListener(s.SEARCH_ERROR,this.handleSearchStop.bind(t)),t.setDisabled||(t.$el.addEventListener("click",this.handleUpdate.bind(t)),t.$el.querySelectorAll("input",(function(e){return e.addEventListener("click",i.handleUpdate.bind(t))}))))}},{key:"handleSearchStart",value:function(){this.$el.classList.add("o-customizable-search-form__item--locked"),this.setDisabled&&this.setDisabled(!0)}},{key:"handleSearchStop",value:function(){this.$el.classList.remove("o-customizable-search-form__item--locked"),this.setDisabled&&this.setDisabled(!1)}},{key:"handleUpdate",value:function(t){this.$el.classList.contains("o-customizable-search-form__item--locked")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.LockFieldMixin=f},4846:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),Object.defineProperty(e,"__esModule",{value:!0}),e.SetComplexStateFromUrlMixin=void 0,r(8309),r(6699),r(2023),r(6992),r(1539),r(8783),r(3948),r(285),r(1637),r(4747),r(7327),r(6755),r(4916),r(3123),r(7941),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),e=i.call(this,t),t.setState&&(e.elementGetState=t.getState.bind(t),e.elementSetState=t.setState.bind(t),e.name=t.name),e}return e=l,r=[{key:"postInit",value:function(){this.elementSetState&&this.setStateFromUrl()}},{key:"setStateFromUrl",value:function(){var t=this;if(window.location.href.includes("?")){var e=new URL(window.location.href),r={};e.searchParams.keys().filter((function(e){return e.startsWith(t.name+".")})).forEach((function(t){var n=t.split(".",2)[1];r[n]=e.searchParams.get(t)})),r&&Object.keys(r).length>0&&this.elementSetState(function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},this.name,r))}}}],r&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(2106))&&i.__esModule?i:{default:i}).default);e.SetComplexStateFromUrlMixin=u},6837:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.SetStateFromUrlMixin=void 0,r(8309),r(7852),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),e=i.call(this,t),t.setState&&(e.elementGetState=t.getState.bind(t),e.elementSetState=t.setState.bind(t)),e}return e=l,r=[{key:"postInit",value:function(t){var e,r,n;this.elementSetState&&t.form&&(this.name=t.name,this.isMultiple=t.name.endsWith("[]"),this.setStateFromUrl(null===(e=t.form)||void 0===e||null===(r=e.controller)||void 0===r||null===(n=r.state)||void 0===n?void 0:n.params))}},{key:"setStateFromUrl",value:function(t){if(t){var e=t.get(this.name);if(e){if(!this.isMultiple&&Array.isArray(e)&&e.length>1)return;this.elementSetState(function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},this.name,this.isMultiple?e:e[0]))}}}}],r&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(2106))&&i.__esModule?i:{default:i}).default);e.SetStateFromUrlMixin=u},5841:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateOptionsMixinBase=void 0,r(7852),r(8309),r(7042),r(489);var i,o=(i=r(2106))&&i.__esModule?i:{default:i},s=r(539);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),t.setOptions=e.setOptions.bind(t),e}return e=o,(r=[{key:"postInit",value:function(t){var e;null===(e=t.form)||void 0===e||e.addEventListener(s.SEARCH_RESULTS_UPDATED,(function(e){var r=e.detail.update,n=t.name.endsWith("[]")?t.name.slice(0,-2):t.name;Array.isArray(r)&&0===r.length||n in r&&t.setOptions(r[n])}))}},{key:"setOptions",value:function(t){}}
2])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.UpdateOptionsMixinBase=f},7806:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=l(t);if(e){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}function a(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateMultiselectOptionsMixin=void 0,r(2479),r(1539),r(4747),r(6699),r(2023),r(489);var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,r,n,a=s(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t)}return e=l,(r=[{key:"setOptions",value:function(t){var e=Object.values(t);this.inputs.forEach((function(t){return t.toggleAttribute("disabled",!(e.includes(t.value)||t.checked))}))}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(r(5841).UpdateOptionsMixinBase);e.UpdateMultiselectOptionsMixin=c},2011:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=l(t);if(e){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}function a(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateRangeMixin=void 0,r(7941),r(1058),r(489);var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,r,n,a=s(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t)}return e=l,(r=[{key:"setOptions",value:function(t){var e,r,n=Object.keys(t);if(!(n.length<2)){var i=parseInt(n[0],10),o=parseInt(n[n.length-1],10);if(!isNaN(i)&&!isNaN(o)){i>this.minValue&&(this.initialMin=Math.max(this.minValue,i)),this.initialMax=Math.min(this.maxValue,o);var s=null!==(e=this.userMin)&&void 0!==e?e:this.initialMin,a=null!==(r=this.userMax)&&void 0!==r?r:this.initialMax;
2this.updateValueMinMax(i>s&&!this.userMin?i:s,o<a&&!this.userMax?o:a,!0),this.renderHistogram()}}}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(r(5841).UpdateOptionsMixinBase);e.UpdateRangeMixin=c},540:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(4819),r(5003),r(2526),r(1817),r(2165),r(8783),r(7042),r(8309),r(1038),r(7601),Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateSelectMultipleMixin=void 0,r(2479),r(6992),r(1539),r(3948),r(9720),r(4916),r(5306),r(8757),r(3210),r(9714),r(6699),r(2023),r(489);var i=r(5841),o=r(4724);function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=u(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},c.apply(this,arguments)}function u(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(a,t);var e,r,n,i=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(r=[{key:"postInit",value:function(t){c(p(a.prototype),"postInit",this).call(this,t),t.itemTemplate=t.$refs.selectoptionsitems.querySelector("li").cloneNode(!0)}},{key:"setOptions",value:function(t){if(!(0,o.arrayEqual)(Object.values(t),this.values)){this.$refs.selectoptionsitems.innerHTML="";for(var e=0,r=0,n=Object.entries(t);r<n.length;r++){var i=s(n[r],2),a=i[0],l=i[1],c=this.itemTemplate.cloneNode(!0),u=c.querySelector("label"),h=u.querySelector("input");u.innerHTML=u.innerHTML.replaceAll(u.textContent.trim(),a),h.value=null==l?void 0:l.toString(),this.$refs.selectoptionsitems.append(c),this.prevSelected&&this.prevSelected.includes(l)&&(h.checked=!0),e++}1===e&&(this.prevSelected=this.selectedValues),this.initializeItems(),this.$refs.openButton.toggleAttribute("disabled",e<=1)}}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.UpdateOptionsMixinBase);e.UpdateSelectMultipleMixin=m},2665:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}
2(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=l(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},a.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}r(1299),r(2419),r(1703),r(4819),r(5003),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(7042),r(8309),r(1038),r(4916),r(7601),Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateSelectMixin=void 0,r(9720),r(1539),r(9714),r(489);var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(l,t);var e,r,n,o=u(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),o.call(this,t)}return e=l,(r=[{key:"postInit",value:function(t){a(f(l.prototype),"postInit",this).call(this,t);var e=t.$refs.select.querySelector("option");t.emptyOption=e&&""===e.value?e.cloneNode(!0):null,t.prevSelected=""}},{key:"setOptions",value:function(t){this.$refs.select.innerHTML="",this.emptyOption&&this.$refs.select.append(this.emptyOption.cloneNode(!0));for(var e=0,r=0,n=Object.entries(t);r<n.length;r++){var o=i(n[r],2),s=o[0],a=o[1],l=document.createElement("option");l.value=null==a?void 0:a.toString(),l.innerText=s,this.$refs.select.append(l),a===this.prevSelected&&(this.$refs.select.value=a),e++}this.$refs.select.toggleAttribute("disabled",e<=1),1===e?(this.prevSelected=this.$refs.select.value,this.$refs.select.selectedIndex=this.emptyOption?1:0):e>1&&null!==this.prevSelected&&(this.$refs.select.value=this.prevSelected)}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(r(5841).UpdateOptionsMixinBase);e.UpdateSelectMixin=d},5289:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}
2(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(7042),r(8309),r(1038),r(7601),Object.defineProperty(e,"__esModule",{value:!0}),e.ISO_FORMAT=e.DateFormat=void 0,r(1249),r(7327),r(1539),r(9826),r(4916),r(9600),r(3210),r(3123),r(4747),r(2222),r(3112),r(4048),r(9653);var s={order:["day","month","year"],separator:"."};e.ISO_FORMAT={order:["year","month","day"],separator:"-"};var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"resolve",value:function(t){try{var e,r=new Intl.DateTimeFormat(t,{day:"2-digit",month:"2-digit",year:"numeric"}).formatToParts(new Date(2020,0,2)),n=r.filter((function(t){return"literal"!==t.type})).map((function(t){return t.type})),i=null===(e=r.find((function(t){return"literal"===t.type})))||void 0===e?void 0:e.value;if(3===n.length)return{order:n,separator:i||s.separator}}catch(t){}return s}},{key:"format",value:function(t,e){var r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t||"");if(!r)return"";var i=n(r,4),o={year:i[1],month:i[2],day:i[3]};return e.order.map((function(t){return o[t]})).join(e.separator)}},{key:"parse",value:function(t,e){var r=(t||"").trim();if(!r)return"";var n=r.split(/\D+/).filter(Boolean);if(3!==n.length)return"";var i={};e.order.forEach((function(t,e){i[t]=n[e]}));var o=i.year,s=i.month,a=i.day;if(!o||!s||!a||4!==o.length)return"";var l="".concat(o,"-").concat(s.padStart(2,"0"),"-").concat(a.padStart(2,"0")),c=new Date("".concat(l,"T00:00:00"));return Number.isNaN(c.getTime())||c.getFullYear()!==Number(o)||c.getMonth()+1!==Number(s)||c.getDate()!==Number(a)?"":l}}],(r=null)&&o(e.prototype,r),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.DateFormat=a},3499:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(489),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esModule",{value:!0}),e.LocationService=void 0,r(4916),r(5306),r(1539),r(8674),r(2222),r(9826),r(6699),r(2023),r(1703);r(539);function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};c(g,s,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,s)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 5,815 bytes, line 2
2(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,c(v,"constructor",m),c(m,"constructor",p),p.displayName=c(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,l,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),c(v,l,"Generator"),c(v,s,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function o(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var s=t.apply(e,r);function a(t){o(s,n,i,a,l,"next",t)}function l(t){o(s,n,i,a,l,"throw",t)}a(void 0)}))}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var l=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapBoxUrl=e.replace("{{country}}",r).replace("{{language}}",n)}var e,r,n,o,l,c,u;return e=t,r=[{key:"getMapBoxUrl",value:function(t){return this.mapBoxUrl.replace("{{query}}",t)}},{key:"getLocation",value:(u=s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getLocationFromBrowser();case 2:return e=t.sent,t.abrupt("return",this.getLocationForCoordinates(e.latitude,e.longitude));case 4:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getLocationFromBrowser",value:(c=s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(navigator.geolocation){t.next=2;break}return t.abrupt("return",new Promise((function(t,e){e("Geolocation is not supported by this browser.")})));case 2:return t.abrupt("return",new Promise((function(t,e){navigator.geolocation.getCurrentPosition((function(e){return t(e.co
2ords)}),(function(t){return e(t)}))})));case 3:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"getLocationForCoordinates",value:(l=s(i().mark((function t(e,r){var n,o,s,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getMapBoxUrl("".concat(r,",").concat(e)),t.next=3,fetch(n);case 3:return o=t.sent,t.next=6,o.json();case 6:if(!(s=t.sent).features.length){t.next=12;break}return a=s.features[0].context.find((function(t){return t.id.includes("postcode")})).text,t.abrupt("return",{latitude:e,longitude:r,postCode:a});case 12:throw new Error("no location found for coordinates: "+e+", "+r);case 13:case"end":return t.stop()}}),t,this)}))),function(t,e){return l.apply(this,arguments)})},{key:"getLocationForPostCode",value:(o=s(i().mark((function t(e){var r,n,o,s,a,l;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getMapBoxUrl(e),t.next=3,fetch(r);case 3:return n=t.sent,t.next=6,n.json();case 6:if(!(o=t.sent).features.length){t.next=14;break}return s=o.features[0].geometry.coordinates,a=s[0],l=s[1],t.abrupt("return",{latitude:l,longitude:a,postCode:e});case 14:throw new Error("no location found for postCode: "+e);case 15:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.LocationService=l},4886:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=u(t);if(e){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(489);var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l);var r=(e=i.call(this,t)).$el.querySelector(".m-consentplaceholder__button");return r&&r.addEventListener("click",e.onCookieEditButtonClicked.bind(c(e))),e}return e=l,(r=[{key:"onCookieEditButtonClicked",value:function(){var t=new Event("CookiebotShow");window.dispatchEvent(t)}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(7330))&&i.__esModule?i:{default:i}).default);e.default=h},6646:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(489);var i,o=(i=r(9067))&&i.__esModule?i:{default:i},s=r(3028);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t))._disableSearchButton(!0),r.postCodeInput=null===(e=r.form)||void 0===e?void 0:e.querySelector("[data-form-role='dealerPostCode']"),r.$el.querySelector("button").addEventListener("click",r.triggerFetchDealerSearchResult.bind(h(r))),r.form.addEventListener(s.POST_CODE_CHANGED,r._handlePostcodeChanged.bind(h(r))),r.form.addEventListener(s.SEARCH_DEALER_EVENT,r._handleSearchDealerEvent.bind(h(r))),r}return e=o,(r=[{key:"triggerFetchDealerSearchResult",value:function(t){var e;if(this.errorCondition)t.preventDefault();else{var r=null===(e=this.postCodeInput)||void 0===e?void 0:e.value;if(r){var n=new CustomEvent(s.SEARCH_DEALER_EVENT,{detail:{postCode:r}});this.form.dispatchEvent(n)}}}},{key:"_disableSearchButton",value:function(t){var e=this.form.querySelector(".m-dealersearchbutton .a-button"),r="a-button--disabled";t?(e.classList.add(r),e.disabled=!0):(e.classList.remove(r),e.disabled=!1)}},{key:"_handlePostcodeChanged",value:function(t){this._disableSearchButton(!t.detail.postCode)}},{key:"_handleSearchDealerEvent",value:function(){this._disableSearchButton(!0)}},{key:"errorCondition",get:function(){return!1}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},7349:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(8309),r(5069),r(7042),r(7941),r(5003),r(9337),r(1038),r(7601),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1249),r(1539),r(8674),r(7727),r(4916),r(5306),r(1058),r(8862),r(1703),r(2707),r(4747),r(2222),r(9600),r(7327),r(9720),r(489);var i=r(3028),o=u(r(9067)),s=r(539),a=u(r(6612)),l=r(3499),c=r(6486);function u(t){return t&&t.__esModule?t:{default:t}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){m(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(){g=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function f(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(m=_);var v=p.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=u(t[o],t,s);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 4,424 bytes, line 2
2(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,l(v,"constructor",p),l(p,"constructor",d),d.displayName=l(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function y(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function _(t){return function(){var e=this,r=arguments;
2return new Promise((function(n,i){var o=t.apply(e,r);function s(t){y(o,n,i,s,a,"next",t)}function a(t){y(o,n,i,s,a,"throw",t)}s(void 0)}))}}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function x(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=S(t);if(e){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return w(this,r)}}function w(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return E(t)}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(y,t);var e,r,n,o,u,f,d,m=x(y);function y(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),(e=m.call(this,t)).mapBoxUrl=e.$el.dataset.mapboxurl,e.dealerSearchUrl=e.$el.dataset.dealersearchurl,e.error=e.$el.dataset.error,e.distanceUnit=e.$el.dataset.distanceunit,e.includedDealers=JSON.parse(e.$el.dataset.includeddealers),e.excludedDealers=JSON.parse(e.$el.dataset.excludeddealers),e.serviceLabels=JSON.parse(e.$el.dataset.servicelabels||"{}"),e.minimal=e.$el.dataset.minimal,e.maximal=e.$el.dataset.maximal,e.digitalExhibitionOnly=e.$el.dataset.digitalexhibitiononly,e.variant=e.$el.dataset.variant,e.lastLocation=null;var r=e.getPreset("seriesIdPreselected");r&&(e.series=[r]);var n=e.getPreset("modelIdPreselected");n&&(e.models=[n]);var o=e.getPreset("vehicleCategoryIdPreselected");return o&&(e.segments=[o]),e.dealerSearchResults=e.$refs.dealerSearchResults,e.$refs.dealerSearchResultsHeadline&&(e.headline=e.$refs.dealerSearchResultsHeadline,e.headlineText=e.headline.textContent),e.resultTemplate=e.$refs.resultTemplate,e.resultTemplateName=e.$refs.resultTemplateName,e.resultTemplateLocation=e.$refs.resultTemplateLocation,e.resultTemplateWebsite=e.$refs.resultTemplateWebsite,e.resultTemplateServices=e.$refs.resultTemplateServices,e.resultTemplateStreet=e.$refs.resultTemplateStreet,e.resultTemplateButton=e.$refs.resultTemplateButton,e.resultTemplatePhone=e.$refs.resultTemplatePhone,e.resultTemplateCountry=e.$refs.resultTemplateCountry,e.resultTemplatePostCode=e.$refs.resultTemplatePostCode,e.resultTemplateDistance=e.$refs.resultTemplateDistance,e.resultTemplateCalculateRoute=e.$refs.resultTemplateCalculateRoute,e.errorElement=e.$refs.error,e.searchScheduled=!1,e.showLoadingSpinner(!1),e.initPostCo
2de(),e.form.addEventListener(i.SEGMENT_CHANGED,e.onSegmentChanged.bind(E(e))),e.form.addEventListener(i.SERIES_CHANGED,e.onSeriesChanged.bind(E(e))),e.form.addEventListener(i.MODEL_CHANGED,e.onModelChanged.bind(E(e))),e.form.addEventListener(i.COUNTRY_CHANGED,e.onCountryChanged.bind(E(e))),e.form.addEventListener(i.SEARCH_DEALER_EVENT,e.handleSearchDealerEvent.bind(E(e))),e.form.addEventListener(s.RESET_DEALER_EVENT,e.handleResetDealerEvent.bind(E(e))),e}return e=y,r=[{key:"getCaseType",value:function(){return this.getHiddenField("caseType")||"testDriveInquiry"}},{key:"getCountry",value:function(){return this.country||this.getHiddenField("country")}},{key:"getLanguage",value:function(){return this.getHiddenField("language")}},{key:"onSegmentChanged",value:function(t){this.segments=t.detail.segments.map((function(t){return t.id})),this.series=null,this.models=null,this.rerunSearch()}},{key:"onSeriesChanged",value:function(t){this.series=t.detail.series.map((function(t){return t.id})),this.models=null,this.rerunSearch()}},{key:"onModelChanged",value:function(t){this.models=t.detail.models.map((function(t){return t.id})),this.rerunSearch()}},{key:"onCountryChanged",value:function(t){this.country=t.detail.countryCode,this.rerunSearch()}},{key:"rerunSearch",value:function(){var t=this;this.lastLocation&&!this.searchScheduled&&(this.searchScheduled=!0,window.setTimeout((function(){t.searchDealers(t.lastLocation.longitude,t.lastLocation.latitude).finally((function(){return t.searchScheduled=!1}))}),200))}},{key:"handleSearchDealerEvent",value:(d=_(g().mark((function t(e){var r,n,i;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=null===(r=e.detail)||void 0===r?void 0:r.postCode,this.headline&&(this.headline.textContent=""),!n){t.next=8;break}return"funnel"!==this.form.dataset.layout&&(null===(i=this.group)||void 0===i||i.removeAttribute("hidden")),t.next=6,this.findLocation(n);case 6:t.next=9;break;case 8:this.handleError(this.error);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"initPostCode",value:(f=_(g().mark((function t(){var e;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getLocationService().getLocation();case 3:if(!(e=t.sent)){t.next=9;break}this.form.dispatchEvent(new CustomEvent(i.CHANGE_POSTCODE,{detail:e})),this.form.dispatchEvent(new CustomEvent(i.SEARCH_DEALER_EVENT,{detail:e})),t.next=11;break;case 9:return t.next=11,this.searchDealers(null,null,!1);case 11:t.next=18;break;case 13:return t.prev=13,t.t0=t.catch(0),console.error(t.t0),t.next=18,this.searchDealers(null,null,!1);case 18:case"end":return t.stop()}}),t,this,[[0,13]])}))),function(){return f.apply(this,arguments)})},{key:"getLocationService",value:function(){return new l.LocationService(this.mapBoxUrl,this.getCountry(),this.getLanguage())}},{key:"getDealerSearchUrl",value:function(){return this.dealerSearchUrl.replace("{{country}}",this.getCountry()).replace("{{language}}",this.getLanguage())}},{key:"findLocation",value:(u=_(g().mark((function t(e){var r;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.showLoadingSpinner(!0),t.prev=1,t.next=4,this.getLocationService().getLocationForPostCode(e);case 4:return r=t.sent,this.lastLocation=r,t.next=8,this.searchDealers(r.longitude,r.latitude);case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),this.handleError(t.t0);case 13:return t.prev=13,this.showLoadingSpinner(!1),t.finish(13);case 16:case"end":return t.stop()}}),t,this,[[1,10,13,16]])}))),function(t){return u.apply(this,arguments)})},{key:"searchDealers",value:(o=_(g().mark((function t(e,r){var n,i,o,s,a,l=arguments;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!(l.length>2&&void 0!==l[2])||l[2],i=p({caseType:this.getCaseType(),countryCode:this.getCountry(),vehicleCategory:this.segments?this.segments[0]:null,series:this.series?this.series[0]:null,model:this.models?this.models[0]:null,excludedDealers:(this.excludedDealers||[]).map((function(t){return t.id})),includedDealers:(this.includedDealers||[]).map((function(t){return t.id}
2)),minimal:parseInt(this.minimal),maximal:parseInt(this.maximal),digitalExhibitionOnly:"true"===this.digitalExhibitionOnly},null!=e&&null!=r?{position:{lng:e,lat:r}}:{}),t.prev=2,this.errorElement.setAttribute("hidden",!0),this.showLoadingSpinner(!0),t.next=7,fetch(this.getDealerSearchUrl(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});case 7:if((o=t.sent).ok){t.next=12;break}throw new Error(this.error);case 12:return t.next=14,o.json();case 14:s=t.sent,n?this.renderDealers(s.dealers):(a=s.dealers.map((function(t){return(0,c.omit)(t,["distance"])})).sort((function(t,e){return(t.companyName||"").localeCompare(e.companyName||"")})),this.renderDealers(a));case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(2),this.handleError(t.t0);case 21:return t.prev=21,this.showLoadingSpinner(!1),t.finish(21);case 24:case"end":return t.stop()}}),t,this,[[2,18,21,24]])}))),function(t,e){return o.apply(this,arguments)})},{key:"renderDealers",value:function(t){var e=this;t.length?(this.errorElement.textContent="",this.dealerSearchResults.innerHTML="",this.headline&&this.headlineText&&(this.headline.textContent=this.headlineText.replace("{{count}}",t.length)),t.forEach((function(t){var r;e.resultTemplateName&&(e.resultTemplateName.textContent="".concat(t.companyName)),e.resultTemplateButton&&(e.resultTemplateButton.dataset.dealerid=t.
2id),e.resultTemplateLocation&&(e.resultTemplateLocation.textContent=t.distance?"".concat(t.city," (").concat(t.distance," ").concat(e.distanceUnit,")"):"".concat(t.city)),e.resultTemplateStreet&&(e.resultTemplateStreet.textContent=t.street),e.resultTemplatePostCode&&(e.resultTemplatePostCode.textContent="".concat(t.zip," ").concat(t.city)),e.resultTemplateCountry&&(e.resultTemplateCountry.textContent=null==t?void 0:t.countryFormatted),e.resultTemplatePhone&&(e.resultTemplatePhone.textContent=t.phoneNumber),e.resultTemplateWebsite&&(e.resultTemplateWebsite.textContent=t.website),e.resultTemplateDistance&&(e.resultTemplateDistance.textContent=t.distance?"".concat(t.distance).concat(e.distanceUnit):""),e.resultTemplateCalculateRoute&&(e.resultTemplateCalculateRoute.href=e.resultTemplateCalculateRoute.dataset.href.replace("{{latTo}}",t.lat).replace("{{lngTo}}",t.lng)),e.resultTemplateServices&&(e.resultTemplateServices.innerHTML=Object.entries(t.services||{}).filter((function(t){var e=h(t,2);return e[0],!0===e[1]})).map((function(t){var r=h(t,1)[0];return'<div><span uk-icon="check"></span> <span>'.concat(e.serviceLabels[r]||r,"</span></div>")})).join(""));var n=null===(r=e.resultTemplate)||void 0===r?void 0:r.cloneNode(!0);n.classList.add("m-dealersearchresults__item"),"accordion"!==e.variant&&n.addEventListener("click",(function(r){return e.onDealerClick(t,e.distanceUnit,n,r),r.preventDefault(),!1})),n.querySelector('[data-ref="resultTemplateButton"] .a-button').addEventListener("click",(function(r){return e.onDealerClick(t,e.distanceUnit,n,r),r.preventDefault(),!1})),"accordion"===e.variant&&a.default.accordion(n,{multiple:!1,collapsible:!0,toggle:".uk-accordion-title",content:".uk-accordion-content"}),e.dealerSearchResults.appendChild(n)}))):this.handleError(this.error)}},{key:"handleError",value:function(t){t&&(this.errorElement.removeAttribute("hidden"),this.errorElement.textContent=t.message,this.dealerSearchResults.innerHTML="")}},{key:"onDealerClick",value:function(t,e,r,n){var o,s=this;if(t){var a=r.closest(".m-dealersearchresults__item");if(!a)return;var l=a.querySelector(".m-dealersearchresults__select-button");if(!l)return;l.classList.add("selected"),this.form.dispatchEvent(new CustomEvent(i.SELECTED_DEALER_DATA_EVENT,{detail:{dealerData:t,distanceUnit:e}}))}"funnel"===this.form.dataset.layout?setTimeout((function(){var t;null===(t=s.group)||void 0===t||t.setAttribute("hidden",!0)}),300):null===(o=this.group)||void 0===o||o.setAttribute("hidden",!0),this.notifyListeners("change",n)}},{key:"showLoadingSpinner",value:function(t){var e=this.$refs.dealersearchresults_spinner;e&&t?(e.removeAttribute("hidden"),this.dealerSearchResults.innerHTML=""):e.setAttribute("hidden",!0)}},{key:"errorCondition",get:function(){return!1}},{key:"getState",value:function(){var t={},e=this.dealerSearchResults.querySelector(".m-dealersearchresults__select-button.selected");return e&&(t.selectedDealerId=e.dataset.dealerid||null),t}},{key:"setState",value:function(t){if(this.reset(),t.selectedDealerId){var e=this.dealerSearchResults.querySelector("[data-dealerid='".concat(t.selectedDealerId,"']"));e&&e.classList.add("selected")}}},{key:"reset",value:function(){this.form.querySelectorAll(".m-dealersearchresults__select-button").forEach((function(t){return t.classList.remove("selected")}))}},{key:"handleResetDealerEvent",value:function(){this.reset()}},{key:"getPreset",value:function(t){var e,r,n;return null!==(e=this.getHiddenField(t))&&void 0!==e?e:null===(r=this.form)||void 0===r||null===(n=r.querySelector('input[type="hidden"][data-form-role$="'.concat(t,'"]')))||void 0===n?void 0:n.value}}],r&&v(e.prototype,r),n&&v(e,n),Object.defineProperty(e,"prototype",{writable:!1}),y}(o.default);e.default=T},5481:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(7042),r(8309),r(1038),r(7601),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(2222),r(4916),r(5306),r(9600),r(1249),r(7327),r(1539),r(9720),r(3123),r(489);var i=r(3028),o=l(r(9067)),s=r(539),a=l(r(6612));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(l,t);var e,r,n,o=d(l);function l(t){var e,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(r=o.call(this,t)).form.addEventListener(i.SELECTED_DEALER_DATA_EVENT,r.onDealerChanged.bind(m(r))),r.form.addEventListener(i.SEARCH_DEALER_EVENT,r.onSearchDealer.bind(m(r))),null===(e=r.$refs.dealerResetButton)||void 0===e||e.addEventListener("click",r.onDealerResetClick.bind(m(r))),r.variant=r.$el.dataset.variant,r.serviceLabels=JSON.parse(r.$el.dataset.servicelabels||"{}"),r.initAccordion(),r.$el.dataset.vehicleCategories&&document.addEventListener(i.CONTROLLERS_INITIALIZED,r.onPageInitialized.bind(m(r))),r}return e=l,(r=[{key:"errorCondition",get:function(){return!1}},{key:"onDealerChanged",value:function(t){var e,r=this,n=t.detail.dealerData,i=t.detail.distanceUnit;n&&(this.$refs.dealerName&&(this.$refs.dealerName.textContent=n.companyName),this.$refs.dealerLocation&&(n.distance?this.$refs.dealerLocation.textContent="".concat(n.city," (").concat(n.distance," ").concat(i,")"):this.$refs.dealerLocation.textContent=n.city),this.$refs.dealerStreet&&(this.$refs.dealerStreet.textContent=n.street),this.$refs.dealerCity&&(this.$refs.dealerCity.textContent="".concat(n.zip," ").concat(n.city)),this.$refs.dealerCountry&&(this.$refs.dealerCountry.textContent="".concat(n.countryFormatted)),this.$refs.dealerPhone&&(this.$refs.dealerPhone.textContent=n.phoneNumber),this.$refs.dealerWebsite&&(this.$refs.dealerWebsite.textContent=n.website),this.$refs.dealerDistance&&n.distance&&(this.$refs.dealerDistance.textContent="".concat(n.distance," ").concat(i)),this.$refs.dealerCalculateRoute&&(this.$refs.dealerCalculateRoute.href=this.$refs.dealerCalculateRoute.dataset.href.replace("{{latTo}}",n.lat).replace("{{lngTo}}",n.lng)),this.$refs.dealerServices&&(this.$refs.dealerServices.innerHTML=Object.entries(n.services||{}).filter((function(t){var e=c(t,2);return e[0],!0===e[1]})).map((function(t){var e=c(t,1)[0];return'<div><span uk-icon="check"></span> <span>'.concat(r.serviceLabels[e]||e,"</span></div>")})).join("")),this.initAccordion()),this.$refs.dealerNumber.value=null!==(e=null==n?void 0:n.dealerNumber)&&void 0!==e?e:"","funnel"!==this.form.dataset.layout&&this.group.removeAttribute("hidden")}},{key:"initAccordion",value:function(){"accordion"===this.variant&&this.$refs.dealer&&a.default.accordion(this.$refs.dealer,{multiple:!1,collapsible:!0,toggle:".uk-accordion-title",content:".uk-accordion-content"})}},{key:"reset",value:function(){this.$refs.dealerNumber.value=""}},{key:"onSearchDealer",value:function(){var t;"funnel"!==this.form.dataset.layout&&(null===(t=this.group)||void 0===t||t.setAttribute("hidden",!0))}},{key:"onDealerResetClick",value:function(t){var e;return this.reset(),null===(e=this.group)||void 0===e||e.setAttribute("hidden",!0),this.form.dispatchEvent(new CustomEvent(s.RESET_DEALER_EVENT,{})),t.preventDefault(),!1}},{key:"onPageInitialized",value:function(){var t;
2null===(t=this.form)||void 0===t||t.dispatchEvent(new CustomEvent(i.SEGMENT_CHANGED,{detail:{segments:this.$el.dataset.vehicleCategories.split(",").map((function(t){return{id:t}}))}}))}}])&&h(e.prototype,r),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.default);e.default=y},9118:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(3210),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(8483);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).$el.addEventListener("submit",e.onSearchSubmit.bind(h(e))),e}return e=o,(r=[{key:"onSearchSubmit",value:function(t){var e=this.$refs.input.value.trim();(0,s.trackEvent)(this.$el,s.SEARCH_SUBMIT_EVENT,"search-submit",e,!0);var r=new CustomEvent(s.SEARCH_SUBMIT_EVENT,{detail:e});document.dispatchEvent(r),console.log("Dispatched SEARCH_SUBMIT_EVENT with searchTerm:",e)}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},7084:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(4916),r(7601),r(9600),r(1249),r(3123),r(2222),r(3210),r(1539),r(8674),r(489);var i=c(r(5965)),o=r(4724),s=r(8483),a=r(3028),l=c(r(8162));function c(t){return t&&t.__esModule?t:{default:t}}function u(){u=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);
vendor: 5,609 bytes, line 2
2if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function d(){}function p(){}function m(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,l(v,"constructor",m),l(m,"constructor",p),p.displayName=l(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function h(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function f(t){return function(){var e=this,r=arguments;
2return new Promise((function(n,i){var o=t.apply(e,r);function s(t){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_(t);if(e){var i=_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return g(this,r)}}function g(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(v,t);var e,r,n,i,c,h,g,_=m(v);function v(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),e=_.call(this,t);var r=t.closest("li");return e.isInTab=!(!r||!r.classList.contains("o-accordion__item")),e.isInTab&&(e.tabGuid=r.querySelector("button").dataset.guid,e.tabId=r.querySelector("button").dataset.index,window.addEventListener(a.TAB_CLICKED,(function(t){(e.tabGuid===t.detail.tabGuid||0===e.tabId&&e.tabGuid===t.detail.tabGuid)&&(!e.needsCookieConsent||e.alreadyHasCookieConsent?e.prepareVideoPlayer():e.onCookieConsentAccept())}))),e.COOKIE_CONSENTED_CLASS="m-streamingvideo--cookieConsented",e.videoId=e.$el.dataset.videoId,e.provider=e.getProvider(),e.alreadyHasCookieConsent="true"===e.$el.dataset.alreadyhascookieconsent,e.needsCookieConsent=!!e.$el.dataset.needscookieconsent&&"ignite"!==e.getProvider(),e.neededCookieType=e.needsCookieConsent?e.$el.dataset.needscookieconsent:null,e.needsCookieConsent&&window.addEventListener("CookiebotOnAccept",e.onCookieConsentAccept.bind(y(e))),!e.needsCookieConsent||e.alreadyHasCookieConsent?e.isInTab||e.prepareVideoPlayer():e.onCookieConsentAccept(),window.addEventListener("beforeunload",e.handleUnloadPage.bind(y(e))),e}return e=v,r=[{key:"onCookieConsentAccept",value:function(){this.checkCookiesAndInitPlayer()}},{key:"checkCookiesAndInitPlayer",value:function(){window.Cookiebot&&window.Cookiebot.consent[this.neededCookieType]&&(this.$el.classList.add(this.COOKIE_CONSENTED_CLASS),this.player||this.prepareVideoPlayer())}},{key:"getProvider",value:function(){return/[a-f0-9]{24,}/.test(this.videoId)?"ignite":(0,o.containsNumbersOnly)(this.videoId)?"vimeo":"youtube"}},{key:"prepareVideoPlayer",value:function(){var t=this;if("youtube"!==this.provider||window.YT)if("vimeo"!==this.provider||window.Vimeo)if("ignite"!==this.provider||window.playerjs)this.initVideoPlayer();else{var e,r;this.playerElement=document.createElement("iframe"),(null===(e=this.settings.allowFullscreen)||void 0===e||e)&&this.playerElement.setAttribute("allow","fullscreen"),this.playerElement.src="https://".concat(this.$el.dataset.videoHost,"/player/index.html?\n        id=").concat(this.videoId,"\n        &muted=").concat(this.settings.mute?"true":"false","\n        &autoplay=").concat(this.settings.autoplay?"true":"false","\n        &loop=").concat(this.settings.loop?"true":"false","\n        &controls=").concat(this.settings.controls?"true":"false","\n        &locale=").concat(null!==(r=document.documentElement.lang)&&void 0!==r?r:"en_GB").split("\n").map((function(t){return t.trim()})).join(""),this.$refs.playerContainer.appendChild(this.playerElement),this.initVideoPlayer()}else{var n=this.appendScript(),i="onVimeoIframeAPIReady";n.onload=function(){return window.dispatchEvent(new CustomEvent(i))},window.addEventListener(i,(function(){return t.initVideoPlayer()}))}else{this.appendScript();var o="onYoutubeScriptLoaded";window.onYouTubeIframeAPIReady=function(){return window.dispatchEvent(new CustomEvent(o))},window.addEventListener(o,(function(){return t.initVideoPlayer()}))}}},{key:"appendScript",value:function(){var t="".concat(this.provider,"-script"),e=document.getElementById(t);if(!e){(e=document.createElement("script")).setAttribute("id",t),"youtube"===this.provider?e.src="https://www.youtube.com/iframe_api":"vimeo"===this.provider&&(e.src="https://player.vimeo.com/api/player.js");var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(e,r)}return e}},{key:"initVideoPlayer",value:function(){var t=this;if("youtube"===this.provider){var e=document.createElement("div");this.$refs.playerContainer.appendChild(e),this.player=new window.YT.Player(e,{videoId:this.$el.dataset.videoId,host:"https://www.youtube-nocookie.com",playerVars:{autoplay:this.settings.autoplay?1:0,controls:this.settings.controls?1:0,loop:this.settings.loop?1:0,playlist:this.settings.loop?this.$el.dataset.videoId:null,modestbranding:1,showinfo:0,autohide:1},events:{onReady:function(){return t.handlePlayerReady()},onStateChange:function(e){switch(e.data){case window.YT.PlayerState.PLAYING:t.handlePlayerStart();break;case window.YT.PlayerState.PAUSED:t.handlePlayerPause();break;case window.YT.PlayerState.ENDED:t.handlePlayerEnd()}}}})}else"vimeo"===this.provider?(this.player=new window.Vimeo.Player(this.$refs.playerContainer,{id:this.$el.dataset.videoId,autoplay:this.settings.autoplay,controls:this.settings.controls,loop:this.settings.loop,dnt:!0}),this.player.ready().then((function(){t.handlePlayerReady(),t.player.on("play",(function(){return t.handlePlayerStart()})),t.player.on("pause",(function(){return t.handlePlayerPause()})),t.player.on("ended",(function(){return t.handlePlayerEnd()}))}))):"ignite"===this.provider&&(this.player=new l.default.Player(this.playerElement),this.player.on("ready",(function(){t.handlePlayerReady()})),this.player.on("play",(function(){return t.handlePlayerStart()})),this.player.on("pause",(function(){return t.handlePlayerPause()})),this.player.on("ended",(function(){return t.handlePlayerEnd()})),this.$refs.placeholder.classList.add("m-streamingvideo__placeholder-hidden"))}},{key:"handlePlayerReady",value:function(){var t=this;if(this.settings.mute&&this.mute(),window.IntersectionObserver&&this.addIntersectionObserver(),this.$refs.placeholder){if(this.$refs.loadingOverlay.setAttribute("hidden",null),"ignite"===this.provider)return;this.$refs.playButton.removeAttribute("hidden"),this.$refs.playButton.addEventListener("click",(function(){t.$refs.loadingOverlay.removeAttribute("hidden"),t.$refs.playButton.setAttribute("hidden",null),t.play()}))}}},{key:"getCurrentTime",value:function(){var t=this;return new Promise((function(e){if("youtube"===t.provider){var r=t.player.getCurrentTime();e(Math.round(r))}else"vimeo"===t.provider?t.player.getCurrentTime().then((function(t){e(Math.round(t))})):"ignite"===t.provider&&t.player.getCurrentTime((function(t){e(Math.round(t))}))}))}},{key:"getVideoPlaying",value:function(){var t=this;return new Promise((function(e){"youtube"===t.provider?e(1===t.player.getPlayerState()):"vimeo"===t.provider?t.player.getPaused().then((function(t){e(!t)})):"ignite"===t.provider&&t.player.getPaused((function(t){e(!t)}))}))}},{key:"handlePlayerStart",value:(g=f(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getCurrentTime();case 2:e=t.sent,(0,s.trackEvent)(this.$el,s.VIDEO_START_EVENT,"video-start",e),this.$refs.placeholder.setAttribute("hidden","");case 5:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"handlePlayerPause",value:(h=f(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getCurrentTime();case 2:e=t.sent,(0,s.trackEvent)(this.$el,s.VIDEO_STOP_EVENT,"video-stop",e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"handlePlayerEnd",value:(c=f(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getCurrentTime();case 2:e=t.sent,(0,s.trackEvent)(this.$el,s.VIDEO_END_EVENT,"video-end",e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"handleUnloadPage",value:(i=f(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.player){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.getVideoPlaying();case 4:if(!t.sent){t.next=10;break}return t.next=8,this.getCurrentTime();case 8:e=t.sent,(0,s.trackEvent)(this.$el,s.VIDEO_STOP_EVENT,"video-stop",e);case 10:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"play",value:function(){"youtube"===this.provider?this.player.playVideo():"vimeo"!==this.provider&&"ignite"!==this.provider||this.player.play()}},{key:"pause",value:function(){"youtube"===this.provider?this.player.pauseVideo():"vimeo"!==this.provider&&"ignite"!==this.provider||this.player.pause()}},{key:"mute",value:function(){"youtube"===this.provider||"ignite"===this.provider?this.player.mute():"vimeo"===this.provider&&this.player.setVolume(0)}}],r&&d(e.prototype,r),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),v}(i.default);e.default=v,function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r}}()},7670:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(6755),r(3210),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(8483),a=r(6486),l=r(4740);function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,l(v,"constructor",m),l(m,"constructor",p),p.displayName=l(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function u(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(g,t);var e,r,n,i,o,p=d(g);function g(t){var e,r,n,i,o,s;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),(s=p.call(this,t)).SHOW_MORE_BUTTON=t.querySelector(".m-teaser__copy__show-more-btn"),s.COPY=t.querySelector(".m-teaser__copy"),s.COPY_FADE=t.querySelector(".m-teaser__copy__fade"),s.ELEMEMT=t,s.HANDLESHOWMORECLICK=s.handleShowMoreClick.bind(m(s)),s.productID=null!==(e=null===(r=s.$el.querySelector("[data-id]"))||void 0===r||null===(n=r.dataset)||void 0===n?void 0:n.id)&&void 0!==e?e:null,s.wishlistApi=new l.WishlistApi({toggleUrl:null===(i=s.$el)||void 0===i||null===(o=i.dataset)||void 0===o?void 0:o.url}),s.showLoadingSpinner(!1),s.SHOW_MORE_BUTTON){s.initShowMoreButton();var c=(0,a.debounce)((function(){return s.initShowMoreButton()}),250);window.addEventListener("resize",c)}return s.BUTTON_HOVER_CLASS="a-button--hover",s.wishlistIcon=s.$el.querySelector('[data-ref="wishlistIcon"]'),s.wishlistIcon&&s.wishlistIcon.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),s.handleWishlistClick(t)})),s.$refs.mediaLink&&s.$refs.mediaLink.addEventListener("click",
2s.handleLinkClick.bind(m(s))),s.$refs.mediaLink&&(s.$refs.mediaLink.addEventListener("mouseenter",s.handleMouseEnter.bind(m(s))),s.$refs.mediaLink.addEventListener("mouseleave",s.handleMouseLeave.bind(m(s)))),s}return e=g,r=[{key:"initShowMoreButton",value:function(){var t,e,r,n=null===(t=this.COPY)||void 0===t?void 0:t.scrollHeight,i=this.ELEMEMT.classList.contains("teaser-row-active");if(n>=200&&!i)return this.ELEMEMT.classList.add("teaser-row-active"),void(null===(e=this.SHOW_MORE_BUTTON)||void 0===e||e.addEventListener("click",this.HANDLESHOWMORECLICK));n<200&&i&&(this.ELEMEMT.classList.remove("teaser-row-active"),null===(r=this.SHOW_MORE_BUTTON)||void 0===r||r.removeEventListener("click",this.HANDLESHOWMORECLICK))}},{key:"handleMouseEnter",value:function(){var t=this.$el.querySelector(".m-teaser__button");null==t||t.classList.add(this.BUTTON_HOVER_CLASS)}},{key:"handleMouseLeave",value:function(){var t=this.$el.querySelector(".m-teaser__button");null==t||t.classList.remove(this.BUTTON_HOVER_CLASS)}},{key:"handleLinkClick",value:function(){var t=this.$refs.mediaLink.attributes.href&&this.$refs.mediaLink.attributes.href.value,e=!0;t&&"#"!==t&&!t.toLowerCase().startsWith("javascript:")||(e=!1,this.$refs.headline&&this.$refs.headline.textContent.trim()&&(t=this.$refs.headline.textContent.trim())),(0,s.trackEvent)(this.$el,s.TEASER_CLICK_EVENT,"teaser-click",t,e)}},{key:"handleShowMoreClick",value:function(){var t,e,r=this;this.COPY&&(this.COPY.classList.contains("extended")?(this.SHOW_MORE_BUTTON.classList.remove("extended"),this.COPY.classList.remove("extended"),this.COPY.scrollTo({top:0,left:0,behavior:"smooth"}),this.COPY.classList.remove("overflow-auto"),null===(t=this.COPY_FADE)||void 0===t||t.classList.remove("hidden")):(this.COPY.classList.add("extended"),this.SHOW_MORE_BUTTON.classList.add("extended"),null===(e=this.COPY_FADE)||void 0===e||e.classList.add("hidden"),setTimeout((function(){r.COPY.classList.add("overflow-auto")}),200)))}},{key:"handleWishlistClick",value:(i=c().mark((function t(e){var r,n,i,o,s,a,l;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.stopPropagation(),s=null===(r=e.target.parentElement)||void 0===r||null===(n=r.closest(".background-wishlisted"))||void 0===n||null===(i=n.classList)||void 0===i?void 0:i.contains("background-wishlisted"),this.showLoadingSpinner(!0),a=null===(o=this.wishlistIcon)||void 0===o?void 0:o.classList.contains("background-wishlisted"),l=!0!==s&&!a,t.prev=5,t.next=8,this.wishlistApi.toggleProduct(this.productID,l);case 8:t.sent?this.setWishlisted(l):console.warn("Failed to update wishlist status !"),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),console.error("Wishlist update failed");case 15:return t.prev=15,this.showLoadingSpinner(!1),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[5,12,15,18]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function s(t){u(o,r,n,s,a,"next",t)}function a(t){u(o,r,n,s,a,"throw",t)}s(void 0)}))},function(t){return o.apply(this,arguments)})},{key:"setWishlisted",value:function(t){this.wishlistIcon.classList.toggle("background-wishlisted",t),this.wishlistIcon.classList.toggle("heart-filled",t),this.wishlistIcon.setAttribute("uk-icon",t?"heart-filled":"heart");var e=this.ELEMEMT.querySelector(".m-teaser__header"),r=this.ELEMEMT.querySelector(".m-teaser__content"),n=t?"background-wishlisted":"background-wishlist",i=t?"background-wishlist":"background-wishlisted";null==e||e.classList.remove(i),null==e||e.classList.add(n),null==r||r.classList.remove(i),null==r||r.classList.add(n)}},{key:"showLoadingSpinner",value:function(t){var e,r=null===(e=this.$refs)||void 0===e?void 0:e.teaserspinner;r&&t?null==r||r.removeAttribute("hidden"):null==r||r.setAttribute("hidden",!0)}}],r&&h(e.prototype,r),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),g}(o.default);e.default=y},9388:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(7042),r(8309),r(7601),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(1539),r(4747),r(4916),r(4765),r(1058),r(4553),r(1038),r(8783),r(7327),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(8483),a=r(6486),l=r(9521),c=r(9127),u=r(3028),h=r(5877);function f(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=p(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function p(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=x(t);if(e){var i=x(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(o,t);var e,r,n,i=_(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),l.gsap.registerPlugin(c.ScrollToPlugin),e.IS_OPEN_CLASS="is-open",e.IS_TABS_ACTIVE_CLASS="is-tabs-active",e.INNER_CONTENT_SELECTOR=".o-accordion__innercontent",e.CONTENT_SELECTOR=".o-accordion__content",e.ITEM_SELECTOR=".o-accordion__item",e.TAB_SELECTOR=".o-accordion__tab",e.TABS_OVERFLOW_SELECTOR=".o-accordion__tabsoverflow",e.multipleOpen="true"===e.$el.dataset.multipleopen,e.useTabs="true"===e.$el.dataset.usetabs,e.items=e.querySelectorAll(e.ITEM_SELECTOR),e.tabs=e.querySelectorAll(e.TAB_SELECTOR),e.tabsOverflowContainer=e.querySelector(e.TABS_OVERFLOW_SELECTOR),document.addEventListener(u.SHOW_MODAL_EVENT,e.onShowModalEvent.bind(b(e))),e.buttons=e.querySelectorAll(".o-accordion__item button.o-accordion__header"),e.buttons&&e.buttons.length>0&&(e.tabButtons=e.querySelectorAll(".o-accordion__tabs button"),e.buttons.forEach((function(t,r){var n=(0,h.v4)();t.setAttribute("data-guid",n),e.tabButtons&&e.tabButtons.length>0&&e.tabButtons[r]&&e.tabButtons[r].setAttribute("data-guid",n)}
2))),e.querySelectorAll(".o-accordion__header").forEach((function(t){return t.addEventListener("click",e.onItemHeadClicked.bind(b(e)))})),e.useTabs&&e.tabs.forEach((function(t){return t.addEventListener("click",e.onTabClicked.bind(b(e)))})),requestAnimationFrame((function(){e.isInTabbedMode()&&e.initTabbedMode()})),window.addEventListener("resize",(0,a.debounce)(e.handleResize.bind(b(e)),150)),e.useTabs||(document.querySelectorAll('a[href*="#"]').forEach((function(t){e.isSamePageLink(t)&&t.hash&&e.querySelector(t.hash)&&t.addEventListener("click",e.handleHashLinkClick.bind(b(e)))})),e.scrollTween=null,e.scrollTarget=null,window.location.hash&&e.openItemByAnchor(window.location.hash)),e}return e=o,r=[{key:"isSamePageLink",value:function(t){return t.protocol===window.location.protocol&&t.host===window.location.host&&t.pathname===window.location.pathname&&t.search===window.location.search}},{key:"handleHashLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("href"),r=this.getURLHash(e);window.history.replaceState(void 0,void 0,r),this.openItemByAnchor(r)}},{key:"getURLHash",value:function(t){return t.substr(t.indexOf("#"))}},{key:"openItemByAnchor",value:function(t){var e=this.querySelector("".concat(t)),r=this.querySelector("".concat(t," > button"));e&&r&&(this.scrollTarget=e,this.scrollTargetY=window.scrollY+this.scrollTarget.getBoundingClientRect().top,this.scrollTween=l.gsap.to(window,{duration:.8,scrollTo:{y:this.scrollTargetY,autoKill:!1},onUpdate:this.onScrollTweenUpdate.bind(this),onComplete:this.onScrollTweenComplete.bind(this)}),e.classList.contains(this.IS_OPEN_CLASS)||r.click())}},{key:"onScrollTweenComplete",value:function(){this.scrollTarget=null,this.scrollTargetY=null}},{key:"onScrollTweenUpdate",value:function(){var t=window.scrollY+this.scrollTarget.getBoundingClientRect().top;if(this.scrollTargetY!==t&&this.scrollTween){var e=this.scrollTween.time();this.scrollTween.vars.scrollTo=t,this.scrollTween.seek(0).invalidate().seek(e)}}},{key:"handleResize",value:function(){this.isInTabbedMode()?this.initTabbedMode():this.$el.classList.contains(this.IS_TABS_ACTIVE_CLASS)&&(this.deselectAllTabs(),this.closeAllItems(null,!0),this.$el.classList.remove(this.IS_TABS_ACTIVE_CLASS))}},{key:"hasSpaceForSingleLineTabs",value:function(){if(!this.tabs.length)return!1;var t=this.tabsOverflowContainer.clientWidth;return this.tabsOverflowContainer.scrollWidth-t<2}},{key:"isInTabbedMode",value:function(){return this.useTabs&&this.hasS
2paceForSingleLineTabs()}},{key:"onItemHeadClicked",value:function(t){var e=parseInt(t.currentTarget.dataset.index);this.toggleItem(e),this._dispatchClickedTab(e,t.currentTarget.dataset.guid)}},{key:"getItemByIndex",value:function(t){return this.items[t]}},{key:"toggleItem",value:function(t){var e=this.getItemByIndex(t);e.classList.contains(this.IS_OPEN_CLASS)?(this.closeItem(e),this.deselectTab(t)):(this.multipleOpen||this.closeAllItems(e),this.selectTab(t),this.openItem(e,t))}},{key:"openItem",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!r){var n=!0===this.useTabs?"tab-open":"accordeon-open",i=!0===this.useTabs?s.TAB_OPEN_EVENT:s.ACCORDION_OPEN_EVENT;(0,s.trackEvent)(this.$el,i,n,e)}var o=t.querySelector(this.CONTENT_SELECTOR),a=t.querySelector(this.INNER_CONTENT_SELECTOR).offsetHeight,l=o.offsetHeight;l===a||this.isInTabbedMode()||(o.style.height=a+"px",o.addEventListener("transitionend",this.onHeightTransitionEnd)),t.classList.add(this.IS_OPEN_CLASS)}},{key:"onHeightTransitionEnd",value:function(t){"height"===t.propertyName&&t.target.classList.contains("o-accordion__content")&&(t.target.style.height=null)}},{key:"closeItem",value:function(t,e){var r=this;if(e)t.classList.remove(this.IS_OPEN_CLASS);else{var n=t.querySelector(".o-accordion__content");n.removeEventListener("transitionend",this.onHeightTransitionEnd);var i=t.querySelector(this.INNER_CONTENT_SELECTOR).offsetHeight;n.style.height=i+"px",window.requestAnimationFrame((function(){t.classList.remove(r.IS_OPEN_CLASS),window.requestAnimationFrame((function(){n.style.height=null}))}))}}},{key:"closeAllItems",value:function(t,e){var r,n=d(this.items);try{for(n.s();!(r=n.n()).done;){var i=r.value;i!==t&&i.classList.contains(this.IS_OPEN_CLASS)&&this.closeItem(i,e)}}catch(t){n.e(t)}finally{n.f()}}},{key:"selectTab",value:function(t){for(var e=0;e<this.tabs.length;e++)this.tabs[e].setAttribute("aria-selected",e===t)}},{key:"deselectTab",value:function(t){if(!(this.tabs.length<1))try{this.tabs[t].setAttribute("aria-selected",!1)}catch(t){console.log(t)}}},{key:"deselectAllTabs",value:function(){var t,e=d(this.tabs);try{for(e.s();!(t=e.n()).done;)t.value.setAttribute("aria-selected",!1)}catch(t){e.e(t)}finally{e.f()}}},{key:"onTabClicked",value:function(t){var e=0===t.clientX&&0===t.clientY,r=parseInt(t.currentTarget.dataset.index),n=this.getItemByIndex(r);this.selectTab(r),this.closeAllItems(n),this.openItem(n,r,e),this._dispatchClickedTab(r,t.currentTarget.dataset.guid)}},{key:"initTabbedMode",value:function(){if(!(this.tabs.length<1)){this.$el.classList.add(this.IS_TABS_ACTIVE_CLASS);var t=Array.from(this.tabs).findIndex((function(t){return"true"===t.getAttribute("aria-selected")}));if(-1===t)this.tabs[0].click();else{var e=this.getItemByIndex(t);this.closeAllItems(e)}}}},{key:"onShowModalEvent",value:function(){this.handleResize()}},{key:"_dispatchClickedTab",value:function(t,e){this.$el.dispatchEvent(new CustomEvent(u.TAB_CLICKED,{bubbles:!0,detail:{tabId:t,tabGuid:e}}))}},{key:"querySelectorAll",value:function(t){var e=this;return f(this.$el.querySelectorAll(t)).filter((function(t){return t.closest("[data-controller]")===e.$el}))}},{key:"querySelector",value:function(t){var e=this.$el.querySelector(t);return e&&e.closest("[data-controller]")===this.$el?e:null}}],r&&g(e.prototype,r),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=w},4561:(t,e,r)=>{"use strict";r(1299),r(2419),r(2526),r(1817),r(2165),r(1038),r(7042),r(8309),r(7601),r(2443),r(3680),r(3706),r(408),r(5069),r(4129),r(5003),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(9601),r(7327),r(1249),r(7941),r(3210),r(6992),r(8783),r(3948),r(1637),r(9720),r(9714),r(8674),r(1703),r(4916),r(4723),r(9826),r(489);var n=u(r(9067)),i=u(r(6612)),o=r(8483),s=u(r(6179)),a=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==m(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;
vendor: 4,594 bytes, line 2
2s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}n.default=t,r&&r.set(t,n);return n}(r(3028)),l=u(r(2580));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function u(t){return t&&t.__esModule?t:{default:t}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(){f=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===u)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function h(){}function d(){}function p(){}var g={};a(g,i,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,i)&&(g=_);var v=p.prototype=h.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,o,s,a){var l=c(t[i],t,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==m(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,a(v,"constructor",p),a(p,"constructor",d),d.displayName=a(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}}
vendor: 5,018 bytes, line 2
2,b(x.prototype),a(x.prototype,o,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(l(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),a(v,s,"Generator"),a(v,i,(function(){return this})),a(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}function d(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){d(o,n,i,s,a,"next",t)}function a(t){d(o,n,i,s,a,"throw",t)}s(void 0)}))}}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function x(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=E(t);if(e){var i=E(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return w(this,r)}}function w(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}
2function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}var S=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(w,t);var e,r,c,u,d,_=x(w);function w(t){var e,r;for(var n in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w),(r=_.call(this,t)).settings={inlineValidation:"true"===r.$el.dataset.inlineValidation,layout:r.$el.dataset.layout,successUrlTargetBlank:"true"===r.$el.dataset.successUrlTargetBlank,defaultCountryProvider:null!==(e=r.$el.dataset.defaultCountryProvider)&&void 0!==e?e:"page"},r.currentGroupIndex=0,r.groups=r.$refs.groups||[],r.showLoadingSpinner(!1),r._setUtmHiddenFields(),r.initializeRecaptcha(),"funnel"===r.settings.layout&&r.initializeFunnelLayout(),r.$el.addEventListener("submit",(function(t){return r.handleFormSubmit(t)})),a)r.form.addEventListener(n,(function(t){return console.log(t)}));return document.addEventListener(a.CONTROLLERS_INITIALIZED,(function(){return r.initCountry()})),r}return e=w,r=[{key:"initializeRecaptcha",value:function(){if(this.$refs.recaptcha){var t=this.$refs.recaptcha.value,e="https://www.google.com/recaptcha/api.js";t&&(e+="?render="+t),this.injectScript(e,{async:!0})}}},{key:"initializeFunnelLayout",value:function(){var t,e,r=this;this.nextTransitionBehavior=null!==(t=this.form.dataset.nextTransitionBehavior)&&void 0!==t?t:"when-complete",this.prevResetBehavior=null!==(e=this.form.dataset.prevResetBehavior)&&void 0!==e?e:"reset-data",document.addEventListener(a.CONTROLLERS_INITIALIZED,(function(){r.groups.forEach((function(t,e){r.updateGroupNavigation(t,!1),r.getGroupComponents(t).forEach((function(n){n.addListener("change",(function(){"when-complete"===r.nextTransitionBehavior?r.changeActiveGroupIfCompleted(t,e):r.updateGroupNavigation(t)}))}))}))})),this.form.addEventListener(a.CHANGE_ACTIVE_GROUP,(function(t){t.detail.index!==r.currentGroupIndex&&r.animateGroupTransition(t.detail.index),t.detail.ignorePushState||r.pushState(t.detail.index)})),window.addEventListener("popstate",(function(t){r.form.dispatchEvent(new CustomEvent(a.CHANGE_ACTIVE_GROUP,{detail:{index:t.state.currentGroupIndex,ignorePushState:!0}})),r.setState(t.state)})),this.updateGroupVisibility(),this.pushState(this.currentGroupIndex)}},{key:"pushState",value:function(t){var e=this.groups[this.currentGroupIndex].dataset.legend;history.pushState(this.getState(t),e,window.location.href)}},{key:"getState",value:function(t){var e=this,r={currentGroupIndex:t};return this.groups.forEach((function(t){e.getGroupComponents(t).forEach((function(t){t.getState&&(r=Object.assign(r,t.getState()))}))})),console.log("state",r),r}},{key:"setState",value:function(t){var e=this;this.groups.forEach((function(r){e.getGroupComponents(r).forEach((function(e){e.setState&&e.setState(t)}))}))}},{key:"changeActiveGroupIfCompleted",value:function(t,e){e===this.currentGroupIndex&&e<this.groups.length-1&&this.isGroupCompleted(t)&&this.form.dispatchEvent(new CustomEvent(a.CHANGE_ACTIVE_GROUP,{detail:{index:this.currentGroupIndex+1}}))}},{key:"getGroupComponents",value:function(t){return g(t.querySelectorAll("[data-controller]")).map((function(t){return t.controller})).filter((function(t){return t instanceof n.default}))}},{key:"isGroupCompleted",value:function(t){return this.getGroupComponents(t).every((function(t){return!1===t.errorCondition}))}},{key:"validateGroup",value:function(t){return this.getGroupComponents(t).every((function(t){return t.validate(),!1===t.errorCondition}))}},{key:"animateGroupTransition",value:function(t){var e=this;if(!(t===this.currentGroupIndex||t<0||t>=this.groups.length)){var r="reset-data"===this.prevResetBehavior&&t<this.currentGroupIndex,n=this.groups[this.currentGroupIndex],i=this.groups[t];this.updateGroupNavigation(n,!1),this.updateGroupNavigation(i),n.classList.add("animate-out"),setTimeout((function(){if(n.classList.remove("animate-out"),n.setAttribute("hidden",!0),r)for(var o=e.currentGroupIndex;o>=t;o--)e.resetGroupComponents(e.groups[o]);i.classList.add("animate-in"),i.removeAttribute("hidden"),setTimeout((function(){i.classList.remove("animate-in"),e.currentGroupIndex=t,e.updateGroupVisibility()}),400)}),400)}}},{key:"updateGroupNavigation",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!==r?!r:!this.isGroupCompleted(t);this.getGroupComponents(t).forEach((function(t){var r,i;t instanceof l.default&&"next"===(null===(r=t.$el)||void 0===r||null===(i=r.dataset)||void 0===i?void 0:i.formRole)&&e._disableButton(n,t.$el)}))}},{key:"updateGroupVisibility",value:function(){var t=this;this.groups.forEach((function(e,r){e.hidden=r!==t.currentGroupIndex}))}},{key:"resetGroupComponents",value:function(t){this.getGroupComponents(t).forEach((function(t){t.reset&&t.reset()}))}},{key:"injectScript",value:function(t,e){var r="recaptcha-script",n=document.createElement("script");n.id=r,n.src=t,e&&"object"===m(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]}));var i=document.querySelector("head");document.querySelector("script#".concat(r))||i.appendChild(n)}},{key:"handleFormSubmit",value:(d=p(f().mark((function t(e){var r,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),this.settings.inlineValidation){t.next=4;break}return this._handleRecaptchaChallengeAndSubmit(),t.abrupt("return");case 4:this.dispatchCustomEvent("validate"),r=g(this.$el.querySelectorAll(".has-error")),this._disableButton(!0),0===r.length?this._handleRecaptchaChallengeAndSubmit():(this._scrollItemIntoView(r[0]),this.showLoadingSpinner(!1),(0,o.trackEvent)(this.$el,o.FORM_ERROR_EVENT,"form-error","",!1,!0,{},null!==(n=this.$el.dataset.trackingParam)&&void 0!==n?n:null),this._disableButton(!1));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"_handleRecaptchaChallengeAndSubmit",value:function(){var t=this;this.showLoadingSpinner(!0),grecaptcha.ready((function(){var e=t.getHiddenField("recaptchaV3SiteKey"),r=t.getHiddenField("recaptchaV3Action")||"submit";"undefined"!=typeof grecaptcha&&e&&grecaptcha.execute(e,{action:r}).then((function(e){e&&(t.setHiddenField("recaptchaV3Token",e),t._submitForm(
2))}))}))}},{key:"_sendTextAreaPlaceholder",value:function(){var t=this;this.groups.forEach((function(e){t.getGroupComponents(e).forEach((function(t){var e,r;if("TEXTAREA"===(null===(e=t.$refs)||void 0===e||null===(r=e.input)||void 0===r?void 0:r.tagName)&&t.placeholderAsValue){var n=t.$refs.input;!n.value.trim()&&t.placeholder&&(n.value=t.placeholder)}}))}))}},{key:"_submitForm",value:(u=p(f().mark((function t(){var e,r,n,i,o,s,l,c;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("get"!==this.$el.method){t.next=5;break}for(e=new URLSearchParams,r=0,n=Object.entries(this.getState());r<n.length;r++)i=h(n[r],2),o=i[0],s=i[1],void 0!==o&&void 0!==s&&e.append(o,s);return window.location.href=this.$el.action+"?"+e.toString(),t.abrupt("return");case 5:return t.prev=5,this._sendTextAreaPlaceholder(),t.next=9,fetch(this.$el.action,{method:this.$el.getAttribute("method"),body:new FormData(this.$el)});case 9:return l=t.sent,t.next=12,l.json();case 12:if(c=t.sent,!(l&&l.status>=200&&l.status<300)){t.next=17;break}this._handleSuccess(),t.next=19;break;case 17:throw c.success||this.dispatchCustomEvent(a.SHOW_API_FORM_ERRORS_EVENT,c.errors),new Error(l.status);case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(5),this._handleError(t.t0.message);case 24:case"end":return t.stop()}}),t,this,[[5,21]])}))),function(){return u.apply(this,arguments)})},{key:"_handleSuccess",value:function(){var t,e,r=this;(0,o.trackEvent)(this.$el,o.FORM_SUCCESS_EVENT,"form-submit",null!==(t=this.$el.dataset.trackingParam)&&void 0!==t?t:"",!this.$el.dataset.trackingParam,!0,{},null!==(e=this.$el.dataset.trackingParam)&&void 0!==e?e:null),setTimeout((function(){r.showLoadingSpinner(!1),"true"===r.$el.dataset.successMessage?(r.$el.querySelectorAll(".o-customizable-form > *:not(.o-customizable-form__success-message)").forEach((function(t){"shrink"===r.$el.dataset.successMessageLayout?t.style.display="none":t.style.visibility="hidden"})),r.$el.querySelector(".o-customizable-form__success-message").removeAttribute("hidden"),window.scroll({top:Math.max(0,r.$el.offsetTop-100),behavior:"smooth"})):r.settings.successUrlTargetBlank?window.open(r.$el.dataset.successUrl,"_blank").focus():window.location.href=r.$el.dataset.successUrl}),"funnel"===this.form.dataset.layout?1600:0)}},{key:"_handleError",value:function(t){var e;this.showLoadingSpinner(!1),(0,o.trackEvent)(this.$el,o.FORM_ERROR_EVENT,"form-error","",!1,!0,{},null!==(e=this.$el.dataset.trackingParam)&&void 0!==e?e:null),this.$refs.error400.classList.add("uk-hidden"),this.$refs.error500.classList.add("uk-hidden"),this.$refs.errordefault.classList.add("uk-hidden");var r=this.$refs.errordefault;t>400&&t<500?r=this.$refs.error400:t>=500&&t<600&&(r=this.$refs.error500),r.classList.remove("uk-hidden"),this._scrollItemIntoView(r)}},{key:"_scrollItemIntoView",value:function(t){i.default.util.isInView(t)||i.default.util.scrollIntoView(t)}},{key:"_setUtmHiddenFields",value:function(){var t=(new s.default).getUtmParams();if(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=y(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,i=0,o=Object.entries(n);i<o.length;i++){var a=h(o[i],2),l=a[0],c=a[1],u=this.$el.querySelector("input[type=hidden][name*=".concat(l,"]"));u&&(u.value=c)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"showLoadingSpinner",value:function(t){var e=this.$refs.formLoadingSpinner;e&&(t?e.removeAttribute("hidden"):e.setAttribute("hidden",!0))}},{key:"_disableButton",value:function(t,e){var r=null!=e?e:this.$el.querySelector(".o-customizable-form__submit"),n="a-button--disabled";t?(r.classList.add(n),r.disabled=!0):(r.classList.remove(n),r.disabled=!1)}},{key:"initCountry",value:function(){var t,e=this;if("geolocation"===(null===(t=this.settings)||void 0===t?void 0:t.defaultCountryProvider)){var r=window.navigator.language.match(/^[a-z]{2}-([a-zA-Z]{2})$/);r&&2===r.length?this.setCountry(r[1]):fetch("/wls/geolocation/get-country").then(function(){var t=p(f().mark((function t(r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(200!==r.status){t.next=5;break}return t.next=3,r.json();
2case 3:(n=t.sent)&&n.country&&e.setCountry(n.country);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}else{var n;this.setCountry(null===(n=this.$el.querySelector('input[name*="[hidden][hiddenFields][country]"]'))||void 0===n?void 0:n.value)}}},{key:"setCountry",value:function(t){var e;if(t){var r=this.$el.querySelector('.a-select[data-form-role="country"]');r&&!g(null!==(e=r.querySelectorAll("option"))&&void 0!==e?e:[]).find((function(e){return e.value===t}))&&(t=this.getHiddenField("country")),this.$el.dispatchEvent(new CustomEvent(a.COUNTRY_CHANGED,{detail:{countryCode:t}}))}}}],r&&v(e.prototype,r),c&&v(e,c),Object.defineProperty(e,"prototype",{writable:!1}),w}(n.default);e.default=S},1279:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(7042),r(8309),r(1038),r(4916),r(7601),r(2526),r(1817),r(2165),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(7327),r(6992),r(8783),r(3948),r(285),r(1637),r(2222),r(489);var i=l(r(7330)),o=r(8483),s=l(r(6612)),a=r(3028);function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(l,t);var e,r,n,i=p(l);function l(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,t)).initializeUIkitFilter(),e.$refs.matches&&s.default.util.on(e.$el,"afterFilter",(function(t){e.updateMatches(t,e.$refs.matches),e.trackFilter(),e.setCurrentFilterToUrl()})),window.addEventListener("popstate",e.onHistoryChange.bind(g(e))),e.$el.classList.contains("js-showmoreContent")&&(e.filterItems=e.$el.querySelectorAll(".js-filter .o-showmore__item"),e.filterItems&&(s.default.util.on(e.$el,"beforeFilter",e.handleShowmoreBeforeFilter.bind(g(e))),s.default.util.on(e.$el,"afterFilter",e.handleShowmoreAfterFilter.bind(g(e)))));var r=e.$el.parentElement.querySelector(".o-filter__reset");return r&&r.addEventListener("click",(function(){e.$el.querySelectorAll(".a-selectMultiple").forEach((function(t){var e;null===(e=t.controller)||void 0===e||e.reset()}));var t=e.$el.querySelector("[uk-filter]");if(t){t.querySelectorAll("select").forEach((function(t){return t.selectedIndex=0}));var r=document.createElement("div");r.setAttribute("uk-filter-control",""),t.appendChild(r),r.click(),t.removeChild(r)}})),e.$refs.mobileToggle&&e.$refs.mobileToggle.addEventListener("click",(function(t){t.preventDefault(),e.$refs.filterNavigation.classList.toggle("uk-visible@m"),e.$el.classList.toggle("is-active")})),e}return e=l,(r=[{key:"handleShowmoreBeforeFilter",value:function(){this.filterItems.forEac
2h((function(t){t.classList.add("uk-invisible"),t.removeAttribute("hidden")}))}},{key:"handleShowmoreAfterFilter",value:function(t){var e=t.detail[0].children,r=e.filter((function(t){return"none"!==t.style.display}));r&&r.length>0&&r.forEach((function(t){t.classList.remove("uk-invisible")})),window.dispatchEvent(new CustomEvent(a.SHOWMORE_FILTER,{bubbles:!1,detail:{allitems:e,filteredItems:r}}))}},{key:"onHistoryChange",value:function(t){var e=t.state;t.state&&this.clickFilterByValue(e)}},{key:"clickFilterByValue",value:function(t){var e=this.$refs.filterNavigation.querySelector(".o-filter__navOptionAll > a");void 0!==t&&(e=this.$refs.filterNavigation.querySelector('.o-filter__navOption[data-filter-option="'.concat(t,'"] > a'))),e&&e.click()}},{key:"initializeUIkitFilter",value:function(){var t,e=new URL(window.location.href),r="",n=e.searchParams.get("filter");if(n)r='.o-filter__navOption[data-filter-option="'.concat(n,'"]');else{var i,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=u(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(e.searchParams.entries());try{for(o.s();!(i=o.n()).done;){var a=c(i.value,2),l=a[0],h=a[1];this.$el.querySelector('[data-filter-group="'.concat(l,'"]'))&&(r+="".concat(r?",":"",' [data-filter-group="').concat(l,'"] [data-value="').concat(h,'"]'))}}catch(t){o.e(t)}finally{o.f()}}s.default.filter(this.$el,{target:".js-filter",selActive:null!==(t=r)&&void 0!==t&&t}),null!=n&&window.history.replaceState({filter:n},"",window.location.href)}},{key:"setCurrentFilterToUrl",value:function(){var t=this.$refs.filterNavigation.querySelector(".uk-active").dataset.filterOption||null,e=new URL(window.location.href),r=new URL(window.location.href);e.searchParams.get("filter")!==t&&(null!=t?r.searchParams.set("filter",t):r.searchParams.delete("filter"),window.history.pushState({filter:t},"",r.href))}},{key:"updateMatches",value:function(t,e){var r=t.detail[0].children.filter((function(t){return"none"!==t.style.display}));e.innerHTML=r.length}},{key:"trackFilter",value:function(){var t=[];this.$refs.filterNavigation.querySelectorAll(".uk-active").forEach((function(e){return t.push(e.dataset.filterOption)})),(0,o.trackEvent)(this.$el,o.PRODUCT_GALLERY_FILTER_EVENT,"product-gallery-filter","[".concat(t.toString(),"]"))}}])&&f(e.prototype,r),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.default);e.default=_},8480:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(9521),a=r(9127);function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(o,t);var e,r,n,i=u(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),e=i.call(this,t),s.gsap.registerPlugin(a.ScrollToPlugin),e.$refs.backToTop&&e.$refs.backToTop.addEventListener("click",e.onBackToTopClicked.bind(f(e))),e}return e=o,(r=[{key:"onBackToTopClicked",value:function(t){t.preventDefault(),s.gsap.to(window,{duration:1.4,ease:"Power2.easeOut",scrollTo:{y:0}})}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=p},1834:(t,e,r)=>{"use strict";r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(1038),r(7042),r(8309),r(4916),r(7601),r(2443),r(3680),r(3706),r(408),r(5069),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(7941),r(1539),r(4747),r(8674),r(2222),r(9720),r(489);var n=a(r(7330)),i=a(r(6612)),o=r(8483),s=a(r(6179));function a(t){return t&&t.__esModule?t:{default:t}}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function p(){}var g={};a(g,i,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,i)&&(g=_);var v=p.prototype=f.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,o,s,a){var l=u(t[i],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==m(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 1,538 bytes, line 2
2(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,a(v,"constructor",p),a(p,"constructor",d),d.displayName=a(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}}
vendor: 4,177 bytes, line 2
2,b(x.prototype),a(x.prototype,o,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(l(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),a(v,s,"Generator"),a(v,i,(function(){return this})),a(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){d(o,n,i,s,a,"next",t)}function a(t){d(o,n,i,s,a,"throw",t)}s(void 0)}))}}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=x(t);if(e){var i=x(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(v,t);var e,r,n,a,f,d=_(v);function v(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),(e=d.call(this,t)).settings={inlineValidation:"true"===e.$el.dataset.inlineValidation},e.settings.inlineValidation&&e.$el.setAttribute("novalidate",""),e.$refs.recaptcha){var r=e.$refs.recaptcha.value,n="https://www.google.com/recaptcha/api.js";r&&(n+="?render="+r);e.injectScript(n,{async:!0})}if(e.$el.addEventListener("submit",(function(t){return e.handleFormSubmit(t)})),e.$refs.newsletter){var i=e.$refs.newsletter.querySelector(".o-form__newsletterCheckbox input");i&&i.addEventListener("change",e.handleNewsletterCheckboxChange.bind(b(e)))}return e.$refs.address&&e.handleCountrySelect(),e._setUtmHiddenFields(),e}return e=v,r=[{key:"injectScript",value:function(t,e){var r="recaptcha-script",n=document.createElement("script");n.id=r,n.src=t,e&&"object"===m(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]}));var i=document.querySelector("head");document.querySelector("script#".concat(r))||i.appendChild(n)}},{key:"handleNewsletterCheckboxChange",value:function(t){t.currentTarget.checked&&(0,o.trackEvent)(this.$el,o.FORM_SOI_EVENT,"form-soi-checked","",!1,!0)}},{key:"handleCountrySelect",value:function(){var t=this.$el.querySelector(".js-country select");t&&t.addEventListener("change",this._onCountrySelect.bind(this))}},{key:"_onCountrySelect",value:function(){var t=this.$el.querySelector(".js-postalcode input"),e=t.dataset.dynamicPatternUrl,r=this.$el.querySelector(".js-country select").value;t&&e&&r&&fetch("".concat(e,"?countryCode=").concat(r)).then((function(t){return t.json()})).then((function(e){if(e&&e.pattern){var r=e.pattern;t.pattern=r,t.value&&(t.focus(),t.blur())}}))}},{key:"handleFormSubmit",value:(f=p(c().mark((function t(e){var r;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.settings.inlineValidation&&(e.preventDefault(),this.dispatchCustomEvent("validate"),r=u(this.$el.querySelectorAll(".has-error")),this._disableButton(!0),0===r.length?this._handleRecaptchaChallengeAndSubmit():(this._scrollItemIntoView(r[0]),(0,o.trackEvent)(this.$el,o.FORM_ERROR_EVENT,"form-error","",!1,!0),this._disableButton(!1)));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"_handleRecaptchaChallengeAndSubmit",value:function(){var t=this;grecaptcha.ready((function(){var e,r=t.$el.querySelector("input[type=hidden][name*=recaptchaV3SiteKey]");r&&r.value&&(e=r.value);var n="submit",i=t.$el.querySelector("input[type=hidden][name*=recaptchaV3Action]");i&&i.value&&(n=i.value);var o=t.$el.querySelector("input[type=hidden][name*=recaptchaV3Token]");"undefined"!=typeof grecaptcha&&o&&e&&grecaptcha.execute(e,{action:n}).then((function(e){e&&(o.value=e,t._submitForm())}))}))}},{key:"_submitForm",value:(a=p(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(this.$el.action,{method:this.$el.method,body:new FormData(this.$el)});case 2:(e=t.sent)&&e.status>=200&&e.status<300?this._handleSuccess():this._handleError(e.status);case 4:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSuccess",value:function(){var t=this;(0,o.trackEvent)(this.$el,o.FORM_SUCCESS_EVENT,"form-submit","",!0,!0),setTimeout((function(){window.location.href=t.$el.dataset.successUrl}),0)}},{key:"_handleError",value:function(t){(0,o.trackEvent)(this.$el,o.FORM_ERROR_EVENT,"form-error","",!1,!0),this.$refs.error400.classList.add("uk-hidden"),this.$refs.error500.classList.add("uk-hidden"),this.$refs.errordefault.classList.add("uk-hidden");var e=this.$refs.errordefault;400==t?e=this.$refs.error400:t>=500&&t<600&&(e=this.$refs.error500),e.classList.remove("uk-hidden"),this._scrollItemIntoView(e)}},{key:"_scrollItemIntoView",value:function(t){i.default.util.isInView(t)||i.default.util.scrollIntoView(t)}},{key:"_setUtmHiddenFields",value:function(){var t=(new s.default).getUtmParams();if(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=h(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t}
2,f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,i=0,o=Object.entries(n);i<o.length;i++){var a=l(o[i],2),c=a[0],u=a[1],f=this.$el.querySelector("input[type=hidden][name*=".concat(c,"]"));f&&(f.value=u)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"_disableButton",value:function(t){var e=this.$el.querySelector(".o-form__submit"),r="a-button--disabled";t?(e.classList.add(r),e.disabled=!0):(e.classList.remove(r),e.disabled=!1)}}],r&&g(e.prototype,r),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),v}(n.default);e.default=w},7360:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(5303);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).COOKIE_CONSENTED_CLASS="o-iframe--cookieConsented",e.alreadyHasCookieConsent="true"===e.$el.dataset.alreadyhascookieconsent,e.needsCookieConsent=!!e.$el.dataset.needscookieconsent,e.neededCookieType=e.needsCookieConsent?e.$el.dataset.needscookieconsent:null,e.needsCookieConsent&&window.addEventListener("CookiebotOnAccept",e.onCookieConsentAccept.bind(h(e))),e.$refs.iframe.attributes.height||(0,s.iframeResizer)({log:!1,checkOrigin:!1,warningTimeout:0},e.$refs.iframe),e.$refs.overlayButton&&(e.$refs.overlayButton.addEventListener("click",(function(t){t.preventDefault(),e.$refs.overlayButton.classList.add("hide-overlay"),e.$refs.backToOverlayButton&&e.$refs.backToOverlayButton.classList.add("show-close-button")})),e.$refs.backToOverlayButton&&e.$refs.backToOverlayButton.addEventListener("click",(function(t){t.preventDefault(),e.$refs.backToOverlayButton.classList.remove("show-close-button"),e.$refs.overlayButton.classList.remove("hide-overlay")}))),e}return e=o,(r=[{key:"onCookieConsentAccept",value:function(){this.checkCookiesAndInitIframe()}},{key:"checkCookiesAndInitIframe",value:function(){window.Cookiebot&&window.Cookiebot.consent[this.neededCookieType]&&(this.$el.classList.add(this.COOKIE_CONSENTED_CLASS),this.$refs.iframe.attributes.src.value||(this.$refs.iframe.src=this.$refs.iframe.dataset.src))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},359:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1539),r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0,r(489);var i=a(r(7330)),o=a(r(6612)),s=r(8483);function a(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(a,t);var e,r,n,i=u(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this,t)).instanceId=e.$el.dataset.instanceid,e.useTracking=e.$el.dataset.usetracking,e.useTracking&&o.default.util.on(document,"itemshown",".uk-lightbox",e.onItemShown.bind(f(e))),e}return e=a,(r=[{key:"onItemShown",value:function(t){null!==t.current.querySelector("[data-lightboxid=".concat(this.instanceId,"]"))&&this.useTracking&&(0,s.trackEvent)(this.$el,s.LIGHTBOX_SHOW_EVENT,"lightbox-show",t.detail[0].index)}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.default);e.default=p},8372:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(9826),r(1038),r(8783),r(6699),r(2023),r(4916),r(5306),r(489);var i=u(r(7330)),o=u(r(6612)),s=r(4724),a=r(9521),l=r(9092),c=r(3028);function u(t){return t&&t.__esModule?t:{default:t}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(u,t);var e,r,n,i=d(u);function u(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this,t)).setHref.bind(m(e)),a.gsap.registerPlugin(l.ScrollTrigger);var r=t.querySelector(".uk-modal-body");if(!r)return p(e);if(o.default.util.on(t,"hide",(function(){r.scroll({top:0,behavior:"smooth"})})),e.warningBody=e.$refs.weightWarningModalBody,e.allWWModalButtons=document.querySelectorAll("[class*=openModal--]"),e.openModal=document.querySelector(".openModal--".concat(e.$el.dataset.modalid)),e.approveButton=e.$el.querySelector(".o-modal__weight-warning-approve"),"true"==(0,s.getCookie)("hasAcceptedWeightWarning")&&e.setHref(),e.approveButton&&(e.approveButton.addEventListener("click",e.handleCookieOnClick.bind(m(e))),e.approveButton.setAttribute("href","#".concat(e.$el.dataset.modalid))),e.warningBody&&o.default.util.on(e.$refs.weightWarningModal,"shown",e.weightModalShown.bind(m(e))),!t.querySelector(".o-accordion--tabs"))return p(e);var n=e.$refs.contentModal;return o.default.util.on(n,"shown",(function(){e.$el.dispatchEvent(new Event(c.SHOW_MODAL_EVENT,{bubbles:!0}))}
2)),e}return e=u,(r=[{key:"handleCookieOnClick",value:function(){(0,s.setCookie)("hasAcceptedWeightWarning",0,!0),this.allWWModalButtons.forEach((function(t){var e,r=null===(e=Array.from(t.classList).find((function(t){return t.includes("openModal--")})))||void 0===e?void 0:e.replace("openModal--","");t.setAttribute("href","#".concat(r))})),this.openModal&&this.setHref()}},{key:"weightModalShown",value:function(){var t=this;this.st||(this.st=l.ScrollTrigger.create({trigger:this.warningBody.querySelector("* > :first-child"),start:"top",end:"max-=150px",scroller:this.warningBody,onLeave:function(){t.approveButton&&t.approveButton.classList.remove("a-button--disabled")}}))}},{key:"setHref",value:function(){this.openModal&&this.openModal.setAttribute("href","#".concat(this.$el.dataset.modalid))}}])&&h(e.prototype,r),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(i.default);e.default=y},6652:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(2443),r(3680),r(3706),r(408),r(5069),r(7042),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1058),r(7327),r(1539),r(6992),r(8783),r(3948),r(1637),r(4747),r(7941),r(8674),r(9714),r(8309),r(489),r(4916),r(5306),r(8757),r(4603),r(8450),r(8386);var i=u(r(7330)),o=u(r(6612)),s=r(4724),a=u(r(4822)),l=r(3028),c=u(r(5541));function u(t){return t&&t.__esModule?t:{default:t}}function h(){h=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function d(){}function p(){}function m(){}var g={};l(g,o,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=u(t[o],t,s);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,l(v,"constructor",m),l(m,"constructor",p),p.displayName=l(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),l(v,a,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
vendor: 4,490 bytes, line 2
2h(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function f(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y(this,r)}}function y(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _(t)}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(y,t);var e,r,n,i,u,f=g(y);function y(t){var e,r,n,i;for(var o in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),(r=f.call(this,t)).animation="uk-animation-fade",r.showmore=r.$el.querySelector(".o-showmore__button"),r.grid=r.$el.querySelector(".o-showmore__grid"),r.showmoreSpinner=r.$refs.showmoreSpinner,r.showmoreSpinner.setAttribute("hidden",""),r.showAmount=parseInt((null===(e=r.showmore)||void 0===e?void 0:e.dataset.showAmount)||"0"),r.displayLimit=parseInt(r.$el.dataset.displayLimit||"0"),r.gridColumns=JSON.parse(r.$el.dataset.gridColumns),r.dynamicItems=JSON.parse(r.$el.dataset.dynamicItems),r.dynamicItems&&(r.dynamicItems.startParam=r.dynamicItems.startParam||"from",r.dynamicItems.countParam
2=r.dynamicItems.countParam||"count",r.dynamicItems.params=r.dynamicItems.params||{}),r.matchMedia={},r.gridColumns)r.matchMedia[o]=(0,s.matchBreakpoint)(o,r.fillUpRows.bind(_(r),0));r.dynamicItems?null===(n=r.showmore)||void 0===n||n.addEventListener("click",r.handleLoadMoreButtonClick.bind(_(r))):(null===(i=r.showmore)||void 0===i||i.addEventListener("click",r.handleShowMoreButtonClick.bind(_(r))),window.addEventListener("SHOWMORE_FILTER",r.updateItems.bind(_(r))));return r.fillUpRows(r.displayLimit),r.updateShowMoreButton(),r.$el.addEventListener(l.CHANGE_SHOWMORE_DYNAMIC_ITEMS,r.updateDynamicItems.bind(_(r))),r}return e=y,r=[{key:"updateDynamicItems",value:function(t){this.dynamicItems||(this.dynamicItems={}),t.detail.url&&(this.dynamicItems.url=t.detail.url),t.detail.params&&(this.dynamicItems.params=t.detail.params),t.detail.startParam&&(this.dynamicItems.startParam=t.detail.startParam),t.detail.countParam&&(this.dynamicItems.countParam=t.detail.countParam),this.loadItems(0,this.displayLimit)}},{key:"getVisibleItems",value:function(){return this.filteredItems?this.filteredItems.filter((function(t){return!t.hasAttribute("hidden")})):this.$el.querySelectorAll(".o-showmore__item:not([hidden])")}},{key:"getHiddenItems",value:function(){return this.filteredItems?this.filteredItems.filter((function(t){return t.hasAttribute("hidden")})):this.$el.querySelectorAll(".o-showmore__item[hidden]")}},{key:"loadItems",value:(u=d(h().mark((function t(e,r){var n,i,o,u=this;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.showmoreSpinner.removeAttribute("hidden"),n=this.dynamicItems.params instanceof c.default,(i=n?this.dynamicItems.params.toQueryString():new URLSearchParams).append(this.dynamicItems.startParam,e),i.append(this.dynamicItems.countParam,r),this.dynamicItems.fixedParams&&Object.keys(this.dynamicItems.fixedParams).forEach((function(t){(0,s.arrayify)(u.dynamicItems.fixedParams[t]).forEach((function(e){return i.append(t,e)}))})),n||Object.keys(this.dynamicItems.params).forEach((function(t){(0,s.arrayify)(u.dynamicItems.params[t]).forEach((function(e){return i.append(t,e)}))})),this.loadItemsController&&this.loadItemsController.abort(),this.loadItemsController=new AbortController,t.next=12,fetch(this.dynamicItems.url+"?"+i.toString(),{signal:this.loadItemsController.signal});case 12:return o=t.sent,this.grid.querySelectorAll(".o-showmore__item"+(e>
20?"[hidden]":"")).forEach((function(t){return t.remove()})),t.t0=this.grid,t.next=18,o.text();case 18:t.t1=t.sent,t.t0.insertAdjacentHTML.call(t.t0,"beforeend",t.t1),this.dynamicItems.totalItemsCount=parseInt(o.headers.get("Total-Count")),a.default.initComponents(),this.fillUpRows(r),this.$el.dispatchEvent(new CustomEvent(l.SHOWMORE_DYNAMIC_ITEMS_LOADED,{detail:{totalItemsCount:this.dynamicItems.totalItemsCount}})),this.showmoreSpinner.setAttribute("hidden",""),t.next=30;break;case 27:t.prev=27,t.t2=t.catch(0),"AbortError"!==t.t2.name&&(this.showmoreSpinner.setAttribute("hidden",""),console.log(t.t2));case 30:return t.prev=30,this.loadItemsController=null,t.finish(30);case 33:case"end":return t.stop()}}),t,this,[[0,27,30,33]])}))),function(t,e){return u.apply(this,arguments)})},{key:"fillUpRows",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.getHiddenItems().length){this._getItemsPerColumn();var e=(this.getVisibleItems().length+t)%this.itemsPerColumn;t?(e&&(t+=this.itemsPerColumn-e),this._showItems(t)):e&&this._showItems(this.itemsPerColumn-e)}else this.updateShowMoreButton()}},{key:"handleShowMoreButtonClick",value:function(t){t.preventDefault(),this.fillUpRows(this.showAmount)}},{key:"handleLoadMoreButtonClick",value:(i=d(h().mark((function t(e){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.preventDefault(),t.next=3,this.loadItems(this.getVisibleItems().length,this.showAmount);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_showItems",value:function(t){var e=this,r=this.getHiddenItems();r.length&&(r.forEach((function(r,n){n<t&&(r.removeAttribute("hidden"),r.classList.add(e.animation))})),o.default.update(this.grid,"update")),this.updateShowMoreButton(),(0,s.alignItemsByRow)()}},{key:"updateShowMoreButton",value:function(){var t,e,r,n;this.dynamicItems?this.getVisibleItems().length<this.dynamicItems.totalItemsCount?null===(t=this.showmore)||void 0===t||t.removeAttribute("hidden"):null===(e=this.showmore)||void 0===e||e.setAttribute("hidden",!0):this.getHiddenItems().length>0?null===(r=this.showmore)||void 0===r||r.removeAttribute("hidden"):null===(n=this.showmore)||void 0===n||n.setAttribute("hidden",!0)}},{key:"_getItemsPerColumn",value:function(){for(var t in this.itemsPerColumn=1,this.matchMedia)this.matchMedia[t].matches&&(this.itemsPerColumn=parseInt(this.gridColumns[t]))}},{key:"updateItems",value:function(t){var e=this;t.detail.allitems.forEach((function(t){return t.setAttribute("hidden",!0)})),this.filteredItems=t.detail.filteredItems,this._getItemsPerColumn();var r,n,i=this.displayLimit%this.itemsPerColumn,o=i?this.itemsPerColumn-i:0;this.filteredItems.forEach((function(t,r){t.classList.remove("uk-invisible"),r<e.displayLimit+o&&t.removeAttribute("hidden")})),this.filteredItems.length<=this.displayLimit+o?null===(r=this.showmore)||void 0===r||r.setAttribute("hidden",!0):null===(n=this.showmore)||void 0===n||n.removeAttribute("hidden")}}],r&&p(e.prototype,r),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),y}(i.default);e.default=b,function(){if("function"==typeof String.prototype.replaceAll)return!0;String.prototype.replaceAll=function(t,e){return Object.prototype.toString.call(t)&&"[object regexp]"===Object.prototype.toString.call(t).toLowerCase()?this.replace(t,e):this.replace(new RegExp(t,"g"),e)}}()},1287:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(1058),r(8674),r(489);var i=h(r(7330)),o=h(r(6612)),s=r(8483),a=r(3028),l=r(9521),c=h(r(9092)),u=r(4724);function h(t){return t&&t.__esModule?t:{default:t}}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
2function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(h,t);var e,r,n,i=p(h);function h(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=i.call(this,t)).userInitiated=!1,e.$el.addEventListener("pointerdown",(function(){e.markUserInitiated()})),e.$el.querySelectorAll("[uk-slider-item]").forEach((function(t){t.addEventListener("pointerdown",(function(){e.markUserInitiated()}))})),e.checkPortraitImages(),e.$el.dataset.centerOnMobile){var r=(0,u.matchBreakpoint)("medium",(function(t){o.default.slider(e.$el,{center:!t.matches})}));o.default.slider(e.$el,{center:!r.matches})}if(o.default.util.on(e.$el,"itemshow",e.onItemShow.bind(g(e))),o.default.util.on(e.$el,"itemshown",e.onItemShown.bind(g(e))),"true"===e.$el.getAttribute("data-parallax")){var n=e.$el.querySelector(".uk-slider-items"),s=n.children.length,f=e.$el.getAttribute("data-parallax-container")||!0,d=e.$el.getAttribute("data-parallax-container")||null,p=e.$el.getAttribute("data-parallax-trigger")||null,m=p?e.$el.closest(p):null;l.gsap.registerPlugin(c.default),l.gsap.from(e.$el,{scrollTrigger:{trigger:m||e.$el,pin:f,pinnedContainer:d,start:"center center",end:"+=".concat(100*s,"px"),scrub:.5,onUpdate:function(t){var e=0;n.querySelectorAll(".o-slider__item").forEach((function(t){e+=t.offsetWidth}));var r=t.progress*(e-n.offsetWidth);n.style.transform="translateX(-".concat(r,"px)")}}})}return e.isInModal()&&(e.init=!1,document.addEventListener(a.SHOW_SLIDER_EVENT,e.onSliderShow.bind(g(e))),document.addEventListener(a.HIDE_SLIDER_EVENT,e.onSliderHide.bind(g(e))),document.addEventListener("keydown",e.onKeydown.bind(g(e)))),e}return e=h,(r=[{key:"onItemShow",value:function(t){this.$refs.currentItem&&(this.$refs.currentItem.innerHTML=t.detail[0].index+1)}},{key:"onItemShown",value:function(t){if(this.userInitiated){var e=1==t.detail[0].dir?"right":"left";(0,s.trackEvent)(this.$el,s.SLIDER_CLICK_EVENT,"slider-click",e)}this.userInitiated=!1,clearTimeout(this.userInitiatedTimeout)}},{key:"markUserInitiated",value:function(){var t=this;this.userInitiated=!0,clearTimeout(this.userInitiatedTimeout),this.userInitiatedTimeout=setTimeout((function(){t.userInitiated=!1}),1e3)}},{key:"isInModal",value:function(){var t=this.$el.closest(".o-modal");return!!t&&(this.modal=t,!0)}},{key:"onSliderShow",value:function(t){var e=t.detail.id,r=t.detail.startindex;this.startIndex=r,this.modal.id==e&&(this.init||this.initOnFirstSliderShow(),o.default.slider(this.$el,"beforeitemshow",(function(){})),o.default.slider(this.$el).show(r),o.default.util.on(this.$el,"itemshown",this.onFirstItemShown.bind(this)))}},{key:"onSliderHide",value:function(t){var e=t.detail.id;this.modal.id==e&&(this.$el.style.display="none")}},{key:"onFirstItemShown",value:function(t){t.detail[0].index==this.startIndex&&(this.$el.style.display="block")}},{key:"initOnFirstSliderShow",value:function(){this.$el.style.visibility="visible",this.$el.style.display="none",this.init=!0}},{key:"onKeydown",value:function(t){var e=t.target.closest("#"+this.modal.id);if(e){var r=parseInt(e.querySelector(".o-slider__item.uk-active").dataset.itemindex)-1,n=e.querySelectorAll(".o-slider__item").length,i=(r+1)%n,s=(r-1+n)%n;"ArrowRight"==t.key?(this.markUserInitiated(),o.default.slider(this.$el).show(i)):"ArrowLeft"==t.key&&(this.markUserInitiated(),o.default.slider(this.$el).show(s))}}},{key:"checkPortraitImages",value:function(){var t,e=this,r=null===(t=this.$el.closest(".m-divein"))||void 0===t?void 0:t.querySelectorAll(".m-divein__item--media");r&&r.forEach((function(t){var r=t.querySelector("picture source");if(r){var n=r.getAttribute("data-srcset")||r.getAttribute("srcset");e.getImageOrientation(n).then((function(e){"portrait"===e&&t.classList.add("m-divein__item--portrait")})).catch((function(t){console.error("Error:",t)}))}}))}},{key:"getImageOrientation",value:function(t){return new Promise((function(e,r){var n=new Image;
2n.addEventListener("load",(function(){var t=n.naturalWidth,r=n.naturalHeight;e(t>=r?"landscape":"portrait")})),n.addEventListener("error",(function(){r("Failed to load the image.")})),n.src=t}))}}])&&f(e.prototype,r),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(i.default);e.default=_},7330:(t,e,r)=>{"use strict";r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(1038),r(7601),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(7852),r(7042),r(2222),r(8309),r(1249),r(4916),r(3123),r(3210);var n,i=(n=r(8262))&&n.__esModule?n:{default:n};function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$el=e,this.$refs=this._collectReferences(),this._registerMixins()}var e,r,n;return e=t,r=[{key:"dispatchCustomEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=new CustomEvent(t,{detail:e});this.$el.dispatchEvent(r)}},{key:"_collectReferences",value:function(){var t=this,e={},r=[];return this.$el.querySelectorAll("[data-ref]").forEach((function(e){e.closest("[data-controller]")!==t.$el&&e.closest('[data-controller="'.concat(e.dataset.refScope,'"]'))!==t.$el||r.push(e)})),this.$el.querySelectorAll("template").forEach((function(t){t.content.querySelectorAll("[data-ref]").forEach((function(t){r.push(t)}))})),r.forEach((function(r){var n=r.dataset.ref;if(n.endsWith("[]")){var i=n.slice(0,-2);e[i]?e[i].push(r):e[i]=[r]}else e[n]?console.error("A reference called '".concat(n,"' has already been registered in ").concat(t.constructor.name,"!")):e[n]=r})),e}},{key:"_registerMixins",value:function(){var t=[];this.$el.dataset.controllerMixins&&t.push.apply(t,o(this.$el.dataset.controllerMixins.split(",").map((function(t){return t.trim()}))));var e=this.$el.closest("[data-child-controller-mixins]");if(e){var r=JSON.parse(e.dataset.childControllerMixins);r[this.$el.dataset.controller]&&t.push.apply(t,o(r[this.$el.dataset.controller])),r["*"]&&t.push.apply(t,o(r["*"]))}if(0!==t.length){this.$mixins=[];for(var n=0,s=t;n<s.length;n++){var a=s[n];this.$mixins.push(new i.default[a](this))}}}}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l,Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(Element.prototype.matches.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null})},9067:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1299),r(2419),r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(8309),r(1539),r(4747),r(489);var i,o=(i=r(7330))&&i.__esModule?i:{default:i},s=r(3028);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(o,t);var e,r,n,i=c(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).required="true"===e.$el.dataset.required,e.listeners={},e.validationPattern=e.$refs.input&&e.$refs.input.pattern?e.$refs.input.pattern:null,e.form=e.$el.closest("form"),e.group=e.$el.closest(".o-customizable-form__group")||e.$el.closest(".o-customizable-search-form__group")||e.$el.closest('[role="group"]'),e.form&&(e.inlineValidation="true"===e.form.dataset.inlineValidation,e.form.addEventListener("validate",(function(t){return e.validate(t)})),e.form.addEventListener(s.SHOW_API_FORM_ERRORS_EVENT,e.showApiErrors.bind(h(e)))),e}return e=o,(r=[{key:"showApiErrors",value:function(t){var e,r,n,i,o=null==t?void 0:t.detail,s=null===(e=this.$refs)||void 0===e||null===(r=e.input)||void 0===r?void 0:r.name,a=null===(n=this.$refs)||void 0===n||null===(i=n.select)||void 0===i?void 0:i.name,l=o[null!=s?s:a];l&&(this.$el.classList.add("has-error"),this.$refs.error&&(this.$refs.error.classList.remove("uk-invisible"),this.$refs.error.textContent=l))}},{key:"validate",value:function(){this.validationPattern=this.$refs.input&&this.$refs.input.pattern?this.$refs.input.pattern:null;var t=this.errorCondition;!0===t?this.showError():!1===t?this.hideError():console.error("This element is required and needs an errorCondition: \n",this.$el)}},{key:"showError",value:function(){this.$el.classList.remove("is-valid"),this.$el.classList.add("has-error"),this.$refs.error&&this.$refs.error.classList.remove("uk-invisible")}},{key:"hideError",value:function(){this.$el.classList.remove("has-error"),this.$refs.error&&this.$refs.error.classList.add("uk-invisible"),this.$el.classList.add("is-valid")}},{key:"hasRole",value:function(t){return this.$el.dataset.formRole===t}},{key:"hiddenField",value:function(t){var e;return null===(e=this.form)||void 0===e?void 0:e.querySelector('input[type="hidden"][name$="['.concat(t,']"]'))}},{key:"getHiddenField",value:function(t){var e;return null===(e=this.hiddenField(t))||void 0===e?void 0:e.value}},{key:"setHiddenField",value:function(t,e){var r=this.hiddenField(t);r&&(r.value=e)}},{key:"name",get:function(){var t,e,r;return null!==(t=null===(e=this.$refs.input)||void 0===e?void 0:e.name)&&void 0!==t?t:null===(r=this.$refs.select)||void 0===r?void 0:r.name}},{key:"errorCondition",get:function(){return!1}},{key:"reset",value:function(){}},{key:"addListener",value:function(t,e){this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e)}},{key:"notifyListeners",value:function(t,e){this.listeners[t]&&this.listeners[t].forEach((function(t){return t(e)}))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(o.default);e.default=d},6317:(t,e,r)=>{"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1539),r(4747),r(1703);var o=i((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);try{var i=new e[r](n);return i.$mixins&&i.$mixins.forEach((function(t){return t.postInit(i)})),i}catch(t){console.error("Error: Trying to initialize "+r,t)}}));e.default=o},5965:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r(1299),r(2419),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(1703),r(1539),r(4747),r(489);var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,i=a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,t)).player=null,e.inviewAutoplayThreshold=.75,e.settings={controls:"false"!==e.$el.dataset.videoControls,mute:"true"===e.$el.dataset.mute,autoplay:"true"===e.$el.dataset.autoplay,loop:"true"===e.$el.dataset.loop,allowFullscreen:"true"===e.$el.dataset.allowFullscreen},e}return e=l,(r=[{key:"initVideoPlayer",value:function(){throw new Error("You have to implement the method initVideoPlayer")}},{key:"play",value:function(){throw new Error("You have to implement the method play")}},{key:"pause",value:function(){throw new Error("You have to implement the method pause!")}},{key:"mute",value:function(){throw new Error("You have to implement the method mute!")}},{key:"addIntersectionObserver",value:function(){var t=this,e=!1;new IntersectionObserver((function(r){r.forEach((function(r){r.intersectionRatio<t.inviewAutoplayThreshold?(t.pause("intersectionObserver"),e=!0):e&&t.settings.autoplay&&(t.play("intersectionObserver"),e=!1)}))}),{threshold:this.inviewAutoplayThreshold}).observe(this.$refs.playerContainer)}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(((i=r(7330))&&i.__esModule?i:{default:i}).default);e.default=u},6179:(t,e,r)=>{"use strict";r(1703),r(7042),r(1539),r(8309),r(1038),r(8783),r(7601),r(2526),r(1817),r(2165),r(6992),r(3948),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(4916),r(5306);var n=r(4724);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw s}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
2(this,t),this.utmParams=["UtmSource","UtmMedium","UtmCampaign","UtmTerm","UtmContent"]}var e,r,o;return e=t,(r=[{key:"setUtmParams",value:function(){var t,e=i(this.utmParams);try{for(e.s();!(t=e.n()).done;){var r=t.value,o=(0,n.getQueryParam)(r);o&&(r=r.replace("Utm","utm"),localStorage.setItem(r,o))}}catch(t){e.e(t)}finally{e.f()}}},{key:"getUtmParams",value:function(){var t,e,r,n,o=[],s=i(this.utmParams);try{for(s.s();!(t=s.n()).done;){var a=t.value;a=a.replace("Utm","utm");var l=localStorage.getItem(a);l&&o.push((n=l,(r=a)in(e={})?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e))}}catch(t){s.e(t)}finally{s.f()}return o}}])&&s(e.prototype,r),o&&s(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},8483:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r(7941),r(2526),r(7327),r(5003),r(4747),r(9337),Object.defineProperty(e,"__esModule",{value:!0}),e.trackEvent=e.getTrackingDataFromBrick=e.getEventByRole=e.createOfflineEventObject=e.VIDEO_STOP_EVENT=e.VIDEO_START_EVENT=e.VIDEO_END_EVENT=e.TEASER_CLICK_EVENT=e.TAB_OPEN_EVENT=e.SLIDER_CLICK_EVENT=e.SEARCH_SUBMIT_EVENT=e.PRODUCT_GALLERY_FILTER_EVENT=e.MEDIA_GALLERY_CLICK_EVENT=e.LIGHTBOX_SHOW_EVENT=e.FORM_SUCCESS_EVENT=e.FORM_SOI_EVENT=e.FORM_ERROR_EVENT=e.FORM_DATA_PRIVACY=e.CTA_CLICK_EVENT=e.ACCORDION_OPEN_EVENT=void 0,r(6992),r(1539),r(8783),r(3948),r(285),r(1637),r(4916),r(5306),r(9714),r(8309);e.FORM_SUCCESS_EVENT="form_success";e.FORM_ERROR_EVENT="form_error";var s="form_soi";e.FORM_SOI_EVENT=s;var a="form_data_privacy";e.FORM_DATA_PRIVACY=a;e.CTA_CLICK_EVENT="cta_click";e.TEASER_CLICK_EVENT="teaser_click";e.ACCORDION_OPEN_EVENT="accordeon_open";e.TAB_OPEN_EVENT="tab_open";e.MEDIA_GALLERY_CLICK_EVENT="media_gallery_click";e.PRODUCT_GALLERY_FILTER_EVENT="product_gallery_filter";e.SLIDER_CLICK_EVENT="slider_click";e.VIDEO_START_EVENT="video_start";e.VIDEO_STOP_EVENT="video_stop";e.VIDEO_END_EVENT="video_end";e.SEARCH_SUBMIT_EVENT="search_submit";e.LIGHTBOX_SHOW_EVENT="lightbox_show";e.trackEvent=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;if(t){var u=t.closest(".b-brick"),h=l(u),f=window.location.href;if(null!==c){var d=new URL(f);d.searchParams.set(c,""),f=d.toString().replace(c+"=",c)}var p=document.createEvent("CustomEvent");p.initCustomEvent("wls_default_tracking",!0,!0,i({eventType:e,eventCategory:f+(h&&h.name?" "+h.name:"")+(h&&h.index?"-"+h.index:""),eventAction:r+(s&&h.campaign?" "+h.campaign:""),eventLabel:n,deferred:o},a)),t.dispatchEvent(p)}else console.warn("Please add source element to tracking call. (trackEvent)")};var l=function(t){return t?{index:t.dataset.trIndex,name:t.dataset.trName,campaign:t.dataset.trCampaign}:null};e.getTrackingDataFromBrick=l;e.createOfflineEventObject=function(t){var e=t.element,r=t.type,n=t.action,o=t.label,s=void 0===o?"":o,a=t.deferred,c=void 0!==a&&a,u=t.addCampaignToAction,h=void 0!==u&&u,f=t.params,d=void 0===f?{}:f;if(e){var p=e.closest(".b-brick"),m=l(p);return i({eventType:r,eventCategory:window.location.href+(m&&m.name?" "+m.name:"")+(m&&m.index?"-"+m.index:""),eventAction:n+(h&&m.campaign?" "+m.campaign:""),eventLabel:s,date:Date.now(),deferred:c},d)}console.warn("Please add source element to tracking call. (trackEvent)")};e.getEventByRole=function(t){switch(t){case"newsletter":return{event:s,name:"form-soi-checked"};case"dataPrivacy":return{event:a,name:"form-data-privacy-checked"}}return{event:null,name:null}}},4724:(t,e,r)=>{"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"medium",e=arguments.length>1?arguments[1]:void 0;["small","medium","large","xlarge"].includes(t)||console.warn("matchBreakpoint(): undefined breakpoint "+t);var r=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint--".concat(t)),n=window.matchMedia("(min-width: ".concat(r,")"));return"function"==typeof e&&(void 0!==n.addEventListener?n.addEventListener("change",e):n.addListener(e)),n}
2Object.defineProperty(e,"__esModule",{value:!0}),e.alignItemsByRow=function(){var t=document.querySelectorAll(".align-rowheight");if(!t||0===t.length)return;if(!n("small").matches)return void t.forEach((function(t){t.style.height=""}));for(var e=t[0].getBoundingClientRect().y,r=0,i=0;i<t.length;i++)if(!(t[i].getBoundingClientRect().y-e<5)){r=0===r?i:r;break}var o=Array.from(t).reduce((function(t,e,n){return 0===n%r?t.push([e]):t[t.length-1].push(e),t}),[[]]);o.shift(),o.forEach((function(t){t.sort((function(t,e){return t.offsetHeight>e.offsetHeight?1:-1})),t.reverse(),t.forEach((function(e){0!==e.clientHeight&&(e.style.height=e.clientHeight<e.scrollHeight?"".concat(t[0].offsetHeight+(e.scrollHeight-e.clientHeight),"px"):"".concat(t[0].offsetHeight,"px"))}))}))},e.arrayEqual=function(t,e){if((null==t?void 0:t.length)!==(null==e?void 0:e.length))return!1;if(!t&&!e)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},e.arrayify=function(t){if(!t)return[];if(Array.isArray(t))return t;return[t]},e.containsNumbersOnly=function(t){return new RegExp(/^[0-9]+$/).test(t)},e.getCookie=function(t){var e=new RegExp(t+"=([^;]+)").exec(document.cookie);return null!=e?unescape(e[1]):null},e.getCurrentBreakpoint=function(){var t=n("small"),e=n("medium"),r=n("large"),i=n("xlarge"),o="xsmall";t.matches&&(o="small");e.matches&&(o="medium");r.matches&&(o="large");i.matches&&(o="xlarge");return o},e.getFromLocalStorage=function(t){if(void 0!==window.localStorage)return localStorage.getItem(t)},e.getQueryParam=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.href;t=t.replace(/[[\]]/g,"\\$&");var r=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),n=r.exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},e.haversineDistance=function(t,e,r,n){var i=function(t){return t*Math.PI/180},o=i(r-t),s=i(n-e),a=Math.sin(o/2)*Math.sin(o/2)+Math.cos(i(t))*Math.cos(i(r))*Math.sin(s/2)*Math.sin(s/2),l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return 6371*l},e.matchBreakpoint=n,e.saveToLocalStorage=function(t,e){void 0!==window.localStorage&&localStorage.setItem(t,e)},e.setCookie=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3);var i="expires="+n.toUTCString(),o=t+"="+r+";path=/;";0;0!==e&&(o+=i);document.cookie=o},e.unarrayify=function(t){if(Array.isArray(t))return t.length>0?t[0]:null;return t},r(4603),r(8450),r(4916),r(8386),r(9714),r(7601),r(6699),r(5306),r(1539),r(4747),r(5827),r(1038),r(8783),r(2707),r(5069)},4740:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(1703),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2443),r(3680),r(3706),r(408),r(489),r(4747),r(8309),r(5069),r(7042),Object.defineProperty(e,"__esModule",{value:!0}),e.WishlistApi=void 0,r(1539),r(8674),r(8862);var i=r(3028);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=w(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=h(t,e,r);
vendor: 5,609 bytes, line 2
2if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,s),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function p(){}function m(){}var g={};c(g,s,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,s)&&(g=_);var v=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,s,a,l){var c=h(t[o],t,s);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m,c(v,"constructor",m),c(m,"constructor",p),p.displayName=c(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,l,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(v),c(v,l,"Generator"),c(v,s,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void r(t)}a.done?e(l):Promise.resolve(l).then(n,i)}function a(t){return function(){var e=this,r=arguments;
2return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,l,"next",t)}function l(t){s(o,n,i,a,l,"throw",t)}a(void 0)}))}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e}var e,r,n,s,c;return e=t,r=[{key:"getProducts",value:(c=a(o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(this.options.fetchUrl);case 3:if((e=t.sent).ok){t.next=6;break}return t.abrupt("return",[]);case 6:return t.next=8,e.json();case 8:if(r=t.sent,!Array.isArray(r)){t.next=12;break}return this.dispatchWishlistCountChanged(r.length),t.abrupt("return",r);case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.error("Error fetching wishlist products",t.t0);case 17:return this.dispatchWishlistCountChanged(0),t.abrupt("return",[]);case 19:case"end":return t.stop()}}),t,this,[[0,14]])}))),function(){return c.apply(this,arguments)})},{key:"toggleProduct",value:(s=a(o().mark((function t(e,r){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(this.options.toggleUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product:e,wishlisted:r})});case 3:if((n=t.sent).ok){t.next=6;break}return t.abrupt("return",null);case 6:return t.next=8,n.json();case 8:return i=t.sent,this.dispatchWishlistCountChanged(i.wishlistCount),t.abrupt("return",i);case 13:return t.prev=13,t.t0=t.catch(0),console.error("Error sending to wishlist",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,this,[[0,13]])}))),function(t,e){return s.apply(this,arguments)})},{key:"dispatchWishlistCountChanged",value:function(t){document.dispatchEvent(new CustomEvent(i.WISHLIST_COUNT_CHANGED,{detail:{wishlistCount:t}}))}}],r&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.WishlistApi=c},5541:(t,e,r)=>{"use strict";r(1703),r(2526),r(1817),r(2165),r(8309),r(1038),r(7327),r(5003),r(9337),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(9720),r(6699),r(2023),r(4916),r(3123),r(2479),r(1539),r(4747),r(7941),r(561),r(6992),r(8783),r(3948),r(1637),r(7852),r(7042),r(7601),r(5306);var n=r(4724);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,t),this.state={};for(var r=0,n=Object.entries(e);r<n.length;r++){var i=l(n[r],2),o=i[0],s=i[1];this.add(o,s)}}var e,r,i;return e=t,r=[{key:"get",value:function(t){if(t.includes(".")){var e,r=l(t.split(".",2),2),n=r[0],i=r[1];return null===(e=this.state[n])||void 0===e?void 0:e[i]}return this.state[this._normalizeKey(t)]}},{key:"has",value:function(t,e){var r;return Array.isArray(this.state[t])?null===(r=this.state[t])||void 0===r?void 0:r.includes(e):this.state[t]&&Object.values(this.state[t]).includes(e)}},{key:"entries",value:function(){for(var t=[],e=function(){var e=l(n[r],2),i=e[0],o=e[1];Array.isArray(o)?o.forEach((function(e,r){return t.push([i,e,r])}
2)):Object.entries(o).forEach((function(e,r){var n=l(e,2),o=n[0],s=n[1];return t.push([i+"."+o,s,r])}))},r=0,n=Object.entries(this.state);r<n.length;r++)e();return t}},{key:"size",value:function(){return Object.keys(this.state).length}},{key:"add",value:function(t,e){if(t.includes(".")){var r=l(t.split(".",2),2),i=r[0],o=r[1];this.addComplex(i,o,e)}else this.state[this._normalizeKey(t)]="object"===a(e)?e:(0,n.arrayify)(e)}},{key:"addComplex",value:function(t,e,r){t in this.state||(this.state[t]={}),this.state[t][e]=r}},{key:"remove",value:function(t){var e,r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!((t=this._normalizeKey(t))in this.state))return!1;if(t.includes(".")){var o=t.split(".",2),s=l(o,2),a=s[0],c=s[1];return this.removeComplex(a,c,i)}if(!i)return delete this.state[t],!0;var u=null===(e=this.state[t])||void 0===e?void 0:e.indexOf(i),h=null===(r=this.state[t])||void 0===r?void 0:r.splice(u,1);return 0===(null===(n=this.state[t])||void 0===n?void 0:n.length)&&delete this.state[t],h&&h.length>0}},{key:"removeComplex",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e in this.state[t]&&(!r||this.state[t][e]===r)&&(delete this.state[t][e],!0)}},{key:"merge",value:function(e){return new t(o(o({},this.state),e.state))}},{key:"toQueryString",value:function(){var t=new URLSearchParams;return Object.entries(this.state).forEach((function(e){var r=l(e,2),n=r[0],i=r[1];if(i)if(Array.isArray(i)){var o=n+(i.length>1?"[]":"");i.forEach((function(e){return t.append(o,e)}))}else Object.entries(i).forEach((function(e){var r=l(e,2),i=r[0],o=r[1];o&&t.append(n+"."+i,o)}))})),t}},{key:"_normalizeKey",value:function(t){return t.endsWith("[]")?t.slice(0,-2):t}}],i=[{key:"fromQueryString",value:function(e){var r,n=new t,i=e instanceof URLSearchParams?e:new URLSearchParams(e),o=/\[[0-9]?]$/,s=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(i.keys());try{for(s.s();!(r=s.n()).done;){var a=r.value;if(o.test(a)){var l=a.replace(o,"[]");n.add(l,i.getAll(a))}else n.add(a,i.get(a))}}catch(t){s.e(t)}finally{s.f()}return n}}],r&&f(e.prototype,r),i&&f(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},2106:(t,e,r)=>{"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}r(1703),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$el=e.$el}var e,r,i;return e=t,(r=[{key:"postInit",value:function(t){}}])&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);r(4822)})();

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